* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Navbar */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.nav-container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}
.logo h2 { color: #2563eb; font-size: 1.4rem; }
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}
.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: 0.3s;
}
.nav-menu a:hover, .nav-menu a.active { color: #2563eb; }
.hamburger { display: none; cursor: pointer; }
.hamburger span {
    display: block; width: 25px; height: 3px;
    background: #333; margin: 5px 0; transition: 0.3s;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    padding: 6rem 2rem;
    text-align: center;
}
.hero h1 { font-size: 3rem; margin-bottom: 1rem; }
.hero p { font-size: 1.2rem; margin-bottom: 2rem; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}
.btn-primary { background: #fbbf24; color: #1f2937; }
.btn-primary:hover { background: #f59e0b; transform: translateY(-2px); }
.btn-secondary { background: transparent; color: white; border: 2px solid white; }
.btn-secondary:hover { background: white; color: #2563eb; }

/* Sections */
.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin: 3rem 0 2rem;
    color: #1f2937;
}
.features, .news, .academics-content, .about-content, .admissions-content, .contact-content {
    max-width: 1200px;
    margin: auto;
    padding: 3rem 2rem;
}
.features-grid, .news-grid, .programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.feature-card, .news-card, .program-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: 0.3s;
    text-align: center;
}
.feature-card:hover, .news-card:hover, .program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.icon, .program-icon { font-size: 3rem; margin-bottom: 1rem; }

/* Stats */
.stats {
    background: #1f2937;
    color: white;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}
.stat-item h2 { font-size: 3rem; color: #fbbf24; }

/* News */
.news-date { color: #2563eb; font-weight: 600; margin-bottom: 0.5rem; }
.read-more { color: #2563eb; text-decoration: none; font-weight: 600; }

/* Footer */
.footer {
    background: #111827;
    color: white;
    padding: 3rem 2rem 1rem;
}
.footer-container {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}
.footer-section h3 { color: #fbbf24; margin-bottom: 1rem; }
.footer-section ul { list-style: none; }
.footer-section a { color: #d1d5db; text-decoration: none; }
.footer-section a:hover { color: #fbbf24; }
.social-links a { font-size: 1.5rem; margin-right: 1rem; }
.footer-bottom {
    text-align: center;
    border-top: 1px solid #374151;
    padding-top: 1rem;
    margin-top: 2rem;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
}
.page-header h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.image-placeholder {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    height: 300px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
}
.mission-vision {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}
.mv-card {
    background: #f3f4f6;
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid #2563eb;
}
.message-card {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    text-align: center;
}
.principal-photo { font-size: 5rem; margin-bottom: 1rem; }
blockquote {
    font-style: italic;
    font-size: 1.2rem;
    margin: 1rem 0;
    color: #4b5563;
}

/* Subjects */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.subject-item {
    background: #2563eb;
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    transition: 0.3s;
}
.subject-item:hover { background: #1d4ed8; transform: scale(1.05); }

/* Admission Process */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}
.step {
    text-align: center;
    padding: 2rem;
    background: #f3f4f6;
    border-radius: 10px;
}
.step-number {
    width: 50px;
    height: 50px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Forms */
.admission-form, .contact-form {
    max-width: 800px;
    margin: auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-group { margin-bottom: 1.2rem; }
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}
.form-message {
    max-width: 800px;
    margin: 1rem auto;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    display: none;
}
.form-message.success {
    display: block;
    background: #d1fae5;
    color: #065f46;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}
.info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.info-icon { font-size: 2rem; }

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        padding: 2rem 0;
        transition: 0.3s;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    .nav-menu.active { left: 0; }
    .hamburger { display: block; }
    .hero h1 { font-size: 2rem; }
    .about-grid, .contact-grid, .form-row {
        grid-template-columns: 1fr;
    }
}






/* Success Animation */
.success-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s;
}

.success-animation.active {
    display: flex;
}

.success-card {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: bounceIn 0.6s;
    max-width: 400px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease-out;
    position: relative;
}

.success-icon::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 15px;
    border-left: 5px solid white;
    border-bottom: 5px solid white;
    transform: rotate(-45deg);
    margin-top: -8px;
    animation: drawCheck 0.5s 0.3s ease-out backwards;
}

.success-card h3 {
    color: #1f2937;
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}

.success-card p {
    color: #6b7280;
    margin: 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

@keyframes drawCheck {
    from { width: 0; height: 0; }
    to { width: 30px; height: 15px; }
}

/* Confetti */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    pointer-events: none;
    animation: confettiFall 3s linear forwards;
    z-index: 9999;
}

@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Form message styles update */
.form-message.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
}

.form-message.success {
    display: block;
    background: #d1fae5;
    color: #065f46;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
}



/* ============ GALLERY STYLES ============ */
.gallery-section {
    max-width: 1300px;
    margin: auto;
    padding: 3rem 2rem;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.7rem 1.5rem;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    color: #4b5563;
}

.filter-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    grid-auto-rows: 250px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    animation: fadeInUp 0.6s ease backwards;
}

.gallery-item:nth-child(4n+1) {
    grid-row: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
    padding: 2rem 1.5rem 1.5rem;
    color: white;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

.gallery-category {
    display: inline-block;
    background: #2563eb;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gallery-overlay h3 {
    margin: 0.5rem 0;
    font-size: 1.2rem;
}

.gallery-overlay p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.gallery-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    gap: 1rem;
    color: #6b7280;
}

.gallery-empty {
    text-align: center;
    padding: 4rem;
    color: #6b7280;
}

.gallery-empty .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.hidden { display: none; }

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: zoomIn 0.4s;
}

.lightbox-info {
    text-align: center;
    color: white;
    margin-top: 1.5rem;
    max-width: 600px;
}

.lightbox-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}

.lightbox-category {
    display: inline-block;
    background: #2563eb;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.lightbox-info p {
    opacity: 0.85;
    line-height: 1.6;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10001;
}

.lightbox-close:hover {
    color: #ef4444;
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 3rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.25);
}

.lightbox-nav.prev { left: 30px; }
.lightbox-nav.next { right: 30px; }

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.spinner-dark {
    border: 3px solid rgba(37, 99, 235, 0.3);
    border-top-color: #2563eb;
    width: 40px;
    height: 40px;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        grid-auto-rows: 180px;
        gap: 1rem;
    }
    .gallery-item:nth-child(4n+1) {
        grid-row: span 1;
    }
    .lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 2rem;
    }
    .lightbox-nav.prev { left: 10px; }
    .lightbox-nav.next { right: 10px; }
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}


