/* =========================================================
   EDUKATIVOS — PORTADA
   Consume el índice estático generado por edu-programas.php
   ========================================================= */

#edu-home,
#edu-home * {
    box-sizing: border-box;
}

#edu-home {
    --edu-text: #18202a;
    --edu-text-soft: #344054;
    --edu-muted: #667085;
    --edu-light: #f7f9fb;
    --edu-line: #e4e9ef;
    --edu-blue: #1769aa;
    --edu-blue-dark: #105487;
    --edu-blue-soft: #edf6fc;

    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 0 10px;

    color: var(--edu-text);
    font-family: inherit;
}


/* =========================================================
   PRESENTACIÓN
   ========================================================= */

#edu-home .edu-intro {
    max-width: 780px;
    margin: 0 auto;
    padding: 24px 24px 32px;

    text-align: center;
}

#edu-home .edu-eyebrow {
    display: inline-block;
    margin-bottom: 9px;

    color: var(--edu-blue);

    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

#edu-home .edu-intro h1 {
    max-width: 700px;
    margin: 0 auto 14px;

    color: #171c24;

    font-size: 42px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.035em;
}

#edu-home .edu-lead {
    max-width: 680px;
    margin: 0 auto;

    color: var(--edu-text-soft);

    font-size: 16px;
    line-height: 1.65;
}


/* =========================================================
   BUSCADOR
   ========================================================= */

#edu-home .edu-discover {
    position: relative;
    overflow: hidden;

    margin: 0 0 54px;
    padding: 30px 36px;

    border: 1px solid var(--edu-line);
    border-radius: 24px;

    background:
        radial-gradient(circle at 94% 0%, rgba(23, 105, 170, 0.14), transparent 34%),
        linear-gradient(145deg, #ffffff 0%, #fafcff 100%);

    box-shadow:
        0 1px 2px rgba(16, 24, 40, 0.03),
        0 18px 50px rgba(16, 24, 40, 0.06);
}

#edu-home .edu-discover-copy {
    max-width: 720px;
}

#edu-home .edu-mini-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin-bottom: 10px;
    padding: 6px 10px;

    border: 1px solid #d4e6f5;
    border-radius: 999px;

    background: var(--edu-blue-soft);
    color: var(--edu-blue-dark);

    font-size: 10px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

#edu-home .edu-mini-label svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

#edu-home .edu-discover h2 {
    margin: 0 0 7px;

    color: #171c24;

    font-size: 27px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

#edu-home .edu-discover-copy > p {
    max-width: 620px;
    margin: 0 0 20px;

    color: var(--edu-muted);

    font-size: 15px;
    line-height: 1.6;
}

#edu-home .edu-search {
    width: 100%;
    margin: 0;
}

#edu-home .edu-search-field {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;

    width: 100%;
    min-height: 62px;

    padding: 5px 12px 5px 15px;

    border: 1px solid #d5dde6;
    border-radius: 16px;

    background: #ffffff;

    box-shadow:
        0 1px 2px rgba(16, 24, 40, 0.03),
        0 8px 24px rgba(16, 24, 40, 0.04);

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

#edu-home .edu-search-field:focus-within {
    border-color: #8ebbdc;

    box-shadow:
        0 0 0 4px rgba(23, 105, 170, 0.09),
        0 9px 26px rgba(16, 24, 40, 0.05);
}

#edu-home .edu-search-icon {
    display: flex;
    color: #7b8798;
}

#edu-home .edu-search-icon svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

#edu-home .edu-search input {
    width: 100%;
    min-width: 0;
    height: 50px;

    margin: 0;
    padding: 0 14px;

    border: 0 !important;
    outline: 0 !important;

    background: transparent !important;
    box-shadow: none !important;

    color: var(--edu-text);

    font-family: inherit;
    font-size: 15px;
}

#edu-home .edu-search input::placeholder {
    color: #929bab;
}

