/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* High Court Theme: Deep Maroon & Gold */
    --primary-color: #600000; /* Deep Maroon - Serious & Authoritative */
    --secondary-color: #8b0000; /* Slightly lighter maroon for hover states */
    
    /* Keep the same Gold to maintain brand consistency with other courts */
    --gold-accent: #c5a059; 
    
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-light: #f9f9f9;
    --header-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', serif;
}

html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative;
    margin: 0;
    padding: 0;
}

/* --- HEADER BASE STYLES --- */
header, #main-header {
    /* Fixed position to stay at top */
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height, 60px);
    box-sizing: border-box;
    padding: 10px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    
    /* DEFAULT STATE (Top of page) - Clean Solid Maroon */
    background: var(--primary-color, #600000); 
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: all 0.4s ease; /* Smooth transition */
}

/* --- LOGO STYLING --- */
.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-container img {
    height: 65px;
    transition: height 0.3s;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

/* Default Text Colors (White for Dark Background) */
.court-name {
    font-family: 'Poppins', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff; /* White text initially */
    text-transform: uppercase;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.court-sub {
    font-size: 0.65rem;
    color: #eeeeee;
    letter-spacing: 0.5px;
}

.court-loc {
    font-size: 0.6rem;
    color: #cccccc;
    margin-top: 2px;
}

.logo-divider {
    width: 40px;
    height: 2px;
    background-color: var(--gold-accent);
    margin-top: 5px;
    display: block; /* Visible in default state */
}

/* --- NAVIGATION STYLING --- */
.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav ul li a {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff; /* White links initially */
    text-transform: uppercase;
    transition: color 0.3s;
    position: relative;
    padding-bottom: 5px;
}

/* Gold Underline for Active Item */
nav ul li a.active::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--gold-accent);
    bottom: -5px; /* Position below text */
    left: 0;
}

nav ul li a i {
    font-size: 0.7rem;
    margin-left: 3px;
    vertical-align: middle;
}

/* --- ICONS --- */
.header-icons {
    display: flex;
    gap: 20px;
    color: #ffffff; /* White icons initially */
    font-size: 1.2rem;
    cursor: pointer;
}

/* ========================================= */
/* === SIDEBAR (OFF-CANVAS MENU) STYLES === */
/* ========================================= */

/* The Sidebar Container */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    transform: translateX(100%); /* Hidden off-screen via transform to prevent scrollbars */
    width: 400px;
    max-width: 100%;
    height: 100vh;
    background: #ffffff;
    box-shadow: -5px 0 30px rgba(0,0,0,0.2);
    z-index: 2000; /* On top of everything */
    padding: 40px;
    box-sizing: border-box;
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.4s ease;
    overflow-y: auto; /* Scrollable if content is long */
    overflow-x: hidden;
    visibility: hidden;
    pointer-events: none;
}

/* Class added via JS to show it */
.sidebar.active {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

/* Close Button (X) */
.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    cursor: pointer;
    color: #333;
    transition: 0.3s;
}

.close-btn:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

/* Sidebar Headings (Gold Underline Style) */
.sidebar h3 {
    font-size: 1.5rem;
    color: #000;
    margin-bottom: 25px;
    margin-top: 40px;
    font-family: 'Poppins', serif;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

/* The Gold Underline */
.sidebar h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--gold-accent);
    margin-top: 8px;
}

/* --- RECENT POSTS SECTION --- */
.sidebar-post {
    margin-bottom: 20px;
}

.sidebar-post a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.4;
    display: block;
    transition: 0.3s;
}

.sidebar-post a:hover {
    color: var(--primary-color);
}

/* --- CONTACT US SECTION --- */
.contact-item {
    display: flex;
    align-items: start;
    gap: 15px;
    margin-bottom: 20px;
    color: #444;
    font-size: 1rem;
}

.contact-item i {
    color: #000; /* Black icons like image */
    font-size: 1.1rem;
    margin-top: 3px;
}

.contact-item p {
    margin: 0;
    line-height: 1.6;
}

/* --- SOCIAL ICONS SECTION --- */
.social-links {
    display: flex;
    gap: 15px;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    text-decoration: none;
    transition: transform 0.3s;
}

.social-btn:hover {
    transform: translateY(-3px);
}

