/* =====================================================
   Plataforma de Tutorías de Inglés — Estilos Públicos
   ===================================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --primary-glow: rgba(37, 99, 235, 0.15);
    --secondary: #64748b;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --bg: #f0f4f8;
    --white: #ffffff;
    --text: #1e293b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s ease;
    --gradient: linear-gradient(135deg, #374151 0%, #1f2937 50%, #111827 100%);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #111827;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body.welcome-body,
body.dark-body {
    background: #111827;
}

/* --- Layout --- */
.container { width: 92%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.container-sm { max-width: 520px; }

.main-content { flex: 1; padding: 80px 0 40px; }
.main-content.welcome-page { padding: 0; }

/* --- BANNER SUPERIOR BIENVENIDA --- */
.welcome-top-banner {
    text-align: center;
    padding: 28px 16px 18px;
    position: relative;
    z-index: 2;
}
.banner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}
.banner-icon {
    font-size: 3rem;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
    animation: flagWave 3s ease-in-out infinite;
}
.banner-flag {
    width: 57px;
    height: 38px;
    border: none;
}
.banner-logo-img {
    max-width: 80px;
    height: auto;
    margin: 8px auto 0;
    display: block;
}
.banner-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
}
.banner-tagline {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
    margin: 4px 0 0;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.welcome-credit {
    text-align: center;
    color: rgba(255,255,255,0.45);
    font-size: 0.72rem;
    margin-top: 18px;
    padding-bottom: 12px;
    position: relative;
    z-index: 1;
    line-height: 1.5;
}
@keyframes flagWave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

/* --- PÁGINA DE BIENVENIDA --- */
.welcome-page {
    background: var(--gradient);
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0 0 1vh;
    position: relative;
    overflow: hidden;
}
.welcome-page::before {
    content: '';
    position: absolute; top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255,255,255,0.05) 0%, transparent 40%);
    animation: floatBg 20s ease-in-out infinite alternate;
}
@keyframes floatBg {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-30px, -20px) rotate(3deg); }
}

.welcome-page .container {
    position: relative; z-index: 1;
    display: flex; align-items: flex-start; justify-content: center;
    min-height: auto;
}

.welcome-section {
    display: flex; justify-content: center; align-items: flex-start;
    width: 100%; min-height: auto;
}

.welcome-card {
    background: var(--white);
    border-radius: 24px;
    padding: 40px 48px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    max-width: 560px;
    width: 100%;
}

