/*
 * Public site styles. Bootstrap 5 (CDN) + Admin > Theme's CSS variables
 * (see resources/views/components/theme-variables.blade.php) provide the
 * foundation; this file holds typography rhythm, template-specific
 * styling hooks, and small polish that doesn't belong in either of those.
 * No build step — plain CSS, edited directly.
 */

/* --- Global Responsive Fix --- */
html {
    overflow-x: hidden;
}

/* --- Typography rhythm --- */
h1, .h1 { font-weight: 700; letter-spacing: -0.02em; }
h2, .h2 { font-weight: 700; letter-spacing: -0.01em; }
h3, .h3 { font-weight: 600; }

.cms-block :is(h1, h2, h3) { margin-bottom: 0.75rem; }
.cms-block p { line-height: 1.7; }

/* --- Section rhythm: alternate very-light backgrounds when a block has no
   explicit background configured, so a long page of "none" blocks doesn't
   read as one undifferentiated wall of text --- */
.cms-block:nth-of-type(even):not([style*="background-color"]):not([style*="background-image"]) {
    background-color: #f8f9fa;
}

/* --- Landing template: tighten the gap between header and first block --- */
.tpl-landing .cms-block:first-of-type {
    padding-top: 2rem;
}

/* --- Full-width template: widen the inner container for image-heavy pages --- */
.tpl-full-width .cms-block > .container {
    max-width: 1600px;
}

/* --- Forms (enquiry-form block) --- */
.cms-block form .form-label {
    font-weight: 500;
}

/* --- Navbar --- */
.navbar-brand img {
    max-height: 40px;
    width: auto;
}

/* --- Footer link hover --- */
.site-footer a:hover {
    color: #fff !important;
}

/* --- Focus visibility (accessibility) --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--cms-primary, #0d6efd);
    outline-offset: 2px;
}

/* =========================================================================
   Design theme extensions (green/gold "school" look-and-feel)
   ---------------------------------------------------------------------
   Everything below is additive polish on top of theme-variables.blade.php
   (which supplies --cms-primary/--cms-secondary/--cms-accent from
   Admin > Theme). Colors here that aren't admin-editable (the gold accent,
   the dark hero overlay tint) are deliberate fixed design choices, not
   oversights — see docs/CMS-ARCHITECTURE.md §5 for which theme tokens are
   and aren't exposed to admins.
   ========================================================================= */

:root {
    --cms-gold: #ffc905;
    --cms-ink-muted: #667069;
    --cms-hairline: #e1e8e3;
}

/* --- Typography: Lora for headings, Inter (via --cms-font-family) for body --- */
h1, .h1, h2, .h2, h3, .h3,
.hero-heading, .section-heading, .campus-card h3, .testimonial-quote {
    font-family: 'Lora', Georgia, serif;
}

.eyebrow-text {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: .78rem;
    font-weight: 700;
    color: var(--cms-primary);
}

/* --- Header / navbar --- */
.site-header .navbar-brand {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    color: var(--cms-primary);
}

.site-header .nav-link:hover {
    color: var(--cms-primary);
}

.school-intro-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(248, 250, 247, 0.9);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .42s ease, visibility .42s ease;
    pointer-events: none;
}

body.page-intro-visible .school-intro-overlay {
    opacity: 1;
    visibility: visible;
}

body.page-intro-hidden .school-intro-overlay {
    opacity: 0;
    visibility: hidden;
}

.school-intro-logo-wrap {
    display: grid;
    place-items: center;
    width: min(40vw, 220px);
    max-width: 220px;
    transform: translateY(14px) scale(0.9);
    opacity: 0;
    transition: transform .65s cubic-bezier(.2, .8, .2, 1), opacity .4s ease;
}

body.page-intro-visible .school-intro-logo-wrap {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: school-intro-pop .8s cubic-bezier(.2, .8, .2, 1);
}

.school-intro-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.school-intro-fallback {
    width: 72%;
    height: 72%;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--cms-primary), color-mix(in srgb, var(--cms-primary) 72%, white));
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    letter-spacing: .08em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}

@keyframes school-intro-pop {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.88);
        filter: none;
    }
    60% {
        opacity: 1;
        transform: translateY(-4px) scale(1.04);
        filter: none;
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: none;
    }
}

