/* =========================================================
   YUMNAK - MAIN STYLESHEET
   Design system: white-first with gradient accents from logo
   ========================================================= */

/* ============= FONTS ============= */
@font-face {
    font-family: 'Thmanyah Serif';
    src: url('../fonts/main-font/woff2/thmanyahserifdisplay-Light.woff2') format('woff2'),
         url('../fonts/main-font/otf/thmanyahserifdisplay-Light.otf') format('opentype');
    font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Thmanyah Serif';
    src: url('../fonts/main-font/woff2/thmanyahserifdisplay-Regular.woff2') format('woff2'),
         url('../fonts/main-font/otf/thmanyahserifdisplay-Regular.otf') format('opentype');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Thmanyah Serif';
    src: url('../fonts/main-font/woff2/thmanyahserifdisplay-Medium.woff2') format('woff2'),
         url('../fonts/main-font/otf/thmanyahserifdisplay-Medium.otf') format('opentype');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Thmanyah Serif';
    src: url('../fonts/main-font/woff2/thmanyahserifdisplay-Bold.woff2') format('woff2'),
         url('../fonts/main-font/otf/thmanyahserifdisplay-Bold.otf') format('opentype');
    font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Thmanyah Serif';
    src: url('../fonts/main-font/woff2/thmanyahserifdisplay-Black.woff2') format('woff2'),
         url('../fonts/main-font/otf/thmanyahserifdisplay-Black.otf') format('opentype');
    font-weight: 900; font-style: normal; font-display: swap;
}

@font-face {
    font-family: 'Thmanyah Sans';
    src: url('../fonts/sec-font/woff2/thmanyahsans-Light.woff2') format('woff2'),
         url('../fonts/sec-font/otf/thmanyahsans-Light.otf') format('opentype');
    font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Thmanyah Sans';
    src: url('../fonts/sec-font/woff2/thmanyahsans-Regular.woff2') format('woff2'),
         url('../fonts/sec-font/otf/thmanyahsans-Regular.otf') format('opentype');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Thmanyah Sans';
    src: url('../fonts/sec-font/woff2/thmanyahsans-Medium.woff2') format('woff2'),
         url('../fonts/sec-font/otf/thmanyahsans-Medium.otf') format('opentype');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Thmanyah Sans';
    src: url('../fonts/sec-font/woff2/thmanyahsans-Bold.woff2') format('woff2'),
         url('../fonts/sec-font/otf/thmanyahsans-Bold.otf') format('opentype');
    font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Thmanyah Sans';
    src: url('../fonts/sec-font/woff2/thmanyahsans-Black.woff2') format('woff2'),
         url('../fonts/sec-font/otf/thmanyahsans-Black.otf') format('opentype');
    font-weight: 900; font-style: normal; font-display: swap;
}

