/* ===============================
   MIKEFLORA NURSERY & PRIMARY SCHOOL
   Global Stylesheet
   Author: ChatGPT (rewritten per user request)
   Notes:
   - Map these CSS variables to your exact brand colors.
   - Do not change class names unless you also update the HTML.
   =============================== */

:root {
    /* Replace these with your existing palette to "maintain your colors" */
    --brand-blue: #8B4513;
    /* e.g., used for headings, accents */
    --brand-brown: #1E90FF;
    /* e.g., secondary accent */
    --brand-gold: #F4C542;
    /* subtle highlight */
    --brand-dark: #0c0e12;
    /* text on light */
    --brand-light: #ffffff;
    /* text on dark / cards */
    --surface: #ffffff;
    --surface-elev: #0f1116cc;
    /* translucent for overlay navbar */
    --muted: #6c757d;
    --border: #e6e8eb;
    --radius: 1.25rem;
    --radius-lg: 1.75rem;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, .08);
    --shadow-strong: 0 20px 60px rgba(0, 0, 0, .18);
}


/* Typography */

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    color: var(--brand-dark);
    background: #fbfcfe;
    line-height: 1.6;
}


/* Utility */

.text-brand {
    color: var(--brand-blue) !important;
}

.text-accent {
    color: var(--brand-brown) !important;
}

.bg-brand {
    background: var(--brand-blue) !important;
    color: var(--brand-light);
}

.bg-accent {
    background: var(--brand-brown) !important;
    color: var(--brand-light);
}

.shadow-soft {
    box-shadow: var(--shadow-soft);
}

.rounded-2xl {
    border-radius: var(--radius-lg);
}


/* =================== NAVBAR OVER HERO =================== */

.navbar.navbar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .2), transparent);
    transition: background-color .25s ease, box-shadow .25s ease;
    backdrop-filter: saturate(140%) blur(6px);
}

.navbar.navbar-overlay .navbar-brand {
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--brand-light);
    display: flex;
    align-items: center;
    gap: .6rem;
}

.navbar.navbar-overlay .navbar-brand img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .35);
}

.navbar.navbar-overlay .nav-link {
    color: var(--brand-light) !important;
    font-weight: 600;
}

.navbar.navbar-overlay .dropdown-menu {
    border-radius: .75rem;
    border: 1px solid rgba(255, 255, 255, .15);
    background: rgba(20, 24, 31, .95);
    box-shadow: var(--shadow-strong);
}

.navbar.navbar-overlay .dropdown-item {
    color: #f1f3f5;
}

.navbar.navbar-overlay .dropdown-item:hover {
    background: rgba(255, 255, 255, .08);
}


/* Solid style after scroll */

.navbar.navbar-overlay.scrolled {
    background: #0f1116ee;
    /* becomes solid/dark for readability */
    box-shadow: 0 4px 20px rgba(0, 0, 0, .25);
}


/* Mobile toggler */

.navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, .5);
}

.navbar .navbar-toggler:focus {
    box-shadow: none;
}


/* =================== HERO CAROUSEL =================== */

.hero {
    position: relative;
    height: clamp(60vh, 70vh + 8vw, 88vh);
    overflow: hidden;
}

.hero .carousel,
.hero .carousel-inner,
.hero .carousel-item {
    height: 100%;
}

.hero .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.8);
}

.hero .hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(1200px 600px at 20% 20%, rgba(0, 0, 0, .35), transparent 50%), linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .15) 40%, transparent 65%);
    pointer-events: none;
}

.hero .hero-caption {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--brand-light);
    padding: 7rem 1rem 2rem;
}

.hero h1 {
    font-size: clamp(1.8rem, 1.2rem + 2.5vw, 3.25rem);
    font-weight: 900;
    margin-bottom: .6rem;
    text-shadow: 0 6px 30px rgba(0, 0, 0, .35);
}

.hero p {
    max-width: 850px;
    margin: 0 auto 1rem;
    font-size: clamp(1rem, .9rem + .3vw, 1.15rem);
    opacity: .95;
}


/* =================== WELCOME / INTRO =================== */

.section-calendar {
    margin-top: 20px;
}

.section-staff {
    margin-top: -50px;
}

.section-admission {
    margin-top: -50px;
}

.section {
    margin-top: -100px;
    margin-bottom: 20px;
}

