:root {
    --primary-navy: #1E0B0C; /* Deep Burgundy Black */
    --primary-navy-light: #2A1213; /* Warm Charcoal Burgundy */
    --accent-blue: #BC2226; /* Summit Crimson Red */
    --classic-white: #FFFFFF;
    --off-white: #FFFFFF; /* Pure White background to fit browser seamlessly */
    --text-main: #2A2424; /* Soft Charcoal */
    --text-muted: #7A6F70; /* Muted Rosy Gray */
    --border-gray: #E8E0E1; /* Rosy Gray border */
    --red-accent: #BC2226; /* Primary accent */
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Roboto', sans-serif;
    background-color: var(--off-white);
    color: var(--text-main);
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-navy);
    margin-top: 0;
}

a {
    color: var(--primary-navy);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--red-accent);
}

/* Header & Glassmorphism Nav */
header {
    background: #FFFFFF;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6px 40px; /* Horizontal padding aligned with the 40px side margins of the main content card */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px; /* Enforces a generous, premium gap between the logo and navigation links */
}

.logo {
    display: flex;
    align-items: center;
    margin-right: 20px; /* Guarantees strong visual breathing room from the Home navigation link */
}

.logo a {
    position: relative;
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border-radius: 4px;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    transform-style: preserve-3d;
}

.logo img {
    height: 62px !important;
    margin-top: 0px !important;
    vertical-align: middle !important;
}

/* Diagonal Shine Flashing Animation on Logo - Staggered Elegant Pulse (Idle) */
.logo a::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 60px;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.65) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-20deg);
    animation: logoShine 12s infinite ease-in-out;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Cursor-Reactive Glare State (Active Hover) */
.logo a.is-hovered::after {
    animation: none;
    left: var(--mouse-x, -200px);
    top: var(--mouse-y, -200px);
    width: 120px;
    height: 120px;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0) 70%
    );
    transform: translate(-50%, -50%);
    pointer-events: none;
}

@keyframes logoShine {
    0% {
        left: -150%;
    }
    25% {
        left: 150%;
    }
    100% {
        left: 150%;
    }
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 6px; /* Optimized gap for perfect horizontal fit */
    margin: 0;
    padding: 0;
    align-items: stretch; /* Ensures dropdown li fills full nav height */
    position: relative;
}

.nav-links li a {
    font-weight: 500;
    font-size: 13.5px; /* Increased for superior legibility */
    color: #4A5568;
    padding: 6px 10px; /* Optimized padding for larger font balance */
    border-radius: 6px;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 40px;
    max-width: 115px; /* Slightly wider boundaries to fit larger characters cleanly */
    white-space: normal; /* Enable text wrapping */
    line-height: 1.25;
    border-bottom: 2px solid transparent;
    box-sizing: border-box;
}

.nav-links li a:hover {
    color: var(--red-accent);
    background-color: rgba(188, 34, 38, 0.03);
}

.nav-links li a.active {
    color: #BC2226;
    background-color: #FCECEE; /* Soft pink block */
    border-bottom: 2px solid #BC2226; /* Red bottom line */
    font-weight: 600;
    border-radius: 6px 6px 0px 0px; /* Flat bottom for the line */
}

/* Dropdown */
.dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

/* Override nav-link constraints specifically for the dropdown trigger button */
.dropdown > a {
    white-space: normal !important; /* Allow text wrapping */
    min-height: 40px;
    padding: 6px 12px;
}

.dropdown-content {
    display: none;
    opacity: 0;
    transform: translateY(6px);
    position: absolute;
    top: calc(100% + 4px); /* Small gap below nav bar */
    left: 0;
    background-color: transparent;
    min-width: 260px;
    box-shadow: none;
    z-index: 1000;
    border-radius: 0;
    border-top: none;
    flex-direction: column;
    gap: 8px; /* Gap between individual items */
    transition: opacity 0.2s ease, transform 0.2s ease;
    padding-top: 10px;
    padding-bottom: 10px;
}

