/* ==========================================================================
   ADV. SUNIL PANWAR - OFFICIAL WEBSITE STYLESHEET
   Premium Legal Theme | Baghpat District Court
   ========================================================================== */

/* --- 1. CSS VARIABLES (THEME COLORS & SETTINGS) --- */
:root {
    /* Core Colors */
    --primary-dark: #050d1a;       /* Deepest Navy / Black */
    --primary-main: #0a192f;       /* Standard Legal Navy */
    --primary-light: #112240;      /* Lighter Navy for cards */
    
    /* Accents */
    --accent-gold: #d4af37;        /* Metallic Gold */
    --accent-gold-hover: #b5952f;  /* Darker Gold for hover states */
    --accent-green: #25D366;       /* WhatsApp Official Green */
    --accent-blue: #1877F2;        /* Facebook Official Blue */
    
    /* Text Colors */
    --text-light: #f8f9fa;         /* Off-white for dark backgrounds */
    --text-muted: #a8b2d1;         /* Muted blue-gray for secondary text */
    --text-dark: #2d3748;          /* Slate dark for light backgrounds */
    --text-gray: #4a5568;          /* Medium gray for paragraph text */
    
    /* Backgrounds */
    --bg-main: #ffffff;            /* Pure white */
    --bg-light: #f4f7f6;           /* Soft gray for alternating sections */
    
    /* Structural settings */
    --transition-fast: 0.3s ease-in-out;
    --transition-slow: 0.8s ease-in-out;
    --border-radius-sm: 5px;
    --border-radius-md: 10px;
    --border-radius-lg: 15px;
    --box-shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    --box-shadow-strong: 0 15px 35px -5px rgba(0, 0, 0, 0.2);
}

/* --- 2. RESET & BASE STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* Enables smooth scrolling when clicking nav links */
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden; /* Prevents horizontal scrolling */
}

/* Custom Scrollbar for the whole page */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--primary-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold-hover);
}

/* Utility Classes */
.bg-light { background-color: var(--bg-light); }
.bg-dark { background-color: var(--primary-main); }
.text-white { color: var(--text-light) !important; }
.text-light { color: var(--text-light) !important; }

/* --- 3. LAYOUT CONTAINERS --- */
.section-container {
    padding: 100px 20px;
    position: relative;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 3rem;
    color: var(--primary-main);
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent-gold);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-gray);
    max-width: 800px;
    margin: 0 auto 50px auto;
}

/* --- 4. HEADER & NAVIGATION --- */
#main-header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(10, 25, 47, 0.95); /* Semi-transparent navy */
    backdrop-filter: blur(10px); /* Premium glass effect */
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: var(--transition-fast);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-fast);
}

.logo:hover {
    transform: scale(1.02);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links li a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
    transition: var(--transition-fast);
}

/* Hover underline effect for links */
.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-gold);
    transition: width 0.3s ease;
}

.nav-links li a:hover {
    color: var(--accent-gold);
}

.nav-links li a:hover::after {
    width: 100%;
}

/* Hamburger Menu Icon */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
}

.hamburger .line {
    width: 30px;
    height: 3px;
    background-color: var(--accent-gold);
    border-radius: 3px;
    transition: var(--transition-fast);
}

/* --- 5. HERO SECTION & SLIDESHOW ANIMATION --- */
.hero-section {
    height: 100vh;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    overflow: hidden;
}

.slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: var(--primary-dark);
}

/* CSS TRANSITION EFFECT FOR CHANGING IMAGES */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center 20%;
    background-repeat: no-repeat;
    opacity: 0;
    /* Smooth 1.5s crossfade, plus a slow 8s zoom for cinematic feel */
    transition: opacity 1.5s ease-in-out, transform 8s linear;
    transform: scale(1);
    filter: brightness(1.1) contrast(1.1); /* Enhances image clarity */
}

.slide.active-slide {
    opacity: 1;
    /* Zoom in slightly while the slide is active */
    transform: scale(1.08); 
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Dark gradient overlay so text remains perfectly readable */
    background: linear-gradient(135deg, rgba(5, 13, 26, 0.85) 0%, rgba(10, 25, 47, 0.65) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    margin-top: 50px;
    animation: fadeInUp 1.2s ease forwards;
}

.hero-content h1 {
    font-size: 4.5rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.hero-content h2 {
    font-size: 2.2rem;
    color: var(--text-light);
    font-weight: 300;
    margin-bottom: 25px;
}

.hero-content p {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.8;
}

/* --- 6. BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 35px;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition-fast);
    cursor: pointer;
    border: none;
}

.primary-btn {
    background-color: var(--accent-gold);
    color: var(--primary-dark);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
}

.primary-btn:hover {
    background-color: var(--accent-gold-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.wa-btn {
    background-color: var(--accent-green);
    color: white;
    font-size: 1.1rem;
    padding: 12px 25px;
}

.wa-btn:hover {
    background-color: #1ebe57;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

.facebook-btn {
    background-color: var(--accent-blue);
    color: white;
    width: 100%;
}

.facebook-btn:hover {
    background-color: #155db2;
    transform: translateY(-2px);
}

/* --- 7. ABOUT SECTION --- */
.about-card {
    background-color: var(--bg-main);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-soft);
    padding: 50px;
    border-top: 5px solid var(--accent-gold);
}

.quote-box {
    background-color: var(--bg-light);
    padding: 25px 30px;
    border-left: 6px solid var(--accent-gold);
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
    margin-bottom: 35px;
}

.highlight-quote {
    font-size: 1.6rem;
    color: var(--primary-main);
    font-style: italic;
    font-weight: 600;
}

.about-text-body p {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.about-text-body strong {
    color: var(--primary-main);
}

/* --- 8. GALLERY (RESPECTED MOMENTS) --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--box-shadow-soft);
    background-color: #000;
    aspect-ratio: 4 / 5;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.6s ease;
    filter: brightness(1.05) contrast(1.1); /* Matches clarity of hero images */
}

.gallery-item:hover img {
    transform: scale(1.08);
    opacity: 0.8;
}

.gallery-caption {
    position: absolute;
    bottom: -100px; /* Hidden initially */
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(5, 13, 26, 0.95));
    color: var(--text-light);
    padding: 40px 20px 20px 20px;
    text-align: center;
    transition: bottom 0.4s ease-in-out;
}

