/* ==========================================================================
   Revive Academy — site stylesheet  (design: "Happy Learning")
   Loaded after css/bootstrap.min.css on every page.

   A soft, joyful school look in the two colours of the logo — navy
   #1B394C and gold #F9B925 — with light tints of each for backgrounds,
   photos in rounded blob shapes, hand-drawn doodles and wavy section edges.

   1.  Design tokens
   2.  Base & typography
   3.  Shared pieces (buttons, section heads, waves, photo blob, doodles)
   4.  Spinner & back-to-top
   5.  Top bar & navigation
   6.  Home hero
   7.  Inner page header & breadcrumb
   8.  Home sections (mission, values, head teacher, offer, why, events)
   9.  About / Philosophy
   10. Contact
   11. Photo galleries (Life at Revive Academy)
   12. Template sections (services, programs, blog, team, testimonials, 404)
   13. Call-to-action band, footer, copyright
   14. Modals (and 14b. Arabic pattern backgrounds)
   15. Reduced motion
   ========================================================================== */


/* 1. Design tokens
   ========================================================================== */
:root {
    /* The two colours of the Revive Academy logo. Everything else is a tint of them. */
    --navy: #1b394c;
    --navy-deep: #11293a;
    --gold: #f9b925;
    --gold-deep: #a06c00;   /* gold for small text on light backgrounds */
    --navy-soft: #e6edf1;
    --gold-soft: #fff2cf;
    --ink: var(--navy);

    --cream: #fff9ea;
    --text: #4a5b68;
    --white: #ffffff;

    --font-display: 'Fredoka', 'Segoe UI', Tahoma, sans-serif;
    --font-body: 'Nunito', 'Segoe UI', Roboto, Arial, sans-serif;

    --radius-sm: 14px;
    --radius: 24px;
    --radius-lg: 36px;
    --blob: 58% 42% 55% 45% / 48% 56% 44% 52%;

    --shadow-sm: 0 4px 14px rgba(27, 57, 76, .08);
    --shadow: 0 18px 40px -18px rgba(27, 57, 76, .35);

    --ease: cubic-bezier(.22, .61, .36, 1);
    --bounce: cubic-bezier(.34, 1.56, .64, 1);

    /* Each card picks its own colour by setting --c / --c-soft. */
    --c: var(--navy);
    --c-soft: var(--navy-soft);
    --c-on: var(--white);   /* text / icon colour on top of --c */

    /* Wavy and scalloped edges, used as masks. */
    --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 20' preserveAspectRatio='none'%3E%3Cpath d='M0 20V10C20-3 40 23 60 10S100-3 120 10V20z'/%3E%3C/svg%3E");
    --scallop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 30' preserveAspectRatio='none'%3E%3Cpath d='M0 30V22a20 20 0 0 1 40 0 20 20 0 0 1 40 0v8z'/%3E%3C/svg%3E");

    /* Islamic geometric pattern (eight-pointed star tile), in the two brand colours. */
    --pattern-navy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%231b394c' stroke-opacity='.07' stroke-width='1.4' stroke-linejoin='round'%3E%3Crect x='38' y='38' width='44' height='44'/%3E%3Crect x='38' y='38' width='44' height='44' transform='rotate(45 60 60)'/%3E%3Crect x='49' y='49' width='22' height='22'/%3E%3Crect x='49' y='49' width='22' height='22' transform='rotate(45 60 60)'/%3E%3Cpath d='M0 60h29M91 60h29M60 0v29M60 91v29'/%3E%3Cpath d='M-9 0L0-9 9 0 0 9zM111 0l9-9 9 9-9 9zM-9 120l9-9 9 9-9 9zM111 120l9-9 9 9-9 9z'/%3E%3C/g%3E%3C/svg%3E");
    --pattern-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23f9b925' stroke-opacity='.2' stroke-width='1.4' stroke-linejoin='round'%3E%3Crect x='38' y='38' width='44' height='44'/%3E%3Crect x='38' y='38' width='44' height='44' transform='rotate(45 60 60)'/%3E%3Crect x='49' y='49' width='22' height='22'/%3E%3Crect x='49' y='49' width='22' height='22' transform='rotate(45 60 60)'/%3E%3Cpath d='M0 60h29M91 60h29M60 0v29M60 91v29'/%3E%3Cpath d='M-9 0L0-9 9 0 0 9zM111 0l9-9 9 9-9 9zM-9 120l9-9 9 9-9 9zM111 120l9-9 9 9-9 9z'/%3E%3C/g%3E%3C/svg%3E");
    --pattern-on-navy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23f9b925' stroke-opacity='.13' stroke-width='1.4' stroke-linejoin='round'%3E%3Crect x='38' y='38' width='44' height='44'/%3E%3Crect x='38' y='38' width='44' height='44' transform='rotate(45 60 60)'/%3E%3Crect x='49' y='49' width='22' height='22'/%3E%3Crect x='49' y='49' width='22' height='22' transform='rotate(45 60 60)'/%3E%3Cpath d='M0 60h29M91 60h29M60 0v29M60 91v29'/%3E%3Cpath d='M-9 0L0-9 9 0 0 9zM111 0l9-9 9 9-9 9zM-9 120l9-9 9 9-9 9zM111 120l9-9 9 9-9 9z'/%3E%3C/g%3E%3C/svg%3E");

    /* Hand-drawn doodles. */
    --d-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 4l5 10 11 2-8 8 2 11-10-5-10 5 2-11-8-8 11-2z' fill='none' stroke='%23f9b925' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E");
    --d-cloud: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 40'%3E%3Cpath d='M16 34h34a10 10 0 0 0 1-20 14 14 0 0 0-27-2 9 9 0 0 0-12 8 7 7 0 0 0 4 14z' fill='none' stroke='%231b394c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --d-plane: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M4 22L44 6 30 42l-7-14zM23 28L44 6' fill='none' stroke='%23f9b925' stroke-width='3' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
    --d-heart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 34S5 25 5 14a8 8 0 0 1 15-4 8 8 0 0 1 15 4c0 11-15 20-15 20z' fill='none' stroke='%23f9b925' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E");
    --d-squiggle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 24'%3E%3Cpath d='M4 12c8-12 16 12 24 0s16 12 24 0 16 12 24 0' fill='none' stroke='%231b394c' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
    --d-sun: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Cg fill='none' stroke='%23f9b925' stroke-width='3' stroke-linecap='round'%3E%3Ccircle cx='30' cy='30' r='11'/%3E%3Cpath d='M30 4v8M30 48v8M4 30h8M48 30h8M12 12l6 6M42 42l6 6M48 12l-6 6M18 42l-6 6'/%3E%3C/g%3E%3C/svg%3E");
    --d-underline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 14'%3E%3Cpath d='M4 9c30-7 60-7 92-3s44 3 60-1' fill='none' stroke='%23f9b925' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E");
}


