/* ===== AJAX-NAV PROGRESS BAR ===== */
#nav-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    z-index: 9999;
    background: linear-gradient(90deg, var(--primary, #4f46e5), #818cf8);
    transition: width 0.3s ease, opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px rgba(79, 70, 229, 0.5);
}
#nav-progress-bar.active {
    opacity: 1;
}
#nav-progress-bar.complete {
    width: 100% !important;
    opacity: 0;
    transition: width 0.1s ease, opacity 0.4s ease 0.15s;
}

/* ===== AJAX-NAV PAGE TRANSITION ===== */
#main-content {
    transition: opacity 0.15s ease;
}
#main-content.ajax-loading {
    opacity: 0.4;
    pointer-events: none;
}

/* ===== GLOBAL STYLES ===== */
:root {
    --primary: var(--app-primary, #4f46e5);
    --primary-dark: color-mix(in srgb, var(--app-primary, #4f46e5) 80%, #000);
    --primary-light: color-mix(in srgb, var(--app-primary, #4f46e5) 60%, #fff);
    --dark: var(--app-text, #1e293b);
    --gray: var(--app-text-muted, #64748b);
    --light: #f8fafc;
    --border: #e2e8f0;
    --bg-classic: var(--app-bg, #f4f6fb);
}

html {
    font-size: 16px;
    position: relative;
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--app-body-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    color: var(--dark);
    line-height: var(--app-line-height, 1.75);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.theme-classic body {
    background: var(--bg-classic);
}

.flex-grow-1 {
    flex-grow: 1;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

/* ===== NAVBAR ===== */
.navbar {
    padding: 0.75rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.3rem;
    letter-spacing: -0.5px;
}

.navbar .nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease;
}

.navbar .nav-link:hover {
    color: #818cf8 !important;
}

/* ===== CARD STYLES ===== */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08) !important;
}

.card {
    border-radius: 0.75rem;
    overflow: hidden;
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    overflow: hidden;
}

/* ===== POST CONTENT ===== */
.post-content {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.9;
    color: #334155;
}

.post-content h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.post-content h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.post-content pre {
    position: relative;
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.post-content code {
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 0.9em;
}

.post-content p code,
.post-content li code {
    background: #f1f5f9;
    color: #c026d3;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.85em;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: #f8fafc;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: var(--gray);
}

/* ===== POST CONTENT TYPOGRAPHY ===== */
.post-content {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--app-text, var(--dark));
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Headings */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    font-family: var(--app-heading-font, 'Inter', sans-serif);
    font-weight: var(--app-heading-weight, 700);
    line-height: 1.25;
    margin-top: 2.25em;
    margin-bottom: 0.75em;
    color: var(--app-text, var(--dark));
    letter-spacing: -0.02em;
}
.post-content h1 { font-size: 2rem; }
.post-content h2 { font-size: 1.6rem; border-bottom: 2px solid var(--app-primary, var(--primary)); padding-bottom: 0.35em; }
.post-content h3 { font-size: 1.3rem; }
.post-content h4 { font-size: 1.1rem; }
.post-content h5, .post-content h6 { font-size: 1rem; }

/* First element — no top margin */
.post-content > *:first-child { margin-top: 0; }
.post-content > *:last-child  { margin-bottom: 0; }

/* Paragraphs */
.post-content p {
    margin-bottom: 1.4em;
}

/* Links */
.post-content a {
    color: var(--app-primary, var(--primary));
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.post-content a:hover {
    color: var(--primary-dark, #4338ca);
    text-decoration-thickness: 2px;
}

/* Strong / em */
.post-content strong { font-weight: 700; }
.post-content em     { font-style: italic; }

/* Images */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--app-radius, 10px);
    display: block;
    margin: 1.75em auto;
    box-shadow: var(--app-shadow, 0 4px 20px rgba(0,0,0,.08));
}

/* Ordered & Unordered Lists */
.post-content ul,
.post-content ol {
    padding-left: 1.75em;
    margin-bottom: 1.4em;
}
.post-content li { margin-bottom: 0.45em; }
.post-content li > ul,
.post-content li > ol { margin-top: 0.45em; margin-bottom: 0; }

/* Blockquote */
.post-content blockquote {
    border-left: 4px solid var(--app-primary, var(--primary));
    background: rgba(79,70,229,.04);
    margin: 1.75em 0;
    padding: 1.1em 1.5em;
    border-radius: 0 var(--app-radius, 8px) var(--app-radius, 8px) 0;
    color: var(--app-text-muted, var(--gray));
    font-style: italic;
    font-size: 1.05em;
}
.post-content blockquote p:last-child { margin-bottom: 0; }
.post-content blockquote cite {
    display: block;
    margin-top: 0.6em;
    font-size: 0.85em;
    font-style: normal;
    font-weight: 600;
    color: var(--app-text, var(--dark));
}
.post-content blockquote cite::before { content: "\2014\0020"; }

/* Horizontal Rule */
.post-content hr {
    border: none;
    border-top: 2px solid var(--app-primary, var(--primary));
    opacity: 0.15;
    margin: 2.5em 0;
}

/* Inline Code */
.post-content code:not(pre > code) {
    background: rgba(79,70,229,.08);
    color: #be185d;
    padding: 0.15em 0.45em;
    border-radius: 4px;
    font-size: 0.88em;
    font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    border: 1px solid rgba(79,70,229,.15);
    white-space: nowrap;
}

/* Code Block */
.post-content pre {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: var(--app-radius, 10px);
    padding: 1.4em 1.6em;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.7;
    margin: 1.75em 0;
    position: relative;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 8px 30px rgba(0,0,0,.18);
}
.post-content pre code {
    background: none !important;
    color: inherit !important;
    padding: 0 !important;
    border: none !important;
    font-size: 1em;
    white-space: pre;
}

/* Tables */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.75em 0;
    font-size: 0.93rem;
    border-radius: var(--app-radius, 8px);
    overflow: hidden;
    box-shadow: var(--app-shadow, 0 2px 8px rgba(0,0,0,.06));
}
.post-content table thead th {
    background: var(--app-primary, var(--primary));
    color: #fff;
    font-weight: 600;
    padding: 0.7em 1em;
    text-align: left;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: none;
}
.post-content table tbody tr:nth-child(odd)  { background: var(--app-surface, #fff); }
.post-content table tbody tr:nth-child(even) { background: rgba(79,70,229,.03); }
.post-content table tbody tr:hover           { background: rgba(79,70,229,.06); transition: background .15s ease; }
.post-content table td {
    padding: 0.65em 1em;
    border-bottom: 1px solid var(--border, #e2e8f0);
    vertical-align: top;
}

/* Alignment helpers from Quill */
.post-content .ql-align-center { text-align: center; }
.post-content .ql-align-right  { text-align: right; }
.post-content .ql-align-justify { text-align: justify; }
.post-content .ql-indent-1 { padding-left: 3em; }
.post-content .ql-indent-2 { padding-left: 6em; }

/* Callout / Info boxes (hand-authored) */
.post-content .callout {
    border-radius: var(--app-radius, 8px);
    padding: 1em 1.25em;
    margin: 1.5em 0;
    display: flex;
    gap: 0.75em;
    align-items: flex-start;
    font-size: 0.95em;
}
.post-content .callout-info    { background: #eff6ff; border-left: 4px solid #3b82f6; color: #1e40af; }
.post-content .callout-warning { background: #fffbeb; border-left: 4px solid #f59e0b; color: #92400e; }
.post-content .callout-danger  { background: #fef2f2; border-left: 4px solid #ef4444; color: #991b1b; }
.post-content .callout-success { background: #f0fdf4; border-left: 4px solid #22c55e; color: #14532d; }

/* Dark mode adjustments */
[data-bs-theme="dark"] .post-content { color: var(--bs-body-color); }
[data-bs-theme="dark"] .post-content h1,[data-bs-theme="dark"] .post-content h2,
[data-bs-theme="dark"] .post-content h3,[data-bs-theme="dark"] .post-content h4 { color: var(--bs-body-color); }
[data-bs-theme="dark"] .post-content blockquote { background: rgba(255,255,255,.04); }
[data-bs-theme="dark"] .post-content code:not(pre > code) { background: rgba(139,92,246,.15); color: #c084fc; border-color: rgba(139,92,246,.25); }
[data-bs-theme="dark"] .post-content table tbody tr:nth-child(odd)  { background: rgba(255,255,255,.03); }
[data-bs-theme="dark"] .post-content table tbody tr:nth-child(even) { background: rgba(255,255,255,.05); }
[data-bs-theme="dark"] .post-content table td { border-color: rgba(255,255,255,.08); }

@media (max-width: 768px) {
    .post-content { font-size: 1rem; }
    .post-content h1 { font-size: 1.6rem; }
    .post-content h2 { font-size: 1.3rem; }
    .post-content h3 { font-size: 1.15rem; }
    .post-content pre { padding: 1em; font-size: 0.82rem; }
    .post-content table { font-size: 0.85rem; }
    .post-content table thead th, .post-content table td { padding: 0.5em 0.65em; }
}

/* ===== SIDEBAR ===== */
.sidebar-post-title {
    font-size: 0.9rem;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.sidebar-post-title:hover {
    color: var(--primary) !important;
}

/* ===== TAGS ===== */
.tag-badge {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tag-badge:hover {
    background-color: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

/* ===== PAGINATION ===== */
.pagination .page-link {
    border: none;
    margin: 0 0.15rem;
    border-radius: 0.5rem;
    padding: 0.5rem 0.85rem;
    color: var(--dark);
    font-weight: 500;
    font-size: 0.9rem;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary);
    color: white;
}

.pagination .page-link:hover {
    background-color: #f1f5f9;
}

/* ===== BADGES ===== */
.badge {
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ===== BUTTONS ===== */
.btn {
    font-weight: 500;
    border-radius: 0.5rem;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

.form-control:focus {
    border-color: var(--primary);
}

/* ===== FOOTER ===== */
footer a:hover {
    color: white !important;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    font-size: 0.875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "\203A";
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ===== OBJECT FIT ===== */
.object-fit-cover {
    object-fit: cover;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.75rem;
    }

    .hero-section .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .post-content {
        font-size: 1rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.4s ease-out;
}

/* ===== Hero floating animation ===== */
@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ===== TABLE STYLES (Admin) ===== */
.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray);
}

/* ===== LOGIN PAGE ===== */
.input-group-text {
    border-radius: 0.5rem 0 0 0.5rem;
}

.input-group .form-control {
    border-radius: 0 0.5rem 0.5rem 0;
}

/* ===== SELECTION ===== */
::selection {
    background-color: rgba(79, 70, 229, 0.15);
    color: var(--dark);
}

/* ===== READING PROGRESS BAR ===== */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    width: 0%;
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1050;
    cursor: pointer;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

/* ===== COPY CODE BUTTON ===== */
.copy-code-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.copy-code-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
}

.copy-code-btn.copied {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.3);
}

/* ===== COPY LINK BUTTON ===== */
.copy-link-btn.copied {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border-color: #16a34a;
}

/* ===== AJAX TRANSITIONS ===== */
#postsGrid,
#searchResults {
    transition: opacity 0.3s ease;
}

.ajax-feedback .alert {
    animation: fadeInUp 0.3s ease forwards;
}

/* =====================================================================
   CLASSIC THEME — HERO STYLE VARIANTS
   Driven by HeroStyle setting: gradient | image-overlay | minimal | magazine
   ===================================================================== */

/* gradient (default) — kept as .hero-section existing style */
.hero-section { position: relative; overflow: hidden; }

/* image-overlay: dark scrim over the featured post image */
.hero-image-overlay {
    position: relative; overflow: hidden; min-height: 420px;
    display: flex; align-items: flex-end; padding: 3rem 0 2.5rem;
    background: #1e293b;
}
.hero-image-overlay-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
}
.hero-image-overlay-bg::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.45) 55%, rgba(0,0,0,0.15) 100%);
}
.hero-image-overlay .container { position: relative; z-index: 2; }
.hero-image-overlay h1 { color: #fff; }
.hero-image-overlay p  { color: rgba(255,255,255,0.72); }

/* minimal: light, centered, no heavy background */
.hero-minimal {
    background: var(--app-bg, #f4f6fb);
    border-bottom: 2px solid var(--app-primary, #4f46e5);
    padding: 4rem 0 3.5rem; text-align: center;
}
.hero-minimal h1 { color: var(--app-text, #1e293b); font-size: clamp(1.8rem, 4vw, 3rem); }
.hero-minimal p   { color: var(--app-text-muted, #64748b); max-width: 540px; margin: 0 auto; }
.hero-minimal .hero-tag-pill {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: rgba(var(--app-primary-rgb, 79,70,229), 0.08);
    color: var(--app-primary, #4f46e5);
    border: 1px solid rgba(var(--app-primary-rgb, 79,70,229), 0.2);
    border-radius: 999px; padding: 0.35rem 1rem; font-size: 0.78rem;
    font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
    margin-bottom: 1rem; text-decoration: none;
}

/* magazine/angled: bold left-border + diagonal clip + accent column */
.hero-magazine-classic {
    background: linear-gradient(145deg, var(--app-primary, #4f46e5) 0%, var(--app-secondary, #7c3aed) 100%);
    position: relative; overflow: hidden;
    padding: 4.5rem 0 5rem;
    clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
}
.hero-magazine-classic::before {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") center;
    pointer-events: none;
}
.hero-magazine-classic .container { position: relative; z-index: 2; }
.hero-magazine-classic h1 { color: #fff; }
.hero-magazine-classic p  { color: rgba(255,255,255,0.72); }
.hero-magazine-classic .hero-eyebrow {
    display: inline-block; background: rgba(255,255,255,0.15); color: #fff;
    border: 1px solid rgba(255,255,255,0.2); border-radius: 4px;
    padding: 0.2rem 0.7rem; font-size: 0.68rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 1rem;
}
.hero-magazine-classic-spacer { padding-bottom: 2rem; }

/* =====================================================================
   CLASSIC THEME — HOME LAYOUT VARIANTS
   ===================================================================== */

/* list layout */
.layout-list .post-list-row {
    display: flex; gap: 1.25rem; align-items: flex-start;
    padding: 1.25rem 0; border-bottom: 1px solid var(--border, #e2e8f0);
}
.layout-list .post-list-row:last-child { border-bottom: none; }
.layout-list .post-list-thumb {
    flex-shrink: 0; width: 180px; height: 120px;
    object-fit: cover; border-radius: var(--app-radius, 8px);
    background: #f1f5f9;
}
.layout-list .post-list-thumb-placeholder {
    flex-shrink: 0; width: 180px; height: 120px;
    border-radius: var(--app-radius, 8px); background: #f1f5f9;
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8; font-size: 2rem;
}
.layout-list .post-list-body { flex: 1; min-width: 0; }
.layout-list .post-list-title {
    font-size: 1.1rem; font-weight: 700; margin-bottom: 0.35rem;
    line-height: 1.35; color: var(--app-text, #1e293b);
}
.layout-list .post-list-title a { color: inherit; text-decoration: none; }
.layout-list .post-list-title a:hover { color: var(--app-primary, #4f46e5); }
.layout-list .post-list-excerpt { font-size: 0.88rem; color: var(--app-text-muted, #64748b); line-height: 1.55; }
.layout-list .post-list-meta { font-size: 0.78rem; color: var(--app-text-muted, #64748b); margin-top: 0.5rem; }

/* masonry layout */
.layout-masonry .masonry-grid {
    column-count: 2; column-gap: 1.5rem;
}
@media (min-width: 992px) { .layout-masonry .masonry-grid { column-count: 3; } }
@media (max-width: 576px) { .layout-masonry .masonry-grid { column-count: 1; } }
.layout-masonry .masonry-item {
    break-inside: avoid; margin-bottom: 1.5rem;
}

/* =====================================================================
   CLASSIC THEME — POST CARD STYLE VARIANTS
   ===================================================================== */

/* compact card */
.card-style-compact .post-card-compact {
    display: flex; align-items: center; gap: 1rem;
    padding: 0.85rem 1rem; border-radius: var(--app-radius, 8px);
    border: 1px solid var(--border, #e2e8f0);
    background: var(--app-surface, #fff);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}
.card-style-compact .post-card-compact:hover {
    box-shadow: var(--app-shadow, 0 4px 20px rgba(0,0,0,.08));
    transform: translateX(3px);
}
.card-style-compact .post-card-compact-thumb {
    width: 68px; height: 52px; object-fit: cover;
    border-radius: calc(var(--app-radius, 8px) - 2px); flex-shrink: 0;
}
.card-style-compact .post-card-compact-body { flex: 1; min-width: 0; }
.card-style-compact .post-card-compact-title {
    font-size: 0.9rem; font-weight: 700; line-height: 1.3; color: var(--app-text, #1e293b);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-style-compact .post-card-compact-meta {
    font-size: 0.72rem; color: var(--app-text-muted, #64748b); margin-top: 0.2rem;
}

/* minimal card (borderless, no shadow) */
.card-style-minimal .post-card-minimal {
    padding-bottom: 1.25rem; margin-bottom: 0.25rem;
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.card-style-minimal .post-card-minimal:last-child { border-bottom: none; }
.card-style-minimal .post-card-minimal-title {
    font-size: 1rem; font-weight: 700; line-height: 1.35; margin-bottom: 0.25rem;
}
.card-style-minimal .post-card-minimal-title a { color: var(--app-text, #1e293b); text-decoration: none; }
.card-style-minimal .post-card-minimal-title a:hover { color: var(--app-primary, #4f46e5); }

/* magazine card: large image top, bold overlay category */
.card-style-magazine .post-card-magazine {
    position: relative; border-radius: var(--app-radius, 8px); overflow: hidden;
    box-shadow: var(--app-shadow, 0 4px 20px rgba(0,0,0,.08));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-style-magazine .post-card-magazine:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.14);
}
.card-style-magazine .post-card-magazine-img {
    width: 100%; height: 240px; object-fit: cover; display: block;
}
.card-style-magazine .post-card-magazine-img-placeholder {
    width: 100%; height: 240px; background: linear-gradient(135deg, #e0e7ff, #ede9fe);
    display: flex; align-items: center; justify-content: center; color: #a5b4fc; font-size: 2.5rem;
}
.card-style-magazine .post-card-magazine-body {
    padding: 1.25rem 1.1rem 1rem;
    background: var(--app-surface, #fff);
}
.card-style-magazine .post-card-magazine-cat {
    font-size: 0.62rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.1em; padding: 0.2rem 0.6rem; border-radius: 4px;
    background: var(--app-primary, #4f46e5); color: #fff; display: inline-block; margin-bottom: 0.5rem;
}
.card-style-magazine .post-card-magazine-title {
    font-size: 1.05rem; font-weight: 700; line-height: 1.3;
}
.card-style-magazine .post-card-magazine-title a { color: var(--app-text, #1e293b); text-decoration: none; }
.card-style-magazine .post-card-magazine-title a:hover { color: var(--app-primary, #4f46e5); }

/* =====================================================================
   CLASSIC THEME — RESPONSIVE HELPERS
   ===================================================================== */
@media (max-width: 768px) {
    .layout-list .post-list-thumb,
    .layout-list .post-list-thumb-placeholder { width: 110px; height: 80px; }
    .hero-magazine-classic { clip-path: none; }
}

/* =====================================================================
   LIVE SEARCH DROPDOWN (kept below new rules)
   ===================================================================== */

/* ===== LIVE SEARCH DROPDOWN ===== */
#navbarSearchResults,
#sidebarSearchResults,
#modernNavSearchResults {
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    padding: 0.25rem 0;
}

#navbarSearchResults .dropdown-item,
#sidebarSearchResults .dropdown-item,
#modernNavSearchResults .dropdown-item {
    border-radius: 0.5rem;
    margin: 0.15rem 0.25rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    transition: background-color 0.15s ease;
}

#navbarSearchResults .dropdown-item:hover,
#sidebarSearchResults .dropdown-item:hover,
#modernNavSearchResults .dropdown-item:hover {
    background: #f1f5f9;
}

#modernNavSearchBox {
    animation: fadeInUp 0.2s ease forwards;
}

#modernNavSearchBox .form-control {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 0.6rem 0 0 0.6rem;
}

#modernNavSearchBox .btn {
    border-radius: 0 0.6rem 0.6rem 0;
}
/* =====================================================================
   CLASSIC THEME – FEATURED ARTICLE DISPLAY STYLES
   featuredStyle: card (existing) | full-bleed | spotlight | stories
   ===================================================================== */

/* ── full-bleed: cinematic full-width image with dark overlay text ── */
.featured-full-bleed {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: var(--app-radius, 10px);
    margin: 0 0 2rem;
}
.featured-full-bleed-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.featured-full-bleed:hover .featured-full-bleed-img { transform: scale(1.04); }
.featured-full-bleed-placeholder {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #1e293b, #334155);
}
.featured-full-bleed-scrim {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 60%, transparent 100%);
}
.featured-full-bleed-body {
    position: relative; z-index: 2;
    padding: 2.5rem 2rem 2rem;
    width: 100%;
}
.featured-full-bleed-badge {
    display: inline-block;
    font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
    background: var(--app-primary, #4f46e5); color: #fff;
    padding: .2rem .65rem; border-radius: 4px; margin-bottom: .75rem;
}
.featured-full-bleed-cat {
    font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
    color: rgba(255,255,255,.65); margin-bottom: .5rem;
}
.featured-full-bleed-title {
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    font-weight: 800; line-height: 1.18; color: #fff; margin-bottom: .75rem;
    text-decoration: none; display: block;
}
.featured-full-bleed-title:hover { color: rgba(255,255,255,.85); }
.featured-full-bleed-excerpt { font-size: .9rem; color: rgba(255,255,255,.72); max-width: 680px; margin-bottom: 1rem; line-height: 1.6; }
.featured-full-bleed-meta { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .78rem; color: rgba(255,255,255,.6); align-items: center; }
.featured-full-bleed-meta .meta-sep { opacity: .35; }
.featured-full-bleed-cta {
    display: inline-flex; align-items: center; gap: .4rem;
    background: rgba(255,255,255,.15); color: #fff;
    backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.25);
    padding: .45rem 1.1rem; border-radius: 50px;
    font-size: .82rem; font-weight: 600; text-decoration: none;
    transition: background .2s, transform .15s;
}
.featured-full-bleed-cta:hover { background: rgba(255,255,255,.25); transform: translateX(3px); color: #fff; }

/* ── spotlight: accent gradient left panel + image right ── */
.featured-spotlight {
    display: flex;
    border-radius: var(--app-radius, 10px);
    overflow: hidden;
    box-shadow: var(--app-shadow, 0 4px 20px rgba(0,0,0,.1));
    margin: 0 0 2rem;
    min-height: 360px;
}
.featured-spotlight-left {
    flex: 0 0 42%;
    background: linear-gradient(145deg, var(--app-primary, #4f46e5), #7c3aed);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.featured-spotlight-left::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.featured-spotlight-badge {
    font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em;
    color: rgba(255,255,255,.7); margin-bottom: .75rem; position: relative;
}
.featured-spotlight-title {
    font-size: clamp(1.3rem, 2.5vw, 1.85rem);
    font-weight: 800; color: #fff; line-height: 1.22; margin-bottom: 1rem;
    text-decoration: none; display: block; position: relative;
}
.featured-spotlight-title:hover { color: rgba(255,255,255,.88); }
.featured-spotlight-excerpt { font-size: .85rem; color: rgba(255,255,255,.72); line-height: 1.6; margin-bottom: 1.25rem; position: relative; }
.featured-spotlight-meta { font-size: .76rem; color: rgba(255,255,255,.6); display: flex; flex-wrap: wrap; gap: .6rem; position: relative; }
.featured-spotlight-right {
    flex: 1;
    position: relative;
    overflow: hidden;
}
.featured-spotlight-right img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .5s ease;
}
.featured-spotlight:hover .featured-spotlight-right img { transform: scale(1.04); }
.featured-spotlight-right-placeholder {
    width: 100%; height: 100%; min-height: 300px;
    background: linear-gradient(135deg, #e0e7ff, #ede9fe);
    display: flex; align-items: center; justify-content: center;
    color: #a5b4fc; font-size: 4rem;
}
@media (max-width: 767px) {
    .featured-spotlight { flex-direction: column; }
    .featured-spotlight-left { flex: none; }
    .featured-spotlight-right { min-height: 220px; }
}

/* ── stories: featured large + 2 secondary side posts ── */
.featured-stories {
    display: grid;
    grid-template-columns: 3fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: .75rem;
    min-height: 440px;
    margin: 0 0 2rem;
    border-radius: var(--app-radius, 10px);
    overflow: hidden;
}
.featured-stories-main {
    grid-row: 1 / 3;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    border-radius: var(--app-radius, 10px) 0 0 var(--app-radius, 10px);
    text-decoration: none;
}
.featured-stories-main img,
.featured-stories-main-placeholder {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.featured-stories-main:hover img { transform: scale(1.04); }
.featured-stories-main-placeholder { background: linear-gradient(135deg, #1e293b, #334155); }
.featured-stories-main-scrim {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,.2) 55%, transparent 100%);
}
.featured-stories-main-body { position: relative; z-index: 2; padding: 1.5rem; width: 100%; }
.featured-stories-main-cat {
    font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
    background: var(--app-primary, #4f46e5); color: #fff;
    padding: .18rem .6rem; border-radius: 4px; display: inline-block; margin-bottom: .5rem;
}
.featured-stories-main-title {
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    font-weight: 800; color: #fff; line-height: 1.25; margin-bottom: .5rem;
}
.featured-stories-main-meta { font-size: .76rem; color: rgba(255,255,255,.65); display: flex; flex-wrap: wrap; gap: .5rem; }

.featured-stories-side {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    border-radius: 0 var(--app-radius, 10px) 0 0;
    text-decoration: none;
}
.featured-stories-side:last-child { border-radius: 0 0 var(--app-radius, 10px) 0; }
.featured-stories-side img,
.featured-stories-side-placeholder {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.featured-stories-side:hover img { transform: scale(1.06); }
.featured-stories-side-placeholder { background: linear-gradient(135deg, #334155, #475569); }
.featured-stories-side-scrim {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 65%);
}
.featured-stories-side-body { position: relative; z-index: 2; padding: .85rem .85rem .8rem; width: 100%; }
.featured-stories-side-cat {
    font-size: .55rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
    color: rgba(255,255,255,.7); margin-bottom: .25rem;
}
.featured-stories-side-title {
    font-size: .82rem; font-weight: 700; color: #fff; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.featured-stories-side-meta { font-size: .68rem; color: rgba(255,255,255,.55); margin-top: .3rem; }
@media (max-width: 767px) {
    .featured-stories { grid-template-columns: 1fr; grid-template-rows: auto; min-height: unset; }
    .featured-stories-main { min-height: 260px; border-radius: var(--app-radius, 10px); }
    .featured-stories-side { min-height: 180px; border-radius: var(--app-radius, 10px); }
}

/* ============================================================
   SHAPE DIVIDERS  (hero bottom / footer top)
   ============================================================ */
.shape-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 5;
}
.shape-divider svg {
    display: block;
    width: 100%;
}
.shape-divider--top {
    top: -1px;
    bottom: auto;
    transform: rotate(180deg);
}

/* Curve */
.shape-divider-curve svg { height: 70px; }
@media (max-width: 768px) { .shape-divider-curve svg { height: 40px; } }

/* Wave */
.shape-divider-wave svg { height: 80px; }
@media (max-width: 768px) { .shape-divider-wave svg { height: 48px; } }

/* Diagonal / slant */
.shape-divider-diagonal svg { height: 60px; }
@media (max-width: 768px) { .shape-divider-diagonal svg { height: 36px; } }

/* Arch */
.shape-divider-arch svg { height: 90px; }
@media (max-width: 768px) { .shape-divider-arch svg { height: 50px; } }

/* Make hero containers position:relative so shapes can be absolute */
.hero-shapeable {
    position: relative;
    overflow: visible;
}

/* Classic footer shape wrapper */
.classic-footer-shape {
    position: relative;
    margin-top: 0;
}