.gallery-item:hover .gallery-caption {
    bottom: 0; /* Slides up on hover */
}

.gallery-caption h4 {
    color: var(--accent-gold);
    font-size: 1.3rem;
    margin-bottom: 5px;
}

/* --- 9. LAWS DIRECTORY & SEARCH --- */
.search-container {
    max-width: 700px;
    margin: 0 auto 40px auto;
    position: relative;
}

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

.search-box {
    width: 100%;
    padding: 20px 20px 20px 55px;
    font-size: 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    outline: none;
    box-shadow: var(--box-shadow-soft);
    transition: var(--transition-fast);
}

.search-box:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
}

.laws-database {
    max-height: 800px;
    overflow-y: auto;
    padding: 10px;
}

/* Law card container scrollbar */
.laws-database::-webkit-scrollbar { width: 8px; }
.laws-database::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
.laws-database::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 10px; }

.law-card {
    background-color: var(--bg-main);
    padding: 30px;
    border-radius: var(--border-radius-md);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 6px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: var(--transition-fast);
}

.law-card:hover {
    border-left-color: var(--accent-gold);
    transform: translateX(10px); /* Smooth slide right on hover */
    box-shadow: var(--box-shadow-strong);
}

.law-details {
    flex: 1;
    padding-right: 30px;
}

.law-title {
    font-size: 1.4rem;
    color: var(--primary-main);
    margin-bottom: 10px;
}

.law-description {
    font-size: 1.1rem;
    color: var(--text-gray);
}

.no-results-box {
    text-align: center;
    padding: 50px;
    background: var(--bg-light);
    border-radius: var(--border-radius-md);
}

/* --- 10. CONTACT SECTION --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    margin-top: 30px;
}

.contact-info-panel {
    background-color: var(--primary-light);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-strong);
}

.contact-info-panel h3 {
    font-size: 2.2rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

.contact-intro {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.contact-list {
    list-style: none;
    margin-bottom: 40px;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
}

.contact-list i {
    font-size: 1.8rem;
    margin-top: 5px;
}

.icon-gold { color: var(--accent-gold); }
.icon-green { color: var(--accent-green); }

.contact-text strong {
    display: block;
    font-size: 1.2rem;
    color: var(--text-light);
}

.contact-text span {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.map-embed-panel iframe {
    width: 100%;
    height: 100%;
    min-height: 450px;
    border-radius: var(--border-radius-lg);
    border: none;
}

/* --- 11. FOOTER --- */
#main-footer {
    background-color: var(--primary-dark);
    color: var(--text-light);
    text-align: center;
    padding: 40px 20px;
    border-top: 3px solid var(--accent-gold);
}

.footer-brand {
    font-size: 2rem;
    color: var(--accent-gold);
    margin-bottom: 10px;
}

.footer-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.footer-divider {
    width: 50px;
    height: 2px;
    background-color: var(--accent-gold);
    margin: 20px auto;
}

.disclaimer {
    font-size: 0.85rem;
    color: #666;
    margin-top: 15px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* --- 12. ANIMATIONS & KEYFRAMES --- */
/* For initial load animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Class used by JS to trigger scroll animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- 13. RESPONSIVE MEDIA QUERIES --- */
@media screen and (max-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .hero-content h1 {
        font-size: 3.5rem;
    }
}

@media screen and (max-width: 768px) {
    .section-container {
        padding: 70px 20px;
    }
    
    .section-title {
        font-size: 2.3rem;
    }

    /* Mobile Hamburger Menu Logic */
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background-color: var(--primary-main);
        width: 100%;
        text-align: center;
        padding: 30px 0;
        transition: 0.5s ease-in-out;
        box-shadow: 0 10px 15px rgba(0,0,0,0.3);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 15px 0;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .law-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .law-details {
        padding-right: 0;
    }

    .map-embed-panel iframe {
        min-height: 350px;
    }
}