#edu-home .edu-search-clear {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 50%;

    background: var(--edu-light);
    color: #7b8798;

    cursor: pointer;

    transition: background 0.15s ease, color 0.15s ease;
}

#edu-home .edu-search-clear:hover {
    background: #e9eef3;
    color: var(--edu-text);
}

#edu-home .edu-search-clear svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}


/* =========================================================
   PIE DEL BUSCADOR
   ========================================================= */

#edu-home .edu-discover-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    margin-top: 17px;
}

#edu-home #edu-library-count {
    color: var(--edu-muted);
    font-size: 13px;
}

#edu-home .edu-refresh {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin: 0;
    padding: 8px 0;

    border: 0;
    background: transparent;

    color: var(--edu-blue-dark);

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}

#edu-home .edu-refresh:hover {
    text-decoration: underline;
}

#edu-home .edu-refresh svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}


/* =========================================================
   ENCABEZADOS DE SECCIÓN
   ========================================================= */

#edu-home .edu-content-section,
#edu-home .edu-areas {
    margin-bottom: 62px;
}

#edu-home .edu-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;

    margin-bottom: 22px;
}

#edu-home .edu-section-kicker {
    display: inline-block;
    margin-bottom: 8px;

    color: var(--edu-blue);

    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

#edu-home .edu-section-heading h2 {
    margin: 0;

    color: #171c24;

    font-size: 27px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.025em;
}

#edu-home .edu-section-heading > p {
    max-width: 390px;
    margin: 0;

    color: var(--edu-muted);

    font-size: 14px;
    line-height: 1.55;
    text-align: right;
}


/* =========================================================
   TARJETAS DE FICHA
   ========================================================= */

#edu-home .edu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 16px;
}

#edu-home .edu-card {
    position: relative;
    display: flex;

    min-width: 0;
    min-height: 170px;

    overflow: hidden;

    border: 1px solid var(--edu-line);
    border-radius: 17px;

    background: #ffffff;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

#edu-home .edu-card:hover {
    transform: translateY(-3px);

    border-color: #ced7e1;

    box-shadow: 0 11px 28px rgba(16, 24, 40, 0.07);
}

#edu-home .edu-card-link {
    display: flex;
    flex-direction: column;

    width: 100%;
    min-width: 0;

    padding: 21px;

    color: inherit;

    text-decoration: none !important;
}

#edu-home .edu-card-category {
    display: flex;
    align-items: center;
    gap: 6px;

    align-self: flex-start;
    max-width: 100%;

    overflow: hidden;

    margin-bottom: 11px;

    color: var(--edu-blue-dark);

    font-size: 11px;
    line-height: 1.35;
    font-weight: 700;

    text-overflow: ellipsis;
    white-space: nowrap;
}

#edu-home .edu-card-category svg {
    width: 13px;
    height: 13px;

    flex: 0 0 auto;

    fill: currentColor;
}

#edu-home .edu-card-title {
    margin: 0 !important;

    color: #202631 !important;

    font-size: 17px !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;

    letter-spacing: -0.015em;
}

#edu-home .edu-card-end {
    display: flex;
    justify-content: flex-end;

    margin-top: auto;
    padding-top: 18px;
}

#edu-home .edu-card-arrow {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;

    border-radius: 50%;

    background: var(--edu-light);
    color: var(--edu-blue-dark);

    transition:
        transform 0.18s ease,
        background 0.18s ease;
}

#edu-home .edu-card:hover .edu-card-arrow {
    transform: translateX(3px);
    background: var(--edu-blue-soft);
}

#edu-home .edu-card-arrow svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Coincidencia resaltada en la búsqueda */
#edu-home .edu-card-title mark {
    padding: 0 1px;

    background: #fdf2c8;
    color: inherit;

    border-radius: 3px;
}


/* =========================================================
   VER MÁS
   ========================================================= */

#edu-home [hidden] {
    display: none !important;
}

#edu-home .edu-more-wrap {
    display: flex;
    justify-content: center;

    margin-top: 24px;
}