/* --- Top utility bar (address / phone / email / social) --- */
.site-topbar {
    background: linear-gradient(180deg, color-mix(in srgb, var(--cms-primary) 92%, black), var(--cms-primary));
    color: rgba(255, 255, 255, .92);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.site-topbar .container {
    min-height: 2.5rem;
}

.site-topbar a {
    color: rgba(255, 255, 255, .92) !important;
    text-decoration: none;
    transition: opacity .2s ease;
}

.site-topbar a:hover {
    color: #fff !important;
    opacity: 1;
}

.site-topbar i {
    font-size: .9rem;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--footer-bg-color, var(--cms-primary)) !important;
    background-repeat: no-repeat;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, .18);
    color: var(--footer-text-color, #fff);
}

.site-footer a {
    color: var(--footer-link-color, rgba(255, 255, 255, .78)) !important;
    transition: opacity .2s ease, color .2s ease;
}

.site-footer a:hover {
    color: #fff !important;
    opacity: 1;
}

/* --- Footer background image (Admin > Settings > Footer > Footer
   Background Image): a dark scrim so the footer's white text/links stay
   readable over a photo, on by default whenever an image is set (see
   components/layout/footer.blade.php), toggled off per-admin via the
   "Darken Background Image" checkbox. --- */
.site-footer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 14, .72);
    pointer-events: none;
}

.footer-inner {
    position: relative;
    z-index: 1;
    padding-top: 2.2rem;
    padding-bottom: 1.4rem;
}

.footer-top-row {
    display: grid;
    grid-template-columns: 1.2fr 1.5fr 0.85fr;
    gap: 2rem;
    align-items: start;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
}

.footer-brand-block {
    color: var(--footer-text-color, rgba(255, 255, 255, .96));
    padding-right: 1rem;
}

.footer-brand-head {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: 1rem;
}

.footer-brand-mark {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .3);
    color: #f8d565;
    font-size: 1rem;
    flex-shrink: 0;
}

.footer-brand-logo {
    width: 2.4rem;
    height: 2.4rem;
    object-fit: contain;
    border-radius: .75rem;
    background: transparent;
    border: none;
    padding: 0;
    flex-shrink: 0;
}

.footer-brand-name {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.footer-brand-subtitle {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: color-mix(in srgb, var(--footer-text-color, #fff) 72%, transparent);
}

.footer-about {
    color: color-mix(in srgb, var(--footer-text-color, #fff) 76%, transparent);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: .96rem;
}

.footer-contact-list {
    display: grid;
    gap: .5rem;
    color: color-mix(in srgb, var(--footer-text-color, #fff) 80%, transparent);
    font-size: .9rem;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    line-height: 1.5;
}

.footer-contact-item i {
    color: var(--footer-accent-color, #f8d565);
    margin-top: .15rem;
}

.footer-socials {
    display: flex;
    gap: .75rem;
    margin-top: 1rem;
}

.footer-socials a {
    width: 2.15rem;
    height: 2.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .17);
    color: #fff !important;
    line-height: 1;
    padding: 0;
}

.footer-socials a i,
.social-icons-bar-link i,
.cms-whatsapp-button i {
    line-height: 1;
    display: block;
    vertical-align: middle;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    padding-top: .25rem;
}

.footer-links-group h4 {
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--footer-text-color, rgba(255, 255, 255, .9));
    margin: 0 0 1rem;
    font-weight: 700;
}

.footer-links-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .65rem;
}

.footer-links-group a {
    color: var(--footer-link-color, rgba(255, 255, 255, .8)) !important;
    text-decoration: none;
    font-size: .95rem;
}

.footer-instagram-panel {
    padding-top: .25rem;
}

.ig-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .9rem;
    color: var(--footer-text-color, rgba(255, 255, 255, .92));
    font-weight: 600;
    font-size: .9rem;
}

.ig-panel-header a {
    color: var(--footer-accent-color, #f5d36e) !important;
    text-decoration: none;
    font-size: .78rem;
    font-weight: 700;
}

.ig-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .08));
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .12);
}

.ig-profile-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
    color: #fff;
}

.ig-avatar {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd768, #f39c12);
    color: #1a1d1d;
    font-weight: 800;
}