/* 2. Base & typography
   ========================================================================== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
}

body {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.7;
    color: var(--text);
    background: var(--white);
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    color: var(--ink);
    text-wrap: balance;
}

.display-1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
.display-2 { font-size: clamp(2.3rem, 5vw, 3.8rem); }
.display-3 { font-size: clamp(2rem, 4.2vw, 3rem); }
.display-4 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); }
.display-5 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.display-6 { font-size: clamp(1.45rem, 2.6vw, 2rem); line-height: 1.25; }

p { margin-bottom: 1rem; }

a {
    color: var(--navy);
    text-decoration: none;
    transition: color .2s var(--ease);
}

a:hover { color: var(--gold-deep); }

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

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
    border-radius: 8px;
}

::selection {
    background: var(--gold);
    color: var(--ink);
}

/* Bootstrap colour helpers re-pointed at the palette. */
.bg-light { background-color: var(--cream) !important; }
.bg-dark,
.bg-secondary { background-color: var(--navy-deep) !important; }
.text-dark { color: var(--ink) !important; }
.text-body { color: var(--text) !important; }
.text-muted { color: #667486 !important; }
.border-primary { border-color: #dde3ea !important; }


/* 3. Shared pieces
   ========================================================================== */
main { overflow-x: clip; }

.section {
    position: relative;
    padding: clamp(4rem, 8vw, 6.5rem) 0;
}

.section--cream { background: var(--cream); }

/* A full-width violet band with wavy top and bottom edges. */
.band {
    --band: var(--navy);
    position: relative;
    margin: 19px 0;
    background: var(--band);
    color: rgba(255, 255, 255, .9);
}

.band::before,
.band::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 20px;
    background: var(--band);
    -webkit-mask: var(--wave) repeat-x center / 120px 20px;
    mask: var(--wave) repeat-x center / 120px 20px;
    pointer-events: none;
}

.band::before { top: -19px; }

.band::after {
    bottom: -19px;
    transform: scaleY(-1);
}

/* Bootstrap's widest gutter is wider than the container padding on phones,
   which pushed rows past the screen edge. */
@media (max-width: 575.98px) {
    .row.g-5 {
        --bs-gutter-x: 1.5rem;
        --bs-gutter-y: 2.75rem;
    }
}

/* --- Buttons --- */
.btn {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 999px;
    transition: background-color .25s var(--ease), color .25s var(--ease),
                transform .3s var(--bounce), box-shadow .25s var(--ease);
}

.btn:active { transform: scale(.96); }

.btn.btn-primary,
.btn.btn-primary.text-white {
    background: var(--navy) !important;
    border: 0 !important;
    color: var(--white) !important;
    box-shadow: 0 10px 22px -10px rgba(27, 57, 76, .9);
}

.btn.btn-primary:hover,
.btn.btn-primary:focus-visible {
    background: var(--gold) !important;
    color: var(--navy) !important;
    transform: translateY(-3px);
    box-shadow: 0 14px 24px -10px rgba(249, 185, 37, .9);
}

/* Large buttons carry a little arrow in a circle. */
.btn-lg,
.btn.py-3 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    padding: .7rem .75rem .7rem 1.6rem !important;
    font-size: 1.1rem;
}

.btn-lg::after,
.btn.py-3::after {
    content: "\f061";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--white);
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: .8rem;
    color: var(--navy);
    transition: transform .3s var(--bounce);
}

.btn-lg:hover::after,
.btn.py-3:hover::after { transform: translateX(3px) rotate(-20deg); }

/* Secondary action: plain words with a pink arrow. */
.btn-outline-light {
    border: 0;
    background: transparent;
    color: var(--ink);
}

.btn-outline-light::after {
    background: var(--gold);
    color: var(--navy);
}

.btn-outline-light:hover,
.btn-outline-light:focus-visible {
    background: transparent;
    color: var(--gold-deep);
    transform: translateY(-3px);
}

.btn-border-radius { border-radius: 999px; }

.btn-square,
.btn-sm-square,
.btn-md-square,
.btn-lg-square {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    border-radius: 50%;
    flex-shrink: 0;
}

.btn-square { width: 34px; height: 34px; }
.btn-sm-square { width: 38px; height: 38px; }
.btn-md-square { width: 46px; height: 46px; }
.btn-lg-square { width: 56px; height: 56px; }

/* --- Section heading: little dashes either side, like a child's drawing --- */
.section-head {
    max-width: 740px;
    margin: 0 auto clamp(2.25rem, 5vw, 3.5rem);
    text-align: center;
}

.section-head > :last-child { margin-bottom: 0; }

.section-head .section-title,
.section-head h1,
.section-head h2 {
    margin-bottom: 0;
    padding-bottom: 1.1rem;
    background: var(--d-underline) center bottom / 160px 14px no-repeat;
}

.section-head .section-lead,
.section-head p {
    margin-top: 1rem;
    font-size: 1.15rem;
    color: var(--text);
}

.section-head--left {
    margin-left: 0;
    text-align: left;
}

.section-head--left .section-title,
.section-head--left h1,
.section-head--left h2 { background-position: left bottom; }

/* Small label above a heading (About, Contact and template pages). */
.eyebrow,
.title-border-radius {
    display: inline-flex !important;
    align-items: center;
    margin-bottom: 1rem !important;
    padding: .25rem 1.1rem !important;
    border: 0 !important;
    border-radius: 999px;
    background: var(--navy);
    font-family: var(--font-display);
    font-size: .95rem;
    font-weight: 500;
    letter-spacing: .03em;
    line-height: 1.5;
    color: var(--white) !important;
}

/* --- Photo in a blob shape, with a coloured blob peeking out behind --- */
.photo-blob {
    --c: var(--navy);
    position: relative;
    width: calc(100% - 28px);
    max-width: 470px;
    margin-inline: auto;
    isolation: isolate;
}

.photo-blob--yellow { --c: var(--gold); }
.photo-blob--pink { --c: var(--gold); }

.photo-blob::before {
    content: "";
    position: absolute;
    inset: -4%;
    z-index: -1;
    border-radius: 45% 55% 48% 52% / 56% 44% 56% 44%;
    background: var(--c);
    transform: rotate(-8deg) translate(4%, 3%);
    transition: transform .8s var(--bounce);
}

.photo-blob:hover::before { transform: rotate(4deg) translate(-2%, 1%); }