.dropdown-content a {
    color: var(--primary-navy);
    background-color: var(--classic-white);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-bottom: none !important;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.dropdown-content a::before {
    content: '\f105'; /* FontAwesome chevron-right */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 11px;
    color: var(--red-accent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dropdown-content a:hover {
    color: var(--red-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.dropdown-content a:hover::before {
    opacity: 1;
}

@media (min-width: 993px) { 
    .dropdown:hover .dropdown-content {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Slide Show Layout */
.hero {
    position: relative;
    height: 280px; /* Slim, compact hero banner to remove any large spacing gaps */
    display: flex;
    align-items: center; /* Kept beautifully centered vertically */
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: #1E0B0C;
    padding: 0 20px;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.2s ease-in-out; /* Smooth cross-fade transition */
}

/* Subtle red-white tint overlay that lets background images display clearly */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.12) 100%);
    z-index: 2;
    pointer-events: none;
}

.hero-slider .slide.active {
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 3; /* Always on top of overlay and slider */
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    color: #1E0B0C;
    font-size: 2.3rem; /* Further optimized from 2.8rem for a tighter, sleeker look */
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 8px;
    text-shadow: 0 2px 12px rgba(255, 255, 255, 0.85); /* Premium glow for pristine text readability */
}

.hero-content p {
    font-size: 1.08rem; /* Further optimized from 1.15rem */
    font-family: 'Inter', sans-serif;
    color: #1A202C; /* Darker carbon color for perfect contrast */
    font-weight: 600; /* Bolder font weight for superb legibility */
    line-height: 1.55;
    text-shadow: 0 1px 8px rgba(255, 255, 255, 0.9); /* Strong soft glow behind paragraph */
}

/* Dots matching the mockup! */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px; /* Reduced to match the tighter banner height */
}

.carousel-dots .dot {
    width: 8px;
    height: 8px;
    background-color: rgba(30, 11, 12, 0.25);
    border-radius: 50%;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.carousel-dots .dot.active {
    background-color: #BC2226; /* Summit Red active dot */
    transform: scale(1.25);
}

/* Overlapping Main Content Layout */
.container {
    max-width: 1200px;
    width: calc(100% - 80px); /* Leaves a consistent 40px side gap on the left and right */
    margin: -45px auto 40px auto; /* Proportional overlapping margin for the slim hero height */
    padding: 55px 50px;
    background: var(--classic-white);
    border-radius: 16px; /* Smooth rounded corners */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08); /* Premium soft drop shadow */
    position: relative;
    z-index: 10;
    box-sizing: border-box; /* Ensure padding is included in the width */
}

/* Modern Cards / Panels for Documents */
.doc-card {
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    background: var(--classic-white);
}

.doc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.doc-card i {
    font-size: 24px;
    color: var(--red-accent);
    margin-right: 15px;
}

.doc-card a {
    font-weight: 500;
    flex-grow: 1;
}

/* Tables */
.modern-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background: var(--classic-white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.modern-table th, .modern-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-gray);
}

.modern-table th {
    background-color: var(--red-accent);
    color: var(--classic-white);
    font-weight: 500;
}

.modern-table tr:last-child td {
    border-bottom: none;
}
.modern-table tr:hover td {
    background-color: var(--off-white);
}

/* Premium Pill Badges for Table Links */
.modern-table td a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px !important;
    background-color: #FCECEE !important; /* Soft rosy-pink tint */
    color: var(--red-accent) !important; /* Crimson Red text */
    border: 1px solid rgba(188, 34, 38, 0.12) !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1) !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.modern-table td a i {
    font-size: 13px !important;
    color: var(--red-accent) !important;
    margin-right: 0px !important;
    transition: color 0.25s ease !important;
}

/* Hover/Active State: Solid Crimson Fill with White Text & Icon */
.modern-table td a:hover {
    background-color: var(--red-accent) !important;
    color: var(--classic-white) !important;
    border-color: var(--red-accent) !important;
    box-shadow: 0 4px 8px rgba(188, 34, 38, 0.15) !important;
    transform: translateY(-1px) !important;
}

.modern-table td a:hover i {
    color: var(--classic-white) !important;
}

.modern-table td a:active {
    transform: translateY(0) !important;
}

/* Custom Intimations Accordion matching screenshot - Softer Crimson Tone */
.intimation-accordion-group {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #D25456;
    margin-bottom: 40px;
    box-shadow: 0 4px 10px rgba(188, 34, 38, 0.05);
}

.accordion.intimation-accordion {
    background-color: #D25456 !important;
    color: var(--classic-white) !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25) !important;
    margin-top: 0px !important; /* Stack directly with no gap */
    border-radius: 0px !important;
    padding: 16px 20px !important;
    font-size: 15px !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    transition: background-color 0.2s ease;
}