/* ============= VARIABLES ============= */
:root {
    /* Backgrounds */
    --bg: #FFFFFF;
    --bg-soft: #F8FAFB;
    --bg-muted: #F1F5F9;
    --bg-dark: #0F172A;

    /* Text */
    --text: #1A1A2E;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --text-on-gradient: #FFFFFF;

    /* Borders */
    --border: #E5E7EB;
    --border-strong: #CBD5E1;

    /* Brand (from logo gradient) */
    --green: #4DAA50;
    --green-dark: #3D8B40;
    --teal: #00A99D;
    --blue: #1B6CB1;
    --blue-dark: #0E3D77;

    /* Gradients */
    --gradient: linear-gradient(135deg, #4DAA50 0%, #00A99D 50%, #1B6CB1 100%);
    --gradient-soft: linear-gradient(135deg, rgba(77,170,80,0.08) 0%, rgba(0,169,157,0.08) 50%, rgba(27,108,177,0.08) 100%);
    --gradient-hover: linear-gradient(135deg, #3D8B40 0%, #008C82 50%, #155A94 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 12px rgba(15,23,42,0.06);
    --shadow-md: 0 8px 24px rgba(15,23,42,0.08);
    --shadow-lg: 0 16px 48px rgba(15,23,42,0.12);
    --shadow-glow: 0 8px 32px rgba(27,108,177,0.18);

    /* Radius */
    --r-sm: 6px;
    --r: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --r-full: 9999px;

    /* Layout */
    --container: 1200px;
    --header-h: 80px;

    /* Transitions */
    --t: 0.3s ease;
    --t-slow: 0.5s ease;

    /* Type scale */
    --fs-xs: 12px;
    --fs-sm: 14px;
    --fs-base: 16px;
    --fs-lg: 18px;
    --fs-xl: 22px;
    --fs-2xl: 28px;
    --fs-3xl: 36px;
    --fs-4xl: 48px;
    --fs-5xl: 64px;
}

/* ============= RESET ============= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Thmanyah Sans', 'Tahoma', 'Arial', sans-serif;
    font-size: var(--fs-base);
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    direction: rtl;
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent any element from causing horizontal overflow */
.site-header, .site-footer, main, section {
    overflow-x: hidden;
    width: 100%;
}
.container {
    width: 100%;
    box-sizing: border-box;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

a {
    color: var(--blue);
    text-decoration: none;
    transition: color var(--t);
}
a:hover { color: var(--blue-dark); }

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Thmanyah Serif', 'Tahoma', 'Arial', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
}

h1 { font-size: var(--fs-4xl); font-weight: 900; }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }

p { margin-bottom: 1em; }

::selection { background: var(--teal); color: #fff; }

/* Focus visible */
:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============= LAYOUT ============= */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-sm { padding: 40px 0; }
.section-lg { padding: 120px 0; }

/* ============= HEADER & NAV ============= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
    display: flex;
    align-items: center;
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity var(--t);
}

.site-header.scrolled::after { opacity: 1; }

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Thmanyah Serif', sans-serif;
    font-weight: 900;
    font-size: var(--fs-xl);
    color: var(--text);
    transition: opacity var(--t);
}
.nav-logo:hover { color: var(--text); opacity: 0.85; }
.nav-logo img { width: 48px; height: 48px; object-fit: contain; }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.nav-menu a {
    color: var(--text);
    padding: 10px 14px;
    border-radius: var(--r-sm);
    font-weight: 500;
    font-size: var(--fs-sm);
    transition: all var(--t);
    position: relative;
}

.nav-menu a:hover {
    color: var(--blue);
    background: var(--bg-soft);
}

.nav-menu a.active {
    color: var(--blue);
    font-weight: 700;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: var(--gradient);
    border-radius: var(--r-full);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: var(--r-sm);
    align-items: center;
    justify-content: center;
}
.nav-toggle:hover { background: var(--bg-soft); }
.nav-toggle svg { width: 24px; height: 24px; }

.search-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    padding: 8px 14px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: var(--fs-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--t);
}
.search-toggle:hover {
    border-color: var(--teal);
    color: var(--teal);
}
.search-toggle svg { width: 16px; height: 16px; }

/* ============= BUTTONS ============= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--r);
    font-weight: 700;
    font-size: var(--fs-sm);
    cursor: pointer;
    border: none;
    transition: all var(--t);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(27,108,177,0.28);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border-strong);
}
.btn-outline:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
}
.btn-ghost:hover {
    background: var(--bg-soft);
}

.btn-lg { padding: 16px 32px; font-size: var(--fs-base); }
.btn-sm { padding: 8px 16px; font-size: var(--fs-xs); }

/* ============= HERO ============= */
.hero {
    position: relative;
    padding: 80px 0 100px;
    text-align: center;
    background: var(--bg);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(77,170,80,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -200px;
    left: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(27,108,177,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
}

.hero-logo {
    width: 180px;
    height: 180px;
    margin: 0 auto 24px;
    animation: float 6s ease-in-out infinite;
}
.hero-logo img { width: 100%; height: 100%; object-fit: contain; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.hero-title {
    font-size: var(--fs-5xl);
    font-weight: 900;
    margin-bottom: 16px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.hero-tagline {
    font-family: 'Thmanyah Serif', serif;
    font-size: var(--fs-2xl);
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-style: italic;
}

.hero-sub {
    font-size: var(--fs-lg);
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 36px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ============= SECTION HEADER ============= */
.section-head {
    text-align: center;
    margin-bottom: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.section-eyebrow {
    display: inline-block;
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 12px;
    padding: 6px 14px;
    background: rgba(0, 169, 157, 0.08);
    border-radius: var(--r-full);
    align-self: center;
}

.section-title {
    font-size: var(--fs-3xl);
    margin-bottom: 12px;
}

.section-desc {
    color: var(--text-muted);
    font-size: var(--fs-lg);
    max-width: 700px;
    margin: 0 auto;
}

/* ============= CATEGORY CARDS ============= */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.cat-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 24px 16px;
    text-align: center;
    transition: all var(--t);
    cursor: pointer;
    color: var(--text);
    position: relative;
    overflow: hidden;
}

.cat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--t);
}

.cat-card:hover {
    color: var(--text);
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}
.cat-card:hover::before { transform: scaleX(1); }

.cat-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    background: var(--gradient-soft);
    border-radius: var(--r);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    transition: all var(--t);
}
.cat-card:hover .cat-icon {
    background: var(--gradient);
    color: #fff;
}
.cat-icon svg { width: 28px; height: 28px; }

.cat-label {
    font-weight: 700;
    font-size: var(--fs-base);
    margin-bottom: 4px;
    color: var(--text);
}

.cat-count {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

/* ============= POST GRID ============= */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.posts-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.posts-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.post-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: all var(--t);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(27,108,177,0.3);
}

.post-card-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-soft);
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow);
}
.post-card:hover .post-card-image img { transform: scale(1.05); }

.post-card-type {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--gradient);
    color: #fff;
    font-size: var(--fs-xs);
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--r-full);
    z-index: 2;
}

