/* ============================================================
   home.css — Estilos exclusivos de la portada (front-page)
   Machupicchu Great Travel V1
   CSS nativo anidado (CSS Nesting — W3C estándar)
   ============================================================ */


/* ============================================================
   1. HERO HOME — Slider de fade
   ============================================================ */

/* Contenedor externo */
.hero-home {
    position: relative;
    width: 100%;
    height: 80rem;
    overflow: hidden;
    z-index: 1;

    @media (max-width: 1024px) { height: 560px; }
    @media (max-width: 768px)  { height: 100svh; }

    /* ── Ola decorativa al fondo ───────────────────── */
    /*&::after {
        content: '';
        position: absolute;
        bottom: -66rem;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        height: 80rem;
        background-image: url('../images/backgrounds/wave-hero.svg');
        background-repeat: no-repeat;
        background-size: cover;
        pointer-events: none;
        z-index: 2;
    }*/
}

/* ── Cada slide ────────────────────────────────────────── */
.hero-home__slide {
    position: absolute;
    inset: 0;
    background-color: var(--color-secondary);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;

    /* Estado invisible (por defecto todos menos el activo) */
    opacity: 0;
    transition: opacity 0.7s ease;
    pointer-events: none;
    z-index: 1;

    /* Slide activo */
    &.hero-home__slide--active {
        opacity: 1;
        pointer-events: auto;
        z-index: 2;
    }

    /* Slide saliendo (clase añadida por JS justo antes del fade-out) */
    &.hero-home__slide--leaving {
        opacity: 0;
        transition: opacity 0.5s ease;
        z-index: 2;
    }
}

/* Overlay oscuro sobre el fondo */
.hero-home__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(26, 58, 92, 0.30) 0%,
        rgba(26, 58, 92, 0.10) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* ── Layout interno del slide ──────────────────────────── */
.hero-home__slide-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10rem 6vw 4rem;
    gap: 2rem;
    
    @media (max-width: 1024px) { padding: 100px 4vw 32px; }
    @media (max-width: 768px) {

        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 80px 24px 32px;
        gap: 0;   
        
    }
}

/* ── Textos laterales ──────────────────────────────────── */
.hero-home__text {
    flex: 0 0 auto;
    width: clamp(160px, 22%, 280px);
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.5vw, 4.2rem);
    font-weight: 100;
    color: var(--color-white);
    line-height: 1.15;
    text-shadow: 0 2px 14px rgba(0,0,0,0.40);
    /* white-space: pre-line; */

    /* Animación de entrada */
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease 0.5s, transform 0.6s ease 0.5s;
    

    .hero-home__slide--active & {
        opacity: 1;
        transform: translateY(0);
    }

    &.hero-home__text--right {
        text-align: left;
    }

    &.hero-home__text--left{
        text-align: right;
    }

    @media (max-width: 768px) {
        width: 100%;
        text-align: center !important;
        font-size: clamp(1.6rem, 70vw, 3.4rem);
        order: 0; /* left arriba */

        &.hero-home__text--right {
            order: 2; /* right abajo */
        }
    }
}

/* ── Imagen central ────────────────────────────────────── */
.hero-home__center {
    flex: 1 1 auto;
    display: flex;
    /* align-items: flex-end; */
    justify-content: center;
    max-width: 46rem;
    /* align-self: flex-end; */

    /* Animación de entrada */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.5s, transform 0.6s ease 0.5s;
    
    
    
    

    .hero-home__slide--active & {
        opacity: 1;
        transform: translateY(0);
    }

    @media (max-width: 768px) {
        max-width: 88%;
        order: 1;
        align-self: center;
        flex: none;
    }
}

.hero-home__center-img {
    display: block;
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
    object-position: bottom center;

    @media (max-width: 768px) { max-height: 100%; }
}

/* ── Puntos de navegación ──────────────────────────────── */
.hero-home__dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
    align-items: center;
}

.hero-home__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.7);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s, border-color 0.3s;

    &.hero-home__dot--active {
        background: var(--color-white);
        border-color: var(--color-white);
    }
}


