/* ======== ESTILOS GENERALES Y VARIABLES ======== */
:root {
    --primary-color: #1a7bba;
    --secondary-color: #343a40;
    --background-color: #ffffff;
    --light-gray-color: #f8f9fa;
    --font-family: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    color: var(--secondary-color);
    background-color: var(--background-color);
}

/* ======== HEADER Y NAVEGACIÓN (Consolidado) ======== */
.site-header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.top-bar {
    background-color: #f0f0f0;
    padding: 0.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #555;
    border-bottom: 1px solid #ddd;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.top-bar a {
    color: #555;
    text-decoration: none;
}

.top-bar i {
    color: var(--primary-color);
    margin-right: 0.3rem;
}

.social-icons {
    display: flex;
    gap: 0.8rem;
}

.social-icons i {
    font-size: 1.2rem;
    margin-right: 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 5%;
}

.logo img {
    height: 60px;
    vertical-align: middle;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 600;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.flag {
    width: 24px;
    height: 24px;
    cursor: pointer;
    border-radius: 50%;
}

#menu-icon {
    font-size: 2rem;
    cursor: pointer;
    display: none;
}


/* ================================================================ */
/* ===========      CORRECCIÓN SELECTOR DE IDIOMA       =========== */
/* ================================================================ */

/* ESTADO POR DEFECTO (ESCRITORIO) */
/* Ocultamos el selector de idioma móvil por defecto. */
.language-selector-mobile {
    display: none;
}

/* CUANDO LA PANTALLA SEA DE 992PX O MENOS (MÓVIL) */
@media (max-width: 992px) {
    /* Ocultamos la versión de escritorio. */
    .language-selector-desktop {
        display: none;
    }

    /* Mostramos la versión móvil, que está dentro de la lista del menú. */
    /* Usamos 'flex' para que las banderas se alineen horizontalmente. */
    .language-selector-mobile {
        display: flex;
        justify-content: center;
        gap: 1rem;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #f0f0f0;
    }
}

/* ======== SECCIONES PRINCIPALES ======== */
main {
    padding-top: 110px;
}

.hero {
    height: 40vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.pexels.com/photos/3762286/pexels-photo-3762286.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1') no-repeat center center/cover;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 2rem 5%;
    box-sizing: border-box;
}

.hero-content { max-width: 800px; }
.hero-content h1 { font-size: 3.2rem; margin: 0; line-height: 1.2; }
.hero-content h2 { font-size: 1.6rem; color: var(--primary-color); margin: 0.5rem 0 1rem; }
.hero-content p { font-size: 1.1rem; margin-bottom: 1.5rem; max-width: 600px; margin-left: auto; margin-right: auto; }


/* ================================================================ */
/* ===========        ESTILOS PARA LA BARRA DE BÚSQUEDA       =========== */
/* ================================================================ */
.booking-bar {
    padding: 2rem 5%;
    background-color: #eef5f9;
}

.booking-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    align-items: flex-end;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.form-group label { 
    font-weight: 600; 
    font-size: 0.9rem;
}
.form-group input, .form-group select { 
    width: 100%; 
    box-sizing: border-box; 
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    background-color: #f8f9fa;
}

.booking-form .btn-primary {
    width: 100%;
    padding: 0.75rem;
}

@media (min-width: 1200px) {
    .booking-form {
        grid-template-columns: repeat(5, 1fr); /* 4 campos + 1 botón */
    }
    .booking-form .btn-primary {
        grid-column: auto;
    }
}

