/* Subject Detail Page Styles */

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

.subject-hero.math {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.subject-hero.physics {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.subject-hero.chemistry {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.subject-hero.biology {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.subject-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.subject-icon {
    width: 100px;
    height: 100px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
}

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

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

.subject-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
}

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

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Topics Section */
.topics-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

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

.topic-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.topic-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 1.5rem;
}

.topic-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

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

.topic-stats {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: #777;
}

/* Resources Section */
.resources-section {
    padding: 80px 0;
    background-color: white;
}

.resources-tabs {
    margin-top: 40px;
}

.tabs-header {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.tabs-content {
    position: relative;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

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

/* Study Materials Cards */
.resource-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

.resource-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;
}

.resource-info {
    padding: 15px;
}

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

.resource-info p {
    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;
}

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

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

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

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

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

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

.resource-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;
}

/* Practice Questions Cards */
.question-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

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

.question-header {
    display: flex;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 8px;
}

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

.question-type {
    background-color: rgba(106, 17, 203, 0.1);
    color: #6a11cb;
}

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

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

.question-content {
    padding: 15px;
    min-height: 100px;
}

.question-content h3 {
    font-size: 1rem;
    color: #333;
    line-height: 1.5;
}

.question-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    text-align: center;
}

.question-card.premium .premium-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Video Cards */
.video-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.video-thumbnail {
    position: relative;
    height: 180px;
    overflow: hidden;
}

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

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

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

.video-card:hover .play-button {
    background-color: var(--primary-color);
}

.video-info {
    padding: 15px;
}

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

.video-info p {
    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;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-topic {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 4px;
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
    font-weight: 500;
}

.video-duration {
    font-size: 0.8rem;
    color: #777;
}

.video-card.premium .premium-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Quiz Cards */
.quiz-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

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

.quiz-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

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

.quiz-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

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

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

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

.quiz-info {
    padding: 15px;
}

.quiz-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.quiz-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: #777;
}

.quiz-info p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.quiz-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    text-align: center;
}

.quiz-card.premium .premium-badge {
    position: absolute;
    top: 15px;
    right: 15px;
}

.view-all-btn {
    text-align: center;
}

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

.cta-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

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

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.cta-buttons .btn-outline {
    border-color: white;
    color: white;
}

.cta-buttons .btn-outline:hover {
    background-color: white;
    color: var(--primary-color);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .subject-hero, .topics-section, .resources-section, .cta-section {
        padding: 60px 0;
    }
    
    .topics-grid, .resources-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .subject-hero h1 {
        font-size: 2rem;
    }
    
    .subject-stats {
        gap: 20px;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .tabs-header {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .subject-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .subject-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .topics-grid, .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
}
