/* ==========================================================================
   SEEDS STARS MONTESSORI - MOBILE RESPONSIVE OPTIMIZATION
   Beranda (Homepage) Mobile-First & Touch Experience Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. GLOBAL CONTAINER, BASE TOUCH TARGETS & TYPOGRAPHY
   -------------------------------------------------------------------------- */
:root {
    --ssm-touch-min: 44px;
    --ssm-btn-height: 48px;
    --ssm-wa-green: #25D366;
    --ssm-orange: #f97316;
    --ssm-orange-hover: #ea580c;
}

html,
body {
    max-width: 100%;
    overflow-x: clip !important;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

/* Aksesibilitas: Tombol & Link Interaktif */
button,
.btn,
.nav-link,
.dropdown-item {
    touch-action: manipulation;
}

/* --------------------------------------------------------------------------
   2. NAVBAR & HAMBURGER NAVIGATION MOBILE
   -------------------------------------------------------------------------- */
@media (min-width: 992px) {
    .custom-navbar .navbar-toggler {
        display: none !important;
    }
}

/* Tombol Aksi Navbar di Desktop (Ukuran Proporsional & Rapi) */
.custom-navbar .nav-btn-lang {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    padding: 0.35rem 0.75rem !important;
    min-height: 35px !important;
    height: 35px !important;
    border-radius: 6px !important;
    border: 1px solid #cbd5e1 !important;
    background-color: #f8fafc !important;
    color: #475569 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.custom-navbar .nav-btn-lang:hover {
    background-color: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

.custom-navbar .nav-btn-register {
    font-size: 0.835rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    padding: 0.35rem 1.05rem !important;
    min-height: 35px !important;
    height: 35px !important;
    border-radius: 6px !important;
    background-color: #ea580c !important;
    color: #ffffff !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: background-color 0.2s ease !important;
}

.custom-navbar .nav-btn-register:hover {
    background-color: #c2410c !important;
    color: #ffffff !important;
}

@media (max-width: 991.98px) {
    .custom-navbar .navbar-toggler {
        min-width: var(--ssm-touch-min);
        min-height: var(--ssm-touch-min);
        padding: 0.5rem;
        border-radius: 10px;
        border: 1px solid rgba(15, 23, 42, 0.12) !important;
        background-color: #ffffff;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        transition: all 0.25s ease;
    }

    .custom-navbar .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.25) !important;
        outline: none;
    }

    .custom-navbar .navbar-toggler-icon {
        width: 22px;
        height: 22px;
    }
    .custom-navbar {
        padding: 0.75rem 0 !important;
    }

    .custom-navbar .navbar-brand img {
        height: 38px !important;
        width: auto;
    }

    .custom-navbar .navbar-collapse {
        background: #ffffff;
        border-radius: 16px;
        padding: 1.25rem 1rem;
        margin-top: 0.75rem;
        box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
        border: 1px solid #f1f5f9;
        max-height: 82vh;
        overflow-y: auto;
    }

    .custom-navbar .navbar-nav .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 0.65rem 1rem !important;
        border-radius: 10px;
        font-size: 0.95rem;
        color: #334155;
        transition: all 0.2s ease;
    }

    .custom-navbar .navbar-nav .nav-link:hover,
    .custom-navbar .navbar-nav .nav-link:focus,
    .custom-navbar .navbar-nav .nav-link.active {
        background-color: #fff7ed;
        color: var(--ssm-orange) !important;
    }

    .custom-navbar .dropdown-menu {
        background-color: #f8fafc;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        padding: 0.5rem !important;
        margin: 0.35rem 0 0.65rem 0.5rem !important;
        box-shadow: none !important;
    }

    .custom-navbar .dropdown-item {
        min-height: 42px;
        display: flex;
        align-items: center;
        padding: 0.6rem 0.85rem !important;
        border-radius: 8px;
        font-size: 0.9rem;
        color: #475569;
        white-space: normal;
    }

    .custom-navbar .dropdown-item:hover,
    .custom-navbar .dropdown-item:focus,
    .custom-navbar .dropdown-item.active {
        background-color: #fed7aa;
        color: #9a3412 !important;
    }

    .custom-navbar .nav-btn-register,
    .custom-navbar .btn-mobile-register {
        width: 100% !important;
        min-height: var(--ssm-btn-height) !important;
        height: auto !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        font-size: 0.95rem !important;
        padding: 0.75rem 1.25rem !important;
        letter-spacing: 0.2px;
        border-radius: 12px !important;
        box-shadow: 0 2px 8px rgba(249, 115, 22, 0.2) !important;
    }

    .custom-navbar .nav-btn-lang,
    .custom-navbar .btn-mobile-lang {
        width: 100% !important;
        min-height: 44px !important;
        height: auto !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        font-size: 0.9rem !important;
        padding: 0.65rem 1rem !important;
        border-radius: 12px !important;
    }
}

