/* ==========================================================================
   SAMDO Premium Stylesheet - 2026 Core Master (Full-Width System)
   ========================================================================== */

:root {
    --samdo-blue: #004a99;
    --samdo-blue-hover: #003670;
    --samdo-orange: #f39200;
    --samdo-orange-hover: #d68100;
    --samdo-bg-light: #f8fafc;
    --samdo-dark: #0f172a;
    --samdo-text-muted: #64748b;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Testimonial Color Palette */
    --testimonial-crimson: #c2410c; 
    --quote-light-grey: #f1f5f9;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #334155;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* ==========================================================================
   Typography & Global Overrides
   ========================================================================== */
.text-primary { color: var(--samdo-blue) !important; }
.text-warning { color: var(--samdo-orange) !important; }
.bg-light { background-color: var(--samdo-bg-light) !important; }
.select-none { user-select: none; }

/* Global Buttons */
.btn-primary { 
    background-color: var(--samdo-blue); 
    border-color: var(--samdo-blue); 
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: var(--transition-smooth);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--samdo-blue-hover);
    border-color: var(--samdo-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 74, 153, 0.25);
}

.btn-warning { 
    background-color: var(--samdo-orange); 
    border-color: var(--samdo-orange); 
    color: white !important;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: var(--transition-smooth);
}
.btn-warning:hover, .btn-warning:focus {
    background-color: var(--samdo-orange-hover);
    border-color: var(--samdo-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(243, 146, 0, 0.25);
}

.btn-outline-light {
    border-width: 2px;
    font-weight: 600;
    transition: var(--transition-smooth);
}
.btn-outline-light:hover {
    transform: translateY(-2px);
    background-color: white;
    color: var(--samdo-dark) !important;
}

/* ==========================================================================
   Header & Navigation Module
   ========================================================================== */
.samdo-top-info { 
    background: var(--samdo-blue); 
    color: rgba(255, 255, 255, 0.9); 
    font-size: 13px; 
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.samdo-top-info a i {
    transition: var(--transition-smooth);
}
.samdo-top-info a:hover i {
    color: var(--samdo-orange) !important;
    transform: scale(1.1);
}

.navbar {
    transition: var(--transition-smooth);
    border-bottom: 1px solid #e2e8f0;
}
.brand-text-wrapper {
    line-height: 1.15;
}
.nav-link {
    color: #475569 !important;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.2s ease;
}
.nav-link:hover {
    color: var(--samdo-blue) !important;
}
@media (min-width: 992px) {
    .nav-link::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: 0;
        left: 16px;
        background-color: var(--samdo-orange);
        transition: var(--transition-smooth);
    }
    .nav-link:hover::after {
        width: calc(100% - 32px);
    }
}

/* ==========================================================================
   UNIFIED FULL-WIDTH HERO SYSTEM (NO SPLIT)
   ========================================================================== */
#dynamic-hero-target {
    width: 100%;
    height: calc(100vh - 120px);
    height: calc(100svh - 120px); /* accounts for mobile browser toolbars */
    min-height: 600px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #0f172a;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    transition: background-image 0.5s ease-in-out;
}

#dynamic-hero-target.hero-image-loaded {
    background-color: #0f172a;
}

/* Elegant dark overlay across the full width to guarantee typography legibility */
#dynamic-hero-target::before {
    content: '';
    position: absolute;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.5) 50%, rgba(15, 23, 42, 0.3) 100%);
    z-index: 1;
}

.hero-content-wrapper {
    position: relative;
    z-index: 2;
    padding: 2rem 0;
}

