/* ==============================================
   SUBVENCIONES AL DIA — Design System
   Estilo: Cercano, accesible, calido
   Colores: Verde confianza + Naranja calido
   Fuentes: DM Serif Display (titulos) + DM Sans (cuerpo)
   ============================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colores principales */
    --green-900: #0d3b2e;
    --green-800: #135e47;
    --green-700: #1a7a5a;
    --green-600: #22956e;
    --green-500: #2aad80;
    --green-400: #4ec49a;
    --green-300: #7fd8b5;
    --green-200: #b3e8d2;
    --green-100: #dff5eb;
    --green-50: #f0faf5;

    --orange-600: #e8600a;
    --orange-500: #f57c20;
    --orange-400: #f89a4a;
    --orange-300: #fbb97a;
    --orange-200: #fdd8aa;
    --orange-100: #feecd5;
    --orange-50: #fff7ed;

    --gray-900: #1a1d23;
    --gray-800: #2d3139;
    --gray-700: #434851;
    --gray-600: #5c626d;
    --gray-500: #7a8191;
    --gray-400: #9ba1ae;
    --gray-300: #c1c6cf;
    --gray-200: #e0e3e8;
    --gray-100: #f1f3f5;
    --gray-50: #f8f9fa;

    --white: #ffffff;
    --black: #0f1114;

    /* Semanticos */
    --primary: var(--green-700);
    --primary-dark: var(--green-800);
    --primary-light: var(--green-100);
    --accent: var(--orange-500);
    --accent-dark: var(--orange-600);
    --accent-light: var(--orange-100);
    --text: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-500);
    --bg: var(--white);
    --bg-warm: #fffbf5;
    --bg-section: var(--gray-50);
    --border: var(--gray-200);

    /* Tipografia */
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Espaciado */
    --section-y: 5rem;
    --container-x: 1.25rem;
    --max-width: 1120px;

    /* Bordes */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Sombras */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 48px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.05);

    /* Transiciones */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul { list-style: none; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-x);
}

/* --- Secciones --- */
.section {
    padding: var(--section-y) 0;
}

.section__label {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.375rem 1rem;
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
}

.section__title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 1rem;
    max-width: 720px;
}

.section__title--light { color: var(--white); }

.section__subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.section__subtitle--light {
    color: rgba(255,255,255,0.8);
}

/* --- Botones --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    transition: all 0.2s var(--ease);
    white-space: nowrap;
}

.btn--primary {
    background: var(--accent);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(245,124,32,0.3);
}
.btn--primary:hover {
    background: var(--accent-dark);
    box-shadow: 0 4px 16px rgba(245,124,32,0.4);
    transform: translateY(-1px);
}

.btn--outline {
    border: 2px solid var(--border);
    color: var(--text);
    background: var(--white);
}
.btn--outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.btn--ghost {
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
}
.btn--ghost:hover { color: var(--primary); }

.btn--lg {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}

.btn--sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn--full { width: 100%; justify-content: center; }

/* --- NAV --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s var(--ease);
}

.nav--scrolled {
    box-shadow: var(--shadow-sm);
}

.nav__container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-x);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    color: var(--text);
}

.nav__logo-icon { color: var(--primary); display: flex; }

.nav__logo-text strong {
    color: var(--primary);
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav__link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s;
}
.nav__link:hover { color: var(--primary); }

.nav__cta {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--white);
    background: var(--accent);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-md);
    transition: all 0.2s var(--ease);
}
.nav__cta:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}
.nav__hamburger span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s var(--ease);
}

/* --- HERO --- */
.hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(170deg, var(--bg-warm) 0%, var(--white) 50%, var(--green-50) 100%);
    text-align: center;
}

.hero__container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-x);
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--green-800);
    background: var(--green-100);
    border: 1px solid var(--green-200);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    margin-bottom: 1.5rem;
}

.hero__badge-dot {
    width: 8px;
    height: 8px;
    background: var(--green-500);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5.5vw, 3.5rem);
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 1.25rem;
}

