:root {
    --primary-blue: #4CA1B9;
    --dark-blue: #2B7A78;
    --gold-accent: #A1903A;
    --bg-white: #FFFFFF;
    --bg-light: #F4F9F9;
    --text-dark: #A1903A;
    --text-muted: #A1903A;
}

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

/* 1. Scroll e integración con Navbar */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 110px;
}

body {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    padding-top: 110px;
}

/* 2. Header & Navegación Fija */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--bg-white);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3rem 5%;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo img {
    height: 50px;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.logo-link:hover img {
    opacity: 1;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold-accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.brand-subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-blue);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-blue);
}

.nav-links a.active {
    color: var(--primary-blue) !important;
    font-weight: 700;
    position: relative;
}

.btn-book {
    background-color: var(--primary-blue);
    color: var(--bg-white);
    padding: 0.6rem 1.4rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-book:hover {
    background-color: var(--dark-blue);
}

/* Header Actions (Tiempo y WhatsApp) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-dark);
}

.weather-widget {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    font-size: 1rem;
}

.weather-icon {
    font-size: 1.25rem;
    color: var(--primary-blue);
    vertical-align: middle;
}

.contact-link {
    text-decoration: none;
    font-size: 1.3rem;
    color: var(--text-dark);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

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

.action-divider {
    color: #DDDDDD;
    font-weight: 100;
}

/* 3. Hero Slider Minimalista */
.hero-slider {
    width: 100%;
    height: calc(85vh - 80px);
    position: relative;
    overflow: hidden;
}

.hero-swiper {
    width: 100%;
    height: 100%;
}

.hero-swiper .swiper-wrapper {
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.hero-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.03);
    transition: transform 2.2s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.80;
}

.hero-swiper .swiper-slide-active img {
    transform: scale(1);
}

.hero-swiper .swiper-pagination-bullet {
    background: #FFFFFF;
    opacity: 0.5;
    width: 8px;
    height: 8px;
    transition: all 0.3s ease;
}

.hero-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--primary-blue);
    width: 24px;
    border-radius: 4px;
}

.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: #FFFFFF;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.hero-swiper .swiper-button-next:hover,
.hero-swiper .swiper-button-prev:hover {
    opacity: 1;
}

.hero-swiper .swiper-button-next::after,
.hero-swiper .swiper-button-prev::after {
    font-size: 1.5rem;
}

/* 4. Sección ABOUT OUR CASA */
.about-casa-section {
    position: relative;
    padding: 7rem 5% 6rem 5%;
    background-color: var(--bg-white);
    color: var(--text-dark);
    overflow: hidden;
}

.about-casa-container {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.casa-subtitle {
    font-family: 'Oswald', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gold-accent);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 1rem;
}

.casa-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2.8rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #4CA1B9;
    margin-bottom: 1.5rem;
}

.casa-divider {
    width: 100px;
    height: 10px;
    margin: 0 auto 3rem auto;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 12" fill="none" stroke="%234CA1B9" stroke-width="2" stroke-linecap="round"><path d="M0,6 C20,6 25,1 35,1 C45,1 50,11 60,11 C70,11 75,6 100,6"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
}


.about-casa-body {
    max-width: 800px;
    margin: 0 auto 4rem auto;
}

.casa-text-highlight {
    font-size: 1.3rem;
    font-weight: 300;
    line-height: 1.6;
    color: #A1903A;
    margin-bottom: 2rem;
}

.casa-text-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-muted);
    font-weight: 300;
}

/* Layout en fila de 3 columnas */
.about-casa-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

/* Contenedor de cada tarjeta de imagen */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    height: 300px;
    background-color: var(--dark-blue); /* Cambiado de #1a252f a #2B7A78 */
}

/* Estilo de la imagen */
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Efecto hover sobre la imagen: reduce opacidad y hace zoom ligero */
.gallery-item:hover img {
    opacity: 0.25; /* Transparencia de la foto al hacer hover */
    transform: scale(1.05);
}

