/* Resources Page Styles - resources.css */

/* Brand and text tokens come from main.css. They are not redefined here: a
   later :root block would override the dark theme's values on these pages. */

/* Remove old purple gradient */
.blog-header {
    background: #1e4d8b !important;
    padding: 110px 1.5rem 64px;
    text-align: center;
}

.blog-header h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
}

.blog-header p {
    max-width: 540px;
    margin: 0.6rem auto 0;
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Update other gradient references */
.resource-detail-header,
.category-header,
.educational-resources-header {
    background: #1e4d8b !important;
}

/* Crisis Banner - More Compact */
.crisis-banner {
    background: #FEE2E2;
    border: 2px solid #FCA5A5;
    border-radius: 12px;
    padding: 1.5rem;
    /* Reduced from 2rem */
    margin: 1.5rem auto;
    text-align: center;
    max-width: 1200px;
}

.crisis-banner h3 {
    color: #DC2626;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.crisis-banner p {
    margin-bottom: 1rem;
    color: #7F1D1D;
}

.crisis-numbers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.crisis-contact {
    background: var(--card-bg, #fff);
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: var(--shadow);
}

/* Resources Container */
.resources-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

/* Search Section — overlaps the gradient header */
.search-section {
    margin: -32px auto 0;
    max-width: 720px;
    position: relative;
    z-index: 2;
}

.search-section form {
    display: flex;
    gap: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 50px;
    overflow: hidden;
    background: var(--card-bg, #fff);
    padding: 0.35rem 0.35rem 0.35rem 0.5rem;
}

.search-icon {
    color: var(--text-faint, #9ca3af);
    font-size: 1rem;
    padding-left: 0.75rem;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    padding: 0.75rem 0.5rem 0.75rem 0.75rem;
    font-size: 1rem;
    outline: none;
    background: transparent;
}

.search-button {
    background: var(--accent-green-strong, #2e8059);
    color: white;
    border: none;
    padding: 0.7rem 1.75rem;
    border-radius: var(--radius-btn, 10px);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-ui);
}

.search-button:hover {
    background: var(--accent-green-strong-hover, #256b4a);
    box-shadow: none;
}

/* CTA Button Style (matching main site) */
.cta-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--cta-bg);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-btn, 10px);
    font-weight: 600;
    transition: var(--transition-ui);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    box-shadow: none;
    background: #45b89d;
}

/* Categories Section */
.categories-section {
    padding: 2rem 0;
}

.categories-section h2 {
    text-align: left;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.category-card {
    background: var(--card-bg, #fff);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-color, #e5e7eb);
    box-shadow: var(--shadow);
    transition: var(--transition-ui);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.category-card:hover::before {
    transform: translateX(0);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-sunken, #f3f4f6);
    font-size: 1.45rem;
}

.category-card h3 {
    color: var(--text-dark);
    margin-bottom: 0.4rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.category-card p {
    color: var(--text-muted, #6B7280);
    font-size: 0.95rem;
    line-height: 1.5;
}

.resource-count {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: var(--bg-light);
    color: var(--brand-text, #1e4d8b);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Featured Resources */
.featured-section {
    margin: 3rem 0;
}

.featured-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 1.5rem;
}

.featured-card {
    background: var(--card-bg, #fff);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition-ui);
}

.featured-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.featured-card a {
    text-decoration: none;
    color: inherit;
}

.featured-card h3 {
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.featured-card p {
    color: var(--text-muted, #6B7280);
    margin-bottom: 1rem;
}

/* Resource Items */
.resource-item {
    padding: 1.5rem;
    background: var(--card-bg, #fff);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition-ui);
    margin-bottom: 1rem;
}

.resource-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-hover);
}

.resource-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.resource-title {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1rem;
    text-decoration: none;
}

.resource-title:hover {
    color: var(--secondary-color);
}

.resource-type {
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    white-space: nowrap;
    font-weight: 500;
}

.resource-description {
    color: var(--text-muted, #6B7280);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.resource-link {
    color: var(--brand-text, #1e4d8b);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.resource-link:hover {
    gap: 0.75rem;
    color: var(--secondary-color);
}

/* Search Results */
.search-results {
    margin: 2rem 0;
}

.search-results h2 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.resource-list {
    display: grid;
    gap: 1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    .hero {
        padding: 1.5rem 1rem 2rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .crisis-numbers {
        grid-template-columns: 1fr;
    }

    .resource-header {
        flex-direction: column;
        align-items: start;
    }

    .search-section form {
        flex-direction: column;
        border-radius: 12px;
    }

    .search-input {
        border-radius: 12px 12px 0 0;
    }

    .search-button {
        border-radius: 0 0 12px 12px;
        padding: 1rem;
    }
}
/* Library hub toolkit: tools and Premium tools as plain lists, then every program */
.tk-section { max-width: 1200px; margin: 2.25rem auto; }
.tk-title { font-size: 1.4rem; margin: 0 0 0.2rem; }
.tk-sub { margin: 0 0 1rem; color: var(--text-muted, #4b5563); }
.tk-sub a { font-weight: 600; }
.tk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem 3.5rem; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.tk-list li { display: grid; grid-template-columns: 1fr auto; column-gap: 0.75rem; align-items: baseline; align-content: start; }
.tk-name { font-weight: 700; font-size: 1.05rem; text-decoration: underline; text-underline-offset: 3px; padding-block: 0.55rem; }
.tk-tag { font-size: 0.85rem; font-weight: 600; color: var(--text-muted, #4b5563); white-space: nowrap; }
.tk-desc { grid-column: 1 / -1; margin: 0; font-size: 0.92rem; line-height: 1.45; color: var(--text-muted, #4b5563); max-width: 60ch; }
.tk-upgrade { display: inline-block; margin-top: 1.1rem; padding-block: 0.4rem; font-weight: 700; text-decoration: underline; }
