/**
 * Embla Carousel Styles - Optimized for LCP
 * Lightweight and performance-focused
 */

/* Main container */
.embla {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #f0f0f0;
}

/* Viewport - the window that shows slides */
.embla__viewport {
    overflow: hidden;
    width: 100%;
    position: relative;
}

/* Container - holds all slides */
.embla__container {
    display: flex;
    touch-action: pan-y pinch-zoom;
    margin: 0;
    padding: 0;
    backface-visibility: hidden;
    will-change: transform;
}

/* Individual slide */
.embla__slide {
    position: relative;
    flex: 0 0 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    opacity: 1;
    visibility: visible;
}

/* Slide link wrapper */
.embla__slide__link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* Picture element */
.embla__slide__img {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
}

/* Image element - optimized for LCP */
.embla__slide__img__element {
    display: block !important;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1 !important;
    visibility: visible !important;

    /* Performance optimizations */
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* LCP image - first slide image */
.embla__slide__img__element.lcp-image {
    /* Ensure this loads with highest priority */
    content-visibility: auto;
}

/* Navigation buttons */
.embla__button {
    position: absolute;
    z-index: 10;
    top: 50%;
    transform: translateY(-50%);
    
    /* Button styling */
    appearance: none;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    
    /* Size */
    width: 48px;
    height: 48px;
    padding: 0;
    
    /* Flexbox for centering SVG */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Transitions */
    transition: background-color 0.2s ease, opacity 0.2s ease;
    
    /* Shadow for visibility */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.embla__button:hover {
    background-color: rgba(255, 255, 255, 1);
}

.embla__button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.embla__button--prev {
    left: 16px;
}

.embla__button--next {
    right: 16px;
}

/* Button SVG */
.embla__button__svg {
    width: 24px;
    height: 24px;
    color: #333;
}

/* Pagination dots */
.embla__dots {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    
    z-index: 10;
    padding: 0;
    margin: 0;
}

.embla__dot {
    appearance: none;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    
    width: 12px;
    height: 12px;
    padding: 0;
    margin: 0;
    
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.embla__dot:hover {
    background-color: rgba(255, 255, 255, 0.7);
}

.embla__dot--selected {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(1.2);
}

/* Mobile optimizations */
@media (max-width: 576px) {
    /* Hide navigation buttons on mobile */
    .embla__button {
        display: none;
    }
    
    /* Larger dots on mobile for easier tapping */
    .embla__dot {
        width: 14px;
        height: 14px;
    }
    
    /* More spacing between dots */
    .embla__dots {
        gap: 10px;
        bottom: 16px;
    }
    
    /* Optimize slide images for mobile */
    .embla__slide__img__element {
        /* Faster rendering on mobile */
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Tablet optimizations */
@media (min-width: 577px) and (max-width: 991px) {
    .embla__button {
        width: 44px;
        height: 44px;
    }
    
    .embla__button__svg {
        width: 22px;
        height: 22px;
    }
}

/* Desktop optimizations */
@media (min-width: 992px) {
    .embla__button {
        width: 56px;
        height: 56px;
    }
    
    .embla__button__svg {
        width: 28px;
        height: 28px;
    }
    
    .embla__button--prev {
        left: 24px;
    }
    
    .embla__button--next {
        right: 24px;
    }
}

/* Smooth transitions */
.embla__container {
    transition: transform 0.3s ease;
}

/* Accessibility - focus states */
.embla__button:focus-visible,
.embla__dot:focus-visible {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .embla__container,
    .embla__button,
    .embla__dot {
        transition: none;
    }
}

/* Specific styles for main slider (home page) */
#main-slider {
    min-height: 300px;
    overflow: hidden;
}

#main-slider .embla__viewport {
    min-height: 300px;
}

#main-slider .embla__slide {
    min-height: 300px;
}

#main-slider .embla__slide__img {
    width: 100%;
    height: 100%;
}

/* Mobile - imagen cortada a los lados (cover) */
@media (max-width: 576px) {
    #main-slider,
    #main-slider .embla__viewport,
    #main-slider .embla__slide {
        min-height: 50vh;
        max-height: 50vh;
        height: 50vh;
    }

    #main-slider .embla__slide__img {
        height: 100%;
    }

    #main-slider .embla__slide__img__element {
        object-fit: cover !important;
        object-position: center center;
        width: 100%;
        height: 100% !important;
        min-height: 50vh;
    }
}