.hero-display-headline {
    font-family: 'Poppins', sans-serif;
    font-size: calc(2rem + 1.8vw);
    font-weight: 600; /* Pronounced bold weighting to read perfectly over changing pictures */
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

.hero-display-lead {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 400;
    color: #cbd5e1 !important; /* Soft muted structural accent text color */
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* Rounded Pill Button Action Styling */
.btn-hero-action-discover {
    display: inline-block;
    padding: 14px 36px;
    background-color: var(--samdo-orange);
    color: #ffffff;
    text-decoration: none;
    border-radius: 30px; 
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(243, 146, 0, 0.3);
}

.btn-hero-action-discover:hover {
    background-color: var(--samdo-orange-hover);
    color: #ffffff !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(243, 146, 0, 0.5);
}

/* ==========================================================================
   About Carousel & Media Module
   ========================================================================== */
#aboutCarousel,
.about-carousel-container {
    width: 100%;
}

#aboutCarousel .carousel-inner {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
}

/* ==========================================================================
   Program Grid Cards
   ========================================================================== */
.program-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.program-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

/* ==========================================================================
   Testimonial Module Extensions
   ========================================================================== */
.testimonial-minimal-bg {
    background-color: #ffffff !important;
}

.testimonial-minimal-header h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    letter-spacing: -0.5px;
    color: #1e293b !important;
    font-size: 1.75rem;
    margin-bottom: 3.5rem;
}

.testimonial-container {
    padding: 2rem 0;
    max-width: 850px;
    margin: 0 auto;
}

.testimonial-content-wrapper {
    z-index: 2;
}

.testimonial-body-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.45rem;
    font-weight: 400;
    line-height: 1.75;
    color: #334155;
    letter-spacing: -0.2px;
    margin-bottom: 2rem;
}

.testimonial-attribution-box {
    margin-top: 1.5rem;
}

.parent-handle {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: #dc2626 !important;
    font-size: 1.4rem;
    display: inline-block;
    letter-spacing: -0.3px;
    margin-bottom: 0;
}

.student-subtext {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.2px;
}

.custom-testimonial-box {
    max-width: 1000px;
    width: 100%;
    min-height: 220px;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
    border-radius: 12px;
}

.custom-scroll-area {
    max-height: 260px;
    overflow-y: auto;
    padding-bottom: 10px;
}

.custom-scroll-area::-webkit-scrollbar {
    width: 4px;
}
.custom-scroll-area::-webkit-scrollbar-thumb {
    background-color: #f39200;
    border-radius: 10px;
}

/* Transparent Carousels Navigation Controls */
.testimonial-container .carousel-control-prev,
.testimonial-container .carousel-control-next {
    width: 44px;
    height: 44px;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 50%;
    opacity: 0.6;
    transition: var(--transition-smooth);
}

.testimonial-container .carousel-control-prev-icon,
.testimonial-container .carousel-control-next-icon {
    background-image: none !important;
    width: 10px;
    height: 10px;
    border-left: 2px solid var(--samdo-dark);
    border-bottom: 2px solid var(--samdo-dark);
    transform: rotate(45deg);
    transition: var(--transition-smooth);
}

.testimonial-container .carousel-control-next-icon {
    transform: rotate(-135deg);
}

.testimonial-container .carousel-control-prev:hover,
.testimonial-container .carousel-control-next:hover {
    opacity: 1;
    background-color: rgba(15, 23, 42, 0.04);
    border-color: var(--samdo-blue);
}

.testimonial-container .carousel-control-prev:hover .carousel-control-prev-icon,
.testimonial-container .carousel-control-next:hover .carousel-control-next-icon {
    border-color: var(--samdo-blue);
}

#testimonialCarousel .carousel-control-prev { left: -55px; }
#testimonialCarousel .carousel-control-next { right: -55px; }

/* ==========================================================================
   Modals UI Framing
   ========================================================================== */
.modal-content {
    border-radius: var(--radius-md);
    border: none;
    overflow: hidden;
}

/* ==========================================================================
   Responsive Viewport Breakpoints Framework
   ========================================================================== */
@media (max-width: 991.98px) {
    .testimonial-container .carousel-control-prev,
    .testimonial-container .carousel-control-next {
        top: auto;
        bottom: -50px;
        transform: none;
    }
    .testimonial-container { padding-bottom: 4rem; }
    
    #testimonialCarousel .carousel-control-prev { left: calc(50% - 55px); }
    #testimonialCarousel .carousel-control-next { right: calc(50% - 55px); }
}

