.resources-section {
    padding: var(--space-16) var(--space-8);
    background: var(--color-grey-50);
    min-height: 100vh;
}

.resources-section__container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Section Header */
.resources-section__header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.resources-section__title {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
}

.resources-section__title-accent {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.resources-section__subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-tertiary);
    max-width: 600px;
    margin: 0 auto;
}

/* Stats Bar (Minimal) */
.resources-section__stats-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
    font-size: var(--text-base);
    color: var(--color-text-secondary);
}

.resources-section__stats-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.resources-section__stats-item svg {
    width: 18px;
    height: 18px;
    color: #6366f1;
}

.resources-section__stats-item:last-child svg {
    color: #eab308;
}

.resources-section__stats-item strong {
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
}

.resources-section__stats-divider {
    color: var(--color-grey-300);
    font-size: var(--text-lg);
}

/* Search Bar */
.resources-section__search {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
    transition: opacity 0.3s ease;
    flex-wrap: wrap;
}

.resources-section__search-input {
    width: 100%;
    max-width: 500px;
    padding: var(--space-3) var(--space-4);
    padding-left: 44px;
    background: var(--color-white);
    border: 1px solid var(--color-grey-200);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    color: var(--color-text-primary);
    transition: all var(--transition-fast);
}

.resources-section__search-input::placeholder {
    color: var(--color-text-tertiary);
}

.resources-section__search-input:focus {
    outline: none;
    border-color: var(--color-grey-400);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.resources-section__search-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.resources-section__search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--color-text-tertiary);
    pointer-events: none;
}

/* Filters */
.resources-section__filters {
    display: flex;
    gap: var(--space-3);
}

.resources-section__sort {
    padding: var(--space-3) var(--space-4);
    padding-right: var(--space-8);
    background: var(--color-white);
    border: 1px solid var(--color-grey-200);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: all var(--transition-fast);
}

.resources-section__sort:hover {
    border-color: var(--color-grey-400);
}

.resources-section__sort:focus {
    outline: none;
    border-color: var(--color-grey-400);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* Main Content Layout (Sidebar + Grid) */
.resources-section__content {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: var(--space-8);
}

/* Sidebar */
.resources-section__sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.resources-section__sidebar-title {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-3);
    padding-left: var(--space-3);
}

.resources-section__sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.resources-section__sidebar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
    width: 100%;
}

.resources-section__sidebar-item:hover {
    background: var(--color-white);
    color: var(--color-text-primary);
}

.resources-section__sidebar-item--active {
    background: rgba(99, 102, 241, 0.08);
    color: #4f46e5;
    font-weight: var(--font-semibold);
}

.resources-section__sidebar-item--active:hover {
    background: rgba(99, 102, 241, 0.12);
}

.resources-section__sidebar-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.resources-section__sidebar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.resources-section__sidebar-icon svg {
    width: 16px;
    height: 16px;
}

/* Icon color variants - matching card colors */
.resources-section__sidebar-icon--all {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.resources-section__sidebar-icon--featured {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.resources-section__sidebar-icon--plugins {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.resources-section__sidebar-icon--scripts {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.resources-section__sidebar-icon--tools {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.resources-section__sidebar-icon--themes {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

.resources-section__sidebar-icon--forks {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

/* Active state - keep colored icons, just highlight background */
.resources-section__sidebar-item--active .resources-section__sidebar-icon--all {
    background: rgba(99, 102, 241, 0.15);
    color: #4f46e5;
}

.resources-section__sidebar-count {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-full);
}

.resources-section__sidebar-item--active .resources-section__sidebar-count {
    background: rgba(99, 102, 241, 0.15);
    color: #4f46e5;
}

/* Collapsible Group */
.resources-section__sidebar-group {
    display: flex;
    flex-direction: column;
}

/* Chevron Icon */
.resources-section__sidebar-chevron {
    width: 16px;
    height: 16px;
    margin-left: var(--space-2);
    opacity: 0.7;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    color: var(--color-text-tertiary);
}

.resources-section__sidebar-group--expanded .resources-section__sidebar-chevron {
    transform: rotate(90deg);
}

/* Parent item with chevron */
.resources-section__sidebar-item--parent .resources-section__sidebar-label {
    flex: 1;
    display: flex;
    align-items: center;
}

/* Subcategories Container */
.resources-section__sidebar-subcategories {
    display: none;
    flex-direction: column;
    margin-left: 36px;
    padding-left: var(--space-2);
    border-left: 2px solid var(--color-grey-200);
    margin-top: var(--space-1);
    margin-bottom: var(--space-1);
}

.resources-section__sidebar-group--expanded .resources-section__sidebar-subcategories {
    display: flex;
}

/* Subcategory Item */
.resources-section__sidebar-subitem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
    gap: var(--space-2);
}

.resources-section__sidebar-subitem>span:first-child {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.resources-section__sidebar-subitem:hover {
    background: var(--color-grey-100);
    color: var(--color-text-primary);
}

.resources-section__sidebar-subitem--active {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    font-weight: var(--font-medium);
}

.resources-section__sidebar-subitem .resources-section__sidebar-count {
    font-size: 10px;
    padding: 1px 6px;
    flex-shrink: 0;
}

/* Resources Grid */
.resources-section__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-5);
}

/* Loading State */
.resources-section__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-16);
    color: var(--color-text-tertiary);
}

.resources-section__spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--color-grey-200);
    border-top-color: var(--color-grey-900);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Empty State */
.resources-section__empty {
    text-align: center;
    padding: var(--space-16);
    color: var(--color-text-tertiary);
}

.resources-section__empty-icon {
    font-size: 48px;
    margin-bottom: var(--space-4);
    opacity: 0.5;
}

/* Stats Bar */
.resources-section__stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    margin-bottom: var(--space-8);
    padding: var(--space-4);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.resources-section__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.resources-section__stat-value {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
}

.resources-section__stat-label {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 1024px) {
    .resources-section__content {
        grid-template-columns: 1fr;
    }

    .resources-section__sidebar {
        position: static;
        display: flex;
        flex-direction: row;
        gap: var(--space-2);
        overflow-x: auto;
        padding-bottom: var(--space-2);
    }

    .resources-section__sidebar-title {
        display: none;
    }

    .resources-section__sidebar-list {
        flex-direction: row;
        gap: var(--space-2);
    }

    .resources-section__sidebar-item {
        white-space: nowrap;
        padding: var(--space-2) var(--space-3);
    }
}

@media (max-width: 768px) {
    .resources-section {
        padding: var(--space-8) var(--space-4);
    }

    .resources-section__title {
        font-size: var(--text-2xl);
    }

    .resources-section__grid {
        grid-template-columns: 1fr;
    }

    .resources-section__stats {
        flex-wrap: wrap;
        gap: var(--space-4);
    }

    .resources-section__search-input {
        font-size: var(--text-sm);
    }
}