/* =========================================================================
   CSS Variables & Theming
   ========================================================================= */
:root {
    /* Colors based on aesthetic requirements (deep saffrons, earthy browns, off-whites) */
    --primary-saffron: #F39C12;
    --deep-saffron: #D35400;
    --earthy-brown: #5C4033;
    --dark-brown: #3E2723;
    --soft-off-white: #FDFBF7;
    --white: #FFFFFF;
    
    --text-dark: #2C3E50;
    --text-muted: #7F8C8D;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout */
    --max-width: 1200px;
    --header-height: 80px;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* =========================================================================
   Reset & Base Styles
   ========================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--dark-brown);
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

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

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.section {
    padding: 5rem 0;
}

.bg-light { background-color: var(--soft-off-white); }
.bg-dark { background-color: var(--dark-brown); color: var(--white); }
.bg-dark h2, .bg-dark h3 { color: var(--white); }

.bg-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* =========================================================================
   Buttons & Badges
   ========================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--deep-saffron);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-saffron);
}

.full-width { width: 100%; }

.section-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border: 1px solid rgba(211, 84, 0, 0.3);
    border-radius: 50px;
    color: var(--deep-saffron);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}
.section-badge.center {
    display: flex;
    margin: 0 auto 1rem auto;
    width: max-content;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}
.text-center { text-align: center; }

/* =========================================================================
   Navigation
   ========================================================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.5); /* Lower opacity for frosted effect */
    backdrop-filter: blur(12px); /* Increased blur for stronger glass look */
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3); /* Glass edge highlight */
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-brown);
}

.nav-links {
    display: flex;
    gap: 2rem;
    background: var(--dark-brown);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--white);
}

.nav-links a:hover {
    color: var(--primary-saffron);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-brown);
    cursor: pointer;
}

/* =========================================================================
   Hero Section
   ========================================================================= */
.hero {
    height: 100vh;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(62, 39, 35, 0.4), rgba(62, 39, 35, 0.8));
}

.hero-content {
    position: relative;
    z-index: 10;
    color: var(--white);
    max-width: 800px;
    margin: 0 auto;
}

.hero-logo {
    max-height: 120px;
    margin: 0 auto 1.5rem auto;
    display: block;
}

.hero h1 {
    color: var(--white);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* =========================================================================
   About Section
   ========================================================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.about-image img {
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* =========================================================================
   Chief Incumbent Section
   ========================================================================= */
.chief-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.chief-image-wrapper img {
    border-radius: 50%;
    width: 300px;
    height: 300px;
    object-fit: cover;
    margin: 0 auto;
    border: 5px solid var(--primary-saffron);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.chief-text p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* =========================================================================
   Highlights Section
   ========================================================================= */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.highlight-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    text-align: center;
    border: 1px solid rgba(0,0,0,0.03);
    transition: var(--transition);
}

.highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.card-icon {
    width: 70px;
    height: 70px;
    background: rgba(211, 84, 0, 0.1);
    color: var(--deep-saffron);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1.5rem auto;
}

.highlight-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================================================
   Gallery Section
   ========================================================================= */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.gallery-img {
    width: 220px;
    height: 220px;
    flex-grow: 0;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-img:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    animation: zoom 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.lightbox-close:hover {
    color: #bbb;
}

@keyframes zoom {
    from {transform: scale(0.9)} 
    to {transform: scale(1)}
}

/* =========================================================================
   Events Section
   ========================================================================= */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.event-item {
    display: flex;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.event-date {
    background: var(--deep-saffron);
    color: var(--white);
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.event-date .day {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.event-date .month {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 2px;
}

.event-image {
    width: 250px;
    min-height: 200px;
}

.event-details {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-details p {
    color: var(--text-muted);
}

/* =========================================================================
   Contact Section
   ========================================================================= */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 2rem;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: rgba(255,255,255,0.9);
}

.contact-list i {
    color: var(--primary-saffron);
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.contact-form-wrapper {
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    color: var(--text-dark);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #E0E0E0;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--deep-saffron);
    box-shadow: 0 0 0 3px rgba(211, 84, 0, 0.1);
}

.form-message {
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
}

/* =========================================================================
   Footer
   ========================================================================= */
.footer {
    background: #271612; /* Darker brown */
    color: rgba(255,255,255,0.7);
    padding: 4rem 0 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 2rem;
}

.footer-brand h3 {
    font-family: var(--font-heading);
    color: var(--white);
    margin-bottom: 0.5rem;
}

.footer-logo {
    max-height: 60px;
    margin-bottom: 1rem;
    display: block;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.footer-social a:hover {
    background: var(--primary-saffron);
}

.footer-bottom {
    text-align: center;
    font-size: 0.9rem;
}

/* =========================================================================
   Animations
   ========================================================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================================
   Responsive Design (Mobile First principles retrofitted)
   ========================================================================= */
@media (max-width: 992px) {
    .about-grid { grid-template-columns: 1fr; }
    .chief-grid { grid-template-columns: 1fr; text-align: center; }
    .contact-container { grid-template-columns: 1fr; }
    
    .event-item { flex-direction: column; }
    .event-image { width: 100%; min-height: 250px; }
    .event-date { flex-direction: row; gap: 1rem; padding: 1rem; }
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-radius: 0;
        box-shadow: 0 10px 10px rgba(0,0,0,0.05);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); /* Hidden */
        transition: var(--transition);
    }
    
    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .nav-links a { color: var(--text-dark); }
    .menu-toggle { display: block; }
    
    .hero h1 { font-size: 2.5rem; }
    .section-title { font-size: 2rem; }
    
    .footer-content { flex-direction: column; gap: 2rem; text-align: center; }
    .footer-logo { margin: 0 auto 1rem auto; }
    
    .contact-form-wrapper {
        padding: 2rem 1.5rem;
    }
    
    .g-recaptcha {
        transform: scale(0.85);
        transform-origin: left center;
    }

    .gallery-grid {
        gap: 1rem;
    }

    .gallery-img {
        width: calc(50% - 0.5rem);
        height: auto;
        aspect-ratio: 1 / 1;
    }
}
