@font-face { font-family: 'Vazirmatn'; src: url('../fonts/vazirmatn-arabic-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/vazirmatn-arabic-100-normal.woff2') format('woff2'); font-weight: 100; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/vazirmatn-arabic-300-normal.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/vazirmatn-arabic-700-normal.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/vazirmatn-arabic-900-normal.woff2') format('woff2'); font-weight: 900; font-style: normal; font-display: swap; }

:root {
    --brand-black: #000000;
    --brand-white: #ffffff;
    --brand-gray: #f2f2f2;
    --brand-accent: #ff3e00; /* Industrial Red-Orange */
    --safe-area-bottom: env(safe-area-inset-bottom);
}

html, body, button, input, optgroup, select, textarea, h1, h2, h3, h4, h5, h6, p, span, a {
    font-family: 'Vazirmatn', sans-serif !important;
}

body {
    background-color: #ffffff;
    background-image: 
        linear-gradient(to bottom, rgba(0, 0, 0, 0.018) 1px, transparent 1px),
        linear-gradient(to right, rgba(0, 0, 0, 0.018) 1px, transparent 1px);
    background-size: 100px 100px;
    background-repeat: repeat, repeat;
    background-attachment: fixed;
    color: var(--brand-black);
    -webkit-font-smoothing: antialiased;
    overscroll-behavior-y: none;
}

/* ─── CUSTOM SCROLLBAR ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--brand-white); }
::-webkit-scrollbar-thumb { background: var(--brand-black); }

/* ─── MOBILE FIRST NAVIGATION ─── */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 400px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    display: flex;
    justify-content: space-around;
    padding: 12px 10px;
    z-index: 9999;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.bottom-nav a {
    color: #888;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: color 0.3s;
}

.bottom-nav a.active { color: var(--brand-white); }
.bottom-nav a.active svg { stroke: var(--brand-accent); }

/* ─── UNIQUE LAYOUT ELEMENTS ─── */
.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #ccc;
}

.section-modular {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 40px 24px;
    border-bottom: 1px solid #eee;
}

/* ─── HORIZONTAL SCROLL FOR PRODUCTS ─── */
.snap-x-container {
    display: flex;
    overflow-x: auto;
    snap-type: x mandatory;
    scrollbar-width: none;
    gap: 16px;
    margin: 0 -24px;
    padding: 0 24px;
}
.snap-x-container::-webkit-scrollbar { display: none; }

.product-slide {
    flex: 0 0 85%;
    snap-align: start;
    background: var(--brand-gray);
    border-radius: 2px;
    padding: 40px 30px;
    position: relative;
}

/* ─── TYPOGRAPHY ─── */
.massive-title {
    font-size: clamp(60px, 15vw, 180px);
    line-height: 0.85;
    font-weight: 900;
    letter-spacing: -2px;
}

.accent-dot {
    width: 8px;
    height: 8px;
    background: var(--brand-accent);
    display: inline-block;
    margin-right: 8px;
}

/* ─── GRID ANIMATION ─── */
.waffle-pattern {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
    aspect-ratio: 1;
}
.waffle-box {
    background-color: #f0f0f0;
    border-radius: 4px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}
.waffle-box[data-image] {
    cursor: pointer;
}
.waffle-box[data-image]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    transition: opacity 0.3s ease;
    z-index: 1;
}
.waffle-box[data-image]:hover {
    transform: scale(1.08) rotate(1.5deg);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    z-index: 10;
}
.waffle-box[data-image]:hover::after {
    opacity: 0;
}
.waffle-box:not([data-image]):hover {
    background: var(--brand-black);
}

/* Enhanced Industrial Animations */
.massive-title {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.massive-title:hover {
    transform: scale(1.015);
}

.product-slide {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), 
                box-shadow 0.3s ease;
}

.product-slide:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.accent-dot {
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Contact form improvements */
#contactForm input,
#contactForm textarea {
    transition: border-color 0.3s ease;
}

#contactForm input:focus,
#contactForm textarea:focus {
    border-color: var(--brand-accent);
    outline: none;
}

/* Stats numbers animation ready */
.stat-number {
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.ltr-text {
    direction: ltr;
    display: inline-block;
}

/* Absolute Logo Styles (Mobile and Desktop) - Not Sticky */
.site-logo-absolute,
.custom-logo-link {
    position: absolute;
    display: flex;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10000;
}
.site-logo-absolute img,
.custom-logo-link img,
.site-logo-img {
    height: 38px;
    max-height: 38px;
    width: auto;
    object-fit: contain;
    transition: all 0.5s ease;
}

/* Mobile Off-Canvas Overlay Styles */
#mobileOffCanvas {
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
#mobileOffCanvas.open {
    opacity: 1 !important;
    pointer-events: auto !important;
    display: flex !important;
}