.ig-profile-row strong {
    display: block;
    font-size: .9rem;
}

.ig-profile-row small {
    display: block;
    color: color-mix(in srgb, var(--footer-text-color, #fff) 70%, transparent);
}

.ig-promo-title {
    color: var(--footer-text-color, #fff);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.ig-image-box {
    min-height: 9rem;
    border-radius: .9rem;
    background: linear-gradient(135deg, rgba(255, 204, 79, .95), rgba(255, 130, 59, .9));
    display: flex;
    align-items: end;
    justify-content: center;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.ig-image-box::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(21, 31, 35, .08), rgba(21, 31, 35, .35));
}

.ig-image-text {
    position: relative;
    z-index: 1;
    color: #fff;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-size: .7rem;
}

.ig-cta {
    background: #ffca2c;
    color: #0d1f1b;
    border-radius: .7rem;
    padding: .7rem .9rem;
    text-align: center;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .7rem;
}

.footer-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: .7rem;
    margin-top: 0;
    color: color-mix(in srgb, var(--footer-text-color, #fff) 72%, transparent);
    font-size: .85rem;
}

.footer-utility-nav {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0;
    margin: 0;
}

.footer-utility-nav a {
    color: var(--footer-link-color, rgba(255, 255, 255, .8)) !important;
    text-decoration: none;
}

@media (max-width: 991.98px) {
    .footer-top-row {
        grid-template-columns: 1fr;
    }

    .footer-links-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .footer-bottom-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-utility-nav {
        flex-wrap: wrap;
    }
}

/* --- Hero Slider block --- */
.hero-slider-breakout {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.hero-slide {
    min-height: 520px;
    display: flex;
    align-items: center;
    color: #fff;
    background: linear-gradient(115deg, color-mix(in srgb, var(--cms-primary) 90%, black) 10%, color-mix(in srgb, var(--cms-primary) 60%, black) 60%);
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: .78rem;
    font-weight: 700;
    color: var(--cms-gold);
    margin-bottom: 1rem;
}

.hero-heading {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.18;
    max-width: 620px;
    color: #fff;
}

.hero-lead {
    color: rgba(255, 255, 255, .85);
    max-width: 500px;
    font-size: 1.05rem;
}

.hero-side-tab {
    position: absolute;
    right: 0;
    top: 40%;
    background: var(--cms-primary);
    color: #fff;
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: 1px;
    padding: 1rem .6rem;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    border-radius: 4px 0 0 4px;
    text-decoration: none;
    z-index: 5;
}

.hero-side-tab:hover {
    background: color-mix(in srgb, var(--cms-primary) 85%, black);
    color: #fff;
}

.hero-slider .carousel-control-prev,
.hero-slider .carousel-control-next {
    width: auto;
    padding: 0 1.25rem;
    opacity: 1;
}

.hero-slider-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.hero-slider .carousel-control-prev:hover .hero-slider-arrow,
.hero-slider .carousel-control-next:hover .hero-slider-arrow {
    background: var(--cms-primary);
    border-color: var(--cms-primary);
}

.hero-slider-indicators {
    margin-bottom: 1.25rem;
}

.hero-slider-indicators button {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, .5);
    border: none;
    opacity: 1;
    margin: 0 4px;
}

.hero-slider-indicators button.active {
    background-color: var(--cms-gold);
}

/* --- Campus / Program Grid block --- */
.campus-card {
    border: 1px solid var(--cms-hairline);
    border-radius: var(--cms-border-radius, 6px);
    overflow: hidden;
    transition: box-shadow .15s ease, transform .15s ease;
}

.campus-card:hover {
    box-shadow: 0 10px 26px rgba(0, 0, 0, .1);
    transform: translateY(-2px);
}

.campus-card-photo {
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: rgba(255, 255, 255, .85);
    background: linear-gradient(135deg, var(--cms-primary), color-mix(in srgb, var(--cms-primary) 60%, black));
}

.campus-card-body {
    padding: 1.4rem;
}

.campus-card-body h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: .4rem;
}

.campus-card-body p {
    font-size: .88rem;
    color: var(--cms-ink-muted);
    margin-bottom: .9rem;
}

.campus-card-links {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .9rem;
    font-size: .78rem;
}

.campus-card-links a {
    color: var(--cms-secondary);
    text-decoration: none;
}

.campus-card-links a:hover {
    text-decoration: underline;
}

/* --- Testimonials block: slider layout --- */
.testimonial-card {
    background: #f5f8f6;
    border-radius: var(--cms-border-radius, 6px);
    padding: 1.9rem;
    border-top: 3px solid var(--cms-primary);
}

.testimonial-stars {
    color: var(--cms-gold);
    font-size: .85rem;
    margin-bottom: .75rem;
}

.testimonial-quote {
    font-size: .98rem;
    line-height: 1.65;
}

.testimonial-name {
    font-weight: 600;
    color: var(--cms-primary);
    font-size: .9rem;
    margin-top: 1rem;
}

.testimonial-role {
    color: var(--cms-ink-muted);
    font-size: .8rem;
}

.testimonial-nav {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--cms-hairline);
    background: #fff;
    color: var(--cms-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
}

.testimonial-nav:hover {
    background: var(--cms-primary);
    border-color: var(--cms-primary);
    color: #fff;
}

.testimonial-indicators button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--cms-hairline);
    border: none;
    opacity: 1;
    margin: 0 4px;
}

