/* Estilos específicos para a página de Disciplinas */

.disciplinas-page {
    height: auto !important;
    min-height: 100vh;
    padding: 40px 20px;
    display: block !important;
}

.disciplinas-container {
    max-width: 900px !important;
    width: 100% !important;
    min-height: auto !important;
    margin: 0 auto;
    padding: 40px !important;
    text-align: left !important;
}

/* Header de navegação superior */
.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(229, 57, 53, 0.25);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #e53935;
    font-weight: 700;
    text-decoration: none;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 6px;
    background: rgba(229, 57, 53, 0.1);
    transition: all 0.25s ease;
}

.back-link:hover {
    background: #e53935;
    color: #ffffff;
    transform: translateX(-3px);
}

.disciplinas-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #e53935;
}

.disciplinas-intro {
    font-size: 16px;
    margin-bottom: 35px !important;
    line-height: 1.6;
}

body.theme-dark .disciplinas-intro {
    color: #d1d5db;
}

body.theme-light .disciplinas-intro {
    color: #4b5563;
}

/* Seção de cada disciplina */
.discipline-section {
    margin-bottom: 45px;
    scroll-margin-top: 30px;
    padding: 16px;
    border-radius: 12px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.discipline-section:target {
    background: rgba(59, 130, 246, 0.06);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
    border-radius: 12px;
}

.discipline-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.discipline-name {
    font-size: 22px;
    font-weight: 700;
    color: inherit;
    margin: 0;
}

.share-discipline-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

body.theme-light .share-discipline-btn {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.04);
    color: #4b5563;
}

body.theme-dark .share-discipline-btn {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
}

.share-discipline-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: #3b82f6 !important;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
    transition: all 0.2s ease;
}

body.theme-light .filter-pill {
    border-color: rgba(0, 0, 0, 0.1);
    background: #ffffff;
    color: #374151;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

body.theme-dark .filter-pill {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(30, 32, 34, 0.8);
    color: #e2e8f0;
}

.filter-pill:hover {
    border-color: #e53935;
    color: #e53935 !important;
    transform: translateY(-1px);
}

.badge-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 20px;
}

.badge-red {
    background-color: rgba(229, 57, 53, 0.15);
    color: #ef5350;
    border: 1px solid rgba(229, 57, 53, 0.3);
}

.badge-blue {
    background-color: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-gray {
    background-color: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

.badge-green {
    background-color: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-purple {
    background-color: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.discipline-desc {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 18px !important;
}

body.theme-dark .discipline-desc {
    color: #9ca3af;
}

body.theme-light .discipline-desc {
    color: #6b7280;
}

/* Grid de materiais */
.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.material-card {
    border-radius: 8px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
}

body.theme-dark .material-card {
    background-color: rgba(30, 32, 34, 0.9);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body.theme-light .material-card {
    background-color: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.material-card:hover {
    transform: translateY(-4px);
}

body.theme-dark .material-card:hover {
    border-color: rgba(229, 57, 53, 0.4);
    box-shadow: 0 8px 24px rgba(229, 57, 53, 0.15);
}

body.theme-light .material-card:hover {
    border-color: rgba(229, 57, 53, 0.4);
    box-shadow: 0 8px 24px rgba(229, 57, 53, 0.12);
}

.material-card-content {
    margin-bottom: 18px;
}

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

.material-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

body.theme-dark .material-title {
    color: #ffffff;
}

body.theme-light .material-title {
    color: #1f2937;
}

.material-description {
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 0 !important;
}

body.theme-dark .material-description {
    color: #a3a3a3;
}

body.theme-light .material-description {
    color: #6b7280;
}

.material-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    background-color: #e53935;
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    border-radius: 6px;
    transition: background-color 0.25s ease, transform 0.15s ease, border-color 0.25s ease, color 0.25s ease;
    text-align: center;
}

.material-btn:hover {
    background-color: #c62828;
    transform: scale(1.02);
}

.material-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.material-btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

body.theme-light .material-btn-secondary {
    background-color: rgba(0, 0, 0, 0.05);
    color: #374151 !important;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

body.theme-dark .material-btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: #e5e7eb !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.material-btn-secondary:hover {
    background-color: rgba(229, 57, 53, 0.15);
    border-color: rgba(229, 57, 53, 0.4);
    color: #e53935 !important;
}

/* Card placeholder / em breve */
.material-card-placeholder {
    border-style: dashed !important;
    opacity: 0.8;
}

.material-card-placeholder:hover {
    transform: none;
}

/* Responsividade */
@media (max-width: 600px) {
    .disciplinas-container {
        padding: 20px !important;
    }
    .disciplinas-title {
        font-size: 24px;
    }
    .materials-grid {
        grid-template-columns: 1fr;
    }
    .nav-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}
