/* ============================================
   main.css — Estilos principales del tema
   Machupicchu Great Travel V1
   CSS nativo anidado (CSS Nesting — W3C estándar)
   ============================================ */


/* ============================================
   BOTONES
   ============================================ */
   .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 400;
    border-radius: var(--border-radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;

&:hover  { transform: translateY(-1px); }
&:active { transform: translateY(0); }

&.btn--primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);

    &:hover {
        background-color: var(--color-primary-dark);
        border-color: var(--color-primary-dark);
        color: var(--color-white);
    }
}

&.btn--secondary {
    background-color: var(--color-secondary);
    color: var(--color-white);
    border-color: var(--color-secondary);
}
   
&.btn--quinary {
    background-color: var(--color-quinary);
    color: var(--color-white);
    border-color: var(--color-quinary);
}
   
&.btn--outline {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);

    &:hover {
        background-color: var(--color-primary);
        color: var(--color-white);
    }
}

&.btn--white {
    color: var(--color-white);
    border-color: var(--color-white);

    &:hover {
        background-color: var(--color-white);
        color: var(--color-secondary);
    }
}

&.btn--whatsapp {
    background-color: #25D366;
    color: var(--color-white);
    border-color: #25D366;
}

&.btn--sm { padding: 0.5rem 1.25rem; font-size: 0.875rem; }
&.btn--lg { padding: 1rem 2.5rem; font-size: 1.1rem; }
}


/* ============================================
TOPBAR
============================================ */
.topbar {
background-color: var(--color-secondary);
color: var(--color-white);
font-size: 0.85rem;

& .topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

& .topbar__contact {
    display: flex;
    gap: 1.5rem;
}

& .topbar__item {
    color: var(--color-white);
    opacity: 0.9;

    &:hover { opacity: 1; }
}
}


/* ============================================
LAYOUT: HEADER
============================================ */
.site-header {
position: sticky;
top: 0;
z-index: 1000;
background-color: var(--color-white);
box-shadow: var(--shadow-sm);
transition: background var(--transition-base);

& .site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

& .site-header__logo {
    display: flex;
    justify-content: center;
    
    & img  { 
        height: 6rem; 
        width: auto; 
    }

    & .site-header__logo-text {
        font-family: var(--font-heading);
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--color-secondary);
        text-decoration: none;
    }

    @media (max-width: 900px) { justify-content: center; }
    @media (max-width: 480px) { & img { height: 6rem; } }
}

&.site-header--transparent {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.90) 0%, rgba(255, 255, 255, 0.00) 100%);
    position: absolute;
    width: 100%;
    box-shadow: none;

    & .site-header__inner {
        align-items: flex-start;
        padding-top: 1rem;
        padding-bottom: 3rem;
    }
    
    & .site-header__logo img {
        height: 7.3rem; 
    }
}

&.site-header--scrolled {
    & .nav-menu li a        { color: var(--color-dark); }
    & .nav-menu li a:hover  { color: var(--color-primary); }
    & .menu-toggle__bar     { background: var(--color-dark); }
}




& .site-header__nav {
    display: flex;
    align-items: center;

    &.site-header__nav--left  { justify-content: flex-end; }
    &.site-header__nav--right { justify-content: flex-start; }

    @media (max-width: 900px) { display: none; }
}

& .nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;

    & li a {
        display: block;
        padding: 0.6rem 1rem;
        font-family: var(--font-heading);
        font-size: 1.5rem;
        font-weight: 400;
        color: var(--color-octonary);
        border-radius: var(--border-radius-sm);
        transition: color var(--transition-fast), background var(--transition-fast);
        white-space: nowrap;
        &:hover {
            color: var(--color-white); 
            background: linear-gradient(180deg, var(--color-tertiary) 0%, var(--color-quaternary) 100%);
        }
    }

    & li.current-menu-item > a { color: var(--color-primary); }
    & li.lang-item {
        display: flex;
        align-items: center;
        a {
            padding: .3rem .4rem;
                &:hover {
                    background: none;
                }
            img {
                width: 3rem;
                height: auto;
            }
        }
    }
}

& .menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    grid-column: 3;
    justify-self: end;

    & .menu-toggle__bar {
        width: 28px;
        height: 2px;
        background: var(--color-white);
        border-radius: 2px;
        transition: transform var(--transition-fast), opacity var(--transition-fast);
    }

    @media (max-width: 900px) { display: flex; }
}
}

/* Menú móvil */
.mobile-menu {
background: var(--color-secondary);
padding: 1rem 0;

& .mobile-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;

    & li a {
        display: block;
        padding: 0.75rem 1.5rem;
        font-family: var(--font-body);
        font-size: 1rem;
        font-weight: 500;
        color: var(--color-white);
        border-bottom: 1px solid rgba(255,255,255,0.08);
        transition: background var(--transition-fast), color var(--transition-fast);

        &:hover {
            background: rgba(255,255,255,0.08);
            color: var(--color-primary);
        }
    }
}
}


/* ============================================
HERO (genérico — no home)
============================================ */
.hero {
position: relative;
min-height: 90vh;
display: flex;
align-items: center;
background-size: cover;
background-position: center;
background-color: var(--color-secondary);

& .hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.3) 60%, rgba(0,0,0,0.1) 100%);
}