/* Brand Colors */
.fb { background: #3b5998; }
.tw { background: #1da1f2; }
.ln { background: #0077b5; }
.in { background: #e1306c; }


/* --- RESPONSIVE FIX (Mobile) --- */
@media screen and (max-width: 768px) {
    .sidebar {
        width: 100% !important;
        max-width: 100% !important;
        right: 0 !important;
        padding: 20px !important;
        box-sizing: border-box !important;
    }
    
    /* Show Navigation Links inside sidebar on mobile only */
    .mobile-nav-links {
        display: block !important;
        margin-bottom: 30px;
        border-bottom: 1px solid #eee;
        padding-bottom: 20px;
    }
    .mobile-nav-links li {
        list-style: none;
        margin-bottom: 15px;
    }
    .mobile-nav-links a {
        font-size: 1.2rem;
        color: var(--primary-color);
        font-weight: bold;
        text-decoration: none;
    }
}

/* ========================================= */
/* === STICKY STATE (Matches Screenshot 1) === */
/* ========================================= */

header.sticky, #main-header.sticky {
    background: #ffffff !important; /* Turns White */
    box-shadow: 0 4px 15px rgba(0,0,0,0.08) !important; /* Adds Drop Shadow */
    padding: 10px 40px;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
}

/* Change Text Colors to Dark when Sticky */
header.sticky .court-name, #main-header.sticky .court-name {
    color: #000000 !important;
}

header.sticky .court-sub, 
header.sticky .court-loc,
#main-header.sticky .court-sub,
#main-header.sticky .court-loc {
    color: #555555 !important;
}

header.sticky nav ul li a, #main-header.sticky nav ul li a {
    color: #000000 !important; /* Pure Black Nav Links */
}

header.sticky nav ul li a i, #main-header.sticky nav ul li a i {
    color: #000000 !important; /* Black dropdown chevron icons */
}

header.sticky nav ul li a.active, #main-header.sticky nav ul li a.active {
    color: var(--gold-accent, #c5a059) !important; /* Keep Gold indicator on active */
}

header.sticky .header-icons, #main-header.sticky .header-icons,
header.sticky .header-icons i, #main-header.sticky .header-icons i {
    color: #000000 !important; /* Pure Black Icons */
}

header.sticky .logo-container img, #main-header.sticky .logo-container img {
    height: 40px; /* Fits cleanly inside header */
}

/* Hover Effects (Works for both states) */
nav ul li a:hover, header.sticky nav ul li a:hover, #main-header.sticky nav ul li a:hover {
    color: var(--gold-accent) !important;
}

/* --- HERO SECTION WRAPPER --- */
.hero {
    position: relative;
    margin-top: var(--header-height, 60px) !important;
    height: calc(100vh - var(--header-height, 60px)) !important;
    min-height: calc(100vh - var(--header-height, 60px)) !important;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden !important; /* Prevents scrollbars if images are too big */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Remove manual line breaks in hero-content to maintain perfect vertical centering */
.hero-content > br {
    display: none !important;
}

/* --- THE SLIDESHOW (Background) --- */
.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    z-index: 1; /* Lowest layer */
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    background-size: cover;
    background-position: center;
    opacity: 0; /* Hidden by default */
    transition: opacity 1.5s ease-in-out; /* Smooth fade effect */
}

.slide.active {
    opacity: 1; /* Visible when active */
    transform: scale(1.05); /* Optional: Slow zoom effect */
    transition: opacity 1.5s ease-in-out, transform 6s linear;
}

/* --- THE GRADIENT OVERLAY --- */
/* This sits between the image and the text to ensure text is readable */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(15, 5, 5, 0.35) 0%, rgba(20, 5, 5, 0.55) 100%);
    z-index: 2; /* Middle layer */
}

/* --- THE CONTENT (Text) --- */
.hero-content {
    position: relative;
    z-index: 3; /* Top layer */
    text-align: center;
    color: white;
    padding: 0 20px;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px auto;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin-bottom: 30px;
}

