/* ═══════════════════════════════════════════════════════════
   LITTLE PEARL ACADEMY — Mobile-First & Clean Stylesheet
   Fonts: Playfair Display + Nunito + Poppins
   Colors: Royal Navy + Gold + Off-White
   ═══════════════════════════════════════════════════════════ */

:root {
    --navy:         #1a2744;
    --navy-deep:    #0f1a30;
    --navy-light:   #2a3f66;
    --royal-blue:   #1e3a5f;
    --gold:         #c8973e;
    --gold-light:   #e8c068;
    --white:        #ffffff;
    --off-white:    #faf9f6;
    --cream:        #f4f1ea;
    --light-gray:   #ebe8e1;
    --text:         #332f2a;
    --text-muted:   #666059;

    --shadow-sm:    0 2px 8px rgba(26, 39, 68, 0.05);
    --shadow-md:    0 4px 20px rgba(26, 39, 68, 0.08);

    --section-py:   80px;
    --container-px: 20px;
    --radius-sm:    8px;
    --radius-md:    12px;
    --radius-full:  9999px;
    --transition:   0.3s ease;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    touch-action: manipulation;
}

body {
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--off-white);
    overflow-x: hidden;
    width: 100%;
}

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

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

ul { list-style: none; }

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--navy);
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 var(--container-px);
    width: 100%;
}

.section {
    padding: var(--section-py) 0;
}

.text-gradient {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gold { color: var(--gold); }
.center { text-align: center; }

.section-label {
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold);
    margin-bottom: 8px;
}

.section-title {
    font-size: clamp(24px, 4vw, 38px);
    margin-bottom: 16px;
}

.section-desc {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 15px;
    padding: 12px 28px;
    min-height: 48px;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-primary {
    background: var(--navy);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--royal-blue);
    transform: translateY(-2px);
}

/* Preloader */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--navy-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}
.preloader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.preloader-logo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    margin: 0 auto 16px auto;
    display: block;
    object-fit: contain;
    background: var(--white);
    padding: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.preloader-bar {
    width: 140px;
    height: 3px;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto;
}
.preloader-progress {
    width: 0%;
    height: 100%;
    background: var(--gold);
    animation: preloaderFill 1s ease-out forwards;
}
@keyframes preloaderFill { to { width: 100%; } }

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 14px 0;
    transition: all 0.3s ease;
}
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm);
    padding: 10px 0;
}

.nav-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 var(--container-px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: contain;
    background: var(--white);
    padding: 2px;
}

.nav-brand-text { display: flex; flex-direction: column; }

.brand-name {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 17px;
    color: var(--white);
    line-height: 1.2;
}
.navbar.scrolled .brand-name { color: var(--navy); }

.brand-tagline {
    font-size: 11px;
    color: rgba(255,255,255,0.75);
}
.navbar.scrolled .brand-tagline { color: var(--text-muted); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    padding: 8px 14px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-full);
}
.nav-link:hover, .nav-link.active {
    color: var(--white);
    background: rgba(255,255,255,0.15);
}
.navbar.scrolled .nav-link {
    color: var(--text-muted);
}
.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
    color: var(--navy);
    background: var(--cream);
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
}
.nav-hamburger span {
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: all 0.3s ease;
    border-radius: 2px;
}
.navbar.scrolled .nav-hamburger span { background: var(--navy); }

.nav-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
}
.nav-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Hero */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 26, 48, 0.82) 0%, rgba(15, 26, 48, 0.72) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 100px 20px 60px;
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    background: rgba(200, 151, 62, 0.25);
    border: 1px solid rgba(200, 151, 62, 0.4);
    color: var(--gold-light);
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(28px, 5vw, 52px);
    color: var(--white);
    margin-bottom: 18px;
    line-height: 1.15;
}

.hero-subtitle {
    font-size: clamp(15px, 2vw, 17px);
    color: rgba(255, 255, 255, 0.85);
    margin: 0 auto 28px;
    max-width: 620px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 36px;
}

.hero-stats-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 16px 28px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-stat { text-align: center; }

.hero-stat-number {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--gold-light);
}

.hero-stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.75);
}

.hero-stat-divider {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.2);
}

