/**
 * Najibul Main Homepage — English Overrides (en) — v4.0.0
 *
 * ⚡ Thin override layer on top of home-base.css
 * ⚡ English-specific typography refinements
 * ⚡ Font stack optimized for Latin script
 * ⚡ Premium Neon Loader tweaks (Latin metrics)
 * ⚡ No layout changes (all layout lives in home-base.css)
 * ⚡ Safe to keep minimal — site still works
 *
 * Load order (via functions.php):
 *   1. home-base.css         → shared design tokens + layout
 *   2. home-en.css           → this file (English tweaks)
 *
 * NOTE: Everything here is OVERRIDE only. The base design system
 *       lives in home-base.css and is shared across all languages
 *       and all CPT homepages.
 *
 * ⚡ v4.0.0 CHANGES:
 *     • Neon Loader font optimization (Latin script)
 *     • Loader letter-spacing tuned for legibility
 *     • Loader responsive scaling for English text width
 *     • Dark mode loader contrast boost
 *     • Print styles for loader
 *     • `@supports` fallbacks (backdrop-filter, background-clip)
 *     • Counter tabular alignment for percentage display
 *
 * @package    GeneratePress_Child
 * @subpackage Najibul_Multilang
 * @version    4.0.0
 * @license    GPL-2.0-or-later
 */

/* ============================================================
   🔤 1. TYPOGRAPHY — Latin script optimization
   ============================================================ */

.najibul-home-en {
    /* Optimized system font stack for Latin scripts
       (system-ui first → best rendering per OS) */
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        'Inter',
        Roboto,
        'Helvetica Neue',
        Arial,
        'Noto Sans',
        sans-serif;

    /* Latin scripts read best with slightly tighter line-height
       than Bengali/Devanagari (which have tall ascenders/descenders) */
    line-height: 1.55;

    /* Letter-spacing: subtle tightening for better readability */
    letter-spacing: -0.005em;

    /* Font feature settings for better numerals and ligatures */
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
    -webkit-font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;

    /* Text rendering optimizations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ============================================================
   📰 2. HEADINGS — Latin-specific refinements
   ============================================================ */

.najibul-home-en .section-title {
    /* Latin titles: slightly tighter letter-spacing looks better */
    letter-spacing: -0.015em;

    /* Ensure descenders (g, p, y) don't clip */
    padding-bottom: 2px;
}

.najibul-home-en .title-gradient {
    /* English brand text tends to be wider — keep tight */
    letter-spacing: -0.02em;
    font-weight: 800;
}

.najibul-home-en .article-title {
    /* Latin titles benefit from tighter tracking */
    letter-spacing: -0.008em;

    /* Line-height slightly tighter than base for headlines */
    line-height: 1.35;

    /* Prevent orphaned single words on last line (best-effort) */
    text-wrap: pretty;
}

/* Fallback for browsers without text-wrap: pretty */
@supports not (text-wrap: pretty) {
    .najibul-home-en .article-title {
        text-wrap: balance;
    }
}

.najibul-home-en .article-excerpt {
    /* Latin body text: standard leading */
    letter-spacing: 0;
    line-height: 1.5;

    /* Pretty wrap for readability */
    text-wrap: pretty;
}

/* ============================================================
   🏷️ 3. BADGES — Latin text metrics
   ============================================================ */

.najibul-home-en .post-badge,
.najibul-home-en .post-type-badge {
    /* Latin uppercase: slightly wider tracking improves legibility */
    letter-spacing: 0.5px;

    /* Slightly smaller line-height for compact badges */
    line-height: 1.3;

    /* Uppercase text needs optical balance */
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

/* ============================================================
   📅 4. META — Author / time pills
   ============================================================ */

.najibul-home-en .meta-author,
.najibul-home-en .meta-time {
    /* Latin numerals: tabular alignment */
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1;

    /* Slightly tighter tracking for compact meta */
    letter-spacing: -0.002em;
}

/* English time text like "2 hours ago" — keep tight */
.najibul-home-en .meta-time .meta-text {
    letter-spacing: -0.005em;
}

/* ============================================================
   🎯 5. DROPDOWN — English label adjustments
   ============================================================ */

.najibul-home-en .dropdown-label {
    /* Latin: slightly tighter tracking */
    letter-spacing: -0.01em;
}

.najibul-home-en .dropdown-select {
    /* English select text: standard tracking */
    letter-spacing: 0;
    font-weight: 600;
}

/* ============================================================
   🎨 6. 🆕 PREMIUM NEON LOADER — English typography
   ============================================================ */
/* The base loader is styled in home-base.css.
   Here we tune font metrics for Latin script only. */

.najibul-home-en .najibul-visual-label-archive {
    /* Latin: tighter tracking for compactness */
    letter-spacing: 0.5px;
    font-weight: 700;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        Roboto,
        sans-serif;
    line-height: 1.3;
    /* Slight upward adjustment for Latin baseline */
    margin-top: 14px;
}

.najibul-home-en .najibul-visual-counter-archive {
    /* Tabular numerals for stable width (0% → 100% no jitter) */
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1;

    /* Latin tracking: slightly tight */
    letter-spacing: -0.02em;

    /* Vertical alignment */
    line-height: 1;

    /* Font weight matches base */
    font-weight: 800;

    /* Slightly smaller than base for Latin numerals
       (base = 28px tuned for Bengali/Hindi width) */
    font-size: 30px;

    margin-top: 6px;
}

/* Loader % — tabular alignment for smooth counting */
.najibul-home-en #najibulLoaderPercent {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1;
}

/* Loader box — English text typically shorter, so we can
   reduce the card slightly without breaking layout */
@media (min-width: 1025px) {
    .najibul-home-en .najibul-visual-label-archive {
        font-size: 14px;
        letter-spacing: 0.6px;
        margin-top: 18px;
    }

    .najibul-home-en .najibul-visual-counter-archive {
        font-size: 34px;
        letter-spacing: -0.025em;
    }
}

@media (min-width: 1600px) {
    .najibul-home-en .najibul-visual-label-archive {
        font-size: 15px;
        margin-top: 22px;
    }

    .najibul-home-en .najibul-visual-counter-archive {
        font-size: 38px;
    }
}

@media (max-width: 480px) {
    .najibul-home-en .najibul-visual-label-archive {
        font-size: 12px;
        letter-spacing: 0.4px;
        margin-top: 10px;
    }

    .najibul-home-en .najibul-visual-counter-archive {
        font-size: 26px;
        letter-spacing: -0.015em;
    }
}

/* ============================================================
   📝 7. LOADER & END MESSAGE — Latin refinements
   ============================================================ */

.najibul-home-en .loading-text {
    letter-spacing: -0.003em;
    font-weight: 500;
}

.najibul-home-en .end-message p {
    letter-spacing: -0.003em;
    font-weight: 500;
}

.najibul-home-en .end-message .end-text {
    letter-spacing: -0.005em;
    font-weight: 700;
}

.najibul-home-en .end-message .end-subtext {
    letter-spacing: -0.002em;
}

.najibul-home-en .retry-btn {
    letter-spacing: 0.01em;
    font-weight: 600;
}

.najibul-home-en .no-content-message p {
    letter-spacing: -0.003em;
}

/* ============================================================
   📱 8. RESPONSIVE — English-specific mobile tweaks
   ============================================================ */

@media (max-width: 480px) {
    .najibul-home-en {
        /* Slightly tighter line-height on small screens */
        line-height: 1.5;
    }

    .najibul-home-en .article-title {
        /* Mobile headline: tighter but readable */
        line-height: 1.3;
        letter-spacing: -0.005em;
    }

    .najibul-home-en .article-excerpt {
        /* Mobile body: slightly tighter */
        line-height: 1.45;
    }

    .najibul-home-en .section-title {
        letter-spacing: -0.02em;
    }
}

/* ============================================================
   🖥️ 9. HIGH-DPI DISPLAYS — Latin font clarity
   ============================================================ */

@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    .najibul-home-en {
        /* Sharper Latin rendering on Retina/HiDPI */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: geometricPrecision;
    }
}

