/* ==========================================================================
   Aamaar Shahor - Modern Design System & Stylesheet
   An Initiative of Mass Media, Malda
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@500;600;700;800&family=Inter:wght@400;500;600;700&family=Noto+Sans+Bengali:wght@400;500;600;700&display=swap');

:root {
    --primary: #e63946;
    --primary-dark: #c52233;
    --primary-light: #fee2e2;
    --primary-glow: rgba(230, 57, 70, 0.25);
    
    --accent: #f5821f; /* Aamaar Shahor Logo Saffron */
    --accent-dark: #d96e10;
    --accent-light: #fff3e6;
    --accent-glow: rgba(245, 130, 31, 0.25);

    --royal: #2d2e92; /* Aamaar Shahor Logo Royal Blue */
    --royal-light: #eef0ff;
    
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --info: #0284c7;

    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-alt: #f1f5f9;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;

    --text-main: #221f20; /* Logo Charcoal Ink */
    --text-muted: #5d6778;
    --text-light: #94a3b8;
    --text-white: #ffffff;

    --font-sans: 'Inter', 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Barlow', 'Noto Sans Bengali', -apple-system, sans-serif;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-body: #090d16;
    --bg-surface: #111827;
    --bg-card: #172033;
    --bg-alt: #1e293b;
    --border: #26334a;
    --border-hover: #374765;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #64748b;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
}

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

html {
    scroll-behavior: smooth;
    font-size: 15px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.25;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

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

.container {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-accent { background: var(--accent-light); color: var(--accent); }
.badge-alt { background: var(--bg-alt); color: var(--text-muted); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.35rem;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--primary-glow);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-main);
    border-color: var(--border);
}
.btn-secondary:hover {
    background: var(--bg-alt);
    border-color: var(--border-hover);
}

.btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: #ffffff;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}
.btn-lg {
    padding: 0.85rem 1.85rem;
    font-size: 1.05rem;
}

/* ==========================================================================
   Top Bar
   ========================================================================== */
.topbar {
    background: #181d28;
    color: #94a3b8;
    font-size: 0.82rem;
    padding: 0.45rem 0;
    border-bottom: 2px solid var(--accent);
}

.topbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.topbar-ticker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.ticker-badge {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.16rem 0.55rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.topbar-link {
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.topbar-link:hover {
    color: #ffffff;
}

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    transition: var(--transition);
}
.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Header & Brand Area
   ========================================================================== */
.site-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.header-main {
    padding: 0.85rem 0;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.brand-logo {
    height: 48px;
    width: auto;
}

.brand-meta {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.brand-title span {
    color: var(--primary);
}

.brand-tagline {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.helpline-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 1rem;
    background: var(--bg-alt);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.helpline-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.helpline-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.2;
}
.helpline-number {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.main-nav {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 0.15rem;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.85rem 0.65rem;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.nav-link:hover, .nav-item.active .nav-link {
    color: var(--primary);
    border-bottom-color: var(--accent);
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-surface);
    min-width: 235px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    padding: 0.5rem 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 110;
    pointer-events: none;
}

.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown,
.nav-item.open .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-link {
    display: block;
    padding: 0.6rem 1.25rem;
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}
.dropdown-link:hover {
    background: var(--bg-alt);
    color: var(--primary);
    padding-left: 1.45rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    padding: 1.5rem 0 2.5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

.hero-slider-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

.hero-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #1e293b;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.hero-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.hero-slide:hover img {
    transform: scale(1.02);
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.65) 55%, rgba(15, 23, 42, 0.25) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.75rem;
    color: #ffffff;
}

.hero-slide-title {
    font-size: 1.6rem;
    color: #ffffff;
    font-weight: 800;
    margin-bottom: 0.4rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-slide-desc {
    font-size: 0.92rem;
    color: #f1f5f9;
    line-height: 1.5;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.hero-slide-floating-cta {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 0.65rem;
    z-index: 5;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(8px);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* Slider Controls */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.slider-btn:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.08);
}

.slider-btn.prev {
    left: 12px;
}

.slider-btn.next {
    right: 12px;
}

.slider-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.slider-dot.active {
    width: 28px;
    border-radius: 10px;
    background: var(--accent);
    border-color: #ffffff;
}

/* Quick Action Tiles */
.quick-actions-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-tile {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 1rem;
    align-items: center;
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
}

.action-tile:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tile-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.tile-icon-red { background: var(--primary-light); color: var(--primary); }
.tile-icon-orange { background: var(--accent-light); color: var(--accent); }
.tile-icon-green { background: var(--success-light); color: var(--success); }
.tile-icon-blue { background: #e0f2fe; color: #0284c7; }

.tile-content h3 {
    font-size: 1.05rem;
    margin-bottom: 0.15rem;
}

.tile-content p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.35;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 70px;
    height: 2px;
    background: var(--primary);
}

.section-title {
    font-size: 1.45rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.section-title i {
    color: var(--primary);
}

/* ==========================================================================
   Jaruree Guide Issue Cards (Optimized Best Fit Thumbnails)
   ========================================================================== */
.editions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.edition-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.edition-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.edition-cover-wrap {
    position: relative;
    background: #f8fafc;
    height: 220px;
    max-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.edition-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.35s ease;
    display: block;
}

.edition-card:hover .edition-cover-img {
    transform: scale(1.03);
}

.edition-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15,23,42,0.3) 0%, transparent 40%, rgba(15,23,42,0.65) 100%);
    pointer-events: none;
}

.edition-date-tag {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: rgba(15, 23, 42, 0.88);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.18rem 0.5rem;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(4px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.edition-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
}

.edition-views-badge {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.edition-info {
    padding: 0.95rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.edition-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}

.edition-title {
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.edition-title a {
    color: var(--text-main);
}
.edition-title a:hover {
    color: var(--primary);
}

.edition-actions {
    margin-top: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.edition-actions .btn {
    padding: 0.4rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
}

/* ==========================================================================
   Teleguide Search & Directory Component
   ========================================================================== */
.teleguide-search-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.search-bar-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.search-input-wrap {
    flex: 2;
    min-width: 250px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary);
    background: var(--bg-surface);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.category-select {
    flex: 1;
    min-width: 180px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--text-main);
    outline: none;
    cursor: pointer;
}

.category-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.cat-pill {
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    border-radius: var(--radius-full);
    background: var(--bg-alt);
    color: var(--text-muted);
    border: 1px solid var(--border);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.cat-pill:hover, .cat-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Directory Cards */
.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.directory-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.directory-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.dir-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.dir-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.dir-category {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
}

.dir-contact-list {
    list-style: none;
    margin: 0.75rem 0;
    font-size: 0.88rem;
}

.dir-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
    color: var(--text-muted);
}

.dir-contact-list li i {
    color: var(--primary);
    margin-top: 0.2rem;
}

.dir-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

/* ==========================================================================
   Pathology Rate Chart Table
   ========================================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    text-align: left;
}

.data-table th {
    background: var(--bg-alt);
    color: var(--text-main);
    font-weight: 700;
    padding: 0.85rem 1rem;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
}

.data-table tr:hover {
    background: var(--bg-alt);
}

.price-tag {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}
.price-discount {
    font-size: 0.8rem;
    color: var(--success);
    margin-left: 0.35rem;
}

/* ==========================================================================
   Classified Booking Form & Calculator
   ========================================================================== */
.form-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-size: 0.92rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--text-main);
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    background: var(--bg-surface);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.calculator-summary-box {
    background: var(--bg-alt);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px dashed var(--border-hover);
    margin: 1.5rem 0;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.calc-row.total {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
    border-top: 1px solid var(--border);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

/* ==========================================================================
   Tuition Classes Grid
   ========================================================================== */
.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.class-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border);
    text-align: center;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
}

.class-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.class-icon-badge {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1rem;
    font-weight: 800;
    font-family: var(--font-heading);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 3.5rem 0 1.5rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-brand h3 {
    color: #ffffff;
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.footer-brand p {
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #cbd5e1;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
    position: relative;
    padding-bottom: 0.4rem;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: #94a3b8;
    font-size: 0.88rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 0.35rem;
}

.footer-contact-item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.88rem;
    color: #cbd5e1;
}

.footer-contact-item i {
    color: var(--primary);
    margin-top: 0.2rem;
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.82rem;
}

/* ==========================================================================
   PDF Reader Modal
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-window {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 1000px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.15rem;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-body {
    flex: 1;
    background: #525659;
}

.modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1200px) {
    .nav-link {
        padding: 0.8rem 0.45rem;
        font-size: 0.82rem;
        gap: 0.25rem;
    }
    .nav-link i {
        font-size: 0.8rem;
    }
}

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .helpline-box {
        display: none;
    }
    .main-nav {
        display: none !important;
    }
    .mobile-menu-btn {
        display: block !important;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .topbar-content {
        flex-direction: column;
        align-items: flex-start;
    }
    .header-row {
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
    }
    .header-actions .btn-primary {
        display: none;
    }
    .brand-logo {
        height: 44px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

.mobile-nav-drawer {
    display: none;
    background: var(--bg-surface);
    border-bottom: 2px solid var(--border);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-md);
}
.mobile-nav-drawer.active {
    display: block !important;
}
.mobile-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0;
    margin: 0;
}
.mobile-nav-list li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
    padding: 0.4rem 0;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
}
.mobile-nav-list li a:hover {
    color: var(--primary);
}

/* ==========================================================================
   Mobile App Interface: Bottom Navigation Bar & Floating Actions
   ========================================================================== */
.mobile-app-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 990;
    justify-content: space-around;
    align-items: center;
    padding: 0 0.5rem;
    backdrop-filter: blur(10px);
}

.app-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0.4rem;
    cursor: pointer;
    transition: var(--transition);
    min-width: 58px;
}

.app-bar-item i {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.app-bar-item:hover, .app-bar-item.active {
    color: var(--primary);
}

.app-bar-item:active i {
    transform: scale(0.88);
}

.app-bar-fab {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    position: relative;
    top: -14px;
}

.app-bar-fab .fab-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #b91c1c 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 6px 16px var(--primary-glow);
    border: 3px solid var(--bg-surface);
    transition: transform 0.2s ease;
}

.app-bar-fab:active .fab-circle {
    transform: scale(0.92);
}

.app-bar-fab span {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 2px;
}

.floating-whatsapp-btn {
    position: fixed;
    bottom: 80px;
    right: 18px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #25d366;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 980;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
}

.floating-whatsapp-btn:hover {
    transform: scale(1.1);
    color: #ffffff;
}

@media (max-width: 768px) {
    body {
        padding-bottom: 74px;
    }
    .mobile-app-bar {
        display: flex;
    }
    .floating-whatsapp-btn {
        bottom: 80px;
        right: 16px;
        width: 44px;
        height: 44px;
        font-size: 1.45rem;
    }
}

.brand-rni-strip {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1px;
}

@media (max-width: 576px) {
    .editions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .edition-cover-wrap {
        height: 165px;
        max-height: 165px;
    }
    .edition-info {
        padding: 0.65rem;
    }
    .edition-title {
        font-size: 0.82rem;
        margin-bottom: 0.35rem;
    }
    .edition-actions {
        grid-template-columns: 1fr;
        gap: 0.35rem;
        padding-top: 0.5rem;
    }
    .edition-actions .btn {
        padding: 0.3rem 0.4rem;
        font-size: 0.75rem;
    }
}

