/* 1. Ajustes generales (Reset) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* Esto hace que al hacer clic en el menú, la página baje suavemente */
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    background-color: #1B263B;
    /* Color del footer para el overscroll abajo */
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: 15px;
}

body {
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #FAF6ED;
    /* Mantiene el color principal del cuerpo */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Fallback */
    min-height: 100dvh;
    /* Altura dinámica para móviles */
}

main {
    flex: 1;
}

/* 2. Encabezado y Navegación */

nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
    /* Replaces the user's margin-left: 40px on li for better flexbox practice */
}

nav a {
    color: #8e7515;
    text-decoration: none;
    font-weight: 300;
    /* Applied directly to the anchor tag to override browser defaults */
    transition: color 0.3s ease;
    letter-spacing: 1px;
    -webkit-tap-highlight-color: transparent;
}

nav a:visited,
nav a:active {
    color: #8e7515;
}

/* ¡Aquí está el hover del que hablábamos! */
@media (hover: hover) {
    nav a:hover {
        color: #2c3e50;
    }
}

/* 3. Estilo general de las Secciones */
section {
    padding: 4rem 5%;
    text-align: center;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

#servicios {
    background-color: #FAF6ED;
}

#galeria {
    background-color: #E2D9C8;
}

.fotos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

.fotos img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

#contacto {
    background-color: #FAF6ED;
}

.contacto-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 40px;
    max-width: 1100px;
    margin: 2rem auto 0;
    text-align: left;
}

.contacto-info {
    flex: 1;
    background-color: #E2D9C8;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contacto-info h3 {
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 2px;
    color: #2c3e50;
    margin-bottom: 20px;
}

.contacto-info p {
    font-size: 1.2rem;
    margin: 15px 0;
    color: #4c5051;
}

.contacto-info strong {
    color: #8e7515;
}

.horarios-card {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.horarios-card h3 {
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 2px;
    color: #2c3e50;
    margin-bottom: 20px;
}

.horario-detalle {
    background-color: #FAF6ED;
    border-left: 5px solid #8e7515;
    padding: 15px;
    border-radius: 4px 8px 8px 4px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.horario-detalle .dias {
    font-weight: 500;
    color: #6c757d;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.horario-detalle .horas {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
    margin-top: 5px;
}

.contacto-mapa {
    flex: 1.2;
    display: flex;
}

.contacto-mapa iframe {
    flex: 1;
    height: 100% !important;
    min-height: 450px;
}

@media (max-width: 768px) {
    .contacto-container {
        flex-direction: column;
    }

    .contacto-mapa {
        width: 100%;
        min-height: 350px;
    }
}

footer {
    background-color: #1B263B;
    color: white;
    text-align: center;
    padding: 1.5rem;
    font-weight: 300;
    letter-spacing: 1px;
}

footer p {
    opacity: 0.8;
    font-size: 0.9rem;
}

.btn-wsp {
    position: fixed;
    bottom: 80px;
    right: 30px;
    background-color: white;
    color: #25d366;
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    border: 2px solid #25d366;
}

.btn-wsp:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
    background-color: #f0fdf4;
}

.wsp-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    /* Removed the brightness filter so the original whatsapp-icon.png colors are visible */
}

@media (max-width: 768px) {
    .btn-wsp {
        padding: 14px;
        gap: 0;
        border-radius: 50%;
    }

    .btn-wsp span {
        max-width: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-width 0.4s ease, opacity 0.3s ease, margin-left 0.3s ease;
        white-space: nowrap;
        margin-left: 0;
    }

    .btn-wsp.expanded {
        padding: 12px 24px;
        border-radius: 50px;
    }

    .btn-wsp.expanded span {
        max-width: 150px;
        opacity: 1;
        margin-left: 10px;
        /* Simula el gap */
    }
}

/* 4. Hero Section */
#hero {
    background-image: linear-gradient(rgba(35, 45, 60, 0.75), rgba(35, 45, 60, 0.75)), url('public/hero_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    padding: 0 5%;
    position: relative;
}