.hero__highlight {
    color: var(--primary);
    position: relative;
}

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero__stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    max-width: 500px;
    margin: 0 auto;
}

.hero__stat { text-align: center; }

.hero__stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--primary);
}

.hero__stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.hero__stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* --- PROBLEMA --- */
.problem {
    background: var(--bg-section);
}

.problem__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.problem__card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.2s var(--ease);
}

.problem__card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.problem__icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.problem__card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.problem__card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- COMO FUNCIONA --- */
.how {
    background: var(--white);
}

.how__steps {
    max-width: 640px;
    margin-top: 2.5rem;
}

.how__step {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 0;
    position: relative;
}

.how__step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 23px;
    top: 4rem;
    bottom: 0;
    width: 2px;
    background: var(--green-200);
}

.how__step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.how__step-content h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
}

.how__step-content p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.how__step-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-dark);
    background: var(--accent-light);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    margin-top: 0.5rem;
}

/* --- PARA QUIEN --- */
.audience {
    background: var(--bg-warm);
}

.audience__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.audience__card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.2s var(--ease);
}

.audience__card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.audience__emoji {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.audience__card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.audience__card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.audience__examples {
    list-style: none;
}

.audience__examples li {
    font-size: 0.875rem;
    color: var(--text);
    padding: 0.375rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.audience__examples li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7rem;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

/* --- FUENTES --- */
.sources {
    background: var(--white);
    text-align: center;
}

.sources__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
}

.sources__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    background: var(--bg-section);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    transition: all 0.2s var(--ease);
}

.sources__item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.sources__item span {
    font-weight: 700;
    color: var(--text);
}

.sources__item--main {
    background: var(--green-800);
    border-color: var(--green-800);
    color: rgba(255,255,255,0.8);
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

.sources__item--main:hover {
    background: var(--green-900);
    border-color: var(--green-900);
    color: var(--white);
}

.sources__item--main strong {
    color: var(--white);
    font-size: 1rem;
}

.sources__item--main span {
    color: rgba(255,255,255,0.8);
    font-weight: 400;
}

/* --- PLANES --- */
.plans {
    background: var(--bg-section);
    text-align: center;
}

.plans__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 720px;
    margin: 2.5rem auto 0;
    text-align: left;
}

.plans__card {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    position: relative;
}

.plans__card--featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.plans__card-badge {
    position: absolute;
    top: -12px;
    right: 24px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--white);
    background: var(--primary);
    padding: 0.25rem 1rem;
    border-radius: var(--radius-full);
}

.plans__card-header {
    margin-bottom: 1.5rem;
}

.plans__card-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.plans__price-amount {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--text);
}

.plans__price-period {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.plans__features {
    margin-bottom: 1.5rem;
}

.plans__feature {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
}

.plans__feature svg { flex-shrink: 0; margin-top: 2px; }

.plans__feature--included { color: var(--text); }
.plans__feature--included svg { color: var(--green-600); }

.plans__feature--excluded { color: var(--gray-400); }
.plans__feature--excluded svg { color: var(--gray-300); }

/* --- HISTORIA --- */
.story {
    background: var(--white);
}

.story__box {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 2rem;
}

.story__quote {
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--green-300);
    line-height: 1;
    margin-bottom: -0.5rem;
}

.story__text {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.story__text strong {
    color: var(--text);
}

.story__author {
    margin-top: 1.5rem;
}

.story__author-info strong {
    display: block;
    font-size: 0.9375rem;
    color: var(--text);
}

.story__author-info span {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* --- REGISTRO --- */
.register {
    background: var(--green-800);
    color: var(--white);
    text-align: center;
}

.register__form {
    max-width: 640px;
    margin: 0 auto;
    text-align: left;
}

.register__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.register__field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: rgba(255,255,255,0.9);
}

.register__field input,
.register__field select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-family: var(--font-body);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.1);
    color: var(--white);
    transition: border-color 0.2s;
}

.register__field input::placeholder {
    color: rgba(255,255,255,0.5);
}

.register__field select option {
    color: var(--text);
    background: var(--white);
}

