/* Media Queries */
@media (max-width: 767px) {
    .container { padding: 0; }
    .welcome-section { height: 100vh; }
    #mapa {
        width: 80vw;
        height: 80vw;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        margin-right: 140px;
    }
    #verAlojamientoBtn {
        bottom: 30vh;
        padding: 10px 20px;
        font-size: 1rem;
        margin-right: 155px;
    }
    .welcome-text {
        bottom: 37vh;
    }
    .welcome-text h1 {
        font-size: 2rem;
    }
    .welcome-text p {
        font-size: 0.9rem;
    }
    .content-section {
        padding: 60px 15px 30px;
        top: 0;
        margin-bottom: 30px;
    }
    .leaflet-legend {
        font-size: 12px;
        padding: 5px 8px;
        margin-bottom: 15px;
    }
    .legend-icon {
        width: 16px;
        height: 16px;
    }
    .content-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    .info-wrapper {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        width: 100%;
    }
    #mapa2d {
        width: 100%;
        height: 55vh;
        max-height: 55vh;
    }
    .alojamiento-grid {
        order: 1;
        margin-top: -10px;
        margin-right: 0;
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        height: 55vh;
        max-height: 50vh;
        overflow: visible;
        gap: 15px;
    }
    .alojamiento-card {
        display: none;
        min-height: 110px;
    }
    .alojamiento-card.mobile-active {
        display: block;
        position: relative;
        width: 100%;
        max-height: none;
        height: 100%;
        overflow-y: auto;
        margin-top: 0;
    }
    .alojamiento-card img {
        height: 190px;
    }
    .alojamiento-card h3 {
        font-size: 0.9rem;
        text-align: center;
        margin-top: 10px;
    }
    .alojamiento-card .amenities {
        font-size: 0.75rem;
        justify-content: center;
        gap: 50px;
        padding-left: 50px;
    }
    .alojamiento-card .amenity i {
        font-size: 0.9rem;
    }
    .alojamiento-card.highlighted {
        animation: none;
    }
    #route-buttons-container {
        top: 10px;
        bottom: auto;
        padding: 5px 8px;
        gap: 5px;
        max-width: 90%;
        pointer-events: auto;
    }
    .route-button {
        padding: 4px 8px;
        font-size: 10px;
        min-width: 70px;
    }
    .carousel-nav {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    #distancesModal {
        order: 0;
        width: clamp(160px, 60vw, 200px);
        max-width: none;
        padding: 12px;
        position: fixed;
        left: 10px;
        top: 80px;
        overflow: hidden;
        transform: none;
        margin-top: 0;
        border-radius: 20px;
        transition: height 0.3s ease;
        max-height: calc(100% - 90px);
        cursor: grab;
        touch-action: none;
    }
    #distancesModal:active {
        cursor: grabbing;
    }
    #distancesModal:not(.expanded) {
        height: 120px;
    }
    #distancesModal.expanded {
        height: 300px;
        overflow-y: auto;
    }
    #distancesModal .modal-title {
        font-size: 13px;
        gap: 5px;
        cursor: grab;
        flex-direction: column;
        touch-action: none;
        margin: -12px -12px 12px;
        padding: 10px 12px;
        background: rgba(255, 255, 255, 0.9);
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }
    #distancesModal .modal-subtitle {
        display: block;
        font-size: 11px;
        margin-top: 4px;
        margin-bottom: 8px;
        color: inherit;
    }
    #distancesModal .modal-title:active {
        cursor: grabbing;
    }
    #distancesModal .modal-icon .eye-icon {
        width: 16px;
        height: 16px;
    }
    #distancesModal li {
        padding: 6px 8px;
        gap: 6px;
    }
    #distancesModal li:hover {
        transform: none;
    }
    #distancesModal .eye-icon-wrapper {
        width: 18px;
        height: 18px;
    }
    #distancesModal .eye-icon {
        width: 14px;
        height: 14px;
    }
    #distancesModal .destination-name {
        font-size: 11px;
    }
    #distancesModal .destination-details {
        font-size: 9px;
    }
    .modal-content {
        width: 60%;
        max-width: none;
        padding: 12px;
    }
    .modal-content h2 {
        font-size: 1.2rem;
    }
    .modal-content .carousel {
        max-height: 200px;
    }
    .modal-content .carousel-images {
        height: 200px;
    }
    .modal-content .carousel-images img {
        max-height: 200px;
    }
    .modal-content p {
        font-size: 0.85rem;
    }
    .modal-content .amenities {
        font-size: 0.85rem;
        gap: 25px;
        padding-left: 30px;
    }
    .modal-content .amenity i {
        font-size: 0.9rem;
    }
    .modal-content .rooms-container {
        font-size: 0.85rem;
    }
    .modal-content .btn {
        padding: 8px;
        font-size: 0.85rem;
        margin-top: -10px;
    }
    .modal-buttons {
        flex-direction: column;
        gap: 6px;
    }
    .modal-buttons #closeModalBtn {
        margin-top: 12px;
    }
    .destination-tooltip {
        max-width: 100px;
        font-size: 9px;
    }
    .destination-tooltip .tooltip-content {
        font-size: 9px;
    }
    #alojamientoModal {
        align-items: center;
    }
    .modal-dialog {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    .modal-content {
        position: relative;
    }
    .footer-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 15px;
    }
    .footer-logo {
        margin-bottom: 1rem;
    }
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .footer-section {
        margin-bottom: 1rem;
        text-align: left;
    }
    .logo-img {
        height: 50px;
        width: 50px;
    }
    .footer-divider {
        margin: 1rem 0;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .welcome-section { height: 100vh; }
    #mapa {
        width: 450px;
        height: 450px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
    }
    #verAlojamientoBtn {
        bottom: 60px;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
    }
    .welcome-text {
        bottom: 120px;
    }
    .welcome-text h1 {
        font-size: 3rem;
    }
    .welcome-text p {
        font-size: 1.1rem;
    }
    .content-section {
        padding: 70px 20px 40px;
        top: 0;
        margin-bottom: 40px;
    }
    .leaflet-legend {
        font-size: 13px;
        padding: 6px 10px;
        margin-bottom: 18px;
    }
    .legend-icon {
        width: 17px;
        height: 17px;
    }
    .content-wrapper {
        flex-direction: row;
        gap: 20px;
    }
    .info-wrapper {
        width: 50%;
        display: block;
    }
    #mapa2d {
        width: 50%;
        height: 60vh;
        max-height: 500px;
    }
    .alojamiento-grid {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        height: 60vh;
        max-height: 500px;
        overflow: visible;
        gap: 20px;
    }
    .alojamiento-card {
        min-height: 130px;
    }
    .alojamiento-card img {
        height: 70px;
    }
    #route-buttons-container {
        max-width: 85%;
        padding: 6px 10px;
        pointer-events: auto;
    }
}

