/* RESET Y ESTILOS GENERALES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

section {
    padding: 80px 0;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    color: #2a2b2a;
}

h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #2a7d2e;
    margin: 15px auto;
    border-radius: 2px;
}

/* HEADER Y NAVEGACIÓN */
header {
    background-color: #fff;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Usar grid para una distribución equitativa: logo (izq), navegación (centro), acciones (der) */
.header-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 15px 0;
    position: relative;
}

/* Mantener alineación interna de los elementos hijos */
.header-container > * {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Asegurar que el logo quede en la izquierda */
.header-container .logo-img,
.header-container > :first-child {
    justify-self: start;
}

/* Centrar la navegación en la columna central */
.header-container .nav-menu {
    justify-self: center;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Colocar el botón de acciones (hamburguesa, etc.) a la derecha */
.header-container .menu-toggle,
.header-container .header-actions,
.header-container > :last-child {
    justify-self: end;
}

/* Ajustes del logo */
.logo-img {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.logo-img:hover {
    transform: scale(1.05);
}

/* MENÚ HAMBURGUESA - ESTILOS CORREGIDOS */
/* Por defecto oculto; se muestra únicamente en pantallas móviles */
.menu-toggle {
    display: none !important;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
    background: none;
    border: none;
    width: 35px;
    height: 30px;
    position: relative;
    align-items: center;
    justify-content: center;
}

/* Icono de 3 barras (accesible via pseudo-element) */
.menu-toggle::before {
    content: '\2630'; /* ≡ Unicode hamburger icon */
    font-size: 18px;
    color: #29662c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.25s ease;
    line-height: 1;
}

/* Cambia el icono a una 'X' cuando está activo */
.menu-toggle.active::before {
    content: '\2715'; /* ✕ */
    transform: translate(-50%, -50%) rotate(90deg);
}

/* Líneas originales (se dejan por compatibilidad visual si usas ambas) */
.hamburger-line {
    display: block;
    height: 3px;
    width: 100%;
    background: #2a7d2e;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
    transform-origin: center;
}

/* Estados del menú hamburguesa */
.menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* NAVEGACIÓN PRINCIPAL - ESCRITORIO */
.nav-menu {
    display: block;
}

.menu-list {
    display: flex;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
    gap: 30px;
    justify-content: center; /* garantiza que los elementos del menú estén centrados en la columna central */
}

.menu-list li {
    margin: 0; /* eliminar margen izquierdo para evitar desplazamientos acumulados */
    position: relative;
}

.menu-list li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 0;
    position: relative;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.menu-list li a:hover {
    color: #2a7d2e;
}

.menu-list li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #2a7d2e;
    transition: width 0.3s ease;
}

.menu-list li a:hover::after {
    width: 100%;
}

/* Fallback responsive: en móviles volvemos a flex para evitar problemas con grid */
@media (max-width: 768px) {
    .header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        grid-template-columns: none;
    }

    .header-container .nav-menu {
        justify-self: auto;
        display: block;
    }

    .menu-toggle {
        display: flex !important;
        justify-self: auto;
    }
}

/* SUBMENÚ - ESCRITORIO */
.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 220px;
    z-index: 100;
}

.sub-menu li {
    margin: 0;
    width: 100%;
}

.sub-menu a {
    display: block;
    padding: 12px 20px;
    width: 100%;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.sub-menu a:hover {
    background: #f8f9fa;
    color: #2a7d2e;
}

.sub-menu a::after {
    display: none;
}

.menu-item-has-children:hover .sub-menu {
    display: block;
}

.menu-item-has-children > a i {
    margin-left: 5px;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.menu-item-has-children:hover > a i {
    transform: rotate(180deg);
}

.mobile-title {
    display: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0d0e0d;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Forzar visibilidad solo en móviles (se aplica en la carga y cuando la pantalla cumple el ancho) */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex !important;
    }
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }
}

