/* ECOJUSTICIA — hoja de estilos compartida (solo diseño) */

:root {
    --forest: #0d3b2c;
    --forest-2: #134d3a;
    --green: #1f7a4d;
    --green-soft: #e3efe6;
    --sun: #f4b81f;
    --sun-soft: #fbf0cf;
    --ink: #17231d;
    --muted: #4d5f55;
    --line: #d6e0d7;
    --bg: #f7f9f5;
    --white: #fff;

    --font-display: "Young Serif", Georgia, "Times New Roman", serif;
    --font-ui: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
    --wrap: 1180px;

    /* Imagen de fondo de portadas (se modifica dinámicamente desde JS) */
    --hero-bg-image: url("fondo2.jpg");

    /* alias de nombres anteriores usados en estilos en línea del HTML */
    --verde-bosque: var(--forest);
    --verde-hoja: var(--green);
    --verde-medio: var(--green);
    --verde-claro: var(--sun);
    --verde-subtil: var(--green-soft);
    --tierra-dorada: var(--sun);
    --crema: var(--bg);
    --texto-oscuro: var(--ink);
    --texto-suave: var(--muted);
    --texto-claro: #fff;
    --alerta: #8a5a00;
    --alerta-fondo: var(--sun-soft);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    overflow-x: clip;
    font-family: var(--font-ui);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--ink);
    background: var(--bg);
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.12;
    color: var(--forest);
    letter-spacing: -.01em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, .calc-result:focus-visible, .term:focus-visible {
    outline: 3px solid var(--green); outline-offset: 3px;
}
.hero-fullwidth :focus-visible, .page-hero :focus-visible, #ejes :focus-visible,
footer :focus-visible, .pg-glosario > header:not(:has(nav)) :focus-visible, .calc-result :focus-visible { outline-color: var(--sun); }

.skip-link {
    position: absolute; left: 1rem; top: -4rem; z-index: 2000; padding: .7rem 1.1rem;
    border-radius: 8px; background: var(--sun); color: var(--ink); font-weight: 700; transition: top .2s;
}
.skip-link:focus { top: 1rem; }