@media (max-width: 768px) {
    #dynamic-hero-target {
        height: auto;
        min-height: 0;
        padding: 4.5rem 0;
    }
    #dynamic-hero-target::before {
        background: rgba(15, 23, 42, 0.75); /* Darkens evenly across screen ratios on small hardware */
    }
    .hero-content-wrapper {
        text-align: center;
    }
    .hero-display-headline {
        font-size: 2.25rem;
    }
    .hero-display-lead {
        font-size: 1.1rem;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 576px) {
    .testimonial-body-text { 
        font-size: 1.1rem; 
        line-height: 1.5; 
    }
}
/* ==========================================================================
   SCROLL-TRIGGERED REVEAL ANIMATIONS
   ========================================================================== */
/* The base class added to sections you want to animate on scroll */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px); /* Slides up slightly from 40px below */
    transition: opacity 0.85s cubic-bezier(0.215, 0.610, 0.355, 1), 
                transform 0.85s cubic-bezier(0.215, 0.610, 0.355, 1);
    will-change: opacity, transform;
}

/* The active class appended via JavaScript when scrolled into view */
.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Optional fine-tuning: Adds a slight stagger delay to grid content cards */
.reveal-on-scroll .program-card {
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: 0.2s;
}

.reveal-on-scroll.revealed .program-card {
    opacity: 1;
    transform: scale(1);
}


/* ==========================================================================
   MOVED FROM index.php (formerly inline <style>)
   Button colours reference the --samdo-* variables that index.php still
   outputs inline, because their values come from the admin panel.
   ========================================================================== */
.btn-hero-action-discover { background-color:var(--samdo-discover-bg) !important; border-color:var(--samdo-discover-bg) !important; color:var(--samdo-discover-text) !important; }
.btn-hero-action-discover:hover, .btn-hero-action-discover:focus { background-color:var(--samdo-discover-hover) !important; border-color:var(--samdo-discover-hover) !important; color:var(--samdo-discover-text) !important; }
.samdo-btn-contact { background-color:var(--samdo-contact-bg) !important; border-color:var(--samdo-contact-bg) !important; color:var(--samdo-contact-text) !important; }
.samdo-btn-contact:hover, .samdo-btn-contact:focus { background-color:var(--samdo-contact-hover) !important; border-color:var(--samdo-contact-hover) !important; color:var(--samdo-contact-text) !important; }
#faqFloatingBtn { background-color:var(--samdo-faq-bg) !important; border-color:var(--samdo-faq-bg) !important; color:var(--samdo-faq-text) !important; }
#faqFloatingBtn:hover, #faqFloatingBtn:focus { background-color:var(--samdo-faq-hover) !important; border-color:var(--samdo-faq-hover) !important; color:var(--samdo-faq-text) !important; }
.samdo-btn-nav-login { background-color:var(--samdo-nav_login-bg) !important; border-color:var(--samdo-nav_login-bg) !important; color:var(--samdo-nav_login-text) !important; }
.samdo-btn-nav-login:hover, .samdo-btn-nav-login:focus { background-color:var(--samdo-nav_login-hover) !important; border-color:var(--samdo-nav_login-hover) !important; color:var(--samdo-nav_login-text) !important; }
.samdo-btn-apply { background-color:var(--samdo-apply-bg) !important; border-color:var(--samdo-apply-bg) !important; color:var(--samdo-apply-text) !important; }
.samdo-btn-apply:hover, .samdo-btn-apply:focus { background-color:var(--samdo-apply-hover) !important; border-color:var(--samdo-apply-hover) !important; color:var(--samdo-apply-text) !important; }
.samdo-btn-login-submit { background-color:var(--samdo-login_submit-bg) !important; border-color:var(--samdo-login_submit-bg) !important; color:var(--samdo-login_submit-text) !important; }
.samdo-btn-login-submit:hover, .samdo-btn-login-submit:focus { background-color:var(--samdo-login_submit-hover) !important; border-color:var(--samdo-login_submit-hover) !important; color:var(--samdo-login_submit-text) !important; }
.samdo-btn-register-submit { background-color:var(--samdo-register_submit-bg) !important; border-color:var(--samdo-register_submit-bg) !important; color:var(--samdo-register_submit-text) !important; }
.samdo-btn-register-submit:hover, .samdo-btn-register-submit:focus { background-color:var(--samdo-register_submit-hover) !important; border-color:var(--samdo-register_submit-hover) !important; color:var(--samdo-register_submit-text) !important; }