.post-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card-title {
    font-size: var(--fs-lg);
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
    color: var(--text);
    /* clamp lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card:hover .post-card-title { color: var(--blue); }

.post-card-excerpt {
    color: var(--text-muted);
    font-size: var(--fs-sm);
    margin-bottom: 16px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.post-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: var(--fs-xs);
    color: var(--text-muted);
    gap: 8px;
}

.post-card-authors {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-card-date {
    flex-shrink: 0;
}

/* ============= TEAM ============= */
.team-strip {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 16px 4px;
    scrollbar-width: thin;
}

.team-strip::-webkit-scrollbar { height: 6px; }
.team-strip::-webkit-scrollbar-thumb { background: var(--gradient); border-radius: 3px; }

.team-card-mini {
    flex-shrink: 0;
    text-align: center;
    width: 120px;
}

.team-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 10px;
    background: var(--gradient);
    padding: 3px;
    box-shadow: var(--shadow);
}
.team-photo-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #FFFFFF;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-2xl);
    font-weight: 900;
    color: #0E3D77;
    font-family: 'Thmanyah Serif', serif;
}
.team-photo-inner img { width: 100%; height: 100%; object-fit: cover; }

.team-name {
    font-weight: 700;
    font-size: var(--fs-sm);
    margin-bottom: 2px;
}

.team-role {
    color: var(--text-muted);
    font-size: var(--fs-xs);
}

/* Big team page */
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.team-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 28px 20px;
    text-align: center;
    transition: all var(--t);
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(27,108,177,0.3);
}

.team-card.supervisor {
    background: var(--gradient-soft);
    border-color: rgba(27,108,177,0.25);
}

.team-card .team-photo {
    width: 140px;
    height: 140px;
    margin-bottom: 16px;
}

.team-card .team-name {
    font-size: var(--fs-lg);
    margin-bottom: 6px;
}

.team-card .team-role {
    font-size: var(--fs-sm);
    margin-bottom: 12px;
}

.team-badge-supervisor {
    display: inline-block;
    background: var(--gradient);
    color: #fff;
    font-size: var(--fs-xs);
    font-weight: 700;
    padding: 4px 14px;
    border-radius: var(--r-full);
    margin-bottom: 12px;
}

/* ============= CALL TO ACTION ============= */
.cta-banner {
    background: var(--gradient);
    border-radius: var(--r-lg);
    padding: 48px 40px;
    text-align: center;
    color: #fff;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}

.cta-banner::before, .cta-banner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}
.cta-banner::before { width: 300px; height: 300px; top: -150px; left: -100px; }
.cta-banner::after  { width: 200px; height: 200px; bottom: -100px; right: -50px; }

.cta-banner > * { position: relative; z-index: 1; }

.cta-banner h2 {
    color: #fff;
    margin-bottom: 12px;
    font-size: var(--fs-3xl);
}

