:root {
    --bg-deep-indigo: #1A1A2E;
    --text-light-gray: #E0E0E0;
    --text-medium-gray: #B0B0B0;
    --accent-cyan: #00BCD4;
    --accent-gold: #FFD700;
    --border-color: #2C2C4A;
    --font-primary: 'Hind Siliguri', sans-serif;
    --font-secondary: 'Hind Siliguri', sans-serif;
}

/* ==========================================================================
   Header Styles
   ========================================================================== */

.main-header.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(90deg, #18182E 60%, #00BCD4 120%);
    box-shadow: 0 4px 24px 0 rgba(0,188,212,0.08);
    /* reduced vertical padding to shrink header height */
    padding: 8px 0 8px 0;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

/* General header spacing: add bottom padding so header has breathing room in normal flow */
.main-header {
    box-sizing: border-box;
    padding-bottom: 6px; /* reduced extra bottom spacing */
    transition: padding 160ms ease;
}

.header-title-only {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

.main-header h1 {
    font-family: var(--font-secondary);
    font-weight: 700;
    color: var(--accent-cyan);
    font-size: 2.2rem;
    margin: 0 0 4px 0;
    letter-spacing: 0.5px;
    text-shadow: 0 0 8px rgba(0, 188, 212, 0.6);
}

.header-tagline {
    color: var(--text-medium-gray);
    font-size: 1.15rem;
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.1px;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */

.main-footer {
    position: relative;
    flex-shrink: 0; /* Prevents the footer from shrinking within the flex container */
    width: 100%;
    background: linear-gradient(90deg, #18182E 60%, #00BCD4 120%);
    box-shadow: 0 -2px 18px 0 rgba(0,188,212,0.08);
    padding: 22px 0 16px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    margin-top: 48px; /* Add space between main content and footer */
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
    gap: 2px;
}

/* ==========================================================================
   Responsive Styles for Header/Footer
   ========================================================================== */

@media (max-width: 900px) {
    .header-title-only, .footer-content { padding: 0 4vw; }
}

@media (max-width: 600px) {
    .header-title-only, .footer-content { padding: 0 2vw; }
    .main-header h1 { font-size: 1.3rem; }
    .header-tagline { font-size: 1rem; }
}

/* Index page specific header styling (does not affect syllabus page which uses .main-header.sticky-header) */
.main-header.index-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 12000 !important;
    background: linear-gradient(90deg, #18182E 60%, #00BCD4 120%) !important;
    box-shadow: 0 6px 28px rgba(0,188,212,0.08) !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.main-header.index-header .header-title-only { padding-top: 18px; padding-bottom: 18px; }

.main-header.index-header .header-title-only h1 { font-size: 2rem; color: var(--accent-gold); text-shadow: none; }

/* Push index page content below the fixed header only on index pages */
body.page-index, body.page-index main.main-content, body.page-index main.program-container { padding-top: calc(var(--header-height, 64px) + 8px) !important; }