/* =============================================================
   MantizIS - Recursos
   ============================================================= */

body.recursos-page {
    background:
        radial-gradient(circle at top right, rgba(0, 154, 118, 0.1), transparent 30%),
        linear-gradient(180deg, #fcfdfc 0%, #f7f8f5 100%);
}

body.recursos-page main {
    overflow: clip;
}

.resources-hero {
    padding-top: clamp(5rem, 8vw, 7rem);
}

.resources-hero__header {
    gap: var(--sp-4);
}

.resources-hero__header h1 {
    font-size: clamp(2.2rem, 3.8vw + 0.8rem, 4.25rem);
    line-height: 0.98;
}

.resources-hero__support {
    color: var(--ink-soft);
    max-width: 64ch;
    line-height: var(--lh-relaxed);
    margin-inline: auto;
}

.resources-library {
    padding-top: 0;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 320px));
    max-width: 700px;
    margin-inline: auto;
    align-items: stretch;
    gap: var(--sp-5);
    justify-items: center;
    justify-content: center;
}

.resource-card {
    min-width: 0;
    width: 100%;
    max-width: 320px;
}

.resource-card__surface {
    width: 100%;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--duration-medium) var(--ease), box-shadow var(--duration-medium) var(--ease), border-color var(--duration-medium) var(--ease);
}

.resource-card__surface:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 110, 84, 0.28);
    box-shadow: var(--shadow-lg);
}

.resource-card__poster {
    background: linear-gradient(180deg, #102935 0%, #0d2230 100%);
    padding: 0.8rem;
}

.resource-card__poster img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 14px;
    background: #102935;
}

.resource-card__body {
    padding: 1rem 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.resource-card__tag {
    font-family: var(--font-mono);
    font-size: var(--fs-micro);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
    color: var(--brand);
}

.resource-card__body h2 {
    font-size: clamp(1rem, 0.65vw + 0.9rem, 1.2rem);
    line-height: 1.18;
    max-width: 22ch;
}

.resource-card__body p {
    color: var(--ink-mute);
    font-size: 0.84rem;
    line-height: var(--lh-relaxed);
}

.resource-card__cta {
    margin-top: 0.2rem;
    font-size: 0.92rem;
}

.resources-process {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.resources-help__panel {
    background:
        linear-gradient(135deg, rgba(0, 154, 118, 0.12), rgba(6, 20, 16, 0.96) 56%),
        var(--surface-dark);
    border-radius: 28px;
    padding: clamp(1.5rem, 2.2vw, 2.5rem) clamp(1.1rem, 1.8vw, 1.75rem);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.resources-help__panel h2 {
    color: white;
    max-width: 24ch;
    margin-inline: auto;
}

.resources-help__panel p {
    color: rgba(255, 255, 255, 0.78);
    max-width: 70ch;
    line-height: var(--lh-relaxed);
    margin-top: var(--sp-4);
    margin-inline: auto;
}

.resources-help__panel .eyebrow {
    color: var(--brand-bright);
}

.resources-help__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    margin-top: var(--sp-6);
    justify-content: center;
}

.resources-help__panel .btn--ghost {
    color: white;
    border-color: rgba(255, 255, 255, 0.24);
}

.resources-help__panel .btn--ghost:hover {
    background: white;
    color: var(--ink);
    border-color: white;
}

.resource-modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: grid;
    place-items: center;
    padding: var(--sp-5);
}

.resource-modal[hidden] {
    display: none;
}

.resource-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 20, 16, 0.64);
    backdrop-filter: blur(6px);
}

.resource-modal__dialog {
    position: relative;
    width: min(100%, 560px);
    background: white;
    border-radius: 24px;
    padding: clamp(1.5rem, 3vw, 2rem);
    box-shadow: 0 28px 80px rgba(6, 20, 16, 0.28);
    border: 1px solid rgba(0, 110, 84, 0.1);
}

.resource-modal__dialog h3 {
    font-size: clamp(1.5rem, 2vw + 0.6rem, 2rem);
    margin-top: var(--sp-2);
}

.resource-modal__copy {
    margin-top: var(--sp-3);
    color: var(--ink-mute);
    line-height: var(--lh-relaxed);
}

.resource-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--ink-soft);
    background: var(--surface-stone);
    font-size: 1.5rem;
}

.resource-modal__close:hover {
    background: var(--brand-glow);
    color: var(--brand-deep);
}

.resource-form {
    display: grid;
    gap: var(--sp-4);
    margin-top: var(--sp-5);
}

.resource-form__field {
    display: grid;
    gap: var(--sp-2);
}

.resource-form__field span {
    font-size: var(--fs-small);
    font-weight: var(--fw-medium);
    color: var(--ink-soft);
}

.resource-form__field input {
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: white;
    color: var(--ink);
}

.resource-form__field input::placeholder {
    color: var(--ink-faint);
}

.resource-form__field input:focus {
    border-color: var(--brand);
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 154, 118, 0.12);
}

.resource-form__submit {
    width: 100%;
}

body.resource-modal-open {
    overflow: hidden;
}

.mensaje-sistema {
    position: fixed;
    bottom: 24px;
    right: 24px;
    max-width: 360px;
    background-color: #0b1e2d;
    color: white;
    padding: 14px 18px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    font-size: 0.95rem;
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    display: none;
}

.mensaje-sistema.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.mensaje-sistema.msj-ok {
    border-left: 4px solid var(--brand);
}

.mensaje-sistema.msj-error {
    border-left: 4px solid #ff6b6b;
}

@media (max-width: 767px) {
    .resources-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
    }

    .resources-hero {
        padding-top: clamp(4.5rem, 12vw, 5.75rem);
    }

    .resources-hero__header h1 {
        font-size: clamp(1.9rem, 7vw, 2.6rem);
    }

    .resource-card__body h2 {
        max-width: none;
    }

    .resources-help__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .resources-help__actions .btn {
        width: 100%;
    }

    .mensaje-sistema {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }
}
