/* ==========================================================================
   Resources page (template-resources.php)
   Uses theme design tokens from components.css (--uh-*, --font-*, --space-*).
   ========================================================================== */

/* ---- Hero ---------------------------------------------------------------- */
.al-res-hero {
    position: relative;
    background: linear-gradient(135deg, var(--uh-red) 0%, var(--uh-red-dark) 100%);
    color: #fff;
    padding: 4.5rem 1.5rem 3.5rem;
    text-align: center;
    background-size: cover;
    background-position: center;
}
.al-res-hero--image { background-blend-mode: overlay; }
.al-res-hero__overlay {
    position: absolute; inset: 0;
    background: rgba(20, 22, 28, .55);
    display: none;
}
.al-res-hero--image .al-res-hero__overlay { display: block; }
.al-res-hero__content { position: relative; max-width: 820px; margin: 0 auto; }
.al-res-hero__eyebrow {
    display: inline-block;
    font-family: var(--font-display);
    letter-spacing: .18em;
    text-transform: uppercase;
    font-size: .8rem;
    opacity: .85;
    margin-bottom: .6rem;
}
.al-res-hero__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.1rem);
    line-height: 1.05;
    margin: 0 0 .6rem;
    color: #fff;
}
.al-res-hero__sub {
    font-size: 1.1rem;
    line-height: 1.55;
    max-width: 680px;
    margin: 0 auto;
    opacity: .95;
}

/* ---- Layout shell -------------------------------------------------------- */
.al-res { padding: 3rem 1.5rem 4rem; }
.al-res__inner { max-width: 1140px; margin: 0 auto; }
.al-res__empty {
    text-align: center;
    color: var(--uh-slate);
    padding: 3rem 1rem;
}
.al-res__empty i { font-size: 2.2rem; color: var(--uh-mid-gray); margin-bottom: 1rem; display: block; }

/* ---- Category group ------------------------------------------------------ */
.al-res-group { margin-bottom: 3.25rem; }
.al-res-group__head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.5rem; }
.al-res-group__rule {
    width: 46px; height: 4px; border-radius: 4px;
    background: var(--res-accent, var(--uh-red));
    flex: 0 0 auto;
}
.al-res-group__heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    margin: 0;
    color: var(--uh-dark-gray);
}

/* ---- Card grid ----------------------------------------------------------- */
.al-res-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.4rem;
}
.al-res-card {
    background: var(--uh-light-gray);
    border-radius: 12px;
    border-top: 4px solid var(--res-accent, var(--uh-red));
    padding: 1.8rem 1.6rem 1.6rem;
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease;
}
.al-res-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md, 0 10px 28px rgba(0,0,0,.1)); }
.al-res-card__icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    display: grid; place-items: center;
    background: var(--res-accent, var(--uh-red));
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}
.al-res-card__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.18rem;
    margin: 0 0 .55rem;
    color: var(--uh-dark-gray);
    line-height: 1.25;
}
.al-res-card__desc {
    font-size: .96rem;
    line-height: 1.55;
    color: var(--uh-slate);
    margin: 0 0 1.2rem;
    flex: 1 1 auto;
}
.al-res-card__btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--res-accent, var(--uh-red));
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: .92rem;
    padding: .55rem 1.15rem;
    border-radius: 7px;
    transition: filter .15s ease, transform .15s ease;
}
.al-res-card__btn:hover { filter: brightness(1.08); transform: translateX(2px); }
.al-res-card__btn i { font-size: .82em; }

/* ---- Emergency contacts -------------------------------------------------- */
.al-res-group--emergency .al-res-group__rule { background: var(--uh-red); }
.al-res-emergency {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.al-res-emcard {
    background: var(--uh-dark-gray);
    color: #fff;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
}
.al-res-emcard--primary { background: var(--uh-red); }
.al-res-emcard__icon { font-size: 1.5rem; margin-bottom: .5rem; opacity: .9; }
.al-res-emcard__label {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    margin: 0 0 .35rem;
    color: #fff;
}
.al-res-emcard__phone { margin: 0; font-size: 1.35rem; font-weight: 700; }
.al-res-emcard__phone a { color: #fff; text-decoration: none; }
.al-res-emcard__phone a:hover { text-decoration: underline; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 600px) {
    .al-res-grid { grid-template-columns: 1fr; }
    .al-res-hero { padding: 3.5rem 1.25rem 2.75rem; }
}

/* ---- Dark mode ----------------------------------------------------------- */
[data-theme="dark"] .al-res-card {
    background: var(--dm-card-bg, #1a1d26) !important;
    color: var(--dm-text, #e2e4ec) !important;
}
[data-theme="dark"] .al-res-card__title,
[data-theme="dark"] .al-res-group__heading { color: var(--dm-heading, #e2e4ec) !important; }
[data-theme="dark"] .al-res-card__desc { color: var(--dm-text-muted, #9096a8) !important; }
[data-theme="dark"] .al-res__empty { color: var(--dm-text-muted, #9096a8) !important; }
/* Card icon, buttons and emergency cards keep their accent color — already high-contrast. */
