/* ── TABLET (768px – 991px) ── */
@media (max-width: 991.98px) {

    /* Header */
    .header-inner {
        flex-wrap: nowrap;
        height: 64px;
        padding: 0;
    }

    .header-cta {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .header-inner .logo img {
        height: 32px;
    }

    .btn-nav-join {
        font-size: 12px;
    }

    .btn-nav-member {
        padding: 7px 14px;
        font-size: 12px;
    }

    /* Navbar collapse */
    .site-navbar .navbar-collapse {
        border-top: 1px solid var(--tea);
        padding-bottom: 10px;
        max-height: 70vh;
        overflow-y: auto;
    }

    .site-navbar .navbar-nav .nav-link {
        padding: 11px 6px !important;
        border-bottom: none !important;
        border-top: 1px solid var(--tea) !important;
        width: 100%;
    }

    .site-navbar .navbar-nav .nav-link:hover,
    .site-navbar .navbar-nav .nav-link.active {
        border-bottom: none !important;
        border-top-color: var(--tea) !important;
        background: var(--beige) !important;
        padding-left: 12px !important;
    }

    .site-navbar .dropdown-menu {
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 0 0 6px 20px !important;
        background: transparent !important;
        margin-top: 0 !important;
    }

    /* Hero */
    .hero-title {
        font-size: clamp(30px, 6vw, 46px);
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-num {
        font-size: 26px;
    }

    /* Mission */
    .mission-img img {
        height: 320px;
    }

    /* Chapter tabs + panels */
    .tab-content>.tab-pane.active {
        flex-direction: column;
    }

    .chapter-img-panel {
        flex: none;
        min-height: 260px;
        position: relative;
    }

    /* Team slider — 2 per page on tablet */
    .team-card {
        flex: 0 0 calc((100% - 20px) / 2) !important;
    }

    /* About float badges */
    .float-top {
        top: -10px;
        right: -10px;
    }

    .float-bottom {
        bottom: -10px;
        left: -10px;
    }

    /* Footer CTA */
    .footer-cta-bar .d-flex {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    /* About section - stack on tablet */
    .about-section .row {
        flex-direction: column;
    }

    .about-section .col-lg-5,
    .about-section .col-lg-7 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }

    /* Mission section - stack on tablet */
    .mission-section .row {
        flex-direction: column-reverse;
    }

    .mission-section .col-lg-6 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }

    .mission-img {
        margin-bottom: 24px;
    }
}

/* ── MOBILE (< 768px) ── */
@media (max-width: 767.98px) {

    /* Header fix */
    .header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        height: 64px;
    }

    .header-inner .logo img {
        max-width: 130px;
        height: 25px;
        transform: scale(1.1);
        object-fit: contain;
    }

    .header-cta {
        display: flex;
        align-items: center;
        gap: 6px;
    }


    .btn-nav-join .login-text {
        display: none;
    }

    /* Make button circular */
    .btn-nav-join {
        width: 36px;
        height: 36px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }

    /* Globals */
    .section-pad {
        padding: 64px 0;
    }

    /* Announce bar - compact on mobile */
    .announce-bar {
        padding: 8px 12px;
        font-size: 11.5px;
    }

    .announce-bar strong {
        display: block;
        margin-bottom: 2px;
    }

    /* Header */


    /* Hero */
    .hero-section {
        min-height: 70vh;
    }

    .hero-content {
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .hero-title {
        font-size: clamp(28px, 8vw, 38px);
    }

    .hero-desc {
        font-size: 15px;
    }

    .hero-btns .btn-primary-custom,
    .hero-btns .btn-white-outline {
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
    }

    .hero-btns {
        flex-direction: column;
    }

    .hero-stats {
        gap: 18px;
        justify-content: flex-start;
    }

    .hero-stats>div {
        flex: 0 0 calc(50% - 9px);
        max-width: calc(50% - 9px);
    }

    .stat-num {
        font-size: 24px;
    }

    .stat-lbl {
        font-size: 10px;
    }

    /* Sponsor bar */
    .sponsor-divider {
        display: none;
    }

    .sponsor-label {
        text-align: center;
    }

    .sponsor-img-wrap {
        height: 70px;
    }

    /* Section titles */
    .section-title {
        font-size: clamp(24px, 7vw, 34px);
    }

    .mission-title {
        font-size: clamp(26px, 7vw, 36px);
    }

    .section-sub {
        font-size: 14px;
    }

    /* About floats — hide on small screens to avoid overflow */
    .about-float {
        display: none;
    }

    .about-mini-img {
        display: none;
    }

    /* About section */
    .about-main-img {
        aspect-ratio: 3/4;
    }

    .about-main-img img {
        object-position: center top;
    }

    .feature-card {
        padding: 14px 16px;
    }

    .feature-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .feature-text h4 {
        font-size: 13.5px;
    }

    .feature-text p {
        font-size: 12.5px;
    }

    /* Mission image */
    .mission-img img {
        height: 260px;
    }

    .trust-badge {
        font-size: 11px;
        padding: 5px 12px;
    }

    /* Chapter tabs — 2x2 grid on mobile */
    .chapter-nav-tabs {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        justify-content: center !important;
        overflow-x: visible !important;
        padding-bottom: 20px !important;
    }

    .chapter-nav-tabs .nav-item {
        flex: 0 0 calc(50% - 5px) !important;
        max-width: calc(50% - 5px) !important;
    }

    .chapter-tab-btn {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        font-size: 11px !important;
        padding: 8px 6px !important;
        white-space: normal !important;
        line-height: 1.3 !important;
        height: 100% !important;
        min-height: unset !important;
        gap: 5px !important;
    }

    .chapter-tab-btn i,
    .chapter-tab-btn svg {
        flex-shrink: 0 !important;
        font-size: 12px !important;
    }

    .tab-content>.tab-pane.active {
        flex-direction: column;
    }

    .chapter-info {
        padding: 28px 22px;
    }

    .chapter-info h3 {
        font-size: 22px;
    }

    .chapter-info p {
        font-size: 13px;
    }

    .chapter-img-panel {
        min-height: 220px;
    }

    /* Offer cards */
    .offer-card {
        padding: 22px 18px;
    }

    .offer-card h3 {
        font-size: 14px;
    }

    .offer-card p {
        font-size: 12.5px;
    }

    /* Team slider — 1 per page on mobile */
    .team-card {
        flex: 0 0 100% !important;
    }

    /* Team section */
    .team-section .section-title {
        font-size: clamp(22px, 6vw, 30px);
    }

    /* Keep slider horizontal on mobile */
    #teamSlider {
        flex-direction: row !important;
        transform: none !important;
        gap: 16px;
    }

    /* Team slider wrapper - allow horizontal scroll on mobile */
    .team-section .overflow-hidden {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .team-section .overflow-hidden::-webkit-scrollbar {
        display: none;
    }

    /* Ensure all team cards are visible */
    .team-card {
        display: flex !important;
        visibility: visible !important;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
    }

    /* Events */
    .event-img-wrap {
        height: 200px;
    }

    .event-body {
        padding: 20px 18px;
    }

    .event-body h3 {
        font-size: 18px;
    }

    .event-body p {
        font-size: 12.5px;
    }

    /* Skill cards */
    .skill-card {
        padding: 16px 14px;
    }

    .skill-text h4 {
        font-size: 13px;
    }

    /* Why join */
    .why-card {
        padding: 22px 18px;
    }

    .why-title {
        font-size: 16px;
    }

    .why-desc {
        font-size: 12.5px;
    }

    /* Video testimonials */
    .vid-card {
        aspect-ratio: 16/9;
    }

    .vid-play-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    /* FAQ */
    .faq-question {
        padding: 16px 18px;
        font-size: 14px;
    }

    .faq-answer.open {
        padding: 0 18px 16px 44px;
        font-size: 13px;
    }

    .faq-answer {
        font-size: 13px;
    }

    /* FAQ sidebar stacks below on mobile */
    .faq-sidebar {
        margin-top: 28px;
    }

    /* Footer - Updated compact footer */
    .site-footer {
        padding: 32px 0 20px;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
    }

    .footer-left,
    .footer-right {
        max-width: 100%;
    }

    .footer-left .footer-logo {
        height: 36px;
        margin-bottom: 12px;
    }

    .footer-left .footer-desc {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .footer-left .footer-addr {
        font-size: 11px;
        flex-direction: row;
        align-items: flex-start;
        gap: 6px;
    }

    .footer-right h5 {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .footer-right .footer-sub {
        font-size: 11px;
        margin-bottom: 12px;
    }

    .footer-right .btn-ygreen.btn-sm {
        padding: 8px 18px;
        font-size: 12px;
        margin-bottom: 16px;
    }

    .footer-links {
        gap: 6px 12px;
    }

    .footer-links a {
        font-size: 11px;
    }

    .footer-links .btn-attendance {
        padding: 4px 10px;
        font-size: 10px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding-top: 16px;
    }

    .footer-bottom p {
        font-size: 11px;
    }

    .social-links a {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    /* WhatsApp float */
    .wa-float {
        bottom: 18px;
        right: 18px;
        width: 48px;
        height: 48px;
        font-size: 22px;
    }

    .dir-filters-wrap {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        height: 100%;
        background: #fff;
        z-index: 1100;
        overflow-y: auto;
        transition: 0.3s;
        padding: 20px;
    }

    /* when filter opens */
    .dir-filters-wrap.show-filter {
        left: 0;
    }
}

/* ── EXTRA SMALL (< 480px) ── */
@media (max-width: 479.98px) {
    .hero-badge {
        padding: 5px 14px;
    }

    .hero-badge span {
        font-size: 10px;
    }

    .hero-stats {
        flex-wrap: wrap;
    }

    .hero-stats>div {
        flex: 0 0 calc(50% - 9px);
        max-width: calc(50% - 9px);
        margin-bottom: 8px;
    }

    .stat-num {
        font-size: 22px;
    }

    .stat-lbl {
        font-size: 11px;
    }

    /* Header CTA - completely hide secondary */


    .chapter-tab-btn {
        font-size: 11px;
        padding: 6px 12px;
    }

    .chapter-info h3 {
        font-size: 20px;
    }

    .chapter-info {
        padding: 22px 16px;
    }

    .chapter-img-panel {
        min-height: 180px;
    }

    .offer-card {
        padding: 18px 14px;
    }

    .offer-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .why-card {
        padding: 18px 14px;
    }

    .why-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .skill-card {
        padding: 14px 12px;
    }

    .skill-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .footer-cta-bar h2 {
        font-size: 15px;
    }

    .btn-ygreen {
        padding: 11px 24px;
        font-size: 13px;
    }
}

/* ── NAVBAR TOGGLER STYLE ── */
.navbar-toggler {
    border: 1.5px solid var(--tea);
    border-radius: 8px;
    padding: 6px 10px;
    color: var(--dark);
    background: transparent;
    font-size: 18px;
    line-height: 1;
    position: relative;
    /*z-index: 1050;*/
}

/* When nav is open, keep toggler fixed at navbar level */
.site-navbar .navbar-toggler[aria-expanded="true"] {
    position: fixed;
    top: 78px;
    right: 16px;
    z-index: 1060;
    background: white;
    border-color: var(--tea);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 2px rgba(70, 103, 64, .2);
    outline: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2830,43,28,0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    background-size: 100% 100%;
}

/* ── SWIPER PAGINATION DOTS (hero) ── */
.hero-swiper .swiper-pagination-bullet {
    background: rgba(255, 255, 255, .5);
    opacity: 1;
    width: 8px;
    height: 8px;
}

.hero-swiper .swiper-pagination-bullet-active {
    background: var(--ygreen);
    width: 22px;
    border-radius: 4px;
}

/* ── TOUCH DEVICES - IMPROVE TOUCH AREAS ── */
@media (hover: none) and (pointer: coarse) {

    .btn-primary-custom,
    .btn-outline-custom,
    .btn-white-outline,
    .btn-ygreen,
    .btn-nav-join,
    .btn-nav-member {
        min-height: 44px;
    }

    .faq-question {
        min-height: 52px;
    }

    .chapter-tab-btn {
        min-height: 40px;
    }

    .slider-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* ── DARK MODE SUPPORT (optional) ── */
@media (prefers-color-scheme: dark) {
    /* Can add dark mode styles here if needed */
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-swiper .swiper-slide {
        transition: none !important;
    }

    #teamSlider {
        transition: none !important;
    }
}

/* ── PRINT ── */
@media print {

    .site-header,
    .site-navbar,
    .wa-float,
    .announce-bar {
        display: none !important;
    }

    .hero-section {
        min-height: auto;
    }

    .s4b-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}