.accordion.intimation-accordion:last-of-type {
    border-bottom: none !important;
}

.accordion.intimation-accordion:hover {
    background-color: var(--red-accent) !important; /* Elegant FGP brand red on hover */
}

/* Custom indicator chevron down to replace default plus/minus */
.accordion.intimation-accordion::after {
    content: '\f078' !important; /* FontAwesome chevron-down */
    font-family: 'Font Awesome 5 Free' !important;
    font-weight: 900 !important;
    font-size: 13px !important;
    color: var(--classic-white) !important;
    transition: transform 0.3s ease-in-out;
}

/* Rotate the chevron active state */
.accordion.intimation-accordion.active::after {
    content: '\f078' !important;
    transform: rotate(180deg) !important; /* Point up when expanded */
}

/* Nested Softer Rosy-Pink Panel Background specifically for Intimations */
.intimation-accordion-group .panel {
    background-color: #FAF3F4 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    transition: max-height 0.25s ease-out;
}

.intimation-accordion-group .panel.show {
    border-bottom: 1px solid rgba(210, 84, 86, 0.15) !important; /* Soft, delicate separator */
}

/* Accordion for Archives */
.accordion {
    background-color: var(--classic-white);
    color: var(--primary-navy);
    cursor: pointer;
    padding: 18px;
    width: 100%;
    text-align: left;
    border: 1px solid var(--border-gray);
    outline: none;
    transition: 0.4s;
    font-weight: 600;
    font-size: 16px;
    border-radius: 4px;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
}

.accordion.active, .accordion:hover {
    background-color: var(--off-white);
}

.accordion::after {
    content: '\002B'; /* Plus */
    font-weight: bold;
    float: right;
    margin-left: 5px;
}
.accordion.active::after {
    content: "\2212"; /* Minus */
}

.panel {
    padding: 0 18px;
    background-color: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    border-left: 1px solid var(--border-gray);
    border-right: 1px solid var(--border-gray);
}
.panel.show {
    border-bottom: 1px solid var(--border-gray);
    padding: 15px 18px;
}

/* Search Bar */
.search-container {
    display: flex;
    margin-bottom: 30px;
}
.search-container input[type=text] {
    padding: 12px;
    border: 1px solid var(--border-gray);
    border-radius: 4px 0 0 4px;
    width: 100%;
    font-family: inherit;
    font-size: 16px;
}
.search-container button {
    padding: 12px 20px;
    background: var(--red-accent);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}
.search-container button:hover {
    background: #a82a06;
}

/* Footer */
footer {
    background: var(--primary-navy);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 18px 20px;
    margin-top: 50px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}

.footer-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-container a {
    color: rgba(255, 255, 255, 0.75) !important;
    text-decoration: none !important;
    transition: color 0.25s ease;
    font-weight: 500;
}

.footer-container a:hover {
    color: var(--red-accent) !important;
}

.footer-logo {
    height: 16px;
    width: auto;
    margin-right: 6px;
    vertical-align: middle;
    display: inline-block;
}

.footer-separator {
    color: rgba(255, 255, 255, 0.25);
}

/* Custom Accent Bar Under Headings */
.accent-bar {
    width: 65px;
    height: 4px;
    background-color: var(--red-accent);
    margin-top: 8px;
    margin-bottom: 25px;
    border-radius: 2px;
}