/* ─── MOBILE ENHANCEMENTS & SCROLL RESPONSIVENESS ─── */
@media (max-width: 1023px) {
    /* Header Spacing Fix: clear absolute header elements on mobile */
    #home.section-modular {
        padding-top: 110px !important;
    }
    main#main-content.py-16,
    main#main-content.py-24,
    main#main-content.container,
    .project-archive {
        padding-top: 100px !important;
    }
    /* Mobile bottom-nav styling */
    .bottom-nav {
        position: fixed;
        bottom: 20px;
        left: 16px;
        right: 90px;
        width: auto !important;
        max-width: none !important;
        height: 56px;
        border-radius: 28px;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.25);
        display: flex;
        align-items: center;
        justify-content: space-around;
        padding: 0 12px;
        z-index: 9999;
        /* Start state for Anime.js: shifted down and hidden */
        opacity: 0;
        transform: translateY(150px);
    }
    
    #mobileCanvasTrigger {
        position: fixed;
        top: 16px; 
        left: 24px;
        bottom: auto;
        right: auto;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        z-index: 10000;
        background: #000;
        color: #fff;
        border: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Mobile Bottom Nav Links Wrapper default */
.bottom-nav-links {
    display: flex;
    justify-content: space-around;
    width: 100%;
}

/* ─── DESKTOP ENHANCEMENTS ─── */
@media (min-width: 1024px) {
    .section-modular {
        padding: 100px 8%;
        flex-direction: row;
        align-items: center;
        gap: 100px;
    }
    .hero-content { flex: 1; }
    .hero-visual { flex: 1; }
    
    /* Desktop Logo - Natural scrolling absolute position */
    .site-logo-absolute {
        position: absolute !important;
        top: 58px !important;
        right: clamp(24px, 4vw, 64px) !important;
        transform: translateY(-50%);
        left: auto !important;
        display: flex;
        align-items: center;
        z-index: 10000;
    }
    .site-logo-absolute img,
    .custom-logo-link img,
    .site-logo-img {
        height: 54px;
        max-height: 54px;
        width: auto;
    }
    
    /* Single Morphing Capsule Navigation on Desktop */
    /* DEFAULT STATE (SCROLLED-TO-TOP): Horizontal Centered Header Capsule (shows text) */
    .bottom-nav { 
        position: fixed;
        top: 24px; 
        bottom: auto; 
        left: 50%; 
        transform: translateX(-50%) rotate(0deg); 
        width: 500px; /* Wider horizontal capsule to fit both icons and text beautifully */
        height: 68px; 
        /* 999px is clamped by the browser: a true capsule at every size. */
        border-radius: 999px;
        display: flex;
        flex-direction: row !important;
        align-items: center;
        justify-content: space-around;
        padding: 0 24px;
        z-index: 9999;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: 0 10px 40px rgba(0,0,0,0.25);
        opacity: 1 !important;
        pointer-events: auto !important;
        transform-origin: center center;
        overflow: hidden;
        transition: left 0.45s cubic-bezier(.16,1,.3,1), top 0.45s cubic-bezier(.16,1,.3,1), transform 0.45s cubic-bezier(.16,1,.3,1), width 0.45s cubic-bezier(.16,1,.3,1), height 0.45s cubic-bezier(.16,1,.3,1), border-radius 0.45s cubic-bezier(.16,1,.3,1), padding 0.45s cubic-bezier(.16,1,.3,1), background-color .3s ease, box-shadow .3s ease;
    }
    
    .bottom-nav-links {
        display: flex;
        flex-direction: row !important;
        align-items: center;
        gap: 20px;
        width: 100%;
        height: 100%;
        justify-content: space-around;
        transition: all 0.3s ease;
    }
    
    /* Text display is visible on desktop top state */
    .bottom-nav a {
        flex-direction: row !important;
        gap: 8px;
        font-size: 11px !important;
        font-weight: 900 !important;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    .bottom-nav a span {
        display: inline-block !important;
        font-family: 'Vazirmatn', sans-serif;
        white-space: nowrap;
        transition: opacity .18s ease;
    }

    /* SCROLLED-DOWN STATE: same capsule dimensions as the header, rotated by layout (68 × 500). */
    .bottom-nav.scrolled {
        top: 50%;
        bottom: auto;
        left: 24px;
        transform: translateY(-50%);
        width: 82px;
        height: auto;
        max-height: calc(100svh - 48px);
        overflow-y: auto;
        scrollbar-width: none;
        border-radius: 999px;
        padding: 18px 0;
        box-shadow: 0 20px 40px rgba(0,0,0,.35);
    }

    /* Every added WordPress menu item shares the available vertical space inside the black capsule. */
    .bottom-nav.scrolled,
    .bottom-nav.scrolled .bottom-nav-links { flex-direction: column !important; }
    .bottom-nav.scrolled .bottom-nav-links {
        gap: 8px;
        width: 100%;
        height: auto;
        justify-content: flex-start;
    }
    .bottom-nav.scrolled a {
        flex: 0 0 auto;
        width: 100%;
        flex-direction: column !important;
        justify-content: center;
        align-items: center;
        gap: 6px;
        padding: 8px 5px;
    }
    .bottom-nav.scrolled a span {
        display: -webkit-box !important;
        width: 100%;
        overflow: hidden;
        color: inherit;
        font-size: 10.5px !important;
        font-weight: 700 !important;
        line-height: 1.25 !important;
        text-align: center;
        white-space: normal;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }
    .bottom-nav-links { gap: 4px; }
    .bottom-nav a { flex: 1 1 0; min-width: 0; justify-content: center; overflow: hidden; }
    .bottom-nav a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .bottom-nav.is-transitioning { pointer-events: none; }
    .bottom-nav.is-transitioning .bottom-nav-links { opacity: 0; transform: scale(.94); }

    /* Hover Effects */
    .bottom-nav a {
        transition: transform 0.2s ease, color 0.2s ease;
    }
    .bottom-nav a:hover {
        transform: scale(1.1);
        color: #ff3e00 !important;
    }
    
    .product-slide { flex: 0 0 450px; }
    .massive-title { font-size: 14vw; }
}
/* Accessibility and resilient interaction states */
:focus-visible { outline: 3px solid var(--brand-accent); outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .7; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

body.menu-open { overflow: hidden; }
.comment-list .comment { border: 1px solid #e5e5e5; padding: 1.25rem; }
.comment-list .children { margin-top: 1rem; padding-right: 1rem; }

.mobile-contact-button { left: 50%; transform: translateX(-50%); }
.site-logo-absolute { position: absolute; top: 1rem; right: clamp(1.25rem, 4vw, 4rem); left: auto; z-index: 10000; }
.site-logo-link { max-width: 160px; }
.site-logo-absolute .site-logo-img { display: block; width: auto; max-width: 160px; object-fit: contain; }

/* ─── HERO / LARGE-SCREEN LAYOUT ──────────────────────────────────────────
   Keep the headline clear of the floating header and prevent 2K/4K screens
   from scaling the type and whitespace indefinitely. */
@media (min-width: 1024px) {
    #home.section-modular {
        min-height: max(100svh, 780px);
        align-items: flex-start;
        padding-top: clamp(156px, 18vh, 230px);
        padding-bottom: clamp(80px, 10vh, 150px);
        padding-right: clamp(48px, 8vw, 160px);
        padding-left: clamp(48px, 8vw, 160px);
        gap: clamp(48px, 7vw, 150px);
    }

    #home .hero-content {
        flex: 1 1 0;
        min-width: 0;
        max-width: 1080px;
    }

    #home .massive-title {
        /* The old 14vw declaration grew without limit on 2K/4K monitors. */
        font-size: clamp(90px, 10vw, 250px);
        line-height: .84;
        letter-spacing: clamp(-4px, -.12vw, -1px);
    }

    #home .hero-visual {
        flex: 0 1 560px;
        width: min(34vw, 560px);
        max-width: 560px;
        margin-top: 0 !important;
    }
}