.btn-gold {
    background-color: var(--gold-accent);
    color: var(--primary-color);
    padding: 12px 30px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-gold:hover {
    background-color: #fff;
    color: var(--primary-color);
}

/* --- CARDS SECTION --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 50px 8%;
    margin-top: -50px;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
    border-top: 4px solid var(--primary-color);
}

.card:hover {
    transform: translateY(-10px);
    border-top: 4px solid var(--gold-accent);
}

.card h3 {
    margin-top: 15px;
    color: var(--primary-color);
}

/* --- FOOTER STYLES --- */
footer {
    background-color: var(--primary-color);
    color: #ccc;
    padding: 60px 8% 20px;
    margin-top: 50px;
    border-top: 5px solid var(--gold-accent);
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--gold-accent);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col p, .footer-col a {
    font-size: 0.9rem;
    color: #ddd;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: 0.3s;
}

.footer-col a:hover {
    color: var(--gold-accent);
    padding-left: 5px;
}

.contact-info i {
    color: var(--gold-accent);
    margin-right: 10px;
}

.copyright {
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    padding-top: 20px;
    font-size: 0.85rem;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--gold-accent);
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* --- 1. GLOBAL SCROLL ANIMATION (The "Reveal" Class) --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- 2. SERVICE CARDS HOVER EFFECTS --- */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.card:hover {
    transform: translateY(-10px); /* Lift up */
    box-shadow: 0 15px 30px rgba(0,0,0,0.15); /* deeper shadow */
}

/* Icon Animation inside card */
.card i {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover i {
    transform: scale(1.2); /* Pop effect */
}

/* --- 3. NEWS CARDS ZOOM EFFECT --- */
.news-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15) !important;
}

/* Image Zoom inside News Card */
.news-card img {
    transition: transform 0.6s ease;
}

.news-card:hover img {
    transform: scale(1.08); /* Subtle zoom in */
}

/* --- 4. IMAGE HOVER EFFECTS (Welcome & Charter) --- */
.hover-scale {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    display: block;
}

.hover-scale:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2) !important;
}

/* --- 5. CITIZEN CHARTER LIST EFFECTS --- */
.charter-list li {
    transition: transform 0.3s ease;
    cursor: default;
}

.charter-list li:hover {
    transform: translateX(10px); /* Slide right slightly */
}

/* ========================================= */
/* === RESPONSIVE MEDIA QUERIES === */
/* ========================================= */

/* --- TABLETS & SMALL LAPTOPS (Max Width: 1024px) --- */
@media screen and (max-width: 1024px) {
    header {
        padding: 10px 20px;
    }

    .hero h2 {
        font-size: 2.8rem;
    }

    .services-grid {
        padding: 40px 5%;
    }

    .reveal {
        padding: 40px 5% !important;
    }
}