/* ============================================================
   🌙 10. DARK MODE — English loader contrast boost
   ============================================================ */

@media (prefers-color-scheme: dark) {
    .najibul-home-en .najibul-visual-label-archive {
        /* Latin text slightly heavier in dark mode for contrast */
        font-weight: 700;
    }

    .najibul-home-en .najibul-visual-counter-archive {
        /* Slightly heavier counter for dark mode */
        font-weight: 800;
        filter: drop-shadow(0 2px 6px rgba(255, 65, 108, 0.35));
    }

    .najibul-home-en .loading-text {
        font-weight: 500;
    }

    .najibul-home-en .end-message .end-text {
        color: #F1F5F9;
    }

    .najibul-home-en .end-message .end-subtext {
        color: #94A3B8;
    }
}

/* ============================================================
   🎬 11. REDUCED MOTION — Loader-specific
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .najibul-home-en .najibul-visual-spinner-archive div {
        /* Static dots when reduced motion */
        animation: none;
        opacity: 0.6;
    }

    .najibul-home-en .najibul-visual-spinner-archive::before {
        animation: none;
        opacity: 0.5;
    }
}

/* ============================================================
   🖨️ 12. PRINT — English-specific print tweaks
   ============================================================ */

@media print {
    .najibul-home-en {
        /* English print: base line-height for paper */
        line-height: 1.5;
        font-family:
            -apple-system,
            BlinkMacSystemFont,
            'Segoe UI',
            Roboto,
            Georgia,
            serif;
    }

    .najibul-home-en .article-title {
        line-height: 1.3;
        letter-spacing: -0.005em;
    }

    .najibul-home-en .article-excerpt {
        line-height: 1.45;
    }

    /* Hide loader in print */
    .najibul-home-en .najibul-loader-wrap,
    .najibul-home-en .najibul-visual-box-archive {
        display: none !important;
    }
}

/* ============================================================
   🔧 13. `@supports` FALLBACKS — Graceful degradation
   ============================================================ */

/* Fallback if backdrop-filter is not supported */
@supports not (backdrop-filter: blur(16px)) {
    .najibul-home-en .najibul-visual-box-archive {
        /* Solid background fallback */
        background: rgba(255, 255, 255, 0.98);
        box-shadow:
            0 12px 40px rgba(118, 75, 162, 0.18),
            0 0 20px rgba(0, 242, 254, 0.12);
    }
}

@media (prefers-color-scheme: dark) {
    @supports not (backdrop-filter: blur(16px)) {
        .najibul-home-en .najibul-visual-box-archive {
            background: rgba(30, 41, 59, 0.98);
        }
    }
}

/* Fallback if background-clip:text is not supported */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    .najibul-home-en .najibul-visual-label-archive {
        background: none;
        color: #667eea;
        -webkit-text-fill-color: initial;
    }

    .najibul-home-en .najibul-visual-counter-archive {
        background: none;
        color: #ff416c;
        -webkit-text-fill-color: initial;
    }

    .najibul-home-en .title-gradient {
        background: none;
        color: #006B6B;
        -webkit-text-fill-color: initial;
    }
}

/* ============================================================
   ✅ END OF FILE
   ============================================================ */