/* Moving News Announcement Banner */
.announcement-banner {
    background: linear-gradient(90deg, #BC2226 0%, #8E1518 100%);
    color: #FFFFFF;
    height: 38px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    font-size: 13.5px;
    font-weight: 500;
    overflow: hidden;
    position: relative;
    z-index: 1001;
    font-family: 'Inter', sans-serif;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.flashing-badge {
    background: #FFFFFF;
    color: #BC2226;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 4px;
    margin-right: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    animation: flashAnimation 0.8s infinite alternate;
    white-space: nowrap;
}

@keyframes flashAnimation {
    0% {
        opacity: 0.3;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.ticker-wrap {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: tickerAnimation 30s linear infinite;
    color: #FFFFFF;
}

.ticker-content:hover {
    animation-play-state: paused; /* Pause scrolling on hover */
    cursor: pointer;
}

@keyframes tickerAnimation {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* ==========================================================================
   Responsive Design / Mobile Layouts
   ========================================================================== */

.mobile-menu-toggle {
    display: none;
    font-size: 24px;
    color: var(--primary-navy);
    cursor: pointer;
    align-self: center;
    padding: 10px;
    position: relative;
    z-index: 1005;
}

@media screen and (max-width: 992px) {
    .nav-container {
        flex-direction: row;
        gap: 15px;
        padding: 15px 20px;
        align-items: center;
        justify-content: space-between;
        position: relative;
    }
    
    .logo {
        margin-right: auto;
    }
    
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 20px;
        right: 20px;
        width: auto;
        background: var(--classic-white);
        padding: 8px 12px;
        border-radius: 8px;
        box-shadow: 0 15px 35px rgba(0,0,0,0.15);
        border: 1px solid var(--border-gray);
        z-index: 1000;
        gap: 0;
    }
    
    .nav-links.show {
        display: flex !important;
    }
    
    .nav-links li {
        width: 100%;
    }

    .nav-links li a {
        width: 100%;
        max-width: none;
        text-align: center;
        justify-content: center;
        padding: 10px 8px;
        font-size: 13px;
        border-radius: 0;
        background: transparent;
        border: none;
        border-bottom: 1px solid var(--border-gray);
        box-shadow: none;
    }
    
    .nav-links li:last-child a {
        border-bottom: none;
    }

    .nav-links li a.active {
        border-radius: 0;
        border-bottom: 2px solid var(--red-accent);
        background-color: transparent;
    }
    
    .dropdown {
        position: static;
        flex-direction: column;
    }

    .dropdown > a {
        display: flex;
        justify-content: center;
        gap: 8px;
    }

    .dropdown-content {
        display: none;
        flex-direction: column;
        opacity: 1;
        transform: none;
        position: static;
        box-shadow: none;
        border: none;
        background-color: rgba(0,0,0,0.02);
        margin-top: 0;
        width: 100%;
        padding: 0;
        border-radius: 8px;
    }
    
    .dropdown-content.show {
        display: flex !important;
    }

    .dropdown-content a {
        padding: 10px 15px;
        font-size: 13px;
        justify-content: center;
        box-shadow: none;
        background: transparent;
    }

    .dropdown-content a:hover {
        transform: none;
        box-shadow: none;
        background-color: rgba(188, 34, 38, 0.05);
    }
    
    .container {
        width: 95%;
        padding: 30px 20px;
        margin-top: -30px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }
}

@media screen and (max-width: 768px) {
    .hero {
        height: auto;
        padding: 40px 15px 60px 15px;
    }

    .hero-content h1 {
        font-size: 1.6rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .container {
        width: 100%;
        border-radius: 0;
        margin-top: 0;
        padding: 20px 15px;
    }

    /* Make Tables Horizontally Scrollable */
    .modern-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Search bar responsive */
    .search-wrapper, .search-container {
        flex-direction: column;
    }
    
    .search-container input[type=text] {
        border-radius: 4px;
        margin-bottom: 10px;
    }
    
    .search-container button {
        border-radius: 4px;
        width: 100%;
    }

    .search-wrapper input {
        border-radius: 8px;
        margin-bottom: 10px;
    }

    .search-wrapper button {
        width: 100%;
    }

    /* Cards */
    .doc-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .doc-card i {
        margin-right: 0;
        margin-bottom: 5px;
    }

    .footer-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-separator {
        display: none;
    }
    
    .accordion {
        font-size: 14px;
        padding: 15px;
    }
    
    .accordion.intimation-accordion {
        font-size: 13px !important;
        padding: 12px 15px !important;
    }
}

/* Responsive Grid for Cards */
.responsive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