.register__field input:focus,
.register__field select:focus {
    outline: none;
    border-color: var(--accent);
}

.register__field--full {
    margin-bottom: 1rem;
}

.register__field--full label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: rgba(255,255,255,0.9);
}

.register__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.register__tag {
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    border: 2px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.8);
    background: transparent;
    transition: all 0.2s var(--ease);
    cursor: pointer;
}

.register__tag:hover {
    border-color: rgba(255,255,255,0.5);
    color: var(--white);
}

.register__tag.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

.register__consent {
    margin: 1.25rem 0;
}

.register__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
}

.register__checkbox input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent);
}

.register__checkbox a {
    color: var(--orange-300);
    text-decoration: underline;
}

.register__success {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem;
}

.register__success-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.register__success h3 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.register__success p {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
}

.register__success-note {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.6);
}

/* --- FAQ --- */
.faq {
    background: var(--white);
    text-align: center;
}

.faq__list {
    max-width: 680px;
    margin: 2.5rem auto 0;
    text-align: left;
}

.faq__item {
    border-bottom: 1px solid var(--border);
}

.faq__question {
    padding: 1.25rem 0;
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq__question::-webkit-details-marker { display: none; }

.faq__question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-muted);
    transition: transform 0.2s var(--ease);
}

details[open] .faq__question::after {
    content: '-';
}

.faq__answer {
    padding-bottom: 1.25rem;
}

.faq__answer p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- CTA FINAL --- */
.cta-final {
    background: var(--bg-warm);
    text-align: center;
}

.cta-final__box {
    max-width: 600px;
    margin: 0 auto;
}

.cta-final__box h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.cta-final__box p {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* --- FOOTER --- */
.footer {
    background: var(--gray-900);
    color: rgba(255,255,255,0.7);
    padding: 3rem 0 1.5rem;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer__brand p {
    font-size: 0.875rem;
    margin-top: 0.75rem;
    line-height: 1.6;
    max-width: 340px;
}

.footer__brand .nav__logo-text {
    font-size: 1rem;
    color: var(--white);
}

.footer__brand .nav__logo-text strong {
    color: var(--green-400);
}

.footer__col h4 {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--white);
    margin-bottom: 1rem;
}

.footer__col a {
    display: block;
    font-size: 0.875rem;
    padding: 0.25rem 0;
    transition: color 0.2s;
}

.footer__col a:hover {
    color: var(--white);
}

.footer__bottom {
    padding-top: 1.5rem;
    text-align: center;
}

.footer__bottom p {
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.4);
}

/* --- COOKIE BANNER --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--white);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
    padding: 1rem;
}

.cookie-banner__content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cookie-banner__content p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.cookie-banner__actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* --- SCROLL REVEAL --- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- RESPONSIVE --- */
@media (max-width: 960px) {
    .problem__grid {
        grid-template-columns: 1fr;
    }

    .audience__grid {
        grid-template-columns: 1fr;
    }

    .plans__grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .footer__grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer__brand p {
        max-width: none;
    }
}

@media (max-width: 768px) {
    :root {
        --section-y: 3.5rem;
    }

    .nav__links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem var(--container-x);
        gap: 0;
        box-shadow: var(--shadow-md);
    }

    .nav__links.active {
        display: flex;
    }

    .nav__link, .nav__cta {
        padding: 0.75rem 0;
        display: block;
        text-align: center;
    }

    .nav__cta {
        margin-top: 0.5rem;
    }

    .nav__hamburger {
        display: flex;
    }

    .hero {
        padding: 6.5rem 0 3rem;
    }

    .hero__stats {
        gap: 1.25rem;
    }

    .register__row {
        grid-template-columns: 1fr;
    }

    .cookie-banner__content {
        flex-direction: column;
        text-align: center;
    }
}

/* --- PAGINAS LEGALES --- */
.legal {
    padding: 6rem 0 3rem;
    min-height: 80vh;
}

.legal h1 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--text);
    margin-bottom: 0.5rem;
}

.legal__updated {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.legal h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.legal h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.75rem;
    max-width: 720px;
}

.legal ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    max-width: 720px;
}

