/* --- Global Styles & Variables --- */
:root {
    --saffron-color: #FF9933; 
    --navy-blue-color: #000080;
    --green-color: #138808;
    
    --primary-color: var(--navy-blue-color);
    --secondary-color: var(--saffron-color);
    --accent-color: var(--green-color);

    --dark-color: #333;
    --light-color: #f7f7f7;
    --text-color: #555;
    
    --font-heading: 'Lato', sans-serif;
    --font-body: 'Lato', sans-serif;
}

html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--text-color);
    background-color: #fff;
    font-weight: 400;
}

/* NEW: Prevent scrolling when lightbox is open */
body.lightbox-open {
    overflow: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

/* --- TYPOGRAPHY UPDATES --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--dark-color);
    margin-bottom: 20px;
    font-weight: 700;
}

h1 {
    font-size: 4.5rem;
    line-height: 1.1;
}

h2 {
    font-size: 3rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--dark-color);
}

p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.colored-bg {
    background-color: white;
}

/* --- Animated Header --- */
#main-header {
    background-color: #fff;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1010;
    box-shadow: 0 2px 5px rgba(0,0,0,0);
    transition: padding 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
#main-header.scrolled {
    padding: 10px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* UPDATED LOGO STYLES */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--dark-color);
}
.logo img {
    height: 60px;
    transition: height 0.3s ease-in-out;
}
.logo-text {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-left: 15px;
}
#main-header.scrolled .logo img {
    height: 50px;
}

/* --- Animated Desktop Navigation --- */
#main-nav {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}
#main-nav ul { 
    list-style: none; 
    display: flex; 
    align-items: center; 
}
#main-nav ul li { margin: 0 15px; }
#main-nav a {
    font-family: var(--font-body);
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 700;
    padding: 5px 10px;
    position: relative;
    letter-spacing: 0.5px;
}
#main-nav a:not(.cta-button)::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 100%; height: 2px; background-color: var(--primary-color);
    transform: scaleX(0); transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}
#main-nav a:not(.cta-button):hover::after { transform: scaleX(1); transform-origin: left; }

/* --- Header Social Links --- */
.header-social {
    display: flex;
    align-items: center;
    gap: 20px;
}
.header-social a {
    color: var(--dark-color);
    font-size: 1.3rem;
    transition: color 0.3s ease, transform 0.3s ease;
}
.header-social a:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}


/* --- UNIFIED BUTTON STYLES --- */
.cta-button, .hero-button {
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 700;
    font-family: var(--font-body);
    text-decoration: none;
    display: inline-block;
    border: 2px solid transparent;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s, color 0.3s, border-color 0.3s;
    cursor: pointer;
}

.cta-button:hover, .hero-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.cta-button:active, .hero-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* RESTORED: Modifier for Primary Button (Navy) in Nav */
#main-nav .cta-button {
    background-color: var(--primary-color);
    color: #fff !important;
    border-color: var(--primary-color);
}

#main-nav .cta-button:hover {
    background-color: #fff;
    color: var(--primary-color) !important;
    border-color: var(--primary-color);
}

/* Modifier for Secondary Button (Saffron) */
.cta-section .hero-button {
    background-color: var(--secondary-color);
    color: #fff;
    border-color: var(--secondary-color);
}

.cta-section .hero-button:hover {
    background-color: #ffac4d;
    border-color: #ffac4d;
    color: #fff;
}


/* --- Animated Hamburger Icon --- */
.hamburger { display: none; position: relative; width: 40px; height: 40px; background: transparent; border: none; cursor: pointer; z-index: 1011; }
.hamburger-box { position: absolute; width: 30px; height: 24px; top: 8px; left: 5px; }
.hamburger-inner, .hamburger-inner::before, .hamburger-inner::after { position: absolute; width: 30px; height: 3px; background-color: var(--dark-color); border-radius: 3px; transition: transform 0.3s ease-in-out, background-color 0.2s ease-in-out; }
.hamburger-inner { top: 50%; transform: translateY(-50%); }
.hamburger-inner::before, .hamburger-inner::after { content: ''; display: block; }
.hamburger-inner::before { top: -10px; }
.hamburger-inner::after { bottom: -10px; }
#main-header.nav-open .hamburger-inner { background-color: transparent; }
#main-header.nav-open .hamburger-inner::before { transform: translateY(10px) rotate(45deg); }
#main-header.nav-open .hamburger-inner::after { transform: translateY(-10px) rotate(-45deg); }