.photo-blob > img,
.photo-blob > .blob-media {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 8px solid var(--white);
    border-radius: var(--blob);
    box-shadow: var(--shadow);
    background-color: var(--navy-soft);
}

.img-border-radius { border-radius: var(--radius); }

/* --- Doodles --- */
.doodle {
    position: absolute;
    background: no-repeat center / contain;
    pointer-events: none;
    animation: doodle-float 5s ease-in-out infinite;
}

.doodle--star { width: 38px; height: 38px; background-image: var(--d-star); }
.doodle--cloud { width: 70px; height: 44px; background-image: var(--d-cloud); animation-duration: 7s; }
.doodle--plane { width: 52px; height: 52px; background-image: var(--d-plane); animation-duration: 6s; }
.doodle--heart { width: 36px; height: 36px; background-image: var(--d-heart); animation-duration: 4.5s; }
.doodle--squiggle { width: 84px; height: 26px; background-image: var(--d-squiggle); animation-duration: 6.5s; }
.doodle--sun { width: 72px; height: 72px; background-image: var(--d-sun); animation: doodle-spin 24s linear infinite; }

@keyframes doodle-float {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

@keyframes doodle-spin {
    to { transform: rotate(360deg); }
}

/* Sections get a doodle or two in their corners. */
.mission::before,
.offer-section::before,
.offer-section::after,
.why-section::before,
.why-section::after,
.events::before,
.events::after,
.about::before,
.about::after,
.core-values-section::before,
.core-values-section::after {
    content: "";
    position: absolute;
    background: no-repeat center / contain;
    pointer-events: none;
    animation: doodle-float 6s ease-in-out infinite;
}

.mission::before { top: 12%; right: 6%; width: 52px; height: 52px; background-image: var(--d-plane); }
.core-values-section::before { top: 14%; left: 5%; width: 40px; height: 40px; background-image: var(--d-star); }
.core-values-section::after { bottom: 10%; right: 5%; width: 70px; height: 44px; background-image: var(--d-cloud); }
.offer-section::before { top: 10%; left: 4%; width: 84px; height: 26px; background-image: var(--d-squiggle); }
.offer-section::after { top: 12%; right: 5%; width: 38px; height: 38px; background-image: var(--d-heart); }
.why-section::before { top: 12%; right: 6%; width: 66px; height: 66px; background-image: var(--d-sun); animation: doodle-spin 24s linear infinite; }
.why-section::after { bottom: 8%; left: 4%; width: 40px; height: 40px; background-image: var(--d-star); }
.events::before { top: 9%; left: 6%; width: 70px; height: 44px; background-image: var(--d-cloud); }
.events::after { top: 12%; right: 6%; width: 50px; height: 50px; background-image: var(--d-plane); }
.about::before { top: 8%; right: 5%; width: 40px; height: 40px; background-image: var(--d-star); }
.about::after { bottom: 8%; left: 4%; width: 84px; height: 26px; background-image: var(--d-squiggle); }

@media (max-width: 991.98px) {
    .mission::before,
    .offer-section::before,
    .offer-section::after,
    .why-section::before,
    .why-section::after,
    .events::before,
    .events::after,
    .about::before,
    .about::after,
    .core-values-section::before,
    .core-values-section::after { display: none; }
}

/* --- Scroll reveal (WOW.js + animate.css, and the .fade-in observer) --- */
.wow,
.animated { animation-duration: .7s !important; }

.js .fade-in {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .6s var(--ease), transform .6s var(--bounce);
}

.js .fade-in.visible {
    opacity: 1;
    transform: none;
}


/* 4. Spinner & back-to-top
   ========================================================================== */
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    opacity: 1;
    visibility: visible;
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    /* Safety net: never trap the page behind the loader if a script fails. */
    animation: spinner-timeout 0s linear 4s forwards;
}

#spinner .spinner-grow { color: var(--navy) !important; }

@keyframes spinner-timeout {
    to { opacity: 0; visibility: hidden; }
}

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 99;
    display: none;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    padding: 0 !important;
    border-radius: 50%;
}

.back-to-top.is-visible { display: inline-flex; }


/* 5. Top bar & navigation
   ========================================================================== */
.topbar {
    background: var(--navy);
    color: var(--white);
    font-size: .92rem;
}

.topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: .45rem;
    padding-bottom: .45rem;
}

.topbar .top-info a { color: var(--white); }
.topbar .top-info a:hover { color: var(--gold-deep); }
.topbar .top-info i { color: var(--gold); }

.topbar .top-link {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.topbar .top-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: var(--white);
    font-size: .8rem;
    transition: background-color .25s var(--ease), color .25s var(--ease), transform .3s var(--bounce);
}

.topbar .top-link a:hover {
    background: var(--gold);
    color: var(--ink);
    transform: translateY(-2px) rotate(-10deg);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--white);
    transition: box-shadow .3s var(--ease);
}

.site-header.is-scrolled { box-shadow: 0 10px 30px -16px rgba(27, 57, 76, .45); }
.site-header .navbar { padding: .7rem 0; }

.navbar-brand {
    padding: 0;
    margin-right: 1.5rem;
}

.navbar-brand img {
    display: block;
    width: 200px;
    height: auto;
}

.navbar .navbar-nav { gap: .2rem; }

.navbar .navbar-nav .nav-link {
    padding: .45rem 1.05rem;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 500;
    color: var(--ink);
    transition: background-color .2s var(--ease), color .2s var(--ease);
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link:focus-visible {
    background: var(--navy-soft);
    color: var(--navy);
}

.navbar .navbar-nav .nav-link.active {
    background: var(--navy);
    color: var(--white);
}

.navbar .dropdown-toggle::after {
    content: "\f107";
    margin-left: .45rem;
    border: 0;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: .8em;
    vertical-align: middle;
    transition: transform .25s var(--ease);
}

.navbar .dropdown-toggle.show::after { transform: rotate(180deg); }

.navbar .dropdown-menu {
    margin-top: .7rem !important;
    padding: .5rem;
    border: 0;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.navbar .dropdown-item {
    padding: .5rem 1rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 500;
    color: var(--ink);
    transition: background-color .2s var(--ease), color .2s var(--ease);
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background: var(--navy-soft);
    color: var(--navy);
}

.navbar .dropdown-item.active,
.navbar .dropdown-item:active {
    background: var(--gold-soft);
    color: var(--ink);
}

.site-header .navbar-toggler {
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    font-size: 1.05rem;
}

.navbar-toggler:focus { box-shadow: 0 0 0 4px var(--gold); }

/* Phone block on the right of the menu. */
.nav-contact {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .3rem 1.2rem .3rem .3rem;
    border-radius: 999px;
    background: var(--gold-soft);
}

.nav-contact-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy);
    font-size: 1rem;
    flex-shrink: 0;
}