/* Small tablets - transición */
@media (min-width: 577px) and (max-width: 767px) {
    #main-slider,
    #main-slider .embla__viewport,
    #main-slider .embla__slide {
        min-height: 400px;
        max-height: 60vh;
    }

    #main-slider .embla__slide__img__element {
        object-fit: cover;
        object-position: center center;
        width: 100%;
        height: 100%;
    }
}

/* Desktop - imagen completa visible (contain) */
@media (min-width: 768px) {
    #main-slider,
    #main-slider .embla__viewport,
    #main-slider .embla__slide {
        min-height: 400px;
        max-height: 600px;
    }

    #main-slider .embla__slide__img__element {
        object-fit: contain;
        object-position: center center;
        width: 100%;
        height: auto;
        max-height: 600px;
    }
}

/* Container for awards slider */
.awards-slider-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 300px;
}

/* Specific styles for awards slider */
.embla-awards {
    padding: 1rem 0;
    min-height: 280px;
    position: relative;
}

.embla-awards .embla__viewport {
    overflow: hidden;
    min-height: 250px;
}

.embla-awards .embla__container {
    display: flex;
    align-items: center;
    min-height: 250px;
    gap: 0.25rem;
}

.embla-awards .embla__slide {
    padding: 0.25rem;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.embla-awards picture {
    display: block !important;
    margin: 0 auto;
    line-height: 0;
}

.embla-awards img,
.embla-awards .award-img {
    margin: 0 auto;
    object-fit: contain;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    background-color: transparent;
}

/* Ensure images are loaded */
.embla-awards img[loading="lazy"] {
    content-visibility: auto;
}

.embla-awards img[loading="eager"] {
    content-visibility: visible;
}

/* Responsive sizes for awards slider */

/* Mobile - 1 slide visible */
@media (max-width: 576px) {
    .awards-slider-container {
        min-height: 280px;
    }

    .embla-awards {
        min-height: 250px;
    }

    .embla-awards .embla__viewport {
        min-height: 220px;
    }

    .embla-awards .embla__container {
        min-height: 220px;
    }

    .embla-awards .embla__slide {
        flex: 0 0 100%;
        min-width: 100%;
        min-height: 220px;
    }

    .embla-awards picture {
        width: 200px;
        height: 200px;
    }

    .embla-awards img,
    .embla-awards .award-img {
        width: 200px !important;
        height: 200px !important;
        min-width: 200px;
        min-height: 200px;
        max-width: 200px;
        max-height: 200px;
    }
}

/* Small tablets - 2 slides visible */
@media (min-width: 577px) and (max-width: 991px) {
    .awards-slider-container {
        min-height: 300px;
    }

    .embla-awards {
        min-height: 270px;
    }

    .embla-awards .embla__viewport {
        min-height: 240px;
    }

    .embla-awards .embla__container {
        min-height: 240px;
    }

    .embla-awards .embla__slide {
        flex: 0 0 50%;
        min-width: 50%;
        min-height: 240px;
    }

    .embla-awards picture {
        width: 220px;
        height: 220px;
    }

    .embla-awards img,
    .embla-awards .award-img {
        width: 220px !important;
        height: 220px !important;
        min-width: 220px;
        min-height: 220px;
        max-width: 220px;
        max-height: 220px;
    }
}

/* Desktop - 3 slides visible */
@media (min-width: 992px) {
    .awards-slider-container {
        min-height: 350px;
    }

    .embla-awards {
        min-height: 320px;
    }

    .embla-awards .embla__viewport {
        min-height: 280px;
    }

    .embla-awards .embla__container {
        min-height: 280px;
    }

    .embla-awards .embla__slide {
        flex: 0 0 33.333%;
        min-width: 33.333%;
        min-height: 280px;
    }

    .embla-awards picture {
        width: 250px;
        height: 250px;
    }

    .embla-awards img,
    .embla-awards .award-img {
        width: 250px !important;
        height: 250px !important;
        min-width: 250px;
        min-height: 250px;
        max-width: 250px;
        max-height: 250px;
    }
}

/* Specific styles for rooms slider - SIMPLIFICADO (igual que awards) */
.embla-rooms {
    padding: 1rem 0;
    min-height: 450px;
    position: relative;
}

.embla-rooms .embla__viewport {
    overflow: hidden;
    min-height: 400px;
}

.embla-rooms .embla__container {
    display: flex;
    align-items: center;
    min-height: 400px;
    gap: 0.25rem;
}

.embla-rooms .embla__slide {
    padding: 0.25rem;
    min-height: 400px;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

/* Ratio 1:1 for room images */
.embla-rooms .ratio {
    position: relative;
    width: 100%;
    display: block !important;
}

.embla-rooms .ratio::before {
    display: block;
    padding-top: 100%; /* 1:1 aspect ratio */
    content: "";
}

.embla-rooms .ratio > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Card image */
.embla-rooms .card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Overlay oscuro sobre imagen */
.embla-rooms .card-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.7) 100%
    );
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: white;
    pointer-events: none;
}