.section-intro {
    position: relative;
    padding: clamp(2rem, 4vw, 4rem) 0 2rem;
    margin-top: -100px;
}

.section-intro .intro-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: clamp(1rem, 2.5vw, 2rem);
}

.section-intro .proprietress {
    position: absolute;
    right: -12px;
    bottom: -28px;
    width: min(220px, 35vw);
    transform: rotate(2deg);
    border: 6px solid #fff;
    border-radius: 20px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .2);
}

@media (max-width: 991px) {
    .section-intro .proprietress {
        position: static;
        display: block;
        margin: 1rem auto 0;
        transform: none;
        width: min(260px, 60vw);
    }
}


/* =================== WHY US =================== */

.why-us {
    padding: 2rem 0 1rem;
}

.why-card {
    border-radius: var(--radius);
    background: #ffffff;
    border: 1px solid var(--border);
    padding: 1.25rem;
    height: 100%;
    box-shadow: var(--shadow-soft);
}

.why-card i {
    font-size: 1.6rem;
    margin-bottom: .6rem;
    color: var(--brand-brown);
}

.why-card h5 {
    font-weight: 800;
    letter-spacing: .3px;
}


/* =================== TILES (Gallery/Staff/Map/Calendar) =================== */

.tiles {
    padding: 2rem 0 3rem;
}

.tile {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 230px;
    display: grid;
    place-items: end;
    color: #fff;
    padding: 1rem;
    background: #0e1117;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: var(--shadow-soft);
    transition: transform .35s ease, box-shadow .35s ease;
}

.tile:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-strong);
}

.tile .tile-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(.75);
    transition: transform .6s ease, filter .35s ease;
}

.tile:hover .tile-bg {
    transform: scale(1.05);
    filter: brightness(.9);
}

.tile .tile-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, .7));
}

.tile .tile-label {
    position: relative;
    z-index: 1;
    font-weight: 800;
    letter-spacing: .5px;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.tile .tile-label i {
    font-size: 1.2rem;
}


/* Map iframe inside tile */

.tile iframe {
    border: 0;
    width: 100%;
    height: 100%;
}


/* =================== ACADEMIC CALENDAR SECTION =================== */

.section-calendar {
    padding: 2rem 0 3rem;
}

.calendar-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.calendar-card .card-header {
    background: linear-gradient(90deg, var(--brand-blue), var(--brand-brown));
    color: #fff;
    font-weight: 800;
}


/* =================== FOOTER =================== */

.footer {
    background: #0f1116;
    color: #cfd3d8;
    padding: 3rem 0 2rem;
}

.footer a {
    color: #e8ecf2;
    text-decoration: none;
}

.footer .logo-img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: .5rem;
}


/* =================== GALLERY & STAFF =================== */

.section-staff {
    padding: 2rem 0 1rem;
}

.staff-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: transform .25s ease;
}

.staff-card:hover {
    transform: translateY(-4px);
}

.staff-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.staff-card .info {
    padding: .9rem;
}

.staff-card .role {
    color: var(--muted);
    font-size: .95rem;
}

.section-gallery {
    padding: 1rem 0 3rem;
}

.gallery-grid {
    columns: 1;
    column-gap: 1rem;
}

@media (min-width: 576px) {
    .gallery-grid {
        columns: 2;
    }
}

@media (min-width: 992px) {
    .gallery-grid {
        columns: 3;
    }
}

.gallery-grid .g-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.gallery-grid img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}


/* =================== HELPERS =================== */

.section {
    padding: 3rem 0;
}

.lead-strong {
    font-weight: 600;
    font-size: clamp(1.05rem, 1rem + .25vw, 1.2rem);
}

.btn-brand {
    background: var(--brand-blue);
    color: #fff;
    border: none;
    font-weight: 700;
    border-radius: .8rem;
    padding: .7rem 1.1rem;
}

.btn-brand:hover {
    opacity: .9;
    color: #fff;
}

.btn-outline-brand {
    border: 2px solid var(--brand-light);
    color: var(--brand-light);
    background: transparent;
    font-weight: 700;
    border-radius: .8rem;
    padding: .6rem 1rem;
}

.btn-outline-brand:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}


/* Spacing to account for fixed navbar */

main {
    padding-top: 76px;
}

@media (min-width: 992px) {
    main {
        padding-top: 86px;
    }
}


/* Accessible focus */

:focus-visible {
    outline: 3px dashed var(--brand-gold);
    outline-offset: 2px;
}