& .hero__content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    color: var(--color-white);
}

& .hero__title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--color-white);
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

& .hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.35rem);
    margin-bottom: 2rem;
    opacity: 0.92;
}

& .hero__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;

    @media (max-width: 480px) { flex-direction: column; }
}

@media (max-width: 768px) { min-height: 70vh; }
}


/* ============================================
TOUR CARD
============================================ */
.tours-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 2rem;

&.tours-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
&.tours-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

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

.tour-card {
background: var(--color-white);
border-radius: var(--border-radius-lg);
overflow: hidden;
box-shadow: var(--shadow-sm);
transition: box-shadow var(--transition-base), transform var(--transition-base);

&:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);

    & .tour-card__thumb  { transform: scale(1.05); }
}

& .tour-card__thumb-link {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/2;
}

& .tour-card__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

& .tour-card__duration {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
}

& .tour-card__body { padding: 1.5rem; }

& .tour-card__cat {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-primary);
    letter-spacing: 0.05em;
}

& .tour-card__title {
    font-size: 1.2rem;
    margin: 0.5rem 0;

    & a {
        color: var(--color-secondary);
        &:hover { color: var(--color-primary); }
    }
}

& .tour-card__excerpt {
    font-size: 0.9rem;
    color: var(--color-gray);
    margin-bottom: 1rem;
}

& .tour-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

& .tour-card__price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
}
}


/* ============================================
LAYOUT: SIDEBAR + CONTENT
============================================ */
.page-layout {
display: grid;
gap: 3rem;
padding-top: 3rem;
padding-bottom: 3rem;

&.page-layout--sidebar {
    grid-template-columns: 1fr 320px;

    @media (max-width: 768px) { grid-template-columns: 1fr; }
}
}


/* ============================================
FOOTER
============================================ */
.site-footer {
background-color: var(--color-nonary);
color: rgba(255,255,255,0.8);
margin-top: auto;
position: relative;
margin-top: 10rem;

&::before {
    content: '';
    position: absolute;
    top: -16rem;
    left: 0;
    right: 0;
    width: 100%;
    height: 16rem;
    background-image: url('../images/backgrounds/footer-background.svg');
    background-repeat: no-repeat;
    background-size: cover;
    pointer-events: none;
    z-index: 0;
}

& .footer-widgets {
    padding: 4rem 0 3rem;

    & p, li, a {
        font-size: 1.6rem;
        font-weight: 300;
        color: var(--color-white);
    }

    & a {
         display: inline-block;
    }

    /* Listas en widgets: evitar inside + inline-block en <a> (viñeta sola, texto abajo). */
    & ul,
    & ol {
        list-style-position: outside;
        padding-inline-start: 1.25em;
    }

    & ul li,
    & ol li {
        list-style-position: outside;
    }

    & ul li a,
    & ol li a {
        display: inline;
    }

    & a + a {
        margin-left: .7rem;
    }
    
    & h2 {
        font-weight: 300;
        color: var(--color-quinary);
        margin-bottom: 1rem;
    }
    
    & .footer-widgets__grid {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 2rem;
        
        @media (max-width: 768px) { grid-template-columns: 1fr 1fr; }
        @media (max-width: 480px) { grid-template-columns: 1fr; }

        & .footer-col--1 p {
            margin-top: 2rem;
        }

        & .footer-col--2, .footer-col--3{
            margin-top: -3rem;
            z-index: 1;
        }
        & .footer-col--3{
            margin-top: -8rem;
            
            & [class^="icon-"] {
                position: relative;
                padding-left: 3rem;
                &::before {
                    content: "";
                    width: 2.4rem;
                    height: 2.4rem;
                    background-repeat: no-repeat;
                    background-size: 100% 100%;
                    position: absolute;
                    left: 0;
                }
            }
            
            & .icon-dir::before {
                background-image: url('../images/icons/Home.svg');
            }
            
            & .icon-pho::before {
                background-image: url('../images/icons/Phone.svg');
            }
            
            & .icon-mai::before {
                background-image: url('../images/icons/Mail.svg'); 
            }
        }
    }
}

& .footer-tagline {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

& .footer-bottom {
    background: #0A111A;
    padding: 1.5rem 0;

    & .footer-bottom__inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 1rem;

        @media (max-width: 480px) {
            flex-direction: column;
            text-align: center;
        }
    }
}

& .footer-copyright {
    font-size: 1.4rem;
    color: #616C7D;
    font-weight: 300;
    & a { color: #616C7D; }
}

& .footer-nav__list {
    display: flex;
    list-style: none;
    gap: 1.5rem;

    & a {
        color: rgba(255,255,255,0.7);
        font-size: 0.875rem;

        &:hover { color: var(--color-white); }
    }
}
}


/* ============================================
404
============================================ */
.error-404 {
text-align: center;
padding: 6rem 1rem;

& .error-404__code {
    font-size: 8rem;
    font-weight: 900;
    color: var(--color-primary);
    line-height: 1;
}

& .error-404__title   { margin: 1rem 0 0.5rem; }

& .error-404__message {
    max-width: 500px;
    margin: 0 auto 2rem;
    color: var(--color-gray);
}

& .error-404__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}
}