﻿/**
Theme Name: BanglaSahayak Custom
Author: rizzz6
Author URI: https://www.reddit.com/user/rizzz6/
Description: Custom mobile-first theme for BanglaSahayak educational platform
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: banglasahayak-custom
Template: astra
*/

/* =========================================
   TYPOGRAPHY SYSTEM (Unicode Range Override)
   ========================================= */

/* Fonts are now handled via assets/css/fonts.css */

/* =========================================
   CSS CUSTOM PROPERTIES (Variables)
   ========================================= */
:root {
    /* Brand Colors - Emerald Green Theme */
    --brand-primary: #059669;
    /* Emerald Green (Main CTA, Links) */
    --brand-primary-dark: #047857;
    /* Darker Emerald */
    --brand-primary-light: #10b981;
    /* Lighter Emerald */
    --brand-dark: #022c22;
    /* Deep Forest (Headings, Dark Text) */
    --brand-accent: #f43f5e;
    /* Rose Coral (Highlights, Badges) */
    --brand-accent-dark: #e11d48;
    /* Darker Rose */

    /* Backgrounds */
    --bg-page: #f0fdf4;
    /* Mint Tint (Page Background) */
    --bg-surface: #ffffff;
    /* White (Cards, Surfaces) */
    --bg-surface-hover: #f9fafb;
    /* Light Grey Hover */

    /* Text Colors */
    --text-main: #1f2937;
    /* Grey 800 (Body Text) */
    --text-heading: #022c22;
    /* Deep Forest (Headings) */
    --text-muted: #6b7280;
    /* Grey 500 (Meta, Secondary) */
    --text-light: #9ca3af;
    /* Grey 400 (Disabled) */

    /* Utility Colors */
    --border-color: #d1d5db;
    /* Grey 300 (Borders) */
    --border-light: #e5e7eb;
    /* Grey 200 (Light Borders) */
    --clr-light-bg: #f8fafc;
    /* Light Background */
    --bg-card: #ffffff;
    /* Default Card Background */
    --clr-white: #ffffff;

    /* Gradients - Emerald Theme */
    --gradient-primary: linear-gradient(135deg, #059669 0%, #047857 100%);
    --gradient-hero: linear-gradient(135deg, #059669 0%, #022c22 100%);

    /* Transition for theme switching */
    --theme-transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;

    /* Spacing - 8px Base Grid */
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-5: 40px;
    --space-6: 48px;
    --space-8: 64px;
    --space-10: 80px;
    --space-12: 96px;

    /* Legacy spacing (for compatibility) */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
    --spacing-2xl: 80px;

    /* 1. Google Sans (Latin) | 2. Tiro Bangla (Bengali) */
    --font-family: 'Google Sans', 'Tiro Bangla', sans-serif;
    /* Keeping this for fallback reference */
    --font-bengali: 'Tiro Bangla', serif;

    /* Font Sizes */
    --text-xs: 0.75rem;
    /* 12px - Tiny labels */
    --text-sm: 0.875rem;
    /* 14px - Small text, meta */
    --text-base: 1rem;
    /* 16px - Body text */
    --text-lg: 1.125rem;
    /* 18px - Large body */
    --text-xl: 1.25rem;
    /* 20px - H4 */
    --text-2xl: 1.5rem;
    /* 24px - H3 */

    /* Letter Spacing for Bengali Title Fix */
    --tracking-bengali-title: 0.5px;

    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;

    /* Line Heights */
    --leading-tight: 1.1;
    --leading-snug: 1.2;
    --leading-normal: 1.5;
    --leading-relaxed: 1.6;
    --leading-loose: 1.7;
    --leading-bengali: 1.8;

    /* Border Radius - Standardized */
    --radius-sm: 8px;
    /* Buttons, inputs */
    --radius-lg: 16px;
    /* Large cards */
    --radius-xl: 24px;
    /* Hero sections */
    --radius-pill: 50px;
    /* Pills, tags */
    --radius-full: 9999px;
    /* Circles */

    /* Legacy (for compatibility) */
    --radius: 16px;
    --container-width: 1200px;
    --header-height: 70px;

    /* Shadows */
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* Dark Mode Variables */
html.dark-mode {
    --bg-page: #0f172a; /* Slate 900 */
    --bg-surface: #1e293b; /* Slate 800 */
    --bg-surface-hover: #334155; /* Slate 700 */
    --bg-card: #1e293b; /* Slate 800 - New variable for cards */
    --clr-light-bg: #0f172a; /* Slate 900 */

    /* Text Colors - Inverted for Dark Mode */
    --text-main: #cbd5e1; /* Slate 300 */
    --text-heading: #f8fafc; /* Slate 50 */
    --text-muted: #94a3b8; /* Slate 400 */
    --text-light: #64748b; /* Slate 500 */

    /* Brand Colors Adapted for Dark Mode */
    --brand-primary: #10b981; /* Lighter Emerald for better contrast */
    --brand-primary-dark: #059669; /* Slightly darker */
    --brand-primary-light: #34d399; /* Even lighter for accents */
    
    /* CRITICAL: Mapping dark brand colors to light text for dark mode */
    --brand-dark: #f1f5f9; /* Slate 100 - Was Deep Forest Green */
    --brand-accent: #fb7185; /* Lighter Rose */

    /* Borders */
    --border-color: #334155; /* Slate 700 */
    --border-light: #1e293b; /* Slate 800 */
    
    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #064e3b 0%, #0f172a 100%);
    
    /* Keep white as white for TEXT on buttons */
    --clr-white: #ffffff; 
}

/* Dark Mode Text Color Overrides */
html.dark-mode h1,
html.dark-mode h2,
html.dark-mode h3,
html.dark-mode h4,
html.dark-mode h5,
html.dark-mode h6,
html.dark-mode .hero-text-primary,
html.dark-mode .site-title,
html.dark-mode .footer-heading {
    color: var(--text-heading) !important;
}

html.dark-mode p,
html.dark-mode span,
html.dark-mode .hero-description,
html.dark-mode .site-tagline,
html.dark-mode .footer-text {
    color: var(--text-main) !important;
}

html.dark-mode a {
    color: var(--brand-primary-light);
}

html.dark-mode a:hover {
    color: var(--brand-primary);
}

/* =========================================
   BASE STYLES (Mobile-First)
   ========================================= */
* {
    box-sizing: border-box;
}

input, button, select, textarea {
    font-family: inherit;
}

/* Global Heading Sizes - Mobile First (< 768px) */
h1, .h1, .entry-title { font-size: 1.75rem; margin-top: 0; margin-bottom: 12px; line-height: 1.2; }
h2, .h2 { font-size: 1.35rem; margin-top: 24px; margin-bottom: 8px; line-height: 1.3; }
h3, .h3 { font-size: 1.25rem; margin-top: 20px; margin-bottom: 6px; line-height: 1.4; }
h4, .h4 { font-size: 1.10rem; margin-top: 16px; margin-bottom: 5px; line-height: 1.4; }
h5, .h5 { font-size: 1.00rem; margin-top: 12px; margin-bottom: 4px; line-height: 1.5; }
h6, .h6 { font-size: 0.90rem; margin-top: 10px; margin-bottom: 3px; line-height: 1.5; }

/* Desktop Overrides (>= 768px) */
@media (min-width: 768px) {
    h1, .h1, .entry-title { font-size: 2.25rem; margin-top: 0; margin-bottom: 1rem; }
    h2, .h2 { font-size: 1.75rem; margin-top: 1.5rem; margin-bottom: 0.6rem; }
    h3, .h3 { font-size: 1.35rem; margin-top: 1.25rem; margin-bottom: 0.5rem; }
    h4, .h4 { font-size: 1.15rem; margin-top: 1rem; margin-bottom: 0.4rem; }
    h5, .h5 { font-size: 1rem; margin-top: 0.75rem; margin-bottom: 0.25rem; }
    h6, .h6 { font-size: 0.85rem; margin-top: 0.5rem; margin-bottom: 0.2rem; }
}

/* Material Symbols Icons */
.material-symbols-rounded {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    font-size: inherit;
    vertical-align: middle;
}

/* Read Progress Bar */
.read-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(5, 150, 105, 0.1);
    z-index: 9999;
    pointer-events: none;
}

.read-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-primary-light));
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 8px rgba(5, 150, 105, 0.5);
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    font-size: 0.9375rem; /* 15px */
    line-height: 1.6;
    color: var(--text-main);
    background: var(--bg-page);
    transition: var(--theme-transition);
}

/* Improved Reading Experience */
p {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 1em;
}

/* Bengali Text Optimization */
.bengali-text,
[lang="bn"] {
    font-family: var(--font-bengali);
    line-height: 1.7;
    font-size: 0.9375rem; /* 15px */
}

/* Override Astra Theme Styles */
.home .site-content {
    padding: 0 !important;
    margin: 0 !important;
}

.home .ast-container {
    max-width: 100% !important;
    padding: 0 !important;
}

.home-container {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Fix Astra's main content area */
#primary,
.site-main {
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure full width for home page */
.home #primary {
    width: 100% !important;
    max-width: 100% !important;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 4px;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* =========================================
   HEADER STYLES (Mobile-First)
   ========================================= */
.site-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 999;
    height: var(--header-height);
    transition: var(--theme-transition), box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
    transition: all 0.3s ease;
    margin-left: 12px;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.dark-mode-toggle .material-symbols-rounded {
    font-size: 22px;
    color: white;
}

html.dark-mode .dark-mode-toggle {
    background: var(--brand-primary-light);
}

/* Toggle Visibility */
.dark-mode-toggle.hide-on-mobile {
    display: none;
}

@media (min-width: 768px) {
    .dark-mode-toggle.hide-on-mobile {
        display: flex;
    }
}

/* Mobile Menu Toggle Specifics */
.mobile-menu-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    box-shadow: none;
    margin: 0 0 0 15px;
}

.mobile-menu-toggle-btn .material-symbols-rounded {
    color: var(--brand-primary);
}

html.dark-mode .mobile-menu-toggle-btn .material-symbols-rounded {
    color: var(--brand-primary-light);
}

/* Logo Area */
.logo-area {
    z-index: 1001;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-branding {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--brand-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
    padding-right: 5px;
    /* Fix for Bengali overlap */
    display: inline-block;
}

.site-tagline {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.2;
}

/* Logo Image Sizing */
.custom-logo-link {
    display: inline-block;
}

.custom-logo {
    display: block;
    width: auto;
    height: auto;
    max-height: 50px;
    max-width: 50px;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.menu-toggle-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
}

.menu-toggle-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--brand-dark);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hamburger Animation */
.menu-toggle.active .menu-toggle-icon span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.menu-toggle.active .menu-toggle-icon span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .menu-toggle-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Desktop Navigation, Search & Actions - Hidden on Mobile */
.nav-desktop,
.nav-actions {
    display: none;
}

/* Dropdown submenu - hidden by default */
.nav-submenu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 200px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    list-style: none;
    margin: 0;
}