@media (min-width: 1920px) {
    #home.section-modular {
        min-height: max(100svh, 900px);
        gap: clamp(96px, 8vw, 180px);
    }
}

/* ─── SVG SAFETY ──────────────────────────────────────────────────────────
   Prevent inline icon strokes and hover states from being cropped by flex
   containers or the browser's default SVG overflow behavior. */
svg {
    overflow: visible;
}

.bottom-nav a {
    overflow: visible;
}

.bottom-nav a svg,
#mobileCanvasTrigger svg,
#closeMobileCanvas svg,
#closeLightbox svg {
    display: block;
    flex: 0 0 auto;
    overflow: visible;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bottom-nav a span {
    overflow: hidden;
}

/* ─── HEADER CAPSULE LABELS ────────────────────────────────────────────────
   Keep complete WordPress menu titles visible in the fixed 500 × 68 header
   capsule; only the narrow vertical sidebar uses controlled text clipping. */
@media (min-width: 1024px) {
    .bottom-nav:not(.scrolled) .bottom-nav-links {
        gap: 2px;
    }

    .bottom-nav:not(.scrolled) a {
        gap: 4px;
        padding: 0 2px;
        overflow: visible;
    }

    .bottom-nav:not(.scrolled) a span {
        display: block !important;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        text-align: right;
        line-height: 1.22;
        font-size: 10px;
    }
}

/* ─── ADAPTIVE MENU CAPACITY ──────────────────────────────────────────────
   The capsule grows with the number of menu items. This keeps real menu
   labels readable rather than forcing them into a fixed-width container. */
@media (min-width: 1024px) {
    .bottom-nav:not(.scrolled) {
        width: min(var(--alborz-header-width, 500px), calc(100vw - 260px));
    }

    .bottom-nav:not(.scrolled) .bottom-nav-links {
        width: 100%;
        gap: clamp(2px, 0.5vw, 10px);
    }

    .bottom-nav:not(.scrolled) a {
        flex: 1 1 0;
        min-width: 0;
    }

    /* In the vertical state, height grows per item and labels stay readable. */
    .bottom-nav.scrolled {
        width: 82px;
        height: auto;
        max-height: calc(100svh - 48px);
        overflow-y: auto;
        scrollbar-width: none;
        padding: 18px 0;
    }

    .bottom-nav.scrolled a {
        padding: 5px 6px;
        gap: 5px;
    }

    .bottom-nav.scrolled a span {
        font-size: 10px !important;
        line-height: 1.3;
        -webkit-line-clamp: 3;
    }
}

