/* assets/css/resources.css */

/* --- ЗАГОЛОВОК И НАВИГАЦИЯ --- */
.resources-container {
    padding-top: 30px;
    padding-bottom: 60px;
}

.resources-nav-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}
.resources-nav-link:hover {
    color: #4f46e5;
}

.resources-header {
    text-align: center;
    margin-bottom: 30px;
}
.resources-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 5px;
}
.resources-header p {
    color: #6b7280;
    font-size: 1.1rem;
}

/* --- ГЛАВНЫЕ ВКЛАДКИ (TABS) --- */
.res-tabs-wrapper {
    overflow-x: auto;
    padding-bottom: 5px;
    margin-bottom: 20px;
    text-align: center;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.res-tabs-wrapper::-webkit-scrollbar { display: none; }

.res-tabs {
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    background: #f3f4f6;
    border-radius: 99px;
}

.res-tab {
    text-decoration: none;
    color: #4b5563;
    padding: 10px 22px;
    border-radius: 99px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 0.95rem;
}
.res-tab:hover {
    background: #e5e7eb;
    color: #1f2937;
}
.res-tab.active {
    background: #4f46e5;
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* --- ПОД-МЕНЮ (SUBTABS) --- */
.res-subtabs-wrapper {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeIn 0.3s ease;
}
.res-subtabs {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.res-subtab {
    text-decoration: none;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
    background: #fff;
}
.res-subtab:hover {
    border-color: #c7d2fe;
    color: #4f46e5;
}
.res-subtab.active {
    background: #eef2ff;
    color: #4f46e5;
    border-color: #4f46e5;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- СЕТКА И КАРТОЧКИ --- */
.resources-grid-page {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.res-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
    position: relative;
}
.res-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    border-color: #c7d2fe;
}

.res-card-img {
    height: 170px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f3f4f6;
    position: relative;
    overflow: hidden;
}
.res-card-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s;
}
.res-card:hover .res-card-img img { transform: scale(1.05); }

.res-placeholder {
    font-size: 3.5rem;
    color: #d1d5db;
}

.res-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.res-card-body {
    padding: 22px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.res-card-body h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #111;
    line-height: 1.4;
}
.res-card-body p {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.6;
}

.res-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #eef2ff;
    color: #4f46e5;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}
.res-btn:hover {
    background: #4f46e5;
    color: #fff;
}

/* --- EMPTY STATE --- */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: #f9fafb;
    border-radius: 20px;
    border: 2px dashed #e5e7eb;
    color: #9ca3af;
    max-width: 600px;
    margin: 40px auto;
}
.empty-state i { font-size: 3.5rem; margin-bottom: 20px; color: #d1d5db; }
.empty-state h3 { color: #374151; font-size: 1.5rem; margin-bottom: 10px; font-weight: 700; }
.empty-back-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 24px;
    background: #fff;
    border: 1px solid #d1d5db;
    color: #374151;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}
.empty-back-btn:hover { border-color: #4f46e5; color: #4f46e5; }

@media (max-width: 600px) {
    .res-tabs { width: max-content; }
    .res-tabs-wrapper { text-align: left; padding-left: 10px; padding-right: 10px; }
}