.nav-contact-icon:hover { color: var(--navy); }

.nav-contact-icon .fa-comment-dots {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: .85rem;
    color: var(--navy);
}

.nav-contact-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nav-contact-text span {
    font-size: .8rem;
    font-weight: 700;
    color: var(--text);
}

.nav-contact-text a {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
}

.nav-contact-text a:hover { color: var(--gold-deep); }

/* Desktop: open the dropdown on hover as well as on click / keyboard. */
@media (min-width: 1200px) {
    .navbar .nav-item.dropdown .dropdown-menu {
        display: block;
        top: 100%;
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
        transition: opacity .25s var(--ease), transform .3s var(--bounce), visibility 0s linear .25s;
    }

    .navbar .nav-item.dropdown:hover .dropdown-menu,
    .navbar .nav-item.dropdown:focus-within .dropdown-menu,
    .navbar .nav-item.dropdown .dropdown-menu.show {
        opacity: 1;
        visibility: visible;
        transform: none;
        transition-delay: 0s;
    }

    /* Bridges the gap so the menu does not close while the pointer travels. */
    .navbar .nav-item.dropdown::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: .8rem;
    }
}

@media (max-width: 1199.98px) {
    .site-header .navbar-collapse {
        margin-top: .7rem;
        padding: .75rem 0 .9rem;
        border-top: 2px dashed var(--navy-soft);
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }

    .navbar .navbar-nav .nav-link { padding: .6rem 1.05rem; }

    .navbar .dropdown-menu {
        margin: .25rem 0 .5rem 1rem !important;
        border-left: 3px solid var(--gold);
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    .nav-contact {
        margin-top: .9rem;
        width: fit-content;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand img { width: 165px; }
}


/* 6. Home hero
   ========================================================================== */
.hero,
.page-header {
    position: relative;
    overflow: hidden;
    background: var(--cream);
}

/* Cloud-shaped edge where the hero meets the page. */
.hero::after,
.page-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 30px;
    background: var(--white);
    -webkit-mask: var(--scallop) repeat-x center bottom / 80px 30px;
    mask: var(--scallop) repeat-x center bottom / 80px 30px;
}

.hero { padding: clamp(3rem, 6vw, 5rem) 0 clamp(5rem, 9vw, 7.5rem); }
.hero .container { position: relative; }

.hero > .doodle--cloud { top: 9%; left: 3%; }
.hero > .doodle--star { top: 16%; left: 46%; }
.hero > .doodle--plane { top: 8%; right: 4%; }
.hero > .doodle--squiggle { bottom: 20%; left: 40%; }

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.1rem;
    padding: .3rem 1.1rem;
    border-radius: 999px;
    background: var(--gold-soft);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--ink);
}

.hero-kicker::before {
    content: "\f005";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: .85em;
    color: var(--gold);
}

.hero-title {
    margin-bottom: 1.1rem;
    font-size: clamp(2.4rem, 4.6vw, 3.7rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--ink);
}

.hero-title span { display: block; }
.hero-title span:last-child { color: var(--gold); }

.hero-lead {
    margin-bottom: 2rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem 1rem;
}

.photo-blob--hero { max-width: 520px; }
.photo-blob--hero > .doodle--sun { top: -7%; right: -3%; }
.photo-blob--hero > .doodle--heart { bottom: 8%; left: -7%; }
.photo-blob--hero > .doodle--star { top: 6%; left: -5%; }

/* One orchestrated entrance. */
.hero-kicker,
.hero-title,
.hero-lead,
.hero-actions { animation: hero-rise .8s var(--bounce) both; }

.hero-title { animation-delay: .1s; }
.hero-lead { animation-delay: .2s; }
.hero-actions { animation-delay: .3s; }
.photo-blob--hero { animation: hero-pop 1s var(--bounce) .15s both; }

@keyframes hero-rise {
    from { opacity: 0; transform: translateY(26px); }
    to { opacity: 1; }
}

@keyframes hero-pop {
    from { opacity: 0; transform: scale(.82) rotate(-6deg); }
    to { opacity: 1; }
}

@media (max-width: 991.98px) {
    .hero > .doodle--star,
    .hero > .doodle--cloud,
    .hero > .doodle--squiggle { display: none; }
    .photo-blob--hero { max-width: 360px; }
}


/* 7. Inner page header & breadcrumb
   ========================================================================== */
.page-header { padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(4.5rem, 8vw, 6rem) !important; }

/* The page's photo sits in a blob on the right. */
.page-header::before {
    content: "";
    position: absolute;
    top: 50%;
    right: max(4vw, calc((100vw - 1320px) / 2 + 30px));
    width: clamp(180px, 17vw, 230px);
    aspect-ratio: 1 / 1;
    border: 7px solid var(--white);
    border-radius: var(--blob);
    background: url(../img/hero-img.jpg) 72% center / cover no-repeat;
    box-shadow: 12px 12px 0 var(--navy), var(--shadow);
    transform: translateY(-58%) rotate(4deg);
}

.page-header--philosophy::before { background-image: url(../img/hero-img2.jpg); background-position: 60% center; box-shadow: 12px 12px 0 var(--gold), var(--shadow); }
.page-header--life::before { background-image: url(../img/hero-img3.jpg); background-position: 62% center; box-shadow: 12px 12px 0 var(--gold), var(--shadow); }

.page-header .container {
    position: relative;
    z-index: 1;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    text-align: left !important;
}

.page-header h1 {
    max-width: min(18ch, 60%);
    margin-bottom: 1.1rem !important;
    font-weight: 700;
    color: var(--ink) !important;
}

.page-header .page-kicker {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .9rem;
    padding: .25rem 1.1rem;
    border-radius: 999px;
    background: var(--gold-soft);
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 500;
    color: var(--ink);
}

.page-header .page-kicker::before {
    content: "\f005";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: .8em;
    color: var(--gold);
}

.page-header .breadcrumb {
    display: inline-flex;
    justify-content: flex-start !important;
    padding: .3rem 1.1rem;
    border-radius: 999px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    font-weight: 700;
}

.page-header .breadcrumb-item a { color: var(--navy); }
.page-header .breadcrumb-item a:hover { color: var(--gold-deep); }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: var(--text); }
.page-header .breadcrumb-item.text-white { color: var(--gold-deep) !important; }

