:root {
    --verde-principal: #76c143;
    --verde-oscuro: #5ea332;
    --gris-oscuro: #2c3e50;
    --gris-medio: #7f8c8d;
    --gris-claro: #f8f9fa;
    --blanco: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
}

body {
    color: var(--gris-oscuro);
    background-color: var(--blanco);
    line-height: 1.6;
    padding-top: 80px;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 5000;
    /* Suficiente para estar sobre el hero */
    background: white;
    height: 80px;
    /* Altura fija para poder calcular el resto */
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 24px;
}

.brand-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--gris-oscuro);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70px;
    width: 70px;
    margin-right: 15px;
    overflow: hidden;
    border-radius: 50%;
    background-color: transparent;
    flex-shrink: 0;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 56px;
}

.brand-name {
    font-size: 1.7rem;
    font-weight: 800;
    color: #2c3e50;
    letter-spacing: -0.4px;
    line-height: 1.1;
}

.brand-location {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gris-medio);
    margin-top: 4px;
    line-height: 1;
}

nav {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: flex-end;
    margin-left: 20px;
}

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

nav ul li {
    margin-left: 28px;
}

nav ul li a {
    text-decoration: none;
    color: var(--gris-oscuro);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
    white-space: nowrap;
}

nav ul li a:hover {
    color: var(--verde-principal);
}

.btn-contratar-nav {
    background-color: var(--verde-principal); /* Cambiado a verde */
    color: var(--blanco) !important;          /* Texto blanco */
    padding: 12px 22px;
    border-radius: 5px;
    font-weight: 700;
    display: inline-block;
    cursor: pointer;          /* Ahora es un puntero de clic */
    pointer-events: auto;     /* Activa la interacción */
    transition: background 0.3s;
}

.btn-contratar-nav:hover {
    background-color: var(--verde-oscuro);
}

/* --- Efecto Header Compacto al Scroll --- */
header.compact {
    height: 60px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* header.compact .brand-text { display: none; } */
/* header.compact .logo { height: 50px; width: 50px; } */
header.compact .logo {
    height: 40px !important;
    width: 40px !important;
}

header.compact .brand-text {
    font-size: 0.8rem;
    /* Opcional: reducir un poco el texto al bajar */
}

/* Hero, Ventajas, Secciones (Tu código original) */
.hero {
    position: relative;
    width: 100%;
    padding-top: 80px;
    /* Exactamente lo que mide el header */
    min-height: 80vh;
    /* Se adapta a la pantalla */
    background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), url('background.jpeg') center/cover;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    box-sizing: border-box;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 35px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.btn-hero {
    display: inline-block;
    background-color: var(--verde-principal);
    color: var(--blanco);
    text-decoration: none;
    padding: 15px 35px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(118, 193, 67, 0.4);
    transition: transform 0.3s, background 0.3s;
}

.btn-hero:hover {
    background-color: var(--verde-oscuro);
    transform: translateY(-3px);
}

.intro-section {
    padding: 80px 20px 40px 20px;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

.intro-title {
    font-size: 3.2rem;
    color: var(--gris-oscuro);
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
}

.intro-subtitle {
    font-size: 1.6rem;
    color: var(--verde-principal);
    font-weight: 700;
    margin-bottom: 25px;
}

.intro-text {
    font-size: 1.15rem;
    color: var(--gris-medio);
    max-width: 850px;
    margin: 0 auto;
    line-height: 1.8;
}

.intro-text .highlight {
    color: var(--verde-principal);
    font-weight: 600;
    background-color: rgba(118, 193, 67, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
}

section {
    padding: 80px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--verde-principal);
    border-radius: 2px;
}

.bg-gris {
    background-color: var(--gris-claro);
    max-width: 100%;
}

.grid-ventajas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.card-ventaja {
    background: var(--gris-claro);
    padding: 35px 25px;
    border-radius: 8px;
    text-align: center;
    border-top: 5px solid var(--verde-principal);
    transition: transform 0.3s;
}

.card-ventaja:hover {
    transform: translateY(-5px);
}

.card-ventaja h3 {
    margin-bottom: 15px;
    font-size: 1.25rem;
    color: var(--gris-oscuro);
}

.card-ventaja p {
    font-size: 0.95rem;
    color: #566573;
}

.grid-pasos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    text-align: center;
    margin-top: 20px;
}

.paso-box {
    position: relative;
    padding: 20px;
}

.paso-numero {
    font-size: 3.5rem;
    font-weight: 900;
    color: rgba(118, 193, 67, 0.2);
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    line-height: 1;
}

.paso-box h3 {
    font-size: 1.3rem;
    color: var(--gris-oscuro);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.grid-precios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.card-precio {
    background: var(--blanco);
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 25px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s, border-color 0.3s, transform 0.3s;
}

.card-precio:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--verde-principal);
    transform: translateY(-4px);
}

.card-precio h3 {
    font-size: 1.35rem;
    margin-bottom: 20px;
    color: #2c3e50;
    font-weight: 700;
}

.trastero-img-placeholder {
    height: 130px;
    background: #fdfefe;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border-radius: 4px;
}

