/* Magic Journeys — performance + UX overrides (keeps theme look) */

/* Faster preloader */
.preloader {
    transition: opacity .35s ease, visibility .35s ease;
}
.preloader.is-done {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Skip link */
.mj-skip {
    position: absolute;
    left: -999px;
    top: 0;
    z-index: 10000;
    padding: .75rem 1rem;
    background: #0b3d91;
    color: #fff;
    border-radius: 0 0 .5rem 0;
    font-weight: 600;
}
.mj-skip:focus {
    left: 0;
}

/* Sticky WhatsApp CTA */
.mj-wa {
    position: fixed;
    right: 1.1rem;
    bottom: 5.5rem;
    z-index: 999;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .7rem 1rem .7rem .75rem;
    border-radius: 999px;
    background: #25d366;
    color: #fff !important;
    font-weight: 600;
    font-size: .9rem;
    box-shadow: 0 10px 28px rgba(37, 211, 102, .35);
    text-decoration: none !important;
    transition: transform .2s ease, box-shadow .2s ease;
}
.mj-wa:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(37, 211, 102, .45);
    color: #fff !important;
}
.mj-wa i {
    font-size: 1.35rem;
}
.mj-wa span {
    max-width: 9rem;
    white-space: nowrap;
}
@media (max-width: 575px) {
    .mj-wa span { display: none; }
    .mj-wa { padding: .85rem; bottom: 5rem; }
}

/* Booking bar polish */
.booking-sec .booking-form {
    border-radius: 1rem;
    box-shadow: 0 12px 40px rgba(15, 23, 42, .08);
}
.booking-sec .th-btn {
    min-width: 8.5rem;
}

/* Cards / media */
.tour-card_img img,
.destination-img img,
.category-card .box-img img,
.blog-img img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
    height: auto;
    background: #eef2f6;
}

/* —— Hero slider: altura fija + sin solapes —— */
.hero-2 {
    height: auto !important;
    min-height: 0;
    overflow: visible;
    margin-bottom: 0;
    z-index: 4;
}

.hero-2 .hero-slider-2 {
    position: relative;
    height: clamp(520px, 78vh, 740px);
    overflow: hidden;
    border-radius: 24px;
}

.hero-2 .hero-slider-2 .swiper-wrapper,
.hero-2 .hero-slider-2 .swiper-slide,
.hero-2 .hero-slider-2 .hero-inner {
    height: 100%;
}

.hero-2 .hero-slider-2 .hero-inner {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
}

.hero-2 .hero-slider-2 video,
.hero-2 .hero-slider-2 .hero-inner > img,
.hero-2 .hero-slider-2 .hero-media {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
    border-radius: 24px;
    display: block;
}

.hero-2 .hero-style2 {
    padding-top: clamp(120px, 18vh, 200px);
    padding-bottom: 140px;
}

/* Flechas / paginación por encima de las tarjetas */
.hero-2 .th-swiper-custom {
    top: auto !important;
    bottom: 200px !important;
    right: 28px !important;
    width: auto !important;
    max-width: none;
    z-index: 30 !important;
    gap: 16px;
}

.hero-2 .hero-arrow {
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
}

.hero-2 .scroll-down {
    bottom: 28px !important;
    left: 6% !important;
    z-index: 30 !important;
    height: auto;
}

/* Thumbs con altura uniforme */
.heroThumbs,
.heroThumbs.style2 {
    bottom: 20px !important;
    right: 20px !important;
    max-width: min(720px, calc(100% - 40px));
    z-index: 20;
}

.heroThumbs .swiper-slide {
    height: auto;
}

.heroThumbs .hero-inner {
    height: 100%;
}

.hero-card {
    height: 148px;
    align-items: stretch;
    box-sizing: border-box;
}

.hero-card .hero-img {
    flex: 0 0 120px;
    max-width: 120px;
    height: 100%;
    min-height: 0;
}

.hero-card .hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: auto;
}

.hero-card_content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    min-height: 0;
}