@media (max-width: 767.98px) {
    .page-header::before {
        top: auto;
        bottom: 18px;
        right: -30px;
        width: 170px;
        transform: rotate(6deg);
    }

    .page-header h1 { max-width: none; }
    .page-header { padding-bottom: 10.5rem !important; }
}


/* 8. Home sections
   ========================================================================== */

/* --- Mission & Vision --- */
.mission .photo-blob > img { object-position: 72% center; }
.mission .mv-text { max-width: 580px; }

.mv-badge {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1.2rem;
    padding: .25rem 1.1rem;
    border-radius: 999px;
    background: var(--navy);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1rem;
    color: var(--white);
}

.mv-badge i { color: var(--gold); }

.mv-statement {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.2vw, 1.65rem);
    font-weight: 500;
    line-height: 1.5;
    color: var(--ink);
}

/* --- Core values: five pastel cards --- */
.growth-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.value-card {
    padding: 2rem 1.1rem 1.75rem;
    border: 2px solid var(--c-soft);
    border-radius: var(--radius);
    background: var(--c-soft);
    text-align: center;
    transition: transform .4s var(--bounce), box-shadow .3s var(--ease), background-color .3s var(--ease);
}

.value-card:nth-child(5n+1) { --c: var(--navy); --c-soft: var(--navy-soft); --c-on: var(--white); }
.value-card:nth-child(5n+2) { --c: var(--gold); --c-soft: var(--gold-soft); --c-on: var(--navy); }
.value-card:nth-child(5n+3) { --c: var(--navy); --c-soft: var(--navy-soft); --c-on: var(--white); }
.value-card:nth-child(5n+4) { --c: var(--gold); --c-soft: var(--gold-soft); --c-on: var(--navy); }
.value-card:nth-child(5n+5) { --c: var(--navy); --c-soft: var(--navy-soft); --c-on: var(--white); }

.value-card:hover {
    background: var(--white);
    box-shadow: var(--shadow);
    transform: translateY(-8px) rotate(-1.5deg);
}

.value-card .value-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    margin: 0 auto 1rem;
    border-radius: 45% 55% 48% 52% / 56% 44% 56% 44%;
    background: var(--c);
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    color: var(--c-on);
    transition: transform .5s var(--bounce);
}

.value-card:hover .value-number { transform: rotate(14deg) scale(1.1); }

.value-card h3,
.value-card h5 {
    margin-bottom: .35rem;
    font-size: 1.4rem;
    color: var(--ink);
}

.value-card p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

/* The cards pop in one after another when the section is reached. */
.js .growth .value-card {
    opacity: 0;
    transform: translateY(24px) scale(.85);
    transition: opacity .4s var(--ease), transform .6s var(--bounce), box-shadow .3s var(--ease), background-color .3s var(--ease);
}

.js .growth.is-grown .value-card { opacity: 1; transform: none; }
.js .growth.is-grown .value-card:hover { transform: translateY(-8px) rotate(-1.5deg); }
.js .growth.is-grown:not(:hover) .value-card:nth-child(2) { transition-delay: .12s; }
.js .growth.is-grown:not(:hover) .value-card:nth-child(3) { transition-delay: .24s; }
.js .growth.is-grown:not(:hover) .value-card:nth-child(4) { transition-delay: .36s; }
.js .growth.is-grown:not(:hover) .value-card:nth-child(5) { transition-delay: .48s; }

@media (max-width: 1199.98px) {
    .growth-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .growth-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
    .value-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* --- Head teacher: the violet band --- */
.headteacher { padding: clamp(4rem, 8vw, 6rem) 0; }

.ht-panel .section-title,
.ht-panel h2 {
    color: var(--white);
    background-image: none;
    padding-bottom: 0;
}

.ht-quote {
    position: relative;
    margin: 0 0 1.6rem;
    padding: 1.3rem 1.6rem;
    border-radius: var(--radius);
    background: var(--white);
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.1vw, 1.5rem);
    font-weight: 500;
    line-height: 1.35;
    color: var(--ink);
}

/* Tail of the speech bubble. */
.ht-quote::after {
    content: "";
    position: absolute;
    left: 40px;
    bottom: -12px;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    background: var(--white);
    transform: rotate(45deg);
}

.ht-panel p {
    max-width: 60ch;
    color: rgba(255, 255, 255, .92);
}

.ht-panel .photo-blob { max-width: 380px; }

/* --- Video poster with play button (home, About, Philosophy) --- */
.video {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 0;
    background: linear-gradient(rgba(27, 57, 76, .1), rgba(27, 57, 76, .3)), url(../img/about.jpg) center / cover no-repeat;
}

.photo-blob > .video { border: 8px solid var(--white) !important; }

.video .btn-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    padding: 0;
    border: 6px solid var(--white);
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 10px 24px -8px rgba(27, 57, 76, .6);
    transform: translate(-50%, -50%);
    animation: play-bob 1.8s ease-in-out infinite;
    transition: background-color .2s var(--ease);
}

.video .btn-play span {
    display: block;
    width: 0;
    height: 0;
    margin-left: 6px;
    border-left: 22px solid var(--navy);
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
}

.video .btn-play:hover {
    background: var(--navy);
    animation-play-state: paused;
}

.video .btn-play:hover span { border-left-color: var(--white); }

@keyframes play-bob {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -54%) scale(1.08); }
}

/* --- What we offer --- */
.offer-item {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    height: 100%;
    padding: 1.7rem 1.5rem;
    border: 2px solid var(--c-soft);
    border-radius: var(--radius);
    background: var(--c-soft);
    transition: transform .4s var(--bounce), box-shadow .3s var(--ease), background-color .3s var(--ease);
}

[class*="col-"]:nth-child(6n+1) > .offer-item { --c: var(--navy); --c-soft: var(--navy-soft); --c-on: var(--white); }
[class*="col-"]:nth-child(6n+2) > .offer-item { --c: var(--gold); --c-soft: var(--gold-soft); --c-on: var(--navy); }
[class*="col-"]:nth-child(6n+3) > .offer-item { --c: var(--navy); --c-soft: var(--navy-soft); --c-on: var(--white); }
[class*="col-"]:nth-child(6n+4) > .offer-item { --c: var(--gold); --c-soft: var(--gold-soft); --c-on: var(--navy); }
[class*="col-"]:nth-child(6n+5) > .offer-item { --c: var(--navy); --c-soft: var(--navy-soft); --c-on: var(--white); }
[class*="col-"]:nth-child(6n+6) > .offer-item { --c: var(--gold); --c-soft: var(--gold-soft); --c-on: var(--navy); }

.offer-item:hover {
    background: var(--white);
    box-shadow: var(--shadow);
    transform: translateY(-6px);
}