/* ============================================================
   2. SLIDER DE ATRACTIVOS
   ============================================================ */
.hero-tours-slider-wrap {
    position: relative;
    z-index: 1;
    margin-top: -18rem;
    /* padding-bottom: 60px; */

    /* ── Ola decorativa al fondo ───────────────────── */
    &::after {
        content: '';
        position: absolute;
        top: 0rem;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        height: 80rem;
        background-image: url('../images/backgrounds/wave-hero.svg');
        background-repeat: no-repeat;
        background-size: cover;
        pointer-events: none;
        z-index: 0;
    }
    & .container { position: relative; }

    @media (max-width: 1024px) {
        margin-top: -120px; 
        &::after {
            top: -11rem;
        }
    }
    @media (max-width: 768px)  { margin-top: 0; padding-top: 24px; }
}

.hero-tours-slider {
    overflow: hidden;
    padding: .4rem 0 .8rem;

    & .swiper-slide { height: auto; }

    & .swiper-button-prev,
    & .swiper-button-next {
        color: var(--color-white);
        background: var(--color-secondary);
        width: 36px;
        height: 36px;
        border-radius: 50%;
        top: 50%;

        &::after { font-size: 14px; font-weight: 700; }
    }
}

.hero-tour-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: #181F28;
    border-radius: var(--border-radius-md);
    padding: 1rem .5rem .5rem;
    height: 38rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
    cursor: pointer;
    
    &:hover { transform: translateY(-.4rem); }

    & .hero-tour-card__header {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 0 5px;
        flex-shrink: 0;
    }

    & .hero-tour-card__info {
        flex: 1;
        min-width: 0;
    }

    & .hero-tour-card__name {
        font-family: var(--font-heading);
        font-size: 2.4rem;
        font-weight: 300;
        color: var(--color-white);
        text-transform: uppercase;
        line-height: 1;
        margin: 0 0 4px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    & .hero-tour-card__cat {
        font-size: 1.2rem;
        line-height: 1.6rem;
        color: #8D9296;
        margin: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    & .hero-tour-card__book-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
        background-color: #80A931;
        color: var(--color-white);
        border-radius: var(--border-radius-md);
        padding: 6px;
        flex-shrink: 0;
        font-size: 0.9rem;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.03em;

        & svg {
            padding-left: .4rem;
            width: 2.6rem;
        }
    }

    & .hero-tour-card__image-wrap {
        position: relative;
        flex: 1;
        border-radius: var(--border-radius-md);
        overflow: hidden;
        min-height: 0;

        & .hero-tour-card__image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        & .hero-tour-card__image-footer {
            position: absolute;
            bottom: 5px;
            left: 5px;
            right: 5px;
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
        }
    }

    & .hero-tour-card__tags {
        display: flex;
        gap: 5px;
        flex-wrap: wrap;
    }

    & .hero-tour-card__tag {
        padding: 6px 10px;
        border-radius: var(--border-radius-md);
        font-size: 1.2rem;
        white-space: nowrap;

        &.hero-tour-card__tag--dark  { background-color: #181F28; color: var(--color-white); }
        &.hero-tour-card__tag--light { background-color: var(--color-white); color: var(--color-dark); }
    }

    & .hero-tour-card__arrow {
        display: flex;
        flex-shrink: 0;
        transition: transform 0.25s ease;
    }

    &:hover .hero-tour-card__arrow {
        transform: rotate(45deg);
    }
}


/* ============================================================
   3. SECCIÓN EMBÁRCATE / ABOUT
   ============================================================ */
.section-about {
    padding: 8rem 0 1rem;
    background: none;
    position: relative;
    z-index: 3;

    h1 {
        position: relative;
        font-weight: 300;
        font-size: 4.2rem;
        line-height: 100%;
        color: var(--color-nonary);
        padding: 0 16rem;
        /* overflow-x: hidden; */

        &::before,
        &::after {
            content: '';
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 14.8rem;
            height: 7.8rem;
            background-repeat: no-repeat;
            background-size: contain;
            pointer-events: none;
        }

        &::before {
            left: 0;
            background-image: url('../images/icons/ribbon-left.svg');
            background-position: left center;
        }

        &::after {
            right: 0;
            background-image: url('../images/icons/ribbon-right.svg');
            background-position: right center;
        }

        @media (max-width: 768px) {
            padding: 0 7rem;

            &::before, &::after { display: none; }
        }

        @media (max-width: 480px) {
            padding: 0;
            &::before, &::after { display: none; }
        }

        & strong {
            font-weight: 500;
            color: var(--color-septenary);
            text-transform: uppercase;
        }
    }
    
    & .section-about__inner {
        max-width: 108rem;
        margin: 0 auto;
        text-align: center;
    }

    & .section-about__heading {
        font-family: var(--font-heading);
        font-size: clamp(1.8rem, 3.5vw, 2.8rem);
        font-weight: 700;
        color: var(--color-secondary);
        line-height: 1.2;
        margin-bottom: 1.5rem;

        & .section-about__heading-accent {
            color: var(--color-accent);
            font-style: italic;
        }
    }

    & .section-about__text p {
        font-weight: 300;
        font-size: 1.6rem;
        line-height: 2.6rem;
        color: #1B1B1B;
        max-width: 87rem;
        margin: 4rem auto 2rem;
    }

    & .section-about__logos {
        overflow: hidden;
        margin-top: 40px;
        padding: 24px 0;
        /* border-top: 1px solid #eee; */
        /* border-bottom: 1px solid #eee; */
        
        

        /* Pausa al hover sobre el contenedor */
        &:hover .section-about__logos-track { animation-play-state: paused; }
    }

    & .section-about__logos-track {
        display: flex;
        align-items: center;
        gap: 60px;
        width: max-content;
        animation: mgt-marquee 28s linear infinite;
    }

    & .section-about__logo-item img {
        height: 5rem;
        width: auto;
        max-width: 14rem;
        object-fit: contain;
        /* filter: grayscale(100%); */
        /* opacity: 0.7; */
        transition: filter 0.2s, opacity 0.2s;
        flex-shrink: 0;

        &:hover { filter: grayscale(0%); opacity: 1; }
    }
}

@keyframes mgt-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}