/* --- INICIO ESCRITORIO Y FULLHD --- */
@media (min-width: 1024px) {
    .welcome-section { height: 100vh; }
    /* Hero container centrado absoluto */
    .hero-container {
        position: relative;
        width: 100vw;
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden;
    }
    #mapa {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 600px;
        height: 600px;
        border-radius: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
        box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    }
    #verAlojamientoBtn {
        position: absolute;
        left: 50%;
        bottom: 60px;
        transform: translateX(-50%);
        margin: 0;
        z-index: 10;
    }
    #mapa2d {
        width: 50%;
        height: 70vh;
        max-height: 600px;
    }
    .info-wrapper { width: 50%; }
    .alojamiento-grid {
        width: 100%;
        height: 70vh;
        max-height: 600px;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        z-index: 1;
        overflow: visible;
        padding: 10px;
        box-sizing: border-box;
    }
    .alojamiento-card {
        background-color: rgba(255, 255, 255, 0.95);
        border: none;
        border-radius: 20px;
        overflow: visible;
        cursor: pointer;
        transition: transform 0.3s ease, box-shadow 0.2s ease;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 180px;
        box-sizing: border-box;
    }
    #route-buttons-container { max-width: 75%; padding: 6px 10px; pointer-events: auto; }
}
/* --- FIN ESCRITORIO Y FULLHD --- */