.legal ul li {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.375rem;
}

.legal a {
    color: var(--primary);
    text-decoration: underline;
}

.legal a:hover {
    color: var(--primary-dark);
}

.legal__table {
    width: 100%;
    max-width: 720px;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.875rem;
}

.legal__table th,
.legal__table td {
    padding: 0.625rem 1rem;
    border: 1px solid var(--border);
    text-align: left;
    color: var(--text-secondary);
}

.legal__table th {
    background: var(--bg-section);
    color: var(--text);
    font-weight: 600;
}

.legal__table td strong {
    color: var(--text);
}

.legal code {
    background: var(--bg-section);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.8125rem;
}

/* --- PAGINA 404 --- */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(170deg, var(--bg-warm) 0%, var(--white) 50%, var(--green-50) 100%);
}

.error-page__content {
    max-width: 480px;
}

.error-page__code {
    font-family: var(--font-display);
    font-size: 8rem;
    color: var(--green-200);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-page__title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.error-page__text {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

@media (max-width: 480px) {
    .hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero__actions .btn {
        justify-content: center;
    }

    .sources__grid {
        gap: 0.5rem;
    }

    .sources__item {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}

/* --- AdSense Containers --- */
.ad-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    text-align: center;
}

.ad-container ins {
    margin: 0 auto;
}

/* ==============================================
   BREADCRUMB
   ============================================== */
.breadcrumb {
    padding: 5.5rem 0 0;
    background: var(--bg-section);
}

.breadcrumb__inner,
.breadcrumb > .container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem var(--container-x);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.breadcrumb__inner a,
.breadcrumb > .container a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb__inner a:hover,
.breadcrumb > .container a:hover { color: var(--primary); }

.breadcrumb__inner span,
.breadcrumb > .container span { color: var(--text); font-weight: 500; }

/* ==============================================
   BLOG — Index
   ============================================== */
.blog-hero {
    padding: 6rem 0 3rem;
    background: linear-gradient(170deg, var(--bg-warm) 0%, var(--white) 50%, var(--green-50) 100%);
    text-align: center;
}

.blog-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--text);
    margin-bottom: 0.75rem;
}

.blog-hero p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.blog-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s var(--ease);
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.blog-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--primary);
}

.blog-card__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.blog-card__tag {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
}

.blog-card__tag--ccaa {
    color: #4a5568;
    background: #edf2f7;
}

.blog-card__date {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.blog-card__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.blog-card__excerpt {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: 1rem;
}

.blog-card__link:hover { color: var(--primary-dark); }

/* ==============================================
   BLOG — Article
   ============================================== */
.blog-article {
    padding: 2rem 0 4rem;
    background: var(--white);
}

.blog-article__container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 var(--container-x);
}

.blog-article__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.blog-article__tag {
    display: inline-block;
    background: var(--green-100);
    color: var(--green-800);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
}

.blog-article__header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.blog-article__lead {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.blog-article__body h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

.blog-article__body h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
}