/* OVERLAY PARA MÓVIL */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* HERO SECTION */
/* HERO SECTION - SIN TRANSPARENCIA */
.hero {
    background: url('images/glamping-6490987.jpg') center center / cover no-repeat;
    -webkit-background-size: cover;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Evitar background-attachment: fixed en móviles (puede causar que la imagen no se muestre bien) */
    background-attachment: scroll;
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    margin-top: 80px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-logo {
    width: 60%;
    max-width: 300px;
    height: auto;
    margin-bottom: 30px;
    filter: brightness(0) invert(1);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    font-weight: 700; /* Bold */
    line-height: 1.8;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px; /* Espaciado ligeramente mayor */
}

.btn {
    display: inline-block;
    color: white;
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
    cursor: pointer;
}

.btn:hover {
    box-shadow: 0 10px 25px rgba(42, 125, 46, 0.3);
}

/* Ajustes específicos para dispositivos móviles:
   - Forzar que background-attachment sea scroll (mejor soporte y claridad)
   - Garantizar un mínimo de altura razonable para que la imagen se vea
*/
@media (max-width: 768px) {
    .hero {
        background-attachment: scroll !important;
        background-position: center center !important;
        background-size: cover !important;
        min-height: 60vh;
        height: auto;
        margin-top: 70px;
        padding: 40px 0;
    }

    .hero-logo {
        width: 70%;
        max-width: 250px;
    }

    .hero p {
        font-size: 1.05rem;
        margin-bottom: 20px;
    }
}

/* QUIÉNES SOMOS */
.about {
    background: white;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

.about-image {
    flex: 1;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.about-image video {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.about-image:hover video {
    transform: scale(1.05);
}

/* CÓMO FUNCIONA */
.how-it-works {
    background: #f8f9fa;
}

.steps {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.step {
    flex: 1;
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.step:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.step-icon {
    font-size: 50px;
    color: #2a7d2e;
    margin-bottom: 25px;
}

.step h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #151615;
}

.step p {
    font-size: 1rem;
    line-height: 1.7;
    color: #666;
}

/* MISIÓN Y VISIÓN */
.mission-vision {
    background: white;
}

.mv-container {
    display: flex;
    gap: 40px;
}

.mission, .vision {
    flex: 1;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-left: 5px solid #2a7d2e;
}

.mission h3, .vision h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #2a7d2e;
    display: flex;
    align-items: center;
}

.mission h3 i, .vision h3 i {
    margin-right: 15px;
    font-size: 1.3rem;
}

.mission p, .vision p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
}

/* PROYECTOS */
.projects {
    background: #f8f9fa;
}

.project-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.project-card {
    flex: 1;
    min-width: 300px;
    max-width: 350px;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.project-image {
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #2a7d2e;
}

.project-info p {
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
}

.project-info .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2a7d2e;
    margin: 20px 0;
}

.project-info .btn {
    width: 100%;
    text-align: center;
    padding: 12px;
    font-size: 0.95rem;
}

/* FORMULARIO DE CONTACTO */
.contact {
    background: white;
}

.contact-container {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-form {
    flex: 1;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: #2a7d2e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    margin-right: 20px;
    flex-shrink: 0;
}

.contact-item h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #2a7d2e;
}

.contact-item p {
    color: #363636;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 25px;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: #2a7d2e;
    background: white;
    box-shadow: 0 0 0 3px rgba(42, 125, 46, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
    font-family: 'Poppins', sans-serif;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #2a7d2e;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.social-links a:hover {
    background: #1f5c22;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(42, 125, 46, 0.3);
}

/* FOOTER */
footer {
    background: linear-gradient(135deg, #1a4721, #2a7d2e);
    color: white;
    padding: 60px 0 30px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: #d4af37;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #e0e0e0;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-col ul li a:hover {
    color: white;
    padding-left: 8px;
}

.footer-col p {
    color: #e0e0e0;
    line-height: 1.7;
    margin-bottom: 20px;
}

.copyright {
    text-align: center;
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: #e0e0e0;
}

/* BOTÓN DE WHATSAPP */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: whatsapp-pulse 2s infinite;
    transition: all 0.3s ease;
    will-change: transform;
    text-decoration: none;
}

/* girar el icono 360º al pasar el cursor */
.whatsapp-float i {
    transition: transform 0.8s ease-in-out;
    will-change: transform;
}

.whatsapp-float:hover i {
    transform: rotate(360deg);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-float i {
    color: white;
    font-size: 1.8rem;
}

@keyframes whatsapp-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* =============================== */
/* RESPONSIVE DESIGN - CORREGIDO */
/* =============================== */

@media (max-width: 1200px) {
    .container {
        width: 95%;
    }
}

@media (max-width: 992px) {
    .about-content, .mv-container, .contact-container {
        flex-direction: column;
        gap: 40px;
    }
    
    .steps {
        flex-wrap: wrap;
        gap: 25px;
    }
    
    .step {
        min-width: calc(50% - 15px);
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
}

/* ESTILOS MÓVIL - CORREGIDOS Y GARANTIZADOS */
@media (max-width: 768px) {
    /* HEADER MÓVIL */
    .header-container {
        padding: 12px 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .mobile-title {
        display: block;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* NAVEGACIÓN MÓVIL - CORREGIDA */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        box-shadow: -5px 0 25px rgba(0,0,0,0.15);
        transition: right 0.4s ease;
        z-index: 1001;
        padding: 80px 25px 30px;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .menu-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
    
    .menu-list li {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .menu-list li:last-child {
        border-bottom: none;
    }
    
    .menu-list li a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 0;
        width: 100%;
        font-size: 1.1rem;
        font-weight: 500;
    }
    
    /* SUBMENÚ MÓVIL */
    .sub-menu {
        position: static;
        box-shadow: none;
        display: none;
        background: #f8f9fa;
        width: 100%;
        margin: 10px 0;
        border-radius: 8px;
        padding: 0;
    }
    
    .sub-menu.active {
        display: block;
    }
    
    .sub-menu li {
        border-bottom: 1px solid #e9ecef;
    }
    
    .sub-menu li:last-child {
        border-bottom: none;
    }
    
    .sub-menu a {
        padding: 12px 15px;
        font-size: 1rem;
        color: #666;
    }
    
    .sub-menu a:hover {
        background: #e9ecef;
        color: #2a7d2e;
    }
    
    .menu-item-has-children > a i {
        transition: transform 0.3s ease;
    }
    
    .menu-item-has-children > a.active i {
        transform: rotate(180deg);
    }
    
    /* CONTENIDO RESPONSIVE */
    .step {
        min-width: 100%;
    }
    
    .hero-logo {
        width: 70%;
        max-width: 250px;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    h2 {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .project-card {
        min-width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 576px) {
    .header-container {
        padding: 10px 0;
    }
    
    .logo-img {
        height: 40px;
    }
    
    .hero {
        margin-top: 70px;
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-content {
        padding: 0 15px;
    }
    
    .hero-logo {
        width: 80%;
        margin-bottom: 20px;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .btn {
        padding: 12px 30px;
        font-size: 0.95rem;
    }
    
    section {
        padding: 50px 0;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .footer-container {
        gap: 30px;
    }
    
    .footer-col {
        min-width: 100%;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-float i {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        width: 85%;
        max-width: 300px;
    }
}