.cta-banner p {
    color: rgba(255,255,255,0.92);
    font-size: var(--fs-lg);
    margin-bottom: 24px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-banner .btn-primary {
    background: #fff;
    color: var(--blue-dark);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.cta-banner .btn-primary:hover { background: #fff; color: var(--blue-dark); opacity: 0.92; }

/* ============= FOOTER ============= */
.site-footer {
    background: var(--bg-dark);
    color: #fff;
    padding: 60px 0 24px;
    margin-top: 80px;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-family: 'Thmanyah Serif', serif;
    font-weight: 900;
    font-size: var(--fs-2xl);
    color: #fff;
}
.footer-brand img { width: 54px; height: 54px; }

.footer-about {
    color: #CBD5E1;
    font-size: var(--fs-sm);
    line-height: 1.8;
}

.footer-col h4 {
    color: #fff;
    font-size: var(--fs-base);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #CBD5E1;
    font-size: var(--fs-sm);
    transition: color var(--t);
}
.footer-col a:hover { color: var(--teal); }

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.06);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all var(--t);
}
.footer-social a:hover {
    background: var(--gradient);
    transform: translateY(-3px);
    color: #fff;
}
.footer-social svg { width: 20px; height: 20px; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 20px;
    text-align: center;
    color: #94A3B8;
    font-size: var(--fs-sm);
}

/* ============= PAGE HEADER (inner pages) ============= */
.page-hero {
    background: var(--gradient-soft);
    padding: 60px 0 40px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-bottom: 16px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb-sep { opacity: 0.5; }

.page-hero h1 {
    font-size: var(--fs-4xl);
    margin-bottom: 8px;
}

.page-hero p {
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* ============= SINGLE POST ============= */
.post-detail {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 20px;
}

.post-detail h1 {
    font-size: var(--fs-4xl);
    margin-bottom: 16px;
    line-height: 1.3;
}

.post-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
    color: var(--text-muted);
    font-size: var(--fs-sm);
}

.post-detail-authors {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-soft);
    padding: 4px 12px 4px 4px;
    border-radius: var(--r-full);
    color: var(--text);
    font-weight: 600;
}
.author-chip .author-photo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.post-cover {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-bottom: 36px;
    background: var(--bg-soft);
    box-shadow: var(--shadow-md);
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; }

.post-body {
    font-size: var(--fs-lg);
    line-height: 1.9;
    color: var(--text);
}

.post-body h2 { font-size: var(--fs-2xl); margin: 32px 0 16px; }
.post-body h3 { font-size: var(--fs-xl); margin: 28px 0 14px; color: var(--blue-dark); }
.post-body p { margin-bottom: 18px; }
.post-body ul, .post-body ol {
    margin: 0 20px 18px 0;
    padding-right: 20px;
}
.post-body ul { list-style: disc; list-style-position: outside; }
.post-body ol { list-style: arabic-indic; list-style-position: outside; }
.post-body ul li, .post-body ol li { margin-bottom: 8px; }
.post-body a { color: var(--blue); border-bottom: 1px dashed var(--blue); }
.post-body a:hover { color: var(--blue-dark); border-bottom-style: solid; }
.post-body img { border-radius: var(--r-md); margin: 16px 0; }
.post-body blockquote {
    border-right: 4px solid var(--teal);
    background: var(--bg-soft);
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: var(--r-sm);
    color: var(--text-muted);
    font-style: italic;
}

.post-share {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    margin-top: 36px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--t);
    border: 1px solid var(--border);
}
.share-btn:hover {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}

/* ============= COMMENTS ============= */
.comments {
    margin-top: 48px;
    padding-top: 36px;
    border-top: 2px solid var(--border);
}

.comments h3 {
    margin-bottom: 24px;
}

.comment-form {
    background: var(--bg-soft);
    padding: 24px;
    border-radius: var(--r-md);
    margin-bottom: 32px;
}

.comment-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-family: inherit;
    background: #fff;
    font-size: var(--fs-sm);
    transition: border-color var(--t);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(0,169,157,0.1);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
    margin-bottom: 12px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: var(--fs-sm);
}

.comment-list { display: flex; flex-direction: column; gap: 16px; }

.comment {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 18px;
}

.comment-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 700;
    color: var(--text);
}

.comment-date {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.comment-body {
    color: var(--text-muted);
    line-height: 1.7;
}

/* ============= FLASH MESSAGES ============= */
.flash {
    padding: 14px 20px;
    border-radius: var(--r-md);
    margin: 16px 0;
    font-weight: 500;
    border: 1px solid;
}
.flash-success { background: #D1FAE5; color: #065F46; border-color: #6EE7B7; }
.flash-error   { background: #FEE2E2; color: #991B1B; border-color: #FCA5A5; }
.flash-info    { background: #DBEAFE; color: #1E3A8A; border-color: #93C5FD; }
.flash-warn    { background: #FEF3C7; color: #92400E; border-color: #FCD34D; }

/* ============= INFOGRAPHIC GRID ============= */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.info-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--t);
    position: relative;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.info-card-img {
    aspect-ratio: 1/1.2;
    background: var(--bg-soft);
    overflow: hidden;
    position: relative;
}
.info-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow);
}
.info-card:hover .info-card-img img { transform: scale(1.05); }

.info-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15,23,42,0.85) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.info-card-overlay h3 {
    color: #fff;
    font-size: var(--fs-base);
    line-height: 1.4;
}

/* ============= LIGHTBOX ============= */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 92vw;
    max-height: 92vh;
    border-radius: var(--r);
    box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
}