.welcome-emoji {
    font-size: 4rem;
    margin-bottom: 12px;
    display: block;
    animation: bounce 2s ease infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.welcome-title {
    font-size: 1.9rem; font-weight: 800;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.3;
}

.welcome-subtitle {
    color: var(--text-muted);
    margin-bottom: 28px;
    font-size: 1.05rem;
    line-height: 1.7;
}

.welcome-features {
    display: flex; gap: 20px; justify-content: center;
    margin-bottom: 32px; flex-wrap: wrap;
}
.feature-item {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    background: var(--white);
    padding: 18px 24px; border-radius: 14px;
    font-size: 0.85rem; font-weight: 600; color: var(--text);
    min-width: 150px; width: 150px;
    border: 1px solid var(--border);
    transition: var(--transition);
}
.feature-item:hover { transform: translateY(-3px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.feature-icon { font-size: 1.5rem; color: var(--primary); }

/* --- Animación de entrada --- */
.animate-in {
    animation: slideUp 0.6s ease-out;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Botón con pulso --- */
.btn-pulse {
    animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
    50% { box-shadow: 0 4px 24px rgba(0,0,0,0.35); }
}
.btn-pulse:hover { animation: none; }

/* --- Tipografía --- */
h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--white); }
h2 { font-size: 1.4rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--white); }
h3 { font-size: 1.15rem; font-weight: 600; }

.section-header { text-align: center; margin-bottom: 40px; }
.section-header h1 { color: var(--white); }
.section-header p { color: rgba(255,255,255,0.7); font-size: 1.05rem; }
.section-header .section-icon { font-size: 3rem; margin-bottom: 8px; color: var(--white); display: block; }

/* --- Aviso de duración de sesión --- */
.session-duration-notice {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: rgba(37, 99, 235, 0.18);
    border: 2px solid #2563eb;
    border-radius: 10px;
    padding: 14px 24px;
    margin: 0 auto 28px;
    max-width: 480px;
    color: #fff;
    font-size: 1.05rem;
    text-align: center;
}
.session-duration-notice i { font-size: 1.4rem; color: #60a5fa; flex-shrink: 0; }
.session-duration-notice span { color: #fbbf24; font-size: 1.15rem; }
.section-emoji { font-size: 3rem; margin-bottom: 8px; }

/* --- Botones --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border: none; border-radius: var(--radius-sm);
    font-size: 0.95rem; font-weight: 600; cursor: pointer;
    text-decoration: none; transition: var(--transition);
}
.btn i { font-size: 0.9em; }
.btn-primary { background: #000000; color: var(--white); }
.btn-primary:hover { background: #1a1a1a; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.35); }
.btn-secondary { background: var(--secondary); color: var(--white); }
.btn-secondary:hover { background: #475569; }
.btn-outline { background: transparent; color: #000000; border: 2px solid #000000; }
.btn-outline:hover { background: #000000; color: var(--white); }
.btn-outline-light { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.5); }
.btn-outline-light:hover { background: var(--white); color: #000000; }
.btn-lg { padding: 16px 36px; font-size: 1.1rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-group { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* --- Botón flotante idioma --- */
.btn-float-lang {
    position: fixed; bottom: 24px; right: 24px; z-index: 1000;
    background: var(--white); color: #1e293b;
    border: 2px solid #e2e8f0; border-radius: 50px; padding: 14px 22px;
    font-size: 0.9rem; font-weight: 600; cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: var(--transition);
    display: flex; align-items: center; gap: 8px;
}
.btn-float-lang:hover { background: #f1f5f9; transform: scale(1.05); }

/* --- Texto superior de página --- */
.page-top-text {
    text-align: center; margin-bottom: 24px; color: rgba(255,255,255,0.85);
    font-size: 0.95rem; line-height: 1.6;
}

/* --- Formularios --- */
.form-card {
    background: var(--white); border-radius: var(--radius); padding: 44px 36px;
    box-shadow: var(--shadow-lg); margin-top: 20px;
}
.form-card h1 { color: var(--text); }
.form-card-header { text-align: center; margin-bottom: 28px; }
.form-card-header i { font-size: 2.5rem; color: #1e293b; margin-bottom: 12px; display: block; }
.form-card-header p { color: var(--text-muted); }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; color: var(--text); }
.form-group label i { color: #374151; margin-right: 4px; }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%; padding: 13px 16px; border: 2px solid var(--border);
    border-radius: var(--radius-sm); font-size: 0.95rem; transition: var(--transition);
    background: var(--white); color: var(--text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none; border-color: #374151; box-shadow: 0 0 0 4px rgba(55, 65, 81, 0.12);
}

/* --- Alertas --- */
.alert {
    padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px;
    display: flex; align-items: center; gap: 8px; font-size: 0.9rem;
}
.alert-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }

/* --- Tarjetas de profesores --- */
.professors-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px; max-width: 960px; margin: 0 auto;
}

.professor-card {
    background: var(--white); border-radius: 20px; overflow: visible;
    box-shadow: var(--shadow); transition: var(--transition);
    display: flex; flex-direction: column; align-items: center;
    padding: 32px 24px 24px; text-align: center;
    border: 2px solid transparent; position: relative;
}
.professor-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

/* Avatar circular */
.professor-avatar {
    width: 120px; height: 120px; border-radius: 50%; overflow: hidden;
    margin-bottom: 18px; border: 4px solid var(--primary-light);
    box-shadow: 0 4px 16px rgba(37,99,235,0.15);
    flex-shrink: 0;
}
.professor-avatar img {
    width: 100%; height: 100%; object-fit: cover;
}
.professor-avatar-placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex; align-items: center; justify-content: center;
}
.professor-avatar-placeholder span {
    font-size: 2.8rem; font-weight: 700; color: var(--white);
}

.professor-info { padding: 0 4px; flex: 1; margin-bottom: 18px; }
.professor-info h3 { margin-bottom: 6px; color: var(--text); font-size: 1.15rem; }
.professor-info p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }
.professor-card .btn {
    width: calc(100% - 0px); border-radius: 12px;
    padding: 14px 20px; font-size: 0.95rem;
}

/* --- Horarios --- */
.schedule-legend {
    display: flex; justify-content: center; gap: 24px; margin-bottom: 28px;
    flex-wrap: wrap;
}
.legend-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.88rem; color: var(--text-muted); font-weight: 500;
}
.legend-dot {
    width: 14px; height: 14px; border-radius: 50%; display: inline-block;
}
.legend-available { background: var(--success); }
.legend-reserved { background: #fdba74; border: 2px solid #fb923c; }

.schedule-grid {
    display: flex; flex-direction: column; gap: 20px;
    max-width: 800px; margin: 0 auto;
}

.schedule-day {
    background: var(--white); border-radius: 18px; padding: 24px 28px;
    box-shadow: var(--shadow);
    border: none; overflow: hidden;
}

.schedule-day-header {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 18px; padding-bottom: 14px;
    border-bottom: 2px solid var(--primary-light);
}
.schedule-day-number {
    width: 52px; height: 52px; border-radius: 14px;
    background: var(--gradient); color: var(--white);
    font-size: 1.4rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.schedule-day-info { display: flex; flex-direction: column; }
.schedule-day-name {
    font-size: 1.05rem; font-weight: 700; color: var(--text);
    text-transform: capitalize;
}
.schedule-day-month {
    font-size: 0.82rem; color: var(--text-muted); font-weight: 500;
}

.time-slots { display: flex; flex-wrap: wrap; gap: 10px; }

.time-slot {
    padding: 12px 20px; border: 2px solid var(--border); border-radius: 12px;
    background: var(--white); cursor: pointer; font-size: 0.95rem; font-weight: 600;
    transition: var(--transition); display: flex; align-items: center; gap: 8px;
    color: var(--text); position: relative;
}

/* Disponible */
.time-slot.slot-available {
    border-color: var(--success); color: var(--success);
    background: #f0fdf4;
}
.time-slot.slot-available:hover {
    background: var(--success); color: var(--white);
    transform: translateY(-2px); box-shadow: 0 4px 12px rgba(22,163,74,0.3);
}

/* Reservado */
.time-slot.slot-reserved {
    border-color: #fed7aa; color: #c2410c;
    background: #fff7ed; cursor: not-allowed; opacity: 0.85;
}
.time-slot.slot-reserved i { font-size: 0.8em; }
.slot-badge {
    font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.5px;
    background: #fdba74; color: #9a3412; padding: 2px 8px; border-radius: 6px;
    font-weight: 700;
}

/* Deshabilitado */
.time-slot.slot-disabled {
    opacity: 0.35; cursor: not-allowed;
}

/* Seleccionado */
.time-slot.selected {
    background: var(--primary) !important; color: var(--white) !important;
    border-color: var(--primary) !important;
    transform: scale(1.08); box-shadow: 0 6px 20px rgba(37,99,235,0.35);
}

.reservation-actions {
    text-align: center; margin-top: 36px;
    display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
}

/* --- Confirmación --- */
.confirmation-card {
    background: var(--white); border-radius: var(--radius); padding: 56px 36px;
    box-shadow: var(--shadow-lg); max-width: 520px; margin: 0 auto;
}
.confirmation-icon { font-size: 4.5rem; color: var(--success); margin-bottom: 16px; animation: bounce 2s ease infinite; }
.confirmation-card h1 { color: var(--text); }
.confirmation-card p { color: var(--text-muted); }
.student-name { color: #1e293b; font-size: 1.1rem; font-weight: 600; margin: 16px 0; }

/* --- Estados vacíos --- */
.empty-state-public {
    text-align: center; padding: 60px 20px; color: rgba(255,255,255,0.7);
}
.empty-state-public i { font-size: 3rem; margin-bottom: 16px; display: block; opacity: 0.6; color: var(--white); }

/* --- Footer --- */
.site-footer {
    background: var(--white); border-top: 1px solid var(--border);
    padding: 24px 0; text-align: center; color: var(--text-muted); font-size: 0.85rem;
    margin-top: auto;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { opacity: 0.8; }
.welcome-page .site-footer {
    background: transparent; border: none; color: rgba(255,255,255,0.6);
    position: relative; z-index: 1;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    html { font-size: 15px; }
    h1, .welcome-title { font-size: 1.4rem; }
    h2 { font-size: 1.2rem; }
    .main-content { padding: 60px 0 28px; }

    /* Bienvenida */
    .welcome-page { padding: 0 0 20px; }
    .welcome-top-banner { padding: 20px 12px 14px; }
    .banner-icon { font-size: 2.4rem; }
    .banner-flag { width: 42px; }
    .banner-title { font-size: 1.4rem; }
    .banner-tagline { font-size: 0.78rem; }
    .welcome-card { padding: 36px 28px; border-radius: 20px; }
    .welcome-emoji { font-size: 3.2rem; }
    .welcome-subtitle { font-size: 0.95rem; margin-bottom: 24px; }
    .welcome-features { gap: 12px; }
    .feature-item { min-width: 95px; padding: 12px 12px; font-size: 0.78rem; border-radius: 12px; }
    .feature-emoji { font-size: 1.4rem; }

    /* Botones */
    .btn-group { flex-direction: column; align-items: stretch; }
    .btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 12px; }
    .btn-float-lang { bottom: 16px; right: 16px; padding: 10px 16px; font-size: 0.82rem; }

    /* Formularios */
    .form-card { padding: 32px 24px; border-radius: 18px; }
    .form-card-header i { font-size: 2rem; }
    .form-group input, .form-group select, .form-group textarea { padding: 12px 14px; font-size: 0.92rem; }

    /* Profesores */
    .professors-grid { grid-template-columns: 1fr; gap: 20px; max-width: 400px; }
    .professor-avatar { width: 100px; height: 100px; }
    .professor-avatar-placeholder span { font-size: 2.2rem; }
    .professor-card { padding: 28px 20px 20px; border-radius: 18px; }

    /* Horarios */
    .schedule-day { padding: 20px 18px; border-radius: 16px; }
    .schedule-day-number { width: 46px; height: 46px; font-size: 1.2rem; border-radius: 12px; }
    .schedule-day-name { font-size: 0.98rem; }
    .schedule-day-month { font-size: 0.8rem; }
    .time-slots { gap: 8px; }
    .time-slot { padding: 11px 16px; font-size: 0.88rem; border-radius: 10px; gap: 6px; }
    .schedule-legend { gap: 18px; margin-bottom: 22px; }

    /* Confirmación */
    .confirmation-card { padding: 40px 24px; border-radius: 18px; }
    .confirmation-icon { font-size: 3.5rem; }

    /* Section header */
    .section-emoji { font-size: 2.4rem; }
    .section-header { margin-bottom: 28px; }
    .section-header p { font-size: 0.92rem; }

    /* Footer */
    .site-footer { padding: 12px 0; font-size: 0.8rem; }
}

@media (max-width: 480px) {
    html { font-size: 14.5px; }
    .container { width: 100%; padding: 0 16px; }

    /* Bienvenida */
    .welcome-page { padding: 0 0 16px; }
    .welcome-top-banner { padding: 16px 10px 10px; }
    .banner-icon { font-size: 2rem; }
    .banner-flag { width: 34px; }
    .banner-title { font-size: 1.2rem; }
    .banner-tagline { font-size: 0.72rem; }
    .welcome-card { padding: 28px 20px; border-radius: 18px; }
    .welcome-title { font-size: 1.25rem; }
    .welcome-subtitle { font-size: 0.88rem; }
    .welcome-features { gap: 8px; }
    .feature-item { min-width: 80px; padding: 10px 8px; font-size: 0.72rem; border-radius: 10px; }
    .feature-emoji { font-size: 1.2rem; }

    /* Botones */
    .btn-lg { padding: 13px 22px; font-size: 0.95rem; }
    .btn-float-lang { bottom: 12px; right: 12px; padding: 8px 14px; font-size: 0.78rem; }

    /* Formularios */
    .form-card { padding: 24px 18px; border-radius: 16px; }

    /* Profesores */
    .professor-card { padding: 24px 16px 16px; border-radius: 16px; }
    .professor-avatar { width: 88px; height: 88px; }
    .professor-info h3 { font-size: 1.05rem; }
    .professor-info p { font-size: 0.82rem; }

    /* Horarios */
    .schedule-grid { gap: 14px; }
    .schedule-day { padding: 16px 14px; border-radius: 14px; }
    .schedule-day-header { gap: 10px; margin-bottom: 14px; padding-bottom: 10px; }
    .schedule-day-number { width: 40px; height: 40px; font-size: 1.05rem; border-radius: 10px; }
    .time-slots { gap: 6px; }
    .time-slot { padding: 10px 12px; font-size: 0.82rem; border-radius: 8px; }

    /* Reservation actions */
    .reservation-actions { flex-direction: column; align-items: stretch; gap: 10px; }

    /* Confirmación */
    .confirmation-card { padding: 28px 16px; border-radius: 16px; }
    .student-name { font-size: 0.95rem; }

    /* Footer */
    .site-footer { padding: 10px 0; font-size: 0.75rem; }
}

/* --- Inicio institucional --- */
.welcome-page {
    isolation: isolate;
    min-height: 100vh;
    padding: 28px 20px 12px;
    overflow: hidden;
    background:
        radial-gradient(circle at 0 0, #ffc40c 0 7%, transparent 7.2%),
        linear-gradient(135deg, #00275f 0%, #001946 47%, #002e72 100%);
}
.welcome-page::before {
    inset: auto -10% -26% auto;
    width: 49vw;
    height: 37vw;
    min-width: 560px;
    min-height: 410px;
    background: #ffc107;
    border-radius: 72% 0 0 0 / 100% 0 0 0;
    animation: none;
    transform: rotate(-13deg);
    z-index: -1;
}
.welcome-page::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, transparent 0 37%, rgba(38,96,181,.16) 37.2% 48%, transparent 48.2%),
        linear-gradient(145deg, transparent 0 74%, rgba(2,34,88,.7) 74.2% 79%, transparent 79.2%);
    z-index: -1;
}
.welcome-layout {
    width: min(100%, 1000px);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.welcome-hero {
    text-align: center;
    color: #fff;
    margin-bottom: 26px;
}
.welcome-flags {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 18px;
}
.welcome-flags img {
    width: 70px;
    height: 47px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 5px 14px rgba(0,0,0,.25);
}
.welcome-brand {
    margin: 0;
    color: #fff;
    font-family: Arial, 'Segoe UI', sans-serif;
    font-size: clamp(3rem, 5.25vw, 4.7rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.04em;
    text-shadow: 0 4px 12px rgba(0, 15, 49, .36);
}
.welcome-brand span,
.welcome-department strong,
.welcome-credit strong { color: #ffc107; }
.welcome-brand-rule,
.welcome-title-rule {
    width: 62px;
    height: 3px;
    margin: 14px auto 8px;
    background: #ffc107;
    border-radius: 99px;
}
.welcome-school-logo {
    display: block;
    width: 94px;
    height: 94px;
    object-fit: contain;
    margin: 0 auto 6px;
}
.welcome-commitment,
.welcome-department {
    margin: 0;
    font-size: clamp(.98rem, 1.65vw, 1.22rem);
    line-height: 1.45;
    color: rgba(255,255,255,.95);
}
.welcome-department { color: rgba(255,255,255,.9); }
.welcome-section {
    align-items: center;
    min-height: 0;
}
.welcome-card {
    max-width: 804px;
    padding: 45px 106px 25px;
    border: 2px solid #ffc107;
    border-top-width: 9px;
    border-radius: 26px;
    box-shadow: 0 26px 45px rgba(0, 10, 40, .35);
    position: relative;
}
.welcome-card-star {
    position: absolute;
    top: -31px;
    left: calc(50% - 38px);
    width: 76px;
    height: 60px;
    background: #fff;
    color: #ffc107;
    display: grid;
    place-items: center;
    font-size: 1.85rem;
    z-index: 3;
    clip-path: polygon(50% 0, 68% 29%, 100% 43%, 77% 67%, 82% 100%, 50% 82%, 18% 100%, 23% 67%, 0 43%, 32% 29%);
}
.welcome-title {
    color: #052968;
    font-size: clamp(2.75rem, 4.2vw, 3.75rem);
    margin: 2px 0 0;
    font-weight: 800;
    letter-spacing: -.04em;
}
.welcome-title-rule {
    width: 66px;
    height: 4px;
    margin: 12px auto 19px;
}
.welcome-subtitle {
    color: #183766;
    margin: 0 auto 22px;
    max-width: 510px;
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.47;
}
.welcome-highlight {
    color: #052968;
    font-size: 1.32rem;
    font-weight: 800;
    margin: 0 0 19px;
}
.welcome-highlight::before,
.welcome-highlight::after {
    content: '✦';
    color: #ffc107;
    display: inline-block;
    margin: 0 18px;
    font-size: 1.35rem;
}
.welcome-features {
    gap: 34px;
    margin-bottom: 21px;
}
.feature-item {
    width: 272px;
    min-width: 272px;
    min-height: 158px;
    justify-content: center;
    gap: 10px;
    border: 2px solid #dbe6f7;
    border-radius: 18px;
    background: linear-gradient(145deg, #fff, #f5f8fd);
    color: #082c69;
    font-size: 1.16rem;
    font-weight: 800;
    line-height: 1.25;
}
.feature-item:hover {
    transform: translateY(-4px);
    border-color: #ffc107;
    box-shadow: 0 12px 24px rgba(4, 43, 104, .12);
}
.feature-icon {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    color: #062e6d;
    background: radial-gradient(circle at 32% 28%, #ffdb5c, #ffc107 64%, #eba900);
    border-radius: 50%;
    box-shadow: 0 7px 15px rgba(225, 157, 0, .28);
    font-size: 1.75rem;
}
.welcome-card .btn-primary {
    width: min(100%, 582px);
    padding: 16px 30px;
    background: linear-gradient(100deg, #ffbd05, #ffd331);
    border-radius: 999px;
    color: #052968;
    font-size: 1.42rem;
    font-weight: 800;
    box-shadow: 0 10px 18px rgba(197, 132, 0, .24);
}
.welcome-card .btn-primary:hover {
    background: linear-gradient(100deg, #ffd331, #ffbd05);
    box-shadow: 0 13px 24px rgba(197, 132, 0, .34);
}
.welcome-language-card .welcome-title {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
}
.welcome-language-card .btn-outline {
    color: #052968;
    border-color: #052968;
}
.welcome-credit {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    margin: 16px 0 0;
    padding: 0;
    color: rgba(255,255,255,.94);
    font-size: .87rem;
    text-align: center;
}
.welcome-credit i { color: #ffc107; }
.welcome-dots {
    position: absolute;
    width: 120px;
    height: 102px;
    opacity: .7;
    background-image: radial-gradient(#2e75d0 3px, transparent 3.5px);
    background-size: 26px 26px;
    z-index: 0;
}
.welcome-dots-left { top: 69px; left: 4vw; }
.welcome-dots-right { top: 57%; right: 7vw; }
.welcome-speech {
    position: absolute;
    top: 120px;
    right: 8vw;
    width: 208px;
    height: 126px;
    display: grid;
    place-items: center;
    border: 4px solid #2e75d0;
    border-radius: 50%;
    color: #ffc107;
    font-size: 2.5rem;
    z-index: 0;
}
.welcome-speech::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 31px;
    width: 40px;
    height: 38px;
    border-left: 4px solid #2e75d0;
    transform: skew(-30deg);
}
.welcome-plane {
    position: absolute;
    bottom: 255px;
    left: 13vw;
    color: #ffc107;
    font-size: 2.5rem;
    transform: rotate(-40deg);
    z-index: 0;
}
.welcome-orbit {
    position: absolute;
    display: block;
    border: 3px solid rgba(48, 117, 209, .62);
    border-radius: 50%;
    z-index: 0;
}
.welcome-orbit-left {
    width: 330px;
    height: 330px;
    bottom: -85px;
    left: -105px;
}
.welcome-orbit-right {
    width: 610px;
    height: 610px;
    bottom: -370px;
    right: -115px;
    top: auto;
    border-color: #ffc107;
    border-width: 3px;
}
@media (max-width: 800px) {
    .welcome-page { padding: 24px 16px 18px; }
    .welcome-card { padding: 39px 34px 27px; }
    .welcome-speech, .welcome-plane, .welcome-dots-right { display: none; }
    .welcome-dots-left { left: 18px; top: 82px; opacity: .45; }
    .feature-item { width: 220px; min-width: 220px; }
}
@media (max-width: 520px) {
    .welcome-page { padding: 22px 12px 16px; }
    .welcome-flags { gap: 15px; }
    .welcome-flags img { width: 52px; height: 34px; }
    .welcome-hero { margin-bottom: 24px; }
    .welcome-school-logo { width: 58px; height: 58px; }
    .welcome-card { padding: 38px 18px 22px; border-radius: 22px; }
    .welcome-card-star { transform: scale(.82); }
    .welcome-subtitle { font-size: .98rem; }
    .desktop-break { display: none; }
    .welcome-highlight { font-size: 1.05rem; }
    .welcome-highlight::before, .welcome-highlight::after { margin: 0 8px; }
    .welcome-features { gap: 10px; }
    .feature-item { width: calc(50% - 5px); min-width: 0; min-height: 124px; padding: 15px 7px; font-size: .9rem; }
    .feature-icon { width: 52px; height: 52px; font-size: 1.35rem; }
    .welcome-card .btn-primary { font-size: 1.05rem; padding: 15px 16px; }
    .welcome-credit { font-size: .75rem; }
}

/*
 * Composición de escritorio basada en la lámina de referencia (1600 × 1000).
 * Todo se escala como una pieza para no deformar proporciones entre pantallas.
 */
@media (min-width: 701px) {
    .welcome-page {
        min-height: 100vh;
        height: 100vh;
        padding: 0;
        display: grid;
        place-items: start center;
        background:
            radial-gradient(ellipse 12% 17% at -3% -3%, #ffc107 0 75%, transparent 76%),
            linear-gradient(135deg, #003073 0%, #001e51 48%, #003178 100%);
    }
    .welcome-page::before {
        width: 31cqw;
        height: 25cqw;
        min-width: 0;
        min-height: 0;
        right: -8cqw;
        bottom: -12cqw;
        border-radius: 75% 0 0 0 / 100% 0 0 0;
        transform: rotate(-15deg);
        background: #ffc107;
    }
    .welcome-page::after {
        background:
            linear-gradient(135deg, transparent 0 39%, rgba(38,96,181,.17) 39.1% 51%, transparent 51.1%),
            linear-gradient(145deg, transparent 0 78%, rgba(2,34,88,.62) 78.1% 82%, transparent 82.1%);
    }
    .welcome-layout {
        container-type: inline-size;
        width: min(100vw, 160vh);
        height: min(62.5vw, 100vh);
        max-width: none;
        margin: 0;
        position: relative;
        overflow: hidden;
    }
    .welcome-hero {
        position: absolute;
        top: 2.15cqw;
        left: 0;
        width: 100%;
        margin: 0;
        z-index: 2;
    }
    .welcome-flags {
        gap: 1.5cqw;
        margin: 0 0 1.15cqw;
    }
    .welcome-flags img {
        width: 4.25cqw;
        height: 2.8cqw;
        border-radius: .2cqw;
    }
    .welcome-brand {
        font-size: 4.15cqw;
        letter-spacing: -.045em;
        line-height: 1.05;
    }
    .welcome-brand-rule {
        width: 4.15cqw;
        height: .2cqw;
        margin: .9cqw auto .35cqw;
    }
    .welcome-school-logo {
        width: 7.2cqw;
        height: 7.2cqw;
        margin: 0 auto .35cqw;
    }
    .welcome-commitment,
    .welcome-department {
        font-size: 1.1cqw;
        line-height: 1.52;
    }
    .welcome-section {
        position: absolute;
        top: 23.1cqw;
        left: 0;
        width: 100%;
        z-index: 3;
    }
    .welcome-card {
        width: 50.2cqw;
        max-width: none;
        height: 34.9cqw;
        padding: 3cqw 6.65cqw 1.55cqw;
        border-width: .12cqw;
        border-top-width: .55cqw;
        border-radius: 1.7cqw;
        box-shadow: 0 1.5cqw 2.8cqw rgba(0, 10, 40, .34);
    }
    .welcome-card::before {
        content: '';
        position: absolute;
        top: -1.35cqw;
        left: calc(50% - 3.1cqw);
        width: 6.2cqw;
        height: 3.2cqw;
        background: #fff;
        clip-path: polygon(0 100%, 50% 0, 100% 100%);
        z-index: 2;
    }
    .welcome-card-star {
        top: -1.55cqw;
        left: calc(50% - 1.5cqw);
        width: 3cqw;
        height: 3cqw;
        background: transparent;
        clip-path: none;
        font-size: 1.9cqw;
        z-index: 3;
    }
    .welcome-title {
        font-size: 3.5cqw;
        line-height: 1.1;
        margin: .05cqw 0 0;
    }
    .welcome-title-rule {
        width: 4cqw;
        height: .25cqw;
        margin: .8cqw auto 1.2cqw;
    }
    .welcome-subtitle {
        max-width: 31cqw;
        margin: 0 auto 1.2cqw;
        font-size: 1.23cqw;
        line-height: 1.42;
    }
    .welcome-highlight {
        margin: 0 0 1.1cqw;
        font-size: 1.45cqw;
    }
    .welcome-highlight::before,
    .welcome-highlight::after {
        margin: 0 1.15cqw;
        font-size: 1.7cqw;
    }
    .welcome-features {
        gap: 2.25cqw;
        margin: 0 0 1.15cqw;
    }
    .feature-item {
        width: 17cqw;
        min-width: 17cqw;
        min-height: 9.8cqw;
        gap: .65cqw;
        border-width: .12cqw;
        border-radius: 1.1cqw;
        font-size: 1.33cqw;
        line-height: 1.22;
    }
    .feature-icon {
        width: 4.25cqw;
        height: 4.25cqw;
        font-size: 1.75cqw;
        box-shadow: 0 .45cqw .9cqw rgba(225, 157, 0, .28);
    }
    .welcome-card .btn-primary {
        width: 36.3cqw;
        padding: 1.1cqw 2cqw;
        font-size: 1.65cqw;
        box-shadow: 0 .55cqw 1cqw rgba(197, 132, 0, .24);
    }
    .welcome-credit {
        position: absolute;
        top: 58.55cqw;
        left: 0;
        width: 100%;
        margin: 0;
        gap: .2cqw;
        font-size: 1.04cqw;
        line-height: 1.35;
        z-index: 2;
    }
    .welcome-credit i { font-size: 1.05cqw; }
    .welcome-dots {
        width: 7.5cqw;
        height: 6.6cqw;
        background-size: 1.6cqw 1.6cqw;
    }
    .welcome-dots-left {
        top: 4.4cqw;
        left: 3.7cqw;
    }
    .welcome-dots-right {
        top: 35.8cqw;
        right: 3.85cqw;
    }
    .welcome-speech {
        top: 7.45cqw;
        right: 5.1cqw;
        width: 13.3cqw;
        height: 7.8cqw;
        border-width: .22cqw;
        font-size: 2.1cqw;
    }
    .welcome-speech::after {
        bottom: -1.85cqw;
        left: 2cqw;
        width: 2.6cqw;
        height: 2.45cqw;
        border-left-width: .22cqw;
    }
    .welcome-plane {
        top: 36.5cqw;
        bottom: auto;
        left: 12.7cqw;
        font-size: 2.75cqw;
    }
    .welcome-plane::after {
        content: '';
        position: absolute;
        width: 15cqw;
        border-top: .18cqw dashed #ffc107;
        right: 1.3cqw;
        top: 2.4cqw;
        transform: rotate(-42deg);
        transform-origin: right center;
    }
    .welcome-orbit-left {
        width: 18.2cqw;
        height: 18.2cqw;
        bottom: -6.5cqw;
        left: -4.6cqw;
        border-width: .22cqw;
    }
    .welcome-orbit-left::after,
    .welcome-orbit-left::before {
        content: '';
        position: absolute;
        inset: 2cqw -1.8cqw;
        border: .15cqw solid rgba(48, 117, 209, .62);
        border-radius: 50%;
        transform: rotate(34deg);
    }
    .welcome-orbit-left::before {
        inset: -1.8cqw 3.4cqw;
        transform: rotate(-28deg);
    }
    .welcome-orbit-right {
        width: 31cqw;
        height: 31cqw;
        bottom: -20.6cqw;
        right: -8.7cqw;
        border-width: .18cqw;
    }
}

/* Compatibilidad: evita unidades de composición no soportadas por algunos navegadores. */
@media (min-width: 701px) {
    .welcome-page {
        height: auto;
        min-height: 100vh;
        display: flex;
        padding: 28px 20px 12px;
    }
    .welcome-page::before {
        width: 49vw;
        height: 37vw;
        min-width: 560px;
        min-height: 410px;
        right: -10%;
        bottom: -26%;
        border-radius: 72% 0 0 0 / 100% 0 0 0;
        transform: rotate(-13deg);
    }
    .welcome-layout {
        container-type: normal;
        width: min(100%, 1000px);
        height: auto;
        margin: 0 auto;
        overflow: visible;
    }
    .welcome-hero,
    .welcome-section,
    .welcome-credit {
        position: relative;
        top: auto;
        left: auto;
        width: auto;
    }
    .welcome-hero { margin-bottom: 26px; }
    .welcome-section { display: flex; }
    .welcome-card {
        width: 100%;
        max-width: 804px;
        height: auto;
        padding: 45px 106px 25px;
        border-width: 2px;
        border-top-width: 9px;
        border-radius: 26px;
        box-shadow: 0 24px 45px rgba(0, 10, 40, .35);
    }
    .welcome-card::before {
        top: -22px;
        left: calc(50% - 50px);
        width: 100px;
        height: 52px;
    }
    .welcome-card-star {
        top: -25px;
        left: calc(50% - 24px);
        width: 48px;
        height: 48px;
        font-size: 29px;
    }
    .welcome-flags { gap: 24px; margin-bottom: 18px; }
    .welcome-flags img { width: 70px; height: 47px; }
    .welcome-brand { font-size: clamp(3rem, 5.25vw, 4.7rem); }
    .welcome-brand-rule { width: 62px; height: 3px; margin: 14px auto 8px; }
    .welcome-school-logo { width: 94px; height: 94px; margin: 0 auto 6px; }
    .welcome-commitment,
    .welcome-department { font-size: clamp(.98rem, 1.65vw, 1.22rem); }
    .welcome-title { font-size: clamp(2.75rem, 4.2vw, 3.75rem); margin: 2px 0 0; }
    .welcome-title-rule { width: 64px; height: 4px; margin: 12px auto 19px; }
    .welcome-subtitle { max-width: 510px; margin: 0 auto 22px; font-size: 1.15rem; }
    .welcome-highlight { font-size: 1.32rem; margin: 0 0 19px; }
    .welcome-highlight::before,
    .welcome-highlight::after { margin: 0 18px; font-size: 1.35rem; }
    .welcome-features { gap: 34px; margin-bottom: 21px; }
    .feature-item {
        width: 272px;
        min-width: 272px;
        min-height: 158px;
        gap: 10px;
        border-width: 2px;
        border-radius: 18px;
        font-size: 1.16rem;
    }
    .feature-icon { width: 68px; height: 68px; font-size: 1.75rem; }
    .welcome-card .btn-primary { width: min(100%, 582px); padding: 16px 30px; font-size: 1.42rem; }
    .welcome-credit {
        display: flex;
        margin: 16px 0 0;
        font-size: .87rem;
    }
    .welcome-dots { width: 120px; height: 102px; background-size: 26px 26px; }
    .welcome-dots-left { top: 69px; left: 4vw; }
    .welcome-dots-right { top: 57%; right: 7vw; }
    .welcome-speech {
        top: 120px;
        right: 8vw;
        width: 208px;
        height: 126px;
        border-width: 4px;
        font-size: 2.5rem;
    }
    .welcome-speech::after {
        bottom: -30px;
        left: 31px;
        width: 40px;
        height: 38px;
        border-left-width: 4px;
    }
    .welcome-plane { top: auto; bottom: 255px; left: 13vw; font-size: 2.5rem; }
    .welcome-plane::after {
        width: 240px;
        right: 20px;
        top: 39px;
        border-top-width: 3px;
    }
    .welcome-orbit-left {
        width: 330px;
        height: 330px;
        bottom: -85px;
        left: -105px;
        border-width: 3px;
    }
    .welcome-orbit-left::after,
    .welcome-orbit-left::before { inset: 35px -30px; border-width: 2px; }
    .welcome-orbit-left::before { inset: -30px 55px; }
    .welcome-orbit-right {
        width: 610px;
        height: 610px;
        bottom: -370px;
        right: -115px;
        border-width: 3px;
    }
}
