/* --- 1. General & Global Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Utility Classes */
.width-100 { width: 100%; }
.margin-top-50 { margin-top: 50px; }

/* --- 2. Top Header --- */
.top-header {
    background-color: #d9534f; /* Red color */
    color: white;
    padding: 8px 0;
}

.news-list {
    font-weight: bold;
    margin-right: 10px;
}

.headquote {
    display: inline-block;
    vertical-align: middle;
    width: calc(100% - 120px);
}

/* --- 3. Main Header --- */
.header-menu {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    clear: both;
}

.header-top-content {
    display: flex
;
    /* align-items: start; */
    text-align: left;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* --- Header Logo Size Fix --- */
.logo img {
    max-height: 80px; /* Adjust this value as needed */
    width: auto;      /* This ensures the image scales proportionally */
}

.school-name {
    font-size: 1.2rem;
    color: #555;
    font-weight: 500;
}

.trust-name {
    font-size: 2.2rem;
    color: #d9534f;
    font-weight: 700;
}

.school-address {
    font-size: 1rem;
    color: #777;
}

.main-navigation {
    width: 100%;
    background-color: #f8f8f8;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.main-menu {
    list-style: none;
    text-align: center;
}

.main-menu li {
    display: inline-block;
}

.main-menu li a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: background-color 0.3s, color 0.3s;
}

.main-menu li a:hover, .main-menu li a.active {
    background-color: #d9534f;
    color: white;
}

/* --- 4. Slider / Hero Image Section --- */
.slider-container {
    height: 450px;
    overflow: hidden;
}
.slider {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- 5. Main Content Area (Homepage) --- */
.main-content-area {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}
.main-content-left { flex: 2; }
.main-content-right { flex: 1; }

.heading-sect {
    margin-bottom: 20px;
}

.head-title {
    font-size: 1.8rem;
    color: #333;
    border-bottom: 3px solid #4a90e2;
    padding-bottom: 5px;
    display: inline-block;
}

.welcome-section p {
    text-align: justify;
}

.latest-news {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 5px;
    height: 100%;
}

.news-marquee {
    height: 250px;
}

.latest-news-ul {
    list-style: square;
    padding-left: 20px;
}

.latest-news-ul li {
    margin-bottom: 15px;
}

.latest-news-ul li a {
    text-decoration: none;
    color: #337ab7;
}

.latest-news-ul li a:hover {
    text-decoration: underline;
}

.latest-news-ul img {
    height: 12px;
    margin-left: 5px;
}

/* --- 6. Photo Gallery Section --- */
.gallery-section {
    clear: both;
    padding-bottom: 50px;
}

.section-heading {
    text-align: center;
    margin-bottom: 40px;
}

.section-heading h2 {
    font-size: 2.5em;
    color: #333;
    display: inline-block;
    position: relative;
    padding-bottom: 10px;
}

.section-heading h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #4a90e2; /* Theme blue */
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.gallery-item a {
    text-decoration: none;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.gallery-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(217, 83, 79, 0.9); /* Theme red */
    color: white;
    text-align: center;
    padding: 15px;
    font-weight: 500;
    font-size: 1rem;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.gallery-item:hover .caption {
    transform: translateY(0);
    opacity: 1;
}

/* Gallery Preview Button (Homepage) */
.gallery-preview-btn {
    text-align: center;
    margin-top: 40px;
}

.btn-view-all {
    display: inline-block;
    background-color: #4a90e2;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.btn-view-all:hover {
    background-color: #357ebd;
}

/* --- 7. Footer Section --- */
.footer-section {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 60px 0;
    margin-top: 50px;
    clear: both;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-widget .widget-title {
    font-size: 1.3rem;
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 2px solid #4a90e2; /* Theme blue */
    padding-bottom: 10px;
    display: inline-block;
}

.footer-widget p, .footer-widget li {
    color: #bdc3c7;
    line-height: 1.7;
}

.footer-widget a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-widget a:hover {
    color: #ffffff;
}

.quick-links {
    list-style: none;
}

.quick-links li {
    margin-bottom: 10px;
}

.footer-bottom {
    background-color: #233140;
    padding: 20px 0;
    text-align: center;
    clear: both;
}

.copyright-text {
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* --- 8. Responsive Design --- */
@media (max-width: 992px) {
    .main-content-area {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .header-top-content {
        flex-direction: column;
    }
    .logo img { margin-right: 0; margin-bottom: 15px; }
    .trust-name { font-size: 1.8em; }

    .main-navigation { text-align: center; }
    .main-menu li { display: block; }
    
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-widget .widget-title { display: inline-block; }
    
    .slider-container { height: 300px; }
}

@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .section-heading h2 { font-size: 2em; }
    .main-menu li a { padding: 12px 15px; }
}
/* --- UPDATES FOR FOOTER SECTION --- */

/* Change the footer grid to 4 columns on desktop */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Changed from 3 to 4 */
    gap: 30px; /* Reduced gap slightly for better fit */
}

/* Style for the new school details list */
.school-details-list {
    list-style: none; /* Removes bullet points */
    padding: 0;
}

.school-details-list li {
    margin-bottom: 12px;
    font-size: 0.9rem; /* Slightly smaller font for details */
    color: #bdc3c7;
    line-height: 1.5;
}

.school-details-list li strong {
    color: #ecf0f1; /* Make the label slightly brighter */
    display: block; /* Puts the value on a new line if needed */
}


/* --- RESPONSIVE UPDATES FOR NEW FOOTER GRID --- */

/* On tablets, switch to a 2x2 grid */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* On mobile, stack all footer widgets into a single column */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-widget .widget-title {
        display: inline-block;
    }
}
/* --- 9. Video Gallery Section (NEW) --- */
.video-section {
    padding-bottom: 50px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.video-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.video-item a {
    text-decoration: none;
}

.video-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.video-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(217, 83, 79, 0.9); /* Theme red */
    color: white;
    text-align: center;
    padding: 15px;
    font-weight: 500;
    font-size: 1rem;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.video-item:hover .caption {
    transform: translateY(0);
    opacity: 1;
}

/* Style for the play button icon */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 70px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none; /* Allows clicks to go through to the link */
}

.video-item:hover .play-icon {
    opacity: 1;
}


/* --- Responsive Update for Video Grid --- */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}
/* --- 10. Generic Popup / Modal Styles (UPDATED) --- */
.popup {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    /* Flexbox for centering */
    align-items: center;
    justify-content: center;
}

.popup.active {
    display: flex;
}

.popup .popup-content {
    position: relative;
    background-color: #111;
    padding: 10px;
    border: 2px solid #333;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease-in-out;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.popup .close-button {
    position: absolute;
    top: -45px;
    right: -5px;
    color: #fff;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
}

.popup .close-button:hover,
.popup .close-button:focus {
    color: #d9534f;
    transform: rotate(90deg);
}

/* --- Specific Styles for VIDEO Popup --- */
#popup-video {
    width: 100%;
    max-height: 80vh;
    display: block;
}