/* ============= AUDIO PLAYER ============= */
.audio-player {
    background: var(--gradient);
    border-radius: var(--r-md);
    padding: 24px;
    color: #fff;
    margin-bottom: 24px;
}

.audio-player h3 { color: #fff; margin-bottom: 12px; }
.audio-player audio {
    width: 100%;
    margin-top: 12px;
    filter: invert(0);
}

/* ============= VIDEO EMBED ============= */
.video-wrap {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: var(--r-md);
    overflow: hidden;
    background: #000;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
}
.video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ============= PAGINATION ============= */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 40px 0;
}

.pagination a, .pagination span {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text);
    font-weight: 600;
    padding: 0 12px;
    transition: all var(--t);
}

.pagination a:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.pagination .current {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
}

/* ============= FILTER BAR ============= */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar form {
    display: flex;
    gap: 12px;
    flex: 1;
    min-width: 280px;
    flex-wrap: wrap;
}

.filter-bar .form-input,
.filter-bar .form-select {
    flex: 1;
    min-width: 140px;
}

/* ============= ABOUT PAGE BLOCKS ============= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin: 40px 0;
}

.about-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 36px;
    position: relative;
    overflow: hidden;
    transition: all var(--t);
}

.about-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.about-card-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 20px;
}
.about-card-icon svg { width: 32px; height: 32px; }

.about-card h2 { font-size: var(--fs-2xl); margin-bottom: 14px; }
.about-card p { color: var(--text-muted); line-height: 1.9; }

.about-slogan {
    text-align: center;
    background: var(--gradient);
    color: #fff;
    padding: 60px 30px;
    border-radius: var(--r-lg);
    margin: 60px 0;
    position: relative;
    overflow: hidden;
}
.about-slogan::before, .about-slogan::after {
    content: '"';
    position: absolute;
    font-size: 200px;
    font-family: serif;
    line-height: 1;
    color: rgba(255,255,255,0.12);
}
.about-slogan::before { top: 20px; right: 30px; }
.about-slogan::after  { bottom: -50px; left: 30px; }

.about-slogan h2 {
    color: #fff;
    font-size: var(--fs-3xl);
    line-height: 1.5;
    font-style: italic;
    position: relative;
    z-index: 1;
}

/* ============= APP PAGE ============= */
.app-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 40px 0;
}

.app-hero-text h1 {
    font-size: var(--fs-4xl);
    margin-bottom: 16px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-hero-text p {
    color: var(--text-muted);
    font-size: var(--fs-lg);
    margin-bottom: 24px;
    line-height: 1.9;
}

.app-hero-img {
    aspect-ratio: 1/1;
    background: var(--gradient-soft);
    border-radius: var(--r-xl);
    display: flex;
    align-items: center;
    justify-content: center;
}
.app-hero-img img {
    width: 60%;
    animation: float 6s ease-in-out infinite;
}

/* ============= CONTACT PAGE ============= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-top: 40px;
}

.contact-info {
    background: var(--gradient);
    color: #fff;
    padding: 36px;
    border-radius: var(--r-lg);
    position: relative;
    overflow: hidden;
}
.contact-info::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 250px;
    height: 250px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.contact-info h3 { color: #fff; margin-bottom: 16px; }
.contact-info p { color: rgba(255,255,255,0.9); margin-bottom: 24px; line-height: 1.9; }

.contact-list { display: flex; flex-direction: column; gap: 16px; position: relative; }

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
}
.contact-item svg { width: 22px; height: 22px; flex-shrink: 0; }
.contact-item a { color: #fff; }

.contact-form {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 36px;
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.contact-form .form-input,
.contact-form .form-textarea {
    margin-bottom: 16px;
}

/* ============= SEARCH MODAL ============= */
.search-modal {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.6);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 80px 20px;
}
.search-modal.open { display: flex; }

