/* --- ACCESIBILIDAD --- */
.skip-link {
    position: absolute; top: -100px; left: 0;
    background: var(--verde-pdf); color: white;
    padding: 10px 20px; z-index: 10000;
    font-size: 14px; text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* --- CONFIGURACIÓN GENERAL --- */
:root {
    --verde-pdf: #4a5d23;
    --gris-fondo: #e6e6e6;
    --gris-oscuro: #333333;
    --blanco: #ffffff;
    --font-texto: 'Lato', sans-serif;
    --font-titulo: 'Playfair Display', serif;
    --borde-suave: 12px;
    --borde-navbar: 50px; 
}

html {
    height: 100%;
    background-color: #222;
    overflow-x: hidden;
    width: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0; padding: 0;
    font-family: var(--font-texto); color: var(--gris-oscuro);
    background-color: #222;
    min-height: 100%;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    overscroll-behavior-y: none;
    
    /* EFECTO FADE-IN AL CARGAR LA PÁGINA */
    animation: fadeInPage 1s ease-out forwards;
    opacity: 0; 
}

@keyframes fadeInPage {
    to { opacity: 1; }
}

::selection {
    background-color: var(--verde-pdf);
    color: white;
}

h2.section-title-master, .intro-text h2 {
    font-family: var(--font-titulo); font-size: 50px; color: #555; 
    margin-bottom: 20px; line-height: 1; font-weight: 400;
}

/* --- MENÚ PC FLOTANTE --- */
.navbar {
    position: fixed; 
    top: 15px; 
    left: 50%; transform: translateX(-50%);
    width: 95%; max-width: 1300px; 
    background: transparent; 
    border-radius: var(--borde-navbar);
    padding: 8px 30px; 
    z-index: 1000; display: flex; justify-content: space-between; align-items: center;
    transition: all 0.4s ease;
    box-sizing: border-box;
}

.navbar.scrolled {
    background: rgba(26, 26, 26, 0.75); 
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); 
    border: 1px solid rgba(255,255,255,0.05); 
}

.nav-brand { display: flex; align-items: center; gap: 15px; text-decoration: none; }

.nav-logo-img { 
    height: 60px; 
    width: auto; filter: brightness(0) invert(1); 
    opacity: 0; 
    transform: translateY(-20px);
    transition: all 0.5s ease;
    pointer-events: none; 
    display: block; 
}

.nav-brand-text {
    color: #eee;
    font-family: var(--font-texto);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 14px;
    opacity: 0; 
    transform: translateY(-20px);
    transition: all 0.5s ease;
    white-space: nowrap;
}

.navbar.scrolled .nav-logo-img,
.navbar.scrolled .nav-brand-text {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-links { list-style: none; display: flex; gap: 25px; margin: 0; padding: 0; }
.nav-links a { 
    text-decoration: none; color: #eee; 
    text-transform: uppercase; font-size: 11px; letter-spacing: 2px; font-weight: bold; transition: color 0.3s; 
    text-shadow: 0 1px 3px rgba(0,0,0,0.5); 
}
.nav-links a:hover { color: var(--verde-pdf); }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0; z-index: 1002; }
.menu-toggle svg { width: 35px; height: 35px; stroke: white; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5)); }

.nav-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 998;
    opacity: 0; visibility: hidden; transition: 0.3s ease;
}
.nav-overlay.active { opacity: 1; visibility: visible; }

/* --- HERO SECTION --- */
#inicio { 
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    margin-top: 0;
    z-index: 0;
}

.hero-bg-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('img/fondo_madera.webp');
    background-image: image-set(url('img/fondo_madera.webp') type('image/webp'), url('img/fondo_madera.jpg') type('image/jpeg'));
    background-size: cover;
    background-position: center center;
    z-index: -1;
    animation: kenBurns 20s infinite alternate ease-in-out;
}

@keyframes kenBurns {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); } 
}

.overlay-dark {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.3); z-index: 1;
}

.hero-safe-zone {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100svh; 
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.logo-principal { 
    max-width: 90%; width: 600px; height: auto; 
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5)); 
    pointer-events: auto;
}

/* FLECHA FUNCIONAL */
.scroll-down { 
    position: absolute; 
    bottom: 30px; 
    font-size: 60px; color: white; cursor: pointer; text-shadow: 0 2px 5px rgba(0,0,0,0.5); 
    pointer-events: auto;
    text-decoration: none; /* Quitar subrayado al ser enlace */
    
    /* ANIMACIÓN DE REBOTE */
    animation: bounce 2s infinite; 
}
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 40% {transform: translateY(-20px);} 60% {transform: translateY(-10px);} }