/* --------------------------------------------------------------------------
   3. HERO BANNER SECTION (MOBILE VERTICAL STACK & FLUID TYPOGRAPHY)
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .banner-slide-item:not(.clean-banner-mode) {
        min-height: 480px !important;
        height: auto !important;
        padding-top: 4.5rem !important;
        padding-bottom: 3.5rem !important;
        display: flex;
        align-items: center;
    }

    .banner-content-container {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .banner-title {
        font-size: clamp(1.65rem, 5vw, 2.3rem) !important;
        line-height: 1.25 !important;
        margin-bottom: 0.75rem !important;
    }

    .banner-desc,
    .banner-desc p {
        font-size: clamp(0.92rem, 2.8vw, 1.05rem) !important;
        line-height: 1.65 !important;
        margin-bottom: 1.5rem !important;
    }

    .banner-btn {
        display: flex !important;
        flex-direction: column !important;
        width: 100%;
        gap: 12px !important;
    }

    .banner-btn .btn {
        width: 100% !important;
        min-height: var(--ssm-btn-height) !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        font-size: 0.95rem !important;
        padding: 0.75rem 1.25rem !important;
        border-radius: 8px !important;
    }
}

@media (max-width: 767.98px) {
    .banner-overlay {
        background: linear-gradient(
            180deg,
            rgba(15, 23, 42, 0.88) 0%,
            rgba(15, 23, 42, 0.80) 60%,
            rgba(15, 23, 42, 0.92) 100%
        ) !important;
    }

    .programs-grid-2x2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.75rem !important;
    }
}

@media (max-width: 575.98px) {
    .banner-slide-item:not(.clean-banner-mode) {
        min-height: 440px !important;
        padding-top: 3.5rem !important;
        padding-bottom: 3rem !important;
    }

    .banner-title {
        font-size: clamp(1.5rem, 6.2vw, 1.85rem) !important;
    }

    .banner-desc,
    .banner-desc p {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
    }
}

/* --------------------------------------------------------------------------
   4. SECTION PADDINGS & FLUID SECTION HEADINGS
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .why-choose-us-section,
    .programs-section,
    .facilities-section,
    .testimonials-section,
    section.py-5 {
        padding-top: 2.75rem !important;
        padding-bottom: 2.75rem !important;
    }

    .wcu-main-title,
    .program-main-title,
    .fac-title,
    .testi-title {
        font-size: clamp(1.5rem, 5.2vw, 2.1rem) !important;
        line-height: 1.28 !important;
    }

    .wcu-desc,
    .program-header-desc {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
}

@media (max-width: 575.98px) {
    .why-choose-us-section,
    .programs-section,
    .facilities-section,
    .testimonials-section {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
}

/* --------------------------------------------------------------------------
   5. WHY CHOOSE US (WCU) CARDS & CHECKLIST
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .wcu-checklist {
        margin-bottom: 1.75rem !important;
    }

    .wcu-checklist li {
        font-size: 0.95rem !important;
        margin-bottom: 0.75rem !important;
    }

    .wcu-checklist li i {
        font-size: 1.2rem !important;
        margin-right: 10px !important;
    }

    .btn-wcu-contact {
        width: 100% !important;
        min-height: var(--ssm-btn-height) !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        font-size: 0.95rem !important;
        padding: 0.75rem 1.5rem !important;
        margin-bottom: 2rem;
    }

    .wcu-pillar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.75rem !important;
    }

    .wcu-pillar-card {
        container: wcu-pillar / inline-size;
        min-inline-size: 0;
        padding: 1rem 0.85rem !important;
    }

    .editorial-principle-item {
        padding: 1.25rem 0 !important;
    }

    .wcu-card {
        padding: 1.25rem 0 !important;
        border-radius: 0 !important;
        margin-bottom: 0.5rem !important;
    }
}

/* --------------------------------------------------------------------------
   6. PROGRAM LEARNING CARDS
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .program-grid-item {
        min-inline-size: 0;
    }

    .program-learning-card {
        container: program-card / inline-size;
        min-inline-size: 0;
        border-radius: 12px !important;
    }

    .program-thumb-wrapper {
        aspect-ratio: 16 / 10 !important;
        height: auto !important;
    }

    .btn-view-all-programs {
        width: 100% !important;
        min-height: var(--ssm-btn-height) !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        font-size: 0.95rem !important;
    }
}

/* --------------------------------------------------------------------------
   7. FACILITIES HORIZONTAL SLIDER
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .fac-slider-container {
        padding-top: 0.5rem !important;
        padding-bottom: 1.25rem !important;
        gap: 1rem !important;
        scroll-padding: 0 1rem;
    }

    .fac-card {
        flex: 0 0 82vw !important;
        max-width: 340px !important;
        height: auto !important;
        border-radius: 8px !important;
    }

    .fac-card-content {
        padding: 1.25rem !important;
    }

    .fac-card-title {
        font-size: 1.15rem !important;
    }

    .fac-card-desc {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
    }

    .btn-fac-view-all {
        min-height: var(--ssm-btn-height) !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        font-size: 0.95rem !important;
        width: 100% !important;
    }
}

/* --------------------------------------------------------------------------
   8. TESTIMONIALS SLIDER
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .testi-slider-container {
        padding: 1rem 0.5rem !important;
        gap: 1rem !important;
        scroll-padding: 0 0.75rem;
    }

    .testi-card {
        flex: 0 0 84vw !important;
        max-width: 340px !important;
        padding: 1.5rem !important;
        border-radius: 8px !important;
    }

    .testi-quote-icon {
        font-size: 1.75rem !important;
    }

    .testi-stars {
        margin-bottom: 0.75rem !important;
        font-size: 0.85rem !important;
    }

    .testi-text {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1.25rem !important;
    }

    .testi-author-img {
        width: 44px !important;
        height: 44px !important;
        margin-right: 12px !important;
    }

    .testi-author-info h4 {
        font-size: 0.95rem !important;
    }
}

/* --------------------------------------------------------------------------
   9. LATEST ACTIVITIES / BERITA TERBARU
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .mag-featured-story {
        border-radius: 8px !important;
    }

    .mag-featured-body {
        padding: 1.25rem !important;
    }

    .mag-featured-title {
        font-size: 1.15rem !important;
        line-height: 1.35 !important;
    }

    .mag-feed-wrapper {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.75rem !important;
        height: auto !important;
    }

    .mag-feed-wrapper:has(> :only-child) {
        grid-template-columns: 1fr !important;
    }

    .mag-feed-item {
        container: mag-feed-card / inline-size;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.65rem !important;
        padding: 0.75rem !important;
        height: 100% !important;
        min-inline-size: 0;
        border-radius: 8px !important;
    }

    .mag-feed-thumb-box {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 10;
    }

    .activity-section .btn {
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        font-size: 0.92rem !important;
    }

    .section-activity-view-all .btn,
    .btn-activity-view-all {
        width: 100% !important;
        min-height: var(--ssm-btn-height) !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        font-size: 0.95rem !important;
    }
}

/* --------------------------------------------------------------------------
   10. FLOATING WHATSAPP QUICK CTA
   -------------------------------------------------------------------------- */