@media (min-width: 1440px) {
    .container { max-width: 100%; }
    .content-section { padding: 80px 30px 50px; }
    .content-wrapper { max-width: 1100px; }
    .alojamiento-grid { max-width: 50%; }
}

@media (max-height: 500px) {
    .welcome-section { height: 100vh; }
    #mapa {
        width: 400px;
        height: 400px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    #verAlojamientoBtn {
        bottom: 50px;
    }
    #mapa2d {
        height: 50vh;
        max-height: 400px;
    }
    .modal-content { max-height: 80vh; padding: 10px; }
}

/* Estilos para footer simplificado */
.footer-simple {
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    font-family: 'Playfair Display', serif;
    text-align: center;
}
.footer-simple .footer-logo {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
#language-selector {
    position: relative;
    display: inline-block;
}
#language-selector .dropdown-toggle {
    background-color: transparent;
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
}
#language-menu {
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 6px;
}
#language-menu button {
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
}
#language-menu button:hover {
    background-color: #f1f1f1;
}
@media (min-width: 992px) {
    .welcome-text { bottom: 180px; }
    #verAlojamientoBtn { bottom: 120px; }
}

/* ---- INICIO MEDIA QUERY 4K y UltraWide (min-width: 2000px) ---- */
@media (min-width: 2000px) {
    .content-wrapper {
        max-width: 1800px;
        margin-left: auto;
        margin-right: auto;
        padding: 0 2rem;
    }
    .alojamiento-grid {
        max-width: 60%;
        gap: 25px;
        padding: 15px;
    }
    .alojamiento-card img {
        max-height: 300px;
    }
}
/* ---- FIN MEDIA QUERY 4K y UltraWide ---- */

/* ---- INICIO MEDIA QUERY FullHD y grandes (1600-1999px) ---- */
@media (min-width: 1600px) and (max-width: 1999px) {
    .content-wrapper {
        max-width: 1500px;
        margin: 0 auto;
        padding: 0 1.5rem;
    }
    .alojamiento-grid {
        max-width: 55%;
        gap: 22px;
        padding: 15px;
    }
    .alojamiento-card img {
        max-height: 260px;
    }
}
/* ---- FIN MEDIA QUERY FullHD y grandes ---- */

/* ---- INICIO MEDIA QUERY 1440p (WQHD) (1440-1599px) ---- */
@media (min-width: 1440px) and (max-width: 1599px) {
    .content-wrapper {
        max-width: 1350px;
        margin: 0 auto;
        padding: 0 1.5rem;
    }
    .alojamiento-grid {
        max-width: 55%;
        gap: 20px;
        padding: 15px;
    }
    .alojamiento-card img {
        max-height: 240px;
    }
}
/* ---- FIN MEDIA QUERY 1440p (WQHD) ---- */

/* ---- INICIO MEDIA QUERY Portátiles grandes (1280-1439px) ---- */
@media (min-width: 1280px) and (max-width: 1439px) {
    .content-wrapper {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 1rem;
    }
    .alojamiento-grid {
        max-width: 60%;
        gap: 20px;
        padding: 10px;
    }
    .alojamiento-card img {
        max-height: 220px;
    }
}
/* ---- FIN MEDIA QUERY Portátiles grandes ---- */

/* ---- INICIO MEDIA QUERY Portátiles medios (1024-1279px) ---- */
@media (min-width: 1024px) and (max-width: 1279px) {
    .content-wrapper {
        max-width: 1100px;
        margin: 0 auto;
        padding: 0 1rem;
    }
    .alojamiento-grid {
        max-width: 65%;
        gap: 18px;
        padding: 10px;
    }
    .alojamiento-card img {
        max-height: 200px;
    }
}
/* ---- FIN MEDIA QUERY Portátiles medios ---- */

/* ---- INICIO MEDIA QUERY Portátiles pequeños/compactos (900-1023px) ---- */
@media (min-width: 900px) and (max-width: 1023px) {
    .content-wrapper {
        max-width: 95%;
        margin: 0 auto;
        padding: 0 0.5rem;
    }
    .alojamiento-grid {
        max-width: 100%;
        gap: 16px;
        padding: 10px 0;
    }
    .alojamiento-card img {
        max-height: 180px;
    }
}