#edu-home .edu-more {
    padding: 11px 20px;

    border: 1px solid #d5dde6;
    border-radius: 11px;

    background: #ffffff;
    color: var(--edu-blue-dark);

    font-family: inherit;
    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition: border-color 0.15s ease, background 0.15s ease;
}

#edu-home .edu-more:hover {
    border-color: #8ebbdc;
    background: var(--edu-blue-soft);
}


/* =========================================================
   SIN RESULTADOS
   ========================================================= */

#edu-home .edu-empty {
    padding: 50px 25px;

    border: 1px solid var(--edu-line);
    border-radius: 20px;

    background: var(--edu-light);

    text-align: center;
}

#edu-home .edu-empty-icon {
    width: 38px;
    height: 38px;

    margin: 0 auto 14px;

    color: #8390a2;
}

#edu-home .edu-empty-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

#edu-home .edu-empty h3 {
    margin: 0 0 8px;

    font-size: 21px;
    font-weight: 700;
}

#edu-home .edu-empty p {
    margin: 0 auto 18px;
    color: var(--edu-muted);
}

#edu-home .edu-empty button {
    padding: 10px 16px;

    border: 1px solid #d5dde6;
    border-radius: 10px;

    background: #ffffff;
    color: var(--edu-blue-dark);

    font-family: inherit;
    font-weight: 700;

    cursor: pointer;
}


/* =========================================================
   PROGRAMAS Y ÁREAS
   ========================================================= */

#edu-home .edu-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 12px;
}

#edu-home .edu-category-card {
    position: relative;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 11px;

    min-width: 0;
    min-height: 92px;

    padding: 17px 18px;

    border: 1px solid var(--edu-line);
    border-radius: 15px;

    background: #ffffff;
    color: inherit;

    text-decoration: none !important;

    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

#edu-home .edu-category-card:hover {
    transform: translateY(-2px);

    border-color: #cbd8e3;
    background: #fbfdff;

    box-shadow: 0 8px 22px rgba(16, 24, 40, 0.06);
}

#edu-home .edu-category-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    min-width: 0;
}

#edu-home .edu-category-head svg {
    width: 17px;
    height: 17px;

    flex: 0 0 auto;

    margin-top: 2px;

    fill: currentColor;
    color: #9fb4c7;

    transition: color 0.18s ease;
}

#edu-home .edu-category-card:hover .edu-category-head svg {
    color: var(--edu-blue);
}

#edu-home .edu-category-name {
    color: #29313d;

    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;
}

#edu-home .edu-category-count {
    color: var(--edu-muted);
    font-size: 12px;
}

#edu-home .edu-category-loading {
    color: var(--edu-muted);
    font-size: 14px;
}

#edu-home .edu-areas-footer {
    margin-top: 20px;
}

#edu-home .edu-textlink {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: var(--edu-blue-dark);

    font-size: 14px;
    font-weight: 700;

    text-decoration: none !important;
}

#edu-home .edu-textlink:hover {
    text-decoration: underline !important;
}

#edu-home .edu-textlink svg {
    width: 16px;
    height: 16px;
    fill: currentColor;

    transition: transform 0.18s ease;
}

#edu-home .edu-textlink:hover svg {
    transform: translateX(3px);
}


/* =========================================================
   ACERCA DE
   ========================================================= */

#edu-home .edu-about {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 22px;
    align-items: center;

    margin-bottom: 46px;
    padding: 30px 34px;

    border-radius: 20px;

    background: #f7f9fb;
}

#edu-home .edu-about-mark {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 58px;
    height: 58px;

    border-radius: 16px;

    background: #18202a;
    color: #ffffff;

    font-size: 27px;
    font-weight: 700;
}

#edu-home .edu-about h2 {
    max-width: 750px;
    margin: 0 0 8px;

    color: #202630;

    font-size: 25px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.02em;
}