.footer-bottom {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom > p:first-child {
    flex: 1;
    text-align: left;
    margin: 0;
}

.footer-bottom > p:nth-child(2) {
    flex: 1;
    text-align: center;
    margin: 0;
}

.footer-bottom .staff-link {
    flex: 1;
    text-align: right;
    color: #9ca3af;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-bottom .staff-link:hover {
    color: #fbbf24;
}

@media (max-width: 700px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .footer-bottom > p,
    .footer-bottom .staff-link {
        text-align: center;
        flex: none;
    }
}
   

/* ============ NEWS STYLES ============ */
.news-section { max-width: 1200px; margin: auto; padding: 3rem 2rem; }
.news-filters { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }
.news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.news-card { background: white; border-radius: 15px; overflow: hidden; box-shadow: 0 5px 20px rgba(0,0,0,0.08); cursor: pointer; transition: all 0.3s ease; position: relative; }
.news-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0,0,0,0.15); }
.pinned-badge { position: absolute; top: 1rem; right: 1rem; background: #fbbf24; color: #1f2937; padding: 0.3rem 0.7rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; z-index: 2; }
.news-card-image { height: 200px; overflow: hidden; }
.news-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.news-card:hover .news-card-image img { transform: scale(1.08); }
.news-card-content { padding: 1.5rem; }
.news-category-badge { display: inline-block; padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; margin-bottom: 0.8rem; }
.cat-News { background: #dbeafe; color: #1e40af; }
.cat-Events { background: #fce7f3; color: #9d174d; }
.cat-Achievements { background: #fef3c7; color: #92400e; }
.cat-Announcements { background: #d1fae5; color: #065f46; }
.news-card-content h3 { margin: 0 0 0.5rem; font-size: 1.2rem; color: #1f2937; }
.news-date { color: #6b7280; font-size: 0.85rem; margin-bottom: 0.8rem; }
.news-card-content p { color: #4b5563; line-height: 1.6; margin-bottom: 1rem; }
.read-more { color: #2563eb; font-weight: 600; font-size: 0.9rem; }
.news-modal-content { background: white; border-radius: 15px; max-width: 700px; width: 90%; max-height: 85vh; overflow-y: auto; }
.news-modal-content img { width: 100%; max-height: 350px; object-fit: cover; border-radius: 15px 15px 0 0; }
.news-modal-body { padding: 2rem; }
.news-modal-body h2 { margin: 0.5rem 0; color: #1f2937; }
.news-modal-date { color: #6b7280; margin-bottom: 1.5rem; }
.news-modal-body p { line-height: 1.8; color: #374151; white-space: pre-wrap; }
.announcement-banner { background: linear-gradient(90deg, #2563eb, #7c3aed); color: white; padding: 0.8rem 1rem; text-align: center; position: relative; overflow: hidden; display: none; }
.announcement-banner.active { display: block; }
.announcement-content { display: inline-block; white-space: nowrap; animation: scrollText 20s linear infinite; }
.announcement-banner:hover .announcement-content { animation-play-state: paused; }
.announcement-content span { margin: 0 2rem; font-weight: 500; }
@keyframes scrollText { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }
.banner-close { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); cursor: pointer; font-size: 1.2rem; background: none; border: none; color: white; }
.home-news { max-width: 1200px; margin: auto; padding: 4rem 2rem; }
.home-news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-top: 2rem; }
.view-all-btn { display: block; width: fit-content; margin: 2rem auto 0; padding: 0.8rem 2rem; background: #2563eb; color: white; text-decoration: none; border-radius: 50px; font-weight: 600; transition: 0.3s; }
.view-all-btn:hover { background: #1d4ed8; transform: translateY(-2px); }
@media (max-width: 768px) { .news-list { grid-template-columns: 1fr; } }