.offer-item .offer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--c);
    color: var(--c-on);
    font-size: 1.25rem;
    transition: transform .5s var(--bounce);
}

.offer-item:hover .offer-icon { transform: rotate(-14deg) scale(1.12); }

.offer-item h3,
.offer-item h6 {
    margin-bottom: .3rem;
    font-size: 1.25rem;
    line-height: 1.2;
    color: var(--ink);
}

.offer-item p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
}

/* --- Why choose --- */
.why-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.why-card {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 1rem;
    align-items: center;
    padding: 1.7rem 1.5rem;
    border-radius: var(--radius);
    background: var(--c-soft);
    transition: transform .4s var(--bounce), box-shadow .3s var(--ease), background-color .3s var(--ease);
}

.why-card > div:last-child { display: contents; }

.why-card:nth-child(6n+1) { --c: var(--navy); --c-soft: var(--navy-soft); --c-on: var(--white); }
.why-card:nth-child(6n+2) { --c: var(--gold); --c-soft: var(--gold-soft); --c-on: var(--navy); }
.why-card:nth-child(6n+3) { --c: var(--navy); --c-soft: var(--navy-soft); --c-on: var(--white); }
.why-card:nth-child(6n+4) { --c: var(--gold); --c-soft: var(--gold-soft); --c-on: var(--navy); }
.why-card:nth-child(6n+5) { --c: var(--navy); --c-soft: var(--navy-soft); --c-on: var(--white); }
.why-card:nth-child(6n+6) { --c: var(--gold); --c-soft: var(--gold-soft); --c-on: var(--navy); }

.section--cream .why-card { background: var(--white); border: 2px solid var(--c-soft); }

.why-card:hover {
    background: var(--white);
    box-shadow: var(--shadow);
    transform: translateY(-6px);
}

.why-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--c);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
    color: var(--c-on);
    transition: transform .5s var(--bounce);
}

.why-card:hover .why-num { transform: rotate(-12deg) scale(1.12); }

.why-card h3,
.why-card h4 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--ink);
}

.why-card p {
    grid-column: 1 / -1;
    margin: .9rem 0 0;
    font-size: 1rem;
}

@media (max-width: 991.98px) {
    .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .why-grid { grid-template-columns: 1fr; }
}

/* --- Events --- */
.event-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 12px 12px 0;
    border-radius: var(--radius);
    background: var(--c-soft);
    transition: transform .4s var(--bounce), box-shadow .3s var(--ease);
}

[class*="col-"]:nth-child(4n+1) > .event-card { --c: var(--navy); --c-soft: var(--navy-soft); --c-on: var(--white); }
[class*="col-"]:nth-child(4n+2) > .event-card { --c: var(--gold); --c-soft: var(--gold-soft); --c-on: var(--navy); }
[class*="col-"]:nth-child(4n+3) > .event-card { --c: var(--navy); --c-soft: var(--navy-soft); --c-on: var(--white); }
[class*="col-"]:nth-child(4n+4) > .event-card { --c: var(--gold); --c-soft: var(--gold-soft); --c-on: var(--navy); }

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

.event-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 16px;
    background: var(--white);
}

.event-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease);
}

.event-card:hover .event-media img { transform: scale(1.06); }

/* Shown when a cover photo has not been uploaded yet. */
.event-media.is-missing img { display: none; }

.event-media.is-missing::after {
    content: "\f030";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 3rem;
    color: var(--c);
    opacity: .45;
}

.event-date,
.events-rate {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: .15rem 1rem;
    border-radius: 999px;
    background: var(--c);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: .95rem;
    color: var(--c-on);
}

.event-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(27, 57, 76, .45);
    opacity: 0;
    transition: opacity .3s var(--ease);
}

.event-card:hover .event-overlay,
.event-overlay:focus-within { opacity: 1; }

.event-media.is-missing .event-overlay { display: none; }

.event-overlay a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--white);
    font-size: 2rem;
}

.event-overlay a + a { display: none; }

.event-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1.2rem .7rem 1.5rem;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem 1.1rem;
    margin: 0 0 .6rem;
    padding: 0;
    list-style: none;
    font-size: .95rem;
    font-weight: 700;
    color: var(--ink);
}

.event-meta i { color: var(--c); }

.event-title {
    margin-bottom: .4rem;
    font-size: 1.45rem;
}

.event-title a { color: inherit; }
.event-title a:hover { color: var(--gold-deep); }

.event-body p {
    margin: 0;
    font-size: 1rem;
}


/* 9. About / Philosophy
   ========================================================================== */
.about .about-lead { margin-bottom: 1.4rem; }

.about .about-text p:not(.eyebrow) {
    max-width: 64ch;
    color: var(--text) !important;
}

/* Cards used on Philosophy and the Services template page. */
.service .service-item {
    position: relative;
    width: 100%;
    height: 100%;
    border: 2px solid var(--c-soft) !important;
    border-radius: var(--radius);
    background: var(--white);
    transition: transform .4s var(--bounce), box-shadow .3s var(--ease);
}

[class*="col-"]:nth-child(4n+1) > .service-item { --c: var(--navy); --c-soft: var(--navy-soft); --c-on: var(--white); }
[class*="col-"]:nth-child(4n+2) > .service-item { --c: var(--gold); --c-soft: var(--gold-soft); --c-on: var(--navy); }
[class*="col-"]:nth-child(4n+3) > .service-item { --c: var(--navy); --c-soft: var(--navy-soft); --c-on: var(--white); }
[class*="col-"]:nth-child(4n+4) > .service-item { --c: var(--gold); --c-soft: var(--gold-soft); --c-on: var(--navy); }

.service .service-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-8px);
}

.service-item .service-content {
    height: 100%;
    padding: 2.2rem 1.4rem !important;
    align-items: flex-start !important;
}

.service-item .service-icon,
.service-item .service-content-inner > .p-4:first-child {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    margin: 0 auto 1.3rem;
    padding: 0 !important;
    border-radius: 45% 55% 48% 52% / 56% 44% 56% 44%;
    background: var(--c-soft);
    transition: transform .5s var(--bounce);
}

.service-item:hover .service-icon,
.service-item:hover .service-content-inner > .p-4:first-child { transform: rotate(-12deg) scale(1.1); }

.service-item .service-icon i,
.service-item .service-content-inner > .p-4:first-child i {
    font-size: 2.3rem;
    color: var(--c) !important;
}

.service-item h3,
.service-item a.h4,
.service-item a.h5 {
    display: block;
    margin-bottom: .6rem;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--ink);
}

.service-item p {
    margin: 0 0 .5rem !important;
    font-size: 1rem;
    line-height: 1.6;
}