.blog-article__body p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.blog-article__body ul,
.blog-article__body ol {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.blog-article__body ol { list-style: decimal; }

.blog-article__body li {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 0.375rem;
}

.blog-article__body strong { color: var(--text); }

.blog-article__body a {
    color: var(--primary);
    text-decoration: underline;
}

.blog-article__body a:hover { color: var(--primary-dark); }

.blog-article__body blockquote {
    border-left: 4px solid var(--primary);
    background: var(--green-50);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.blog-article__body blockquote p {
    margin-bottom: 0;
    color: var(--text);
    font-style: italic;
}

.blog-article__body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.blog-article__body th {
    background: var(--green-50);
    color: var(--text);
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 2px solid var(--green-200);
}

.blog-article__body td {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.blog-article__body tr:nth-child(even) td {
    background: var(--gray-50);
}

.blog-article__body tr:last-child td {
    border-bottom: none;
}

/* Blog CTA box */
.blog-cta {
    background: var(--green-800);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    margin: 3rem 0 2rem;
}

.blog-cta h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.blog-cta p {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.blog-cta .btn { margin: 0; }

/* Related articles */
.blog-related {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem var(--container-x) 3rem;
}

.blog-related h2,
.blog-related h3 {
    font-family: var(--font-display);
    font-size: 1.375rem;
    color: var(--text);
    margin-bottom: 1.25rem;
}

.blog-related .blog-grid {
    grid-template-columns: repeat(2, 1fr);
}

/* ==============================================
   SUBVENCIONES — Listado
   ============================================== */
.subv-hero {
    padding: 6rem 0 2rem;
    background: linear-gradient(170deg, var(--green-50) 0%, var(--white) 100%);
    text-align: center;
}

.subv-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--text);
    margin-bottom: 0.5rem;
}

.subv-hero p {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.subv-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.subv-stat {
    text-align: center;
}

.subv-stat__number {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--primary);
    display: block;
}

.subv-stat__label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Layout: sidebar + results */
.subv-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    padding: 2rem 0 4rem;
    align-items: start;
}

/* Sidebar filters */
.subv-filters {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: sticky;
    top: 80px;
}

.subv-filters h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.subv-filters__clear {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent);
    cursor: pointer;
    background: none;
    border: none;
}

.subv-filters__clear:hover { color: var(--accent-dark); }

.subv-filters__group {
    margin-bottom: 1.25rem;
}

.subv-filters__group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.subv-filters__group select,
.subv-filters__group input[type="date"],
.subv-search input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    font-family: var(--font-body);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text);
    transition: border-color 0.2s;
}

.subv-filters__group select:focus,
.subv-filters__group input:focus,
.subv-search input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Category tags in filters */
.subv-filters__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.subv-filter-tag {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.subv-filter-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.subv-filter-tag.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* Search bar */
.subv-search {
    margin-bottom: 1.5rem;
}

.subv-search__wrapper {
    position: relative;
}

.subv-search__wrapper svg {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.subv-search input {
    padding-left: 2.75rem;
    font-size: 1rem;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
}

.subv-search input:focus {
    border-color: var(--primary);
}

/* Results area */
.subv-results {
    min-height: 400px;
}

.subv-results__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Subsidy card */
.subv-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s var(--ease);
}

.subv-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--green-300);
}

.subv-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.subv-card__title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.subv-card__title a {
    color: inherit;
    text-decoration: none;
}

.subv-card__title a:hover { color: var(--primary); }

.subv-card__badges {
    display: flex;
    gap: 0.375rem;
    flex-shrink: 0;
}

.subv-badge {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.subv-badge--fuente {
    background: var(--green-100);
    color: var(--green-800);
}

.subv-badge--ccaa {
    background: var(--orange-100);
    color: var(--orange-600);
}

.subv-card__body {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.subv-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.subv-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.subv-card__tag {
    font-size: 0.6875rem;
    padding: 0.1875rem 0.5rem;
    border-radius: var(--radius-full);
    background: var(--bg-section);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.subv-card__date {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.subv-card__link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.subv-card__link:hover { color: var(--primary-dark); }

/* Pagination */
.subv-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.subv-pagination__btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.subv-pagination__btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.subv-pagination__btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.subv-pagination__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Empty / Loading states */
.subv-empty,
.subv-loading {
    text-align: center;
    padding: 4rem 2rem;
}

.subv-empty__icon,
.subv-loading__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.subv-empty h3,
.subv-loading h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.subv-empty p,
.subv-loading p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.subv-loading__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 0.8s linear infinite;
}

/* ==============================================
   SUBVENCIONES / BLOG — Responsive
   ============================================== */
@media (max-width: 960px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .subv-layout {
        grid-template-columns: 1fr;
    }

    .subv-filters {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .subv-filters h3 {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }

    .subv-filters__tags {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .blog-grid,
    .blog-related .blog-grid {
        grid-template-columns: 1fr;
    }

    .subv-filters {
        grid-template-columns: 1fr;
    }

    .subv-card__header {
        flex-direction: column;
    }

    .subv-card__badges {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .subv-stats {
        gap: 1rem;
    }
}
