/* =====================================================================
   Almaterra - sistema visual
   Paleta del logo:  #315833 (verde oscuro)  ·  #765218 (marron medio)
                     #8c6719 (marron dorado) ·  blanco / negro
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
    --green:        #315833;
    --green-dark:   #244022;
    --green-soft:   #f1f4ec;

    --brown:        #765218;
    --gold:         #8c6719;
    --gold-soft:    #b88334;
    --cream:        #faf6ef;
    --cream-soft:   #f1ead9;

    --ink:          #1c2620;
    --ink-soft:     #4a5550;
    --muted:        #7a807c;
    --line:         #e3dac1;
    --line-soft:    #efe7d3;

    --bg:           #ffffff;
    --bg-alt:       #faf6ef;

    /* Tipografia: 100% palo seco */
    --font-sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                    "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
    --font-display: var(--font-sans);

    --shadow-sm:    0 2px 6px rgba(28,38,32,.06);
    --shadow-md:    0 8px 24px rgba(28,38,32,.10);
    --shadow-lg:    0 16px 50px rgba(28,38,32,.18);

    --radius:       8px;
    --radius-lg:    16px;
    --radius-xl:    22px;

    --maxw:         1180px;
    --maxw-narrow:  820px;

    --header-h:     78px;
}

/* ---------- Reset suave ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
    -webkit-text-size-adjust: 100%;
}
html, body { margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img, svg, video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--green);
    text-decoration: none;
    transition: color .15s ease;
}
a:hover, a:focus-visible { color: var(--gold); }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--green-dark);
    letter-spacing: -0.015em;
    line-height: 1.18;
    margin: 0 0 .75rem;
    overflow-wrap: anywhere;
}

h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }

p { margin: 0 0 1rem; color: var(--ink-soft); }
strong { color: var(--ink); font-weight: 700; }

/* Evita desbordes en moviles */
table, pre, code { max-width: 100%; }
img { height: auto; }

/* ---------- Layout helpers ---------- */
.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 1.5rem);
}
.container--narrow { max-width: var(--maxw-narrow); }

