/* ========================================
   Pantalla de Notas - Mis Calificaciones
   ======================================== */

/* ========================================
   Header con botón de volver
   ======================================== */
.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: none;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gris-oscuro);
    transition: background-color 0.2s ease;
    padding: 0;
}

.back-btn:active {
    background-color: var(--gris-claro);
}

.back-btn svg {
    width: 24px;
    height: 24px;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gris-oscuro);
    line-height: 1.2;
    margin: 0;
}

/* ========================================
   Search Bar
   ======================================== */
.search-container {
    margin-bottom: var(--space-5);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background-color: var(--gris-claro);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    transition: box-shadow 0.2s ease;
}

.search-bar:focus-within {
    box-shadow: 0 0 0 2px var(--color-primario);
}

.search-icon {
    width: 20px;
    height: 20px;
    color: var(--gris-medio);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--gris-oscuro);
    outline: none;
    font-family: var(--fuente-principal);
}

.search-input::placeholder {
    color: var(--gris-medio);
}

/* ========================================
   Summary Cards
   ======================================== */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.summary-card {
    background-color: var(--blanco);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    box-shadow: var(--shadow-sm);
    min-height: 80px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-card:active {
    transform: scale(0.98);
}

.summary-card-primary {
    background: linear-gradient(135deg, var(--color-primario), var(--color-primario-dark));
}

.summary-card-primary .summary-label,
.summary-card-primary .summary-value {
    color: var(--blanco);
}

.summary-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--gris-medio);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gris-oscuro);
    line-height: 1;
}

.summary-card-primary .summary-value {
    font-size: 28px;
}

/* ========================================
   Section Divider
   ======================================== */
.section-header-divider {
    margin-bottom: var(--space-4);
}

.section-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: var(--gris-medio);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

/* ========================================
   Course List
   ======================================== */
.course-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.course-card {
    background-color: var(--blanco);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.course-card:active {
    box-shadow: var(--shadow-md);
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    cursor: pointer;
}

.course-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex: 1;
    min-width: 0;
}

.course-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.course-icon svg {
    width: 24px;
    height: 24px;
}

.course-icon-math {
    background-color: #E3F2FD;
    color: var(--color-primario);
}

.course-icon-language {
    background-color: #FFF3E0;
    color: #FF9800;
}

.course-icon-science {
    background-color: #E8F5E9;
    color: var(--verde-exito);
}

.course-icon-history {
    background-color: #F3E5F5;
    color: #9C27B0;
}

.course-icon-english {
    background-color: #E1F5FE;
    color: #03A9F4;
}

.course-info {
    flex: 1;
    min-width: 0;
}

.course-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--gris-oscuro);
    line-height: 1.3;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-professor {
    font-size: 13px;
    font-weight: 400;
    color: var(--gris-medio);
    line-height: 1.3;
    margin: 0;
    font-style: italic;
}

.course-right {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.grade-badge {
    font-size: 16px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: var(--radius-xl);
    line-height: 1;
}

.grade-badge-high {
    background-color: var(--verde-claro);
    color: var(--verde-exito);
}

.grade-badge-medium {
    background-color: var(--amarillo-claro);
    color: var(--amarillo-advertencia);
}

.grade-badge-low {
    background-color: var(--rojo-claro);
    color: var(--rojo-alerta);
}

.expand-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: none;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gris-medio);
    transition: background-color 0.2s ease, transform 0.3s ease;
    padding: 0;
}

.expand-btn:active {
    background-color: var(--gris-claro);
}

.expand-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.course-card-expanded .expand-btn svg {
    transform: rotate(180deg);
}

/* ========================================
   Course Details (Assessment Breakdown)
   ======================================== */
.course-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: var(--gris-claro);
}

.course-card-expanded .course-details {
    max-height: 500px;
}

.assessment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.assessment-item:last-child {
    border-bottom: none;
}

.assessment-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--gris-oscuro);
    flex: 1;
}

.assessment-weight {
    font-size: 12px;
    font-weight: 400;
    color: var(--gris-medio);
    margin: 0 var(--space-3);
    flex-shrink: 0;
}

.assessment-score {
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    min-width: 70px;
    text-align: right;
}

.assessment-score-high {
    color: var(--verde-exito);
}

.assessment-score-medium {
    color: var(--amarillo-advertencia);
}

.assessment-score-low {
    color: var(--rojo-alerta);
}

.assessment-score-pending {
    color: var(--gris-medio);
    font-style: italic;
    font-weight: 400;
}

/* ========================================
   Simulator Banner
   ======================================== */
.simulator-banner {
    background: linear-gradient(135deg, #1A1F28, #2D3748);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-4);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.simulator-banner:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-lg);
}

.simulator-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.simulator-icon svg {
    width: 32px;
    height: 32px;
    color: var(--blanco);
}

.simulator-content {
    flex: 1;
    min-width: 0;
}

.simulator-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--blanco);
    line-height: 1.2;
    margin: 0 0 4px 0;
}

.simulator-subtitle {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.simulator-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--blanco);
    transition: background-color 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.simulator-btn:active {
    background-color: rgba(255, 255, 255, 0.2);
}

.simulator-btn svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.course-card {
    animation: fadeInUp 0.4s ease-out;
}

.course-card:nth-child(1) { animation-delay: 0.1s; }
.course-card:nth-child(2) { animation-delay: 0.15s; }
.course-card:nth-child(3) { animation-delay: 0.2s; }
.course-card:nth-child(4) { animation-delay: 0.25s; }
.course-card:nth-child(5) { animation-delay: 0.3s; }

.summary-cards {
    animation: fadeInUp 0.5s ease-out;
}

.search-container {
    animation: fadeInUp 0.5s ease-out 0.1s both;
}

/* ========================================
   Search Animations
   ======================================== */
.search-bar {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.search-bar:focus-within {
    transform: translateY(-2px);
}