/* ─── FINAL HEADER / SIDEBAR MENU READABILITY ──────────────────────────────
   Header labels must never stack vertically: the capsule grows in one row.
   The sidebar gets a wider readable label column. */
@media (min-width: 1024px) {
    .bottom-nav:not(.scrolled) {
        width: max-content;
        min-width: 500px;
        max-width: calc(100vw - 260px);
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
    }
    .bottom-nav:not(.scrolled)::-webkit-scrollbar { display: none; }

    .bottom-nav:not(.scrolled) .bottom-nav-links {
        display: flex;
        width: max-content;
        min-width: 100%;
        flex-wrap: nowrap;
        gap: 10px;
        padding: 0 4px;
    }

    .bottom-nav:not(.scrolled) a {
        flex: 0 0 auto;
        padding: 0 6px;
        white-space: nowrap;
    }

    .bottom-nav:not(.scrolled) a span {
        display: inline-block !important;
        overflow: visible;
        white-space: nowrap;
        font-size: 11px;
        line-height: 1;
    }

    .bottom-nav.scrolled {
        width: 120px;
    }

    .bottom-nav.scrolled a {
        padding: 6px 8px;
    }

    .bottom-nav.scrolled a span {
        font-size: 12px !important;
        line-height: 1.35;
        -webkit-line-clamp: 2;
    }
}


/* Compact vertical sidebar: readable labels without an oversized column. */
@media (min-width: 1024px) {
    .bottom-nav.scrolled { width: 82px; height: auto; max-height: calc(100svh - 48px); overflow-y: auto; scrollbar-width: none; }
    .bottom-nav.scrolled::-webkit-scrollbar { display: none; }
    .bottom-nav.scrolled .bottom-nav-links { justify-content: flex-start; gap: 8px; height: auto; }
    .bottom-nav.scrolled a { flex: 0 0 80px; padding: 8px 6px; }
    .bottom-nav.scrolled a span { font-size: 10.5px !important; font-weight: 700 !important; line-height: 1.25 !important; }
}