.card-precio p {
    color: #566573;
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
    min-height: 70px;
}

.card-precio .dimensions-box {
    font-size: 0.95rem;
    color: var(--gris-oscuro);
    font-weight: 700;
    margin-top: auto;
    background: #edf2f7;
    padding: 8px 10px;
    border-radius: 4px;
    display: inline-block;
    width: 100%;
    border-left: 3px solid var(--verde-principal);
}

.ubicacion-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
}

.contacto-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--blanco);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--verde-principal);
    outline: none;
}

.btn-submit {
    width: 100%;
    background-color: var(--verde-principal);
    color: var(--blanco);
    border: none;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit:hover {
    background-color: var(--verde-oscuro);
}

footer {
    background-color: var(--gris-oscuro);
    color: #bdc3c7;
    padding: 60px 20px 0 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--verde-principal);
    margin-bottom: 20px;
    font-size: 1rem;
    text-transform: uppercase;
}

.footer-col p,
.footer-col a {
    font-size: 0.9rem;
    color: #bdc3c7;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
}

.footer-copyright {
    background-color: #000000;
    color: #bdc3c7;
    font-size: 0.85rem;
    padding: 18px 20px;
    text-align: center;
    margin-top: 20px;
}

.footer-logo {
    font-weight: 800;
    color: var(--verde-principal);
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.2;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--blanco);
    margin-bottom: 20px;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--verde-principal);
}

.faq-item h3 {
    color: var(--gris-oscuro);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.faq-item p {
    color: var(--gris-medio);
    font-size: 0.95rem;
    line-height: 1.6;
}

section,
.section-title,
#como-funciona,
#tarifas,
#contacto,
#faq {
    scroll-margin-top: 20px;
}

html {
    scroll-behavior: smooth;
}

.footer-contact-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
}

.footer-contact-item a {
    display: inline !important;
    margin-bottom: 0 !important;
}

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

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

.whatsapp-float img {
    width: 35px;
    height: 35px;
}

/* Asegura que el botón esté oculto en pantallas grandes */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 2100;
}

.promo-sticker {
    position: absolute;
    top: 120px;
    right: 40px;
    background-color: #e74c3c;
    color: white;
    padding: 20px 40px;
    font-weight: 900;
    font-size: 1.8rem;
    text-transform: uppercase;
    transform: rotate(5deg);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    z-index: 100;
    border: 3px solid white;
}

/* Media Queries */
@media (max-width: 1250px) {
    .nav-container {
        padding: 10px 15px;
    }

    nav ul li {
        margin-left: 18px;
    }
}

@media (max-width: 1024px) {
    .nav-menu {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    /* Asegura que el logo/nombre no se aplaste */
    .brand-container {
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {

    body,
    html {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
    }

    .nav-container,
    section,
    .hero,
    .footer-content {
        width: 100% !important;
        max-width: 100vw !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .brand-text {
        display: flex;
    }

    .brand-name {
        font-size: 1.1rem;
    }

    .brand-location {
        font-size: 0.9rem;
    }

    .logo {
        height: 50px;
        width: 50px;
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.8rem;
        cursor: pointer;
        z-index: 2100;
        position: relative;
    }

    .nav-menu {
        display: none !important; /* Forzamos oculto por defecto */
        position: fixed !important; /* Fijo respecto a la ventana, no al contenedor padre */
        top: 80px !important;       /* Justo debajo de tu header */
        right: 0 !important;
        width: 220px !important;    /* Ancho controlado */
        height: auto !important;
        background: #ffffff !important;
        box-shadow: -5px 5px 15px rgba(0,0,0,0.3) !important;
        z-index: 99999 !important; /* Capa más alta posible */
        padding: 20px !important;
        flex-direction: column !important;
        border-radius: 0 0 0 10px !important;
    }

    /* 2. Clase de activación */
    .nav-menu.active {
        display: flex !important;
    }

    .nav-menu ul {
        flex-direction: column !important;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .nav-menu ul li a {
        display: block;
        padding: 12px 20px;
        text-decoration: none;
        color: var(--gris-oscuro);
    }

    .nav-menu::before {
        content: '';
        position: absolute;
        top: -8px;
        right: 15px;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-bottom: 8px solid #ffffff;
    }

    .grid-ventajas,
    .grid-precios,
    .grid-pasos {
        width: 100% !important;
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .footer-content {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 30px;
    }

    .promo-sticker {
        margin: 60px auto 10px auto;
        top: 80px;
        right: 10px;
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .hero, .promo-sticker, .brand-container {
        z-index: 1 !important; /* Todo lo demás por debajo */
    }
}

.legal-main {
    max-width: 1000px;
    margin: 120px auto 50px auto;
    padding: 0 20px;
}

.legal-main h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 30px;
}

.legal-main h2 {
    font-size: 1.5rem;
    color: #76c143;
    margin: 25px 0 10px 0;
}

.legal-main p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    /* Superior al header */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    text-align: center;
    position: relative;
}

.close-button {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    cursor: pointer;
}

/* Ajuste para que el sticker se vea clicable */
.promo-sticker {
    cursor: pointer;
}