#edu-home .edu-about p {
    max-width: 800px;
    margin: 0;

    color: var(--edu-muted);

    font-size: 14px;
    line-height: 1.65;
}


/* =========================================================
   PIE
   ========================================================= */

#edu-home .edu-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    padding: 25px 2px;

    border-top: 1px solid var(--edu-line);
}

#edu-home .edu-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#edu-home .edu-footer-brand strong {
    color: #252c36;
    font-size: 14px;
}

#edu-home .edu-footer-brand span {
    color: var(--edu-muted);
    font-size: 12px;
}

#edu-home .edu-footer-links {
    display: flex;
    align-items: center;
    gap: 9px;

    color: #a0a7b2;
    font-size: 12px;
}

#edu-home .edu-footer-links a {
    color: #667085;
    text-decoration: none;
}

#edu-home .edu-footer-links a:hover {
    color: var(--edu-blue-dark);
    text-decoration: underline;
}


/* =========================================================
   TABLETA
   ========================================================= */

@media (max-width: 820px) {

    #edu-home {
        padding-left: 20px;
        padding-right: 20px;
    }

    #edu-home .edu-intro {
        padding-top: 20px;
        padding-bottom: 30px;
    }

    #edu-home .edu-intro h1 {
        font-size: 38px;
    }

    #edu-home .edu-discover {
        padding: 28px;
        border-radius: 21px;
    }

    #edu-home .edu-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    #edu-home .edu-section-heading > p {
        max-width: 650px;
        text-align: left;
    }

}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 600px) {

    #edu-home {
        padding-left: 16px;
        padding-right: 16px;
    }

    #edu-home .edu-intro {
        padding-top: 16px;
        padding-bottom: 26px;
    }

    #edu-home .edu-eyebrow {
        font-size: 9px;
    }

    #edu-home .edu-intro h1 {
        font-size: 32px;
        line-height: 1.12;
    }

    #edu-home .edu-lead {
        font-size: 15px;
        line-height: 1.6;
    }

    #edu-home .edu-discover {
        margin-bottom: 42px;
        padding: 23px 19px;
        border-radius: 18px;
    }

    #edu-home .edu-discover h2 {
        font-size: 24px;
    }

    #edu-home .edu-discover-copy > p {
        font-size: 14px;
    }

    #edu-home .edu-search-field {
        min-height: 0;
        padding: 6px 8px 6px 10px;
    }

    #edu-home .edu-search input {
        height: 46px;
        padding-left: 8px;
        padding-right: 5px;
        font-size: 14px;
    }

    #edu-home .edu-discover-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    #edu-home .edu-content-section,
    #edu-home .edu-areas {
        margin-bottom: 48px;
    }

    #edu-home .edu-section-heading h2 {
        font-size: 24px;
    }

    #edu-home .edu-grid,
    #edu-home .edu-category-grid {
        grid-template-columns: 1fr;
    }

    #edu-home .edu-card {
        min-height: 0;
    }

    #edu-home .edu-card-link {
        padding: 19px;
    }

    #edu-home .edu-category-card {
        min-height: 0;

        flex-direction: row;
        align-items: center;
        gap: 14px;
    }

    #edu-home .edu-category-count {
        flex: 0 0 auto;
        text-align: right;
    }

    #edu-home .edu-about {
        grid-template-columns: 1fr;
        gap: 17px;
        padding: 25px 21px;
    }

    #edu-home .edu-about-mark {
        width: 50px;
        height: 50px;
        border-radius: 14px;
        font-size: 23px;
    }

    #edu-home .edu-about h2 {
        font-size: 22px;
    }

    #edu-home .edu-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    #edu-home .edu-footer-links {
        flex-wrap: wrap;
    }

}


@media (max-width: 380px) {

    #edu-home {
        padding-left: 12px;
        padding-right: 12px;
    }

    #edu-home .edu-intro h1 {
        font-size: 29px;
    }

    #edu-home .edu-discover {
        padding-left: 16px;
        padding-right: 16px;
    }

}
