/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background: #fff;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Popup */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.popup-content {
    position: relative;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    max-width: 50vw;
    max-height: 70vh;
    overflow: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.popup-content img {
    max-width: 100%;
    max-height: 60vh;
    height: auto;
    display: block;
    margin: 0 auto; /* Center image horizontally */
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    transition: color 0.3s;
}

.popup-close:hover {
    color: #003087;
}

/* Header */
.header {
    background: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: #003087;
    font-size: 20px;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: #ffc107;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 80px;
    margin-right: 20px;
    border-radius: 50%;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: #003087;
}

.header-info {
    text-align: right;
}

.header-info p {
    font-size: 14px;
    margin: 5px 0;
    color: #333;
}

/* Navigation */
#cssmenu {
    margin-top: 20px;
}

.menu-toggle {
    display: none;
    background: #ffc107;
    color: #333;
    border: none;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    border-radius: 5px;
}

#cssmenu ul {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    background: #ffc107;
    padding: 10px 0;
    border-radius: 8px;
}

#cssmenu li {
    position: relative;
}

#cssmenu a {
    text-decoration: none;
    color: #333;
    font-weight: 400;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    font-size: 16px;
    transition: background 0.3s, color 0.3s;
    border-radius: 5px;
}

#cssmenu a i {
    margin-left: 5px;
}

#cssmenu a:hover {
    background: #fff;
    color: #003087;
}

#cssmenu ul ul {
    display: none;
    position: absolute;
    background: #ffc107;
    top: 100%;
    left: 0;
    min-width: 200px;
    z-index: 1000;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Added subtle shadow */
}

#cssmenu ul ul ul {
    top: 0;
    left: 100%;
}

#cssmenu li:hover > ul {
    display: block;
}

#cssmenu ul ul a {
    padding: 10px 15px;
}

/* Main Content */
.main {
    padding: 40px 0;
}

.banner #slider {
    position: relative;
    overflow: hidden;
    height: 400px;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.banner #slider img,
.banner #slider iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease; /* Added ease for smoother transition */
}

.banner #slider img.active,
.banner #slider iframe.active {
    opacity: 1;
}

/* Features (Our Offerings) */
.features {
    margin: 40px 0;
}

.features h2 {
    font-size: 28px;
    color: #003087;
    text-align: center;
    margin-bottom: 30px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-item {
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 10px;
    transition: box-shadow 0.3s ease; /* Added ease for smoother transition */
}

.feature-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.feature-item h3 {
    font-size: 20px;
    color: #005bb5;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.feature-item h3 i {
    margin-right: 10px;
    color: #003087;
}

.feature-item ul {
    list-style: none;
}

.feature-item li {
    font-size: 15px;
    margin: 12px 0;
    padding-left: 30px;
    position: relative;
    transition: color 0.3s ease; /* Added ease */
}

.feature-item li i {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #003087;
    transition: transform 0.3s ease, color 0.3s ease; /* Added ease */
}

.feature-item li:hover {
    color: #005bb5;
}

.feature-item li:hover i {
    transform: translateY(-50%) scale(1.2);
    color: #005bb5;
}

/* Torch Bearers (Leadership Team) */
.torch-bearers {
    margin: 40px 0;
}

.torch-bearers h2 {
    font-size: 28px;
    color: #003087;
    text-align: center;
    margin-bottom: 30px;
}

.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.leader {
    display: flex;
    align-items: center;
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 10px;
}

.leader img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    margin-right: 20px;
    border-radius: 5px;
}

.leader-info h3 {
    font-size: 20px;
    color: #005bb5;
    margin-bottom: 5px;
}

.leader-info .role {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

.leader-info .details {
    font-size: 15px;
    color: #333;
    margin-bottom: 10px;
}

.leader-info p {
    font-size: 15px;
}

/* Gallery Page Styles */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 30px 0;
}