.section { padding: clamp(2.5rem, 7vw, 6rem) 0; }
.section--alt { background: var(--bg-alt); }
.section--green { background: var(--green-dark); color: #fff; }
.section--green h1, .section--green h2, .section--green h3 { color: #fff; }
.section--green p { color: rgba(255,255,255,.85); }

.section__eyebrow {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: .9rem;
}
.section--green .section__eyebrow { color: var(--gold-soft); }

.section__title { margin-bottom: 1rem; }
.section__lead  { color: var(--ink-soft); font-size: clamp(.98rem, 1.6vw, 1.1rem); max-width: 60ch; margin-bottom: 2.5rem; }
.section--green .section__lead { color: rgba(255,255,255,.85); }
.section__head--center { text-align: center; }
.section__head--center .section__lead { margin-left: auto; margin-right: auto; }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: .005em;
    padding: .95rem 1.7rem;
    border: 1.5px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.btn:hover, .btn:focus-visible { transform: translateY(-1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(140,103,25,.35); }
.btn--primary { background: var(--gold); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--brown); color: #fff; box-shadow: var(--shadow-md); }
.btn--green   { background: var(--green); color: #fff; }
.btn--green:hover, .btn--green:focus-visible { background: var(--green-dark); color: #fff; }
.btn--ghost   { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: rgba(255,255,255,.12); color: #fff; }
.btn--outline { background: transparent; color: var(--green); border-color: var(--green); }
.btn--outline:hover, .btn--outline:focus-visible { background: var(--green); color: #fff; }
.btn--small { padding: .6rem 1.1rem; font-size: .92rem; }
.btn--full  { width: 100%; }
.btn i { font-size: .9em; }

@media (max-width: 480px) {
    .btn { padding: .85rem 1.2rem; font-size: .95rem; width: 100%; }
    .btn--small { padding: .65rem 1rem; }
    .hero__ctas .btn { flex: 1 1 100%; }
}

/* ---------- Header / Nav ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.94);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line-soft);
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    gap: 1rem;
}
.nav__brand { display: flex; align-items: center; flex-shrink: 0; }
.nav__brand img { height: 52px; width: auto; display: block; }

.nav__menu {
    display: flex;
    align-items: center;
    gap: clamp(.8rem, 2vw, 1.6rem);
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav__menu > li > a {
    color: var(--ink);
    font-weight: 500;
    font-size: .98rem;
    padding: .35rem 0;
    border-bottom: 2px solid transparent;
    transition: color .15s ease, border-color .15s ease;
}
.nav__menu > li > a:hover,
.nav__menu > li > a.is-active { color: var(--green); border-color: var(--gold); }

.nav__menu > li > a i {
    width: 1.15em;
    text-align: center;
    margin-right: .35rem;
    font-size: .92em;
    opacity: .9;
}

.nav__cta { margin-left: .4rem; }
.nav__cta > a.btn,
.nav__menu .nav__cta > a.btn {
    color: #fff;
    border-bottom: none;
    padding: .65rem 1.2rem;
}
.nav__cta > a.btn i { margin-right: 0; }

.nav__toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--green-dark);
    position: relative;
    transition: transform .2s ease;
}
.nav__toggle span::before,
.nav__toggle span::after { content: ''; position: absolute; left: 0; }
.nav__toggle span::before { top: -7px; }
.nav__toggle span::after  { top: 7px; }

@media (max-width: 880px) {
    .nav__toggle { display: inline-flex; }
    .nav__menu {
        position: absolute;
        top: var(--header-h);
        left: 0; right: 0;
        flex-direction: column;
        gap: 0;
        background: #fff;
        border-bottom: 1px solid var(--line-soft);
        padding: 1rem 1.5rem 1.5rem;
        box-shadow: var(--shadow-md);
        display: none;
    }
    .nav__menu.is-open { display: flex; }
    .nav__menu li { width: 100%; }
    .nav__menu > li > a {
        display: block;
        padding: .9rem 0;
        border-bottom: 1px solid var(--line-soft);
        border-left: none;
    }
    .nav__cta { margin: .8rem 0 0; width: 100%; }
    .nav__cta > a.btn { width: 100%; padding: .9rem 1rem; }
}

/* ---------- Hero con parallax ----------
   1) imagen de fondo (.hero__bg)
   2) overlay oscuro (.hero__bg::after)
   3) gradient inferior y vinieta sutil (.hero::after)
   ------------------------------------------------------ */
.hero {
    position: relative;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}
.hero__bg {
    position: absolute;
    inset: 0;
    background-image: url('/assets/img/fondito.jpeg');
    background-size: cover;
    background-position: center 60%;
    background-attachment: fixed;
    z-index: -2;
}
.hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(20, 32, 22, 0.75);
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(20,32,22,0) 0%, rgba(20,32,22,.18) 55%, rgba(36,64,34,.55) 100%);
    pointer-events: none;
}
.hero__inner {
    padding: clamp(4.5rem, 12vw, 9rem) 0 clamp(3.5rem, 8vw, 7rem);
    max-width: 760px;
    position: relative;
    z-index: 1;
}
.hero__eyebrow {
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gold-soft);
    background: rgba(0,0,0,.25);
    padding: .4rem .8rem;
    border-radius: 999px;
    margin-bottom: 1.2rem;
    backdrop-filter: blur(2px);
}
.hero__eyebrow i { margin-right: .35rem; }
.hero__title {
    color: #fff;
    font-size: clamp(2.1rem, 5.5vw, 3.8rem);
    line-height: 1.1;
    margin: 0 0 1.2rem;
    letter-spacing: -0.02em;
    font-weight: 800;
    text-shadow: 0 2px 18px rgba(0,0,0,.35);
}
.hero__title em { color: var(--gold-soft); font-style: normal; font-weight: 800; }
.hero__lead {
    color: rgba(255,255,255,.95);
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    margin: 0 0 2rem;
    max-width: 60ch;
    text-shadow: 0 1px 10px rgba(0,0,0,.3);
}
.hero__ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Hero compacto para sub-paginas */
.hero--compact .hero__inner { padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero--compact .hero__title { font-size: clamp(1.85rem, 4.2vw, 3rem); }

/* ---------- Tarjetas / Grids ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }

.card {
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    padding: clamp(1.2rem, 3vw, 1.8rem);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line); }
.card__icon {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: var(--green-soft);
    color: var(--green-dark);
    margin-bottom: 1rem;
    font-size: 1.45rem;
}
.card__icon--gold { background: rgba(140,103,25,.10); color: var(--gold); }
.card__icon--brown { background: rgba(118,82,24,.10); color: var(--brown); }
.card__title { font-size: 1.18rem; margin-bottom: .35rem; }
.card__text  { color: var(--ink-soft); margin: 0; font-size: .98rem; }

/* Tarjetas verticales con foto */
.card-photo { padding: 0; overflow: hidden; }
.card-photo__img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card-photo__body { padding: clamp(1.2rem, 3vw, 1.6rem); }
.card-photo__title { margin: 0 0 .5rem; font-size: 1.3rem; }
.card-photo__text { margin: 0 0 1.2rem; }

/* Cifras grandes */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: clamp(.9rem, 2vw, 1.5rem);
    margin-top: 2rem;
}
.stat {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.2rem;
    text-align: center;
}
.section:not(.section--green) .stat {
    background: #fff;
    border-color: var(--line-soft);
    box-shadow: var(--shadow-sm);
}
.stat__icon { font-size: 1.5rem; color: var(--gold); margin-bottom: .55rem; }
.section--green .stat__icon { color: var(--gold-soft); }
.stat__value {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
    margin-bottom: .4rem;
    letter-spacing: -0.02em;
}
.section--green .stat__value { color: var(--gold-soft); }
.stat__hook {
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    font-weight: 700;
    color: var(--gold);
    margin: 0 0 .45rem;
    line-height: 1.25;
}
.section--green .stat__hook { color: var(--gold-soft); }
.stat__label { font-size: .9rem; color: var(--ink-soft); margin: 0; line-height: 1.4; }
.section--green .stat__label { color: rgba(255,255,255,.8); }

/* ---------- Bloque "split" foto + texto ---------- */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: center;
}
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.split__img {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* ---------- Tabla comparativa ---------- */
.comparison {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-size: .95rem;
}
.comparison th, .comparison td {
    padding: .9rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: top;
}
.comparison thead th {
    background: var(--green-dark);
    color: #fff;
    font-weight: 600;
    border-bottom: none;
}
.comparison thead th.is-highlight { background: var(--green); }
.comparison tbody tr:last-child td { border-bottom: none; }
.comparison td.is-highlight { background: var(--green-soft); font-weight: 500; color: var(--green-dark); }
.comparison td .fa-check { color: var(--green); margin-right: .4rem; }
.comparison td .fa-xmark { color: #b04a3c; margin-right: .4rem; }
.comparison-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
}
@media (max-width: 600px) {
    .comparison { font-size: .88rem; min-width: 560px; }
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .8rem; max-width: 780px; margin: 0 auto; }
.faq__item {
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: .9rem 1.1rem;
}
.faq__item summary {
    font-weight: 600;
    color: var(--green-dark);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .35rem 0;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--gold);
    transition: transform .2s ease;
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { margin: .8rem 0 .2rem; color: var(--ink-soft); }
.faq__item summary i { color: var(--gold); margin-right: .55rem; }

/* =====================================================================
   ====================  CALCULADORA - rediseno  =======================
   ===================================================================== */
.calc {
    --calc-pad: clamp(1.2rem, 3vw, 2rem);
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
}
@media (max-width: 880px) { .calc { grid-template-columns: 1fr; } }

.calc__inputs {
    padding: var(--calc-pad);
    background:
        linear-gradient(180deg, #ffffff 0%, var(--bg-alt) 100%);
    display: grid;
    gap: 1rem;
    align-content: start;
}
.calc__inputs::before {
    content: 'Tus datos';
    display: block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: .35rem;
}

.calc__field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.calc__field label {
    font-size: .92rem;
    font-weight: 600;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: .45rem;
    line-height: 1.2;
}
.calc__field label i {
    color: var(--gold);
    width: 18px;
    text-align: center;
    font-size: .95em;
}
.calc__hint {
    font-size: .8rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.4;
}

/* Inputs comunes calculadora + formulario
   (excluimos checkbox/radio para no romper su apariencia nativa) */
.calc__field input:not([type="checkbox"]):not([type="radio"]),
.calc__field select,
.form input:not([type="checkbox"]):not([type="radio"]),
.form select,
.form textarea {
    font-family: inherit;
    font-size: 1rem;
    padding: .85rem 1rem;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    width: 100%;
    min-width: 0;       /* permite encoger en grids/flex sin desbordar */
    max-width: 100%;
    box-sizing: border-box;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: inset 0 1px 0 rgba(28,38,32,.02);
}
/* Quita las flechitas del input number en webkit y firefox */
.form input[type="number"],
.calc__field input[type="number"] { -moz-appearance: textfield; }
.form input[type="number"]::-webkit-outer-spin-button,
.form input[type="number"]::-webkit-inner-spin-button,
.calc__field input[type="number"]::-webkit-outer-spin-button,
.calc__field input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.calc__field input:not([type="checkbox"]):not([type="radio"]):focus,
.calc__field select:focus,
.form input:not([type="checkbox"]):not([type="radio"]):focus,
.form select:focus,
.form textarea:focus {
    outline: none;
    border-color: var(--green);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(49,88,51,.18);
}
.calc__field input::placeholder,
.form input::placeholder,
.form textarea::placeholder { color: #9aa19c; }

.calc__field select {
    background-image:
        linear-gradient(45deg, transparent 50%, var(--green) 50%),
        linear-gradient(135deg, var(--green) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 55%,
        calc(100% - 13px) 55%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 2.4rem;
}

/* Resultados */
.calc__results {
    padding: var(--calc-pad);
    background:
        radial-gradient(ellipse at top right, rgba(140,103,25,.10), transparent 50%),
        var(--green-dark);
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.calc__results::before {
    content: 'Tu retorno orientativo';
    display: block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gold-soft);
}
.calc__title {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 0 0 .2rem;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
}
.calc__title i { color: var(--gold-soft); }

.calc__row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 1rem;
    padding: .65rem 0;
    border-bottom: 1px dashed rgba(255,255,255,.18);
}
.calc__row:last-of-type { border-bottom: none; padding-bottom: 0; }
.calc__row > span:first-child {
    color: rgba(255,255,255,.78);
    font-size: .92rem;
}
.calc__row > span:first-child i {
    color: var(--gold-soft);
    margin-right: .4rem;
    width: 16px;
    text-align: center;
}
.calc__row > span:last-child {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    white-space: nowrap;
    text-align: right;
}

.calc__total {
    margin-top: .4rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(140,103,25,.22), rgba(140,103,25,.10));
    border: 1px solid rgba(184,131,52,.35);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: .8rem;
}
.calc__total > span:first-child {
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
}
.calc__total > span:last-child {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--gold-soft);
    font-size: clamp(1.6rem, 4vw, 2rem);
    line-height: 1;
    letter-spacing: -0.02em;
    text-align: right;
    word-break: normal;
}
.calc__total + .calc__total { margin-top: .5rem; }
.calc__total--alt {
    background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
    border-color: rgba(255,255,255,.18);
}
.calc__total--alt > span:last-child {
    font-size: clamp(1.35rem, 3.5vw, 1.75rem);
    color: rgba(255,255,255,.92);
}

.calc__cta {
    margin-top: .6rem;
    width: 100%;
}
.calc__disclaimer {
    font-size: .77rem;
    color: rgba(255,255,255,.55);
    margin: .5rem 0 0;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .calc__row { grid-template-columns: 1fr; padding: .55rem 0; }
    .calc__row > span:last-child { text-align: left; }
    .calc__total { grid-template-columns: 1fr; }
    .calc__total > span:last-child { text-align: left; }
}

/* =====================================================================
   ====================  FORMULARIO - rediseno  ========================
   ===================================================================== */
.form-wrap {
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: clamp(1.1rem, 4vw, 2.4rem);
    position: relative;
    overflow: hidden;
    max-width: 100%;
}
@media (max-width: 480px) {
    .form-wrap { padding: 1rem; border-radius: var(--radius-lg); }
}
.form-wrap::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--green) 0%, var(--gold) 100%);
}
.form { display: grid; gap: 1.1rem; }
.form__row {
    display: grid;
    /* minmax(0, 1fr) evita que el min-content de los inputs
       fuerce columnas mas anchas que el contenedor. */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
}
@media (max-width: 600px) { .form__row { grid-template-columns: minmax(0, 1fr); } }

.form__field {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    min-width: 0;
    max-width: 100%;
}
.form__field label {
    font-size: .9rem;
    font-weight: 600;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: .45rem;
}
.form__field label i {
    color: var(--gold);
    width: 18px;
    text-align: center;
    font-size: .95em;
}
.form__field label .req { color: var(--brown); }
.form__field textarea {
    min-height: 130px;
    resize: vertical;
    line-height: 1.5;
}

.form__check {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    font-size: .9rem;
    color: var(--ink-soft);
    background: var(--bg-alt);
    border: 1px solid var(--line-soft);
    padding: .8rem 1rem;
    border-radius: var(--radius);
    line-height: 1.4;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.form__check:hover { border-color: var(--line); background: #f6efdc; }
.form__check input[type="checkbox"] {
    /* Reseteamos cualquier estilo heredado y dejamos el check nativo */
    -webkit-appearance: checkbox;
    appearance: auto;
    width: 18px;
    height: 18px;
    margin: .15rem 0 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: initial;
    box-shadow: none;
    accent-color: var(--green);
    flex-shrink: 0;
    cursor: pointer;
}
.form__check input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}
.form__check span { flex: 1; }
.form__hp { position: absolute; left: -10000px; opacity: 0; pointer-events: none; }

.form__msg {
    padding: .9rem 1.1rem;
    border-radius: var(--radius);
    font-size: .95rem;
    display: none;
    line-height: 1.4;
}
.form__msg.is-error   { display: block; background: #fdecec; color: #8a1a1a; border: 1px solid #f3c4c4; }
.form__msg.is-success { display: block; background: #ecf5ed; color: #1d4a22; border: 1px solid #c5dec9; }

.form__submit-wrap {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    align-items: stretch;
}
.form__submit-wrap .btn { padding: 1rem 1.4rem; font-size: 1.02rem; }

/* ---------- WhatsApp flotante ---------- */
.whatsapp-fab {
    position: fixed;
    left: 1.25rem;
    bottom: 1.25rem;
    z-index: 70;
    width: 3.35rem;
    height: 3.35rem;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: var(--shadow-lg);
    transition: transform .2s ease, box-shadow .2s ease;
}
.whatsapp-fab:hover,
.whatsapp-fab:focus-visible {
    color: #fff;
    transform: scale(1.06);
    box-shadow: 0 8px 28px rgba(37, 211, 102, .45);
}
.whatsapp-fab:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px;
}

@media (max-width: 480px) {
    .whatsapp-fab {
        left: .85rem;
        bottom: .85rem;
        width: 3.1rem;
        height: 3.1rem;
        font-size: 1.6rem;
    }
}

/* ---------- Banner cookies ---------- */
.cookies {
    position: fixed;
    inset: auto 1rem 1rem 1rem;
    z-index: 80;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1.1rem 1.2rem;
    max-width: 540px;
    margin-left: auto;
    display: none;
}
.cookies.is-open { display: block; }
.cookies__title {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--green-dark);
    margin: 0 0 .4rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.cookies__title i { color: var(--gold); margin-right: .4rem; }
.cookies__text  { font-size: .9rem; color: var(--ink-soft); margin: 0 0 1rem; line-height: 1.5; }
.cookies__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.cookies__actions .btn { flex: 1 1 auto; padding: .65rem 1rem; }

@media (max-width: 480px) {
    .cookies {
        inset: auto .6rem .6rem .6rem;
        padding: 1rem;
        max-width: none;
    }
    .cookies__actions .btn { width: 100%; }
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--green-dark);
    color: rgba(255,255,255,.78);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--gold-soft); }
.footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}
@media (max-width: 820px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer__grid { grid-template-columns: 1fr; gap: 1.6rem; } }
.footer__brand img { height: 56px; width: auto; margin-bottom: 1rem; }
.footer__brand p { color: rgba(255,255,255,.7); font-size: .94rem; }
.footer__col h4 {
    color: #fff;
    font-family: var(--font-sans);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 700;
    margin-bottom: 1rem;
}
.footer__col h4 i {
    margin-right: .45rem;
    color: var(--gold-soft);
    font-size: .95em;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; font-size: .94rem; }
