/* Library Page Styles */

.page-header {
    background-color: var(--secondary);
    color: white;
    padding: var(--spacing-lg) 0;
    text-align: center;
}

.page-header h1 {
    color: white;
}

/* Library Search */
.library-search {
    padding: var(--spacing-md) 0;
}

.search-box {
    background-color: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.search-input-wrapper {
    position: relative;
    display: flex;
}

.search-input {
    flex-grow: 1;
    padding: 0.75rem;
    padding-right: 3rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.search-button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    cursor: pointer;
    transition: var(--transition);
}

.search-button:hover {
    background-color: var(--primary-dark);
}

.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

/* Library Categories */
.library-categories {
    padding: var(--spacing-lg) 0;
}

.category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.category-card {
    background-color: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    transition: var(--transition);
    height: 100%;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.category-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    margin-bottom: var(--spacing-xs);
    font-size: 1.5rem;
}

.category-card h3 {
    font-size: 1.25rem;
    color: var(--secondary);
}

.category-card p {
    color: var(--text-light);
    flex-grow: 1;
    margin-bottom: var(--spacing-md);
}

.category-count {
    color: var(--text-light);
    font-size: 0.875rem;
    align-self: flex-end;
}

/* Recent Additions */
.recent-additions {
    padding: var(--spacing-lg) 0;
    background-color: var(--light-alt);
}

.materials-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.material-item {
    background-color: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.material-type {
    display: inline-block;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
}

.material-item h3 {
    margin-bottom: var(--spacing-xs);
    color: var(--secondary);
}

.material-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-sm);
}

.material-item p {
    margin-bottom: var(--spacing-md);
}

.material-categories {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.material-category {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}

.view-all {
    text-align: center;
}

/* Access Note */
.access-note {
    padding: var(--spacing-lg) 0;
}

.note-box {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background-color: var(--light);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary);
}

.note-icon {
    font-size: 2rem;
    color: var(--primary);
    display: flex;
    flex-shrink: 0;
}

.note-content {
    flex-grow: 1;
}

.note-content h3 {
    margin-bottom: var(--spacing-xs);
    color: var(--secondary);
}

