:root {
    --primary: #c41e3a;
    --secondary: #043b72;
    --accent: #f39c12;
    --light: #f8f9fa;
    --dark: #343a40;
    --text: #333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--light);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    width: 100%;
    height: auto;
    display: block;
}
hr {
    border: none;
    border-top: 1px dashed #ccc;
    color: #ccc;
    background-color: transparent;
    margin: 1.5rem 0;
}

.white {
    color: var(--light);
}

.orange {
    color: var(--accent);
}

.big-ico {
    width: 3rem;
    height: 3rem;
}

.mid-ico {
    width: 26px;
    height: 26px;
}

.blue {
    color: var(--secondary);
}

.icon {
    width: 20px;
    height: 20px;
    color: var(--dark);
}

.foot-ico {
    width: 20px;
    height: 20px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    background: var(--primary);
    color: white;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #a01a2f;
    transform: translateY(-3px);
}

.btn-secondary {
    background: var(--secondary);
}

.btn-secondary:hover {
    background: #032a54;
}

.title {
    text-align: center;
    margin: 3rem auto;
    color: var(--secondary);
}

.title h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.title h2::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background: var(--primary);
}

/* Header */
header {
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 2rem;
}
.box-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content; /* Solo ocupa lo necesario */
}

.idiomas {
    width: 24px;
    height: 24px;
    z-index: 5;
}
.logo {
    width: 150px;
}

.logo img {
    aspect-ratio: 35 / 9;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 5px;
}

/* Mobile navigation (Hamburger menu) */

nav {
    display: flex;
    align-items: center;
}
.hamburger {
    display: block;
    cursor: pointer;
    font-size: 1.5rem;
}

.nav-menu {
    position: absolute;
    top: 58px;
    left: 5%;
    width: 90%;
    background-color: white;
    box-shadow: var(--shadow);
    padding: 0;
    display: flex;
    /* Siempre flex para el JS, ocultamos con transform/height para animar */
    flex-direction: column;
    align-items: center;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    border-radius: 0 0 7px 7px;
}

/* Cuando el menú está activo (desde JS) */
.nav-menu.active {
    max-height: 800px;
    /* Suficientemente grande para contener el menú */
}

/* Estilos generales para el menú y submenú */
.nav-item {
    position: relative;
    min-width: 110px;
    margin: 0.5rem 0;
    width: 100%;
    text-align: center;
}

.nav-link {
    font-weight: 600;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
}

summary {
    list-style: none;
    cursor: pointer;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: " ▼";
    margin-left: 5px;
    transition: transform 0.3s ease;
    display: inline-block;
}

details[open] summary::after {
    transform: rotate(180deg);
}

.submenu {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 10px;
    min-width: 200px;
    z-index: 10;
    position: static;
    /* En móvil se expanden en línea */
}

.submenu a {
    color: var(--text);
    padding: 2px 1px;
    display: block;
    border-bottom: solid 1px var(--secondary);
}

.submenu a:hover {
    background-color: #f0f0f0;
}

/* No necesitamos details[open] .submenu { display: block; } porque details lo maneja por sí mismo */

/* Tours Section */
.tours {
    padding: 3rem 0;
}

.tour-categories {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-btn {
    padding: 8px 16px;
    background: #e9ecef;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.category-btn.active,
.category-btn:hover {
    background: var(--primary);
    color: white;
}

.tour-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.tour-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.tour-card:hover {
    transform: translateY(-5px);
}

.tour-img img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: var(--transition);
}

.tour-card:hover .tour-img img {
    transform: scale(1.05);
}

.tour-info {
    padding: 1.2rem;
}

.tour-info h3 {
    margin-bottom: 0.5rem;
    color: var(--secondary);
    font-size: 1.2rem;
}

.tour-meta {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.tour-meta span {
    display: grid;
    grid-template-columns: 16px 1fr;
    gap: 5px;
    align-items: center;
}

.tour-meta .ico {
    width: 17px;
    height: 17px;
}

.descripcion {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tour-price {
    color: var(--primary);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Why Us Section */
.why-us {
    background: var(--secondary);
    color: white;
    padding: 3rem 0;
}

.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature {
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: var(--transition);
    text-align: center;
}

.feature:hover {
    transform: translateY(-5px);
}

/* Testimonials */
.testimonials {
    padding: 3rem 0;
    background: #f8f9fa;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.testimonial {
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    position: relative;
    /* Necesario para el pseudo-elemento */
}

.testimonial::before {
    content: '"';
    font-size: 4rem;
    color: #e9ecef;
    position: absolute;
    top: 10px;
    left: 15px;
}

.testimonial-text {
    position: relative;
    z-index: 1;
}

.author-img {
    width: 40px;
    height: 40px;
}

/* CTA Section */
.cta {
    background: linear-gradient(rgba(4, 59, 114, 0.9), rgba(4, 59, 114, 0.9))
        no-repeat center center / cover;
    color: white;
    text-align: center;
    padding: 3rem 1rem;
}

.cta h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta p {
    max-width: 700px;
    margin: 0 auto 1.5rem;
    font-size: 1rem;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 2rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    padding-bottom: 8px;
    font-size: 1.2rem;
}

.footer-section h3::after {
    content: "";
    /* Asegúrate de que el contenido esté aquí si lo necesitas */
    width: 50px;
    /* Ya definido, pero lo mantengo */
    height: 2px;
    /* Ya definido, pero lo mantengo */
}

.footer-links li {
    margin-bottom: 8px;
}

.contact-info li {
    margin-bottom: 12px;
    gap: 5px;
    /* Esto asume que tienes un display flex o grid en el li */
}

.social-links {
    display: flex;
    margin-top: 1rem;
    gap: 10px;
}

.social-links a {
    width: 36px;
    height: 36px;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* Responsive Design - Media Queries */

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    /* Title */
    .title h2 {
        font-size: 2.2rem;
    }

    /* Tours */
    .tour-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    /* Why Us */
    .features {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    /* Testimonials */
    .testimonial-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    /* Header */
    nav {
        display: flex;
        align-items: center;
    }
    .nav-menu {
        position: static;
        top: auto;
        left: auto;
        background: transparent;
        width: auto;
        display: flex;
        flex-direction: row;
        box-shadow: none;
        padding: 0;
        max-height: none;
        overflow: visible;
    }

    .submenu {
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--light);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        padding: 10px;
        min-width: 200px;
        z-index: 10;
        display: none;
    }

    .submenu .nav-item {
        text-align: left;
    }

    details summary {
        display: inline-block;
        width: 110px;
    }

    details:hover .submenu {
        display: block;
    }

    details[open] .submenu {
        display: block;
    }
    .hamburger {
        display: none;
    }

    .btn {
        padding: 12px 25px;
    }

    .cta h2 {
        font-size: 2.2rem;
    }
}
