
/* ==========================================
   ExpandAI@SD — Resources Page
   ========================================== */

:root {
    --brand: #a80000;
    --brand-dark: #790000;
    --text: #222;
    --muted: #606060;
    --line: #e5e5e5;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body, h1, h2, h3, p, ul {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.55;
}

a {
    color: var(--brand);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid #e7a0a0;
    outline-offset: 3px;
}

[hidden] {
    display: none !important;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* ==========================================
   Header and Navigation
   ========================================== */

header {
    width: 100%;
    background: var(--brand);
    color: white;
    padding: 10px 0;
}

.logo h1 {
    font-size: 2rem;
    margin-left: 5px;
    line-height: 1.3;
}

.logo h1 a {
    color: #fff;
    text-decoration: none;
}

.menu ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 10px 0;
}

.menu > ul > li {
    position: relative;
}

.menu ul li a,
.menu ul li.dropdown > span {
    display: block;
    padding: 0.5em 0.8em;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 1rem;
    cursor: pointer;
}

.menu ul li a:hover,
.menu ul li a.active,
.menu ul li.dropdown > span:hover,
.menu ul li.dropdown:focus-within > span {
    background: #570000;
}

.menu .dropdown-content {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 205px;
    z-index: 20;
    background: var(--brand);
    padding: 8px 0;
    box-shadow: 0 8px 16px #0003;
    border-radius: 0 0 5px 5px;
}

.menu li.dropdown:hover > .dropdown-content,
.menu li.dropdown:focus-within > .dropdown-content {
    display: block;
}

.menu .dropdown-content li {
    width: 100%;
}

.menu .dropdown-content a {
    text-transform: none;
    white-space: nowrap;
}

/* ==========================================
   Main Resources Content
   ========================================== */

.resources {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 42px 0 70px;
    flex: 1;
}

.page-title {
    font-size: 2.25rem;
    color: var(--brand);
    margin-bottom: 12px;
    line-height: 1.2;
}

.intro {
    max-width: 1000px;
    color: #444;
    font-size: 1.05rem;
    margin-bottom: 22px;
}

/* Resource request notice */

.request-notice {
    background: #f8f8f8;
    border-left: 4px solid var(--brand);
    padding: 17px 20px;
    margin: 18px 0 25px;
    line-height: 1.65;
}

.request-notice a {
    font-weight: 700;
    color: var(--brand);
}

/* ==========================================
   Search and Category Filters
   ========================================== */

.search-box {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid #c9c9c9;
    border-radius: 7px;
    font: inherit;
    background: white;
    margin: 0 0 18px;
}

.search-box:focus {
    border-color: var(--brand);
    outline: 2px solid #a8000025;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 36px;
}

.filter-btn {
    border: 1px solid var(--brand);
    border-radius: 6px;
    background: white;
    color: var(--brand);
    font: inherit;
    font-weight: 600;
    padding: 9px 19px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--brand);
    color: white;
}

/* ==========================================
   Resource Sections
   ========================================== */

.resource-section {
    margin: 0 0 45px;
}

.resource-section h2 {
    font-size: 1.65rem;
    color: var(--brand);
    margin: 0 0 9px;
    padding-bottom: 9px;
    border-bottom: 2px solid var(--brand);
}

.section-description {
    color: var(--muted);
    margin: 0 0 22px;
    max-width: 950px;
}

/* ==========================================
   Resource Grid and Cards
   ========================================== */

.resource-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

.resource-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 23px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
    box-shadow: 0 3px 12px #0000000b;
    color: var(--text);
    text-decoration: none;
    transition:
        box-shadow 0.2s,
        transform 0.2s,
        border-color 0.2s;
}

.resource-card:hover {
    box-shadow: 0 7px 20px #00000016;
    border-color: #d2b0b0;
    transform: translateY(-2px);
}

.resource-card h3 {
    font-size: 1.16rem;
    line-height: 1.35;
    color: var(--brand);
    margin: 0 0 12px;
}

.resource-card p {
    color: #454545;
    font-size: 0.96rem;
    margin: 0 0 15px;
    overflow-wrap: anywhere;
}

.resource-card .card-link {
    color: var(--brand);
    font-weight: 700;
    margin-top: auto;
    font-size: 0.94rem;
}

.resource-card .status {
    display: block;
    font-size: 0.86rem;
    color: #666;
    margin: 0 0 8px;
}

.resource-card .availability-note {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin: 8px 0 12px;
}

/* ==========================================
   Request and Access Buttons
   ========================================== */

.resource-card .resource-action {
    display: inline-block;
    align-self: flex-start;
    margin-top: auto;
    padding: 11px 17px;
    border-radius: 6px;
    background: var(--brand);
    color: white !important;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    transition: background 0.2s;
}

.resource-card .resource-action:hover,
.resource-card .resource-action:focus-visible {
    background: var(--brand-dark);
    color: white !important;
}

.resource-card .resource-secondary,
.resource-card .request-link {
    display: inline-block;
    align-self: flex-start;
    color: var(--brand);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: underline;
    margin: 9px 0;
}

.resource-card .request-link {
    margin-top: auto;
}

/* ==========================================
   No Search Results
   ========================================== */

.no-results {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--muted);
    text-align: center;
}

/* ==========================================
   Footer
   ========================================== */

footer {
    margin-top: auto;
    padding: 30px 16px;
    background: #f7f7f7;
    text-align: center;
}

.footer-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-logos img {
    display: block;
    height: 60px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.footer-links {
    color: #666;
    font-size: 0.9rem;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    margin: 0 6px;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* ==========================================
   Responsive Layout — Tablets
   ========================================== */

@media (max-width: 950px) {
    .resource-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .menu ul li a,
    .menu ul li.dropdown > span {
        font-size: 0.9rem;
        padding: 0.45em 0.6em;
    }
}

/* ==========================================
   Responsive Layout — Mobile
   ========================================== */

@media (max-width: 620px) {
    .resources {
        width: calc(100% - 30px);
        padding: 28px 0 48px;
    }

    .page-title {
        font-size: 1.85rem;
    }

    .resource-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .resource-card {
        padding: 20px;
    }

    .resource-section h2 {
        font-size: 1.4rem;
    }

    .filters {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 13px;
        font-size: 0.9rem;
    }

    .logo h1 {
        font-size: 1.65rem;
    }

    .menu .dropdown-content {
        left: auto;
        right: 0;
    }

    .footer-logos {
        gap: 18px;
    }

    .footer-logos img {
        height: 45px;
        max-width: 130px;
    }
}