/* ============================================================
   4. HOME TOUR CARD (Paquetes / Trekkings)
   ============================================================ */
.home-tour-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: var(--color-nonary);
    border-radius: var(--border-radius-md);
    padding: 10px 5px 5px;
    height: 350px;
    overflow: hidden;

    &:hover .home-tour-card__image { transform: scale(1.04); }

    & .home-tour-card__header {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 0 5px;
        flex-shrink: 0;
    }

    & .home-tour-card__meta { flex: 1; min-width: 0; }

    & .home-tour-card__title {
        font-family: var(--font-heading);
        font-size: 1.5rem;
        font-weight: 300;
        color: var(--color-white);
        text-transform: uppercase;
        line-height: 1;
        margin: 0 0 4px;
       
        overflow: hidden;
        text-overflow: ellipsis;
    }

    & .home-tour-card__cat { font-size: 0.75rem; color: #8D9296; margin: 0; }

    & .home-tour-card__reserve-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
        background-color: var(--color-nonary);
        color: var(--color-white);
        border-radius: var(--border-radius-md);
        padding: 6px;
        flex-shrink: 0;
        font-size: 0.9rem;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        
        & svg {
            padding-left: .4rem;
            width: 2.6rem;
        }

        &:hover { background-color: #6a9025; color: var(--color-white); }
    }

    & .home-tour-card__image-link { flex: 1; display: block; min-height: 0; }

    & .home-tour-card__image-wrap {
        position: relative;
        height: 100%;
        border-radius: var(--border-radius-md);
        overflow: hidden;

        & .home-tour-card__image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            transition: transform 0.3s ease;
        }

        & .home-tour-card__image-footer {
            position: absolute;
            bottom: 5px;
            left: 5px;
            right: 5px;
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
        }
    }

    & .home-tour-card__tags { display: flex; gap: 5px; flex-wrap: wrap; }

    & .home-tour-card__tag {
        padding: 6px 10px;
        border-radius: var(--border-radius-md);
        font-size: 1.2rem;
        white-space: nowrap;

        &.home-tour-card__tag--dark  { background-color: #181F28; color: var(--color-white); }
        &.home-tour-card__tag--light { background-color: var(--color-white); color: var(--color-dark); }
    }

    & .home-tour-card__arrow {
        display: flex;
        flex-shrink: 0;
        border-radius: 50%;
        background: var(--color-nonary);
    }
    &:hover .home-tour-card__arrow {
        transform: rotate(45deg);
    }
}