.gallery-item {
    position: relative;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.5s ease forwards;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.gallery-image {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
}

.gallery-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
    transition: opacity 0.3s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 48, 135, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover img {
    opacity: 0.7;
}

.gallery-overlay p {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin: 0;
    padding: 10px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Fade-in animation for gallery items */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation for gallery items */
.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(7) { animation-delay: 0.7s; }
.gallery-item:nth-child(8) { animation-delay: 0.8s; }
.gallery-item:nth-child(9) { animation-delay: 0.9s; }
.gallery-item:nth-child(10) { animation-delay: 1.0s; }
.gallery-item:nth-child(11) { animation-delay: 1.1s; }

/* News & Contact */
.news {
    margin: 40px 0;
}

.news h2 {
    font-size: 28px;
    color: #003087;
    text-align: center;
    margin-bottom: 30px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-item, .contact-item {
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 10px;
}

.news-item h3, .contact-item h3 {
    font-size: 20px;
    color: #005bb5;
    margin-bottom: 15px;
}

.news-item p, .contact-item p {
    font-size: 15px;
    margin: 10px 0;
}

/* Contact Form Specific Styles */
.contact-us .contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-us .form-group {
    display: flex;
    flex-direction: column;
}

.contact-us .form-group label {
    font-size: 16px;
    color: #003087;
    margin-bottom: 5px;
    font-weight: 500;
}

.contact-us .form-group input,
.contact-us .form-group textarea {
    padding: 12px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Roboto', sans-serif;
    transition: border-color 0.3s ease;
}

.contact-us .form-group input:focus,
.contact-us .form-group textarea:focus {
    border-color: #005bb5;
    outline: none;
}

.contact-us .form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-us .submit-btn {
    background: #ffc107;
    color: #333;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
    align-self: flex-start;
}

.contact-us .submit-btn:hover {
    background: #003087;
    color: #fff;
}
/* Gallery Specific Adjustments for Annual Day */
.gallery {
    padding: 40px 0;
}

.gallery h2 {
    font-size: 28px;
    color: #003087;
    text-align: center;
    margin-bottom: 30px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

/* Ensure existing gallery-item styles are applied */
.gallery-item {
    position: relative;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.5s ease forwards;
    cursor: pointer; /* Indicate clickable */
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.gallery-image {
    position: relative;
    width: 100%;
    padding-top: 75%; /* Maintain 4:3 aspect ratio */
}

.gallery-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
    transition: opacity 0.3s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 48, 135, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover img {
    opacity: 0.7;
}

.gallery-overlay p {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin: 0;
    padding: 10px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Popup Styling (Already in your CSS, just ensuring it’s leveraged) */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.popup-content {
    position: relative;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    max-width: 50vw;
    max-height: 70vh;
    overflow: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.popup-content img {
    max-width: 100%;
    max-height: 60vh;
    height: auto;
    display: block;
    margin: 0 auto;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    transition: color 0.3s;
}

.popup-close:hover {
    color: #003087;
}
/* Contact Info Styling */
.contact-us .contact-item p {
    line-height: 1.8;
}

.contact-us .contact-item a {
    color: #005bb5;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-us .contact-item a:hover {
    color: #003087;
    text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .contact-us .submit-btn {
        width: 100%;
        align-self: stretch;
    }
}

/* CBSE Mandatory Public Disclosure */
.cbse-mpd {
    margin: 40px 0;
}

.cbse-mpd h2 {
    font-size: 28px;
    color: #003087;
    text-align: center;
    margin-bottom: 30px;
}

.mpd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.mpd-item {
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 10px;
    text-align: center;
    transition: box-shadow 0.3s ease;
}

.mpd-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.mpd-item a {
    text-decoration: none;
    color: #005bb5;
    font-size: 15px;
    transition: color 0.3s ease;
}

.mpd-item a:hover {
    color: #003087;
}

/* Footer */
.footer {
    background: #003087;
    color: #fff;
    padding: 20px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
}

.footer-map h3, .footer-contact h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.footer-map iframe {
    width: 100%;
    height: 250px;
    border: none;
    border-radius: 10px;
}

.footer-contact p {
    font-size: 15px;
    margin: 10px 0;
}

.footer-contact i {
    margin-right: 10px;
}

.footer-contact a {
    color: #fff;
    text-decoration: none;
    transition: text-decoration 0.3s ease; /* Added transition */
}

.footer-contact a:hover {
    text-decoration: underline;
}

.copy-right {
    text-align: center;
    font-size: 14px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    #cssmenu ul {
        display: none;
        flex-direction: column;
        background: #ffc107;
        padding: 0;
        border-radius: 0;
    }

    #cssmenu ul.show {
        display: flex;
    }

    #cssmenu li {
        width: 100%;
    }

    #cssmenu a {
        padding: 15px;
        border-bottom: 1px solid #fff;
        border-radius: 0;
    }

    #cssmenu ul ul {
        position: static;
        width: 100%;
        background: #ffca28;
        border-radius: 0;
        box-shadow: none; /* Remove shadow for cleaner mobile look */
    }

    #cssmenu ul ul ul {
        left: 0;
        background: #ffca28;
    }

    #cssmenu li:hover > ul {
        display: none; /* Prevent hover on mobile */
    }

    #cssmenu ul.show ul.show {
        display: block;
    }

    .header-main {
        flex-direction: column;
        text-align: center;
    }

    .logo img {
        margin: 0 0 15px;
    }

    .header-info {
        text-align: center;
        margin-top: 15px;
    }

    .feature-grid, .leadership-grid, .news-grid, .footer-content, .mpd-grid {
        grid-template-columns: 1fr;
    }

    .leader {
        flex-direction: column;
        text-align: center;
    }

    .leader img {
        margin: 0 0 15px;
    }

    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }

    .gallery-overlay p {
        font-size: 16px;
    }

    .popup-content {
        max-width: 80vw;
        max-height: 70vh;
        padding: 15px;
    }

    .popup-content img {
        max-height: 55vh;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .banner #slider {
        height: 250px;
    }

    .feature-item {
        padding: 15px;
    }

    .popup-content {
        max-width: 90vw;
        max-height: 70vh;
        padding: 10px;
    }

    .popup-content img {
        max-height: 50vh;
    }
}