/* --- Specific Styles for IMAGE Popup --- */
#popup-image {
    width: 100%;
    height: auto;
    max-height: 80vh;
    display: block;
    object-fit: contain; /* Prevents image from being cropped */
}

#popup-caption {
    text-align: center;
    color: #ccc;
    padding: 15px 0 5px 0;
    font-size: 1rem;
    font-weight: 500;
}
/* --- 11. Policy Page Styles (NEW) --- */
.policy-content {
    background: #fdfdfd;
    border: 1px solid #eee;
    padding: 30px;
    border-radius: 5px;
    margin-top: 20px;
}

.policy-content h3 {
    font-size: 1.5rem;
    color: #333;
    margin-top: 25px;
    margin-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 5px;
}

.policy-content h3:first-child {
    margin-top: 0;
}

.policy-content p, .policy-content li {
    line-height: 1.8;
    color: #555;
}

.policy-content ul {
    list-style-position: inside;
    padding-left: 10px;
}
/* --- 12. Gallery Login Link Styles (NEW) --- */
.staff-login-link a {
            color: white;
            text-decoration: none;
            font-weight: 500;
            font-size: 0.9rem;
            transition: color 0.2s;
        }
.staff-login-link a:hover {
            color: #ffdddd;
    }
.staff-login-link i {
            margin-right: 6px;
        }
/* --- 13. Mini-Bot Button Styles (NEW) --- */
.mini-bot-button {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #d9534f; /* Theme Red */
    color: white;
    padding: 12px 18px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 999;
    transition: all 0.3s ease;
}

.mini-bot-button:hover {
    background-color: #c9302c; /* Darker Red */
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.mini-bot-button i {
    font-size: 1.5rem;
}

/* Hide text on smaller screens */
@media (max-width: 768px) {
    .mini-bot-button span {
        display: none;
    }
    .mini-bot-button {
        padding: 15px; /* Make it circular */
        height: 55px;
        width: 55px;
        justify-content: center;
    }
}        