/* Keep uploaded images proportional: constrain frames, never force both image dimensions. */
img {
    max-width: 100%;
}

.samdo-site-logo {
    display: block;
    height: 40px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    object-position: left center;
}

/* Hero images are backgrounds; cover preserves aspect ratio while cropping excess edges. */
#dynamic-hero-target {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* About carousel: show the whole picture, edge to edge, on every screen size.
   No cropping, no stretching, no empty bars: each slide takes the natural
   height of its own image at the column's width. */
#aboutImagesAjax {
    width: 100%;
    min-width: 0;
    height: auto;
}

#aboutCarousel,
#aboutCarousel .carousel-inner,
#aboutCarousel .carousel-item {
    width: 100%;
}

#aboutCarousel .carousel-inner {
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
}

#aboutCarousel .carousel-item {
    height: auto;
    background: transparent;
}

#aboutCarousel .carousel-item img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: initial;
}

/* ===== Programs carousel (Option A) ===== */
.programs-scroll-wrapper {
    position: relative;
    padding: 10px 0 0;
}

.programs-scroll-container {
    position: relative;
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 36px 0 44px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.programs-scroll-container::-webkit-scrollbar {
    display: none;
}

.programs-scroll-container.is-static {
    justify-content: center;
}

.program-scroll-item {
    flex: 0 0 calc(100% / 3);
    min-width: 280px;
    scroll-snap-align: start;
}

@media (max-width: 991px) {
    .program-scroll-item {
        flex: 0 0 50%;
    }
}

@media (max-width: 576px) {
    .program-scroll-item {
        flex: 0 0 85%;
    }
}

.programs-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.programs-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: #cbd5e1;
    transition: width .25s ease, background .25s ease;
}

.programs-dots button.active {
    width: 26px;
    background: #0d6efd;
}

.program-image-frame {
    margin: 0;
    padding: 0;
    line-height: 0;
}

.program-image-frame img {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.program-card {
    position: relative;
    margin: 0;
    padding: 0;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

/* ===== Title sits on the image, over a dark gradient ===== */
.program-card .card-body.program-card-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 3rem 1rem 1rem;
    text-align: left;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.45) 55%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.program-card-title {
    margin: 0;
    color: #fff;
    font-weight: 700;
    line-height: 1.25;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Hover zoom: the whole card grows, not the picture ===== */
/* Reduced-motion users still get the zoom, just without the animation */
@media (prefers-reduced-motion: reduce) {
    .program-card { transition: none; }
}

.reveal-on-scroll.revealed .program-card:hover,
.reveal-on-scroll.revealed .program-card:focus-visible,
.program-card:hover,
.program-card:focus-visible {
    transform: scale(1.12);
    z-index: 2;
    box-shadow: 0 12px 28px rgba(0,0,0,0.22) !important;
}

/* Announcements grid: same card look as Programs, gentler hover zoom inside a grid. */
.reveal-on-scroll.revealed .announcement-card:hover,
.reveal-on-scroll.revealed .announcement-card:focus-visible,
.announcement-card:hover,
.announcement-card:focus-visible { transform: scale(1.04); }

.job-flex-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.job-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    padding: 1.5rem;
    width: 100%;
    max-width: 380px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 1px solid rgba(226, 232, 240, 0.8);
}
.job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    border-color: #004a99;
}
.job-card-header h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}
.job-card-body {
    color: #475569;
    font-size: 0.925rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.job-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 1rem;
    margin-top: auto;
}
.modal-body-desc {
    white-space: pre-line;
    line-height: 1.7;
    color: #334155;
}

.navbar-nav .nav-link {
    position: relative;
    transition: color 0.3s ease;
}
.navbar-nav .nav-link.active {
    color: #004a99 !important;
}
.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #004a99;
    transition: width 0.3s ease;
}
.navbar-nav .nav-link.active::after {
    width: 100%;
}

#faqFloatingBtn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1040;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background-color: #004a99;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 74, 153, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

#faqFloatingBtn:hover {
    background-color: #f39200;
    color: #ffffff;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(243, 146, 0, 0.4);
}