/* Título del room */
.embla-rooms .card-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: white;
    text-transform: uppercase;
    line-height: 1.2;
}

/* Descripción */
.embla-rooms .card-text {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.3;
}

/* Botón Book Now */
.embla-rooms .room-book-now {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background-color: #ff9b49;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
    align-self: flex-start;
    pointer-events: auto;
}

.embla-rooms .room-book-now:hover {
    background-color: #ff8533;
    color: white;
    text-decoration: none;
}

/* Responsive - IGUAL QUE AWARDS */

/* Mobile - 1 room visible */
@media (max-width: 576px) {
    .embla-rooms {
        min-height: 380px;
    }

    .embla-rooms .embla__viewport {
        min-height: 350px;
    }

    .embla-rooms .embla__container {
        min-height: 350px;
    }

    .embla-rooms .embla__slide {
        flex: 0 0 100%;
        min-width: 100%;
        min-height: 350px;
    }
}

/* Small tablets - 2 rooms visible */
@media (min-width: 577px) and (max-width: 991px) {
    .embla-rooms {
        min-height: 400px;
    }

    .embla-rooms .embla__viewport {
        min-height: 370px;
    }

    .embla-rooms .embla__container {
        min-height: 370px;
    }

    .embla-rooms .embla__slide {
        flex: 0 0 50%;
        min-width: 50%;
        min-height: 370px;
    }
}

/* Desktop - 3 rooms visible */
@media (min-width: 992px) {
    .embla-rooms {
        min-height: 450px;
    }

    .embla-rooms .embla__viewport {
        min-height: 400px;
    }

    .embla-rooms .embla__container {
        min-height: 400px;
    }

    .embla-rooms .embla__slide {
        flex: 0 0 33.333%;
        min-width: 33.333%;
        min-height: 400px;
    }
}

/* Specific styles for tours slider - SIMPLIFICADO (igual que awards) */
.embla-tours {
    padding: 1rem 0;
    min-height: 550px;
    position: relative;
}

.embla-tours .embla__viewport {
    overflow: hidden;
    min-height: 500px;
}

.embla-tours .embla__container {
    display: flex;
    align-items: flex-start;
    min-height: 500px;
    gap: 0.25rem;
}

