/**
 * Componentes genéricos de herramientas AdM
 */


/* =========================================================
 * GRID
 * ========================================================= */

.adm-tools-grid {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(260px, 1fr)
        );

    gap: 16px;
}


/* =========================================================
 * TARJETA
 * ========================================================= */

.adm-tool-card {
    position: relative;

    display: flex;
    align-items: flex-start;

    gap: 18px;

    padding: 20px;

    border: 1px solid #E8E8E8;
    border-radius: 14px;

    background: #FFFFFF;

    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}


@media (hover: hover) and (pointer: fine) {

    .adm-tool-card:hover {
        border-color: #B8D5D5;

        box-shadow:
            0 8px 24px
            rgba(17, 95, 96, 0.08);

        transform: translateY(-2px);
    }
}


/* =========================================================
 * ICONO TARJETA
 * ========================================================= */

.adm-tool-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 50px;

    width: 50px;
    height: 50px;

    border-radius: 14px;

    background: #EAF5F5;

    color: #115F60;
}

.adm-tool-card__icon svg {
    display: block;

    width: 25px;
    height: 25px;
}


/* =========================================================
 * CONTENIDO TARJETA
 * ========================================================= */

.adm-tool-card__content {
    min-width: 0;
    flex: 1;
}


/* =========================================================
 * META
 * ========================================================= */

.adm-tool-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    min-height: 24px;

    margin-bottom: 6px;
}


.adm-tool-card__subject {
    color: #9CA3AF;

    font-size: 10px;
    font-weight: 700;

    line-height: 1;

    letter-spacing: 0.06em;
    text-transform: uppercase;
}


/* =========================================================
 * BADGE NUEVA
 * ========================================================= */

.adm-tool-card__badge,
.adm-tool-button__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 22px;

    padding: 0 9px;

    border: 0;
    border-radius: 999px;

    background: #115F60;

    color: #FFFFFF;

    font-size: 9px;
    font-weight: 800;

    line-height: 1;

    letter-spacing: 0.07em;
    text-transform: uppercase;

    white-space: nowrap;
}


/* =========================================================
 * TÍTULO TARJETA
 * ========================================================= */

.adm-tool-card__title {
    margin: 0;

    color: #263238;

    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}


/* =========================================================
 * DESCRIPCIÓN
 * ========================================================= */

.adm-tool-card__description {
    margin: 7px 0 0;

    color: #4B5563;

    font-size: 14px;
    line-height: 1.5;
}


/* =========================================================
 * CTA TARJETA
 * ========================================================= */

.adm-tool-card__footer {
    margin-top: 14px;
}


.adm-tool-card__link {
    display: inline-flex;
    align-items: center;

    gap: 7px;

    color: #115F60;

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;
}


.adm-tool-card__arrow,
.adm-tool-button__arrow {
    transition:
        transform 150ms ease;
}


.adm-tool-card__link:hover
.adm-tool-card__arrow {
    transform: translateX(3px);
}


/* =========================================================
 * DESTACADA
 * ========================================================= */

.adm-tool-card.is-featured {
    background:
        linear-gradient(
            135deg,
            #FFFFFF 0%,
            #F6FAFA 100%
        );
}


/* =========================================================
 * BOTÓN DE HERRAMIENTA
 * ========================================================= */

.adm-tool-button {
    display: flex;
    align-items: center;

    width: 100%;

    min-height: 54px;

    gap: 12px;

    padding: 9px 12px;

    border: 1px solid #E8E8E8;
    border-radius: 12px;

    background: #FFFFFF;

    color: #263238;

    text-decoration: none;

    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}


/* =========================================================
 * ICONO BOTÓN
 * ========================================================= */

.adm-tool-button__icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 36px;

    width: 36px;
    height: 36px;

    border-radius: 9px;

    background: #EAF5F5;

    color: #115F60;
}


.adm-tool-button__icon svg {
    display: block;

    width: 19px;
    height: 19px;
}


/* =========================================================
 * TÍTULO BOTÓN
 * ========================================================= */