#faqAccordion .accordion-button:not(.collapsed) {
    background-color: #e0e7ff;
    color: #4338ca;
    font-weight: 600;
}
#faqAccordion .accordion-button:focus {
    box-shadow: none;
}
/* =====================================================
   RESPONSIVE ENHANCEMENTS
   ===================================================== */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { overflow-x: hidden; }
img, video, iframe { max-width: 100%; }
h1, h2, h3, h4, h5, p { overflow-wrap: anywhere; }

/* Bootstrap has no w-lg-auto utility; the Contact button relied on it. */
@media (min-width: 992px) { .w-lg-auto { width: auto !important; } }

/* Navbar */
.navbar-brand { min-width: 0; }
.brand-text-wrapper { line-height: 1.15; }
@media (max-width: 575.98px) {
    .samdo-site-logo { height: 34px; max-width: 120px; }
    .navbar-brand .brand-text-wrapper > span:first-child { font-size: 1.05rem; }
    .navbar-brand .brand-text-wrapper .small { font-size: .65rem !important; }
}
@media (max-width: 991.98px) {
    .navbar-collapse { max-height: calc(100vh - 72px); max-height: calc(100svh - 72px); overflow-y: auto; padding-bottom: .75rem; }
    .navbar-nav .nav-link { padding: .75rem 0; }
    .navbar-nav .nav-link::after { display: none; }
    .navbar-nav .nav-link.active { border-left: 3px solid #004a99; padding-left: .75rem; }
}

/* Hero */
.hero-content-wrapper .btn-hero-action-discover { max-width: 100%; white-space: normal; text-align: center; }
@media (max-width: 767.98px) {
    #dynamic-hero-target .container { padding-left: 1.25rem; padding-right: 1.25rem; }
    .hero-scroll-indicator { display: none !important; }
}

/* Section spacing on small screens */
@media (max-width: 575.98px) {
    section.py-5 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
    footer.py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
}

/* Programs carousel: never force a min width wider than the screen */
@media (max-width: 575.98px) {
    .program-scroll-item { min-width: 0; flex-basis: 82%; }
    .programs-scroll-container { padding: 24px 0 32px; }
}
.programs-dots button { position: relative; }
.programs-dots button::after { content: ''; position: absolute; inset: -10px -4px; }

/* Touch devices: no hover-zoom (it clips and "sticks" after a tap) */
@media (hover: none) {
    .reveal-on-scroll.revealed .program-card:hover, .reveal-on-scroll.revealed .announcement-card:hover,
    .program-card:hover, .announcement-card:hover { transform: none; box-shadow: 0 .125rem .25rem rgba(0,0,0,.075) !important; }
    .job-card:hover { transform: none; }
    #faqFloatingBtn:hover { transform: none; }
}
/* Keep desktop hover zoom inside the viewport on narrower laptops */
@media (max-width: 1199.98px) and (hover: hover) {
    .reveal-on-scroll.revealed .program-card:hover, .reveal-on-scroll.revealed .program-card:focus-visible,
    .program-card:hover, .program-card:focus-visible { transform: scale(1.06); }
}

/* Careers: fluid grid instead of fixed-width flex cards */
.job-flex-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 380px));
    justify-content: center;
    gap: 1.25rem;
}
.job-card { max-width: none; width: auto; }
@media (max-width: 575.98px) { .job-card { padding: 1.15rem; } }

/* Testimonials: smaller quote text on phones (arrows move below the card at <992px in the base rules) */
@media (max-width: 767.98px) {
    .testimonial-body p { font-size: 1rem !important; }
}

/* Floating FAQ button: smaller on phones, respects notches / home bar */
#faqFloatingBtn {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
}
@media (max-width: 575.98px) {
    #faqFloatingBtn { width: 50px; height: 50px; font-size: 1.15rem; }
}

/* Modals */
.modal-dialog { margin-left: auto; margin-right: auto; }
.modal-dialog[style*="max-width"] { width: calc(100% - 1rem); }
@media (max-width: 575.98px) {
    .modal-header .modal-title { font-size: 1.05rem; }
    .modal-body-desc { font-size: .95rem; }
}
@media (max-height: 500px) and (orientation: landscape) {
    .modal-dialog-centered { align-items: flex-start; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal-on-scroll, .job-card, #faqFloatingBtn { transition: none !important; }
}