/* ==========================================================================
   blog.css — MoroccoNaut Journal · Editorial v2
   Clean magazine list. No fake gradient covers, just typography.
   ========================================================================== */

:root {
    --blog-primary:      #006064;
    --blog-primary-dark: #00363a;
    --blog-primary-tint: #f4fafa;
    --blog-primary-light:#e0f2f3;
    --blog-accent:       #f03d47;
    --blog-gold:         #b8860b;
    --blog-ink:          #0a1628;
    --blog-ink-soft:     #1f2937;
    --blog-ink-mid:      #374151;
    --blog-muted:        #6b7280;
    --blog-muted-soft:   #9ca3af;
    --blog-line:         #e5e7eb;
    --blog-line-soft:    #f1f3f5;
    --blog-bg:           #ffffff;
    --blog-bg-soft:      #fafbfc;
    --blog-bg-tint:      #f7f8fa;
    --blog-shadow-sm:    0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
    --blog-shadow-md:    0 4px 6px -1px rgba(15,23,42,.05), 0 2px 4px -2px rgba(15,23,42,.04);
    --blog-shadow-lg:    0 10px 25px -5px rgba(15,23,42,.08), 0 4px 10px -3px rgba(15,23,42,.05);
}

html, body {
    background: var(--blog-bg);
    color: var(--blog-ink-soft);
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* Kill the styles.css mobile padding-bottom for bottom-tab-bar (which doesn't exist on blog) */
    padding-bottom: 0 !important;
}

/* ==========================================================================
   HEADER overrides
   ========================================================================== */
.main-header {
    background: rgba(255,255,255,0.92);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--blog-line);
    transition: background .25s ease, box-shadow .25s ease;
}
.main-header .main-nav a {
    color: var(--blog-ink-soft) !important;
    transition: color .2s ease;
    font-weight: 600;
}
.main-header .main-nav a:hover { color: var(--blog-primary) !important; }
.main-header.scrolled {
    background: rgba(255,255,255,0.96) !important;
    box-shadow: 0 1px 0 var(--blog-line), 0 6px 20px rgba(0,0,0,0.04);
}
.main-header.scrolled .main-nav a {
    color: var(--blog-ink-soft) !important;
}
.main-nav a.is-active {
    color: var(--blog-primary) !important;
    font-weight: 700;
    position: relative;
}
.main-nav a.is-active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    transform: translateX(-50%);
    width: 22px;
    height: 2px;
    background: var(--blog-primary);
    border-radius: 2px;
}
.main-header.scrolled .main-nav a.is-active { color: var(--blog-primary) !important; }

/* ==========================================================================
   HERO — Clean editorial, no decoration kitsch
   ========================================================================== */
.blog-hero {
    position: relative;
    padding: 140px 24px 72px;
    text-align: left;
    overflow: hidden;
    background:
        radial-gradient(ellipse at top right, rgba(0,96,100,0.05) 0%, transparent 60%),
        radial-gradient(ellipse at bottom left, rgba(184,134,11,0.04) 0%, transparent 50%),
        var(--blog-bg);
    color: var(--blog-ink);
    isolation: isolate;
    border-bottom: 1px solid var(--blog-line);
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--blog-primary), transparent);
    opacity: 0.45;
}
.blog-hero::after { content: none; }

.blog-hero .container {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.blog-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--blog-primary-light);
    border: 1px solid rgba(0,96,100,0.15);
    border-radius: 100px;
    padding: 6px 14px 6px 12px;
    margin-bottom: 24px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blog-primary);
}
.blog-hero-eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blog-primary);
    box-shadow: 0 0 0 3px rgba(0,96,100,0.18);
    flex-shrink: 0;
}
.blog-hero-eyebrow::after { content: none; }

.blog-hero-title {
    font-family: 'Nunito', -apple-system, sans-serif;
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 16px;
    letter-spacing: -0.035em;
    color: var(--blog-ink);
}

.blog-hero-title .accent {
    color: var(--blog-primary);
}

.blog-hero-subtitle {
    font-size: clamp(16px, 1.4vw, 19px);
    color: var(--blog-muted);
    max-width: 600px;
    margin: 0;
    line-height: 1.6;
    font-weight: 400;
}

/* ==========================================================================
   FILTERS — Clean sticky bar, dark ink active
   ========================================================================== */
.blog-filters-section {
    padding: 24px 0 0;
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.92);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 50;
    border-bottom: 1px solid var(--blog-line);
}

.blog-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 0 24px 20px;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .blog-filters-section { padding: 16px 0 0; }
    .blog-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0 20px 16px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .blog-filters::-webkit-scrollbar { display: none; }
}