.hero-card .box-title {
    font-size: 14px !important;
    line-height: 1.25 !important;
    margin-bottom: 4px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-card_price {
    font-size: 14px !important;
    line-height: 1.3 !important;
    margin: 0;
}

.hero-card .th-btn {
    margin-top: auto !important;
    align-self: flex-start;
    padding: 6px 18px !important;
}

/* Categorías / booking no tapan el hero */
.category-area {
    margin-top: 0 !important;
    padding-top: 90px !important;
    position: relative;
    z-index: 1;
}

.booking-sec {
    position: relative;
    z-index: 2;
}

.booking-sec .booking-form,
.booking-form {
    margin-top: 0 !important;
}

@media (max-width: 1199px) {
    .hero-2 .th-swiper-custom {
        bottom: 24px !important;
        right: 16px !important;
    }
    .hero-2 .scroll-down {
        display: none !important;
    }
}

/* —— Paquetes: coverflow original (centro nítido, laterales blur) —— */
.mj-packages {
    padding: 10px 0 30px;
}

.mj-packages-slider.destination-slider {
    overflow: visible;
    padding: 10px 0 20px;
}

.mj-packages-slider .swiper-slide {
    width: 430px;
    max-width: 86vw;
    border-radius: 24px;
    filter: blur(4px);
    -webkit-filter: blur(4px);
    transition: filter .45s ease;
}

.mj-packages-slider .swiper-slide.swiper-slide-active {
    filter: none !important;
    -webkit-filter: none !important;
    z-index: 3;
}

.mj-packages-slider .destination-box {
    border-radius: 24px;
    overflow: hidden;
}

.mj-packages-slider .destination-img {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
}

.mj-packages-slider .destination-img img {
    width: 100% !important;
    max-width: 430px !important;
    height: 380px !important;
    object-fit: cover;
    border-radius: 24px;
    filter: brightness(0.72);
}

.mj-packages-slider .destination-content {
    visibility: hidden;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity .35s ease, transform .35s ease, visibility .35s ease;
}

.mj-packages-slider .swiper-slide-active .destination-content {
    visibility: visible !important;
    opacity: 1 !important;
    transform: scale(1) !important;
}

.mj-packages-slider .box-title {
    margin-bottom: 2px;
}

.mj-packages-slider .box-title a {
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.mj-packages-slider .destination-subtitle {
    display: block;
    color: #fff;
    text-transform: lowercase;
    margin-bottom: 14px;
}

.mj-packages-slider .th-btn.style2 {
    color: #fff;
    border: 1px solid #fff;
    background: transparent;
}

.mj-packages-slider .th-btn.style2:hover,
.mj-packages-slider .th-btn.style2:focus,
.mj-packages-slider .th-btn.style2:focus-visible {
    color: #111 !important;
    border-color: #fff;
    background: transparent;
}

.mj-packages-slider .th-btn.style2:hover:before,
.mj-packages-slider .th-btn.style2:focus:before {
    background-color: #fff;
}

.mj-packages-slider .th-btn.style2:hover:after,
.mj-packages-slider .th-btn.style2:focus:after,
.mj-packages-slider .th-btn.style2:hover.th-icon:after,
.mj-packages-slider .th-btn.style2:focus.th-icon:after {
    background-color: #111 !important;
}

@media (max-width: 575px) {
    .mj-packages-slider .swiper-slide {
        width: 300px;
        filter: blur(2px);
    }
    .mj-packages-slider .destination-img img {
        height: 300px !important;
        max-width: 100% !important;
        border-radius: 18px;
    }
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
.th-btn:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Tour gallery hover (moved from inline) */
.tour-gallery-container {
    position: relative;
    overflow: hidden;
    height: 300px;
}
.tour-gallery-container .main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .45s ease, transform .45s ease;
}
.gallery-grid-wrapper {
    position: absolute;
    inset: 0;
    display: flex;
    opacity: 0;
    transition: opacity .45s ease;
}
.gallery-grid-item {
    flex: 1;
    overflow: hidden;
    transform: scaleX(0);
    transition: transform .55s cubic-bezier(.68, -.55, .265, 1.55);
}
.gallery-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.15);
    transition: transform .55s ease;
}
.gallery-item-2 { transition-delay: .08s; }
.gallery-item-3 { transition-delay: .16s; }
.tour-box-gallery:hover .main-image {
    opacity: 0;
    transform: scale(1.08);
}
.tour-box-gallery:hover .gallery-grid-wrapper { opacity: 1; }
.tour-box-gallery:hover .gallery-grid-item { transform: scaleX(1); }
.tour-box-gallery:hover .gallery-grid-item img { transform: scale(1); }
@media (max-width: 767px) {
    .tour-gallery-container { height: 240px; }
    .gallery-grid-wrapper { flex-direction: column; }
    .gallery-grid-item { transform: scaleY(0); }
    .tour-box-gallery:hover .gallery-grid-item { transform: scaleY(1); }
}

/* Empty / soft states */
.mj-empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: #64748b;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .preloader { display: none !important; }
}
