/* 
   Premium Design System for Sunshine Public School
   Colors: Navy & Gold
   Fonts: Outfit (Headings), Inter (Body)
*/

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

:root {
    /* Color Palette */
    --primary: #0a2342; /* Deep Navy */
    --primary-light: #173860;
    --primary-dark: #051428;
    --secondary: #d4af37; /* Premium Gold */
    --secondary-hover: #c19c2c;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #f1f5f9;

    /* Typographic scale */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout */
    --container-max: 1280px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 50px;

    /* Shadows & Effects */
    --shadow-soft: 0 10px 40px -10px rgba(10, 35, 66, 0.08);
    --shadow-hover: 0 20px 40px -10px rgba(10, 35, 66, 0.15);
    --shadow-gold: 0 10px 30px -10px rgba(212, 175, 55, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile navbar adjustments */
@media (max-width: 991px) {

    .navbar-brand img {
        height: 55px;
    }

    .navbar-nav .nav-link {
        padding: 10px 12px !important;
    }

    .nav-link::after {
        display: none !important;
    }

    .btn-premium {
        width: 100%;
        text-align: center;
    }
}

/* Move close icon to top-left */
.close-icon {
    position: fixed;
    top: 30px;
    left: 20px;
    z-index: 1000;
    background: white;
    padding: 8px;
    border-radius: 50%;
    /* box-shadow: 0 5px 20px rgba(0,0,0,0.15); */
}

/* Hide hamburger when open */
.menu-open .menu-icon {
    display: none !important;
}


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

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

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

a:hover {
    color: var(--secondary);
    text-decoration: none;
}

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

.container-custom {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

/* =========================================
   Components: Buttons
========================================= */
.btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: var(--radius-pill);
    transition: all var(--transition-smooth);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-gold {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-hover));
    color: var(--primary-dark) !important;
    box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px -10px rgba(212, 175, 55, 0.7);
    color: var(--primary-dark) !important;
}

.btn-navy {
    background-color: var(--primary);
    color: white !important;
    box-shadow: var(--shadow-soft);
}

.btn-navy:hover {
    background-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-outline-gold {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary) !important;
}

.btn-outline-gold:hover {
    background: var(--secondary);
    color: var(--primary-dark) !important;
    transform: translateY(-3px);
}

/* =========================================
   Layout: Topbar & Header
========================================= */
.topbar {
    background-color: var(--primary-dark);
    color: var(--text-light);
    font-size: 0.875rem;
    padding: 0.5rem 0;
}

.topbar a {
    color: var(--text-light);
}

.topbar a:hover {
    color: var(--secondary);
}

.header-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-smooth);
}

.navbar-brand img {
    height: 70px;
    width: auto;
    transition: transform var(--transition-fast);
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--primary) !important;
    padding: 1rem 1.25rem !important;
    position: relative;
    font-size: 1.05rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 1.25rem;
    right: 1.25rem;
    height: 2px;
    background-color: var(--secondary);
    transform: scaleX(0);
    transition: transform var(--transition-fast);
    transform-origin: right;
}

.nav-link:hover::after, .nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-link:hover {
    color: var(--secondary) !important;
}

/* =========================================
   Hero Section
========================================= */
.hero-slider {
    position: relative;
    height: 90vh;
    min-height: 600px;
    background-color: var(--primary-dark);
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out, transform 8s linear;
    transform: scale(1);
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1.05);
    z-index: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(5, 20, 40, 0.9) 0%, rgba(10, 35, 66, 0.7) 50%, rgba(0,0,0,0.1) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-title {
    font-size: 4.5rem;
    color: white;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s forwards 0.5s;
}

.hero-title span {
    color: var(--secondary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    max-width: 600px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s forwards 0.7s;
}

.hero-actions {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s forwards 0.9s;
}

.glass-floating-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 2rem;
    color: white;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateX(30px);
    animation: fadeLeft 1s forwards 1.2s;
}

/* =========================================
   Sections General
========================================= */
.section-padding {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h5 {
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.section-title h5::before, .section-title h5::after {
    content: '';
    height: 2px;
    width: 40px;
    background-color: var(--secondary);
}

.section-title h2 {
    font-size: 3rem;
    color: var(--primary-dark);
}

.bg-navy {
    background-color: var(--primary);
    color: white;
}
.bg-navy .section-title h2 {
    color: white;
}

/* =========================================
   About / Message Section
========================================= */
.message-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 3rem;
    position: relative;
    border-left: 6px solid var(--secondary);
}

.message-card::before {
    content: '\201C';
    font-family: serif;
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 100px;
    line-height: 1;
    color: rgba(212, 175, 55, 0.15);
}

/* =========================================
   Features / Stats
========================================= */
.stat-box {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    border-bottom: 4px solid transparent;
}

.stat-box:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-bottom-color: var(--secondary);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 1rem;
}

