/* Rosary School — Bootstrap 5 companion styles */

:root {
    --school-navy: #00264d;
    --school-blue: #004080;
    --school-gold: #ffcc00;
    --school-gold-deep: #e6a800;
    --header-glass: rgba(0, 38, 77, 0.72);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "DM Sans", system-ui, sans-serif;
    color: #1a1a2e;
}

h1,
h2,
h3,
.display-font {
    font-family: "Fraunces", Georgia, serif;
}

/* ----- Fixed hero carousel (full viewport) ----- */
.hero-carousel-fixed {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
}

.hero-carousel-fixed .carousel,
.hero-carousel-fixed .carousel-inner,
.hero-carousel-fixed .carousel-item {
    height: 100%;
}

.hero-carousel-fixed .carousel-zoom-clip {
    height: 100%;
    overflow: hidden;
}

.hero-carousel-fixed .carousel-zoom-clip > .carousel-bg {
    transform-origin: center center;
    will-change: transform;
    animation: slider-kenburns 16s ease-in-out infinite alternate;
}

@keyframes slider-kenburns {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-carousel-fixed .carousel-zoom-clip > .carousel-bg {
        animation: none;
    }
}

.carousel-bg {
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Patron portrait — keeps face in frame on wide hero slides */
.hero-carousel-fixed .carousel-bg--patron {
    background-position: center 18%;
}

@media (max-width: 768px) {
    .hero-carousel-fixed .carousel-bg--patron {
        background-position: center 12%;
    }
}

.carousel-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 38, 77, 0.45) 0%,
        rgba(0, 20, 40, 0.55) 45%,
        rgba(0, 15, 30, 0.75) 100%
    );
}

.hero-carousel-fixed .carousel-control-prev,
.hero-carousel-fixed .carousel-control-next {
    z-index: 2;
    width: 12%;
    opacity: 0.85;
}

.hero-carousel-fixed .carousel-indicators {
    z-index: 2;
    margin-bottom: 1.25rem;
}

.hero-carousel-fixed .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: transparent;
}

.hero-carousel-fixed .carousel-indicators .active {
    background: var(--school-gold);
    border-color: var(--school-gold);
}

/* ----- Fixed site header (topbar + nav) ----- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    transition: box-shadow 0.35s ease, background 0.35s ease;
}

.site-header.is-scrolled .navbar-over-hero {
    background: rgba(255, 255, 255, 0.97) !important;
    box-shadow: 0 4px 24px rgba(0, 38, 77, 0.12);
}

.site-header.is-scrolled .navbar-over-hero .nav-link {
    color: var(--school-navy) !important;
}

.site-header.is-scrolled .navbar-over-hero .nav-link:hover,
.site-header.is-scrolled .navbar-over-hero .nav-link:focus {
    color: var(--school-blue) !important;
}

.site-header.is-scrolled .navbar-over-hero .navbar-brand strong,
.site-header.is-scrolled .navbar-over-hero .navbar-brand small {
    color: var(--school-navy) !important;
}

.site-header.is-scrolled .navbar-over-hero .navbar-toggler {
    border-color: rgba(0, 38, 77, 0.35);
}

.site-header.is-scrolled .navbar-over-hero .navbar-toggler-icon {
    filter: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 38, 77, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Topbar */
.topbar {
    background: rgba(0, 38, 77, 0.92);
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.8125rem;
    padding: 0.45rem 0;
    backdrop-filter: blur(8px);
}

.topbar a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.topbar a:hover {
    color: var(--school-gold);
}

.topbar i {
    margin-right: 0.65rem;
    cursor: pointer;
    transition: color 0.2s;
}

.topbar i:hover {
    color: var(--school-gold);
}

.topbar-contact span {
    display: inline-block;
}

/* Navbar over hero */
.navbar-over-hero {
    background: transparent !important;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    transition: background 0.35s ease, box-shadow 0.35s ease;
}

.navbar-over-hero .navbar-brand strong {
    color: #fff;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.navbar-over-hero .navbar-brand small {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.7rem;
    line-height: 1.2;
}

.navbar-over-hero .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.5rem 0.85rem !important;
    transition: color 0.25s, transform 0.2s;
}