/* ─── PROFESSIONAL BLOG ─────────────────────────────────────────────────── */
.blog-single-shell,
.blog-archive-shell { max-width: 1240px; margin: 0 auto; padding: 190px 32px 100px; }
.blog-single-shell .blog-entry-column {
    background: #ffffff;
    border-radius: 0;
    padding: 48px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
    border: 1px solid #e5e7eb;
}
.blog-single-hero { max-width: 920px; margin: 0 auto 72px; }
.blog-single-cover { aspect-ratio: 16 / 8; overflow: hidden; background: #f2f2f2; }
.blog-single-cover img { width: 100%; height: 100%; object-fit: cover; }
.blog-single-heading { padding-top: 36px; }
.blog-eyebrow,.section-label,.aside-kicker { color: var(--brand-accent); font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.blog-single-heading h1,.blog-archive-intro h1 { font-size: clamp(42px, 6vw, 84px); line-height: 1.08; margin: 16px 0 20px; font-weight: 900; }
.blog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: #777; font-size: 13px; }
.blog-single-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px !important; align-items: start; }
.blog-entry-column { min-width: 0; }
.entry-content { font-size: 18px; line-height: 2.15; color: #202020; }
.entry-content > * + * { margin-top: 1.6em; }
.entry-content h2 { font-size: clamp(28px, 3vw, 42px); line-height: 1.25; margin-top: 2.4em; font-weight: 900; scroll-margin-top: 140px; }
.entry-content h3 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.35; margin-top: 2em; font-weight: 900; scroll-margin-top: 140px; }
.entry-content img { max-width: 100%; height: auto; }
.entry-content a { color: var(--brand-accent); text-decoration: underline; text-underline-offset: 4px; }
.blog-aside { min-width: 0; }
.blog-aside-sticky { position: sticky; top: 132px; display: grid; gap: 24px; }
.article-toc,.author-card { border: 1px solid #e7e7e7; padding: 24px; background: #fff; }
.article-toc h2,.author-card h2 { font-size: 19px; margin: 8px 0 16px; font-weight: 900; }
.article-toc ol { list-style: decimal; padding: 0 18px 0 0; margin: 0; display: grid; gap: 10px; }
.article-toc li { font-size: 13px; line-height: 1.55; }
.article-toc a { color: #555; text-decoration: none; }
.article-toc a:hover,.article-toc a.active { color: var(--brand-accent); }
.author-card { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: start; }
.author-card .avatar { width: 72px; height: 72px; border-radius: 50%; }
.author-card p:last-child { color: #666; font-size: 13px; line-height: 1.75; margin: 0; }
.related-posts { border-top: 1px solid #e7e7e7; margin-top: 80px; padding-top: 48px; }
.related-posts h2 { font-size: 36px; margin: 10px 0 30px; font-weight: 900; }
.related-posts-grid { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; overflow-x: auto !important; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 16px !important; }
.related-posts-grid::-webkit-scrollbar { display: none; }
.related-card { flex: 0 0 calc(25% - 12px) !important; scroll-snap-align: start; box-sizing: border-box; }
.related-card { border: 1px solid #e7e7e7; }
.related-image { display: block; aspect-ratio: 4 / 3; background: #eee; overflow: hidden; }
.related-image img { width: 100%; height: 100%; object-fit: cover; }
.related-card div { padding: 16px; }.related-card p { color: #777; font-size: 11px; margin: 0 0 8px; }.related-card h3 { font-size: 17px; line-height: 1.5; margin: 0; }.related-card a { color: inherit; text-decoration: none; }
.blog-comments { margin-top: 72px; }
.blog-archive-intro { max-width: 760px; margin-bottom: 52px; }.blog-archive-intro > p:last-child { color: #666; font-size: 17px; line-height: 2; }
.archive-post-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 24px; }
@media (max-width: 1023px) {
    .archive-post-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
}
@media (max-width: 640px) {
    .archive-post-grid { grid-template-columns: 1fr !important; }
}
.react-post-card { border: 1px solid #e7e7e7; background: #fff; transition: transform .25s ease, box-shadow .25s ease; }.react-post-card:hover { transform: translateY(-5px); box-shadow: 0 16px 35px rgba(0,0,0,.08); }
.react-post-image { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #eee; }.react-post-image img { width:100%; height:100%; object-fit:cover; transition:transform .4s ease; }.react-post-card:hover .react-post-image img { transform:scale(1.05); }
.react-post-body { padding: 22px; }.react-post-body > p:first-child { color:#888; font-size:12px; margin:0 0 10px; }.react-post-body h2 { font-size:22px; line-height:1.45; margin:0 0 14px; font-weight:900; }.react-post-body h2 a { color:inherit; text-decoration:none; }.react-post-excerpt { color:#666; font-size:14px; line-height:1.85; margin:0 0 18px; }.react-post-link { color:var(--brand-accent); font-size:13px; font-weight:900; text-decoration:none; }
.archive-search { display:flex; max-width:520px; border-bottom:2px solid #111; margin-bottom:42px; }.archive-search input { flex:1; min-width:0; border:0; padding:14px 0; outline:0; background:transparent; }.archive-search button { border:0; background:#111; color:#fff; padding:0 22px; font-weight:900; cursor:pointer; }.archive-state { color:#666; padding:50px 0; }.archive-pagination { display:flex; justify-content:center; gap:8px; margin-top:48px; }.archive-pagination button { width:38px; height:38px; border:1px solid #ddd; background:#fff; cursor:pointer; }.archive-pagination button.active { background:#111; border-color:#111; color:#fff; }
@media (max-width: 1023px) { .blog-single-shell,.blog-archive-shell { padding: 130px 24px 80px; }.blog-single-shell .blog-entry-column { padding: 24px 20px; border-radius: 0; }.blog-single-layout { grid-template-columns: 1fr; gap: 44px; }.blog-aside { order:-1; }.blog-aside-sticky { position:static; }.related-posts-grid,.archive-post-grid { grid-template-columns:1fr; }.blog-single-heading h1,.blog-archive-intro h1 { font-size:42px; }.entry-content { font-size:17px; } }
.screen-reader-text { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.toc-subitem { padding-right: 12px; }

/* ─── BLOG DETAILS / MOBILE ACTION BAR ─────────────────────────────────── */
.article-toc ol { max-height: 280px; overflow-y: auto; scrollbar-width: thin; }
.mobile-article-toc,.mobile-author-card { display: none; }
.entry-content ul,.entry-content ol { padding-right: 1.4em; }.entry-content li + li { margin-top: .65em; }
.entry-content blockquote { margin: 2em 0; padding: 24px 28px; background:#f6f6f6; border-right:4px solid var(--brand-accent); font-size:1.15em; }.entry-content table { width:100%; border-collapse:collapse; margin:2em 0; }.entry-content td,.entry-content th { border:1px solid #ddd; padding:12px; text-align:right; }.entry-content iframe { max-width:100%; width:100%; aspect-ratio:16/9; height:auto; }
.comments-area { border-top:1px solid #e7e7e7; padding-top:48px; }.comments-area > h2 { font-size:32px; font-weight:900; margin-bottom:28px; }.comment-list { list-style:none; padding:0; display:grid; gap:16px; }.comment-list .comment { border:1px solid #e6e6e6; padding:22px; }.comment-list .comment-meta { display:flex; gap:12px; align-items:center; margin-bottom:14px; }.comment-list .avatar { border-radius:50%; }.comment-list .comment-metadata { font-size:12px; color:#777; }.comment-list .comment-content { line-height:1.9; }.comment-respond { margin-top:36px; }.comment-respond h3 { font-size:28px; font-weight:900; }.comment-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }.comment-form p { margin:0; }.comment-form-comment,.form-submit { grid-column:1 / -1; }.comment-form label { display:block; font-size:13px; font-weight:700; margin-bottom:7px; }.comment-form input,.comment-form textarea { width:100%; border:1px solid #dcdcdc; padding:12px; outline:0; background:#fff; }.comment-form input:focus,.comment-form textarea:focus { border-color:#111; }.comment-submit { background:#111; color:#fff; border:0; padding:14px 24px; font-weight:900; cursor:pointer; }
.mobile-action-bar { display:none; }
@media (max-width:1023px) {
    .bottom-nav { display:none !important; }
    .mobile-action-bar { position:fixed; right:16px; left:16px; bottom:calc(16px + env(safe-area-inset-bottom)); z-index:10000; height:62px; display:flex; align-items:center; justify-content:space-around; background:rgba(0,0,0,.94); border:1px solid rgba(255,255,255,.1); border-radius:999px; box-shadow:0 14px 35px rgba(0,0,0,.25); backdrop-filter:blur(12px); opacity:0; transform:translateY(150px); pointer-events:none; transition:transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
    .mobile-action-bar a { color:#fff; display:flex; flex-direction:column; align-items:center; gap:3px; min-width:54px; font-size:10px; font-weight:700; text-decoration:none; }.mobile-action-bar svg { width:20px; height:20px; }.mobile-action-bar a:hover { color:var(--brand-accent); }
    body { padding-bottom:92px; }
    .mobile-article-toc { display:block; border:1px solid #e5e5e5; margin:0 0 32px; background: #ffffff !important; border-radius: 0 !important; }.mobile-article-toc summary { cursor:pointer; padding:17px 18px; font-weight:900; display:flex; justify-content:space-between; }.mobile-article-toc[open] summary { border-bottom:1px solid #e5e5e5; }.mobile-article-toc ol { margin:0; padding:14px 34px 16px 18px; max-height:260px; overflow:auto; display:grid; gap:11px; }.mobile-article-toc li { font-size:14px; line-height:1.55; }.mobile-article-toc a { color:#444; text-decoration:none; }
    .blog-aside { display:none; }.mobile-author-card { display:grid; grid-template-columns:72px 1fr; gap:14px; align-items:start; border-top:1px solid #e7e7e7; margin-top:54px; padding-top:36px; }.mobile-author-card .avatar { width:72px; height:72px; border-radius:50%; }.mobile-author-card h2 { font-size:20px; margin:7px 0; font-weight:900; }.mobile-author-card p:last-child { color:#666; font-size:13px; line-height:1.8; margin:0; }
    .comment-form { grid-template-columns:1fr; }.comment-form-comment,.form-submit { grid-column:auto; }
}
.archive-categories { display:flex; flex-wrap:wrap; gap:8px; margin:-20px 0 34px; }.archive-categories button { border:1px solid #ddd; background:#fff; padding:9px 14px; font:inherit; font-size:13px; cursor:pointer; }.archive-categories button.active,.archive-categories button:hover { background:#111; border-color:#111; color:#fff; }

/* Blog single hardening: retain the complete layout even when plugins add styles. */
.blog-single-shell .blog-single-layout { display:grid !important; grid-template-columns:minmax(0,1fr) 280px !important; gap: 28px !important; align-items:start !important; }
.blog-single-shell .blog-aside { display:block !important; position: -webkit-sticky !important; position: sticky !important; top: 130px !important; align-self: start !important; height: fit-content !important; min-width:0; z-index: 10 !important; }
.blog-single-shell .blog-aside-sticky { position:-webkit-sticky !important; position:sticky !important; top:130px !important; align-self:start !important; height:fit-content !important; }
.blog-single-shell .entry-content { display:block; font-size:18px; line-height:2.15; }
.comment-form-cookies-consent { grid-column:1 / -1; display:flex !important; align-items:flex-start; gap:9px; font-size:12px; color:#555; line-height:1.6; }.comment-form-cookies-consent input { width:16px; height:16px; flex:0 0 16px; margin:2px 0 0; }.comment-form-cookies-consent label { margin:0; font-weight:400; }
@media (max-width:1023px) { .mobile-action-bar { right:86px; left:16px; } .blog-single-shell .blog-single-layout { display:block !important; } .blog-single-shell .blog-aside { display:none !important; } }

/* Automatic WordPress content styling: editors need no custom classes or inline CSS. */
.entry-content p { margin: 0 0 1.55em; }
.entry-content h1,.entry-content .wp-block-heading { font-weight:900; line-height:1.25; margin:2.1em 0 .7em; }
.entry-content h1 { font-size:clamp(32px,4vw,52px); }.entry-content h2 { font-size:clamp(28px,3vw,42px); }.entry-content h3 { font-size:clamp(22px,2.2vw,30px); }.entry-content h4 { font-size:22px; }
.entry-content .wp-block-image,.entry-content figure { margin:2.2em 0; }.entry-content figcaption { color:#777; font-size:13px; margin-top:8px; text-align:center; }
.entry-content .wp-block-quote { border-right:4px solid var(--brand-accent); border-left:0; padding:22px 26px; margin:2em 0; background:#f5f5f5; font-size:1.15em; }.entry-content .wp-block-quote cite { display:block; margin-top:10px; color:#777; font-size:13px; }
.entry-content .wp-block-separator { border:0; border-top:1px solid #ddd; margin:3em 0; }.entry-content pre { direction:ltr; overflow:auto; background:#151515; color:#fff; padding:20px; font-size:14px; }.entry-content code { direction:ltr; background:#f1f1f1; padding:2px 5px; font-size:.9em; }.entry-content pre code { background:transparent; padding:0; }
.entry-content .wp-block-gallery { margin:2em 0; }.entry-content .wp-block-cover { margin:2em 0; min-height:320px; }.entry-content .wp-block-button__link { display:inline-block; color:#fff; background:#111; text-decoration:none; padding:13px 22px; border-radius:0; font-weight:700; }
.entry-content .alignwide { margin-right:-6vw; margin-left:-6vw; max-width:none; width:calc(100% + 12vw); }.entry-content .alignfull { margin-right:calc(50% - 50vw); margin-left:calc(50% - 50vw); max-width:100vw; width:100vw; }
.comment-form .comment-submit { width:auto !important; min-width:150px; background:#111 !important; color:#fff !important; border:1px solid #111 !important; padding:14px 24px !important; cursor:pointer; font-weight:900; }

/* Rich automatic post/page styling for Classic Editor, Gutenberg and pasted content. */
body.single-post .entry-content, body.page .page-entry-content { color:#1a1a1a; font-size:19px; line-height:2.2; }
body.single-post .entry-content > p, body.page .page-entry-content > p { margin:0 0 1.7em; }
body.single-post .entry-content img, body.page .page-entry-content img { display:block; max-width:100%; height:auto; margin:2.2em auto; border:1px solid #eee; box-shadow:0 14px 34px rgba(0,0,0,.08); }
body.single-post .entry-content .wp-block-image img, body.page .page-entry-content .wp-block-image img { width:100%; margin:0; }
body.single-post .entry-content .wp-block-image, body.page .page-entry-content .wp-block-image, body.single-post .entry-content .wp-caption, body.page .page-entry-content .wp-caption { margin:2.5rem 0 !important; padding:0 !important; background:transparent !important; border:none !important; }
body.single-post .entry-content .wp-caption-text, body.page .page-entry-content .wp-caption-text { display:block; margin-top:10px; color:#777; font-size:13px; line-height:1.7; text-align:center; }
body.single-post .entry-content h2, body.page .page-entry-content h2 { font-size:clamp(30px,3.5vw,46px); font-weight:900; line-height:1.25; margin:2.4em 0 .75em; }
body.single-post .entry-content h3, body.page .page-entry-content h3 { font-size:clamp(24px,2.5vw,34px); font-weight:900; line-height:1.35; margin:2em 0 .65em; }
body.single-post .entry-content ul,body.single-post .entry-content ol,body.page .page-entry-content ul,body.page .page-entry-content ol { padding-right:1.5em; margin:1.4em 0 2em; }
body.single-post .entry-content li,body.page .page-entry-content li { margin-bottom:.65em; }

/* ─── COMPLETE RICH-TEXT BLOG STYLING FOR .ENTRY-CONTENT ─── */
.entry-content {
    font-size: 18px;
    line-height: 2;
    color: #374151;
}
.entry-content p {
    margin-bottom: 1.8rem;
}
.entry-content p:last-child {
    margin-bottom: 0;
}
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    color: #000;
    font-weight: 900;
    margin-top: 2.2rem;
    margin-bottom: 1.2rem;
    line-height: 1.35;
}
.entry-content h2 {
    font-size: 32px;
    border-right: 4px solid var(--brand-accent);
    padding-right: 12px;
}
.entry-content h3 {
    font-size: 26px;
}
.entry-content h4 {
    font-size: 22px;
}
.entry-content a {
    color: var(--brand-accent);
    text-decoration: underline;
    text-underline-offset: 4px;
    font-weight: 700;
    transition: color 0.2s ease;
}
.entry-content a:hover {
    color: #000;
}
.entry-content ul {
    list-style-type: disc;
    padding-right: 2rem;
    margin-bottom: 1.8rem;
}
.entry-content ol {
    list-style-type: decimal;
    padding-right: 2rem;
    margin-bottom: 1.8rem;
}
.entry-content li {
    margin-bottom: 0.6rem;
}
.entry-content li::marker {
    color: var(--brand-accent);
    font-weight: bold;
}
.entry-content blockquote {
    margin: 2.5rem 0;
    padding: 24px 28px;
    background: #f9f9f9;
    border-right: 5px solid var(--brand-accent);
    border-left: 0;
    font-size: 1.2rem;
    font-style: italic;
    color: #4b5563;
    line-height: 1.85;
}
.entry-content blockquote p {
    margin-bottom: 0;
}
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2.5rem 0;
    font-size: 16px;
}
.entry-content th {
    background-color: #f3f4f6;
    font-weight: bold;
    color: #111;
    border: 1px solid #e5e7eb;
    padding: 14px 16px;
    text-align: right;
}
.entry-content td {
    border: 1px solid #e5e7eb;
    padding: 12px 16px;
    text-align: right;
    color: #4b5563;
}
.entry-content tr:nth-child(even) {
    background-color: #fafafa;
}
.entry-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 0 !important;
    margin: 0 auto !important;
    display: block !important;
    background: #ffffff !important;
    padding: 8px !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 8px 8px 0px #f4f4f3 !important;
}
.entry-content figure {
    margin: 2.5rem 0;
    text-align: center;
}
.entry-content figcaption {
    font-size: 14px;
    color: #6b7280;
    margin-top: 0.8rem;
    font-style: italic;
}
.entry-content hr {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 3rem 0;
}

/* ─── RELATED POSTS MOBILE SIZING ─── */
@media (max-width: 1023px) {
    .related-card {
        flex: 0 0 calc(50% - 8px) !important;
    }
}

/* ─── REACT AUTHOR APP STYLES ─── */
.author-profile-app {
    max-width: 900px;
    margin: 0 auto;
}
.author-hero-card {
    display: flex;
    align-items: center;
    gap: 32px;
    background: #000;
    color: #fff;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 48px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
.author-avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--brand-accent);
}
.author-hero-info {
    flex: 1;
}
.author-kicker {
    font-size: 11px;
    font-weight: 900;
    color: var(--brand-accent);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.author-hero-info h1 {
    font-size: 38px;
    font-weight: 900;
    margin: 8px 0;
}
.author-bio-text {
    font-size: 16px;
    color: #ccc;
    line-height: 1.7;
    margin-bottom: 20px;
}
.author-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: #aaa;
}
.author-app-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 36px;
    padding-bottom: 16px;
    gap: 20px;
    flex-wrap: wrap;
}
.author-tabs {
    display: flex;
    gap: 24px;
}
.author-tabs button {
    font-size: 16px;
    font-weight: 900;
    color: #888;
    background: none;
    border: 0;
    padding: 8px 0;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}
.author-tabs button.active {
    color: #000;
}
.author-tabs button.active::after {
    content: '';
    position: absolute;
    bottom: -18px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--brand-accent);
}
.author-tabs button:hover {
    color: #000;
}
.author-detailed-bio {
    background: #f9f9f9;
    padding: 36px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
.author-detailed-bio h3 {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 16px;
}
.author-detailed-bio p {
    font-size: 16px;
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 24px;
}
.author-detailed-stats h4 {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 12px;
}
.author-detailed-stats ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.author-detailed-stats li {
    background: #fff;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
}

@media (max-width: 768px) {
    .author-hero-card {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    .author-avatar-img {
        margin: 0 auto;
    }
    .author-app-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .author-tabs {
        justify-content: center;
    }
    .author-tabs button.active::after {
        bottom: -10px;
    }
}

/* ─── BLOG POST CARD ALIGNMENT, BACKGROUNDS & TYPOGRAPHY ─── */
.react-post-card, .blog-card {
    background: #ffffff !important;
    border: 1px solid #e7e7e7 !important;
    border-radius: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    transition: box-shadow 0.25s ease !important;
}
.react-post-card:hover, .blog-card:hover {
    transform: none !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.03) !important;
}
.react-post-image, .blog-card-image-wrap {
    display: block !important;
    width: 100% !important;
    aspect-ratio: 16 / 10 !important;
    overflow: hidden !important;
    background: #f3f4f6 !important;
    border-radius: 0 !important;
}
.react-post-image img, .blog-card-image-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.react-post-card:hover .react-post-image img, .blog-card:hover .blog-card-image-wrap img {
    transform: scale(1.08) !important;
}
.react-post-body, .blog-card-body {
    padding: 22px !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
}
.react-post-body h2, .blog-card h3 {
    font-size: 20px !important;
    line-height: 1.45 !important;
    margin: 0 0 12px 0 !important;
    font-weight: 900 !important;
}
.react-post-excerpt, .blog-card-excerpt {
    color: #555 !important;
    font-size: 13.5px !important;
    line-height: 1.75 !important;
    margin-bottom: 24px !important;
}
.react-post-link, .blog-card-link {
    margin-top: auto !important; /* Pushes the Read More button to the exact bottom of the card! */
    color: var(--brand-accent) !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: color 0.2s ease !important;
}
.react-post-link:hover, .blog-card-link:hover {
    color: #000 !important;
}