/* --- Image Carousel Section --- */
.carousel-container {
    position: relative;
    width: 100%;
    height: 85vh;
    overflow: hidden;
    background-color: #eee;
}
.carousel-slide {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.7s ease-in-out;
}
.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    padding: 15px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}
.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}
.prev-btn { left: 20px; }
.next-btn { right: 20px; }

/* --- REVERTED Tricolor About Us Section --- */
.section-with-layered-bg {
    position: relative;
    padding: 0;
    background-color: #f4f4f4;
    overflow: hidden;
}

.section-with-layered-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 550px;
    background-color: var(--saffron-color);
    background-image: linear-gradient(rgba(255,153,51,0.9)), url('public/pattern1.jpg');
    background-size: cover;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 0 100%); /* Creates the slanted bottom edge */
    z-index: 1;
}

.section-with-layered-bg .container {
    position: relative;
    z-index: 2;
    padding-top: 80px;
    padding-bottom: 80px;
    width: 70%;
    max-width: 1400px;
    margin: 0 auto;
}

.layered-bg-title {
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    margin-bottom: 60px;
}

.floating-box {
    background: #fff;
    padding: 50px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1), 0 5px 15px rgba(0,0,0,0.05);
    border-radius: 12px;
}

.floating-box .about-intro {
    margin-bottom: 40px;
    text-align: center;
}
.about-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.about-box {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e9e9e9;
}
.about-box h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}
.about-box ul { list-style: none; padding: 0; }
.about-box ul li { display: flex; align-items: flex-start; margin-bottom: 15px; }
.about-box ul li span { line-height: 1.7; }
.about-box ul li i { color: var(--accent-color); margin-right: 15px; margin-top: 8px; font-size: 0.8rem; }


/* --- Events Section --- */
.event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }
.event-card { background-color: #fff; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); display: flex; overflow: hidden; transition: transform 0.3s, box-shadow 0.3s; }
.event-card:hover { transform: translateY(-5px); box-shadow: 0 6px 15px rgba(0,0,0,0.15); }
.event-date { background-color: var(--secondary-color); color: #fff; padding: 20px; text-align: center; min-width: 90px; display: flex; flex-direction: column; justify-content: center; font-family: var(--font-body); font-weight: 700; }
.event-date span { display: block; font-size: 2.2rem; font-weight: 700; }
.event-details { padding: 20px; }
.event-details h3 { margin-top: 0; font-size: 1.4rem; }
.event-details p { font-size: 1rem; color: #777; }
.event-details a { color: var(--primary-color); text-decoration: none; font-weight: 700; }

/* --- UPDATED Initiatives Section --- */
#initiatives {
    background-color: #f6fdf6;
}
#initiatives .container h2 {
    text-align: center;
    margin-bottom: 60px;
}
.initiatives-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr);
    gap: 40px; 
    text-align: center; 
}
.initiative-item {
    background-color: #fff;
    padding: 40px 30px;
    border-radius: 12px;
    border: 1px solid #e0f0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.initiative-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.initiative-item i { 
    font-size: 2.5rem; 
    color: var(--accent-color); 
    margin-bottom: 20px; 
}
.initiative-item h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}
.initiative-item p {
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.6;
}

/* --- CTA Section --- */
.cta-section { background-color: var(--accent-color); color: #fff; text-align: center; }
.cta-section h2 { color: #fff; }

/* --- UPDATED Gallery Section --- */
#gallery {
    background-color: #fff;
}
#gallery h2 {
    text-align: center;
    margin-bottom: 60px;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    aspect-ratio: 1 / 1; /* Creates a square aspect ratio */
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.gallery-item:hover img {
    transform: scale(1.05);
}
.gallery-item::after {
    content: '\f00e'; /* Font Awesome search-plus icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: #fff;
    font-size: 2rem;
    background-color: rgba(0,0,0,0.5);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s ease;
    opacity: 0;
}
.gallery-item:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}


/* --- Contact Section Floating Box --- */
.contact-section-floating {
    background-color: var(--light-color);
    padding: 120px 0;
    position: relative;
}
.contact-floating-box {
    background: #fff;
    padding: 60px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}
.contact-floating-box h2 {
    margin-top: 0;
}
.contact-floating-box p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px auto;
}
.email-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 5px;
    transition: color 0.3s, border-color 0.3s;
}
.email-link:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* --- At a Glance Section --- */
#at-a-glance {
    background-color: #fdfaf6;
}
#at-a-glance h2 {
    margin-bottom: 50px;
    text-align: center;
}
.glance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.glance-card {
    background-color: #fff;
    padding: 35px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #f0e9e1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.glance-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.glance-card i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}
.glance-number {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1.1;
    margin-bottom: 10px;
}
.glance-card p {
    margin-top: 5px;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
}

/* --- Team Section --- */
#team {
    background-color: #fff;
}
#team h2 {
    text-align: center;
    margin-bottom: 60px;
}
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.team-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #eee;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}
.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--saffron-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}
.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.team-card:hover::before {
    opacity: 1;
}
.team-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.team-name {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}
.team-position {
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 700;
}

