/* --- 1. THEME VARIABLES --- */
        :root {
            /* Brand Identity Colors */
            --brand-navy: #022e47;
            --brand-cream: #FAF8F1;
            --brand-orange: #f68f1d;
            --brand-pink: #ea3b60;
            
            /* Default LIGHT Theme Mapping */
            --bg-body: var(--brand-cream);
            --text-main: var(--brand-navy);
            --text-muted: rgba(2, 46, 71, 0.7);
            --nav-bg-scrolled: rgba(250, 248, 241, 0.95);
            --nav-mobile-bg: #FAF8F1;
            --nav-mobile-shadow: rgba(0,0,0,0.1);
            
            /* Footer is always dark */
            --footer-bg: var(--brand-navy);
            
            --vf-grad: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange) 65%, var(--brand-pink) 100%);
            
            --font-display: 'Bakbak One', cursive;
            --font-body: 'Work Sans', sans-serif;
        }

        /* DARK THEME OVERRIDES */
        [data-theme="dark"] {
            --bg-body: #011a2a; 
            --text-main: #e6e6e6;
            --text-muted: rgba(255, 255, 255, 0.7);
            --nav-bg-scrolled: rgba(1, 26, 42, 0.95);
            --nav-mobile-bg: #022e47;
            --nav-mobile-shadow: rgba(0,0,0,0.4);
        }

        /* --- 2. GLOBAL STYLES --- */
        body {
            background-color: var(--bg-body);
            font-family: var(--font-body);
            color: var(--text-main);
            overflow-x: hidden;
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        h1, h2, h3, h4, h5, h6 {
            font-family: var(--font-display);
            text-transform: uppercase;
            font-weight: 600;
        }

        .text-gradient {
            background: var(--vf-grad);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        /* --- 3. AMBIENT BACKGROUND --- */
        .ambient-light {
            position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
            z-index: -1; pointer-events: none; overflow: hidden;
            background: var(--bg-body);
            transition: background-color 0.3s ease;
        }

        .orb {
            position: absolute; border-radius: 50%;
            filter: blur(80px); opacity: 0.5;
            animation: floatOrb 20s infinite ease-in-out;
        }

        .orb-1 { width: 100vw; height: 100vw; background: var(--brand-orange); top: -10%; left: -10%; opacity: 0.15;}
        .orb-2 { width: 30vw; height: 30vw; background: var(--brand-pink); bottom: 10%; right: -5%; animation-delay: -5s; opacity: 0.15;}
        .orb-3 { width: 60vw; height: 60vw; background: #ff5500; top: 40%; left: 40%; animation-delay: -10s; opacity: 0.1;}

        @keyframes floatOrb {
            0%, 100% { transform: translate(0, 0) scale(1); }
            50% { transform: translate(30px, -50px) scale(1.1); }
        }

        /* BRAND LOGO THEME ADAPTATION */
        .brand-logo { height: 70px; width: auto; object-fit: contain; }
        .logo-light { display: block; }
        .logo-dark { display: none; }
        html[data-theme="dark"] .logo-light { display: none; }
        html[data-theme="dark"] .logo-dark { display: block; }

    

		/* --- 7. HERO SECTION (SPLIT LAYOUT) --- */
        .hero-section {
            min-height: 100vh;
            display: flex;
            align-items: center;
            position: relative;
            padding-top: 160px; 
            padding-bottom: 80px;
            z-index: 1; 
        }

        .hero-title {
            font-size: clamp(3rem, 6vw, 4.5rem); 
            letter-spacing: -0.04em; /* Strict Verafede Guideline */
            margin-bottom: 1.2rem;
            line-height: 0.8 !important;
        }

        .hero-sub {
            font-size: 1.15rem;
            max-width: 500px; 
            font-weight: 600;
            line-height: 1;
            margin-bottom: 2rem;
        }
		
		/* --- 8. BOXED EDITORIAL TOPICS --- */
        .topics-box {
            max-width: 520px;
            background: rgba(255, 255, 255, 0.4);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, 0.6);
            border-radius: 16px;
            padding: 24px 28px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .topics-box:hover {
            transform: translateY(-4px);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
        }

        .topics-box-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 20px;
            border-bottom: 1px solid rgba(2, 46, 71, 0.08);
            padding-bottom: 12px;
        }

        .topics-box-header i {
            font-size: 1rem;
        }

        .editorial-label {
            font-family: var(--font-display);
            font-size: 0.85rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 2px;
            font-weight: 600;
            margin: 0; /* Removed bottom margin since the header handles it */
        }

        .editorial-list {
            display: flex;
            flex-wrap: wrap;
            gap: 14px 24px; 
            justify-content: center;
        }

        /* Target desktop to align left */
        @media (min-width: 992px) {
            .editorial-list { justify-content: flex-start; }
        }

        .editorial-link {
            position: relative;
            color: var(--text-main);
            text-decoration: none;
            font-family: var(--font-body);
            font-weight: 500;
            font-size: 1rem;
            display: inline-flex;
            align-items: flex-start;
            transition: color 0.3s ease;
            padding-bottom: 4px;
        }

        /* The tiny numbers next to the topics */
        .editorial-link .num {
            font-size: 0.65rem;
            color: var(--brand-orange);
            font-weight: 700;
            margin-right: 6px;
            margin-top: 3px;
            opacity: 0.8;
            transition: opacity 0.3s ease;
        }

        /* The animated underline effect */
        .editorial-link::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: 0;
            width: 0;
            height: 2px;
            background: var(--vf-grad);
            transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
        }

        /* Hover States */
        .editorial-link:hover { color: var(--brand-orange); }
        .editorial-link:hover .num { opacity: 1; }
        .editorial-link:hover::after { width: 100%; }

        /* DARK MODE OVERRIDES */
        [data-theme="dark"] .topics-box { 
            background: rgba(2, 46, 71, 0.4); 
            border-color: rgba(255, 255, 255, 0.08); 
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        }
        [data-theme="dark"] .topics-box-header { border-bottom-color: rgba(255, 255, 255, 0.1); }
        [data-theme="dark"] .editorial-label { color: rgba(255, 255, 255, 0.7); }
        [data-theme="dark"] .editorial-link { color: rgba(255, 255, 255, 0.9); }
        [data-theme="dark"] .editorial-link:hover { color: var(--brand-orange); }

        /* --- 8. MODERN SEARCH PILL --- */
        .search-box-modern {
            display: flex;
            align-items: center;
            background: rgba(255, 255, 255, 0.5);
            backdrop-filter: blur(12px);
            border: 1px solid rgba(2, 46, 71, 0.1);
            border-radius: 50px;
            padding: 6px;
            max-width: 450px;
            transition: all 0.3s ease;
            box-shadow: 0 10px 30px rgba(0,0,0,0.03);
            position: relative;
        }

        .search-box-modern:focus-within {
            border-color: var(--brand-orange);
            box-shadow: 0 10px 30px rgba(246, 143, 29, 0.15);
            background: rgba(255, 255, 255, 0.8);
        }

        .search-icon-modern {
            padding-left: 15px;
            color: var(--text-muted);
            font-size: 1.1rem;
        }

        .search-input-modern {
            flex-grow: 1;
            border: none;
            background: transparent;
            padding: 10px 15px;
            color: var(--text-main);
            font-family: var(--font-body);
            font-size: 1rem;
            outline: none;
        }

        .search-input-modern::placeholder { color: var(--text-muted); opacity: 0.7; }

        .search-btn-modern {
            background: var(--vf-grad);
            color: white;
            border: none;
            border-radius: 50px;
            padding: 10px 24px;
            font-family: var(--font-body);
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.3s, box-shadow 0.3s;
        }

        .search-btn-modern:hover {
            transform: scale(1.05);
            box-shadow: 0 5px 15px rgba(246, 143, 29, 0.4);
        }

        /* --- 8.5 UNIFIED CATEGORY DOCK --- */
        .category-dock {
            display: flex;
            background: rgba(255, 255, 255, 0.3);
            backdrop-filter: blur(12px);
            border: 1px solid rgba(2, 46, 71, 0.1);
            border-radius: 50px;
            padding: 8px 12px; /* Slightly more padding to accommodate the search bar */
            box-shadow: 0 4px 15px rgba(0,0,0,0.02);
            width: 100%; /* Ensures it spans the container to fit both elements */
        }

        .dock-btn {
            background: transparent;
            border: none;
            padding: 8px 22px;
            border-radius: 50px;
            color: var(--text-main);
            font-family: var(--font-body);
            font-weight: 500;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .dock-btn:hover {
            color: var(--brand-orange);
            background: rgba(255, 255, 255, 0.4);
        }

        .dock-btn.active {
            background: var(--vf-grad);
            color: white;
            box-shadow: 0 4px 15px rgba(246, 143, 29, 0.3);
        }

        /* DARK MODE OVERRIDES FOR DOCK */
        [data-theme="dark"] .category-dock { background: rgba(0, 0, 0, 0.3); border-color: rgba(255, 255, 255, 0.1); }
        [data-theme="dark"] .dock-btn:hover { background: rgba(255, 255, 255, 0.1); }

        /* --- 9. INTERACTIVE ARTICLE FRAME --- */
        .interactive-article-wrapper {
            position: relative;
            max-width: 480px;
            margin: 0 auto;
            perspective: 1000px; /* Gives it 3D depth */
        }

        /* The glowing aura behind the card */
        .frame-glow {
            position: absolute;
            top: 10%; left: 10%; width: 80%; height: 80%;
            background: var(--vf-grad);
            filter: blur(45px);
            opacity: 0.4;
            z-index: 0;
            transition: opacity 0.5s;
            animation: pulse-glow 4s infinite alternate;
        }

        .article-frame {
            position: relative;
            z-index: 1;
            background: rgba(255, 255, 255, 0.4);
            border: 1px solid rgba(255, 255, 255, 0.5);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 20px 40px rgba(0,0,0,0.08);
            
            /* Changed transition to be very fast so it tracks the mouse smoothly */
            transition: transform 0.1s ease-out, box-shadow 0.3s ease; 
            transform-style: preserve-3d;
            will-change: transform;
        }

        /* We removed the old hover rotation, JS does the work now. We just increase the shadow. */
        .interactive-article-wrapper:hover .article-frame {
            box-shadow: 0 30px 50px rgba(0,0,0,0.15);
        }

        .interactive-article-wrapper:hover .frame-glow { opacity: 0.7; }

        .frame-img-wrapper { position: relative; width: 100%; height: 220px; overflow: hidden; }
        
        .frame-img {
            width: 100%; height: 100%; object-fit: cover;
            transition: transform 0.6s ease;
        }
        
        .interactive-article-wrapper:hover .frame-img { transform: scale(1.08); }

        .frame-tag {
            position: absolute; top: 15px; left: 15px;
            background: rgba(0,0,0,0.6); color: white;
            backdrop-filter: blur(5px); font-size: 0.75rem;
            padding: 5px 12px; border-radius: 50px; text-transform: uppercase;
            font-weight: 600; letter-spacing: 1px;
        }

/* --- UNIFORM CARD CONTENT --- */
.frame-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 300px; /* consistent vertical rhythm */
  padding: 24px;
}

.frame-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  display: box; /* standard property */
  -webkit-box-orient: vertical;
  box-orient: vertical; /* standard property */
  -webkit-line-clamp: 3;
  line-clamp: 3; /* standard property */
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: calc(1.4em * 3);
}

