/* ==========================================================================
   Custom CSS overrides for Gracie Jiu-Jitsu Omaha
   Supplements Bootstrap 5 with branding, layout fixes, and accessibility.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties (Branding)
   -------------------------------------------------------------------------- */
:root {
    --brand-primary: #1a237e;
    --brand-dark: #0d1117;
    --brand-accent: #c41e3a;
    --brand-light: #f8f9fa;
    --brand-font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --brand-heading-font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   2. Global Resets & Overflow Prevention
   -------------------------------------------------------------------------- */
html,
body {
    overflow-x: hidden;
    font-family: var(--brand-font);
}

img,
iframe,
video,
embed,
object {
    max-width: 100%;
    height: auto;
}

iframe {
    width: 100%;
    border: 0;
}

/* --------------------------------------------------------------------------
   3. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
    position: relative;
    padding: 4rem 0;
    background-color: var(--brand-dark);
    color: #fff;
}

.hero-with-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-with-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 0;
}

.hero-with-image .container {
    position: relative;
    z-index: 1;
}

.hero-logo {
    max-height: 140px;
    width: auto;
}

.hero-headline {
    font-family: var(--brand-heading-font);
    font-weight: 700;
}

.hero-cta {
    min-height: 44px;
    min-width: 44px;
    padding: 0.75rem 2rem;
}

/* --------------------------------------------------------------------------
   4. Event CTA Tab (Fixed Left-Edge Vertical Tab)
   -------------------------------------------------------------------------- */
.event-cta-tab {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1050;
    padding: 0.75rem 0.5rem;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    min-height: 44px;
    min-width: 44px;
}

.event-cta-tab:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.event-cta-tab-text {
    display: block;
    transform: rotate(180deg);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   5. Event Modal Overrides
   -------------------------------------------------------------------------- */
.event-modal-content {
    border: none;
    border-radius: 0.5rem;
}

.event-modal-description {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.event-modal-widget iframe {
    min-height: 350px;
}

/* --------------------------------------------------------------------------
   6. Touch Targets (Accessibility – min 44px)
   -------------------------------------------------------------------------- */
.navbar .nav-link,
.navbar .dropdown-item,
.navbar .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.accordion-button {
    min-height: 44px;
}

.btn {
    min-height: 44px;
    min-width: 44px;
}

footer a {
    display: inline-block;
    min-height: 44px;
    line-height: 44px;
}

.footer-info {
    color: lightgray;
}

/* --------------------------------------------------------------------------
   7. Responsive Breakpoints
   -------------------------------------------------------------------------- */

/* Mobile-first: ensure single-column grid below 768px */
@media (max-width: 767.98px) {
    .hero-section {
        padding: 2.5rem 0;
    }

    .hero-headline {
        font-size: 1.75rem;
    }

    .event-cta-tab {
        padding: 0.5rem 0.35rem;
        font-size: 0.75rem;
    }
}

/* Tablet breakpoint */
@media (max-width: 768px) {

    /* Instructor grid: force single-column below 768px */
    .col-md-6,
    .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Ensure no overflow at any tested viewport (320px, 768px, 1280px) */
@media (max-width: 320px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .hero-headline {
        font-size: 1.5rem;
    }

    .event-cta-tab {
        padding: 0.4rem 0.25rem;
    }

    .event-cta-tab-text {
        font-size: 0.7rem;
    }
}

/* --------------------------------------------------------------------------
   8. GymDesk Widget Containers
   -------------------------------------------------------------------------- */
.gymdesk-widget-container {
    width: 100%;
    min-height: 300px;
}

.gymdesk-widget-container iframe {
    width: 100%;
    min-height: 400px;
    border: 0;
}

/* --------------------------------------------------------------------------
   9. Card Styling (Instructors, Programs)
   -------------------------------------------------------------------------- */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.card-img-top {
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

/* --------------------------------------------------------------------------
   10. Navigation Enhancements
   -------------------------------------------------------------------------- */
.navbar {
    font-family: var(--brand-font);
}

.navbar-brand img {
    max-height: 70px;
    width: auto;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
footer {
    font-size: 0.95rem;
}

footer h5 {
    font-weight: 600;
    margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   12. Miscellaneous Utilities
   -------------------------------------------------------------------------- */
.section-heading {
    font-weight: 700;
    margin-bottom: 2rem;
}

.text-brand-primary {
    color: var(--brand-primary);
}

.bg-brand-dark {
    background-color: var(--brand-dark);
}

/* --------------------------------------------------------------------------
   13. Testimonials
   -------------------------------------------------------------------------- */
.testimonial-quote-text.clamped {
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.testimonial-rating-img {
    max-width: 100px;
    height: auto;
}

.testimonial-read-more {
    font-size: 0.85rem;
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   14. Pricing Rows
   -------------------------------------------------------------------------- */
.pricing-row {
    background-color: #2d2d2d;
    color: #fff;
}

.pricing-plan-name {
    font-weight: 700;
    font-size: 1.2rem;
    color: #d4a843;
}

.pricing-price {
    font-weight: 700;
    font-size: 1.4rem;
    color: #fff;
}

.pricing-row-discount .pricing-plan-name {
    color: #d4a843;
}

/* Invert dark logos on dark hero backgrounds */
.hero-logo-invert .hero-logo {
    filter: invert(1);
}

/* --------------------------------------------------------------------------
   15. FAQ Accordion Branding
   -------------------------------------------------------------------------- */
.accordion-button:not(.collapsed) {
    background-color: var(--brand-dark);
    color: #fff;
    box-shadow: none;
}

.accordion-button:not(.collapsed)::after {
    filter: invert(1);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--brand-dark);
}

/* --------------------------------------------------------------------------
   16. Schedule Color Classes (used by program_schedule component)
   -------------------------------------------------------------------------- */
.text-schedule-youth {
    color: #e65100;
    /* orange for kids programs (generic) */
}

.text-schedule-munchkins {
    color: #e65100;
    /* orange for Mat Munchkins */
}

.text-schedule-little-champs {
    color: #d81b60;
    /* pink for Little Champs */
}

.text-schedule-jr-grapplers {
    color: #1565c0;
    /* blue for Jr. Grapplers */
}

.text-schedule-bbc {
    color: #6a1b9a;
    /* purple for Black Belt Club */
}

.text-schedule-combatives {
    color: #00897b;
    /* teal for Gracie Combatives */
}

.text-schedule-women {
    color: #ab47bc;
    /* purple for Women Empowered */
}

.text-schedule-master {
    color: #1565c0;
    /* blue for Master Cycle */
}

.text-schedule-open-gym {
    color: #2e7d32;
    /* green for Open Gym */
}