/* Selector de huéspedes */
.guests-container {
    position: relative;
}
.guests-input-display {
    cursor: pointer;
    user-select: none;
}
.guests-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 250px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 1rem;
    z-index: 10;
    margin-top: 5px;
    display: none;
}
.guests-dropdown.active {
    display: block;
}
.counter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.counter-row:last-child {
    margin-bottom: 0;
}
.counter-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.counter-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--primary-color);
}
.counter-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.btn {
    padding: 0.8rem 2rem;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary { background-color: var(--primary-color); color: white; }
.btn-primary:hover { background-color: #f29335; border-color: #c6782a; }

/* ======== SECCIÓN DE ALOJAMIENTOS ======== */
.alojamientos-container {
    padding: 4rem 5%;
}

/* ================================================================ */
/* ====   NUEVOS ESTILOS PARA CONTENEDORES INTERACTIVOS   ==== */
/* ================================================================ */

.location-category {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.location-header {
    padding: 3rem 2rem;
    cursor: pointer;
    position: relative;
    background-size: cover;
    background-position: center;
    color: white;
    transition: transform 0.3s ease;
}

.location-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

.location-header:hover {
    transform: scale(1.02);
}

/* Asignación de imágenes a cada cabecera */
[data-target="#cartagena-plans"] { background-image: url('https://images.pexels.com/photos/1683492/pexels-photo-1683492.jpeg'); }
[data-target="#santa-marta-plans"] { background-image: url('https://images.pexels.com/photos/1796593/pexels-photo-1796593.jpeg'); }
[data-target="#islas-plans"] { background-image: url('https://images.pexels.com/photos/1483053/pexels-photo-1483053.jpeg'); }
[data-target="#cundinamarca-plans"] { background-image: url('https://images.pexels.com/photos/1658967/pexels-photo-1658967.jpeg'); }

.location-header h2 {
    position: relative;
    z-index: 2;
    font-size: 2.5rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.location-header::after {
    content: '\ea4a'; /* Icono de "plus" de Boxicons */
    font-family: 'Boxicons';
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    font-size: 2.5rem;
    transition: transform 0.4s ease;
}

.location-header.active::after {
    transform: translateY(-50%) rotate(45deg); /* Gira el "plus" para parecer un "close" */
}

.plans-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.7s ease-in-out, padding 0.5s ease;
    background-color: var(--light-gray-color);
}

.plans-content.active {
    max-height: 2000px; /* Un valor grande para permitir que el contenido se expanda */
    padding: 2rem 0;
}

.alojamientos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.plan-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: left;
    text-decoration: none;
    color: var(--secondary-color);
}

.plan-card:hover { transform: translateY(-10px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.plan-card img { width: 100%; height: 200px; object-fit: cover; }
.plan-info { padding: 1.5rem; }
.plan-info .location { font-size: 0.9rem; color: #888; text-transform: uppercase; }
.plan-info h3 { margin-top: 0.5rem; margin-bottom: 0.5rem; font-size: 1.3rem; }
.plan-info .type-badge { background-color: var(--primary-color); color: white; padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.8rem; display: inline-block; margin-bottom: 1rem; }
.plan-info .price { font-size: 1.2rem; font-weight: bold; color: var(--primary-color); margin-top: 1rem; }

/* ================================================================ */
/* ===========      ESTILOS PARA PÁGINA DE DETALLE      =========== */
/* ================================================================ */
#detalle-container {
    display: grid;
    grid-template-columns: 1fr; /* Apilado por defecto para móviles */
    gap: 2rem;
    padding: 4rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.detalle-galeria img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.detalle-info {
    padding: 1rem;
}

.detalle-info h1 {
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.detalle-info .location {
    font-size: 1.1rem;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.detalle-info .price {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.detalle-info p {
    line-height: 1.7;
    font-size: 1.1rem;
}

.detalle-info h3 {
    margin-top: 2rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.amenities-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.amenities-list li {
    background-color: #e9f7ec;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: var(--primary-color);
    font-weight: 500;
}

/* Vista para escritorio (2 columnas) */
@media (min-width: 768px) {
    #detalle-container {
        grid-template-columns: 1.5fr 1fr;
    }
}

/* ======== FOOTER ======== */
.site-footer {
    background-color: #222222;
    color: #a9a9a9;
    padding: 4rem 5% 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #444;
}

.footer-column h3 { color: #ffffff; font-size: 1.2rem; margin-bottom: 1.5rem; }
.logo-footer img { height: 40px; width: auto; }
.footer-column p { margin-bottom: 0.8rem; line-height: 1.6; }
.footer-column p i { color: var(--primary-color); margin-right: 0.5rem; }
.quick-links ul { list-style: none; padding: 0; }
.quick-links a { color: #a9a9a9; text-decoration: none; display: block; margin-bottom: 0.8rem; transition: color 0.3s, transform 0.3s; }
.quick-links a:hover { color: var(--primary-color); transform: translateX(5px); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.gallery-grid img { width: 100%; height: 70px; object-fit: cover; border-radius: 8px; transition: transform 0.3s; }
.gallery-grid img:hover { transform: scale(1.1); }
.newsletter-form { display: flex; position: relative; margin-bottom: 1rem; }
.newsletter-form input[type="email"] { width: 100%; padding: 0.8rem; background-color: #333; border: 1px solid #555; color: white; border-radius: 50px; }
.newsletter-form button { position: absolute; right: 5px; top: 5px; bottom: 5px; background-color: var(--primary-color); border: none; color: white; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; }
.terms { display: flex; align-items: center; font-size: 0.9rem; margin-bottom: 1.5rem; }
.terms input { margin-right: 0.5rem; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 0; font-size: 0.9rem; }
.back-to-top { background-color: var(--primary-color); color: white; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 4px; text-decoration: none; font-size: 1.5rem; }

/* ======== BOTÓN FLOTANTE DE WHATSAPP ======== */
.whatsapp-float-btn {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.whatsapp-float-btn:hover {
    transform: scale(1.1);
}

/* ======== DISEÑO RESPONSIVE ======== */
@media (max-width: 992px) {
    main { padding-top: 115px; }
    .top-bar { display: none; }
    .language-selector-desktop { display: none; }
    .language-selector-mobile { display: flex; justify-content: center; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #f0f0f0; }
    .nav-links { position: absolute; top: 100%; left: -100%; width: 100%; background-color: white; flex-direction: column; text-align: center; padding: 1rem 0; box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: left 0.3s ease; }
    .nav-links.active { left: 0; }
    #menu-icon { display: block; }
    .hero { height: 50vh; }
    .hero-content h1 { font-size: 2.5rem; }
}

@media (max-width: 480px) {
    .hero { height: 60vh; }
    .hero-content h1 { font-size: 2rem; }
    .location-header h2 { font-size: 2rem; }
}