.testimonial-indicators button.active {
    background-color: var(--cms-primary);
}

/* =========================================================================
   Motion & interaction polish
   ---------------------------------------------------------------------
   Scroll-reveal, count-up, and hover/transition refinement, driven by
   public/assets/js/site-animations.js. Every rule here is purely additive
   — with JS disabled, .cms-reveal never gets added (see the JS's own
   IntersectionObserver-support guard), so blocks render fully visible by
   default either way. Respects prefers-reduced-motion throughout.
   ========================================================================= */

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* --- Scroll reveal (blocks) --- */
.cms-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s cubic-bezier(.22, .61, .36, 1), transform .7s cubic-bezier(.22, .61, .36, 1);
}

.cms-reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Sticky header with shadow-on-scroll --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(24, 37, 30, .08);
    transition: box-shadow .25s ease, background-color .25s ease;
}

.site-header.is-scrolled {
    box-shadow: 0 10px 24px rgba(16, 24, 16, .06);
    background: rgba(255, 255, 255, .96);
}

.site-header .navbar {
    padding-top: .9rem;
    padding-bottom: .9rem;
}

.site-header .navbar-brand {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--cms-primary);
    gap: .7rem;
}

.site-header .navbar-brand img {
    height: 42px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

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

.navbar-nav .nav-link {
    position: relative;
    font-size: .92rem;
    font-weight: 600;
    letter-spacing: .01em;
    color: rgba(26, 33, 29, .8);
    padding: .65rem .9rem;
    border-radius: 999px;
    transition: color .2s ease, background-color .2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus-visible {
    color: var(--cms-primary);
    background: rgba(15, 92, 49, .04);
}

.navbar-nav .nav-link:not(.dropdown-toggle)::after {
    content: "";
    position: absolute;
    left: .9rem;
    right: .9rem;
    bottom: .38rem;
    height: 2px;
    background: var(--cms-primary, #0d6efd);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}

.navbar-nav .nav-link:not(.dropdown-toggle):hover::after,
.navbar-nav .nav-link:not(.dropdown-toggle):focus-visible::after {
    transform: scaleX(1);
}

.navbar-nav .dropdown-menu {
    border: 1px solid rgba(17, 24, 20, .08);
    box-shadow: 0 14px 30px rgba(15, 24, 18, .08);
    border-radius: 0.9rem;
    padding: .5rem;
    margin-top: .75rem;
}

.navbar-nav .dropdown-item {
    border-radius: .6rem;
    padding: .55rem .8rem;
    font-weight: 500;
}

/* --- Buttons: lift + soft shadow on hover --- */
.btn {
    transition: transform .2s ease, box-shadow .2s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary:hover,
.btn-lg:hover {
    box-shadow: 0 10px 24px color-mix(in srgb, var(--cms-primary, #0d6efd) 35%, transparent);
}

.btn:active {
    transform: translateY(0);
}

/* --- Card Grid block: hover lift (campus-card/testimonial-card already
   have their own hover treatment defined above) --- */
.cms-card {
    transition: transform .3s ease, box-shadow .3s ease;
    border-radius: var(--cms-border-radius, 6px);
}

.cms-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, .08);
}

/* --- Image hover zoom (Image + Text, Image Gallery blocks) --- */
.cms-media-frame {
    overflow: hidden;
    border-radius: var(--cms-border-radius, 6px);
}

.cms-media-frame img {
    transition: transform .5s ease;
    display: block;
}

.cms-media-frame:hover img {
    transform: scale(1.06);
}

/* --- Statistics: stable number width while count-up animates --- */
.cms-block-statistics .display-4 {
    font-variant-numeric: tabular-nums;
}

/* --- Links inside rich text: animated underline instead of the
   default static one --- */
.rich-text-content a,
.cms-block p a {
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color .15s ease;
}

/* --- Countdown Timer block --- */
.countdown-unit {
    background-color: var(--cms-primary);
    color: #fff;
    border-radius: var(--cms-border-radius, 6px);
    min-width: 90px;
    padding: 1rem .5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-value {
    font-family: 'Lora', Georgia, serif;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: .72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .8);
    margin-top: .4rem;
}

.countdown-expired {
    color: var(--cms-primary);
}

/* --- Pricing / Fee Table block --- */
.pricing-card {
    position: relative;
    height: 100%;
    border: 1px solid var(--cms-hairline);
    border-radius: var(--cms-border-radius, 6px);
    padding: 2rem 1.75rem;
    background: #fff;
    transition: transform .2s ease, box-shadow .2s ease;
}

.pricing-card--highlighted {
    border-color: var(--cms-primary);
    border-width: 2px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, .1);
    transform: translateY(-8px);
}

.pricing-card-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--cms-gold);
    color: #3a2f00;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: .35rem .9rem;
    border-radius: 999px;
    white-space: nowrap;
}

.pricing-card-price {
    font-family: 'Lora', Georgia, serif;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--cms-primary);
}

.pricing-card-period {
    color: var(--cms-ink-muted);
    font-size: .85rem;
    margin-left: .35rem;
}

.pricing-card-features {
    list-style: none;
    padding-left: 0;
    margin: 1.25rem 0;
}

.pricing-card-features li {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    padding: .35rem 0;
    font-size: .92rem;
}

.pricing-card-features i {
    color: var(--cms-primary);
    margin-top: .15rem;
}

/* --- Tabs block --- */
.cms-block .nav-tabs .nav-link {
    color: var(--cms-ink-muted);
    font-weight: 600;
    border: none;
    border-bottom: 2px solid transparent;
}

.cms-block .nav-tabs .nav-link.active {
    color: var(--cms-primary);
    background: transparent;
    border-color: var(--cms-primary);
}

/* --- Blockquote block --- */
.cms-blockquote {
    margin: 0;
    text-align: center;
}

.cms-blockquote-text {
    font-size: 1.1rem;
    line-height: 1.7;
}

.cms-blockquote-author {
    font-weight: 600;
    color: var(--cms-primary);
}

.cms-blockquote-role {
    display: block;
    color: var(--cms-ink-muted);
    font-size: .85rem;
}

.cms-blockquote--accent {
    text-align: left;
    border-left: 3px solid var(--cms-primary);
    padding-left: 1.5rem;
}

.cms-blockquote--accent .cms-blockquote-text {
    font-size: 1.25rem;
}

.cms-blockquote--large {
    font-family: 'Lora', Georgia, serif;
}

.cms-blockquote--large .cms-blockquote-text {
    font-size: 1.75rem;
    line-height: 1.5;
}

.cms-blockquote-icon {
    display: block;
    font-size: 2.5rem;
    color: var(--cms-gold);
    margin-bottom: .5rem;
}

/* --- Social Icons Bar block --- */
.social-icons-bar-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--cms-hairline);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cms-primary);
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