/* 10. Contact
   ========================================================================== */
.contact-panel {
    padding: clamp(1.5rem, 4vw, 3.75rem);
    border-radius: var(--radius-lg);
    background: var(--cream);
}

.contact-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    height: 100%;
    padding: 1.5rem;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform .4s var(--bounce), box-shadow .3s var(--ease);
}

[class*="col-"]:nth-child(3n+1) > .contact-card { --c: var(--navy); --c-soft: var(--navy-soft); --c-on: var(--white); }
[class*="col-"]:nth-child(3n+2) > .contact-card { --c: var(--gold); --c-soft: var(--gold-soft); --c-on: var(--navy); }
[class*="col-"]:nth-child(3n+3) > .contact-card { --c: var(--navy); --c-soft: var(--navy-soft); --c-on: var(--white); }

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

.contact-card .contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--c);
    color: var(--c-on);
    font-size: 1.2rem;
}

.contact-card h2,
.contact-card h3,
.contact-card h4 {
    margin-bottom: .15rem;
    font-size: 1.35rem;
}

.contact-card p {
    margin: 0;
    overflow-wrap: anywhere;
}

.contact-card a { color: var(--text); }
.contact-card a:hover { color: var(--gold-deep); }

.form-control {
    padding: .85rem 1.2rem;
    border: 2px solid #dde3ea !important;
    border-radius: 18px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
    background: var(--white);
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.form-control::placeholder { color: #8792a0; }

.form-control:focus {
    border-color: var(--navy) !important;
    box-shadow: 0 0 0 4px rgba(27, 57, 76, .16);
}

.contact-form .form-control { margin-bottom: 1.1rem; }
.contact-form textarea.form-control { min-height: 200px; resize: vertical; }

.contact-form .form-note {
    min-height: 1.5rem;
    margin: 1rem 0 0;
    font-weight: 700;
    color: var(--navy);
}

.contact-map {
    height: 100%;
    min-height: 340px;
    overflow: hidden;
    border: 8px solid var(--white);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.contact-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 340px;
    border: 0;
}


/* 11. Photo galleries
   ========================================================================== */
.life-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .7rem;
    margin: 0 0 2.75rem;
    padding: 0;
    list-style: none;
}

.life-tabs a {
    display: inline-block;
    padding: .4rem 1.4rem;
    border-radius: 999px;
    background: var(--navy-soft);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--navy);
    transition: background-color .25s var(--ease), color .25s var(--ease), transform .3s var(--bounce);
}

.life-tabs li:nth-child(2) a { background: var(--gold-soft); color: var(--navy); }
.life-tabs li:nth-child(3) a { background: var(--navy-soft); color: var(--navy); }

.life-tabs a:hover { transform: translateY(-3px); }

.life-tabs li:nth-child(n) a[aria-current="page"] {
    background: var(--navy);
    color: var(--white);
}

/* main.js adds one .gallery-col per photo; CSS columns stack them like a wall. */
#gallery-grid {
    display: block;
    margin: 0;
    column-count: 4;
    column-gap: 1.2rem;
}

#gallery-grid > .gallery-col {
    width: 100%;
    max-width: none;
    margin: 0 0 1.2rem;
    padding: 0;
    break-inside: avoid;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: var(--navy-soft);
    transition: box-shadow .3s var(--ease), transform .4s var(--bounce);
}

.gallery-col:nth-child(even) .gallery-item { background: var(--gold-soft); }

.gallery-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-6px) rotate(-1deg);
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 120px;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(27, 57, 76, .45);
    color: var(--white);
    opacity: 0;
    transition: opacity .3s var(--ease);
}

.gallery-item:hover .gallery-overlay,
.gallery-overlay:focus-visible {
    opacity: 1;
    color: var(--white);
}

@media (max-width: 991.98px) {
    #gallery-grid { column-count: 3; }
}

@media (max-width: 575.98px) {
    #gallery-grid { column-count: 2; column-gap: .8rem; }
    #gallery-grid > .gallery-col { margin-bottom: .8rem; }
}

#gallery-empty {
    display: none;
    margin: 0 auto;
    padding: 2.25rem 1.5rem;
    max-width: 520px;
    border: 3px dashed #c3ccd7;
    border-radius: var(--radius);
    background: var(--navy-soft);
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--navy);
}

#gallery-empty.is-visible { display: block; }

#gallery-empty::before {
    content: "\f030";
    display: block;
    margin-bottom: .3rem;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 2.2rem;
    color: var(--gold);
}


/* 12. Template sections
   ========================================================================== */
.program { background: var(--cream); }

.program .program-item,
.blog .blog-item,
.team .team-item,
.testimonial .testimonial-item {
    height: 100%;
    overflow: hidden;
    border: 0 !important;
    border-radius: var(--radius) !important;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform .4s var(--bounce), box-shadow .3s var(--ease);
}

.program .program-item:hover,
.blog .blog-item:hover,
.team .team-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-8px);
}

/* --- Programs --- */
.program .program-item .program-img .img-border-radius { border-radius: 0; }

.program .program-item .program-img img,
.blog .blog-item .blog-img img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.program .program-item .program-img .program-rate {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: .2rem 1rem !important;
    border-radius: 999px;
    background: var(--gold) !important;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ink) !important;
}

.program .program-item .program-text { padding-top: 1.5rem; }
.program .program-item .program-text a.h4 { color: var(--ink); }
.program .program-item:hover .program-text a.h4 { color: var(--navy); }
.program .program-item .program-teacher h6 { color: var(--navy) !important; }

.program .program-item > .bg-primary {
    background: var(--navy) !important;
    border-radius: 0 !important;
}

/* --- Blog --- */
.blog .blog-item { background: var(--cream); }
.blog .blog-item .blog-img { border-radius: 0; }
.blog .blog-item .bg-light { background-color: transparent !important; }
.blog .blog-item .blog-text-inner a.h4 { color: var(--ink); }
.blog .blog-item:hover .blog-text-inner a.h4 { color: var(--navy); }
.blog .blog-item h6.text-primary { color: var(--navy) !important; }

/* --- Team --- */
.team .team-item { position: relative; }

.team .team-item > img {
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background: var(--navy-soft);
}

.team .team-item .team-icon {
    position: absolute;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%);
}

.team .team-item .team-icon a.share-link {
    opacity: 0;
    transition: opacity .3s var(--ease);
}

.team .team-item:hover .team-icon a.share-link,
.team .team-item .team-icon:focus-within a.share-link { opacity: 1; }