.adm-tool-button__title {
    min-width: 0;

    flex: 1;

    overflow: hidden;

    color: #263238;

    font-size: 13px;
    font-weight: 700;

    line-height: 1.25;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
 * BADGE BOTÓN
 * ========================================================= */

.adm-tool-button__badge {
    flex: 0 0 auto;

    height: 20px;

    padding: 0 8px;

    font-size: 8px;
}


/* =========================================================
 * FLECHA BOTÓN
 * ========================================================= */

.adm-tool-button__arrow {
    flex: 0 0 auto;

    color: #115F60;

    font-size: 16px;
    font-weight: 700;
}


/* =========================================================
 * HOVER BOTÓN
 * ========================================================= */

@media (hover: hover) and (pointer: fine) {

    .adm-tool-button:hover {
        border-color: #B8D5D5;

        background: #F8FBFB;

        box-shadow:
            0 5px 16px
            rgba(17, 95, 96, 0.06);

        transform: translateY(-1px);
    }


    .adm-tool-button:hover
    .adm-tool-button__arrow {
        transform: translateX(3px);
    }
}


/* =========================================================
 * FOCUS
 * ========================================================= */

.adm-tool-card__link:focus-visible,
.adm-tool-button:focus-visible {
    outline: 2px solid #C17D2E;
    outline-offset: 3px;
}


/* =========================================================
 * MÓVIL
 * ========================================================= */

@media (max-width: 640px) {

    .adm-tools-grid {
        grid-template-columns: 1fr;
    }


    .adm-tool-card {
        gap: 14px;

        padding: 16px;
    }


    .adm-tool-card__icon {
        flex-basis: 44px;

        width: 44px;
        height: 44px;
    }


    .adm-tool-card__title {
        font-size: 16px;
    }


    .adm-tool-card__description {
        font-size: 13px;
    }


    .adm-tool-button {
        gap: 10px;
    }


    .adm-tool-button__title {
        font-size: 12px;
    }
}


/* =========================================================
 * REDUCCIÓN DE MOVIMIENTO
 * ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .adm-tool-card,
    .adm-tool-card__arrow,
    .adm-tool-button,
    .adm-tool-button__arrow {
        transition: none;
    }
}

/* =========================================================
 * PÁGINA GENÉRICA DE HERRAMIENTA
 * ========================================================= */

.adm-tool-page {
    width: 100%;

    background: #FCFAFC;

    color: #263238;
}


/* =========================================================
 * HERO
 * ========================================================= */

.adm-tool-page__hero {
    padding: 34px 24px 30px;

    border-bottom: 1px solid #E8E8E8;

    background:
        linear-gradient(
            135deg,
            #FFFFFF 0%,
            #F4F9F9 100%
        );
}


.adm-tool-page__hero-inner {
    width: 100%;
    max-width: 1240px;

    margin: 0 auto;
}


/* =========================================================
 * BREADCRUMB
 * ========================================================= */

.adm-tool-page__breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 7px;

    margin-bottom: 18px;

    color: #9CA3AF;

    font-size: 12px;
    font-weight: 600;
}


.adm-tool-page__breadcrumb a {
    color: #6B7280;

    text-decoration: none;
}


.adm-tool-page__breadcrumb a:hover {
    color: #115F60;
}


.adm-tool-page__breadcrumb-separator {
    color: #C7CBD1;
}


/* =========================================================
 * HERO PRINCIPAL
 * ========================================================= */

.adm-tool-page__hero-main {
    display: flex;
    align-items: flex-start;

    gap: 18px;
}


/* =========================================================
 * ICONO
 * ========================================================= */

.adm-tool-page__icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 54px;

    width: 54px;
    height: 54px;

    border-radius: 15px;

    background: #EAF5F5;

    color: #115F60;
}


.adm-tool-page__icon svg {
    display: block;

    width: 27px;
    height: 27px;
}


/* =========================================================
 * CONTENIDO HERO
 * ========================================================= */

.adm-tool-page__hero-content {
    min-width: 0;
}


/* =========================================================
 * META
 * ========================================================= */

.adm-tool-page__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    min-height: 22px;

    margin-bottom: 7px;
}


.adm-tool-page__subject {
    color: #9CA3AF;

    font-size: 10px;
    font-weight: 700;

    line-height: 1;

    letter-spacing: 0.06em;

    text-transform: uppercase;
}


/* =========================================================
 * BADGE NUEVA
 * ========================================================= */

.adm-tool-page__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 22px;

    padding: 0 9px;

    border-radius: 999px;

    background: #115F60;

    color: #FFFFFF;

    font-size: 9px;
    font-weight: 800;

    line-height: 1;

    letter-spacing: 0.07em;

    text-transform: uppercase;

    white-space: nowrap;
}


/* =========================================================
 * TÍTULO
 * ========================================================= */

.adm-tool-page__title {
    max-width: 900px;

    margin: 0;

    color: #263238;

    font-size: clamp(
        28px,
        3vw,
        38px
    );

    font-weight: 700;
    line-height: 1.15;
}


/* =========================================================
 * DESCRIPCIÓN
 * ========================================================= */

.adm-tool-page__description {
    max-width: 820px;

    margin: 10px 0 0;

    color: #4B5563;

    font-size: 15px;
    line-height: 1.6;
}


/* =========================================================
 * CUERPO
 * ========================================================= */

.adm-tool-page__body {
    width: 100%;

    /*
     * Las herramientas interactivas pueden necesitar
     * bastante más ancho que un artículo convencional.
     */
    max-width: 1680px;

    margin: 0 auto;

    padding: 22px 24px 36px;
}


/* =========================================================
 * ERROR DE RENDERER
 * ========================================================= */

.adm-tool-router-error {
    max-width: 760px;

    margin: 40px auto;

    padding: 24px;

    border: 1px solid #E8E8E8;
    border-radius: 14px;

    background: #FFFFFF;
}


.adm-tool-router-error h2 {
    margin-top: 0;

    color: #263238;
}


.adm-tool-router-error p {
    margin-bottom: 0;

    color: #4B5563;
}


/* =========================================================
 * MÓVIL
 * ========================================================= */

@media (max-width: 640px) {

    .adm-tool-page__hero {
        padding: 24px 16px;
    }


    .adm-tool-page__breadcrumb {
        margin-bottom: 14px;

        font-size: 11px;
    }


    .adm-tool-page__hero-main {
        gap: 13px;
    }


    .adm-tool-page__icon {
        flex-basis: 44px;

        width: 44px;
        height: 44px;

        border-radius: 12px;
    }


    .adm-tool-page__icon svg {
        width: 22px;
        height: 22px;
    }


    .adm-tool-page__title {
        font-size: 25px;
    }


    .adm-tool-page__description {
        font-size: 14px;
    }


    .adm-tool-page__body {
        padding:
            16px
            0
            28px;
    }

}