/* ============================================================
   5. SECCIONES DE TOURS (Paquetes + Trekkings)
   ============================================================ */
.section-tours {
    padding: 60px 0;
    /* background: var(--color-white); */
    

    &.section-tours--alt {/* background: var(--color-light); */position: relative;z-index: 2;}

    & .section-tours__heading-row {
        display: flex;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 32px;
    }

    & .section-tours__heading-icon {
        flex-shrink: 0; 
        padding-top: 2px;

        & svg {
            margin-top: .5rem;
        }
    }

    & .section-tours__eyebrow {
        font-family: var(--font-heading);
        font-size: 2.4rem;
        font-weight: 300;
        color: var(--color-nonary);
        margin: 0 0 6px;
        text-transform: uppercase;

        & strong {
            font-weight: 600;
        }
    }
    
    &#paquetes-populares {
        & .section-tours__eyebrow strong {
            color: var(--color-secondary);
        }
        & .home-tour-card__reserve-btn {
            background: var(--color-secondary);
        }
        & .home-tour-card__arrow {
            background: var(--color-secondary);
        }
    }
    
    &#trekkings {
        & .section-tours__eyebrow strong{
            color: var(--color-quinary);
        }
        & .home-tour-card__reserve-btn {
            background: var(--color-quinary);
        }
        & .home-tour-card__arrow {
            background: var(--color-quinary);
        }
    }
    
    & .section-tours__description {
        font-size: 1.6rem;
        font-weight: 300;
        color: #1b1b1b;
        max-width: 52rem;
        margin: 0;
        line-height: 125%;
    }

    & .tours-grid--home {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;

        @media (max-width: 1024px) { grid-template-columns: repeat(3, 1fr); }
        @media (max-width: 768px)  { grid-template-columns: repeat(2, 1fr); }
        @media (max-width: 480px)  { grid-template-columns: 1fr; }

        /* Aplicar el mismo estilo visual que .hero-tour-card */
        & .home-tour-card {
            background-color: #181F28;
            border-radius: var(--border-radius-md);
            padding: 1rem .5rem .5rem;
            height: 38rem;
            transition: transform 0.2s ease;

            &:hover { transform: translateY(-.4rem); }
        }

        & .home-tour-card__title {
            font-size: 2.4rem;
            font-weight: 300;
            text-transform: uppercase;
            line-height: 1;
            margin: 0 0 4px;
        }

        & .home-tour-card__cat { font-size: 1.2rem; color: #8D9296; }
    }

    & .section-tours__more { margin-top: 32px; text-align: center; }

    & .swiper-button-prev,
    & .swiper-button-next {
        color: var(--color-white);
        background: var(--color-secondary);
        width: 36px;
        height: 36px;
        border-radius: 50%;
        top: 50%;

        &::after { font-size: 14px; font-weight: 700; }
    }
}


/* ============================================================
   6. SLIDER GALERÍA — tarjetas verticales con rotación
   ============================================================ */
.section-gallery {
    /* padding: 6rem 0 0; */
    overflow: hidden;
}

.section-gallery__slider {
    overflow: visible !important; /* las tarjetas rotadas deben verse fuera del swiper */
    padding: 6em 0 5.5rem;
}

.gallery-slide {
    width: 220px;
    height: 320px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    transform-origin: bottom center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    & img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        pointer-events: none;
    }

    &:hover {
        transform: rotate(0deg) scale(1.04) translateY(-8px) !important;
        box-shadow: 0 16px 48px rgba(0,0,0,0.28);
        z-index: 10;
    }
}