.floating-wa-btn {
    position: fixed;
    bottom: 22px;
    right: 20px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background-color: var(--ssm-wa-green);
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
    z-index: 1050;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none !important;
}

.floating-wa-btn:hover,
.floating-wa-btn:focus {
    background-color: #20ba5a;
    color: #ffffff !important;
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.55);
}

.floating-wa-btn:active {
    transform: scale(0.95);
}

.floating-wa-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: inherit;
    opacity: 0.6;
    z-index: -1;
    animation: wa-pulse 2.2s infinite;
}

@keyframes wa-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    70% {
        transform: scale(1.4);
        opacity: 0;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* --------------------------------------------------------------------------
   11. FOOTER MOBILE OPTIMIZATION (TERPUSAT DI CSS/FOOTER.CSS)
   -------------------------------------------------------------------------- */
/* Aturan responsif footer dikelola secara terpusat pada public/css/footer.css */

/* --------------------------------------------------------------------------
   12. ULTRA-COMPACT VIEWPORTS (320px - 375px)
   -------------------------------------------------------------------------- */
@media (max-width: 375px) {
    .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .banner-title {
        font-size: 1.35rem !important;
    }

    .wcu-main-title,
    .program-main-title,
    .fac-title,
    .testi-title {
        font-size: 1.45rem !important;
    }

    .fac-card {
        flex: 0 0 85vw !important;
    }

    .testi-card {
        flex: 0 0 85vw !important;
        padding: 1.25rem 1rem !important;
    }

    .activity-card-wrapper {
        flex: 0 0 85vw !important;
    }

    .floating-wa-btn {
        bottom: 18px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 26px;
    }
}

/* --------------------------------------------------------------------------
   13. REDUCED MOTION PREFERENCE
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .floating-wa-pulse {
        animation: none !important;
        display: none !important;
    }

    .banner-slide-item {
        transition: none !important;
    }
}

/* --------------------------------------------------------------------------
   14. MODE BANNER BERSIH (PURE IMAGE MODE - ZERO OVERLAY & ZERO CROPPING)
   -------------------------------------------------------------------------- */
.hero-carousel-wrapper.clean-carousel-mode,
.hero-carousel-wrapper:has(.clean-banner-mode),
.banner-slide-item.clean-banner-mode {
    width: 100% !important;
    position: relative !important;
    overflow: hidden !important;
}

.banner-slide-item.clean-banner-mode {
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-color: var(--ms-slate-900, #0f172a) !important;
    padding: 0 !important;
    margin: 0 !important;
}

.banner-slide-item.clean-banner-mode .banner-overlay {
    display: none !important;
}

@media (max-width: 991.98px) {
    .hero-carousel-wrapper.clean-carousel-mode,
    .hero-carousel-wrapper:has(.clean-banner-mode),
    .banner-slide-item.clean-banner-mode {
        height: auto !important;
        min-height: unset !important;
        aspect-ratio: 1693 / 929 !important;
    }

    .banner-slide-item.clean-banner-mode {
        background-size: contain !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
}

@media (max-width: 575.98px) {
    .hero-carousel-wrapper.clean-carousel-mode,
    .hero-carousel-wrapper:has(.clean-banner-mode),
    .banner-slide-item.clean-banner-mode {
        height: auto !important;
        min-height: unset !important;
        aspect-ratio: 1693 / 929 !important;
    }

    .banner-slide-item.clean-banner-mode {
        background-size: contain !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
}