/* --- OTRAS SECCIONES --- */
.fixed-bg-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: scroll; 
    display: flex; align-items: center; justify-content: center;
    text-align: center; z-index: 0;
}
@media (min-width: 1024px) {
    .fixed-bg-section { background-attachment: fixed; } 
}

.quote-section { min-height: 500px; padding: 60px 20px; }
.quote-section.gertrude { background-image: url('img/fondo_cita_gertrude.jpg'); }
.quote-section.audrey { background-image: url('img/fondo_cita.jpg'); }

.overlay-quote { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    background: rgba(60, 50, 40, 0.45); padding: 0 20px; color: white; 
}

.static-section {
    position: relative; background-color: white; padding: 80px 20px;
    z-index: 1; box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* TEXTOS */
.quote-text { font-family: var(--font-titulo); font-style: italic; font-size: 44px; font-weight: 400; line-height: 1.3; margin-bottom: 40px; text-shadow: 0 2px 10px rgba(0,0,0,0.3); max-width: 950px; }
.leaf-icon-svg { width: 45px; height: 45px; fill: none; stroke: white; stroke-width: 1.5; margin-bottom: 20px; opacity: 0.95; }
.quote-author { font-family: var(--font-texto); font-size: 14px; text-transform: uppercase; letter-spacing: 3px; font-weight: 400; margin-bottom: 8px; }
.quote-subtext { font-family: var(--font-texto); font-size: 13px; font-weight: 300; opacity: 0.85; letter-spacing: 1px; max-width: 600px; line-height: 1.5; }

.container { max-width: 1100px; margin: 0 auto; text-align: center; }

.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; text-align: center; max-width: 1100px; margin: 0 auto; padding-top: 40px; }
.intro-img { opacity: 0; transform: translateY(50px); transition: all 0.8s ease-out; }
.intro-img.appear { opacity: 1; transform: translateY(0); }

