/*
 * Portada recuperada de la propuesta verde "Las ayudas existen".
 * Compatible con la paleta central y con los resultados BDNS del plugin.
 * Aislada al tema; no se carga al utilizar otros temas.
 */
body.esay-theme-body{--af-bg:#f6f8f9;--af-surface:#fff;--af-ink:#152d33;--af-dim:#577078;--af-edge:#dfe7e8;--af-accent:#047866;--af-dark-accent:#005748;--af-soft:#e7f4ee;--af-shadow:0 16px 45px rgba(17,48,52,.055);color:var(--af-ink);background:var(--af-bg);font-size:15px}
html[data-esay-theme=dark] body.esay-theme-body{--af-bg:#0b171a;--af-surface:#132427;--af-ink:#e5efed;--af-dim:#a4b9ba;--af-edge:#2c4446;--af-accent:#59d9ad;--af-dark-accent:#92edcb;--af-soft:#1b3934;--af-shadow:0 18px 45px rgba(0,0,0,.16)}
body.esay-theme-body .es-container{width:min(1204px,calc(100% - 48px))}
body.esay-theme-body .es-header{background:var(--af-surface);border-bottom:1px solid var(--af-edge);box-shadow:none;position:sticky;top:0;z-index:100}
body.esay-theme-body .es-head-inner{min-height:76px}
body.esay-theme-body .es-brand{max-width:none;gap:12px;color:var(--af-ink);font-weight:850}
body.esay-theme-body .es-brandmark{width:42px;height:42px;border-radius:13px;background:#066c5f;color:#fff;box-shadow:none;transform:rotate(-9deg);flex:none}
body.esay-theme-body .es-brandmark svg{transform:rotate(9deg)}
body.esay-theme-body .es-brand-name{font-size:17px;line-height:1.2;font-weight:850;letter-spacing:-.035em}
body.esay-theme-body .es-brand-name small{font-weight:750;letter-spacing:0;color:var(--af-dim);margin-top:3px}
body.esay-theme-body .es-nav{gap:28px}
body.esay-theme-body .es-nav a{font-size:13px;font-weight:700;color:var(--af-dim)}
body.esay-theme-body .es-nav a:hover{color:var(--af-accent)}
body.esay-theme-body .es-theme-toggle,body.esay-theme-body .es-menu-toggle{background:var(--af-surface);border:1px solid var(--af-edge);color:var(--af-ink);border-radius:11px;width:42px;height:42px}
body.esay-theme-body .es-footer{background:var(--af-surface);border-color:var(--af-edge)}
body.esay-theme-body .es-footer-inner{color:var(--af-dim)}
body.esay-theme-body .es-footer a{color:var(--af-accent)}
body.esay-theme-body .es-copy{font-size:12px;line-height:1.75}
.af-hero{position:relative;overflow:hidden;background:radial-gradient(ellipse at 72% 30%,rgba(74,195,144,.16),transparent 35%),linear-gradient(110deg,#082d31,#103e42);color:#fff;padding:54px 0 46px}
.af-hero:after{content:"";position:absolute;width:380px;height:380px;right:-85px;top:-150px;border:62px solid rgba(83,199,155,.07);border-radius:50%;pointer-events:none}
.af-hero-inner{display:grid;grid-template-columns:minmax(0,1fr) 235px;align-items:center;gap:50px;position:relative;z-index:1}
.af-eyebrow{display:flex;align-items:center;gap:9px;color:#b5f0d7!important;font-size:10px;letter-spacing:.12em;line-height:1.5;font-weight:850;margin:0 0 23px}
.af-live-dot{width:9px;height:9px;border-radius:50%;background:#68d9ad;box-shadow:0 0 0 4px rgba(104,217,173,.15);flex:none}
.af-hero h1{font-size:clamp(39px,4.8vw,60px);line-height:1.05;letter-spacing:-.054em;margin:0 0 24px;color:#fff;font-weight:850;text-align:center}
.af-hero h1 em{color:#8de4c3;font-style:normal}
.af-hero-description{max-width:690px;width:100%;text-align:center;color:#c7dcdb!important;font-size:17px;line-height:1.72;margin:0 auto 20px}
.af-hero-description span{display:block}
.af-hero-pills{display:flex;flex-wrap:wrap;gap:8px}
.af-hero-pills span{display:inline-block;border:1px solid rgba(255,255,255,.21);background:rgba(255,255,255,.055);color:#d8efec;border-radius:99px;padding:6px 10px;font-size:11px;font-weight:600}
.af-hero-stats{border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.07);border-radius:16px;padding:21px 23px;backdrop-filter:blur(8px)}
.af-hero-stats>div+div{border-top:1px solid rgba(255,255,255,.15);margin-top:19px;padding-top:18px}
.af-hero-stats strong{display:block;font-size:30px;letter-spacing:-.035em;font-weight:850;line-height:1.1;color:#fff}
.af-hero-stats span{display:block;margin-top:8px;font-size:12px;color:#c7dcdb;line-height:1.35}
.af-content{padding-top:45px;padding-bottom:72px}
.af-warning{background:#fff2cf;border:1px solid #ffe4a5;color:#77531c;border-radius:10px;padding:14px 18px;font-size:12px;margin-bottom:22px}
.af-workspace{display:grid;grid-template-columns:290px minmax(0,1fr);gap:30px;align-items:start}
.af-sidebar{min-width:0}
.af-filter-panel{background:var(--af-surface);border:1px solid var(--af-edge);box-shadow:var(--af-shadow);border-radius:17px;padding:20px 21px 22px}
.af-filter-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 23px}
.af-filter-title strong{font-size:17px;line-height:1.2;font-weight:850;color:var(--af-ink)}
.af-filter-title a{font-size:12px;font-weight:800;color:var(--af-accent)}
.af-field{display:flex;flex-direction:column;gap:7px;margin-bottom:16px}
.af-field label{font-size:12px;font-weight:800;line-height:1.4;color:var(--af-ink)}
.af-field input,.af-field select{appearance:auto;display:block;width:100%;min-width:0;min-height:44px;padding:11px 12px;border:1px solid var(--af-edge);border-radius:10px;background:var(--af-surface);color:var(--af-ink);font:inherit;font-size:12px;line-height:1.35}
.af-field input::placeholder{color:var(--af-dim);opacity:.8}
.af-field input:focus,.af-field select:focus{outline:2px solid var(--af-accent);outline-offset:1px}
.af-field select{cursor:pointer}
.af-more-criteria{padding:11px 0 12px;border-top:1px solid var(--af-edge);margin:1px 0 15px}
.af-more-criteria summary{color:var(--af-accent);font-size:12px;font-weight:800;cursor:pointer}
.af-more-criteria[open] summary{margin-bottom:16px}
.af-two-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.af-two-fields .af-field{min-width:0}
.af-checkbox{display:flex;gap:8px;align-items:start;font-size:12px;color:var(--af-ink);margin:12px 0}
.af-checkbox input{accent-color:#047866;margin-top:2px}
.af-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border-radius:9px;padding:12px 16px;border:0;cursor:pointer;font-size:13px;font-weight:800;line-height:1.3;text-decoration:none!important}
.af-btn-primary{background:#047866;color:#fff}
.af-btn-primary:hover{background:#006653;color:#fff}
.af-btn-full{width:100%;min-height:46px}
.af-results{min-width:0}
.af-results-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:2px 0 20px}
.af-section-kicker{display:block;color:var(--af-accent);font-size:10px;font-weight:850;letter-spacing:.12em;line-height:1.5;margin:0 0 9px}
.af-results-head h2,.af-how h2{font-size:clamp(24px,2.2vw,31px);color:var(--af-ink);line-height:1.23;letter-spacing:-.04em;margin:0 0 7px}
.af-results-head p{color:var(--af-dim);font-size:13px;margin:0}
.af-alert-link{background:var(--af-soft);color:var(--af-accent);padding:12px 16px;border-radius:11px;white-space:nowrap;font-size:12px;font-weight:800;text-align:center;text-decoration:none!important}
.af-alert-link:hover{filter:brightness(.97)}
.af-alert-link small{display:block;font-size:10px;font-weight:500;letter-spacing:.02em;margin-top:2px}
.af-results .esay-results{margin-top:0}
.af-results .esay-results-head{padding:0 0 9px;border-bottom:1px solid var(--af-edge);margin:0 0 10px}
.af-results .esay-results-head h2{display:none}
.af-results .esay-count{font-size:12px;color:var(--af-dim)}
.af-results .esay-cardlist{display:grid;grid-template-columns:minmax(0,1fr);gap:13px;margin:16px 0}
.af-results .esay-card{display:flex;flex-direction:column;border:1px solid var(--af-edge);border-radius:14px;background:var(--af-surface);box-shadow:0 5px 22px rgba(14,42,42,.035);padding:19px 21px}
.af-results .esay-card h3{margin:12px 0 9px;font-size:17px;line-height:1.35;letter-spacing:-.02em}
.af-results .esay-card h3 a{color:var(--af-ink);text-decoration:none}
.af-results .esay-card h3 a:hover{color:var(--af-accent)}
.af-results .esay-card p{color:var(--af-dim);font-size:12px;line-height:1.5;margin:3px 0}
.af-results .esay-card p strong{color:var(--af-ink)}
.af-results .esay-cardmeta{margin-top:12px;border-top:1px solid var(--af-edge);padding-top:12px;font-size:11px}
.af-results .esay-cardmeta span,.af-results .esay-muted{color:var(--af-dim)}
.af-results .esay-tag{font-size:10px;border:1px solid var(--af-edge);background:var(--af-soft);color:var(--af-accent);border-radius:6px;padding:4px 8px}
.af-results .esay-tag-unknown{background:#fff3dc;color:#77531c;border-color:#f1dfb3}
.af-results .esay-tag-open{background:#dcf4e8;color:#115941;border-color:#a5dec7}
.af-results .esay-tag-closed{background:var(--af-bg);color:var(--af-dim)}
.af-results .esay-pagination a,.af-results .esay-pagination strong{border-color:var(--af-edge);font-weight:700;color:var(--af-accent)}
.af-results .esay-pagination strong{background:#047866;color:#fff}
.af-results .esay-alert{border-color:var(--af-edge);background:var(--af-surface);color:var(--af-ink);font-size:13px;margin:14px 0}
.af-results .esay-alert a{color:var(--af-accent)}
.af-results-disclaimer{font-size:12px;line-height:1.7;color:var(--af-dim);margin:18px 0 0}
.af-bottom-cta{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:30px 0 74px;background:linear-gradient(115deg,#065247,#047866);border-radius:16px;padding:35px 42px;color:#fff}
.af-bottom-cta .af-section-kicker{color:#a9e6d4}
.af-bottom-cta h2{font-size:27px;letter-spacing:-.04em;color:#fff;margin:0 0 9px}
.af-bottom-cta p{max-width:690px;color:#cce8e1;font-size:13px;margin:0;line-height:1.65}
.af-bottom-cta p strong{color:#fff}
.af-btn-light{background:#fff;color:#075848;white-space:nowrap}
.af-btn-light:hover{background:#e8f4f0;color:#075848}
/* Bloque informativo situado directamente bajo la cabecera principal. */
.af-how-top{padding-top:42px;padding-bottom:4px}
.af-how-top .af-how{padding-bottom:0}
@media(max-width:720px){.af-how-top{padding-top:30px}}
.af-how{padding:0 0 8px}
.af-how h2{margin:0 0 25px}
.af-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}
.af-steps article{background:var(--af-surface);border:1px solid var(--af-edge);border-radius:13px;padding:23px 25px;min-width:0}
.af-steps b{display:block;font-size:22px;color:var(--af-accent);margin:0 0 16px;line-height:1.2}
.af-steps h3{font-size:17px;line-height:1.3;letter-spacing:-.02em;color:var(--af-ink);margin:0 0 8px}
.af-steps p{font-size:12px;line-height:1.6;color:var(--af-dim);margin:0}
@media(max-width:1030px){.af-workspace{grid-template-columns:260px minmax(0,1fr);gap:22px}.af-results-head{align-items:flex-start;flex-direction:column}.af-alert-link{white-space:normal}.af-hero-inner{grid-template-columns:minmax(0,1fr) 205px;gap:25px}}
@media(max-width:720px){body.esay-theme-body .es-container{width:min(100% - 30px,1204px)}.af-hero{padding:36px 0 30px}.af-hero-inner{grid-template-columns:1fr;gap:28px}.af-hero-stats{display:grid;grid-template-columns:1fr 1fr;gap:15px}.af-hero-stats>div+div{border-top:0;border-left:1px solid rgba(255,255,255,.15);margin:0;padding:0 0 0 14px}.af-hero h1{font-size:clamp(35px,9vw,49px)}.af-hero-description{font-size:15px}.af-content{padding-top:30px}.af-workspace{grid-template-columns:1fr;gap:24px}.af-filter-panel{padding:20px}.af-results-head{margin-top:8px}.af-bottom-cta{flex-direction:column;align-items:flex-start;padding:28px 24px;margin:28px 0 55px}.af-steps{grid-template-columns:1fr}.af-steps article{padding:20px 22px}body.esay-theme-body .es-nav{top:70px;background:var(--af-surface);border-color:var(--af-edge)}}
@media(max-width:420px){.af-two-fields{grid-template-columns:1fr}.af-hero-stats strong{font-size:23px}.af-results .esay-card{padding:17px}.af-alert-link{width:100%}}

/* Facetas extraídas directamente de los detalles importados de BDNS. */
.af-filter-panel select[data-esay-facet]{background:var(--af-surface);color:var(--af-ink);border:1px solid var(--af-edge);width:100%;min-height:44px;padding:11px 12px;border-radius:10px}
.af-filter-panel .af-facet-note{margin:10px 0 0;color:var(--af-dim);font-size:11px;line-height:1.55}
.af-filter-panel .esay-live-status{margin-top:9px;color:var(--af-accent);font-size:11px;min-height:0;line-height:1.5}
.af-filter-panel .esay-live-status.esay-live-error{color:#b94842}
.af-workspace [data-esay-live-results][aria-busy="true"]{opacity:.52;transition:opacity .16s ease}
/* La cabecera de portada respeta el ancho maximo del contenido principal. */
body.esay-theme-body .af-hero{
    width:min(1204px,calc(100% - 48px));
    margin-inline:auto;
}
body.esay-theme-body .af-hero .af-hero-inner{
    width:calc(100% - 64px);
    max-width:1140px;
    grid-template-columns:minmax(0,1fr) 280px;
    gap:40px;
}
.af-hero-stats{padding:16px 19px}
.af-hero-stats>div+div{margin-top:13px;padding-top:13px}
.af-hero-stats strong{font-size:27px}
.af-hero-stats span{font-size:12px;line-height:1.45}
@media(max-width:1030px){
    body.esay-theme-body .af-hero .af-hero-inner{
        grid-template-columns:minmax(0,1fr) 245px;
        gap:25px;
    }
}
@media(max-width:720px){
    body.esay-theme-body .af-hero{width:calc(100% - 30px)}
    body.esay-theme-body .af-hero .af-hero-inner{
        width:calc(100% - 32px);
        grid-template-columns:1fr;
        gap:24px;
    }
    .af-hero-stats{display:grid;grid-template-columns:1fr}
    .af-hero-stats>div+div{
        border-left:0;
        border-top:1px solid rgba(255,255,255,.15);
        margin:12px 0 0;
        padding:12px 0 0;
    }
}

/* Paginacion de la portada, siete elementos centrados y paleta seleccionada. */
.af-results .edsa-home-pagination{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:8px;margin:26px auto 6px;padding:0}
.af-results .edsa-home-pagination a,
.af-results .edsa-home-pagination strong,
.af-results .edsa-home-pagination span{display:inline-flex;align-items:center;justify-content:center;min-width:42px;height:42px;box-sizing:border-box;padding:0 9px;border:1px solid var(--es-border,var(--af-edge));border-radius:9px;background:var(--es-surface,var(--af-surface));color:var(--es-primary,var(--af-accent));font-size:14px;font-weight:700;line-height:1;text-decoration:none;transition:background .16s,color .16s,border-color .16s}
.af-results .edsa-home-pagination a:hover,
.af-results .edsa-home-pagination a:focus-visible{background:var(--es-surface2,var(--af-soft));border-color:var(--es-primary,var(--af-accent));color:var(--es-primary,var(--af-accent))}
.af-results .edsa-home-pagination .is-current{background:var(--es-primary2,var(--af-accent));border-color:var(--es-primary2,var(--af-accent));color:#fff}
.af-results .edsa-home-pagination .is-disabled{opacity:.38;cursor:not-allowed}
.af-results .edsa-home-pagination .edsa-page-arrow{font-size:24px;padding-bottom:3px}
@media(max-width:460px){.af-results .edsa-home-pagination{gap:5px}.af-results .edsa-home-pagination a,.af-results .edsa-home-pagination strong,.af-results .edsa-home-pagination span{min-width:35px;height:38px;padding:0 6px;font-size:13px}.af-results .edsa-home-pagination .edsa-page-arrow{font-size:20px}}

