/* =========================================================
   GLANZ · web.css
   Adaptación a móvil y componentes (WhatsApp, FAQ, avisos
   del formulario). No hace falta tocarlo para cambiar
   colores o fuentes: eso se hace en tema.css.

   Nota técnica: la web usa estilos en línea, así que aquí
   se usa !important para poder corregirlos en móvil.
   ========================================================= */

html { -webkit-text-size-adjust: 100%; }
img, video, iframe { max-width: 100%; height: auto; }

/* ---------- Botones de contacto ---------- */
.btn-whatsapp,
.btn-llamar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 14px 28px;
    border-radius: 2px;
    font-family: var(--fuente-texto, 'Jost', sans-serif);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    transition: filter .3s, border-color .3s;
}
.btn-whatsapp {
    background: var(--color-whatsapp, #1fa855);
    color: #fff;
}
.btn-whatsapp:hover { filter: brightness(.9); }
.btn-llamar {
    color: var(--color-texto, #f2e9dc);
    border: 1px solid rgb(var(--rgb-texto, 242 233 220) / .28);
}
.btn-llamar:hover { border-color: var(--color-texto, #f2e9dc); }

.btn-whatsapp::before,
.wa-flotante::before {
    content: "";
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.5 14.4c-.3-.1-1.8-.9-2-1-.3-.1-.5-.1-.7.1-.2.3-.8 1-.9 1.2-.2.2-.3.2-.6.1-.3-.1-1.3-.5-2.4-1.5-.9-.8-1.5-1.8-1.7-2.1-.2-.3 0-.5.1-.6l.4-.5.3-.5c.1-.2 0-.4 0-.5l-.9-2.2c-.2-.6-.5-.5-.7-.5h-.6c-.2 0-.5.1-.8.4-.3.3-1 1-1 2.5s1.1 2.9 1.2 3.1c.1.2 2.1 3.2 5.1 4.5 2.5 1 3 .8 3.6.8.6-.1 1.8-.7 2-1.4.2-.7.2-1.3.2-1.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.8-5.3 11.8-11.8 0-3.2-1.2-6.1-3.4-8.3z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* WhatsApp flotante (en todas las páginas, desde el pie) */
.wa-flotante {
    position: fixed;
    right: 18px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-whatsapp, #1fa855);
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
    transition: transform .2s;
}
.wa-flotante::before { width: 28px; height: 28px; }
.wa-flotante:hover { transform: scale(1.06); }

.solo-lector {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--color-acento, #c9a468);
    outline-offset: 3px;
}

/* ---------- Formulario ---------- */
.campo-trampa {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Avisos tras enviar (se muestran solo cuando corresponde) */
.mensaje-form {
    padding: 16px 20px;
    margin: 0 0 24px;
    border-radius: 2px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-texto, #f2e9dc);
}
.mensaje-error {
    background: rgba(192, 57, 43, .14);
    border-left: 3px solid #d9654f;
}
.mensaje-form a { color: var(--color-acento-claro, #e3c388); }
#form-estado { scroll-margin-top: 90px; }

/* ---------- Preguntas frecuentes ---------- */
.faq-item > summary { list-style: none; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-icono-v { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .faq-icono-v { transform: translate(-50%, -50%) rotate(0deg); }

/* ---------- Menú ---------- */
.nav-toggle { display: none; }

@media (max-width: 1100px) {
    .site-nav { padding: 12px 20px !important; position: sticky; }

    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        width: 44px;
        height: 44px;
        padding: 10px;
        background: transparent;
        border: 0;
        cursor: pointer;
    }
    .nav-toggle span {
        display: block;
        height: 1.5px;
        background: var(--color-texto, #f2e9dc);
        transition: transform .25s, opacity .25s;
    }
    .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

    .nav-links {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch !important;
        gap: 0 !important;
        padding: 8px 20px 24px;
        background: var(--color-fondo, #1a1411);
        border-bottom: 1px solid rgb(var(--rgb-texto, 242 233 220) / .1);
        max-height: calc(100vh - 68px);
        overflow-y: auto;
    }
    .nav-links.abierto { display: flex !important; }
    .nav-links a { padding: 12px 0 !important; font-size: 14px !important; }
    .nav-links > div { padding: 0 !important; }
    .nav-sub {
        display: block !important;
        position: static !important;
        min-width: 0 !important;
        padding: 0 0 6px 14px !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }
    .nav-links a[href*="Presupuesto"] { justify-content: center; margin-top: 12px; }
}

/* ---------- Móvil y tablet ---------- */
@media (max-width: 820px) {
    /* Columnas que se apilan */
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 28px !important;
    }
    [style*="grid-template-rows"] {
        grid-template-rows: none !important;
        grid-auto-rows: 220px !important;
    }
    [style*="grid-row: span 2"] { grid-row: auto !important; }

    /* Márgenes laterales de 48px → 20px */
    [style*="px 48px"] {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* Menos aire vertical entre secciones */
    [style*="padding: 120px"],
    [style*="padding: 110px"],
    [style*="padding: 96px"],
    [style*="padding: 90px"] {
        padding-top: 64px !important;
        padding-bottom: 64px !important;
    }

    /* Alturas mínimas de la portada: solo en escritorio */
    [style*="min-height: 294px"],
    [style*="min-height: 87px"],
    [style*="min-height: 84px"] { min-height: 0 !important; }

    /* El resumen del presupuesto deja de ser fijo */
    [style*="position: sticky"][style*="top: 92px"] { position: static !important; }

    /* Evita el zoom automático del iPhone al escribir */
    input, textarea, select { font-size: 16px !important; }

    .btn-whatsapp, .btn-llamar { width: 100%; }

    /* Deja sitio al WhatsApp flotante al final de la página */
    footer { padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* Aviso de privacidad bajo los formularios */
.aviso-form {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--color-texto-minimo, #6f6456);
}
.aviso-form a { color: var(--color-texto-apagado, #9b8e7c); }

/* Páginas legales */
.legal h2 { margin: 44px 0 12px; font-family: var(--fuente-titulos, 'Cormorant Garamond', serif); font-weight: 500; font-size: 28px; line-height: 1.15; color: var(--color-texto, #f2e9dc); }
.legal p, .legal li { font-size: 16px; line-height: 1.8; color: var(--color-texto-suave, #c9bdac); }
.legal ul { padding-left: 20px; }
.legal a { color: var(--color-acento-claro, #e3c388); }
.legal .pendiente { color: #f0b36b; font-weight: 400; }