.team .team-item .team-content { transition: background-color .3s var(--ease); }
.team .team-item .team-content h4 { color: var(--navy) !important; transition: color .3s var(--ease); }
.team .team-item:hover .team-content { background: var(--navy); }
.team .team-item:hover .team-content h4 { color: var(--gold) !important; }
.team .team-item:hover .team-content p { color: rgba(255, 255, 255, .85) !important; }

/* --- Testimonials --- */
.testimonial .testimonial-item {
    background: var(--navy-soft);
    box-shadow: none;
}

.testimonial .testimonial-item .fa-quote-right { color: var(--gold) !important; }
.testimonial .testimonial-item .fa-star { color: var(--gold) !important; }

.testimonial .testimonial-carousel .owl-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-top: 2rem;
}

.testimonial .testimonial-carousel .owl-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #c3ccd7 !important;
    transition: width .3s var(--bounce), background-color .3s var(--ease);
}

.testimonial .testimonial-carousel .owl-dot.active {
    width: 32px;
    background: var(--gold) !important;
}

/* --- 404 --- */
.error-page .bi-exclamation-triangle { color: var(--gold) !important; }

.error-page .display-1 {
    font-size: clamp(5.5rem, 17vw, 10rem);
    font-weight: 700;
    line-height: 1;
    color: var(--navy);
}


/* 13. Call-to-action band, footer, copyright
   ========================================================================== */
.cta-band {
    --band: var(--navy);
    position: relative;
    margin-top: calc(clamp(2rem, 5vw, 4rem) + 19px);
    padding: clamp(2.25rem, 5vw, 3.25rem) 0;
    background: var(--band);
}

.cta-band::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -19px;
    height: 20px;
    background: var(--band);
    -webkit-mask: var(--wave) repeat-x center / 120px 20px;
    mask: var(--wave) repeat-x center / 120px 20px;
}

.cta-band .cta-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 2rem;
}

.cta-band .cta-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    font-weight: 600;
    line-height: 1.1;
    color: var(--white);
}

.cta-band .cta-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
}

.cta-band .cta-phone {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
}

.cta-band .cta-phone i { color: var(--gold); }
.cta-band .cta-phone:hover { color: var(--gold); }

.cta-band .btn.btn-primary {
    background: var(--gold) !important;
    color: var(--ink) !important;
    box-shadow: none;
}

.cta-band .btn.btn-primary:hover {
    background: var(--white) !important;
    color: var(--ink) !important;
}

.footer {
    padding: clamp(3.5rem, 7vw, 5rem) 0 clamp(3rem, 6vw, 4rem) !important;
    font-size: 1rem;
    color: rgba(255, 255, 255, .82);
    background: var(--navy-deep);
}

.footer .container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 1.2rem;
    padding: .7rem 1.1rem;
    border-radius: 18px;
    background: var(--white);
}

.footer-logo img {
    display: block;
    width: 210px;
    max-width: 100%;
}

.footer-tagline {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1.25;
    color: var(--gold);
}

.footer-heading,
.footer h4.title-border-radius {
    display: block !important;
    margin-bottom: 1.2rem !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0;
    background: none;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: .03em;
    color: var(--white) !important;
}

.footer-newsletter {
    padding: 1.2rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .1);
}

.footer-newsletter h5 {
    margin-bottom: .8rem;
    font-size: 1.15rem;
    color: var(--white);
}

.footer-newsletter .newsletter-field {
    display: flex;
    gap: .4rem;
    padding: .3rem;
    border-radius: 999px;
    background: var(--white);
}

.footer-newsletter .form-control {
    min-width: 0;
    padding: .4rem .9rem;
    border: 0 !important;
    border-radius: 999px;
    box-shadow: none;
}

.footer-newsletter .btn.btn-primary {
    padding: .35rem 1.1rem !important;
    background: var(--gold) !important;
    color: var(--ink) !important;
    box-shadow: none;
    white-space: nowrap;
}

.footer-hours {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-hours li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .45rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, .22);
}

.footer-hours li:last-child { border-bottom: 0; }
.footer-hours li span:last-child { color: var(--gold); }

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: .9rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
}

.footer-contact i {
    margin-top: .4rem;
    width: 1rem;
    text-align: center;
    color: var(--gold);
    flex-shrink: 0;
}

.footer-contact a,
.footer-contact span {
    color: rgba(255, 255, 255, .88);
    overflow-wrap: anywhere;
}

.footer-contact a:hover { color: var(--gold-deep); }

.footer-icon {
    display: flex;
    gap: .6rem;
}

.footer-icon a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy);
    transition: transform .35s var(--bounce), background-color .25s var(--ease);
}

.footer-icon a:hover {
    background: var(--white);
    color: var(--navy);
    transform: translateY(-4px) rotate(-10deg) scale(1.1);
}

.footer-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .6rem;
}

.footer-galary-img {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 3px solid var(--white) !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, .1);
    transition: transform .35s var(--bounce);
}

.footer-galary-img:hover { transform: scale(1.08) rotate(-3deg); }

.footer-galary-img img {
    width: 100%;
    height: 100%;
    padding: 0 !important;
    border: 0;
    border-radius: 0 !important;
    object-fit: cover;
}

.footer-galary-img.is-missing img { display: none; }

.copyright {
    padding: 1.1rem 0 !important;
    background: #0c1f2c !important;
    font-size: .95rem;
    color: rgba(255, 255, 255, .75);
}

.copyright a { color: var(--white); }
.copyright a:hover { color: var(--gold-deep); }
.copyright .fa-copyright { color: var(--gold) !important; }


/* 14. Modals
   ========================================================================== */
#searchModal .modal-content { background: rgba(255, 255, 255, .95); }

#videoModal { z-index: 99999; }

#videoModal .modal-dialog {
    max-width: 860px;
    margin: 60px auto 0;
    padding: 0 14px;
}

#videoModal .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: var(--radius) !important;
}

#videoModal .modal-body { padding: 0; }


/* 14b. Arabic pattern backgrounds
   ========================================================================== */
/* White areas: faint navy lines. */
body {
    background-image: var(--pattern-navy);
    background-size: 120px 120px;
}

/* Cream areas: gold lines. */
.hero,
.page-header,
.section--cream,
.contact-panel,
.program {
    background-image: var(--pattern-gold);
    background-size: 120px 120px;
}

/* Navy areas: gold lines on the dark colour. */
.band,
.cta-band,
.footer {
    background-image: var(--pattern-on-navy);
    background-size: 120px 120px;
}


/* 15. Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        transition-delay: 0s !important;
    }

    .js .fade-in,
    .js .growth .value-card {
        opacity: 1;
        transform: none;
    }
}