.frame-desc {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  display: box; /* standard property */
  -webkit-box-orient: vertical;
  box-orient: vertical; /* standard property */
  -webkit-line-clamp: 3;
  line-clamp: 3; /* standard property */
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: calc(1.5em * 3);
}


/* Meta + Button grouped tighter */
.frame-footer {
  display: flex;
  flex-direction: column;
  gap: 8px; /* small gap between meta and button */
  margin-top: auto; /* pushes footer block to bottom */
}

/* Meta line */
.frame-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.frame-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-navy);
  padding: 6px 14px;
  border-radius: 24px;
  background: rgba(246, 143, 29, 0.08);
  border: 1px solid rgba(234, 59, 96, 0.25);
  transition: all 0.3s ease;
}

.frame-meta i {
  color: var(--brand-orange);
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

/* --- META LINE STYLING --- */
.frame-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* Button line */
.frame-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 40px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: var(--vf-grad);
  box-shadow: 0 6px 14px rgba(246, 143, 29, 0.25);
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.frame-btn:hover {
  box-shadow: 0 8px 20px rgba(234, 59, 96, 0.35);
  transform: translateY(-2px);
}

.frame-btn i {
  transition: transform 0.35s ease;
}

.frame-btn:hover i {
  transform: translateX(4px);
}

.frame-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -50%;
  width: 50%; height: 100%;
  background: rgba(255,255,255,0.25);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.frame-btn:hover::after {
  left: 120%;
}


        /* DARK MODE OVERRIDES */
        [data-theme="dark"] .search-box-modern { background: rgba(0, 0, 0, 0.3); border-color: rgba(255, 255, 255, 0.1); }
        [data-theme="dark"] .search-box-modern:focus-within { background: rgba(0, 0, 0, 0.6); border-color: var(--brand-orange); }
        [data-theme="dark"] .cat-chip { border-color: rgba(255, 255, 255, 0.15); background: rgba(0, 0, 0, 0.2); }
        [data-theme="dark"] .article-frame { background: rgba(2, 46, 71, 0.4); border-color: rgba(255, 255, 255, 0.05); }

        /* Animations */
        @keyframes pulse-glow { 0% { transform: scale(1); } 100% { transform: scale(1.05); } }
        .fade-in-up { animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
        @keyframes fadeInUp { 0% { opacity: 0; transform: translateY(30px); } 100% { opacity: 1; transform: translateY(0); } }
		
		/* --- 10. BLOG/ARTICLE GRID LAYOUT --- */
        .posts-grid {
            display: grid;
            grid-template-columns: repeat(1, 1fr);
            gap: 24px;
            margin-top: 40px;
            margin-bottom: 60px;
        }

        /* Tablet and up: 2 columns */
        @media (min-width: 768px) {
            .posts-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        /* Desktop and up: 3 columns + featured spanning */
        @media (min-width: 1024px) {
            .posts-grid {
                grid-template-columns: repeat(3, 1fr);
                gap: 30px;
            }
            /* The 'big' card takes up 2 columns and 2 rows */
            .post-card.big {
                grid-column: span 2;
                grid-row: span 2;
            }
        }

        /* --- 11. POST CARD STYLING --- */
        .post-card {
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            min-height: 300px;
            border-radius: 20px;
            overflow: hidden;
            text-decoration: none;
            box-shadow: 0 10px 30px rgba(0,0,0,0.08);
            transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s;
            /* Using transform-style to prevent text blurring during scale */
            transform-style: preserve-3d;
        }

        .post-card.big {
            min-height: 500px;
        }

        /* Background Image setup using the inline CSS variable */
        .post-card::before {
            content: '';
            position: absolute;
            inset: 0;
            background-image: var(--img);
            background-size: cover;
            background-position: center;
            transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
            z-index: 0;
        }


        /* Hover Effects */
        .post-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.15);
        }

        .post-card:hover::before {
            transform: scale(1.08); /* Zooms the background image */
        }

        .post-card:hover::after {
            background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0.2) 100%);
        }

        /* --- 12. CARD CONTENT STYLING --- */
        .post-content {
            position: relative;
            z-index: 2;
            padding: 24px;
            color: #ffffff; /* Text is always white on top of the dark gradient */
            width: 100%;
        }

        .post-card.big .post-content {
            padding: 36px;
        }

        /* Topline (Category & Arrow) */
        .post-topline {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .post-chip {
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            padding: 6px 14px;
            border-radius: 50px;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .arrow-badge {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(10px);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            font-size: 0.9rem;
        }

        .post-card:hover .arrow-badge {
            background: var(--brand-orange);
            color: white;
            transform: rotate(45deg); /* Playful little spin on hover */
        }

        /* Typography */
        .post-title {
            font-size: 1.4rem;
            margin-bottom: 12px;
            line-height: 1.25;
            letter-spacing: -0.02em;
        }

        .post-card.big .post-title {
            font-size: 2.2rem;
        }

        .post-desc {
            font-size: 0.95rem;
            color: rgba(255, 255, 255, 0.8);
            line-height: 1.5;
            margin-bottom: 20px;
            display: -webkit-box;
            line-clamp: 2; /* Truncates to 2 lines */
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .post-card.big .post-desc {
            font-size: 1.1rem;
            max-width: 80%;
            line-clamp: 3;
        }

        /* Footer Meta Data */
        .post-meta {
            display: flex;
            gap: 16px;
            border-top: 1px solid rgba(255, 255, 255, 0.15);
            padding-top: 16px;
        }

        .meta-pill {
            font-size: 0.8rem;
            color: rgba(255, 255, 255, 0.9);
            display: flex;
            align-items: center;
            gap: 6px;
            font-weight: 500;
        }

        /* DARK MODE OVERRIDES */
        [data-theme="dark"] .post-card {
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        }
        [data-theme="dark"] .post-card:hover {
            box-shadow: 0 20px 40px rgba(0,0,0,0.8);
        }
		