.nav-submenu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown:hover .nav-submenu {
    display: block;
    animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.nav-submenu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
    transition: all 0.15s ease;
}

.nav-submenu li a:hover {
    background: var(--bg-surface-hover);
    color: var(--brand-primary);
    padding-left: 24px;
}

.nav-chevron {
    font-size: 18px !important;
    vertical-align: middle;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-chevron {
    transform: rotate(180deg);
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-content {
    width: 100%;
    max-width: 700px;
    padding: 0 20px;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-overlay.active .search-overlay-content {
    transform: translateY(0);
}

.search-overlay .search-form {
    position: relative;
    width: 100%;
}

.search-overlay .search-field {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding: 15px 0;
    font-size: 2rem;
    color: white;
    outline: none;
    font-weight: 600;
    transition: border-color 0.3s ease;
}

.search-overlay .search-field:focus {
    border-color: var(--brand-primary);
}

.search-overlay .search-field::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.search-overlay .search-submit {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.search-overlay .search-submit:hover {
    opacity: 1;
}

.search-overlay .search-submit .material-symbols-rounded {
    font-size: 32px;
}

.search-overlay-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.search-overlay-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-overlay-close .material-symbols-rounded {
    font-size: 32px;
}

/* Search Toggle Button */
.search-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.search-toggle-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.search-toggle-btn .material-symbols-rounded {
    font-size: 20px;
}

/* Mock Tests CTA Button */
.nav-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: linear-gradient(135deg, var(--brand-primary), #059669);
    color: var(--clr-white) !important;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
    position: relative;
}

.nav-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35);
    background: linear-gradient(135deg, #059669, var(--brand-primary));
}

.nav-cta-btn .material-symbols-rounded {
    font-size: 18px;
}

.cta-badge {
    display: inline-block;
    background: #ef4444;
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 50px;
    letter-spacing: 0.5px;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* =========================================
   MOBILE DRAWER NAVIGATION
   ========================================= */

/* Backdrop Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5); /* Dimmed backdrop */
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Drawer Container */
.nav-drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: 75%; /* 3/4 width */
    max-width: 320px;
    height: 100%;
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    transform: translateX(100%); /* Start off-screen */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    border-left: 1px solid var(--border-light);
    pointer-events: auto; /* Ensure drawer receives clicks */
}

.nav-overlay.active .nav-drawer {
    transform: translateX(0); /* Slide in */
}

/* Drawer Header */
.drawer-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    height: 60px;
    flex-shrink: 0;
}

.drawer-brand {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-heading);
}

.drawer-close {
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.drawer-close:hover {
    background: var(--bg-page);
    color: var(--brand-danger);
}

.drawer-close .material-symbols-rounded {
    font-size: 24px;
}

/* Drawer Content */
.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    overscroll-behavior: contain;
}

/* Mobile Search */
.search-mobile {
    margin-bottom: 24px;
}

.search-mobile .search-form {
    display: flex;
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-page);
}

.search-mobile .search-field {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 0.9375rem;
    width: 100%;
}

.search-mobile .search-field:focus {
    outline: none;
    border-color: var(--brand-primary);
}

