/* Study Materials Page Styles */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Materials Section */
.materials-section {
    padding: 50px 0;
    background-color: #f8f9fa;
}

.materials-container {
    display: flex;
    gap: 30px;
}

/* Sidebar Filters */
.materials-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.filter-section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

.filter-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #333;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #555;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
}

.apply-filters-btn, .reset-filters-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apply-filters-btn {
    background-color: var(--primary-color);
    color: white;
    margin-bottom: 10px;
}

.apply-filters-btn:hover {
    background-color: var(--primary-dark);
}

.reset-filters-btn {
    background-color: #f1f1f1;
    color: #333;
}

.reset-filters-btn:hover {
    background-color: #e1e1e1;
}

/* Materials Content */
.materials-content {
    flex: 1;
}

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

.materials-header h2 {
    font-size: 1.5rem;
    color: #333;
}

.materials-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-control label {
    font-size: 0.9rem;
    color: #555;
}

.sort-control select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #333;
}

.view-controls {
    display: flex;
    gap: 5px;
}

.view-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f1f1;
    border: none;
    border-radius: 4px;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background-color: #e1e1e1;
}

.view-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* Materials Grid */
.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.material-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.material-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.material-thumbnail {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.material-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.material-card:hover .material-thumbnail img {
    transform: scale(1.05);
}

.material-type {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.premium-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ffc107;
    color: #333;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.premium-badge i {
    font-size: 0.7rem;
}

.material-info {
    padding: 15px;
}

.material-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.3;
}

.material-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.material-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.material-subject, .material-difficulty {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.material-subject {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.material-difficulty {
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

.material-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.material-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #555;
    font-size: 0.9rem;
}

.material-rating i {
    color: #f39c12;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.9rem;
}

.btn-premium {
    background-color: #ffc107;
    color: #333;
}

.btn-premium:hover {
    background-color: #e0a800;
}

/* Materials List View */
.materials-list .material-card {
    display: flex;
    height: auto;
}

.materials-list .material-thumbnail {
    width: 200px;
    height: auto;
    flex-shrink: 0;
}

.materials-list .material-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.materials-list .material-description {
    flex: 1;
    -webkit-line-clamp: 3;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.pagination-btn {
    padding: 8px 15px;
    background-color: #f1f1f1;
    border: none;
    border-radius: 4px;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #e1e1e1;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    margin: 0 15px;
}

.pagination-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f1f1;
    border: none;
    border-radius: 4px;
    margin: 0 5px;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-number:hover:not(.active) {
    background-color: #e1e1e1;
}

.pagination-number.active {
    background-color: var(--primary-color);
    color: white;
}

.pagination-ellipsis {
    margin: 0 5px;
    color: #777;
}

/* Featured Collections */
.featured-collections {
    padding: 60px 0;
    background-color: white;
}

.featured-collections h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #333;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.collection-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.collection-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.collection-image {
    height: 180px;
    overflow: hidden;
}

.collection-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.collection-card:hover .collection-image img {
    transform: scale(1.05);
}

.collection-info {
    padding: 20px;
}

.collection-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.collection-info p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.collection-count {
    display: block;
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 15px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .materials-container {
        flex-direction: column;
    }
    
    .materials-sidebar {
        width: 100%;
        margin-bottom: 30px;
    }
    
    .filter-section {
        padding: 15px;
    }
    
    .checkbox-group {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .collections-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .materials-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .materials-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .materials-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .collections-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .materials-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination-numbers {
        display: none;
    }
}