.embla-tours .embla__slide {
    padding: 0.25rem;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* Ratio 1:1 for tour images */
.embla-tours .ratio {
    position: relative;
    width: 100%;
    display: block !important;
}

.embla-tours .ratio::before {
    display: block;
    padding-top: 100%; /* 1:1 aspect ratio */
    content: "";
}

.embla-tours .ratio > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Tour image */
.embla-tours .card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Tour text container */
.embla-tours .tour-text {
    padding: 1rem 0.5rem;
    text-align: center;
    width: 100%;
}

.embla-tours .tour-text a {
    text-decoration: none;
    display: block;
}

.embla-tours .tour-text a:hover .tour-title {
    text-decoration: underline;
}

.embla-tours .tour-text p {
    margin-bottom: 0.25rem;
}

/* Tour location - complementa destination.css */
.embla-tours .tour-location {
    color: #808080;
    font-size: 0.85rem;
    display: block;
}

/* Tour title - complementa destination.css */
.embla-tours .tour-title {
    color: #000;
    font-weight: bold;
    font-size: 1rem;
    display: block;
    margin: 0.25rem 0;
}

/* Tour price - complementa destination.css */
.embla-tours .tour-price {
    color: #ff9b49;
    font-weight: bold;
    font-size: 0.95rem;
    display: block;
}

/* Responsive - IGUAL QUE AWARDS */

/* Mobile - 1 tour visible */
@media (max-width: 576px) {
    .embla-tours {
        min-height: 480px;
    }

    .embla-tours .embla__viewport {
        min-height: 450px;
    }

    .embla-tours .embla__container {
        min-height: 450px;
    }

    .embla-tours .embla__slide {
        flex: 0 0 100%;
        min-width: 100%;
        min-height: 450px;
    }
}

/* Small tablets - 2 tours visible */
@media (min-width: 577px) and (max-width: 991px) {
    .embla-tours {
        min-height: 520px;
    }

    .embla-tours .embla__viewport {
        min-height: 480px;
    }

    .embla-tours .embla__container {
        min-height: 480px;
    }

    .embla-tours .embla__slide {
        flex: 0 0 50%;
        min-width: 50%;
        min-height: 480px;
    }
}

/* Desktop - 3 tours visible */
@media (min-width: 992px) {
    .embla-tours {
        min-height: 550px;
    }

    .embla-tours .embla__viewport {
        min-height: 500px;
    }

    .embla-tours .embla__container {
        min-height: 500px;
    }

    .embla-tours .embla__slide {
        flex: 0 0 33.333%;
        min-width: 33.333%;
        min-height: 500px;
    }
}

/* General ratio utility (fallback if Bootstrap not loaded) */
.ratio {
    position: relative;
    width: 100%;
}

.ratio::before {
    display: block;
    padding-top: var(--bs-aspect-ratio, 100%);
    content: "";
}

.ratio > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ratio-1x1 {
    --bs-aspect-ratio: 100%;
}

/* Modal styles for rooms */
.modal-body .card-img,
.modal-body .modal-room-img {
    width: 400px !important;
    height: 400px !important;
    max-width: 400px;
    max-height: 400px;
    min-width: 400px;
    min-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    position: static !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    background-color: #f0f0f0;
}

.modal-body .flex-shrink-0 {
    flex-shrink: 0;
    width: 400px;
    min-width: 400px;
}

.modal-body .flex-grow-1 {
    flex-grow: 1;
    flex-basis: 0;
    min-width: 0;
}

.modal-body .d-flex {
    display: flex;
    gap: 1.5rem;
}

.modal-body .flex-md-row {
    flex-direction: row;
}

.modal-body .card-title {
    color: #000;
    font-weight: bold;
    margin-bottom: 1rem;
}

.modal-body .card-text {
    color: #333;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.modal-body .room-book-now {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: #ff9b49;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.modal-body .room-book-now:hover {
    background-color: #ff8533;
    color: white;
    text-decoration: none;
}

/* Asegurar que la imagen del modal no sea afectada por estilos de ratio */
.modal-body .flex-shrink-0::before {
    display: none !important;
    content: none !important;
}

.modal-body .flex-shrink-0 {
    position: static !important;
}

/* Responsive modal */
@media (max-width: 767px) {
    .modal-body .flex-md-row {
        flex-direction: column !important;
    }

    .modal-body .flex-shrink-0 {
        width: 100%;
        min-width: 100%;
    }

    .modal-body .card-img,
    .modal-body .modal-room-img {
        width: 100% !important;
        height: auto !important;
        max-width: 100%;
        min-width: 100%;
        min-height: auto;
        aspect-ratio: 1 / 1;
    }
}

/* Navbar logo - asegurar que sea visible */
.navbar .small-header-logo,
.navbar picture img {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 160px !important;
    height: 51px !important;
    max-width: 160px;
    max-height: 51px;
    object-fit: contain;
    position: static !important;
}

.navbar picture {
    display: block !important;
    line-height: 0;
}

.navbar a[aria-label="Home"] {
    display: block;
    line-height: 0;
}

/* Print styles */
@media print {
    .embla__button,
    .embla__dots {
        display: none;
    }

    .embla__slide {
        page-break-inside: avoid;
    }
}