/* Rotaciones alternadas por posición — patrón de 7 que se repite */
.section-gallery__slider .swiper-slide:nth-child(7n+1) .gallery-slide { transform: rotate(-6deg); }
.section-gallery__slider .swiper-slide:nth-child(7n+2) .gallery-slide { transform: rotate(-3deg); }
.section-gallery__slider .swiper-slide:nth-child(7n+3) .gallery-slide { transform: rotate(-1deg); }
.section-gallery__slider .swiper-slide:nth-child(7n+4) .gallery-slide { transform: rotate(0deg); }
.section-gallery__slider .swiper-slide:nth-child(7n+5) .gallery-slide { transform: rotate(2deg); }
.section-gallery__slider .swiper-slide:nth-child(7n+6) .gallery-slide { transform: rotate(4deg); }
.section-gallery__slider .swiper-slide:nth-child(7n+7) .gallery-slide { transform: rotate(6deg); }

@media (max-width: 768px) {
    .gallery-slide { width: 160px; height: 240px; }
}


/* ============================================================
   7. TESTIMONIOS
   ============================================================ */
.section-testimonials {
    padding: 60px 0;
    background: var(--color-white);

    & .section-testimonials__placeholder {
        text-align: center;
        padding: 40px;
        border: 2px dashed #ddd;
        border-radius: var(--border-radius-lg);
        color: var(--color-gray);
    }
}


/* ============================================================
   8. PREGUNTAS FRECUENTES
   ============================================================ */
.section-faq {
    padding: 60px 0 80px;
    background: var(--color-white);
    position: relative;
    z-index: 0;
    
    &::before {
        content: '';
        position: absolute;
        top: -50rem;
        left: 0;
        right: 0;
        width: 100%;
        height: 140rem;
        background-image: url('../images/backgrounds/vinicunca-background.png');
        background-repeat: no-repeat;
        background-size: cover;
        pointer-events: none;
        z-index: 0;
    }
    
    & .section-faq__title {
        font-family: var(--font-heading);
        font-size: clamp(2.4rem, 3vw, 2rem);
        font-weight: 400;
        color: var(--color-white);
        text-align: center;
        margin-bottom: 2rem;
        text-transform: uppercase;
        position: relative;

        @media (max-width: 480px) { font-size: 1.4rem; }
    }
}

.faq-accordion {
    max-width: 77rem;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.80);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 18px -6px rgba(24, 39, 75, 0.12), 0 12px 42px -4px rgba(24, 39, 75, 0.12);
    overflow: hidden;
    backdrop-filter: blur(3.5px);
    position: relative;
    z-index: 4;

    & .faq-accordion__item {
        border-bottom: 1px solid #C9CAD4;

        &:last-child { border-bottom: none; }
    }

    & .faq-accordion__trigger {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 18px 20px;
        background: none;
        border: none;
        cursor: pointer;
        text-align: left;
        font-family: var(--font-body);
        color: var(--color-dark);
        transition: background 0.15s;

        & span {
            font-weight: 400;
        }
        &:hover              { background: #fafafa; }
        &[aria-expanded="true"] {
            background: #fafafa;

            & .faq-accordion__icon-plus  { display: none; }
            & .faq-accordion__icon-minus { display: block; }
        }
    }

    & .faq-accordion__question {
        font-size: 1.6rem;
        font-weight: 300;
        line-height: 1.4;
        flex: 1;
    }

    & .faq-accordion__icon { flex-shrink: 0; }

    & .faq-accordion__icon-minus { display: none; }

    & .faq-accordion__body {
        overflow: hidden;
        transition: height 0.25s ease;
        background: var(--color-white);
        &[hidden] { display: none; }
    }

    & .faq-accordion__answer {
        padding: 1rem 2rem 1.8rem;
        font-size: 1.5rem;
        font-weight: 300;
        color: #555;
        line-height: 1.7;
    }
}