/* Announcement Ticker */
.announcement-ticker {
    background: var(--navy);
    overflow: hidden;
}
.ticker-wrap { overflow: hidden; }
.ticker-content {
    display: flex;
    gap: 50px;
    animation: tickerScroll 22s linear infinite;
    white-space: nowrap;
    padding: 10px 0;
}
.ticker-content span {
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}
@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* About Section */
.about { background: var(--white); }

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-image-wrapper {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.about-img {
    width: 100%;
    height: 380px;
    object-fit: cover;
}

.about-description {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.about-feature {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px;
    background: var(--cream);
    border-radius: var(--radius-sm);
}
.feature-icon {
    font-size: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.about-feature h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 2px;
}
.about-feature p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Why Choose Us */
.why-choose { background: var(--cream); }

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.why-card {
    background: var(--white);
    padding: 24px 18px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.why-card-icon {
    font-size: 30px;
    margin-bottom: 10px;
}
.why-card h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
}
.why-card p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Programs */
.programs { background: var(--white); }

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

.program-card {
    background: var(--off-white);
    border-radius: var(--radius-md);
    padding: 28px 20px;
    border: 1px solid var(--light-gray);
}
.program-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 14px;
}
.program-title {
    font-family: 'Poppins', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 4px;
}
.program-age {
    font-size: 12px;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 10px;
}
.program-desc {
    font-size: 14px;
    color: var(--text-muted);
}

/* Facilities */
.facilities { background: var(--cream); }

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

.facility-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}
.facility-img-wrap {
    height: 190px;
    overflow: hidden;
}
.facility-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.facility-info { padding: 18px; }
.facility-info h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 4px;
}
.facility-info p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Gallery */
.gallery { background: var(--white); }

.gallery-filter {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.filter-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 18px;
    min-height: 40px;
    border-radius: var(--radius-full);
    border: 1px solid var(--light-gray);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}
.filter-btn.active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.gallery-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 26, 48, 0.7);
    display: flex;
    align-items: flex-end;
    padding: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--white);
}
.gallery-item.hidden { display: none; }

/* Contact Section */
.contact { background: var(--cream); }

.contact-info-cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    flex: 1;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.contact-card-icon {
    font-size: 22px;
    width: 44px;
    height: 44px;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.contact-card h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 4px;
}
.contact-card p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Map Section */
.map-section { background: var(--navy-deep); }
.map-wrapper iframe { display: block; }

/* Footer */
.footer {
    background: var(--navy-deep);
    color: rgba(255,255,255,0.7);
    padding: 40px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.footer-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.footer-logo-wrap h3 {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    color: var(--white);
}
.footer-tagline {
    font-size: 11px;
    color: var(--gold-light);
}
.footer-about {
    font-size: 13px;
    max-width: 450px;
}
.footer-links-col h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 12px;
}
.footer-links-col ul li { margin-bottom: 6px; }
.footer-links-col ul li a {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}
.footer-links-col ul li a:hover { color: var(--gold-light); }
.footer-bottom {
    padding: 16px 0;
    text-align: center;
}
.footer-bottom p {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    z-index: 500;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

[data-animate] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE DESIGN (TABLETS & PHONES)
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 992px) {
    :root { var(--section-py): 60px; }
    .about-grid { grid-template-columns: 1fr; }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .facilities-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    :root {
        --section-py: 50px;
        --container-px: 16px;
    }

    .nav-hamburger { display: flex; }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        background: var(--navy-deep);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 24px;
        gap: 8px;
        transition: right 0.3s ease;
        z-index: 999;
        box-shadow: -4px 0 20px rgba(0,0,0,0.3);
    }
    .nav-links.open { right: 0; }
    .nav-link {
        width: 100%;
        color: rgba(255,255,255,0.85);
        font-size: 15px;
        padding: 10px 16px;
    }

    .hero { min-height: 70vh; }
    .hero-content { padding: 90px 16px 40px; }
    .hero-stats-strip {
        flex-direction: column;
        gap: 10px;
        padding: 14px 20px;
    }
    .hero-stat-divider { display: none; }

    .about-img { height: 260px; }
    .programs-grid { grid-template-columns: 1fr; }
    .facilities-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .why-grid { grid-template-columns: 1fr; }
    .contact-info-cards { flex-direction: column; }
}

@media (max-width: 480px) {
    .brand-name { font-size: 15px; }
    .brand-tagline { font-size: 10px; }
    .hero-title { font-size: 26px; }
    .hero-subtitle { font-size: 14px; }
    .gallery-grid { grid-template-columns: 1fr; }
    .facility-img-wrap { height: 170px; }
}