.social-icons-bar-link:hover {
    background-color: var(--cms-primary);
    border-color: var(--cms-primary);
    color: #fff;
    transform: translateY(-2px);
}

/* --- Media Carousel block --- */
.media-carousel-nav {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--cms-hairline);
    background: #fff;
    color: var(--cms-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
}

.media-carousel-nav:hover {
    background: var(--cms-primary);
    border-color: var(--cms-primary);
    color: #fff;
}

.media-carousel-indicators button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--cms-hairline);
    border: none;
    opacity: 1;
    margin: 0 4px;
}

.media-carousel-indicators button.active {
    background-color: var(--cms-primary);
}

/* --- Swiper Slider block --- */
.cms-swiper {
    padding-bottom: 3rem;
}

.cms-swiper .swiper-slide {
    height: auto;
}

.cms-swiper-media {
    position: relative;
    border-radius: var(--cms-border-radius, 6px);
    overflow: hidden;
}

.cms-swiper-media img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.cms-swiper-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.5rem;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, 0));
}

.cms-swiper-caption h3 {
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: .25rem;
}

.cms-swiper-caption p {
    color: rgba(255, 255, 255, .85);
    font-size: .92rem;
    margin-bottom: .5rem;
}

.cms-swiper-link {
    color: var(--cms-gold);
    font-weight: 600;
    text-decoration: none;
    font-size: .9rem;
}