.navbar-over-hero .nav-link:hover {
    color: var(--school-gold) !important;
}

.navbar-over-hero .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar-over-hero .navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

/* Mobile: expanded menu readable */
@media (max-width: 991.98px) {
    .navbar-over-hero .navbar-collapse {
        margin-top: 0.75rem;
        padding: 1rem;
        border-radius: 0.75rem;
        background: var(--header-glass);
        backdrop-filter: blur(12px);
    }

    .site-header.is-scrolled .navbar-over-hero .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 8px 32px rgba(0, 38, 77, 0.1);
    }

    .navbar-over-hero .nav-link {
        padding: 0.6rem 0 !important;
    }

    .navbar-over-hero .nav-item .btn {
        width: 100%;
        text-align: center;
        margin-top: 0.35rem;
    }
}

/* Buttons */
.btn-student {
    background: linear-gradient(135deg, var(--school-gold), #ffb020);
    color: #1a1a1a;
    font-weight: 700;
    border-radius: 2rem;
    padding: 0.45rem 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-student:hover {
    background: linear-gradient(135deg, var(--school-gold-deep), #f59e0b);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 176, 32, 0.45);
}

.btn-staff {
    background: linear-gradient(135deg, var(--school-blue), #1a6bc4);
    color: #fff;
    font-weight: 700;
    border-radius: 2rem;
    padding: 0.45rem 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-staff:hover {
    background: linear-gradient(135deg, var(--school-navy), var(--school-blue));
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 64, 128, 0.4);
}

.navbar .btn {
    margin-top: 0;
}

/* Hero foreground (first screen over fixed slider) */
.hero-front {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 1rem 4rem;
    pointer-events: none;
}

/* Patron portrait — over slider, bottom-right (clear of centered headline) */
.patron-hero-float {
    position: absolute;
    bottom: clamp(4rem, 10vh, 7rem);
    right: clamp(0.5rem, 3vw, 2rem);
    z-index: 2;
    width: clamp(108px, 20vw, 210px);
    margin: 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
    border: 4px solid rgba(255, 255, 255, 0.92);
    pointer-events: none;
    transform: rotate(2deg);
}

.patron-hero-float img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center 18%;
    display: block;
}

.patron-hero-float__label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 0.4rem 0.35rem 0.35rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    color: #fff;
    background: linear-gradient(transparent, rgba(0, 38, 77, 0.88));
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

@media (max-width: 575.98px) {
    .patron-hero-float {
        bottom: 5.5rem;
        right: 0.35rem;
        width: clamp(92px, 26vw, 130px);
        border-width: 3px;
        transform: rotate(0deg);
    }

    .patron-hero-float__label {
        font-size: 0.58rem;
        padding-top: 0.3rem;
    }
}

.hero-front .container {
    pointer-events: auto;
}

.hero-front h1 {
    font-size: clamp(1.85rem, 5vw, 3rem);
    font-weight: 700;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.hero-front .lead {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero-cta .btn {
    font-weight: 700;
    padding: 0.65rem 1.75rem;
    border-radius: 2rem;
}

/* Main content scrolls over carousel */
.main-surface {
    position: relative;
    z-index: 2;
    background: #fff;
    box-shadow: 0 -12px 40px rgba(0, 38, 77, 0.08);
}

.section-title {
    font-weight: 700;
    color: var(--school-navy);
}

.section-sub {
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
    color: #5c5c6f;
}

/* Facilities */
.facility-card {
    border: none;
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 38, 77, 0.06);
}

.facility-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0, 38, 77, 0.12);
}

.facility-card i {
    color: var(--school-blue);
}

/* Footer */
.footer {
    background: linear-gradient(180deg, var(--school-navy) 0%, #001a33 100%);
    padding: 1.25rem 0;
    font-size: 0.9rem;
}

/* Topbar mobile */
@media (max-width: 575.98px) {
    .topbar .container {
        flex-direction: column;
        gap: 0.35rem;
        text-align: center;
    }

    .topbar-contact span {
        display: block;
        margin: 0 !important;
    }

    .topbar-contact .ms-3 {
        margin-left: 0 !important;
    }
}