.search-box {
    background: #fff;
    width: 100%;
    max-width: 640px;
    border-radius: var(--r-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow-lg);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.search-form {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0 12px;
    border-bottom: 2px solid var(--border);
    transition: border-color var(--t);
}
.search-form:focus-within { border-color: var(--teal); }

.search-form-icon {
    width: 22px;
    height: 22px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    width: 100%;
    border: none;
    font-size: var(--fs-xl);
    padding: 8px 0;
    font-family: inherit;
    background: transparent;
    color: var(--text);
}
.search-input:focus { outline: none; }
.search-input::placeholder { color: var(--text-light); }

.search-clear {
    background: var(--bg-soft);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: all var(--t);
    line-height: 1;
}
.search-clear:hover { background: var(--border); color: var(--text); }

.search-results {
    margin-top: 12px;
    overflow-y: auto;
    max-height: 60vh;
}

.search-results:empty + .search-hint { display: block; }
.search-results:not(:empty) ~ .search-hint { display: none; }

.search-result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: var(--r);
    text-decoration: none;
    color: var(--text);
    transition: all var(--t);
    border: 1px solid transparent;
}
.search-result-item:hover,
.search-result-item:focus {
    background: var(--bg-soft);
    color: var(--text);
    border-color: var(--border);
    transform: translateX(-4px);
}

.search-result-img {
    width: 64px;
    height: 64px;
    border-radius: var(--r-sm);
    object-fit: cover;
    background: var(--bg-soft);
    flex-shrink: 0;
}

.search-result-meta {
    flex: 1;
    min-width: 0;
}

.search-result-type {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--r-full);
    background: var(--gradient);
    color: #fff;
    margin-bottom: 4px;
}

.search-result-title {
    font-weight: 700;
    font-size: var(--fs-sm);
    color: var(--text);
    margin-bottom: 2px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-excerpt {
    color: var(--text-muted);
    font-size: var(--fs-xs);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-loading,
.search-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 24px;
    font-size: var(--fs-sm);
}

.search-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--teal);
    border-radius: 50%;
    animation: spin-slow 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

.search-view-all {
    display: block;
    text-align: center;
    padding: 12px;
    margin-top: 8px;
    border-top: 1px solid var(--border);
    color: var(--blue);
    font-weight: 700;
    font-size: var(--fs-sm);
    text-decoration: none;
}
.search-view-all:hover { color: var(--blue-dark); }

.search-hint {
    color: var(--text-muted);
    font-size: var(--fs-xs);
    text-align: center;
    margin-top: 12px;
}

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

.empty svg {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    opacity: 0.4;
}

.empty h3 { color: var(--text); margin-bottom: 8px; }

/* ============= SECTION TABS ============= */
.section-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.section-tabs button {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: var(--r-full);
    cursor: pointer;
    font-weight: 600;
    font-size: var(--fs-sm);
    transition: all var(--t);
}

.section-tabs button:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.section-tabs button.active {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
}

/* ============= RESPONSIVE ============= */
@media (max-width: 1024px) {
    :root {
        --fs-4xl: 38px;
        --fs-5xl: 48px;
    }
    .cat-grid { grid-template-columns: repeat(3, 1fr); }
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    .team-grid { grid-template-columns: repeat(3, 1fr); }
    .info-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    .contact-grid { grid-template-columns: 1fr; }
    .app-hero { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 768px) {
    :root {
        --header-h: 70px;
        --fs-3xl: 28px;
        --fs-4xl: 32px;
        --fs-5xl: 40px;
    }

    .section { padding: 60px 0; }
    .hero { padding: 60px 0 80px; }

    .nav-menu {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        box-shadow: var(--shadow-md);
        border-top: 1px solid var(--border);
        transform: translateY(-200%);
        transition: transform var(--t);
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
    }
    .nav-menu.open { transform: translateY(0); }
    .nav-menu a {
        width: 100%;
        padding: 14px 16px;
        text-align: right;
    }
    .nav-menu a.active::after { display: none; }

    .nav-toggle { display: flex; }
    .search-toggle span { display: none; }

    .hero-logo { width: 130px; height: 130px; }

    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .posts-grid, .posts-grid.cols-2, .posts-grid.cols-4 { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .info-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; }

    .comment-form .form-row { grid-template-columns: 1fr; }
    .contact-form .form-row { grid-template-columns: 1fr; }

    .cta-banner { padding: 36px 24px; }

    .post-detail h1 { font-size: var(--fs-3xl); }
    .post-body { font-size: var(--fs-base); }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .team-grid { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { width: 100%; }
}

/* ============= ACCESSIBILITY ============= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    right: 20px;
    background: var(--blue-dark);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--r-sm);
    z-index: 1000;
    transition: top var(--t);
}
.skip-link:focus { top: 10px; color: #fff; }
