* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 50%, #0f766e 100%);
    background-attachment: fixed;
    color: #2c3e50;
    height: 100vh;
    overflow: hidden;
}

.resource-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.resource-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
    padding: 15px 30px;
    z-index: 10;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.35);
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.5);
}

.header-title {
    font-size: 1.8rem;
    color: #14b8a6;
    font-weight: 700;
}

.header-spacer {
    width: 120px;
}

.search-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 30px;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.search-icon {
    font-size: 1.2rem;
    margin-right: 10px;
}

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

.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 8px 16px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-chip:hover {
    border-color: #14b8a6;
    color: #14b8a6;
}

.filter-chip.active {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
    border-color: transparent;
}

.resource-main {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.category-sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    overflow-y: auto;
    border-right: 1px solid rgba(20, 184, 166, 0.1);
}

.sidebar-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
    margin-bottom: 15px;
    padding-left: 10px;
}

.category-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    text-decoration: none;
    color: #495057;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.category-link:hover {
    background: rgba(20, 184, 166, 0.1);
    color: #14b8a6;
}

.category-link.active {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
}

.cat-icon {
    font-size: 1.2rem;
}

.cat-name {
    flex: 1;
    font-weight: 500;
}

.cat-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

.category-link.active .cat-count {
    background: rgba(255, 255, 255, 0.2);
}

.resource-content {
    flex: 1;
    padding: 20px 30px;
    overflow-y: auto;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.5rem;
    color: white;
    font-weight: 700;
}

.sort-controls select {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.resource-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(20, 184, 166, 0.1);
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(20, 184, 166, 0.25);
}

.card-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.card-content {
    flex: 1;
    min-width: 0;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.4;
    word-wrap: break-word;
}

.card-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: #6c757d;
}

.card-category {
    text-transform: capitalize;
    background: rgba(20, 184, 166, 0.1);
    color: #14b8a6;
    padding: 2px 8px;
    border-radius: 8px;
}

.card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

.view-btn {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
}

.view-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.4);
}

.download-btn {
    background: white;
    color: #14b8a6;
    border: 2px solid #14b8a6;
}

.download-btn:hover {
    background: #14b8a6;
    color: white;
}

.loading-state, .error-state, .empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-state, .empty-state {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.error-icon, .empty-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.hidden {
    display: none !important;
}

.resource-footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
    font-size: 0.9rem;
    color: #6c757d;
}

.resource-footer a {
    color: #14b8a6;
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 768px) {
    .category-sidebar {
        display: none;
    }
    
    .header-top {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .header-title {
        order: -1;
        width: 100%;
        text-align: center;
        font-size: 1.4rem;
    }
    
    .header-spacer {
        display: none;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-chips {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 5px;
    }
    
    .filter-chip {
        flex-shrink: 0;
    }
}

/* HFHP 2026 Rollout Special Styling */
.hfhp-chip,
.hfhp-link {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
    border-color: transparent !important;
}

.hfhp-chip:hover,
.hfhp-link:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    transform: scale(1.02);
}

.category-link.hfhp-link:not(.active) {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
    color: #dc2626 !important;
    border-left: 4px solid #ef4444;
}

.filter-chip.hfhp-chip:not(.active) {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
    color: #dc2626 !important;
    border: 2px solid #ef4444 !important;
}

.resource-card[data-category="hfhp"] {
    border-left: 4px solid #ef4444;
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

.resource-card[data-category="hfhp"] .card-category {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}
