/* =====================================================
   INGLÉS VESPERTINO 2026 - ESTILOS CID
   Centro de Educación a Distancia (CED)
   ===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    color: #333333;
}

/* =====================================================
   HEADER
   ===================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #1e5a99;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    color: #1e5a99;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f5f7fa;
    border: 1px solid #1e5a99;
    border-radius: 25px;
    color: #1e5a99;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #1e5a99;
    color: #ffffff;
    transform: translateX(-5px);
}

/* =====================================================
   CONTENIDO PRINCIPAL
   ===================================================== */
.main-content {
    padding: 100px 20px 60px;
    min-height: 100vh;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* =====================================================
   HEADER DEL FORMULARIO
   ===================================================== */
.form-header {
    padding: 40px;
    text-align: center;
    background: linear-gradient(135deg, #1e5a99 0%, #0d3a66 100%);
    border-bottom: none;
}

.form-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 15px;
    flex-wrap: wrap;
    color: #ffffff;
}

.title-main {
    color: #ffffff;
}

.title-year {
    font-size: 3rem;
    color: #f5a623;
}

.form-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 0.9rem;
    color: #ffffff;
}

.badge-icon {
    font-size: 1.2rem;
}

/* =====================================================
   SECCIONES DEL FORMULARIO
   ===================================================== */
.ingles-form {
    padding: 40px;
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 20px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #1e5a99;
}

.section-icon {
    font-size: 1.5rem;
}

/* =====================================================
   GRID Y CAMPOS
   ===================================================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333333;
    font-size: 0.95rem;
}

.required {
    color: #dc3545;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    color: #333333;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: #999999;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1e5a99;
    box-shadow: 0 0 0 3px rgba(30, 90, 153, 0.15);
}

.form-group input:valid:not(:placeholder-shown) {
    border-color: #28a745;
}

.form-group input.error,
.form-group select.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.error-message {
    display: none;
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 6px;
    padding-left: 5px;
}

.form-group.has-error .error-message {
    display: block;
}

/* =====================================================
   SELECT PERSONALIZADO
   ===================================================== */
.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231e5a99' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 45px;
}

.form-group select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f5f5f5;
}

.form-group select option {
    background: #ffffff;
    color: #333333;
    padding: 10px;
}

/* =====================================================
   INFO DE NIVELES
   ===================================================== */
.niveles-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

@media (max-width: 600px) {
    .niveles-info {
        grid-template-columns: 1fr;
    }
}

.nivel-card {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.nivel-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.nivel-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
}

.nivel-header.nivel-1a {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.nivel-header.nivel-1b {
    background: linear-gradient(135deg, #1e5a99, #3498db);
}

.nivel-nombre {
    font-weight: 700;
    font-size: 1.1rem;
}

.nivel-tae {
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
}

.nivel-horarios {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9rem;
    color: #555555;
}

/* =====================================================
   BOTONES
   ===================================================== */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

@media (max-width: 500px) {
    .form-actions {
        flex-direction: column;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-width: 180px;
}

.btn-icon {
    font-size: 1.2rem;
}

.btn-primary {
    background: #f5a623;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.3);
}

.btn-primary:hover {
    background: #e09000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 166, 35, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #ffffff;
    color: #1e5a99;
    border: 1px solid #1e5a99;
}

.btn-secondary:hover {
    background: #e8f4fc;
}

.btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =====================================================
   MODALES
   ===================================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
}

.modal-content.success .modal-icon {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 2px solid #28a745;
}

.modal-content.error .modal-icon {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 2px solid #dc3545;
}

.modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333333;
}

.modal-content p {
    color: #666666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.modal-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
    text-align: left;
}

.modal-details p {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #333333;
}

.modal-details p:last-child {
    margin-bottom: 0;
}

.modal-details strong {
    color: #1e5a99;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .form-header {
        padding: 30px 20px;
    }
    
    .form-title {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 5px;
    }
    
    .title-year {
        font-size: 2.2rem;
    }
    
    .ingles-form {
        padding: 25px 20px;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
}