/* ---------- Navegación ---------- */
header:has(nav) {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background: rgba(247, 249, 245, .96); border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
header > nav {
    max-width: var(--wrap); margin: 0 auto; padding: .8rem 2rem;
    display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.logo {
    display: inline-flex; align-items: center; gap: .6rem; white-space: nowrap;
    font-family: var(--font-display); font-size: 1.4rem; color: var(--forest);
}
.logo i {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; border-radius: 50%; background: var(--green); color: #fff; font-size: .85rem;
}
.nav-links { display: flex; align-items: center; gap: 1.15rem; list-style: none; }
.nav-links a { position: relative; white-space: nowrap; font-size: .9rem; font-weight: 600; color: var(--ink); transition: color .2s; }
.nav-links a::after {
    content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 3px;
    border-radius: 2px; background: var(--sun); transition: width .25s;
}
.nav-links a:hover, .nav-links a:focus-visible, .nav-links a.is-active { color: var(--green); }
.nav-links a:hover::after, .nav-links a:focus-visible::after, .nav-links a.is-active::after { width: 100%; }
.menu-toggle {
    display: none; padding: .3rem .6rem; border: 1px solid var(--line); border-radius: 10px;
    background: #fff; color: var(--forest); font-size: 1.3rem; cursor: pointer;
}

/* ---------- Portadas ---------- */
.hero-fullwidth, .page-hero, .pg-glosario > header:not(:has(nav)) {
    color: #fff;
    background:
        linear-gradient(90deg, rgba(8, 40, 30, .9) 0%, rgba(8, 40, 30, .55) 55%, rgba(8, 40, 30, .3) 100%),
        var(--hero-bg-image) center / cover no-repeat;
    background-color: var(--forest);
}
.hero-fullwidth {
    position: relative; min-height: 88vh; min-height: 88svh; display: flex; align-items: center;
    padding: 9rem max(2rem, calc((100vw - var(--wrap)) / 2 + 2rem)) 6rem;
}
.hero-content { max-width: 50rem; animation: entrada .8s ease-out both; }

.hero-badge {
    display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1.6rem;
    padding: .4rem 1rem; border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px;
    background: rgba(255, 255, 255, .1); font-size: .92rem; font-weight: 600; color: #fff;
}
.hero-badge i { color: var(--sun); }
.hero-fullwidth h1 {
    margin-bottom: 1.4rem; color: #fff; font-size: clamp(3.2rem, 9vw, 7rem); line-height: .98; letter-spacing: -.02em;
}
.slogan { max-width: 36rem; margin-bottom: 2.4rem; color: rgba(255, 255, 255, .92); font-size: clamp(1.1rem, 2vw, 1.3rem); line-height: 1.55; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    padding: .95rem 1.8rem; border: 2px solid var(--sun); border-radius: 999px;
    background: var(--sun); color: var(--ink);
    font-family: var(--font-ui); font-size: 1rem; font-weight: 700; line-height: 1.2; cursor: pointer;
    transition: background .2s, border-color .2s, color .2s, transform .15s;
}
.btn:hover { background: #ffd04d; border-color: #ffd04d; transform: translateY(-2px); }
.btn-outline { background: transparent; border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn-outline:hover { background: #fff; border-color: #fff; color: var(--forest); }
.submit-btn { width: 100%; }
.submit-btn[disabled] { opacity: .6; cursor: wait; }

/* ---------- Secciones del inicio ---------- */
#contenido > section {
    position: relative; max-width: var(--wrap); margin: 0 auto; padding: 6.5rem 2rem; scroll-margin-top: 70px;
}
#leyes, #ejes { clip-path: inset(0 -100vmax); }
#leyes { background: var(--green-soft); box-shadow: 0 0 0 100vmax var(--green-soft); }
#ejes { background: var(--forest); box-shadow: 0 0 0 100vmax var(--forest); }

.section-title { margin-bottom: 3rem; text-align: left; }
.section-title h2 { margin-bottom: .9rem; max-width: 22ch; font-size: clamp(2.2rem, 4.8vw, 3.5rem); }
.section-title p { max-width: 40rem; color: var(--muted); font-size: 1.15rem; }
#ejes .section-title h2 { color: #fff; }
#ejes .section-title p { color: rgba(255, 255, 255, .8); }

/* Quiénes somos */
.about-text-content { columns: 2 22rem; column-gap: 3.5rem; text-align: left; }
.about-text-content p { margin-bottom: 1.2rem; break-inside: avoid-column; }
.about-text-content p:first-child {
    column-span: all; max-width: 32ch; margin-bottom: 2.4rem; color: var(--forest);
    font-family: var(--font-display); font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.2;
}
.highlight-box {
    margin-top: 3.5rem; padding: 2.8rem 3.2rem; border-radius: 24px; background: var(--green); color: #fff;
}
.highlight-box h4 { margin-bottom: .9rem; color: var(--sun); font-family: var(--font-ui); font-size: 1rem; font-weight: 700; }
.highlight-box p, .highlight-box em {
    font-family: var(--font-display); font-style: normal; font-size: clamp(1.3rem, 2.4vw, 1.8rem); line-height: 1.3; color: #fff;
}

/* Marco legal */
.laws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.3rem; }
.law-card {
    padding: 1.9rem; border-radius: 20px; background: #fff; border: 1px solid var(--line);
    transition: box-shadow .2s, transform .2s;
}
.law-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(13, 59, 44, .1); }
.law-header { display: flex; align-items: flex-start; margin-bottom: 1.1rem; }
.law-badge { padding: .25rem .8rem; border-radius: 999px; background: var(--sun-soft); color: #6b4a00; font-size: .8rem; font-weight: 700; }
.law-card h3 { margin-bottom: .7rem; font-size: 1.3rem; }
.law-card p { margin-bottom: 1.1rem; color: var(--muted); font-size: .98rem; line-height: 1.6; }
.law-list { list-style: none; }
.law-list li { position: relative; margin-bottom: .5rem; padding-left: 1.6rem; font-size: .94rem; line-height: 1.5; }
.law-list li::before {
    content: "\f00c"; position: absolute; left: 0; top: .12rem;
    color: var(--green); font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .8rem;
}

/* Líneas de acción */
.pillars-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.3rem; }
.pillar-card { padding: 1.9rem; border: 1px solid rgba(255, 255, 255, .16); border-radius: 20px; background: rgba(255, 255, 255, .06); }
.pillar-icon {
    display: inline-flex; align-items: center; justify-content: center; width: 3.2rem; height: 3.2rem; margin-bottom: 1.1rem;
    border-radius: 14px; background: var(--sun); color: var(--forest); font-size: 1.3rem;
}
.pillar-card h3 { margin-bottom: .6rem; color: #fff; font-size: 1.25rem; }
.pillar-card p { color: rgba(255, 255, 255, .78); font-size: .98rem; line-height: 1.6; }

/* Misión y visión */
.mission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.mission-card { padding: 2.8rem; border-radius: 24px; background: var(--sun-soft); }
.mission-card:nth-child(2) { background: var(--green-soft); }
.icon-title { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.mission-card i {
    display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem;
    border-radius: 50%; background: var(--forest); color: var(--sun); font-size: 1.1rem;
}
.mission-card h3 { font-size: 2rem; }
.mission-card p { font-size: 1.1rem; }

/* Contacto */
.contact-container {
    display: grid; grid-template-columns: 1fr 1.2fr; gap: 3.5rem; padding: 3.2rem;
    border: 1px solid var(--line); border-radius: 28px; background: #fff; box-shadow: 0 20px 50px rgba(13, 59, 44, .08);
}
.contact-info h2 { margin-bottom: 1rem; font-size: clamp(2.2rem, 4vw, 3rem); }
.contact-info > p { margin-bottom: 2rem; color: var(--muted); }
.info-details { display: flex; flex-direction: column; gap: 1.2rem; }
.info-item { display: flex; align-items: center; gap: 1rem; }
.info-item i {
    width: 46px; height: 46px; display: flex; flex-shrink: 0; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--green-soft); color: var(--green);
}
.info-item a { font-weight: 600; overflow-wrap: anywhere; }
.info-item a:hover { color: var(--green); text-decoration: underline; }

.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }
.form-group label { display: block; margin-bottom: .35rem; font-weight: 600; font-size: .96rem; }
.form-group input[type="text"], .form-group input[type="email"], .form-group textarea,
.calc-field input, .calc-field select, .select-field select {
    width: 100%; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px;
    background: var(--bg); color: var(--ink); font: inherit; outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.form-group input:focus, .form-group textarea:focus, .calc-field input:focus,
.calc-field select:focus, .select-field select:focus { border-color: var(--green); background: #fff; box-shadow: 0 0 0 4px rgba(31, 122, 77, .15); }
.form-group input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--green); }
.form-group textarea { min-height: 130px; resize: vertical; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.form-status { display: none; margin-top: 1rem; padding: .9rem 1.1rem; border-radius: 12px; font-size: .95rem; }
.form-status.ok { display: block; background: var(--green-soft); color: var(--forest); }
.form-status.error { display: block; background: #fde8e6; color: #8c2f26; }

/* ---------- Pie ---------- */
footer { padding: 5rem 2rem 2.5rem; background: var(--forest); color: rgba(255, 255, 255, .78); }
.footer-content { max-width: var(--wrap); margin: 0 auto 3.5rem; display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; }
footer .logo { color: #fff; }
footer .logo i { background: var(--sun); color: var(--forest); }
.footer-brand p { max-width: 28rem; margin-top: 1rem; color: rgba(255, 255, 255, .7); }
.footer-links h4 { margin-bottom: 1.1rem; color: var(--sun); font-family: var(--font-ui); font-size: 1rem; font-weight: 700; }
.footer-links ul { display: flex; flex-direction: column; gap: .5rem; list-style: none; }
.footer-links a { color: rgba(255, 255, 255, .78); font-size: .95rem; }
.footer-links a:hover, .footer-bottom a:hover { color: var(--sun); text-decoration: underline; }
.footer-bottom {
    max-width: var(--wrap); margin: 0 auto; padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, .15);
    color: rgba(255, 255, 255, .62); font-size: .84rem; line-height: 1.7; text-align: center;
}
.footer-bottom a { color: rgba(255, 255, 255, .88); }
.footer-bottom p { margin: .6rem 0; }

/* ---------- Páginas interiores ---------- */
.page-hero {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1rem;
    padding: 9.5rem max(2rem, calc((100vw - 960px) / 2)) 4.5rem;
}
.page-hero .hero-badge { margin-bottom: .3rem; }
.page-hero h1 { max-width: 18ch; color: #fff; font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.02; }
.page-hero p { max-width: 40rem; color: rgba(255, 255, 255, .9); font-size: 1.15rem; line-height: 1.55; }

body > main:not(#contenido) { max-width: 960px; margin: 0 auto; padding: 4.5rem 2rem 6rem; }

.disclaimer, .disclaimer-footer {
    margin-top: 3rem; padding: 1.5rem 1.8rem; border-radius: 16px; background: var(--green-soft);
    border-left: 4px solid var(--green); color: var(--muted); font-size: .94rem;
}

/* ---------- Calculadora ---------- */
.intro-block, .calc-card, .selector-card { padding: 2.8rem; border: 1px solid var(--line); border-radius: 24px; background: #fff; }
.intro-block { margin-bottom: 2rem; }
.intro-block h2, .calc-card h2, .selector-card h2 { margin-bottom: 1rem; font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.intro-block p { margin-bottom: 1.1rem; color: var(--muted); }
.intro-block p:last-child { margin-bottom: 0; }
.calc-intro-text, .selector-intro { margin-bottom: 2.2rem; color: var(--muted); }
.calc-section { margin-bottom: 2.4rem; padding-bottom: 2.2rem; border-bottom: 1px solid var(--line); }
.calc-section:last-of-type { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.calc-section-title { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.3rem; font-family: var(--font-ui); font-size: 1.1rem; font-weight: 700; color: var(--green); }
.calc-section-title i { color: var(--sun); }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.4rem; }
.calc-field label, .select-field label { display: block; margin-bottom: .4rem; font-weight: 600; font-size: .95rem; }
.calc-field .hint { display: block; margin-top: .3rem; font-size: .8rem; font-weight: 400; color: var(--muted); }
.select-field select { padding: 1rem 1.2rem; font-weight: 500; cursor: pointer; }
.calc-actions { display: flex; justify-content: flex-start; margin-top: 2rem; }

.calc-result { display: none; margin-top: 2.5rem; padding: 2.8rem; border-radius: 24px; background: var(--forest); color: #fff; }
.calc-result.visible { display: block; }
.calc-result .result-number { font-family: var(--font-display); font-size: clamp(3.6rem, 9vw, 6rem); line-height: 1; color: var(--sun); }
.calc-result .result-unit { display: block; margin-top: .4rem; color: rgba(255, 255, 255, .78); }
.result-breakdown { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 2rem 0; }
.breakdown-item { padding: 1.2rem 1.4rem; border-radius: 16px; background: rgba(255, 255, 255, .08); }
.breakdown-item span { display: block; }
.breakdown-item .label { margin-bottom: .3rem; font-size: .85rem; color: rgba(255, 255, 255, .7); }
.breakdown-item .value { font-family: var(--font-display); font-size: 1.5rem; color: #fff; }
.result-message { max-width: 42rem; margin: 0 0 1.5rem; color: rgba(255, 255, 255, .88); }

.tips-section { margin-top: 4rem; }
.tips-section .section-title { margin-bottom: 1.5rem; }
.tips-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; margin-top: 1.4rem; }
.tip-card { padding: 1.9rem; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.tip-card i { display: block; margin-bottom: 1rem; color: var(--green); font-size: 1.6rem; }
.tip-card h3 { margin-bottom: .5rem; font-size: 1.15rem; }
.tip-card p { color: var(--muted); font-size: .96rem; }

/* ---------- ¿Quién es competente? ---------- */
.warning-banner { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 2rem; padding: 1.5rem 1.8rem; border-radius: 18px; background: var(--sun-soft); border-left: 5px solid var(--sun); }
.warning-banner i { flex-shrink: 0; margin-top: .2rem; color: #8a5a00; font-size: 1.3rem; }
.warning-banner p { color: #4a3300; font-size: .98rem; }
.warning-banner strong { color: #2e2000; }

.result-panel { display: none; margin-top: 2.5rem; padding: 2.5rem; border-radius: 20px; background: var(--green-soft); }
.result-panel.visible { display: block; }
.result-level { display: inline-block; margin-bottom: 1rem; padding: .3rem 1rem; border-radius: 999px; background: var(--forest); color: #fff; font-size: .82rem; font-weight: 700; }
.result-panel h3 { margin-bottom: 1.2rem; font-size: 1.4rem; }
.result-panel .result-block { margin-bottom: 1.2rem; }
.result-panel .result-block:last-child { margin-bottom: 0; }
.result-panel .result-label { display: block; margin-bottom: .2rem; font-size: .88rem; font-weight: 700; color: var(--green); }
.result-panel .official-link { display: inline-flex; align-items: center; gap: .6rem; margin-top: .4rem; font-weight: 700; color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.result-note { margin-top: 1.5rem; padding: 1.2rem 1.5rem; border-radius: 14px; background: #fff; font-size: .9rem; color: var(--muted); }
.cta-block { margin-top: 2.2rem; text-align: left; }

/* ---------- Preguntas frecuentes ---------- */
.faq-category { margin-bottom: 4rem; }
.faq-category:last-child { margin-bottom: 0; }
.faq-category-title { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.3rem; font-size: clamp(1.6rem, 3.2vw, 2.1rem); }
.faq-category-title i { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; flex-shrink: 0; border-radius: 12px; background: var(--sun); color: var(--forest); font-size: 1rem; }
.faq-list { display: flex; flex-direction: column; gap: .9rem; }
.faq-item { border: 1px solid var(--line); border-radius: 18px; background: #fff; overflow: hidden; transition: border-color .2s, background .2s; }
.faq-item.open { border-color: var(--green); background: #fcfdfb; }
.faq-question {
    width: 100%; padding: 1.3rem 1.6rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
    border: 0; background: transparent; text-align: left; cursor: pointer; font-family: var(--font-ui); font-size: 1.08rem; font-weight: 700; color: var(--forest);
}
.faq-question i { flex-shrink: 0; color: var(--green); transition: transform .25s; }
.faq-item.open .faq-question i { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-answer p { padding: 0 1.6rem 1.6rem; color: var(--muted); }
.faq-cta { margin-top: 4rem; padding: 3rem; border-radius: 26px; background: var(--green); }
.faq-cta h3 { margin-bottom: .8rem; color: #fff; font-size: 2rem; }
.faq-cta p { max-width: 34rem; margin: 0 0 1.6rem; color: rgba(255, 255, 255, .9); }

/* ---------- Glosario ---------- */
.pg-glosario > header:not(:has(nav)) { padding: 8.5rem max(1.5rem, calc((100vw - 900px) / 2 + 1.5rem)) 3.5rem; text-align: left; }
.pg-glosario > header:not(:has(nav)) h1 { margin-bottom: 1rem; color: #fff; font-size: clamp(2.5rem, 6vw, 4.2rem); line-height: 1.02; }
.pg-glosario > header:not(:has(nav)) p { max-width: 40rem; margin: 0 0 2rem; color: rgba(255, 255, 255, .9); font-size: 1.12rem; }
.pg-glosario > header:not(:has(nav)) p:first-child { margin: 0 0 2rem; font-size: .95rem; }
.search-container { position: relative; max-width: 640px; margin: 0; }
.search-input { width: 100%; padding: 1.05rem 1.4rem 1.05rem 3rem; border: 0; border-radius: 999px; outline: none; background: #fff; color: var(--ink); font: inherit; transition: box-shadow .2s; }
.search-input:focus { box-shadow: 0 0 0 4px rgba(244, 184, 31, .6); }
.search-icon { position: absolute; left: 1.2rem; top: 50%; transform: translateY(-50%); }

.alpha-nav {
    position: sticky; top: 0; z-index: 100; overflow-x: auto; white-space: nowrap;
    padding: .6rem max(1rem, calc((100vw - 900px) / 2 + 1rem)); background: rgba(247, 249, 245, .95); border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.alpha-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin: 0 2px; border-radius: 50%; color: var(--muted); font-weight: 700; cursor: pointer; transition: background .2s, color .2s; }
.alpha-btn:hover, .alpha-btn.active { background: var(--green); color: #fff; }

.pg-glosario main { max-width: 900px; margin: 3rem auto 0; padding: 0 1.5rem; }
.letter-section { margin-bottom: 2.8rem; scroll-margin-top: 80px; }
.letter-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; font-size: 3.2rem; line-height: 1; color: var(--green); }
.letter-header::after { content: ""; flex: 1; height: 2px; background: var(--line); }
.glossary-item { margin-bottom: .8rem; padding: 1.2rem 1.5rem; border: 1px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.glossary-item:hover { border-color: var(--green); box-shadow: 0 8px 20px rgba(13, 59, 44, .07); }
.term { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-family: var(--font-display); font-size: 1.2rem; color: var(--forest); }
.term-icon { font-size: .8rem; color: var(--green); transition: transform .25s; }
.glossary-item.expanded .term-icon { transform: rotate(180deg); }
.definition { max-height: 0; overflow: hidden; opacity: 0; color: var(--muted); transition: max-height .4s ease, opacity .4s ease; }
.glossary-item.expanded .definition { max-height: 1000px; margin-top: .6rem; opacity: 1; }
.definition ul { margin: .75rem 0 .75rem 1.5rem; }
.definition li { margin-bottom: .5rem; }
.highlight { padding: 0 3px; border-radius: 4px; background: var(--sun); color: var(--ink); font-weight: 700; }
.no-results { display: none; padding: 3rem; text-align: center; color: var(--muted); }
.no-results.show { display: block; }

.pg-glosario footer { margin-top: 5rem; padding: 4rem 1.5rem 2rem; }
.pg-glosario .footer-content { grid-template-columns: 2fr 1fr 1fr; }
.pg-glosario .footer-brand h3 { margin-bottom: .75rem; color: #fff; font-size: 1.5rem; }
.pg-glosario .footer-brand p { margin-top: 0; }
.footer-nav h4, .footer-legal h4 { margin-bottom: 1rem; color: var(--sun); font-family: var(--font-ui); font-size: 1rem; font-weight: 700; }
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: .55rem; }
.footer-nav a { color: rgba(255, 255, 255, .78); font-size: .95rem; }
.footer-nav a:hover { color: var(--sun); text-decoration: underline; }
.footer-legal { font-size: .86rem; line-height: 1.8; color: rgba(255, 255, 255, .72); }
.footer-legal strong { display: block; margin-top: .7rem; color: #fff; font-weight: 700; }
.aaip-badge { display: inline-block; margin-top: .6rem; padding: .25rem .75rem; border: 1px solid rgba(255, 255, 255, .3); border-radius: 8px; font-size: .75rem; font-weight: 600; }
.aaip-badge img { height: 18px; margin-right: 6px; vertical-align: middle; }

/* ---------- Aviso legal ---------- */
.pg-legal { max-width: 780px; margin: 0 auto; padding: 3.5rem 1.5rem 3rem; background: var(--bg); }
.back-link { display: inline-flex; margin-bottom: 2.2rem; padding: .5rem 1.1rem; border-radius: 999px; background: var(--green-soft); color: var(--green); font-weight: 700; transition: background .2s, color .2s; }
.back-link:hover { background: var(--green); color: #fff; }
.pg-legal h1 { margin-bottom: 2rem; padding-bottom: 1.2rem; border-bottom: 4px solid var(--sun); font-size: clamp(2.5rem, 6vw, 3.9rem); line-height: 1.02; }
.pg-legal h2 { margin-top: 3rem; margin-bottom: .9rem; font-size: 1.7rem; color: var(--green); }
.pg-legal p, .pg-legal li { margin-bottom: 1rem; text-align: left; }
.pg-legal ul { margin: 0 0 1.4rem 1.3rem; }
.pg-legal li::marker { color: var(--sun); }
.pg-legal .highlight { padding: .1rem .5rem; background: var(--sun-soft); color: var(--ink); font-weight: 600; }
.pg-legal a { color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.pg-legal footer { margin-top: 4rem; padding: 2rem 0 0; background: none; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; text-align: center; }

/* ---------- Movimiento ---------- */
@keyframes entrada { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1320px) {
    header > nav { padding: .7rem 1.25rem; }
    .menu-toggle { display: block; }
    .menu-toggle ~ .nav-links {
        position: absolute; top: 100%; left: 0; width: 100%; display: none; flex-direction: column; align-items: flex-start;
        gap: 1.1rem; padding: 1.4rem 1.5rem 1.8rem; background: var(--bg); border-bottom: 1px solid var(--line);
        max-height: calc(100vh - 64px); overflow-y: auto;
    }
    .menu-toggle ~ .nav-links.active { display: flex; }
}
@media (max-width: 1000px) {
    header > nav { flex-wrap: wrap; row-gap: .3rem; }
    .logo + .nav-links { order: 3; width: 100%; gap: 1.3rem; padding-bottom: .5rem; overflow-x: auto; scrollbar-width: none; }
    .logo + .nav-links::-webkit-scrollbar { display: none; }
}
@media (max-width: 992px) {
    .contact-container { grid-template-columns: 1fr; gap: 2.5rem; padding: 2.4rem; }
    .footer-content, .pg-glosario .footer-content { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 768px) {
    #contenido > section { padding: 4.5rem 1.25rem; }
    .hero-fullwidth { padding: 8rem 1.25rem 3.5rem; }
    .page-hero { padding: 9rem 1.25rem 3.2rem; }
    body > main:not(#contenido) { padding: 3rem 1.25rem 4rem; }
    .highlight-box { padding: 1.8rem 1.4rem; }
    .contact-container, .intro-block, .calc-card, .selector-card, .calc-result, .result-panel { padding: 1.7rem 1.2rem; }
    .mission-card, .faq-cta { padding: 1.9rem 1.4rem; }
    .hero-buttons { flex-direction: column; align-items: stretch; }
    .hero-buttons .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* La FAQ reutiliza #contenido, pero no tiene secciones internas:
   le damos ancho de lectura y centrado propios. */
main#contenido:has(.faq-category) {
    max-width: 960px;         /* mismo ancho que las otras interiores */
    margin-inline: auto;
    padding: 4.5rem 2rem 6rem;
}

/* Que las respuestas no generen líneas larguísimas */
main#contenido:has(.faq-category) .faq-answer p {
    max-width: 68ch;
}

/* En móvil, menos padding lateral (coherente con tus otros @media) */
@media (max-width: 768px) {
    main#contenido:has(.faq-category) {
        padding: 3rem 1.25rem 4rem;
    }
}
/* ---------- ¿Quién es Competente? — lectura centrada y angosta ---------- */
.pg-competencia main,
main.pg-competencia-main {
  max-width: 780px;          /* más angosto que los 960px por defecto */
  margin-inline: auto;       /* centra el bloque */
  padding: 4.5rem 2rem 6rem;
}

/* Que los textos largos no se estiren de más */
.pg-competencia main p,
main.pg-competencia-main p,
.pg-competencia main li,
main.pg-competencia-main li {
  max-width: 68ch;
}

/* En móvil, padding lateral coherente con el resto */
@media (max-width: 768px) {
  .pg-competencia main,
  main.pg-competencia-main {
    padding: 3rem 1.25rem 4rem;
  }
}