/* --- MOBILE DEVICES (Max Width: 768px) --- */
@media screen and (max-width: 768px) {
    
    /* 1. Header Adjustments */
    header, header.sticky {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        position: fixed !important;
        background: rgba(96, 0, 0, 0.95) !important;
        height: auto;
        padding: 10px 15px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
    }

    .logo-container {
        margin-bottom: 0 !important;
        flex-direction: row !important;
        align-items: center !important;
        text-align: left !important;
    }
    
    .court-logo {
        width: 200px !important;
        max-width: 60vw !important;
        height: auto !important;
    }

    /* Force white logo and hide black logo on mobile even when scrolling/sticky */
    header.sticky .logo-1, .logo-1 {
        display: none !important;
    }
    header.sticky .logo-2, .logo-2 {
        display: block !important;
    }

    #navbar {
        display: none !important;
    }

    .header-icons, header.sticky .header-icons {
        display: flex !important;
        align-items: center !important;
        gap: 15px !important;
        font-size: 1.15rem !important;
        color: #ffffff !important;
    }

    /* Mobile Typography Scaling */
    h1, .page-hero h1 {
        font-size: 1.6rem !important;
        line-height: 1.3 !important;
    }

    h2, .page-hero h2, .section-header h2, .jurisdiction-framework-section h2, .jurisdiction-intro h2, .about-content h2, .welcome-text h2, .structure-title {
        font-size: 1.45rem !important;
        line-height: 1.35 !important;
    }

    h3, .section-header h3, .jurisdiction-col h3, .service-card h3 {
        font-size: 1.2rem !important;
        line-height: 1.35 !important;
    }

    .page-hero {
        height: auto !important;
        min-height: 200px !important;
        padding: 45px 15px 35px 15px !important;
    }

    .page-hero p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }

    .jurisdiction-framework-section {
        padding: 40px 15px !important;
    }

    .jurisdiction-framework-section h2 {
        font-size: 1.45rem !important;
        margin-bottom: 10px !important;
    }

    .jurisdiction-framework-section h3 {
        font-size: 1.2rem !important;
        margin-bottom: 15px !important;
    }

    .content-section, .about-section, .structure-section, .history-section {
        padding: 40px 15px !important;
    }

    .sub-title {
        font-size: 0.8rem !important;
        letter-spacing: 1px !important;
    }

    /* 2. Hero Section */
    .hero {
        height: 70vh !important;
        margin-top: 0; 
    }

    .hero-content {
        padding: 0 15px !important;
    }

    .hero-content h2 {
        font-size: 1.65rem !important;
        line-height: 1.3 !important;
        margin-bottom: 15px !important;
    }

    .hero-content p {
        font-size: 0.9rem !important;
        margin-bottom: 20px !important;
    }

    /* 3. Services Cards / Board Adjustments */
    .services-grid {
        margin-top: 15px !important;
        grid-template-columns: 1fr !important;
        padding: 30px 15px !important;
        gap: 15px !important;
    }

    .services-extended-grid {
        padding: 50px 15px !important;
        text-align: center !important;
    }

    .services-extended-grid h2 {
        font-size: 1.5rem !important;
        margin-bottom: 30px !important;
    }

    .services-extended-grid a {
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }

    /* Stack the "Welcome" and "News" sections vertically */
    .reveal {
        flex-direction: column !important;
        padding: 40px 15px !important;
        gap: 25px !important;
    }

    .welcome-img, .hover-scale {
        margin-top: 20px;
        width: 100% !important;
        height: auto !important;
        min-height: 250px !important;
        position: relative !important;
    }

    /* 4. Footer Centering */
    footer {
        padding: 40px 15px 20px !important;
        text-align: center !important;
    }

    .footer-container {
        grid-template-columns: 1fr !important;
        gap: 35px !important;
        text-align: center !important;
    }

    .footer-col {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    .footer-col .logo-container, .footer-col .footer-logo-wrap {
        display: flex !important;
        justify-content: center !important;
        margin: 0 auto 15px auto !important;
        width: 100% !important;
    }

    .footer-col .logo-container img, .footer-col .footer-logo {
        margin: 0 auto !important;
        display: block !important;
    }

    .footer-col h3 {
        text-align: center !important;
        margin-bottom: 15px !important;
    }

    .footer-col p {
        text-align: center !important;
        max-width: 450px !important;
        margin: 0 auto 12px auto !important;
        line-height: 1.6 !important;
    }

    .footer-col .contact-info {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }

    .footer-col .contact-info p {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        margin-bottom: 8px !important;
    }

    .footer-col a {
        display: inline-block !important;
        text-align: center !important;
        padding: 4px 0 !important;
    }

    .footer-col a:hover {
        padding-left: 0 !important;
        color: var(--gold-accent) !important;
    }

    .copyright {
        text-align: center !important;
        padding-top: 20px !important;
    }

    /* 5. Judges Slider Mobile Fix */
    .judges-slider-section {
        padding: 30px 15px !important;
        margin: 30px auto !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        border-radius: 0 !important;
    }

    .judges-slider-wrapper {
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 20px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .judges-carousel-container {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .judge-slide {
        padding: 0 10px !important;
        gap: 15px !important;
        box-sizing: border-box !important;
    }

    .judge-img {
        width: 80px !important;
        height: 80px !important;
        min-width: 80px !important;
        flex-shrink: 0 !important;
    }

    .judge-info h3 {
        font-size: 1.05rem !important;
        line-height: 1.35 !important;
        word-break: break-word !important;
    }

    .judge-info p {
        font-size: 0.85rem !important;
    }

    .judges-dots-container {
        justify-content: center !important;
        width: 100% !important;
        padding-top: 5px !important;
    }
}

/* --- SMALL MOBILE (Max Width: 480px) --- */
@media screen and (max-width: 480px) {
    .hero-content h2 {
        font-size: 1.55rem !important;
    }

    .court-name {
        font-size: 1.1rem !important;
    }

    .btn-gold {
        padding: 12px 25px !important;
        font-size: 0.95rem !important;
        width: auto !important;
        display: inline-block !important;
        text-align: center !important;
    }
    
    .court-logo {
        width: 125px !important;
    }

    .judge-slide {
        flex-direction: row !important;
        align-items: center !important;
        text-align: left !important;
        gap: 12px !important;
    }

    .judge-img {
        width: 70px !important;
        height: 70px !important;
        min-width: 70px !important;
    }

    .judge-info h3 {
        font-size: 0.95rem !important;
    }
}

/* ========================================= */
/* === DROPDOWN MENU STYLING === */
/* ========================================= */

/* 1. The Parent Container (About Us) */
.dropdown {
    position: relative; /* Anchors the dropdown to this button */
    padding-bottom: 15px; /* Adds invisible space so mouse doesn't disconnect when moving down */
    margin-bottom: -15px; /* Counteracts the padding */
}

/* 2. The Dropdown Box (Hidden by default) */
.dropdown-content {
    position: absolute;
    top: 100%; /* Positioned right below the parent */
    left: 0;
    background-color: #ffffff; /* White Background like screenshot */
    min-width: 260px; /* Width of the box */
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); /* Soft shadow */
    border-top: 3px solid var(--gold-accent); /* Gold line at the top */
    
    /* Animation Properties */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px); /* Start slightly lower */
    transition: all 0.3s ease;
    
    /* Reset List Styles for the dropdown */
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
    z-index: 9999;
}