.note-content p {
    margin-bottom: var(--spacing-md);
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 991px) {
    .search-filters {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .category-cards {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 767px) {
    .note-box {
        flex-direction: column;
        text-align: center;
    }
    
    .material-meta {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
}

/* Страница со списком материалов */
.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.material-card {
    background-color: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.material-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.material-cover {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.material-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.material-card:hover .material-cover img {
    transform: scale(1.05);
}

.material-type {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: rgba(139, 90, 43, 0.9);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.material-content {
    padding: 20px;
}

.material-content h3 {
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.material-content p {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
}

.material-meta {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.material-author {
    margin-right: 15px;
}

.material-author i, .material-date i {
    margin-right: 5px;
    color: #8B5A2B;
}

.material-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.category-tag {
    background-color: #f0f0f0;
    color: #555;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.category-tag:hover {
    background-color: #1F3438;
    color: #fff;
}

/* Фильтры материалов */
.materials-filters {
    margin-bottom: 30px;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
}

.filter-group select, .filter-group input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 15px;
}

.filter-group select:focus, .filter-group input:focus {
    border-color: #8B5A2B;
    outline: none;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.search-box {
    margin-bottom: 30px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 20px;
    padding-right: 50px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.search-box button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: #8B5A2B;
    cursor: pointer;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    gap: 10px;
}

.pagination-prev,
.pagination-next {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #444;
    transition: all 0.2s ease;
}

.pagination-prev:hover,
.pagination-next:hover {
    background-color: #8B5A2B;
    color: #fff;
    border-color: #8B5A2B;
}

.pagination-prev.disabled,
.pagination-next.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: 8px;
}

.pagination-numbers a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #444;
    transition: all 0.2s ease;
}

.pagination-numbers a:hover {
    background-color: #f0f0f0;
}

.pagination-numbers a.active {
    background-color: #8B5A2B;
    color: #fff;
    border-color: #8B5A2B;
}

/* Страница отдельного материала */
.page-header {
    background-color: #1F3438;
    color: #fff;
    padding: 60px 0 40px;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../img/texture.png');
    background-blend-mode: multiply;
    opacity: 0.2;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    color: #fff;
}

.breadcrumbs {
    margin-bottom: 20px;
    color: rgba(255,255,255,0.7);
    font-size: 15px;
}

.breadcrumbs a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: #fff;
}

.material-meta-header {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    color: rgba(255,255,255,0.8);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.meta-item i {
    color: #d4a76a;
}

/* Страница материала - основное содержимое */
.material-content {
    padding: 50px 0;
}

.content-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
}

.material-info {
    position: sticky;
    top: 30px;
    align-self: flex-start;
}

.material-cover {
    margin-bottom: 25px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.material-cover img {
    width: 100%;
    display: block;
}

.material-files {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 25px;
}

.material-files h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.file-list {
    list-style: none;
    padding: 0;
}

.file-list li {
    margin-bottom: 10px;
}

.file-list li:last-child {
    margin-bottom: 0;
}

.file-link {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    background-color: #fff;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid #eaeaea;
    transition: all 0.2s;
    text-decoration: none;
    color: #333;
    position: relative;
}

.file-link:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.05);
}

.file-link i {
    font-size: 18px;
    color: #8B5A2B;
    margin-right: 12px;
    flex-shrink: 0;
}

.file-name {
    flex: 1;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 70px);
}

.file-size {
    color: #777;
    font-size: 14px;
    flex-shrink: 0;
    text-align: right;
    margin-left: auto;
    min-width: 50px;
}

.restricted-badge {
    display: block;
    width: 100%;
    font-size: 12px;
    color: #a52a2a;
    margin-top: 5px;
    padding-left: 30px;
}

.restricted-badge i {
    font-size: 12px;
    margin-right: 5px;
}

.material-categories-sidebar {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
}

.material-categories-sidebar h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.material-description {
    line-height: 1.7;
}

.material-description h2 {
    margin: 30px 0 20px;
    font-size: 24px;
    position: relative;
    color: #333;
}

.material-description h2:first-child {
    margin-top: 0;
}

.material-description p {
    margin-bottom: 20px;
    color: #444;
}

.material-toc {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 6px;
    margin: 25px 0;
}

.material-toc ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

.material-toc ol li {
    margin-bottom: 10px;
    font-weight: 500;
}

.material-toc ul {
    margin-top: 8px;
    padding-left: 20px;
}

.material-toc ul li {
    margin-bottom: 6px;
    font-weight: normal;
}

.features-list {
    margin: 25px 0;
    padding-left: 0;
    list-style: none;
}

.features-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    font-size: 16px;
}

.features-list li i {
    position: absolute;
    left: 0;
    top: 2px;
    color: #8B5A2B;
}

.author-quote {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
    position: relative;
}

.author-quote::before {
    content: '\201C';
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 60px;
    color: rgba(139, 90, 43, 0.2);
    font-family: "Georgia", serif;
    line-height: 1;
}

.author-quote p {
    font-style: italic;
    color: #444;
    line-height: 1.7;
    margin-bottom: 0;
}

.author-quote footer {
    margin-top: 15px;
    color: #666;
    background: none;
    padding: 0;
}

.author-quote cite {
    font-style: normal;
    font-weight: 500;
    color: #333;
}

.audience-info {
    margin: 25px 0;
}

.audience-info p {
    margin-bottom: 15px;
    font-weight: 500;
}

.audience-info ul {
    padding-left: 20px;
}

.audience-info ul li {
    margin-bottom: 10px;
    color: #444;
}

/* Похожие материалы */
.related-materials {
    background-color: #f9f9f9;
    padding: 60px 0;
}

.related-materials h2 {
    margin-bottom: 30px;
    text-align: center;
}

.related-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.related-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.related-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.related-type {
    display: inline-block;
    margin-bottom: 10px;
    color: #8B5A2B;
    font-weight: 500;
}

.related-type i {
    margin-right: 6px;
}

.related-item h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.related-item h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.related-item h3 a:hover {
    color: #8B5A2B;
}

.related-item p {
    color: #555;
    margin-bottom: 0;
    line-height: 1.5;
}

.related-item {
    padding: 25px;
}

/* Примечание о доступе */
.access-note {
    padding: 60px 0;
}

.note-box {
    display: flex;
    align-items: center;
    gap: 30px;
    background-color: #1F3438;
    border-radius: 8px;
    padding: 30px;
    color: #fff;
}

.note-icon {
    font-size: 40px;
    color: #d4a76a;
}

.note-content h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #fff;
}

.note-content p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 15px;
}

/* Адаптивность */
@media (max-width: 991px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .material-info {
        position: static;
        margin-bottom: 40px;
    }
    
    .material-cover {
        max-width: 300px;
        margin: 0 auto 25px;
    }
}

@media (max-width: 767px) {
    .material-meta-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .page-header {
        padding: 40px 0 30px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .material-description h2 {
        font-size: 22px;
    }
    
    .related-items {
        grid-template-columns: 1fr;
    }
    
    .related-item {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .note-box {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .access-note {
        padding: 40px 0;
    }
    
    .material-files {
        max-width: 400px;
        margin: 0 auto 25px;
    }
    
    .material-categories-sidebar {
        max-width: 400px;
        margin: 0 auto;
    }
} 