.stat-label {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   Academics Grid
========================================= */
.academic-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    background: var(--surface);
    height: 100%;
}

.academic-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-hover);
}

.academic-img {
    height: 240px;
    overflow: hidden;
    position: relative;
}

.academic-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.academic-card:hover .academic-img img {
    transform: scale(1.1);
}

.academic-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    color: var(--primary-dark);
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    z-index: 1;
}

.academic-content {
    padding: 2.5rem 2rem;
    position: relative;
}

.academic-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 2rem;
    right: 2rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
}

.academic-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.academic-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.academic-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.academic-features li i {
    color: var(--secondary);
}

/* =========================================
   Gallery Masonry
========================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: 250px;
    gap: 1.5rem;
}

.gallery-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.gallery-item.large {
    grid-row: span 2;
    grid-column: span 2;
}
@media (max-width: 768px) {
    .gallery-item.large {
        grid-row: span 1;
        grid-column: span 1;
    }
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 35, 66, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: var(--transition-smooth);
}

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

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

.gallery-overlay::after {
    content: '\f065'; /* FontAwesome fa-expand icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    font-size: 2rem;
    color: white;
    opacity: 0;
    transition: all var(--transition-smooth);
    background: rgba(255, 255, 255, 0.2);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: var(--shadow-soft);
}

.gallery-item:hover .gallery-overlay::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.gallery-overlay h4 {
    color: white;
    margin: 0;
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
}

.gallery-item:hover .gallery-overlay h4 {
    transform: translateY(0);
}

/* =========================================
   Modern Lightbox
========================================= */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2050; /* Higher than navbar */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 20, 40, 0.95); /* Deep navy glass */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity var(--transition-smooth);
    align-items: center; 
    justify-content: center;
    flex-wrap: wrap; 
}

.lightbox.show {
    opacity: 1;
}

.lightbox-toolbar {
    position: absolute;
    top: 0;
    right: 0;
    padding: 20px;
    z-index: 2060;
}

.lightbox-close {
    color: rgba(255, 255, 255, 0.7);
    font-size: 28px;
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.lightbox-close:hover {
    color: var(--secondary);
    background: rgba(255,255,255,0.15);
    transform: rotate(90deg) scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 2060;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.lightbox-nav:hover {
    background: var(--secondary);
    color: var(--primary-dark);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
    left: 30px;
}

.lightbox-nav.next {
    right: 30px;
}

.lightbox-img-wrapper {
    width: 100%;
    height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 100px;
}

.lightbox-content {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--radius-sm);
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    transform: scale(0.95);
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.2s ease;
    object-fit: contain;
}

.lightbox.show .lightbox-content {
    transform: scale(1);
}

.lightbox-caption {
    width: 100%;
    text-align: center;
    color: white;
    font-size: 1.5rem;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease 0.3s;
    margin-top: 15px;
    padding: 0 20px;
}

.lightbox.show .lightbox-caption {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .lightbox-img-wrapper { padding: 0 20px; height: 60vh; margin-top: 50px;}
    .lightbox-nav { width: 44px; height: 44px; font-size: 16px; top: unset; bottom: 30px; transform: none; }
    .lightbox-nav:hover { transform: scale(1.1); }
    .lightbox-nav.prev { left: 25%; }
    .lightbox-nav.next { right: 25%; }
    .lightbox-caption { font-size: 1.25rem; margin-top: 20px; margin-bottom: 80px; }
}

/* =========================================
   Footer
========================================= */
.footer-premium {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 5rem 0 2rem;
    position: relative;
    border-top: 4px solid var(--secondary);
}

.footer-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23173860' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: 0;
}

.footer-content {
    position: relative;
    z-index: 1;
}

.footer-logo {
    height: 80px;
    margin-bottom: 2rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: white;
    margin-right: 10px;
    transition: var(--transition-fast);
}

.social-links a:hover {
    background: var(--secondary);
    color: var(--primary-dark);
    transform: translateY(-3px);
}

.footer-premium p.text-muted, 
.footer-premium .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.footer-premium .text-warning {
    color: var(--secondary) !important;
}

.footer-links li {
    margin-bottom: 0.75rem;
    list-style: none;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a::before {
    content: '→';
    color: var(--secondary);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.2s ease;
}

.footer-links a:hover {
    color: var(--secondary);
    transform: translateX(5px);
}

.footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* =========================================
   Animations
========================================= */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeLeft {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* =========================================
   Responsive Adjustments
========================================= */
@media (max-width: 991px) {
    .hero-title { font-size: 3rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .section-title h2 { font-size: 2.5rem; }
    .glass-floating-card { display: none; } /* Hide floating card on smaller screens, put content inline */
}

@media (max-width: 768px) {
    .header-glass { padding: 0.5rem 0; }
    .section-padding { padding: 4rem 0; }
    .hero-slider { height: auto; min-height: 80vh; }
    .hero-title { font-size: 2.5rem; }
}