/* 3. Show on Hover */
.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0); /* Slide up into place */
}

/* 4. Dropdown Links */
.dropdown-content li {
    width: 100%;
    margin: 0; /* Remove any default margins */
}

.dropdown-content li a {
    color: #444444 !important; /* Dark Grey Text */
    padding: 12px 25px;
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: none; /* Normal casing (not all caps) */
    border-bottom: 1px solid #f5f5f5; /* Light separator line */
    transition: all 0.2s ease;
}

/* Remove the main nav's gold underline effect for these items */
.dropdown-content li a::after {
    display: none;
}

/* 5. Hover Effect on Items */
.dropdown-content li a:hover {
    background-color: #f9f9f9; /* Light grey background */
    color: var(--primary-color) !important; /* Turns Maroon */
    padding-left: 30px; /* Small slide-right animation */
    border-left: 3px solid var(--gold-accent); /* Gold indicator on left */
}

/* ========================================= */
/* === HISTORY PAGE STYLES === */
/* ========================================= */

/* 1. Page Hero (Smaller than Home Hero) */


/* Optional: Style the text inside */
.page-hero h1 {
    font-size: 3.5rem;
    font-family: 'Poppins', serif;
    margin-bottom: 15px;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.page-hero p {
    font-size: 1.2rem;
    max-width: 800px;
    color: #e0e0e0;
    
    /* THE FIX: This centers the text block horizontally */
    margin: 0 auto; 
}
/* 2. History Content Layout */
.history-section {
    padding: 80px 8%;
    background-color: #fff;
}

.history-container {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
}

/* Left Column (Text) */
.history-text {
    flex: 2;
    min-width: 300px;
}

.sub-title {
    color: var(--gold-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.history-text h2 {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.history-text h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
    font-family: 'Poppins', serif;
}

.gold-divider {
    width: 60px;
    height: 4px;
    background-color: var(--gold-accent);
    margin-bottom: 30px;
}

.history-text p {
    color: #444;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.05rem;
    text-align: justify;
}

/* Blockquote Style */
blockquote {
    border-left: 4px solid var(--gold-accent);
    background: #f9f9f9;
    padding: 20px;
    font-style: italic;
    font-family: 'Poppins', serif;
    font-size: 1.2rem;
    color: var(--primary-color);
    margin: 30px 0;
}

blockquote span {
    display: block;
    font-size: 0.8rem;
    margin-top: 10px;
    color: #888;
    font-family: 'Poppins', serif;
    font-style: normal;
    text-transform: uppercase;
}

/* Right Column (Sidebar) */
.history-sidebar {
    flex: 1;
    min-width: 300px;
}

.image-box img {
    width: 100%;
    border-radius: 5px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.caption {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
    margin-top: 10px;
    font-style: italic;
}

/* Timeline Box */
.timeline-box {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 8px;
    margin-top: 40px;
    border-top: 4px solid var(--primary-color);
}

.timeline-box h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.timeline-box ul {
    list-style: none;
    border-left: 2px solid #ddd;
    padding-left: 20px;
}

.timeline-box ul li {
    margin-bottom: 25px;
    position: relative;
}

.timeline-box ul li::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--gold-accent);
    border-radius: 50%;
}

.year {
    display: block;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.event {
    font-size: 0.9rem;
    color: #555;
}

/* Responsive Fix for History Page */
@media screen and (max-width: 768px) {
    .page-hero h1 {
        font-size: 2rem;
    }
    
    .history-container {
        flex-direction: column;
        gap: 40px;
    }
}

/* ========================================= */
/* === JUDGES PAGES STYLES === */
/* ========================================= */

.content-section {
    padding: 80px 8%;
    background-color: #fff;
    min-height: 60vh;
}

.section-header {
    margin-bottom: 50px;
}

/* --- Current Judges Grid (2 Columns) --- */
.judges-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 40px;
}

.judge-list {
    list-style: none;
    padding: 0;
}

.judge-list li {
    font-size: 1.05rem;
    font-weight: 600; /* Bold names */
    color: #444;
    padding: 15px 0;
    border-bottom: 1px solid #eee; /* Light separator line */
    display: flex;
    align-items: center;
    transition: padding-left 0.3s ease, color 0.3s ease;
}

.judge-list li i {
    color: var(--gold-accent); /* Gold Arrow */
    margin-right: 15px;
    font-size: 0.9rem;
}

/* Hover Effect for List Items */
.judge-list li:hover {
    color: var(--primary-color);
    padding-left: 10px; /* Slight slide right */
}


/* --- Past Judges List (Multi-Column Flow) --- */
.past-judges-container ul {
    list-style: none;
    padding: 0;
    
    /* CSS Columns Magic */
    column-count: 2; 
    column-gap: 60px;
}

.past-judges-container ul li {
    font-size: 0.95rem;
    color: #555;
    padding: 8px 0;
    border-bottom: 1px dashed #eee; /* Dashed line for older lists */
    break-inside: avoid; /* Prevents splitting a name between columns */
}

.past-judges-container ul li:before {
    content: "•"; /* Bullet point */
    color: var(--gold-accent);
    margin-right: 10px;
    font-size: 1.2rem;
    line-height: 1;
    vertical-align: sub;
}

/* --- Responsive Layout --- */
@media screen and (max-width: 768px) {
    .judges-grid {
        grid-template-columns: 1fr; /* 1 Column on Mobile */
        gap: 0;
    }
    
    .past-judges-container ul {
        column-count: 1; /* 1 Column on Mobile */
    }
}

/* ========================================= */
/* === CEREMONIAL SPEECHES PAGE STYLES === */
/* ========================================= */

.speech-section {
    padding: 80px 8%;
    background-color: #fff;
}

.speech-container {
    max-width: 900px; /* Limits width for better reading experience */
    margin: 0 auto;   /* Centers the container */
    background: #ffffff;
}

/* Header Styling */
.speech-header {
    text-align: center;
    margin-bottom: 50px;
}

.speech-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.fancy-text {
    font-family: 'Poppins', serif;
    font-style: italic;
    color: var(--gold-accent);
}

.center-divider {
    margin: 0 auto 30px auto; /* Centers the gold line */
}

.speech-meta {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.8;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    border-left: 4px solid var(--gold-accent);
    display: inline-block;
    text-align: left;
}

/* Body Text Styling */
.speech-body {
    font-family: 'Poppins', serif; /* Clean readable font */
    font-size: 1.1rem;
    line-height: 1.9; /* More breathing room for text */
    color: #333;
    text-align: justify; /* Justified text like the screenshot */
}

.speech-body p {
    margin-bottom: 25px;
}

.speech-body blockquote {
    font-size: 1.4rem;
    text-align: center;
    color: var(--primary-color);
    border: none; /* Remove side border for this page */
    padding: 30px 40px;
    position: relative;
}

/* Add quote icons */
.speech-body blockquote::before {
    content: '\201C'; /* Left quote */
    font-size: 4rem;
    color: var(--gold-accent);
    position: absolute;
    top: -10px;
    left: 0;
    opacity: 0.3;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .speech-title {
        font-size: 2rem;
    }
    .speech-body {
        text-align: left; /* Justify looks bad on small screens */
        padding: 0 10px;
    }
}

/* ========================================= */
/* === DATA TABLES & FORMS (Court Diary) === */
/* ========================================= */

.filter-container {
    background: #f4f4f4;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #555;
    font-weight: 600;
}

.form-control {
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 250px;
    font-family: 'Poppins', serif;
}

/* Custom Table Design */
.table-responsive {
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.custom-table th {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.custom-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    color: #444;
    font-size: 0.95rem;
}

.custom-table tr:hover {
    background-color: #fcfcfc;
}

/* Download Button in Table */
.btn-download {
    background-color: #444;
    color: white;
    padding: 8px 15px;
    font-size: 0.75rem;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 3px;
    transition: 0.3s;
    display: inline-block;
}

.btn-download:hover {
    background-color: var(--gold-accent);
    color: var(--primary-color);
}

/* Clock for Live Cases */
.clock-wrapper {
    text-align: center;
    padding: 50px 0;
}

.clock-icon {
    font-size: 6rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

/* ========================================= */
/* === NESTED DROPDOWN STYLES (Sub-menus) === */
/* ========================================= */

/* 1. Parent Item Container */
.dropdown-submenu {
    position: relative; /* Essential for positioning the child menu */
}

/* 2. The Nested Menu (Hidden by default) */
.submenu-content {
    position: absolute;
    top: 0;
    left: 100%; /* Pushes it to the right side */
    width: 260px; /* Width of the sub-menu */
    background-color: #ffffff;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.1);
    border-left: 3px solid var(--gold-accent); /* Gold border on the connecting edge */
    
    /* Hide initially */
    display: none;
    list-style: none;
    padding: 10px 0;
    z-index: 1002;
    margin-left: -2px; /* Slight overlap to prevent mouse gap */
}

/* 3. Show on Hover */
.dropdown-submenu:hover > .submenu-content {
    display: block;
    animation: slideRight 0.3s ease;
}

/* 4. Sub-menu Links Styling (Reusing existing style) */
.submenu-content li a {
    color: #444;
    padding: 12px 25px;
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    transition: 0.2s;
}

.submenu-content li a:hover {
    background-color: #f9f9f9;
    color: var(--primary-color) !important;
    padding-left: 30px;
}

/* Animation for the sub-menu */
@keyframes slideRight {
    from { 
        opacity: 0; 
        transform: translateX(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

/* ========================================= */
/* === NEWS & NOTICES PAGE STYLES === */
/* ========================================= */

.news-item-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05); /* Soft shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px;
}

.news-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.news-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 15px;
}

.news-meta i {
    margin-right: 5px;
    color: var(--gold-accent);
}

.news-title {
    font-size: 1.2rem;
    color: #333;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 25px;
}

/* Black Button Style (from screenshot) */
.btn-black {
    background-color: #000;
    color: #fff;
    padding: 10px 25px;
    border-radius: 30px; /* Fully rounded pill shape */
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    align-self: flex-start; /* Aligns button to left */
    transition: background 0.3s ease;
}

.btn-black:hover {
    background-color: var(--gold-accent); /* Turns gold on hover */
    color: #000;
}
 
/* hero height and color update */

.page-hero {
    /* Lowered opacity to 0.3 and added !important to override the HTML inline style */
    background: linear-gradient(rgba(96, 0, 0, 0.4), rgba(96, 0, 0, 0.4)), url('images/judge-s-gavel-table-court-room-closeup-concept-justice-law-generative-ai.jpg') !important;
    
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    
    /* THE FIX: Add !important to force this height over the inline 40vh */
    height: 45vh !important; 
    
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 0;
    padding-top: 95px;
}

/* ==========================================================================
   Comprehensive Mobile Responsive Typography and Layout Polish
   ========================================================================== */
@media screen and (max-width: 768px) {
    .page-hero {
        height: auto !important;
        min-height: 180px !important;
        padding: 85px 15px 35px 15px !important;
    }

    .page-hero h1, h1 {
        font-size: 1.55rem !important;
        line-height: 1.3 !important;
    }

    .page-hero p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }

    .jurisdiction-framework-section {
        padding: 40px 15px !important;
    }

    .jurisdiction-framework-section h2, .section-header h2, .jurisdiction-intro h2, .about-content h2, .welcome-text h2, .structure-title {
        font-size: 1.45rem !important;
        line-height: 1.3 !important;
    }

    .jurisdiction-framework-section h3, .section-header h3, .jurisdiction-col h3, .service-card h3 {
        font-size: 1.2rem !important;
        line-height: 1.3 !important;
    }
}

@media screen and (max-width: 480px) {
    .page-hero {
        padding: 80px 12px 25px 12px !important;
        min-height: 160px !important;
    }

    .page-hero h1, h1 {
        font-size: 1.35rem !important;
        letter-spacing: 0.5px !important;
    }

    .page-hero p {
        font-size: 0.82rem !important;
    }

    .jurisdiction-framework-section h2, .section-header h2, .structure-title {
        font-size: 1.25rem !important;
    }

    .jurisdiction-framework-section h3, .jurisdiction-col h3 {
        font-size: 1.1rem !important;
    }
}