/* --- Members Section --- */
#members {
    background-color: var(--light-color);
}
#members h2 {
    text-align: center;
    margin-bottom: 60px;
}
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    align-items: center;
}
.member-card {
    background-color: #fff;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #eee;
    box-shadow: 0 5px 15px rgba(0,0,0,0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 220px; /* Set a fixed height */
}
.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}
.member-card img {
    max-width: 100%;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
}
.member-card p {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    line-height: 1.4;
}


/* --- UPDATED Footer --- */
.site-footer {
    background-color: #2c2c2c;
    color: #ccc;
    padding: 60px 0 0 0;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-column h4 {
    color: #fff;
    margin-bottom: 20px;
}
.footer-column ul {
    list-style: none;
    padding: 0;
}
.footer-column ul li {
    margin-bottom: 10px;
}
.footer-column ul a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}
.footer-column ul a:hover {
    color: var(--secondary-color);
}
.footer-logo {
    height: 50px;
    margin-bottom: 20px;
}
.footer-about p {
    font-size: 1rem;
    line-height: 1.8;
    max-width: 350px;
}
.social-links a {
    color: #ccc;
    margin-right: 15px;
    font-size: 1.4rem;
    text-decoration: none;
    transition: color 0.3s;
}
.social-links a:hover {
    color: #fff;
}
.footer-bottom {
    border-top: 1px solid #444;
    padding: 20px 0;
    text-align: center;
}
.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
}

/* --- NEW Lightbox Styles --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding: 60px 20px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}
.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    animation-name: zoom;
    animation-duration: 0.6s;
}
@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}
.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}
.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}
.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
}
.lightbox-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}
.lightbox-prev {
    left: 0;
}
.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(0,0,0,0.8);
}

/* --- Responsive Design --- */
@media (max-width: 1200px) {
    .section-with-layered-bg .container {
        width: 85%;
    }
}

@media (max-width: 900px) { 
    .about-details-grid { grid-template-columns: 1fr; } 
    .section-with-layered-bg .container {
        width: 90%;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-about p {
        margin-left: auto;
        margin-right: auto;
    }
    .social-links {
        justify-content: center;
    }
}
@media (max-width: 768px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.2rem; }
    
    #main-header .container {
        justify-content: space-between;
    }
    .header-social {
        display: none;
    }
    #main-nav {
        position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background-color: rgba(255, 255, 255, 0.98); backdrop-filter: blur(5px);
        display: flex; justify-content: center; align-items: center;
        clip-path: circle(0px at top right); pointer-events: none;
        transition: clip-path 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1000;
        flex-grow: 0;
    }
    .hamburger { display: block; }
    #main-header.nav-open #main-nav { pointer-events: auto; clip-path: circle(150% at top right); }
    #main-nav ul { flex-direction: column; text-align: center; }
    #main-nav li { margin: 20px 0; opacity: 0; transform: translateY(20px); transition: opacity 0.4s ease, transform 0.4s ease; }
    #main-header.nav-open #main-nav li { opacity: 1; transform: translateY(0); }
    #main-header.nav-open #main-nav li:nth-child(1) { transition-delay: 0.2s; }
    #main-header.nav-open #main-nav li:nth-child(2) { transition-delay: 0.3s; }
    #main-header.nav-open #main-nav li:nth-child(3) { transition-delay: 0.4s; }
    #main-header.nav-open #main-nav li:nth-child(4) { transition-delay: 0.5s; }
    #main-header.nav-open #main-nav li:nth-child(5) { transition-delay: 0.6s; }
    #main-header.nav-open #main-nav li:nth-child(6) { transition-delay: 0.7s; }
    #main-nav a { font-size: 1.8rem; font-family: var(--font-heading); }

    .floating-box {
        padding: 30px;
        margin-top: -50px;
    }

    .contact-floating-box {
        padding: 40px 25px;
    }

    /* At a Glance responsive */
    .glance-grid {
        grid-template-columns: 1fr;
    }

    /* Initiatives responsive */
    .initiatives-grid {
        grid-template-columns: 1fr;
    }
    /* UPDATED: Carousel height for mobile */
    .carousel-container {
        height: 50vh;
    }

    /* Gallery responsive */
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}