.cms-swiper-link:hover {
    color: #fff;
}

.cms-swiper .swiper-button-next,
.cms-swiper .swiper-button-prev {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
    color: var(--cms-primary);
}

.cms-swiper .swiper-button-next::after,
.cms-swiper .swiper-button-prev::after {
    font-size: 1.05rem;
    font-weight: 700;
}

.cms-swiper .swiper-button-next:hover,
.cms-swiper .swiper-button-prev:hover {
    background-color: var(--cms-primary);
    color: #fff;
}

.cms-swiper .swiper-pagination-bullet {
    background-color: var(--cms-hairline);
    opacity: 1;
    width: 9px;
    height: 9px;
}

.cms-swiper .swiper-pagination-bullet-active {
    background-color: var(--cms-primary);
}

/* --- Video Gallery block --- */
.video-gallery-thumb {
    cursor: pointer;
}

.video-gallery-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: background-color .2s ease, transform .2s ease;
}

.video-gallery-thumb:hover .video-gallery-play-icon {
    background: var(--cms-primary);
    transform: translate(-50%, -50%) scale(1.08);
}

.video-gallery-placeholder {
    background-color: var(--cms-primary);
    color: #fff;
    font-size: 2rem;
    border-radius: var(--cms-border-radius, 6px);
}

.cms-video-gallery-modal .modal-content {
    border: none;
    border-radius: var(--cms-border-radius, 6px);
    overflow: hidden;
}

.cms-video-gallery-modal .modal-header {
    /* Sit above the position:absolute iframe in the ratio-16x9 body so
       the close button is always in front and clickable. The solid
       background prevents the iframe bleeding through visually. */
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    background: #fff;
}

.cms-video-gallery-modal .modal-body {
    /* Remove any default overflow so the iframe inside ratio-16x9 does
       not create a scrollbar or clip its own contents. */
    overflow: hidden;
}

/* --- Full-Width Video block ---
   Breaks the video out of the ancestor .container (see
   components/blocks/layout/section.blade.php) to span the full viewport
   width, regardless of how deeply nested it is. Standard "full-bleed"
   trick: stretch to 100vw, then pull back by half the viewport width
   minus half of the element's own (100vw) width — i.e. re-center on the
   viewport instead of the parent. Overflow-x is not affected since the
   element's width is viewport-relative, not parent-relative. */
.cms-video-fullwidth {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* --- Video Background block ---
   Same 100vw/-50vw full-bleed trick as .cms-video-fullwidth above, plus
   a fixed height (set inline per-block from the `height` field) and
   `overflow:hidden` so the oversized "cover" iframe below is clipped to
   this box instead of pushing the page taller. */
.cms-video-bg-fullwidth {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
}

.cms-video-bg-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* The classic "16:9-cover" hack: make the iframe wider than the box
   whenever the box is relatively short (min-width scales off its own
   height), or taller than the box whenever the box is relatively narrow
   (min-height scales off its own width), then re-center it — so however
   the box's own aspect ratio compares to the video's 16:9, the video
   always overflows it in one dimension rather than ever letterboxing.
   min-width: 177.78vh here is only a fallback for the (unlikely) case an
   inline style fails to apply — video-background.blade.php always sets
   the real min-width inline, scaled to the block's own `height` field
   (40/60/80/100vh), because a fixed 177.78vh (100vh * 16/9) is only
   correct when height is "Full Screen"; at the smaller options it
   massively over-provisions the width, so the video renders zoomed in
   far more than intended — most noticeably on phones, where the
   viewport is narrower to begin with. */
.cms-video-bg-frame iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw;
    min-height: 100%;
    min-width: 177.78vh;
    transform: translate(-50%, -50%);
    border: 0;
}