.blog-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 100px;
    border: 1px solid var(--blog-line);
    background: var(--blog-bg);
    color: var(--blog-ink-mid);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s ease;
    white-space: nowrap;
    line-height: 1;
    box-shadow: var(--blog-shadow-sm);
}

.blog-chip i {
    font-size: 11px;
    color: var(--blog-muted);
    transition: color .18s ease;
}

.blog-chip:hover {
    border-color: var(--blog-muted-soft);
    color: var(--blog-ink);
    background: var(--blog-bg-tint);
    transform: translateY(-1px);
    box-shadow: var(--blog-shadow-md);
}
.blog-chip:hover i { color: var(--blog-ink-soft); }

.blog-chip.is-active {
    background: var(--blog-ink);
    border-color: var(--blog-ink);
    color: white;
    box-shadow: 0 4px 12px rgba(15,23,42,0.18);
}
.blog-chip.is-active i { color: white; }

.blog-chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 100px;
    background: var(--blog-bg-tint);
    color: var(--blog-muted);
    font-size: 11px;
    font-weight: 700;
    transition: all .18s ease;
    font-variant-numeric: tabular-nums;
}
.blog-chip:hover .blog-chip-count {
    background: white;
    color: var(--blog-ink-soft);
}
.blog-chip.is-active .blog-chip-count {
    background: rgba(255,255,255,0.18);
    color: white;
}

/* ==========================================================================
   ARTICLE LIST — vertical, magazine-style, hairline separators
   ========================================================================== */
.blog-grid-section {
    padding: 48px 24px 96px;
    position: relative;
    background: var(--blog-bg);
}

.blog-grid {
    display: flex;
    flex-direction: column;
    max-width: 800px;
    margin: 0 auto;
    gap: 0;
}

@media (max-width: 768px) {
    .blog-grid-section { padding: 32px 20px 72px; }
}

/* ==========================================================================
   ARTICLE — Editorial card, no covers, typography-driven
   ========================================================================== */
.blog-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--blog-ink-soft);
    padding: 36px 0;
    border-bottom: 1px solid var(--blog-line);
    text-decoration: none;
    transition: opacity .2s ease;
    animation: cardIn .5s cubic-bezier(0.16, 1, 0.3, 1) both;
    box-shadow: none;
    overflow: visible;
}

.blog-card:first-child { padding-top: 0; }
.blog-card:last-child { border-bottom: none; }

.blog-card::before { content: none; }

@keyframes cardIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.blog-card:hover { transform: none; box-shadow: none; }
.blog-card:hover .blog-card-title { color: var(--blog-primary); }

/* ---- Cover: display:contents so children (categories) bubble up
   but the gradient/icon/img stay hidden in editorial list mode ---- */
.blog-card-cover {
    display: contents;
}
.blog-card-cover::before,
.blog-card-cover::after { display: none; content: none; }
.blog-card-cover img,
.blog-card-cover-icon { display: none; }

/* ---- Body ---- */
.blog-card-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

/* Categories appear as small inline subtle chips at the TOP */
.blog-card-categories {
    position: static;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    max-width: 100%;
    margin-bottom: 4px;
}

.blog-card-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 100px;
    background: var(--blog-bg-tint);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: var(--blog-ink-mid);
    border: 1px solid var(--blog-line);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.blog-card-cat i {
    font-size: 10px;
    color: var(--blog-muted);
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 11.5px;
    color: var(--blog-muted);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
}

.blog-card-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.blog-card-meta-item i {
    font-size: 10px;
    color: var(--blog-muted-soft);
}

.blog-card-title {
    font-family: 'Nunito', sans-serif;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.18;
    color: var(--blog-ink);
    margin: 0;
    letter-spacing: -0.025em;
    transition: color .25s ease;
}

@media (max-width: 768px) {
    .blog-card { padding: 28px 0; }
    .blog-card-title { font-size: 24px; }
}

.blog-card-excerpt {
    font-size: 16px;
    line-height: 1.65;
    color: var(--blog-ink-mid);
    margin: 0;
    /* Show full excerpt in editorial list */
    display: block;
    overflow: visible;
}

.blog-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    padding: 0;
    border: none;
    border-top: none;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--blog-primary);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: gap .25s ease;
}

.blog-card:hover .blog-card-cta { gap: 14px; }

.blog-card-cta i {
    transition: transform .25s ease;
    font-size: 11px;
}

.blog-card:hover .blog-card-cta i { transform: translateX(3px); }

.blog-card-lang-fallback {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: rgba(184,134,11,0.08);
    border: 1px solid rgba(184,134,11,0.2);
    border-radius: 6px;
    font-size: 11px;
    color: var(--blog-gold);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    align-self: flex-start;
}

.blog-card-lang-fallback i { font-size: 10px; }

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */
.blog-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--blog-muted);
}