.search-mobile .search-submit {
    background: transparent;
    border: none;
    color: var(--brand-primary);
    padding: 0 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-mobile .search-submit .material-symbols-rounded {
    font-size: 20px;
}

/* Mobile Drawer Navigation */
.drawer-nav {
    display: flex;
    flex-direction: column;
    padding-bottom: 20px;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.drawer-link:hover {
    background: var(--bg-surface-hover);
    color: var(--brand-primary);
}

.drawer-link .material-symbols-rounded {
    font-size: 22px;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.drawer-link:hover .material-symbols-rounded {
    color: var(--brand-primary);
}

/* Action Link (Mock Test) */
/* Action Link (Mock Test) - Unified with Desktop */
/* Action Link (Mock Test) - Unified with Desktop */
.drawer-link.drawer-action-link {
    background: linear-gradient(135deg, var(--brand-primary), #059669) !important;
    border: none !important;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
    color: #ffffff !important; /* Force white text on parent */
}

.drawer-link.drawer-action-link:hover {
    background: linear-gradient(135deg, #059669, var(--brand-primary)) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35);
    color: #ffffff !important;
}

.drawer-link.drawer-action-link .action-text,
.drawer-link.drawer-action-link .action-icon,
.drawer-link.drawer-action-link .material-symbols-rounded {
    color: #ffffff !important; /* Force white on all children */
}

.drawer-link.drawer-action-link:hover .action-text,
.drawer-link.drawer-action-link:hover .action-icon {
    color: #ffffff !important;
}

.drawer-action-link .arrow {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
}

.badge-new {
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Accordion Styles */
.drawer-accordion {
    border-radius: 8px;
    margin-bottom: 4px;
    overflow: hidden;
}

.drawer-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
    font-weight: 500;
    color: var(--text-main);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.drawer-accordion-header::-webkit-details-marker {
    display: none;
}

.drawer-accordion[open] .drawer-accordion-header {
    background: var(--bg-surface-hover);
    color: var(--brand-primary);
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.accordion-title .material-symbols-rounded {
    font-size: 22px;
    color: var(--text-muted);
}

.drawer-accordion[open] .accordion-title .material-symbols-rounded {
    color: var(--brand-primary);
}

.drawer-accordion .chevron {
    font-size: 20px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.drawer-accordion[open] .chevron {
    transform: rotate(180deg);
    color: var(--brand-primary);
}

.drawer-accordion-content {
    background: rgba(0, 0, 0, 0.02);
    padding: 4px 16px 12px 50px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawer-accordion-content a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 0;
    transition: color 0.2s ease;
    display: block;
}

.drawer-accordion-content a:hover {
    color: var(--brand-primary);
    padding-left: 4px;
}

/* Drawer Footer */
.drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-page);
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
}

.drawer-copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* Specific styling for Theme Toggle in Drawer */
.drawer-footer .mobile-menu-toggle-btn {
    width: 100%;
    justify-content: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    color: var(--text-main);
    margin: 0;
}

.drawer-footer .mobile-menu-toggle-btn:hover {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
}
/* =========================================
   FOOTER STYLES (Mobile-First)
   ========================================= */
.site-footer {
    background-color: var(--bg-page);
    color: var(--text-main);
    margin-top: 30px;
    padding-top: 20px;
    transition: var(--theme-transition);
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    margin-left: 12px;
    margin-right: 12px;
    margin-bottom: 12px;
    transition: var(--theme-transition);
}

/* Social Icons at Top */
.footer-social-top {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-social-top a {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    color: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all var(--transition-base);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.footer-social-top a:hover {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    transform: translateY(-3px);
}

/* Footer Columns Grid */
.footer-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.footer-col {
    flex: 1;
}

/* Footer Branding (Logo + Text) */
.footer-branding {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-branding .custom-logo {
    max-width: 50px;
    max-height: 50px;
    flex-shrink: 0;
}

.footer-brand-text {
    flex: 1;
}

/* Removed misplaced header rule */

.footer-heading {
    color: var(--text-heading);
    font-weight: 700;
    font-size: 1.125rem;
    margin: 0 0 5px 0;
    line-height: 1.3;
    padding-right: 5px;
    /* Important: Prevents 'à¦²à¦¾' cutting */
    display: inline-block;
}

.footer-tagline {
    color: #059669;
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.3;
}

.footer-text {
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
    color: var(--text-muted);
}

.footer-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu-list li {
    margin-bottom: 12px;
}

.footer-menu-list a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-menu-list a i {
    font-size: 0.75rem;
    opacity: 0.7;
    transition: all var(--transition-base);
}

.footer-menu-list a:hover {
    color: #059669;
    transform: translateX(5px);
}

.footer-menu-list a:hover i {
    opacity: 1;
    color: var(--brand-primary-light);
}

/* Footer Links/Legal Headings */
.footer-links .footer-heading,
.footer-legal .footer-heading {
    color: var(--text-heading);
    font-weight: 700;
    font-size: 16px;
    margin: 0 0 12px 0;
    border-bottom: 2px solid var(--brand-primary);
    display: inline-block;
    padding-bottom: 4px;
}

/* Newsletter Form */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-input {
    padding: 12px 16px;
    font-size: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    background: rgba(255, 255, 255, 0.15);
}

.newsletter-submit {
    padding: 12px 24px;
    background: var(--brand-primary);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.newsletter-submit:hover {
    background: #1d4ed8;
}

/* Social Links */
.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.footer-social a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-primary);
    border-radius: 50%;
    color: #ffffff;
    font-size: 20px;
    transition: all var(--transition-base);
}

.footer-social a:hover {
    background: var(--brand-primary-dark);
    transform: translateY(-2px);
}

/* Copyright Bar */
.footer-copyright {
    background-color: transparent;
    text-align: center;
    padding: 20px 0 0 0;
    margin-top: 20px;
    border-top: 1px solid var(--border-light);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

html.dark-mode .footer-copyright {
    background-color: transparent;
    color: var(--text-muted);
    border-color: var(--border-color);
}

.footer-divider {
    margin: 0 10px;
    opacity: 0.5;
}

/* Back to Top Button */
/* Hide Astra's default scroll to top */
#ast-scroll-top {
    display: none !important;
}

/* Custom Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--brand-primary);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    padding: 0;
}

.back-to-top.visible {
    opacity: 1;
}

.back-to-top:hover {
    background: var(--brand-dark);
    transform: translateY(-5px);
}

/* =========================================
   HOMEPAGE STYLES - ENHANCED (Phase 2B)
   ========================================= */
.home-container {
    background: var(--bg-page);
    overflow-x: hidden;
}

/* ===== ENHANCED HERO SECTION ===== */
.hero-section-enhanced {
    background: var(--bg-page);
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--theme-transition);
}

/* Remove decorative gradient pattern */
.hero-section-enhanced::before {
    display: none;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-headline {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.hero-text-primary {
    font-family: var(--font-bengali);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-text-secondary {
    font-size: 1.25rem;
    font-weight: 600;
    color: #059669;
    letter-spacing: 0.5px;
}

.hero-description {
    font-family: var(--font-bengali);
    font-size: 1.125rem;
    color: var(--text-main);
    margin: 0 auto 40px;
    max-width: 600px;
    line-height: 1.6;
}

/* Hero Search - Enhanced */
.hero-search {
    max-width: 650px;
    margin: 0 auto;
}

.hero-search form {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border-radius: var(--radius-pill);
    padding: 6px 6px 6px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Old .search-icon-left removed */

.hero-search input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 14px 10px;
    background: transparent;
}

.hero-search input::placeholder {
    color: var(--text-light);
}

/* Updated for Material Symbols Icon */
.hero-search button {
    background: var(--brand-primary);
    color: var(--clr-white);
    border: none;
    width: 48px;
    /* Fixed width for circle */
    height: 48px;
    /* Fixed height for circle */
    border-radius: 50%;
    /* Make it circular */
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center the icon */
    transition: all var(--transition-base);
}

.hero-search button:hover {
    background: var(--brand-dark);
    transform: scale(1.05);
    /* Slight zoom effect */
}

.hero-search button .material-symbols-rounded {
    font-size: 24px;
}

.search-icon-left {
    color: var(--text-muted);
    font-size: 24px;
    /* Larger for Material Icon */
    margin-right: 8px;
    display: flex;
    /* Better alignment */
    align-items: center;
}

.hero-search button:hover {
    background: var(--brand-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.hero-search button i {
    font-size: 14px;
}

/* ===== STATISTICS SECTION - PILL SHAPED ===== */
.stats-section {
    background: transparent;
    padding: 20px 10px;
    border-bottom: none;
}

.stats-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    transition: all var(--transition-base);
    white-space: nowrap;
    width: max-content;
}

/* Center the 4th pill - Removed grid-column as we use flex now */

.stat-pill:hover {
    border-color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(5, 150, 105, 0.12);
}

.stat-pill-icon {
    font-size: 0.75rem;
    color: var(--brand-primary);
}

/* Fix specific alignment for the second icon (Category) which appears low */
.stat-pill:nth-child(2) .stat-pill-icon {
    transform: translateY(-1px);
}

.stat-pill-content {
    display: flex;
    align-items: baseline;
    gap: 3px;
    padding-top: 2px;
    /* Optically push text down to match icon center */
}

.stat-pill-number {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--brand-dark);
    line-height: 1;
    white-space: nowrap;
}

.stat-pill-label {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ===== EXAM BOARDS SECTION - 3x3 GRIDS ===== */
.exam-boards-section {
    padding: 12px 12px;
    background: transparent;
}

.exam-boards-flex {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.exam-board-block {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 16px;
    border: 1px solid var(--border-color);
}

.exam-board-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--brand-primary);
}

.exam-board-title .material-symbols-rounded {
    color: var(--brand-primary);
    font-size: 20px;
}

.exam-board-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.exam-grid-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 4px;
    background: var(--bg-surface-hover);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    text-align: center;
    color: var(--text-main);
}

.exam-grid-btn .material-symbols-rounded {
    font-size: 20px;
    color: var(--brand-primary);
}

.exam-grid-btn span:not([class]) {
    font-size: 0.75rem;
    font-weight: 600;
}

.exam-grid-btn:hover {
    background: var(--brand-primary);
    color: var(--clr-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.exam-grid-btn:hover .material-symbols-rounded {
    color: var(--clr-white);
}

@media (min-width: 768px) {
    .exam-boards-flex {
        flex-direction: row;
    }
    .exam-board-block {
        flex: 1;
    }
}

.exam-boards-footer {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.explore-all-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    background: var(--brand-primary);
    color: white;
    border-radius: var(--radius-pill);
    font-weight: 700;
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
    font-size: 1rem;
}

.explore-all-btn:hover {
    background: var(--brand-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.3);
    color: white;
}

.explore-all-btn .material-symbols-rounded {
    font-size: 20px;
}

/* ===== EXPLORE CATEGORIES PAGE ===== */
.explore-wrapper {
    background: var(--bg-page);
    min-height: 100vh;
}

.explore-hero {
    background: var(--gradient-hero);
    padding: 60px 20px;
    text-align: center;
    color: var(--clr-white);
    border-bottom: 5px solid var(--brand-primary);
    margin-bottom: 40px;
}

.explore-headline {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.explore-description {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.explore-layout-switcher {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

.layout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-pill);
    color: white;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.875rem;
    backdrop-filter: blur(8px);
}

.layout-btn .material-symbols-rounded {
    font-size: 18px;
}

.layout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.layout-btn.active {
    background: var(--bg-card);
    color: var(--brand-primary);
    border-color: var(--clr-white);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.explore-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 60px;
}

.explore-section {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.explore-section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--brand-primary);
}

.explore-section-icon {
    font-size: 24px;
    color: var(--brand-primary);
}

.explore-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0;
}

.explore-count-badge {
    font-size: 0.75rem;
    background: var(--brand-primary-light);
    color: var(--clr-white);
    padding: 2px 10px;
    border-radius: 50px;
    font-weight: 600;
}

/* Grids */
.explore-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* Explore Button - similar to exam-grid-btn */
.explore-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 8px;
    background: var(--bg-surface-hover);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    text-align: center;
    color: var(--text-main);
    text-decoration: none;
}

.explore-btn .material-symbols-rounded {
    font-size: 24px;
    color: var(--brand-primary);
    transition: color var(--transition-base);
}

.explore-btn-label {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
}

.explore-btn-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.explore-btn:hover {
    background: var(--brand-primary);
    color: var(--clr-white);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(5, 150, 105, 0.25);
    border-color: var(--brand-primary);
}

.explore-btn:hover .material-symbols-rounded,
.explore-btn:hover .explore-btn-count {
    color: var(--clr-white);
}

/* Subgroups */
.explore-subgroup {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px dashed var(--border-color);
}

.explore-subgroup-header,
.explore-nested-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Ensure text and link wrap on small screens */
    margin-bottom: 16px;
    gap: 16px;
}

.explore-subgroup-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 0; /* Override margin since header handles it */
    display: flex;
    align-items: center;
    gap: 8px;
}

.explore-subgroup-link,
.explore-nested-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 12px;
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    transition: all var(--transition-base);
}

.explore-subgroup-link:hover,
.explore-nested-link:hover {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    background: rgba(5, 150, 105, 0.05);
}

/* =========================================
   LAYOUTS: CHIPS & BENTO
   ========================================= */

/* CHIPS: Flowing Pills Layout */
.layout-chips .explore-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.layout-chips .explore-btn {
    flex-direction: row;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    gap: 8px;
    min-width: 0;
    width: auto;
}

.layout-chips .explore-btn .material-symbols-rounded {
    font-size: 18px;
}

.layout-chips .explore-btn-count {
    background: rgba(0,0,0,0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

.layout-chips .explore-btn:hover .explore-btn-count {
    background: rgba(255,255,255,0.2);
}

/* BENTO: Modern Card Layout */
.layout-bento .explore-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.layout-bento .explore-btn {
    align-items: flex-start;
    text-align: left;
    padding: 20px;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

.layout-bento .explore-btn::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--brand-primary);
    opacity: 0.2;
}

.layout-bento .explore-btn-label {
    font-size: 1rem;
    margin-top: 4px;
}

.layout-bento .explore-btn-count {
    margin-top: auto;
    font-size: 0.8rem;
    opacity: 0.7;
}

.layout-bento .explore-btn:hover {
    background: var(--bg-surface);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.layout-bento .explore-btn:hover .explore-btn-label,
.layout-bento .explore-btn:hover .explore-btn-count {
    color: var(--brand-primary);
}

.layout-bento .explore-btn:hover::after {
    opacity: 1;
}

.explore-subgroup-badge {
    background: var(--brand-primary);
    color: white;
    font-size: 0.75rem;
    padding: 0 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 18px;
    height: 18px;
}

.explore-subgroup-link .material-symbols-rounded,
.explore-nested-link .material-symbols-rounded {
    font-size: 16px;
}

.explore-count-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    transition: all var(--transition-base);
}

a.explore-count-badge:hover {
    background: var(--brand-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

a.explore-count-badge .material-symbols-rounded {
    font-size: 14px;
}

.explore-nested-header {
    margin-bottom: 12px;
}

.explore-nested-title {
    margin-bottom: 0;
}

.explore-subgroup-title::before {
    content: "";
    width: 4px;
    height: 16px;
    background: var(--brand-primary);
    border-radius: 2px;
}

.explore-nested-group {
    grid-column: 1 / -1;
    margin-top: 12px;
    padding: 12px;
    background: rgba(5, 150, 105, 0.03);
    border-radius: var(--radius-sm);
}

.explore-nested-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* responsive grid */
@media (min-width: 768px) {
    .explore-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
    
    .explore-headline {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .explore-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ===== CONTENT SECTION ===== */
.content-section {
    padding: 12px 12px;
    background: transparent;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.section-heading {
    font-size: 19px;
    font-weight: var(--font-bold);
    color: var(--brand-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-heading i {
    color: var(--brand-primary);
    font-size: 16px;
}

.view-all-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition-base);
}

.view-all-link i {
    font-size: 12px;
}

.view-all-link:hover {
    gap: 10px;
    color: var(--brand-primary-dark);
}

/* ===== ARCHIVE PAGE ===== */
.archive-wrapper {
    background: var(--bg-page);
    min-height: 100vh;
    padding: 20px 0;
}

.archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.archive-header {
    margin-bottom: 24px;
    padding: 24px 20px;
    background: var(--bg-surface);
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.archive-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--brand-dark);
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.archive-title-text {
    display: flex;
    align-items: center;
    gap: 10px;
}

.archive-title .material-symbols-rounded {
    font-size: 2rem;
    color: var(--brand-primary);
}

.archive-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 600px;
    line-height: 1.5;
}

.archive-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 48px;
}

.no-posts {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.no-posts p {
    font-size: 1.125rem;
    margin-top: 16px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination .page-numbers:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.pagination .page-numbers.current {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
}

.pagination .page-numbers .material-symbols-rounded {
    font-size: 20px;
}

/* ===== POST GRID ===== */
.post-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0;
}

/* Post Card - Default (List View / Semi-Detached) */
.post-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden; /* Keeps content inside rounded corners */
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    padding: 16px; /* Spacing inside the card */
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--brand-primary);
}

.post-card-link {
    display: flex;
    gap: 16px;
    align-items: center; /* Center vertically */
    text-decoration: none;
    color: inherit;
    width: 100%;
}

/* Semi-Detached Thumbnail */
.post-thumbnail {
    width: 110px; /* Smaller width */
    flex-shrink: 0;
    border-radius: 8px; /* Rounded corners for the image itself */
    overflow: hidden;
    line-height: 0;
    align-self: center; /* Center within flex item */
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    object-fit: contain; /* Respect aspect ratio */
    /* Removed aspect-ratio constraint */
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.03);
}

.post-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    min-height: 105px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-light), var(--bg-surface-hover));
}

.post-thumbnail-placeholder .material-symbols-rounded {
    font-size: 32px;
    color: var(--text-light);
    opacity: 0.5;
}

/* Card Content */
.post-card-content {
    flex: 1;
    background: transparent; /* No bg since parent has it */
    padding: 0; /* No padding since parent has it */
    border: none;
    position: relative;
    width: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align content to top */
    transition: none; /* remove transition from here */
}

.post-card:hover .post-card-content {
    border-color: transparent;
    box-shadow: none;
}

/* Category & Tags Row */
.post-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.post-category {
    display: inline-block;
    background: var(--brand-accent);
    color: var(--clr-white);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.post-tag {
    display: inline-block;
    background: rgba(244, 63, 94, 0.12);
    color: var(--brand-accent);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.post-card-title {
    font-size: 1.1rem;
    font-weight: var(--font-bold);
    color: var(--text-heading);
    margin: 0 0 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.post-card:hover .post-card-title {
    color: var(--brand-primary);
}

.post-card-excerpt {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-date {
    display: block;
    font-size: 10px;
    color: var(--text-light);
    margin: 0;
    padding: 0;
    font-weight: 500;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .post-card-title {
        font-size: 16px !important;
    }
    
    .post-date {
        font-size: 11px !important;
    }

    .post-card {
        padding: 12px;
    }
}

/* ===== GRID VIEW (Visual Toggle) OVERRIDES ===== */
.post-grid.vertical-layout,
.archive-grid.vertical-layout {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.post-grid.vertical-layout .post-card,
.archive-grid.vertical-layout .post-card {
    padding: 0; /* Reset padding for grid view */
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.post-grid.vertical-layout .post-card:hover,
.archive-grid.vertical-layout .post-card:hover {
    border-color: var(--brand-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.post-grid.vertical-layout .post-card-link,
.archive-grid.vertical-layout .post-card-link {
    display: block; /* Stack vertically */
    gap: 0;
}

.post-grid.vertical-layout .post-thumbnail,
.archive-grid.vertical-layout .post-thumbnail {
    width: 100%;
    border-radius: 0; /* Full width means no corners on image usually, or only top */
    overflow: hidden;
}

.post-grid.vertical-layout .post-card-content,
.archive-grid.vertical-layout .post-card-content {
    background: var(--bg-surface);
    padding: 16px; /* Restore padding for grid content */
    border: none;
}


.archive-grid.vertical-layout .post-thumbnail {
    width: 100%;
    overflow: hidden;
    flex: none;
    container-type: inline-size;
    background: var(--bg-surface-hover);
}

.post-grid.vertical-layout .post-thumbnail img,
.archive-grid.vertical-layout .post-thumbnail img {
    width: 100%;
    height: auto;
    max-height: 56.25cqi; /* 9/16 of width = 16:9 ratio cap */
    object-fit: contain;
}

.post-grid.vertical-layout .post-card-content,
.archive-grid.vertical-layout .post-card-content {
    position: relative;
    width: 100%;
    padding: 14px 16px;
    height: auto;
    justify-content: flex-start;
}

.post-grid.vertical-layout .post-card-title,
.archive-grid.vertical-layout .post-card-title {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.post-grid.vertical-layout .post-card-excerpt,
.archive-grid.vertical-layout .post-card-excerpt {
    margin-bottom: 8px;
}

/* Layout Toggle Button */
.layout-toggle-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: 4px 12px;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.layout-toggle-btn .material-symbols-rounded {
    font-size: 16px;
}

.layout-toggle-btn:hover,
.layout-toggle-btn.active {
    background: var(--bg-surface-hover);
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.875rem;
    color: var(--text-light);
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-meta i {
    font-size: 14px;
}

/* ===== SIDEBAR ===== */
.sidebar-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.sidebar-widget {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--brand-primary);
}

.widget-title .material-symbols-rounded {
    color: var(--brand-primary);
    font-size: 24px;
}

.category-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Explicitly left align */
    gap: 12px;
    padding: var(--space-2);
    background: var(--bg-surface-hover);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-main);
    font-weight: var(--font-semibold);
    transition: all var(--transition-base);
    text-align: left;
    /* Ensure text is left aligned */
}

.category-link:hover {
    background: var(--brand-primary);
    color: var(--clr-white);
    transform: translateX(5px);
}

.category-link .material-symbols-rounded:first-child {
    font-size: 20px;
    color: var(--brand-primary);
}

.category-link:hover .material-symbols-rounded:first-child {
    color: var(--clr-white);
}

.category-link span:not([class]) {
    flex: 1;
    text-align: left;
    /* Force text left */
}

.category-link .material-symbols-rounded:last-child {
    font-size: 18px;
    opacity: 0.6;
}

/* =========================================
   SINGLE POST STYLES (Mobile-First)
   ========================================= */
.single-post-wrapper {
    background: var(--bg-card);
    padding-bottom: 80px;
}

/* Force dark mode for article content to override potential parent theme styles */
.single-post-wrapper article.paper-sheet,
.single-post-wrapper .entry-content {
    background-color: var(--bg-card) !important;
    color: var(--text-main);
}

.reader-container {
    max-width: 100%;
    padding: 0;
}

/* Breadcrumb Navigation */
.breadcrumbs {
    padding: 12px 20px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.breadcrumbs a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: var(--brand-primary-dark);
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: var(--text-light);
}

.breadcrumb-current {
    color: var(--text-main);
    font-weight: 500;
}

.paper-sheet {
    background: var(--bg-card);
    padding: 20px;
    border: none;
    box-shadow: none;
}

/* Post Header */
.post-header {
    margin-top: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.post-cat-pill {
    display: inline-block;
    background: #eff6ff;
    color: var(--brand-primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.entry-title {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--brand-dark);
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.post-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.meta-divider {
    margin: 0 8px;
    opacity: 0.5;
}

/* Post Content */
.entry-content {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-main);
}

/* Social Share Buttons */
.social-share {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 24px 0;
    margin-top: 32px;
    border-top: 1px solid var(--border-light);
}

.share-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-main);
    margin-right: 8px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-main);
}

.share-btn .material-symbols-rounded {
    font-size: 18px;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.share-facebook:hover {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

.share-whatsapp:hover {
    background: #25d366;
    color: white;
    border-color: #25d366;
}

.share-twitter:hover {
    background: #1da1f2;
    color: white;
    border-color: #1da1f2;
}


.entry-content p {
    margin-bottom: 1.5em;
}

.entry-content img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 20px 0;
}

.entry-content h2 {
    font-size: 1.5rem;
    margin-top: 2em;
    margin-bottom: 0.5em;
    font-weight: 700;
    color: var(--brand-dark);
    letter-spacing: -0.01em;
}

.entry-content h3 {
    font-size: 1.25rem;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 700;
    color: var(--brand-dark);
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.entry-content li {
    margin-bottom: 0.5em;
}

.entry-content a {
    color: var(--brand-primary);
    text-decoration: underline;
}

.entry-content blockquote {
    border-left: 4px solid var(--brand-primary);
    padding-left: 20px;
    margin: 1.5em 0;
    font-style: italic;
    color: var(--text-muted);
}

/* Related Posts */
.related-posts {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-color);
}

.related-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    color: var(--brand-dark);
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.related-card {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.related-card a {
    display: block;
    color: inherit;
}

.related-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.related-content {
    padding: 15px;
}

.related-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--brand-dark);
}

.related-excerpt {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* Post Navigation */
.post-navigation {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.nav-link {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: var(--clr-light-bg);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.nav-link:hover {
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--brand-primary);
    font-weight: 700;
    margin-bottom: 5px;
}

.nav-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--brand-dark);
}

/* =========================================
   TABLET+ (768px) RESPONSIVE STYLES
   ========================================= */
@media (min-width: 768px) {

    /* Header */
    .menu-toggle {
        display: none;
    }

    .nav-desktop {
        display: block;
    }

    .nav-actions {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .search-desktop {
        position: relative;
        display: flex;
        align-items: center;
    }

    .nav-menu {
        display: flex;
        gap: 24px;
        list-style: none;
        margin: 0;
        padding: 0;
        align-items: center;
    }

    .nav-menu > li > a {
        font-weight: 600;
        font-size: 0.875rem;
        color: var(--text-main);
        transition: color 0.2s ease;
        display: flex;
        align-items: center;
        gap: 2px;
        padding: 8px 0;
    }

    .nav-menu > li > a:hover {
        color: var(--brand-primary);
    }

    /* Footer */
    .footer-columns {
        display: grid;
        grid-template-columns: 1.5fr 1fr 1fr;
        gap: 40px;
        align-items: flex-start;
    }

    .footer-col {
        min-width: auto;
    }

    /* Homepage - Phase 2B Enhanced */
    .hero-section-enhanced {
        padding: 120px 40px;
    }

    .hero-text-primary {
        font-size: var(--text-6xl);
    }

    .hero-text-secondary {
        font-size: var(--text-2xl);
    }

    .hero-description {
        font-size: var(--text-xl);
    }

    .hero-search {
        max-width: 700px;
    }

    /* Statistics - 4 Pills in a Row */
    .stats-pills {
        display: flex;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 16px;
        max-width: 1100px;
        overflow-x: visible;
        padding: 0;
    }

    .stat-pill {
        flex: 0 0 auto;
    }

    /* Content Grid - Full Width Layout */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Post Grid - 2 Columns */
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    /* Archive Grid - 2 Columns */
    .archive-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    /* Post Thumbnail - horizontal layout */
    .post-thumbnail {
        width: 30%;
    }

    .post-card-content {
        width: 70%;
    }

    /* Category Links Grid on Desktop */
    .category-links {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    /* Sidebar Sticky */
    .sidebar-column {
        position: sticky;
        top: 100px;
        align-self: flex-start;
    }


    /* Tools - Vertical Layout on Desktop */
    .tool-card {
        display: block;
        text-align: center;
        padding: 30px;
    }

    .tool-icon {
        font-size: 2.5rem;
        margin-bottom: 15px;
        display: block;
    }

    .tool-info h3 {
        margin-bottom: 8px;
    }

    .tool-info p {
        margin-bottom: 15px;
    }

    .tool-arrow {
        display: none;
    }

    /* Single Post */
    .single-post-wrapper {
        background: var(--bg-page);
        padding-top: 60px;
    }

    .reader-container {
        max-width: 800px;
        margin: 0 auto;
        padding: 0 20px;
    }

    .paper-sheet {
        padding: 60px 80px;
        border-radius: 20px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
        border: 1px solid rgba(0, 0, 0, 0.02);
    }

    .post-header {
        text-align: center;
        padding-bottom: 40px;
        border-bottom: 1px solid #eaeaea;
    }

    .entry-title {
        font-size: 2.8rem;
    }

    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .post-navigation {
        flex-direction: row;
        justify-content: space-between;
    }

    .nav-link {
        flex: 1;
    }

    .nav-prev {
        margin-right: 10px;
    }

    .nav-next {
        margin-left: 10px;
        text-align: right;
    }
}

/* =========================================
   LARGE DESKTOP (1024px+)
   ========================================= */
@media (min-width: 1024px) {
    .container {
        padding: 0 40px;
    }

    .hero-headline {
        font-size: 4rem;
    }
}

/* =========================================
   ANIMATIONS & TRANSITIONS
   ========================================= */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}


/* =========================================
   SEARCH AUTOCOMPLETE
   ========================================= */
.search-form {
    position: relative;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    margin-top: 8px;
    z-index: 1000;
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
    text-align: left;
}

.search-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-results-list li a {
    display: block;
    padding: 12px 16px;
    color: var(--text-main);
    text-decoration: none;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.2s ease;
    font-size: 0.95rem;
}

.search-results-list li:last-child a {
    border-bottom: none;
}

.search-results-list li a:hover {
    background: var(--bg-surface-hover);
    color: var(--brand-primary);
}

.search-loading,
.search-error,
.search-no-results {
    padding: 12px 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

/* Scrollbar for results */
.search-results-dropdown::-webkit-scrollbar {
    width: 6px;
}

.search-results-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.search-results-dropdown::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}
/* =========================================
   SCROLL ANIMATIONS
   ========================================= */
.animate-transition {
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.animate-hidden {
    opacity: 0;
    transform: translateY(20px);
}

.animate-visible {
    opacity: 1;
    transform: translateY(0);
}


/* =========================================
   SIDEBAR & TWO-COLUMN LAYOUT
   ========================================= */

/* Two-column layout for posts and pages */
.with-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

@media (min-width: 1024px) {
    .with-sidebar {
        grid-template-columns: 1fr 320px;
        gap: 60px;
    }
}

/* Main content area */
.main-content-area {
    min-width: 0; /* Prevent overflow */
}

/* Sidebar */
.sidebar {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 24px;
}

@media (min-width: 1024px) {
    .sidebar {
        position: sticky;
        top: 100px;
        align-self: flex-start;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
}

/* Widget Styles */
.widget {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-light);
}

.widget:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget ul li {
    margin-bottom: 12px;
}

.widget ul li a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s ease;
    display: block;
    padding: 8px 0;
}

.widget ul li a:hover {
    color: var(--brand-primary);
}

/* Page content layout */
.page-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 40px 20px;
}

@media (min-width: 1024px) {
    .page-container {
        grid-template-columns: 1fr 320px;
        gap: 60px;
    }
}

.page-content-area {
    min-width: 0;
}

.page-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border-light);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-heading);
    margin: 0;
}

/* =========================================
   404 ERROR PAGE
   ========================================= */
.error-404-wrapper {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.error-404-container {
    max-width: 600px;
    margin: 0 auto;
}

.error-404-content {
    text-align: center;
}

.error-icon {
    margin-bottom: 24px;
}

.error-icon .material-symbols-rounded {
    font-size: 120px;
    color: var(--brand-primary);
    opacity: 0.3;
}

.error-title {
    font-size: 6rem;
    font-weight: 900;
    color: var(--text-heading);
    margin: 0 0 16px 0;
    line-height: 1;
}

.error-subtitle {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0 0 16px 0;
}

.error-description {
    font-size: 1.125rem;
    color: var(--text-main);
    margin-bottom: 32px;
    line-height: 1.6;
}

.error-search {
    margin-bottom: 48px;
}

.error-search .search-form {
    max-width: 500px;
    margin: 0 auto;
}

.error-links {
    margin-top: 48px;
}

.error-links h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 20px;
}

.error-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.error-links li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.2s ease;
}

.error-links li a:hover {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.error-links li a .material-symbols-rounded {
    font-size: 24px;
    color: var(--brand-primary);
    transition: color 0.2s ease;
}

.error-links li a:hover .material-symbols-rounded {
    color: white;
}

/* =========================================
   RICH DRAWER COMPONENTS
   ========================================= */

/* Drawer Navigation Container */
.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Individual Links */
.drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.drawer-link:hover {
    background: var(--bg-page);
    color: var(--brand-primary);
    transform: translateX(4px);
}

.drawer-link .material-symbols-rounded {
    font-size: 22px;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.drawer-link:hover .material-symbols-rounded {
    color: var(--brand-primary);
}

/* Highlighted Action Link (Mock Test) */
.drawer-action-link {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    color: white !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    margin-bottom: 12px;
}

.drawer-action-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.drawer-action-link .material-symbols-rounded {
    color: white !important;
}

.drawer-action-link .arrow {
    margin-left: auto;
}

.action-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

/* New Badge */
.badge-new {
    font-size: 0.7rem;
    background: white;
    color: var(--brand-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Accordion Styles */
.drawer-accordion {
    border-radius: 8px;
    overflow: hidden;
}

.drawer-accordion[open] {
    background: var(--bg-page);
}

.drawer-accordion-header {
    list-style: none;
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s ease;
    color: var(--text-main);
    font-weight: 500;
}

.drawer-accordion-header::-webkit-details-marker {
    display: none;
}

.drawer-accordion-header:hover {
    color: var(--brand-primary);
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.accordion-title .material-symbols-rounded {
    font-size: 22px;
    color: var(--text-muted);
}

.drawer-accordion-header:hover .accordion-title .material-symbols-rounded {
    color: var(--brand-primary);
}

/* Chevron Rotation */
.drawer-accordion .chevron {
    transition: transform 0.3s ease;
    font-size: 20px;
    color: var(--text-muted);
}

.drawer-accordion[open] .chevron {
    transform: rotate(180deg);
}

/* Accordion Content */
.drawer-accordion-content {
    padding: 0 0 12px 0;
    display: flex;
    flex-direction: column;
}

.drawer-accordion-content a {
    padding: 10px 16px 10px 50px; /* Indented */
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.95rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.drawer-accordion-content a:hover {
    color: var(--brand-primary);
    background: rgba(16, 185, 129, 0.05);
    border-left-color: var(--brand-primary);
}

/* =========================================
   UPDATED DRAWER FOOTER (SQUARE BUTTON)
   ========================================= */

.drawer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-page);
    border-top: 1px solid var(--border-light);
}

.drawer-copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Square Theme Button */
.drawer-footer .mobile-menu-toggle-btn {
    width: 42px !important;
    height: 42px !important;
    border-radius: 10px !important; /* Soft Square */
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-light) !important;
    color: var(--text-main) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.drawer-footer .mobile-menu-toggle-btn:hover {
    background: var(--brand-primary) !important;
    color: white !important;
    border-color: var(--brand-primary) !important;
    transform: rotate(90deg); /* Playful rotation */
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.drawer-footer .mobile-menu-toggle-btn .material-symbols-rounded {
    font-size: 22px;
}

/* =========================================
   EXPLORE PAGE — COLOR-CODED PEEK CARDS
   ========================================= */

/* --- Section Color Palette --- */
.section-emerald { --section-color: #059669; --section-bg: #ecfdf5; --section-light: #d1fae5; }
.section-blue    { --section-color: #3b82f6; --section-bg: #eff6ff; --section-light: #dbeafe; }
.section-purple  { --section-color: #8b5cf6; --section-bg: #f5f3ff; --section-light: #ede9fe; }
.section-rose    { --section-color: #f43f5e; --section-bg: #fff1f2; --section-light: #ffe4e6; }
.section-amber   { --section-color: #b45309; --section-bg: #fffbeb; --section-light: #fef3c7; }
.section-teal    { --section-color: #0f766e; --section-bg: #f0fdfa; --section-light: #ccfbf1; }
.section-indigo  { --section-color: #4f46e5; --section-bg: #eef2ff; --section-light: #e0e7ff; }
.section-orange  { --section-color: #c2410c; --section-bg: #fff7ed; --section-light: #ffedd5; }
.section-cyan    { --section-color: #0e7490; --section-bg: #ecfeff; --section-light: #cffafe; }
.section-slate   { --section-color: #64748b; --section-bg: #f8fafc; --section-light: #f1f5f9; }

/* --- Hero Section --- */
.explore-hero {
    padding: 56px 20px 36px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-page) 0%, var(--bg-surface) 100%);
}

.explore-headline {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

.explore-description {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin: 0 auto;
    max-width: 540px;
    line-height: var(--leading-relaxed);
}

/* --- Container --- */
.explore-container {
    padding: var(--space-5) var(--space-2) var(--space-10);
    max-width: var(--container-width);
    margin: 0 auto;
}

/* =========================================
   SECTION CARDS (Color-Coded)
   ========================================= */
.explore-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--section-color, var(--brand-primary));
    border-radius: 4px var(--radius-xl) var(--radius-xl) 4px;
    padding: var(--space-3);
    margin-bottom: var(--space-3);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
}

.explore-section:hover {
    box-shadow: var(--shadow-md);
}

/* --- Section Header --- */
.explore-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border-light);
}

.explore-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.explore-header-right {
    display: flex;
    align-items: center;
}

.explore-section-icon {
    font-size: 26px;
    color: var(--section-color, var(--brand-primary));
    background: var(--section-light, rgba(5, 150, 105, 0.08));
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.explore-section-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--text-heading);
    margin: 0;
    line-height: var(--leading-snug);
}

/* --- Count Badge --- */
.explore-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--section-bg, var(--bg-page));
    border: 1px solid var(--section-light, var(--border-light));
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--section-color, var(--text-muted));
    text-decoration: none;
    transition: all var(--transition-base);
}

.explore-count-badge:hover {
    background: var(--section-light, var(--bg-page));
    color: var(--section-color, var(--brand-primary));
    transform: translateY(-1px);
}

.explore-count-badge .material-symbols-rounded {
    font-size: 16px;
}

/* =========================================
   ITEM CARDS (Leaf Category Buttons)
   ========================================= */
.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.explore-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 12px 18px;
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.explore-btn:hover {
    background: var(--section-color, var(--brand-primary));
    border-color: var(--section-color, var(--brand-primary));
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.explore-btn .material-symbols-rounded {
    color: var(--text-light);
    font-size: 22px;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.explore-btn:hover .material-symbols-rounded {
    color: white;
}

.explore-btn:hover .explore-btn-label {
    color: white;
}

.explore-btn:hover .explore-btn-count {
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.explore-btn-label {
    flex: 1;
    font-weight: var(--font-semibold);
    color: var(--text-heading);
    font-size: var(--text-base);
    line-height: var(--leading-snug);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.explore-btn-count {
    font-size: var(--text-xs);
    color: var(--text-muted);
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-weight: var(--font-bold);
    flex-shrink: 0;
}

/* =========================================
   PEEK CARDS (Subgroup Containers)
   ========================================= */
.explore-peek-card {
    background: var(--section-bg, var(--bg-page));
    border: 1px solid var(--section-light, var(--border-light));
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 12px;
    transition: box-shadow var(--transition-base);
}

.explore-peek-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Peek Card Header (clickable link) */
.peek-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    text-decoration: none;
    color: var(--text-heading);
    border-bottom: 1px dashed var(--section-light, var(--border-light));
    transition: background var(--transition-base);
}

.peek-card-header:hover {
    background: var(--section-light, var(--bg-surface-hover));
}

.peek-card-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.peek-card-info .material-symbols-rounded {
    font-size: 24px;
    color: var(--section-color, var(--brand-primary));
}

.peek-card-title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--text-heading);
    margin: 0;
}

/* Prominent post count badge */
.peek-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--section-color, var(--brand-primary));
    color: white;
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    white-space: nowrap;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.peek-card-header:hover .peek-card-badge {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.peek-card-badge .material-symbols-rounded {
    font-size: 16px;
}

/* Peek Chips (child categories preview) */
.peek-card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 20px;
}

.peek-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-main);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.peek-chip:hover {
    border-color: var(--section-color, var(--brand-primary));
    color: var(--section-color, var(--brand-primary));
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.peek-chip-count {
    background: var(--section-light, var(--brand-light));
    color: var(--section-color, var(--brand-primary));
    padding: 1px 7px;
    border-radius: 6px;
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
}

/* Peek Card Body */
.peek-card-body {
    padding: 4px 0;
}

/* Chip Groups (sub-subgroups) */
.peek-chip-group {
    margin: 6px 14px 10px;
    border-left: 3px solid var(--section-color, var(--brand-primary));
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    background: var(--section-bg, var(--bg-page));
    overflow: hidden;
}

.peek-chip-group-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--section-color, var(--brand-primary));
    transition: all 0.2s ease;
    border-bottom: 1px dashed var(--section-light, var(--border-light));
}

.peek-chip-group-label:hover {
    background: var(--section-light, var(--bg-surface));
}

.peek-chip-group-label .material-symbols-rounded {
    font-size: 18px;
    color: var(--section-color, var(--brand-primary));
}

.peek-chip-group-count {
    background: var(--section-color, var(--brand-primary));
    color: white;
    padding: 1px 8px;
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    margin-left: auto;
}

.peek-chip-group .peek-card-chips {
    padding: 10px 14px;
    background: var(--bg-page);
}

/* =========================================
   DARK MODE
   ========================================= */
html.dark-mode .explore-hero {
    background: linear-gradient(180deg, var(--brand-dark) 0%, var(--bg-page) 100%);
}

html.dark-mode .explore-section {
    background: var(--bg-surface);
    border-color: var(--border-color);
    border-left-color: var(--section-color);
}

html.dark-mode .explore-section-icon {
    background: rgba(255, 255, 255, 0.08);
}

html.dark-mode .explore-btn {
    background: var(--bg-surface-hover);
    border-color: var(--border-color);
}

html.dark-mode .explore-btn:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

html.dark-mode .explore-btn-count {
    background: var(--bg-surface);
    border-color: var(--border-color);
}

html.dark-mode .explore-count-badge {
    background: var(--bg-surface-hover);
    border-color: var(--border-color);
}

html.dark-mode .explore-peek-card {
    background: var(--bg-surface-hover);
    border-color: var(--border-color);
}

html.dark-mode .peek-card-header {
    border-bottom-color: var(--border-color);
}

html.dark-mode .peek-card-header:hover {
    background: rgba(255, 255, 255, 0.04);
}

html.dark-mode .peek-chip {
    background: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-main);
}

html.dark-mode .peek-chip-count {
    background: rgba(255, 255, 255, 0.08);
}

/* =========================================
   RESPONSIVE — 3 Progressive Breakpoints
   ========================================= */

/* --- Tablet (≤768px) --- */
@media (max-width: 768px) {
    .explore-hero {
        padding: 32px 16px 20px;
    }

    .explore-headline {
        font-size: 1.6rem;
    }

    .explore-description {
        font-size: 0.9rem;
    }

    .explore-container {
        padding: var(--space-2) var(--space-1) var(--space-5);
    }

    .explore-section {
        padding: 16px 14px;
        border-radius: 4px 14px 14px 4px;
        margin-bottom: 16px;
    }

    .explore-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .explore-header-right {
        width: 100%;
    }

    .explore-count-badge {
        width: 100%;
        justify-content: center;
    }

    .explore-section-icon {
        width: 36px;
        height: 36px;
        font-size: 20px;
        border-radius: 10px;
    }

    .explore-section-title {
        font-size: 1.15rem;
    }

    .explore-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-bottom: 8px;
    }

    .explore-btn {
        flex-direction: row;
        flex-wrap: nowrap;
        padding: 8px 14px;
        gap: 4px;
        min-height: 36px;
        border-radius: var(--radius-pill);
        overflow: hidden;
    }

    .explore-btn .material-symbols-rounded {
        font-size: 14px;
        flex-shrink: 0;
    }

    .explore-btn-label {
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .explore-btn-count {
        padding: 0px 4px;
        font-size: 0.6rem;
        flex-shrink: 0;
    }

    .explore-peek-card {
        border-radius: 12px;
        margin-bottom: 8px;
    }

    .peek-card-header {
        padding: 12px 14px;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .peek-card-info {
        gap: 8px;
        flex: 1;
        min-width: 0;
    }

    .peek-card-info .material-symbols-rounded {
        font-size: 20px;
    }

    .peek-card-title {
        font-size: 0.95rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .peek-card-badge {
        padding: 5px 10px;
        font-size: 0.75rem;
        flex-shrink: 0;
    }

    .peek-card-chips {
        padding: 10px 14px;
        gap: 6px;
    }

    .peek-chip {
        padding: 5px 10px;
        font-size: 0.75rem;
        gap: 4px;
        min-height: 32px;
    }

    .peek-chip-count {
        padding: 0px 5px;
        font-size: 0.65rem;
    }
}

/* --- Small Phone (≤480px) --- */
@media (max-width: 480px) {
    .explore-hero {
        padding: 24px 12px 16px;
    }

    .explore-headline {
        font-size: 1.35rem;
        margin-bottom: 6px;
    }

    .explore-description {
        font-size: 0.85rem;
    }

    .explore-container {
        padding: 12px 6px 40px;
    }

    .explore-section {
        padding: 12px 10px;
        margin-bottom: 12px;
        border-radius: 4px 12px 12px 4px;
    }

    .explore-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .explore-btn {
        flex-direction: row;
        flex-wrap: nowrap;
        padding: 8px 12px;
        gap: 3px;
        border-radius: var(--radius-pill);
        overflow: hidden;
    }

    .explore-btn .material-symbols-rounded {
        font-size: 12px;
        flex-shrink: 0;
    }

    .explore-btn-label {
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .explore-btn-count {
        padding: 0px 4px;
        font-size: 0.55rem;
        flex-shrink: 0;
    }

    .peek-card-chips {
        padding: 8px 10px;
        gap: 5px;
    }

    .peek-chip {
        padding: 5px 8px;
        font-size: 0.7rem;
    }
}

/* --- Ultra-Small (≤360px) --- */
@media (max-width: 360px) {
    .explore-headline {
        font-size: 1.2rem;
    }

    .explore-section {
        padding: 10px 8px;
    }

    .explore-section-title {
        font-size: 1rem;
    }

    .explore-section-icon {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}


/* Layout Toggle Container */
.layout-toggle-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

/* Full Width Footer on Desktop */
@media (min-width: 768px) {
    .site-footer {
        background-color: var(--bg-surface);
        border-top: 1px solid var(--border-light);
        margin-top: 0 !important; /* Removed 60px uncolored margin */
        padding-top: 40px;
    }

    .footer-container {
        background: transparent;
        border: none;
        border-radius: 0;
        margin: 0 auto;
        padding: 0 20px;
        max-width: var(--container-width);
        box-shadow: none;
    }
}

/* Search Page Styles */
/* Search Page Styles - Minimal */
.search-results-text {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.search-refine-container {
    max-width: 500px;
    margin: 15px 0 10px; /* Reduced bottom margin */
}

.search-refine-container .hero-search form {
    box-shadow: none;
    border: 1px solid var(--border-color);
    padding: 3px 3px 3px 15px; /* Reduced vertical padding */
}

.search-refine-container .hero-search input {
    padding: 8px 10px; /* Reduced input height */
    font-size: 14px; /* Slightly smaller text */
}

.search-refine-container .hero-search button {
    width: 36px; /* Reduced button size */
    height: 36px;
}

.search-refine-container .hero-search button .material-symbols-rounded {
    font-size: 18px; /* Reduced icon size */
}

.search-icon-left {
    color: var(--text-light);
    margin-right: -10px;
    z-index: 1;
}

/* Search Term Suggestions */
.search-term-suggestions {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.suggestions-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.term-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.term-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 13px;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.2s ease;
}

.term-pill:hover {
    background: var(--bg-surface-hover);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    transform: translateY(-1px);
}

.term-pill .material-symbols-rounded {
    font-size: 16px;
    opacity: 0.7;
}

.term-pill:hover .material-symbols-rounded {
    opacity: 1;
}

/* More Topics Dropdown (Mobile) & Inline (Desktop) */
.more-trigger {
    cursor: pointer;
    background: var(--bg-surface);
    color: var(--brand-primary);
    border: 1px solid var(--brand-primary);
    display: inline-flex;
}

.more-trigger .material-symbols-rounded {
    font-size: 16px;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.more-topics-content {
    display: none; /* Hidden by default on mobile */
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 280px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}

.more-topics-content.active {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hidden-term {
    display: block; /* Stack in dropdown */
    width: 100%;
}

/* Desktop: Show All Inline */
@media (min-width: 768px) {
    .more-trigger {
        display: none !important;
    }

    .more-topics-content {
        display: contents !important; /* Unwrap the container */
        position: static;
        box-shadow: none;
        border: none;
        padding: 0;
        background: none;
    }

    .hidden-term {
        display: inline-flex; /* Back to pill style */
        width: auto;
    }
}

/* =========================================
   SINGLE POST REDESIGN (Task: 678a76b7)
   ========================================= */

/* 1. Breadcrumb Truncation */
.breadcrumbs {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
    margin-bottom: 25px; /* Adjust spacing as needed */
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.breadcrumbs .breadcrumb-current {
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 50px; /* Ensure some text is always visible */
}

/* 2. Padding Adjustments */
/* Reduce inner padding */
.paper-sheet {
    padding: 10px 15px !important; /* Reduced from 20px/15px */
}

/* Reduce outer padding/railing */
.reader-container {
    padding-left: 10px !important;
    padding-right: 10px !important;
}

@media (min-width: 768px) {
    .paper-sheet {
        padding: 20px 30px !important; /* Keep desktop reasonable, or adjust if needed */
    }
}

/* 3. Typography & Layout */
/* Let .entry-title inherit global H1 styles */
.entry-title {
    color: var(--text-heading);
}

/* Force in-content images to be visible and responsive */
.entry-content img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
}

.entry-content figure {
    margin: 1.5rem 0;
}

/* Move category below title (handled in PHP), just add spacing */
.meta-top {
    margin-top: 5px;
    margin-bottom: 0;
}

/* 4. Meta Information (Date • Author • Read Time) */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    /* User observed 11px, wants -20% -> ~9px */
    font-size: 0.6875rem; /* ~11px */
    color: var(--text-muted);
    margin-top: 5px;
}

.post-meta span {
    display: inline-flex;
    align-items: center;
}

/* Match read time font size to date (already inherited, ensuring consistency) */
/* Force all to inherit 0.6875rem (11px) */
.post-reading-time, 
.post-date,
.post-author {
    font-size: inherit; 
    font-weight: 500;
}

.meta-divider {
    color: var(--text-light);
    font-size: 0.8em;
    margin: 0 2px;
}

/* 5. Social Share Buttons (App Icons) */
.social-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.share-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-heading);
    margin-right: 5px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Circular buttons */
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: white !important;
    padding: 0;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.share-btn i {
    font-size: 1.2rem;
}

/* Post Navigation Inline */
.post-navigation {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    gap: 10px !important;
    margin: 30px 0 !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    padding: 0 5px;
}

.nav-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 12px 20px !important; /* Slightly increased for better pill look */
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
    transition: all 0.2s ease;
    white-space: nowrap;
    width: auto !important;
    max-width: 48%;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1 !important; /* Force vertical centering */
}

.nav-link .nav-label {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.nav-link:hover {
    background: var(--bg-surface-hover);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

@media (max-width: 480px) {
    .nav-link {
        padding: 8px 14px !important;
        font-size: 0.8rem;
    }
}

/* Brand Colors */
.share-facebook {
    background-color: #1877F2; /* Facebook Blue */
}

.share-whatsapp {
    background-color: #25D366; /* WhatsApp Green */
}

.share-copy {
    background-color: #f3f4f6;
    color: var(--text-heading) !important;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.share-copy:hover {
    background-color: #e5e7eb;
}

/* Related Posts Spacing */
.related-posts {
    margin-top: 50px !important;
    padding: 40px 15px !important; /* Top 40px, Sides 15px */
    background: transparent;
}

.related-posts .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Vertically center Toggle Button */
    margin-bottom: 20px;
}

.related-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0;
}

/* Ensure Footer has no top margin globally */
.site-footer {
    margin-top: 0 !important;
}

/* 
   REINFORCEMENT: Fix for Related Posts List View 
   Explicitly override any potential width/block constraints to ensure 
   side-by-side layout when not in vertical mode.
*/
.related-posts .post-grid:not(.vertical-layout) .post-card-link {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: 100%;
}

.related-posts .post-grid:not(.vertical-layout) .post-thumbnail {
    width: 110px !important;
    height: auto !important;
    flex-shrink: 0 !important;
    margin-right: 16px !important;
    margin-bottom: 0 !important;
    border-radius: 8px !important;
}


.related-posts .post-grid:not(.vertical-layout) .post-card-content {
    flex: 1 !important;
    width: auto !important;
    padding: 0 !important;
}

/* FIX: Vertical Centering for Layout Toggle in Related Posts */
.related-posts .layout-toggle-container {
    margin-bottom: 0 !important;
}

.related-posts .layout-toggle-btn {
    margin: 0 !important;
}

/* =========================================
   404 PAGE STYLES
   ========================================= */
.error-404-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px 20px;
    background: var(--bg-page);
}

.error-404-container {
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.error-404-content {
    background: var(--bg-surface);
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.error-icon {
    margin-bottom: 20px;
}

.error-icon .material-symbols-rounded {
    font-size: 80px;
    color: var(--brand-primary);
    opacity: 0.2;
}

.error-title {
    font-size: 4rem;
    font-weight: 800;
    color: var(--brand-primary);
    line-height: 1;
    margin-bottom: 10px;
}

.error-subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 15px;
}

.error-description {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* 404 Search Form */
.error-search {
    margin-bottom: 40px;
    max-width: 500px; /* Matched to homepage hero search max-width approx */
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.error-search .hero-search {
    width: 100%;
}

/* Inherit .hero-search form styles from homepage section (lines ~1473) 
   We just need to ensure it takes full width of the container.
*/
.error-search .hero-search form {
    width: 100%;
    /* Background, border-radius, shadow come from main .hero-search form styles */
}

/* Reset input to match homepage hero search input */
.error-search input[type="text"] {
    /* Remove borders/backgrounds that were causing the "box inside box" issue */
    border: none;
    background: transparent;
    border-radius: 0;
    padding: 14px 10px; /* Match .hero-search input */
    width: 100%;
    flex: 1;
    color: var(--text-main);
    box-shadow: none; /* Remove focus shadow if any */
}

.error-search input[type="text"]:focus {
    border: none;
    box-shadow: none;
    outline: none;
}

/* Adjust icon position if needed, or rely on flex */
.error-search .search-icon-left {
    position: static; /* Let it flow in flex container like homepage */
    color: var(--text-muted);
    font-size: 24px;
    margin-right: 4px;
    pointer-events: none;
}

/* Submit button inherited from .hero-search button */
.error-search .search-submit-icon {
    /* Reset absolute positioning to match homepage flex layout */
    position: static; 
    margin-left: auto; /* Push to right if needed */
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: none; /* Reset distinct hover transforms if any specific overrides were set */
}

/* Helpful Links */
.error-links h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-heading);
}

.error-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.error-links li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--clr-light-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.error-links li a:hover {
    background: var(--bg-surface-hover);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    transform: translateY(-2px);
}

.error-links li a .material-symbols-rounded {
    font-size: 18px;
    color: var(--brand-primary);
}

@media (max-width: 768px) {
    .error-404-content {
        padding: 30px 20px;
    }
    
    .error-title {
        font-size: 3rem;
    }
    
    .error-links ul {
        flex-direction: column;
        align-items: stretch;
    }
    
    .error-links li a {
        justify-content: center;
    }
}

/* =========================================
   NAVIGATION REFACTOR STYLES
   ========================================= */

/* Explore Button (Desktop) */
.nav-link-explore {
    display: flex !important;
    align-items: center;
    gap: 6px;
    padding: 6px 16px !important;
    background: var(--bg-surface-hover);
    color: var(--brand-primary) !important;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.nav-link-explore:hover {
    background: var(--brand-primary);
    color: white !important;
    border-color: var(--brand-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.2);
}

.nav-link-explore .material-symbols-rounded {
    font-size: 18px;
}

/* Dropdown Headers & Dividers */
.dropown-header {
    padding: 8px 20px 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
    pointer-events: none;
    margin-top: 4px;
}

.dropdown-header {
   padding: 10px 20px 4px;
   font-size: 0.75rem;
   text-transform: uppercase;
   letter-spacing: 0.05em;
   color: var(--text-muted);
   font-weight: 700;
   pointer-events: none;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 0;
}

/* Adjust submenu spacing for grouped items */

/* ===== DYNAMIC CATEGORY CAROUSEL (REDESIGN) ===== */

.exam-board-carousel-wrapper {
    width: 100%;
    margin: 0 -4px; /* Negative margin to offset padding */
    padding: 0 4px; /* Padding for shadow clipping */
    overflow: hidden;
}

.exam-board-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 20px; /* Space for shadows/scrollbar */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.exam-board-carousel::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Individual Slide (Column) */
.exam-board-slide {
    flex: 0 0 90%; /* Mobile: Show slightly less than 100% to hint scroll */
    max-width: 90%;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Exam Board Block - FIXED HEIGHT (Reduced) */
.exam-board-block {
    height: 350px; /* Reduced to ~3x3 visual size */
    display: flex;
    flex-direction: column;
    /* Styles moved from previous block definition */
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 0; /* Removing padding from container to let header stretch */
    border: 1px solid var(--border-color);
    overflow: hidden; /* Contain scroll */
}

/* Stacked Blocks in a Slide - Share the height */
.exam-board-block.stacked-block {
    height: auto; /* Allow them to stack */
    flex: 1; /* Distribute available height */
    min-height: 0; /* Crucial for nested scroll inside flex */
}

/* Clickable Header */
.exam-board-header-link {
    text-decoration: none;
    display: block;
    background: var(--bg-surface-secondary); /* Slight contrast */
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.exam-board-header-link:hover {
    background: var(--bg-surface-hover);
}

.exam-board-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Space between icon+text and arrow */
    gap: 8px;
    padding-bottom: 0;
    border-bottom: none;
}

.exam-board-title .material-symbols-rounded {
    color: var(--brand-primary);
    font-size: 20px;
}

.header-arrow {
    color: var(--text-muted);
    font-size: 20px !important;
    transition: transform 0.2s ease;
}

.exam-board-header-link:hover .header-arrow {
    transform: translateX(4px);
    color: var(--brand-primary);
}

/* Scroll Area */
.exam-board-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.exam-board-scroll-area::-webkit-scrollbar {
    width: 6px;
}

.exam-board-scroll-area::-webkit-scrollbar-track {
    background: transparent;
}

.exam-board-scroll-area::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

/* Subgroup Label & Link */
.exam-subgroup-link {
    text-decoration: none;
    display: block;
    margin: 16px 0 8px; /* Spacing before/after */
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

.exam-subgroup-link:first-child {
    margin-top: 0;
}

.exam-subgroup-link:hover {
    background: var(--bg-surface-secondary);
}

.exam-subgroup-label {
    font-size: 0.8em;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    padding: 6px 8px; /* Add padding for clickable area */
    display: flex;
    align-items: center;
    justify-content: space-between; /* Push arrow to right */
}

.exam-subgroup-label::before {
    content: ""; /* Bullet or line */
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--brand-primary);
    margin-right: 6px; /* Spacing from text */
}

/* Fix: The arrow shouldn't have the bullet before it */
.subgroup-arrow {
    font-size: 16px !important; /* Smaller than main header arrow */
    color: var(--text-muted);
    opacity: 1; /* Always visible for mobile */
    transition: all 0.2s ease;
    transform: translateX(0); /* No movement needed by default */
}

.exam-subgroup-link:hover .subgroup-arrow {
    color: var(--brand-primary);
    transform: translateX(2px); /* Subtle nudge on hover */
}

.exam-subgroup-link:hover .exam-subgroup-label {
    color: var(--brand-primary);
}

/* Grid Inside Scroll Area */
.exam-board-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

/* Stacked Block Adjustments */
.stacked-block .exam-board-title {
    font-size: 1rem;
}

.stacked-block .exam-board-header-link {
    padding: 10px 16px;
}

.stacked-block .exam-board-grid {
    gap: 6px;
}

.stacked-block .exam-grid-btn {
    padding: 8px 4px;
}

.stacked-block .exam-grid-btn .material-symbols-rounded {
    font-size: 18px;
}

.stacked-block .exam-grid-btn span:not([class]) {
    font-size: 0.7rem;
}

/* Responsive Breakpoints */
@media (min-width: 640px) {
    .exam-board-slide {
        flex: 0 0 calc(50% - 8px); /* 2 slides */
        max-width: calc(50% - 8px);
        scroll-snap-align: start;
    }
}

@media (min-width: 1024px) {
    .exam-board-slide {
        flex: 0 0 calc(33.333% - 11px); /* 3 slides */
        max-width: calc(33.333% - 11px);
    }
}

/* =========================================
   SHOP / PRODUCT STYLES (Retry)
   ========================================= */

/* --- Shop Archive --- */
.shop-hero {
    background: var(--bg-surface);
    padding: 30px 0 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.shop-title {
    font-size: 1.75rem;
    margin-bottom: 10px;
    color: var(--brand-dark);
}

.shop-description {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    font-size: 0.95rem;
}

/* Shop Filters */
.shop-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

.shop-filter-chip {
    display: inline-flex;
    padding: 8px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.shop-filter-chip:hover,
.shop-filter-chip.active {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

/* Shop Grid */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

/* Product Card */
.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* Badge */
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--brand-accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-thumbnail {
    position: relative;
    padding-top: 66.66%; /* 3:2 Aspect Ratio */
    background: var(--clr-light-bg);
    overflow: hidden;
    display: block;
}

.product-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-thumbnail img {
    transform: scale(1.05);
}

.placeholder-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.placeholder-image .material-symbols-rounded {
    font-size: 48px;
    opacity: 0.5;
}

.product-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title-link {
    text-decoration: none;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--text-heading);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.product-card:hover .product-title {
    color: var(--brand-primary);
}

.product-meta {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-weight: 700;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.price-regular {
    color: var(--text-heading);
    font-size: 1.1rem;
}

.price-original {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 400;
}

.price-sat { /* Sale/Special Price */
    color: var(--brand-accent);
    font-size: 1.1rem;
}

.price-free {
    color: var(--brand-primary);
    font-size: 1.1rem;
}

.btn-view-product {
    display: block;
    text-align: center;
    margin-top: 12px;
    padding: 8px 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.2s;
}

.btn-view-product:hover {
    background: var(--bg-surface-hover);
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

/* --- Single Product Template --- */
.single-product-wrapper {
    background: var(--bg-page);
    padding-bottom: 60px;
}

.product-detail-container {
    padding-top: 30px;
}

.product-breadcrumbs {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.product-breadcrumbs a {
    color: var(--text-muted);
}
.product-breadcrumbs a:hover {
    color: var(--brand-primary);
}

.product-breadcrumbs .separator {
    margin: 0 5px;
    color: var(--text-light);
}

.product-main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06); /* Enhanced Shadow */
    border: 1px solid var(--border-light);
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .product-main-layout {
        grid-template-columns: 45% 55%;
        padding: 40px;
        gap: 50px;
    }
}

.product-main-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--border-color) 100%); /* Subtle Gradient BG */
    box-shadow: inset 0 0 20px rgba(0,0,0,0.03);
}

.product-main-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}
.product-main-image:hover img {
    transform: scale(1.02);
}

.product-detail-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--brand-accent);
    color: white;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.product-entry-title {
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--text-heading);
    line-height: 1.2;
}

.product-price-block {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    background: var(--bg-surface);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    display: inline-flex; /* Wrap nicely */
}

.single-price-original {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 1.2rem;
}

.single-price-sale,
.single-price-regular,
.single-price-free {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--brand-primary-dark);
}

.discount-pill {
    background: rgba(244, 63, 94, 0.15); /* brand-accent with slightly more opacity */
    color: var(--brand-accent);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 6px;
}

.product-short-description {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.6;
}

.product-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 35px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-heading);
    font-weight: 500;
    background: var(--bg-surface);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}
.feature-item .material-symbols-rounded {
    color: var(--brand-primary);
    font-size: 22px;
}

.product-actions-desktop {
    display: none;
}
@media (min-width: 768px) {
    .product-actions-desktop {
        display: block;
    }
}

.btn-buy-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
    color: white !important;
    padding: 16px 40px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 1.15rem;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.25);
}

.btn-buy-now:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(5, 150, 105, 0.35);
    filter: brightness(1.1);
}

.product-full-content {
    margin-top: 50px;
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.section-title {
    font-size: 1.4rem;
    margin-bottom: 24px;
    position: relative;
    padding-left: 18px;
    font-weight: 700;
    color: var(--brand-dark);
}
.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 5px;
    background: var(--brand-primary);
    border-radius: 4px;
}

/* Related Products */
.related-products-section {
    margin-top: 60px;
}

/* Sticky Mobile CTA */
.sticky-product-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    padding: 12px 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08); /* Smoother shadow */
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}
/* Dark mode support for sticky if needed, assuming vars handle it */

@media (min-width: 768px) {
    .sticky-product-cta {
        display: none;
    }
}

.sticky-price .price-val {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--brand-primary-dark);
}

.btn-sticky-buy {
    background: var(--brand-primary);
    color: white !important;
    padding: 12px 28px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    text-decoration: none;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* =========================================
   SHOP LIST LAYOUT (E-Commerce Style)
   ========================================= */

.shop-list-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px; /* Limit width for readability in list view */
    margin: 0 auto 50px;
}

.product-card-list {
    display: flex;
    flex-direction: column; /* Mobile: Stacked */
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

@media (min-width: 640px) {
    .product-card-list {
        flex-direction: row; /* Desktop: Side by Side */
        align-items: stretch;
        height: 180px; /* Fixed height for consistency */
    }
}

.product-card-list:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* List Image Column */
.product-list-image-col {
    position: relative;
    width: 100%;
    height: 200px; /* Mobile Height */
}

@media (min-width: 640px) {
    .product-list-image-col {
        width: 240px; /* Fixed width on desktop */
        height: auto; /* Full height */
        flex-shrink: 0;
    }
}

.product-list-image-col .product-thumbnail {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--clr-light-bg);
}

.product-list-image-col .product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card-list:hover .product-thumbnail img {
    transform: scale(1.05);
}

/* List Content Column */
.product-list-content-col {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

@media (min-width: 640px) {
    .product-list-content-col {
        padding: 20px 24px;
    }
}

.product-card-list .product-title {
    font-size: 1.15rem;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-excerpt {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 12px;
    display: none; /* Hide snippet on very small screens if needed */
    -webkit-line-clamp: 2;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 640px) {
    .product-excerpt {
        display: -webkit-box;
    }
}

.product-list-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.product-card-list .btn-view-product {
    margin-top: 0;
    padding: 6px 16px;
    background: transparent;
    border: 1px solid var(--brand-primary);
    color: var(--brand-primary);
    border-radius: 4px; /* Slightly squarer for tech feel? Or pill? Keep generic */
    border-radius: var(--radius-pill);
}

.product-card-list .btn-view-product:hover {
    background: var(--brand-primary);
    color: white;
}