.intro-img img { 
    width: 100%; height: auto; display: block;
    filter: sepia(0.1) contrast(1.05);
    border-radius: var(--borde-suave);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.intro-text .subtitle { font-family: var(--font-texto); font-size: 13px; text-transform: uppercase; letter-spacing: 2px; color: #666; font-weight: bold; margin-bottom: 30px; display: block; line-height: 1.8; }
.green-underline { border-bottom: 2px solid var(--verde-pdf); color: #444; padding-bottom: 3px; }
.intro-text p { font-size: 16px; line-height: 1.8; color: #666; margin-bottom: 20px; font-weight: 300; }
.link-ayuda { display: inline-block; margin-top: 20px; color: #888; text-decoration: none; text-transform: uppercase; letter-spacing: 2px; font-size: 11px; font-weight: bold; border-bottom: 1px solid #ccc; padding-bottom: 5px; transition: 0.3s; }
.link-ayuda:hover { color: var(--verde-pdf); border-bottom-color: var(--verde-pdf); }

.services-pdf { background-color: #f9f9f9; padding-bottom: 100px; } 
.section-subtitle { font-size: 14px; margin-bottom: 60px; text-transform: uppercase; letter-spacing: 2px; font-weight: bold; color: #555; }
.services-grid-pdf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

.service-item { 
    background: white; padding: 15px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-radius: var(--borde-suave);
    opacity: 0; transform: translateY(50px); transition: all 0.8s ease-out; display: flex; flex-direction: column; height: 100%; 
}
.service-item.appear { opacity: 1; transform: translateY(0); }
.service-item:hover { transform: translateY(-8px); box-shadow: 0 15px 40px rgba(0,0,0,0.15); }
.service-item .service-cta { display: inline-block; margin: 0 10px 15px; color: #999; text-decoration: none; text-transform: uppercase; letter-spacing: 2px; font-size: 11px; font-weight: bold; border-bottom: 1px solid #ddd; padding-bottom: 4px; transition: 0.3s; }
.service-item:hover .service-cta { color: var(--verde-pdf); border-bottom-color: var(--verde-pdf); }
.service-item img { 
    width: 100%; height: 250px; object-fit: cover; filter: sepia(0.1) contrast(1.05); 
    border-radius: calc(var(--borde-suave) - 4px);
}
.service-item h4 { text-transform: uppercase; margin-top: 20px; margin-bottom: 5px; font-size: 14px; letter-spacing: 2px; color: var(--verde-pdf); font-weight: bold; }
.service-desc { font-size: 13px; color: #777; line-height: 1.6; padding: 0 10px 15px 10px; font-weight: 300; }

.instagram-section { background-color: #ffffff; padding-top: 60px; padding-bottom: 80px; }

.insta-grid { 
    display: grid; grid-template-columns: repeat(3, 1fr); 
    gap: 30px; 
    max-width: 1200px; margin: 0 auto; 
}

.insta-item { 
    position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background-color: #f0f0f0; cursor: pointer;
    border-radius: var(--borde-suave);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.insta-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.insta-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(74, 93, 35, 0.7); display: flex; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s ease; }
.insta-item:hover .insta-overlay { opacity: 1; }
.insta-item:hover img { transform: scale(1.1); }
.insta-icon { color: white; width: 30px; height: 30px; }

.insta-link-btn { display: inline-block; margin-top: 30px; background: #eee; padding: 10px 25px; border-radius: 50px; font-size: 12px; letter-spacing: 2px; color: #555; text-decoration: none; text-transform: uppercase; font-weight: bold; transition: 0.3s; }
.insta-link-btn:hover { background: var(--verde-pdf); color: white; }

.contact-pdf { background-color: var(--gris-fondo); padding-bottom: 0; }
.contact-container { max-width: 500px; margin: 0 auto; padding-bottom: 40px; }
.contact-details p { margin: 8px 0; font-size: 15px; letter-spacing: 2px; text-transform: uppercase; font-weight: bold; color: #444; }
.form-intro { margin: 30px 0; font-style: italic; font-family: var(--font-titulo); font-size: 18px; color: #666; }

.grey-form input, .grey-form textarea { 
    width: 100%; padding: 15px; margin-bottom: 15px; border: 1px solid #bbb; background-color: transparent; font-family: var(--font-texto); font-size: 14px; box-sizing: border-box; outline: none; transition: 0.3s;
    border-radius: var(--borde-suave); 
}
.grey-form input:focus, .grey-form textarea:focus { background-color: white; border-color: var(--verde-pdf); box-shadow: 0 5px 15px rgba(74,93,35,0.1); }
.form-footer { display: flex; justify-content: center; align-items: center; margin-top: 20px; flex-direction: column; }
.grey-form button { 
    background-color: #555; color: white; border: none; padding: 12px 60px; text-transform: uppercase; cursor: pointer; font-size: 14px; letter-spacing: 1px; transition: 0.3s;
    border-radius: 50px; 
}
.grey-form button:hover { background-color: var(--verde-pdf); box-shadow: 0 5px 15px rgba(74,93,35,0.3); }

.privacy-box { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; text-align: left; }
.privacy-box input { width: auto; margin: 0; accent-color: var(--verde-pdf); flex-shrink: 0; cursor: pointer; }
.privacy-box label { font-size: 12px; color: #666; cursor: pointer; line-height: 1.4; display: block; }
.privacy-link-text { color: inherit; text-decoration: underline; font-weight: bold; cursor: pointer; }
.privacy-link-text:hover { color: var(--verde-pdf); }

/* Footer */
.main-footer { 
    background-color: #222; color: #aaa; text-align: center; width: 100%; 
    padding: 30px 20px calc(20px + env(safe-area-inset-bottom)) 20px;
}
.footer-links { margin-bottom: 20px; }
.footer-links button { background: none; border: none; color: #aaa; margin: 0 10px; text-transform: uppercase; letter-spacing: 1px; transition: 0.3s; cursor: pointer; font-family: var(--font-texto); font-size: 11px; }
.footer-links button:hover { color: white; }
.copyright { color: #666; letter-spacing: 1px; }

/* --- ESTILOS MODALES --- */
.modal {
    display: none; position: fixed; z-index: 99999; 
    left: 0; top: 0; width: 100%; height: 100%; 
    background-color: rgba(0,0,0,0.8); overflow: hidden;
    align-items: center; justify-content: center;
}
.modal.active { display: flex; }
.modal-content {
    background-color: #fff; margin: auto; padding: 40px; border: 1px solid #888;
    width: 90%; max-width: 700px; max-height: 85vh; overflow-y: auto;
    position: relative; text-align: left; 
    border-radius: var(--borde-suave);
}
.close-modal { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; position: absolute; top: 10px; right: 20px; }
.close-modal:hover { color: #000; }
.modal-content h3 { font-family: var(--font-titulo); font-size: 24px; margin-top: 30px; margin-bottom: 15px; color: var(--verde-pdf); border-bottom: 1px solid #eee; padding-bottom: 10px; }
.modal-content h3:first-of-type { margin-top: 0; }
.modal-content p, .modal-content ul { font-size: 14px; color: #555; line-height: 1.6; margin-bottom: 15px; }
.modal-content ul { padding-left: 20px; }

/* WHATSAPP FLOAT (VISIBLE GLOBALMENTE) */
.whatsapp-float {
    display: flex;
    position: fixed; bottom: 30px; right: 30px; 
    background-color: #25d366; width: 60px; height: 60px; border-radius: 50%; 
    justify-content: center; align-items: center; 
    box-shadow: 2px 2px 15px rgba(0,0,0,0.3); z-index: 99999; 
    transform: translateZ(0); 
    opacity: 0; visibility: hidden; transition: opacity 0.4s ease-in-out, visibility 0.4s;
    bottom: calc(20px + env(safe-area-inset-bottom));
    
    /* ANIMACIÓN SALTO INTERMITENTE (Cada 4s) */
    animation: whatsapp-jump 4s infinite ease-in-out;
}
.whatsapp-float.is-visible { opacity: 1; visibility: visible; }
.whatsapp-float:hover { animation-play-state: paused; }

/* KEYFRAMES SALTO EXAGERADO (20px) */
@keyframes whatsapp-jump {
    0%, 100% { transform: translateY(0); }
    10% { transform: translateY(-20px); } /* SALTO MUY ALTO */
    15% { transform: translateY(0); }
    20% { transform: translateY(-10px); } /* REBOTE MEDIO */
    25% { transform: translateY(0); }
    /* Del 25% al 100% quieto */
}

/* --- RESPONSIVE / MÓVIL --- */
@media (max-width: 768px) {
    .navbar { 
        width: 92%;
        padding: 5px 20px; 
        top: calc(10px + env(safe-area-inset-top)); 
    }
    .nav-logo-img { height: 80px; } 
    
    /* Ocultar nombre en móvil */
    .nav-brand-text { display: none; }

    .menu-toggle { display: block; }
    
    /* MENÚ LATERAL "BUBBLES" */
    .nav-links { 
        display: flex; position: fixed; top: 0; right: 0; left: auto; 
        height: auto; 
        width: auto; 
        min-width: 200px; 
        background: transparent; 
        
        flex-direction: column; 
        align-items: flex-end; 
        
        padding: calc(130px + env(safe-area-inset-top)) 20px 30px 30px; 
        
        transform: translateX(120%); 
        transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.4s;
        visibility: hidden;
        
        pointer-events: none; 
        z-index: 1001; 
        margin: 0;
    }
    
    .nav-links.active { transform: translateX(0); visibility: visible; }
    
    .nav-links li { 
        width: auto; border: none; 
        margin-bottom: 8px; 
        pointer-events: auto; 
        opacity: 0; 
        transform: translateX(30px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    
    .nav-links.active li { opacity: 1; transform: translateX(0); }
    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.15s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.25s; }
    
    /* ESTILO BURBUJA ALTO CONTRASTE */
    .nav-links a { 
        display: block; width: fit-content; 
        padding: 15px 30px; 
        font-size: 16px; 
        font-weight: 900; 
        color: #ffffff; 
        
        background: rgba(26, 26, 26, 0.95); 
        border: 1px solid rgba(255,255,255,0.2); 
        
        border-radius: 50px; 
        box-shadow: 0 10px 25px rgba(0,0,0,0.5); 
        
        text-shadow: none;
        text-align: right;
    }
    
    /* ESTILO DESTACADO PARA "CONTACTO" */
    .nav-links li:last-child a {
        background-color: var(--verde-pdf);
        border-color: var(--verde-pdf);
        box-shadow: 0 10px 25px rgba(74, 93, 35, 0.4);
    }

    .nav-links a:hover { 
        background-color: var(--verde-pdf); 
        border-color: var(--verde-pdf);
        transform: scale(1.05); 
    }

    .intro-grid { grid-template-columns: 1fr; gap: 30px; }
    .services-grid-pdf { grid-template-columns: 1fr; }
    
    .insta-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 15px; 
    }
    
    .logo-principal { width: 95%; max-width: 95%; padding: 0; box-sizing: border-box; } 
    
    .quote-text { font-size: 28px; }
    .footer-links button { display: block; margin: 15px auto; }
    h2.section-title-master, .intro-text h2 { font-size: 40px; }
    .modal-content { padding: 25px; }
}