.blog-empty i {
    font-size: 40px;
    color: var(--blog-muted-soft);
    margin-bottom: 18px;
    display: block;
}

.blog-empty p {
    font-size: 16px;
    font-weight: 600;
    color: var(--blog-muted);
}

/* ==========================================================================
   FOOTER — Rich dark, matches the rest of the site
   ========================================================================== */
.main-footer {
    background: var(--blog-ink);
    color: white;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
    word-wrap: break-word;
    border-top: none;
}

.main-footer .container { max-width: none; padding: 0; }

.main-footer .footer-main {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    padding: 64px 5% 40px;
    max-width: 1280px;
    margin: 0 auto;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
}
.main-footer .footer-brand { flex: 2; min-width: 280px; }
.main-footer .footer-logo img { height: 50px; margin-bottom: 16px; }
.main-footer .footer-tagline {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--blog-gold);
}
.main-footer .footer-desc { font-size: 14px; line-height: 1.7; opacity: 0.7; }
.main-footer .footer-contact-section { flex: 1; min-width: 200px; }
.main-footer .footer-contact-section p { margin-bottom: 4px; font-size: 14px; opacity: 0.8; }
.main-footer .footer-email {
    color: var(--blog-gold);
    font-weight: 700;
    font-size: 15px;
    transition: opacity .2s;
    display: inline-block;
    margin-top: 4px;
}
.main-footer .footer-email:hover { opacity: 0.8; }
.main-footer .footer-social {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    list-style: none;
    padding: 0;
}
.main-footer .footer-social li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    font-size: 14px;
    transition: all .2s;
}
.main-footer .footer-social li a:hover {
    background: var(--blog-gold);
    border-color: var(--blog-gold);
    transform: translateY(-2px);
}
.main-footer .footer-nav { flex: 1; min-width: 150px; }
.main-footer .footer-nav ul { list-style: none; padding: 0; }
.main-footer .footer-nav ul li { margin-bottom: 8px; }
.main-footer .footer-nav ul li a {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    transition: color .2s;
}
.main-footer .footer-nav ul li a:hover { color: var(--blog-gold); }

.main-footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 18px 5%;
    margin: 0;
    background: transparent;
    display: block;
}
.main-footer .footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    max-width: 1280px;
    margin: 0 auto;
    box-sizing: border-box;
    width: 100%;
}
.main-footer .copyright { font-size: 13px; opacity: 0.6; color: rgba(255,255,255,0.7); }
.main-footer .copyright a { color: var(--blog-gold); }
.main-footer .footer-legal { display: flex; gap: 18px; }
.main-footer .footer-legal a {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    transition: color .2s;
}
.main-footer .footer-legal a:hover { color: white; }

@media (max-width: 992px) {
    .main-footer .footer-main {
        flex-direction: column;
        text-align: center !important;
        align-items: center;
    }
    .main-footer .footer-brand,
    .main-footer .footer-tagline,
    .main-footer .footer-desc,
    .main-footer .footer-contact-section { text-align: center !important; }
    .main-footer .footer-social { justify-content: center; }
    .main-footer .footer-bottom-content { flex-direction: column; text-align: center; }
    .main-footer .footer-legal { justify-content: center; }
    .main-footer .footer-nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
    .main-footer .footer-nav ul li { margin-bottom: 0; }
}

/* ==========================================================================
   RTL (Arabic)
   ========================================================================== */
[dir="rtl"] body { font-family: 'Noto Sans Arabic', 'Nunito', sans-serif; }
[dir="rtl"] .blog-hero { text-align: right; }
[dir="rtl"] .blog-hero .container { margin-left: 0; margin-right: auto; }
[dir="rtl"] .blog-filters { justify-content: flex-end; }
[dir="rtl"] .blog-card-cta i { transform: scaleX(-1); }
[dir="rtl"] .blog-card:hover .blog-card-cta i { transform: scaleX(-1) translateX(3px); }
[dir="rtl"] .main-footer .footer-main,
[dir="rtl"] .main-footer .footer-brand,
[dir="rtl"] .main-footer .footer-tagline,
[dir="rtl"] .main-footer .footer-desc,
[dir="rtl"] .main-footer .footer-contact-section { text-align: right; }
[dir="rtl"] .main-footer .footer-bottom-content,
[dir="rtl"] .main-footer .footer-legal,
[dir="rtl"] .main-footer .copyright { direction: rtl; }
@media (max-width: 992px) {
    [dir="rtl"] .main-footer .footer-main,
    [dir="rtl"] .main-footer .footer-brand,
    [dir="rtl"] .main-footer .footer-contact-section,
    [dir="rtl"] .main-footer .footer-bottom-content { text-align: center !important; }
}