/* Base Styles & Variables */
:root {
    --primary-color: #2E5E3B; /* Verde Bosque */
    --secondary-color: #5A3A23; /* Marrón Madera */
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-light: #f9f9f9;
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    overflow-x: hidden;
}

/* 1. PANTALLA DE CARGA (Preloader) */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

/* 2. HERO SECTION */
#hero-scroll-container {
    height: 300vh; /* creates scroll track */
    position: relative;
    z-index: 1; /* ensures it sits below main content naturally */
}

/* El video hero tiene estilos inline fijos tal como se solicitó, no hace falta CSS extra, 
pero podemos asegurar su comportamiento de object-position */
#hero-video {
    object-position: center;
}

.hero-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    width: 90%;
    max-width: 800px;
    color: var(--text-light);
    background: rgba(0,0,0,0.4); /* subtle dark background for contrast */
    padding: 3rem 2rem;
    border-radius: 16px;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease; /* smooth fade out */
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* 4. SECCIONES INFERIORES */
.main-content {
    position: relative;
    background-color: #ffffff;
    width: 100%;
    z-index: 20; /* Above fixed hero content and video */
    padding-top: 2rem; 
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
    /* margin-top will naturally push it below the 300vh #hero-scroll-container */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-weight: 700;
}

/* Services Grid */
.services-section {
    padding: 5rem 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: #ffffff;
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 4px solid var(--secondary-color);
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-bottom-color: var(--primary-color);
}

.icon-wrapper {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.service-card p {
    color: #555;
    line-height: 1.6;
    font-size: 1rem;
}

/* About Section */
.about-section {
    padding: 5rem 0;
    background-color: #f1f1f1;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #444;
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-logo h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
}

.footer-logo p {
    font-size: 0.9rem;
    letter-spacing: 2px;
    opacity: 0.8;
    color: #d1bfae;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    margin-left: 2rem;
    transition: color 0.3s ease, opacity 0.3s ease;
    font-weight: 600;
}

.footer-links a:hover {
    color: var(--primary-color);
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    opacity: 0.6;
}

/* Floating WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    background-color: #20b858;
}

/* 3. DISEÑO RESPONSIVE (Móviles) */
@media (max-width: 768px) {
    #hero-video {
        /* CRÍTICO: Ajuste de layout para móviles para no recortar la cabaña */
        object-fit: cover;
        object-position: center; 
    }

    .hero-content {
        width: 95%;
        padding: 2rem 1.5rem;
    }

    .hero-content h1 {
        font-size: 2.5rem; /* Tamaño de fuente reducido */
    }

    .hero-content p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

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

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .footer-links a {
        margin-left: 0;
    }
}