.footer__col ul i { color: var(--gold-soft); width: 16px; margin-right: .35rem; text-align: center; }
.footer__bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    padding-top: 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .85rem;
    color: rgba(255,255,255,.55);
    flex-wrap: wrap;
    gap: .8rem;
}

/* ---------- Paginas legales ---------- */
.legal { padding: clamp(2rem, 6vw, 4.5rem) 0 5rem; }
.legal h2 { margin-top: 2.5rem; }
.legal h3 { margin-top: 2rem; }
.legal ul, .legal ol { color: var(--ink-soft); padding-left: 1.4rem; }
.legal li { margin-bottom: .35rem; }
.legal .placeholder {
    background: #fff8e0;
    color: var(--brown);
    padding: .05em .35em;
    border-radius: 4px;
    font-weight: 600;
    font-size: .92em;
    word-break: break-word;
}
.legal .comparison { font-size: .9rem; }

/* ---------- Utilidades ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.hide-mobile { display: initial; }
.show-mobile { display: none; }
@media (max-width: 600px) {
    .hide-mobile { display: none; }
    .show-mobile { display: initial; }
}

/* No parallax en moviles/tactiles para evitar problemas en iOS */
@media (max-width: 880px) {
    .hero__bg { background-attachment: scroll; }
}
@media (hover: none) and (pointer: coarse) {
    .hero__bg { background-attachment: scroll; }
}

/* Reduccion de movimiento (accesibilidad) */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
    html { scroll-behavior: auto; }
}
