/* ===================================
   Community Resource Hub - Elite Dark Mode
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-color: #000000;
    --bg-secondary: #151516;
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-tertiary: #6e6e73;
    --accent: #ffffff;
    --accent-blue: #2997ff;
    --border-color: #333336;
    --nav-bg: rgba(0, 0, 0, 0.7);
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    height: 100%;
    background-color: var(--bg-color);
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.47059;
    font-weight: 400;
    letter-spacing: -0.022em;
    color: var(--text-primary);
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: 0;
}

.t-headline-1 {
    font-size: 80px;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.t-headline-2 {
    font-size: 48px;
    line-height: 1.08349;
    font-weight: 700;
    letter-spacing: -0.003em;
}

.t-headline-3 {
    font-size: 24px;
    line-height: 1.16667;
    font-weight: 600;
    letter-spacing: 0.009em;
}

.t-subhead {
    font-size: 28px;
    line-height: 1.14286;
    font-weight: 500;
    letter-spacing: 0.007em;
    color: var(--text-secondary);
}

p {
    margin-bottom: 0;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #5aa9ff;
}

/* Navigation */
.navbar-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 52px;
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 9999;
}

.nav-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 22px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link-item {
    font-size: 12px;
    line-height: 3.1;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.nav-link-item:hover, .nav-link-item.active {
    color: #ffffff;
}

/* Main Layout */
.pt-nav {
    padding-top: 52px;
}

.container-custom {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 22px;
}

.text-center {
    text-align: center;
}

/* Global Buttons */
.btn-pill {
    display: inline-block;
    background-color: var(--text-primary);
    color: var(--bg-color);
    border-radius: 980px;
    padding: 12px 24px;
    font-size: 17px;
    line-height: 1.17648;
    font-weight: 500;
    letter-spacing: -0.022em;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.btn-pill:hover {
    background-color: #ffffff;
    color: #000000;
    transform: scale(1.02);
}

.btn-pill-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-pill-secondary:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: #555557;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 160px 22px 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.hero .t-headline-1 {
    max-width: 800px;
}

.hero .t-subhead {
    max-width: 600px;
    margin: 0 auto 16px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.bento-card {
    background-color: var(--bg-secondary);
    border-radius: 28px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255,255,255,0.03);
}

.bento-card:hover {
    transform: scale(1.01);
}

.bento-card-large {
    grid-column: span 8;
}

.bento-card-small {
    grid-column: span 4;
}

@media (max-width: 834px) {
    .bento-card-large, .bento-card-small {
        grid-column: span 12;
    }
}

.bento-card .icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: #2c2c2e;
    color: #f5f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.bento-card .bento-title {
    margin-bottom: 12px;
}

.bento-card .bento-text {
    color: var(--text-secondary);
    font-size: 17px;
    line-height: 1.47059;
}

/* Stats */
.stats-section {
    background-color: var(--bg-secondary);
    border-radius: 28px;
    padding: 80px 40px;
    margin: 40px 0;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.03);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 60px;
}

@media (max-width: 834px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-item h4 {
    font-size: 56px;
    line-height: 1.07143;
    font-weight: 700;
    letter-spacing: -0.005em;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stat-item p {
    font-size: 14px;
    line-height: 1.42859;
    font-weight: 600;
    letter-spacing: -0.016em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* Inputs and Forms */
.input-elegant {
    width: 100%;
    padding: 16px 24px;
    font-size: 17px;
    line-height: 1.47059;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background-color: #1d1d1f;
    color: var(--text-primary);
    transition: all 0.2s ease;
    outline: none;
    -webkit-appearance: none;
}

.input-elegant:focus {
    border-color: var(--accent-blue);
    background-color: #000000;
    box-shadow: 0 0 0 4px rgba(41, 151, 255, 0.15);
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}


/* Additional UI Polish for Directory */
.bento-card-medium {
    grid-column: span 6;
}

@media (max-width: 834px) {
    .bento-card-medium {
        grid-column: span 12;
    }
}

/* Premium Filter Pills */
.filters-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-top: 24px;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.filters-container::-webkit-scrollbar {
    display: none;
}

.filter-pill {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 980px; /* pill shape */
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.filter-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.filter-pill.active {
    background: var(--text-primary);
    color: var(--bg-color);
    border-color: var(--text-primary);
    font-weight: 600;
}
