/* ============================================
   asemahaftom3 — Mobile-first responsive layer
   ============================================ */

@media (max-width: 991.98px) {
    :root {
        --nav-height: 60px;
        --section-gap: 2rem;
    }

    body.nav-open {
        overflow: hidden;
    }

    .container,
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* ---- Header / Nav ---- */
    .nav-v3 .navbar-inner {
        gap: 0.35rem;
    }

    .nav-v3 .navbar-runy-brand {
        order: 1;
        flex: 0 1 auto;
        min-width: 0;
    }

    .nav-v3 .navbar-runy-brand .imgLogo {
        max-height: 42px;
        max-width: 130px;
        object-fit: contain;
    }

    .navbar-auth-slot {
        order: 2;
        max-width: calc(100% - 170px);
    }

    .nav-v3 .navbar-toggler {
        order: 3;
        border: 2px solid var(--brand-primary);
        padding: 0.35rem 0.55rem;
        border-radius: var(--radius-sm);
    }

    .nav-v3 .navbar-toggler-icon {
        filter: none;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23122340' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    .nav-v3 .navbar-collapse {
        position: fixed;
        top: var(--nav-height);
        right: 0;
        left: 0;
        bottom: 0;
        background: var(--surface);
        padding: 1rem 1.25rem 6rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 1040;
        box-shadow: 0 12px 40px rgba(18, 35, 64, 0.15);
        border-top: 3px solid var(--brand-accent);
    }

    .nav-v3 .navbar-collapse:not(.show) {
        display: none !important;
    }

    .nav-v3 .navbar-nav {
        width: 100%;
        gap: 0;
    }

    .nav-v3 .nav-menu {
        width: 100%;
        border-bottom: 1px solid var(--border-soft);
    }

    .nav-v3 .nav-menu .nav-link {
        padding: 0.85rem 0.5rem !important;
        font-size: 1rem !important;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
    }

    .nav-v3 .nav-menu a::after {
        display: none;
    }

    .nav-v3 .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        border: none;
        box-shadow: none;
        background: var(--surface-muted);
        margin: 0 0 0.5rem;
        padding: 0.25rem 0.5rem;
        border-radius: var(--radius-sm);
        display: none !important;
    }

    .nav-v3 .dropdown-menu.mobile-open {
        display: block !important;
    }

    .nav-v3 .dropdown-toggle.mobile-open {
        color: var(--brand-accent) !important;
        background: var(--brand-accent-light);
        border-radius: var(--radius-sm);
    }

    .nav-v3 .dropdown-item {
        padding: 0.65rem 0.75rem;
        font-size: 0.9rem;
    }

    .nav-v3 .dropdown-toggle.mobile-open svg path {
        fill: var(--brand-accent);
    }

    .nav-v3 .dropdown-toggle.mobile-open svg {
        transform: rotate(180deg);
        transition: transform var(--transition-base);
    }

    /* ---- Section headers ---- */
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding-bottom: 0.75rem;
        border-bottom: 2px solid var(--brand-accent-light);
        margin-bottom: 1.25rem;
    }

    .section-header__title {
        font-size: 1.2rem;
        padding-right: 0.75rem;
        border-right: 4px solid var(--brand-accent);
    }

    .section-header__action {
        width: 100%;
    }

    .section-header__action .btn-brand,
    .section-header__action a {
        display: block;
        width: 100%;
    }

    .section-header__action .btn-brand {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    /* ---- Destination grid ---- */
    .destination-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.65rem !important;
    }

    .card-destination,
    .popular-group .module {
        min-height: 130px !important;
        aspect-ratio: 4 / 3 !important;
        border-radius: var(--radius-md) !important;
    }

    .card-destination__info span,
    .module-info span {
        font-size: 0.85rem;
    }

    /* ---- Tour cards ---- */
    .new-tour {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .new-tour > .col-md-4,
    .card-tour {
        width: 100%;
        max-width: 100%;
        margin: 0 !important;
    }

    .card-tour__image {
        height: 180px;
    }

    .card-tour__title {
        font-size: 0.9rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* ---- Quick access ---- */
    .quick-access {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    .quick-access > a {
        width: 100% !important;
        padding: 0 !important;
    }

    .quick-access .module {
        min-height: 200px !important;
    }

    .quick-access .module strong {
        font-size: 1.25rem !important;
    }

    /* ---- Banner ---- */
    .banner-hero {
        min-height: 220px !important;
        border-radius: var(--radius-md) !important;
    }

    .banner-hero__title {
        font-size: 1.35rem !important;
    }

    .banner-hero__content {
        padding: 1.25rem !important;
        text-align: center !important;
    }

    /* ---- App promo ---- */
    .app-promo {
        padding: 1.25rem !important;
        text-align: center;
    }

    .app-promo .border-end {
        border: none !important;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
        border-bottom: 1px solid var(--border-soft) !important;
    }

    .app-promo__title {
        font-size: 1.1rem !important;
    }

    /* ---- Social CTA ---- */
    .social-cta > div {
        flex-direction: column !important;
        text-align: center;
        gap: 1rem !important;
        padding: 1.25rem !important;
    }

    .social-cta span {
        font-size: 0.95rem !important;
        line-height: 1.6;
    }

    /* ---- Blog swiper ---- */
    swiper-container.slide-content {
        --swiper-slides-per-view: 1.15;
        padding-bottom: 2rem !important;
    }

    .article figure img {
        height: 160px;
    }

    /* ---- Footer ---- */
    .runy-footer .row.flex-wrap > div {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .runy-footer ul {
        padding: 0;
        list-style: none;
    }

    .runy-footer .footer-text img {
        margin: 0 auto 1rem;
        display: block;
    }

    .runy-footer .row.flex-row {
        justify-content: center !important;
        gap: 0.5rem;
    }

    /* ---- Slider ---- */
    #slideshow {
        margin-bottom: 0;
    }

    #slideshow .imgBoxServic,
    #carouselRunyControls .carousel-item img {
        max-height: 220px;
        object-fit: cover;
        width: 100%;
    }

    #carouselRunyControls .carousel-control-prev,
    #carouselRunyControls .carousel-control-next {
        width: 12%;
    }

    /* ---- FAQ ---- */
    .runy-FAQ .accordion-button {
        font-size: 0.9rem;
        padding: 0.85rem 1rem;
    }

    /* ---- Buttons touch targets ---- */
    .btn-brand,
    .btn-more,
    .btn-accent,
    .btn-search-hotels {
        min-height: 44px;
    }
}

@media (max-width: 575.98px) {
    .destination-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .home-section--alt {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        border-radius: 0;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .destination-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .new-tour {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .new-tour > .col-md-4 {
        width: 100%;
        flex: none;
        max-width: 100%;
    }
}