.cms-video-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .45);
}

.cms-video-bg-content {
    z-index: 1;
}

/* --- Image Grid block ---
   .image-grid-tile needs its own position:relative + overflow:hidden
   (rather than reusing .cms-media-frame) because it also anchors the
   absolutely-positioned caption overlay on top of the image — something
   .cms-media-frame's other, simpler users (Logo Grid, Media Carousel,
   Image Grid's plain sibling Image Gallery) don't need. No border-radius
   here on purpose: with `row g-0` removing every gap between tiles, a
   rounded corner would just look like a stray notch at every seam. */
.image-grid-tile {
    position: relative;
    display: block;
    overflow: hidden;
}

.image-grid-tile img {
    display: block;
    transition: transform .5s ease;
}

.image-grid-tile:hover img {
    transform: scale(1.06);
}

.image-grid-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.25rem;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, 0));
}

.image-grid-caption h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: .25rem;
}

.image-grid-caption p {
    color: rgba(255, 255, 255, .85);
    font-size: .9rem;
}

.image-grid-link {
    color: var(--cms-gold);
    font-weight: 600;
    font-size: .85rem;
    display: inline-block;
    margin-top: .35rem;
}

/* Floating WhatsApp button — resources/views/components/layout/whatsapp-button.blade.php.
   Fixed to the bottom-right corner site-wide; deliberately not themed off
   --cms-primary since WhatsApp's own green is what makes it instantly
   recognizable as a chat affordance. */
.cms-whatsapp-button {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 1040;
    width: 3.5rem;
    height: 3.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(180deg, #2be37d, #19b85d);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    transition: transform .2s ease, box-shadow .2s ease;
    text-decoration: none;
    padding: 0;
}

.cms-whatsapp-button i {
    display: block;
    line-height: 1;
    position: relative;
    top: -1px;
    left: 0;
    transform: translateY(-1px);
}

.cms-whatsapp-button:hover,
.cms-whatsapp-button:focus-visible {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
    color: #fff;
}

@media (max-width: 575.98px) {
    .cms-whatsapp-button {
        right: 1rem;
        bottom: 1rem;
        width: 3.125rem;
        height: 3.125rem;
        font-size: 1.5rem;
    }
}

/* --- Responsive Fixes for Mobile/Tablet --- */

/* Video Gallery: fix overflow on mobile screens */
@media (max-width: 767.98px) {
    .cms-block-video_gallery .row {
        margin-left: auto;
        margin-right: auto;
        width: auto;
    }

    .cms-block-video_gallery [class*="col-"] {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Lead Capture Wrapper: ensure it doesn't overflow on smaller screens */
.lead-capture-wrapper {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 575.98px) {
    .lead-capture-wrapper {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .lead-capture-wrapper .col-lg-6 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Instagram Posts: fix paragraph text overflow in smaller containers */
.cms-block-instagram_posts p {
    word-break: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 767.98px) {
    .cms-block-instagram_posts p {
        font-size: 0.95rem;
    }
}

/* Ensure all blocks respect viewport width */
.cms-block {
    box-sizing: border-box;
}

.cms-block .container {
    box-sizing: border-box;
    overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .cms-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .btn:hover,
    .cms-card:hover,
    .cms-media-frame:hover img,
    .pricing-card--highlighted,
    .social-icons-bar-link:hover,
    .image-grid-tile:hover img,
    .cms-whatsapp-button:hover {
        transform: none;
    }

    /* Keep centering (translate) but drop the hover scale-up. */
    .video-gallery-thumb:hover .video-gallery-play-icon {
        transform: translate(-50%, -50%);
    }
}
