/* ================= GLOBAL ================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f4f6f9;
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* ================= PRELOADER ================= */

#preloader {
    position: fixed;
    width: 100%;
    height: 100%;
    background: #8b0000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    perspective: 1000px;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.book {
    width: 120px;
    height: 80px;
    position: relative;
}

.page {
    width: 60px;
    height: 80px;
    background: white;
    position: absolute;
    top: 0;
    border-radius: 4px;
}

.page.left {
    left: 0;
}

.page.right {
    right: 0;
    transform-origin: left;
    animation: flipPage 1.5s infinite ease-in-out;
}

@keyframes flipPage {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(-160deg); }
    100% { transform: rotateY(0deg); }
}

.preloader-hidden {
    opacity: 0;
    visibility: hidden;
}

/* ================= TOP BAR ================= */

.top-bar {
    background: #8b0000;
    color: white;
    font-size: 14px;
    padding: 8px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.highlight-btn {
    background: #ffcc00;
    color: black;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
}

/* ================= HEADER ================= */

.header {
    background: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 60px;
    margin-right: 10px;
}

.logo-text h2 {
    font-size: 20px;
    color: #8b0000;
}

/* ================= NAVIGATION ================= */

nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

nav ul li {
    position: relative;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: 0.3s;
}

nav ul li a:hover {
    color: #8b0000;
}

.dropdown-menu {
    position: absolute;
    top: 40px;
    left: 0;
    background: white;
    width: 180px;
    display: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-radius: 6px;
}

.dropdown-menu li {
    padding: 10px;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.contact-btn {
    background: #8b0000;
    color: white;
    padding: 10px 18px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
}

.contact-btn:hover {
    background: #b30000;
}

/* ================= HERO ================= */

.hero {
    position: relative;
    height: 90vh;
    background: url('images/img1.jpg') center/cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.hero-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 50px;
    font-weight: 700;
}

.hero p {
    margin: 15px 0;
    font-size: 18px;
}

.primary-btn {
    background: #8b0000;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
}

.secondary-btn {
    background: white;
    color: #333;
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
}

/* ================= ABOUT ================= */

.about {
    padding: 80px 0;
    background: white;
}

.about-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-image img {
    width: 100%;
    border-radius: 15px;
}

/* ================= SECTION TITLE ================= */

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 32px;
    position: relative;
}

.section-title::after {
    content: "";
    width: 80px;
    height: 3px;
    background: #8b0000;
    display: block;
    margin: 10px auto;
}

/* ================= CARDS ================= */

.card-container {
    display: flex;
    gap: 25px;
    justify-content: center;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 300px;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* ================= GALLERY ================= */

.gallery {
    padding: 80px 0;
    background: #f4f6f9;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
    gap: 20px;
}

.gallery-grid img {
    width: 100%;
    border-radius: 10px;
    transition: 0.3s;
}

.gallery-grid img:hover {
    transform: scale(1.05);
}

/* ================= TESTIMONIAL ================= */

.testimonial {
    padding: 80px 0;
    background: white;
    text-align: center;
}

.testimonial-box {
    max-width: 700px;
    margin: auto;
    background: #8b0000;
    color: white;
    padding: 40px;
    border-radius: 15px;
}

/* ================= ADMISSION POPUP ================= */

.admission-popup {
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    top: 0;
    left: 0;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.popup-box {
    background: white;
    padding: 40px;
    width: 400px;
    border-radius: 15px;
    position: relative;
    text-align: center;
    animation: popupFade 0.4s ease;
}

@keyframes popupFade {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.popup-box input,
.popup-box select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
}

/* ================= FOOTER ================= */

footer {
    background: #1a1a1a;
    color: white;
    padding: 60px 0 20px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-col h3 {
    margin-bottom: 20px;
}

.copyright {
    text-align: center;
    margin-top: 30px;
}

/* ================= RESPONSIVE ================= */

@media(max-width: 900px) {
    .about-container {
        flex-direction: column;
    }
    nav ul {
        display: none;
    }
}