@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #1e3a8a; /* Deep Navy */
    --primary-light: #3b82f6; /* Bright Blue */
    --secondary: #f59e0b; /* Amber/Gold */
    --secondary-hover: #d97706;
    --accent: #10b981; /* Emerald/Green */
    --accent-light: #e6fbf4;
    --bg-main: #f8fafc; /* Slate 50 */
    --bg-card: #ffffff;
    --text-main: #1e293b; /* Slate 800 */
    --text-muted: #64748b; /* Slate 500 */
    --text-white: #ffffff;
    --border-color: #e2e8f0; /* Slate 200 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-premium: 0 20px 25px -5px rgba(30, 58, 138, 0.05), 0 8px 10px -6px rgba(30, 58, 138, 0.05);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Section Header */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px auto;
}

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--secondary);
    border-radius: 2px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse-subtle {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Header & Navbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

header.scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.95);
    padding: 5px 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.school-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.school-name {
    display: flex;
    flex-direction: column;
}

.school-name h1 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--primary);
    line-height: 1.1;
}

.school-name span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    position: relative;
    padding: 8px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-light);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-light);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-buttons {
    display: flex;
    gap: 12px;
    margin-left: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    gap: 8px;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text-white);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-white);
}

.btn-lg {
    padding: 12px 28px;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    width: 26px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 140px 0 100px 0;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.04) 0%, rgba(59, 130, 246, 0.04) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: 3rem;
    line-height: 1.15;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero-content h2 span {
    color: var(--primary-light);
    display: block;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 35px;
    max-width: 550px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: #e2e8f0;
    aspect-ratio: 16 / 10;
}

.hero-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.hero-image-wrapper:hover .hero-banner-img {
    transform: scale(1.03);
}

.hero-badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-md);
}

.hero-badge span {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.85rem;
}

.hero-badge i {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px var(--accent);
}

/* Portal Section */
.portals-section {
    padding: 80px 0;
    background-color: var(--bg-main);
    position: relative;
}

.portals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.portal-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.portal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--primary-light);
    transition: var(--transition);
}

.portal-card.mdm::before {
    background: var(--secondary);
}

.portal-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(30, 58, 138, 0.12);
}

.portal-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    font-size: 1.75rem;
}

.portal-card.school .portal-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-light);
}

.portal-card.mdm .portal-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--secondary);
}

.portal-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.portal-card p {
    color: var(--text-muted);
    margin-bottom: 30px;
    flex-grow: 1;
}

.portal-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    gap: 8px;
}

.portal-card.school .portal-link {
    background: var(--primary);
    color: var(--text-white);
}

.portal-card.school .portal-link:hover {
    background: var(--primary-light);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.25);
}

.portal-card.mdm .portal-link {
    background: var(--secondary);
    color: var(--text-white);
}

.portal-card.mdm .portal-link:hover {
    background: var(--secondary-hover);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.25);
}

/* Custom Portal Cards: Admission & Student/Parent */
.portal-card.admission::before {
    background: var(--accent);
}
.portal-card.admission .portal-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
}
.portal-card.admission .portal-link:hover {
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.25);
}

.portal-card.student::before {
    background: var(--primary-light);
}
.portal-card.student .portal-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-light);
}
.portal-card.student .portal-link {
    background: var(--primary);
    color: var(--text-white);
}
.portal-card.student .portal-link:hover {
    background: var(--primary-light);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.25);
}

/* About Section */
.about-section {
    padding: 100px 0;
    background: var(--bg-card);
}

.about-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 50px;
    align-items: center;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.feature-box {
    padding: 24px;
    background: var(--bg-main);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.feature-box:hover {
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.feature-box h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-box p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.feature-icon-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary-light);
    display: inline-block;
}

.feature-box.sec .feature-icon-bullet {
    background-color: var(--secondary);
}
.feature-box.acc .feature-icon-bullet {
    background-color: var(--accent);
}
.feature-box.pri .feature-icon-bullet {
    background-color: var(--primary);
}

/* Gallery Section */
.gallery-section {
    padding: 100px 0;
    background-color: var(--bg-main);
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 18px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: var(--text-white);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.gallery-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    opacity: 0;
    transform: scale(0.9);
    animation: fadeInUp 0.4s ease forwards;
}

.gallery-item.hide {
    display: none;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.gallery-img-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #e2e8f0;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 58, 138, 0.4);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-zoom-icon {
    color: var(--text-white);
    font-size: 2rem;
    transform: scale(0.7);
    transition: var(--transition);
}

.gallery-item:hover .gallery-zoom-icon {
    transform: scale(1);
}

.gallery-info {
    padding: 16px;
}

.gallery-info .category {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary-light);
    letter-spacing: 1px;
    margin-bottom: 4px;
    display: inline-block;
}

.gallery-info h4 {
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    position: relative;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-sm);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 4px solid var(--text-white);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--text-white);
    font-size: 2rem;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--secondary);
}

.lightbox-caption {
    color: var(--text-white);
    text-align: center;
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: 500;
    font-family: var(--font-heading);
}

/* Info Section (School Stats) */
.stats-section {
    padding: 60px 0;
    background: var(--primary);
    color: var(--text-white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 5px;
    font-weight: 800;
}

.stat-item p {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Footer */
footer {
    background: #0f172a; /* Dark Slate 900 */
    color: #94a3b8; /* Slate 400 */
    padding: 80px 0 30px 0;
    border-top: 1px solid #1e293b;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-info h3 {
    color: var(--text-white);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.footer-info p {
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-info .logo-container {
    margin-bottom: 20px;
}

.footer-info .school-name h1 {
    color: var(--text-white);
}

.footer-links h4, .footer-contact h4 {
    color: var(--text-white);
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
}

.footer-links h4::after, .footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--secondary);
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul a:hover {
    color: var(--text-white);
    padding-left: 5px;
}

.footer-contact p {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
}

.footer-contact .icon {
    color: var(--secondary);
    font-weight: bold;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    font-size: 0.85rem;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
    list-style: none;
    font-size: 0.85rem;
}

.footer-bottom-links a:hover {
    color: var(--text-white);
}

/* Responsive CSS */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-cta {
        justify-content: center;
    }
    .hero-image-wrapper {
        max-width: 600px;
        margin: 0 auto;
    }
    .about-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 20px;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-info {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .navbar {
        height: 70px;
    }
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-card);
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        gap: 30px;
        box-shadow: var(--shadow-lg);
        transition: 0.4s ease;
        z-index: 999;
    }
    .nav-links.active {
        left: 0;
    }
    .menu-toggle {
        display: flex;
    }
    .nav-buttons {
        display: none; /* Hide top buttons on mobile, show in menu or just use direct portals */
    }
    .hero {
        padding-top: 100px;
    }
    .hero-content h2 {
        font-size: 2.25rem;
    }
    .portals-grid {
        grid-template-columns: 1fr;
    }
    .portal-card {
        padding: 30px;
    }
    .section-header h2 {
        font-size: 1.75rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-info {
        grid-column: span 1;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}