/* 2. Encabezado y Navegación */
header {
    background-color: #E2D9C8;
    color: #8e7515;
    padding: 0.8rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

header.header-hidden {
    transform: translateY(-100%);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    /* Helps balance the flex space */
}

.header-logo {
    height: 50px;
    max-width: 180px;
    width: auto;
    object-fit: contain;
    /* Removed the filter so it shows its native gold color */
}

.header-title {
    flex: 2;
    /* Takes up center space perfectly */
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.header-title h1 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 3px;
    margin: 0;
    line-height: 1.2;
    color: #8e7515;
}

.header-title span {
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.9;
    color: #8e7515;
}

nav {
    flex: 1;
    /* Balances with logo-container */
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 790px) {
    header {
        flex-direction: column;
        padding: 1rem 5%;
        gap: 15px;
    }

    .logo-container {
        justify-content: center;
    }

    .header-logo {
        height: 60px;
    }

    .header-title h1 {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }

    .header-title span {
        font-size: 0.8rem;
    }

    nav {
        justify-content: center;
        width: 100%;
    }

    nav ul {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Generic Section Header Styles */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-subtitle {
    font-style: italic;
    color: #8e7515;
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 300;
    color: #2c3e50;
    letter-spacing: 3px;
}

.header-line {
    width: 60px;
    height: 3px;
    background-color: #8e7515;
    margin: 15px auto;
}

.servicios-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1050px;
    margin: 0 auto;
}

.servicio-item {
    background-color: white;
    padding: 30px 20px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    cursor: default;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1 / 1;
    /* Makes each service its own square */
    border: 1px solid #eaeaea;
    border-bottom: 4px solid #8e7515;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    border-radius: 8px;
}

.servicio-item.active {
    background-color: #8e7515;
    /* Golden hover */
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 15px 30px rgba(142, 117, 21, 0.3);
    border-color: #8e7515;
    outline: none;
    /* Remover outline azul feo del navegador en móviles */
}

@media (hover: hover) {
    .servicio-item:hover {
        background-color: #8e7515;
        transform: scale(1.05);
        z-index: 10;
        box-shadow: 0 15px 30px rgba(142, 117, 21, 0.3);
        border-color: #8e7515;
        outline: none;
    }
}

.servicio-icon {
    width: 55px;
    height: 55px;
    margin-bottom: 20px;
    /* CSS filter approximating #8e7515 gold */
    filter: invert(47%) sepia(34%) saturate(836%) hue-rotate(7deg) brightness(97%) contrast(87%);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.servicio-item.active .servicio-icon {
    filter: brightness(0) invert(1);
    /* Turns white on hover */
    transform: scale(1.1);
}

@media (hover: hover) {
    .servicio-item:hover .servicio-icon {
        filter: brightness(0) invert(1);
        transform: scale(1.1);
    }
}

.servicio-item h3 {
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 1px;
    color: #2c3e50;
    transition: color 0.3s ease;
    text-transform: uppercase;
}

.servicio-item.active h3 {
    color: white;
}

@media (hover: hover) {
    .servicio-item:hover h3 {
        color: white;
    }
}

.servicio-desc {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.5;
    color: #ffffff;
    margin-top: 0;
}

.servicio-item.active .servicio-desc {
    max-height: 150px;
    opacity: 1;
    margin-top: 15px;
}

@media (hover: hover) {
    .servicio-item:hover .servicio-desc {
        max-height: 150px;
        opacity: 1;
        margin-top: 15px;
    }
}

.hero-split {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    gap: 40px;
    text-align: center;
}

.hero-half {
    flex: 1;
    padding: 20px;
}

.hero-divider {
    width: 2px;
    height: 180px;
    background-color: rgba(255, 255, 255, 0.3);
}

.hero-half .subtitle {
    font-size: 1.3rem;
    font-style: italic;
    font-weight: 300;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.hero-half h2 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 20px;
    letter-spacing: 3px;
    color: white;
}

.short-hr {
    width: 60px;
    margin: 0 auto 20px auto;
    border: none;
    border-top: 2px solid rgba(255, 255, 255, 0.7);
}

.hero-half .registro {
    font-size: 1.2rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
}

.absolute-scroll {
    position: absolute;
    bottom: 30px;
}

@media (max-width: 768px) {
    #hero {
        background-attachment: scroll;
    }

    .hero-split {
        flex-direction: column;
        gap: 15px;
    }

    .hero-divider {
        width: 150px;
        height: 2px;
    }

    .hero-half h2 {
        font-size: 2.2rem;
    }

    .hero-half {
        padding: 10px;
    }
}

.scroll-down {
    display: inline-block;
    animation: bounce 2s infinite;
    transition: transform 0.3s ease;
}

.scroll-down:hover {
    transform: scale(1.1);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-15px);
    }

    60% {
        transform: translateY(-7px);
    }
}