/* Overlay con el texto */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
    color: #ffffff;
    opacity: 0; /* Oculto por defecto */
    transition: opacity 0.4s ease;
    pointer-events: none; /* Para que la interacción principal siga en la imagen/tarjeta */
}

/* Mostrar overlay al hacer hover */
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Estilos para el texto y año */
.gallery-year {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    border-bottom: 2px solid #ffffff;
    padding-bottom: 4px;
}

.gallery-text {
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0;
}

.main-img {
    height: 480px;
}

.side-img {
    height: 380px;
}

/* Iconos de Fondo */
.maritime-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.bg-icon {
    position: absolute;
    font-size: 4.5rem;
    color: var(--primary-blue);
    opacity: 0.10;
    transition: opacity 0.6s ease, transform 0.6s ease, color 0.6s ease;

}

/* Clase que se añade con JavaScript al entrar en pantalla */
.bg-icon.visible {
    opacity: 0.40; /* Se vuelve mucho más marcado */
    transform: scale(1.1) rotate(5deg); /* Crece sutilmente */
}

.icon-1 { top: 45%; left: 3%; transform: rotate(-15deg); }
.icon-2 { top: 30%; right: 3%; transform: rotate(10deg); color: var(--gold-accent); }
.icon-3 { bottom: 3%; left: 9%; transform: rotate(5deg); }
.icon-4 { bottom: 12%; right: 4%; transform: rotate(-20deg); color: var(--gold-accent); }

/* 5. General Layout & Cards (Para futuras secciones) */
.section-title {
    color: var(--gold-accent);
    margin-bottom: 2rem;
    font-size: 2rem;
    position: relative;
    z-index: 1;
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.card {
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-bottom: 4px solid var(--primary-blue);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

main, footer {
    position: relative;
    z-index: 1;
}

footer {
    opacity: 0.70;
    background-color: #A1903A;
    color: var(--bg-white);
    padding: 2rem 5%;
    text-align: center;
    font-size: 0.9rem;
}

.gallery-item img.img-bw {
    filter: grayscale(100%);
}

/* Filtro Sepia para la segunda imagen */
.gallery-item img.img-sepia {
    filter: sepia(90%) contrast(105%);
}

/* Transición suave para que la combinación de filtro + transparencia/zoom funcione fluidamente */
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
}

/* 6. Media Queries */
@media (max-width: 768px) {
    .about-casa-section {
        padding: 4rem 5%;
    }

    .casa-title {
        font-size: 2rem;
    }

    .casa-text-columns {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .about-casa-gallery {
        grid-template-columns: 1fr; /* Cambia a 1 columna en móviles */
    }

    .main-img, .side-img {
        height: 300px;
    }
}

/* --- Botón Móvil (Oculto en escritorio) --- */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-dark);
    cursor: pointer;
}

/* --- Adaptación Responsive para Móviles (Hasta 768px) --- */
@media (max-width: 768px) {
    /* Ajustes generales de altura y padding */
    html {
        scroll-padding-top: 80px;
    }
    
    body {
        padding-top: 80px;
    }

    .navbar {
        padding: 1rem 4%;
    }

    .brand-title {
        font-size: 1rem;
    }

    .brand-subtitle {
        font-size: 0.75rem;
    }

    .logo img {
        height: 40px;
    }

    /* Mostrar botón hamburguesa */
    .mobile-menu-toggle {
        display: block;
    }

    /* Desplegable del menú de navegación */
    .nav-links {
        display: none; /* Oculto por defecto */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-white);
        padding: 1.5rem 0;
        gap: 1.2rem;
        text-align: center;
        box-shadow: 0 10px 15px rgba(0,0,0,0.05);
        border-top: 1px solid #EEEEEE;
    }

    /* Clase activa que añade el JS al pulsar el botón */
    .nav-links.nav-open {
        display: flex;
    }

    /* Ajuste visual del widget del tiempo y WhatsApp */
    .header-actions {
        gap: 0.8rem;
    }
    
    .weather-widget {
        font-size: 0.9rem;
    }
}