/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    transition: background 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== SPLASH ===== */
#splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease;
}

.splash-content {
    text-align: center;
    color: white;
}

.splash-content img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    animation: pulse 1.5s infinite;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.splash-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.splash-content p {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 30px;
}

.loader-bar {
    width: 300px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin: 0 auto;
    overflow: hidden;
}

.loader-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #f7971e, #ffd200);
    border-radius: 10px;
    transition: width 0.1s linear;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ===== CONTENIDO PRINCIPAL ===== */
#app {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 100vh;
}

main {
    flex: 1;
    min-height: 76vh;
}

/* ===== HEADER ===== */
header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s ease, border-color 0.3s ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.logo span {
    font-weight: bold;
    font-size: 1.2rem;
    color: #1a1a2e;
    transition: color 0.3s ease;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-dark-mode {
    background: none;
    border: 2px solid #ddd;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f7fa;
}

.btn-dark-mode:hover {
    transform: scale(1.1);
    border-color: #f7971e;
}

.btn-reseña {
    background: #f7971e;
    color: white;
    padding: 10px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
    display: inline-block;
}

.btn-reseña:hover {
    background: #e07c0a;
    transform: scale(1.05);
}

/* ===== HERO ===== */
#seccion-hero {
    text-align: center;
    padding: 60px 0 40px;
    transition: color 0.3s ease;
}

#seccion-hero h1 {
    font-size: 2.5rem;
    color: #1a1a2e;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

#seccion-hero p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 30px;
    transition: color 0.3s ease;
}

.buscador {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

.buscador input {
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    flex: 1 1 180px;
    min-width: 150px;
    transition: border-color 0.3s, background 0.3s, color 0.3s;
    background: white;
}

.buscador input:focus {
    border-color: #f7971e;
    outline: none;
}

.buscador button {
    background: #1a1a2e;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    flex: 0 1 auto;
}

.buscador button:hover {
    background: #2d2d4e;
}

/* ===== CARRUSEL DE IMÁGENES ===== */
#seccion-carrusel {
    padding: 20px 0 40px;
}

.carrusel-container {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.carrusel-slides {
    display: flex;
    width: 100%;
    height: 350px;
    position: relative;
    overflow: hidden;
}

.carrusel-slide {
    min-width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    transform: scale(0.95);
}

.carrusel-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.carrusel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carrusel-texto {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 30px 30px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    color: white;
    z-index: 2;
}

.carrusel-texto h3 {
    font-size: 1.5rem;
    margin-bottom: 6px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.carrusel-texto p {
    font-size: 1rem;
    opacity: 0.9;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.carrusel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(6px);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
    color: white;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carrusel-btn:hover {
    background: rgba(247, 151, 30, 0.85);
    transform: translateY(-50%) scale(1.1);
}

.carrusel-prev {
    left: 16px;
}

.carrusel-next {
    right: 16px;
}

.carrusel-indicadores {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carrusel-indicador {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carrusel-indicador.active {
    background: #f7971e;
    border-color: #f7971e;
    transform: scale(1.2);
}

.carrusel-indicador:hover {
    background: rgba(247, 151, 30, 0.6);
}

/* ===== RESULTADOS ===== */
#seccion-resultados {
    padding: 30px 0;
    min-height: 81vh;
}

.resultados-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

#titulo-resultados {
    color: #1a1a2e;
    transition: color 0.3s ease;
}

.tarjeta-docente {
    background: white;
    border: 2px solid #f7971e;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    transition: box-shadow 0.3s, background 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(247, 151, 30, 0.15);
}

.tarjeta-docente:hover {
    box-shadow: 0 6px 25px rgba(247, 151, 30, 0.3);
    border-color: #e07c0a;
    transform: translateY(-2px);
}

.tarjeta-docente .info h3 {
    font-size: 1.2rem;
    color: #1a1a2e;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.tarjeta-docente .info .fila-universidad {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin-top: 4px;
}

.tarjeta-docente .info .fila-universidad .universidad {
    color: #666;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.tarjeta-docente .info .fila-universidad .facultad {
    color: #666;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.tarjeta-docente .info .fila-universidad .separador {
    color: #ccc;
    font-size: 0.8rem;
    user-select: none;
}

.lista-cursos-wrapper {
    margin-top: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 4px 0 10px 0;
    scrollbar-width: thin;
    scrollbar-color: #f7971e #e0e0e0;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.lista-cursos-wrapper::-webkit-scrollbar {
    height: 5px;
}

.lista-cursos-wrapper::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 10px;
}

.lista-cursos-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #b0b0b0, #f7971e);
    border-radius: 10px;
}

.lista-cursos-wrapper .curso-item {
    display: inline-block;
    background: rgba(247, 151, 30, 0.08);
    border: 1px solid rgba(247, 151, 30, 0.2);
    border-radius: 20px;
    padding: 3px 14px;
    margin-right: 8px;
    font-size: 0.8rem;
    color: #555;
    white-space: nowrap;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.lista-cursos-wrapper .curso-item i {
    color: #f7971e;
    margin-right: 5px;
    font-size: 0.7rem;
}

.tarjeta-docente .calificacion {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.tarjeta-docente .calificacion .estrellas {
    font-size: 1.3rem;
    color: #f7971e;
    font-weight: bold;
}

.tarjeta-docente .calificacion .reseñas {
    color: #888;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.btn-perfil {
    background: #1a1a2e;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-perfil:hover {
    background: #2d2d4e;
}

/* ===== PERFIL ===== */
#seccion-perfil {
    padding: 30px 0;
}

#seccion-perfil .btn-volver {
    margin-bottom: 20px;
}

.btn-volver {
    background: #ddd;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s, color 0.3s;
}

.btn-volver:hover {
    background: #ccc;
}

.perfil-header {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.perfil-header h2 {
    font-size: 2rem;
    color: #1a1a2e;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.perfil-header .sub {
    color: #666;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.perfil-header .nota {
    font-size: 2.5rem;
    color: #f7971e;
    font-weight: bold;
}

/* ===== FOOTER ===== */
footer {
    background: #1a1a2e;
    color: white;
    padding: 15px 0;
    margin-top: auto;
    text-align: center;
    transition: background 0.3s ease, border-color 0.3s ease;
}

footer p {
    font-size: 0.95rem;
    opacity: 0.8;
    transition: color 0.3s ease;
}

/* ===== INPUT CON BOTÓN DE LIMPIAR (X) ===== */
.input-wrapper {
    position: relative;
    display: inline-block;
    flex: 1 1 180px;
    min-width: 150px;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 36px 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s, background 0.3s, color 0.3s;
    box-sizing: border-box;
}

.input-wrapper input:focus {
    border-color: #f7971e;
    outline: none;
}

.clear-btn {
    position: absolute;
    right: 8px;
    top: 46%;
    transform: translateY(-50%);
    color: #ff0000;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    display: none;
    user-select: none;
    transition: transform 0.2s ease;
    line-height: 1;
    z-index: 5;
    background: white;
    padding: 0 4px;
}

.clear-btn:hover {
    transform: translateY(-50%) scale(1.3);
}

/* ===== REGLA PRINCIPAL: Mostrar X cuando el input tiene valor ===== */
.input-wrapper input:not(:placeholder-shown) + .clear-btn,
.input-wrapper input.has-text + .clear-btn {
    display: block !important;
}

/* ===== REGLA ESPECÍFICA PARA EL INPUT DE UNIVERSIDADES ===== */
#universidad-input:not(:placeholder-shown) ~ .clear-btn {
    display: block !important;
}

/* ===== EFECTO DE ESCRITURA ===== */
#texto-escritura {
    min-height: 2rem;
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 30px;
    transition: color 0.3s ease;
}

#texto-escritura .cursor {
    display: inline-block;
    width: 2px;
    height: 1.1rem;
    background: #f7971e;
    margin-left: 2px;
    animation: parpadeo 0.7s infinite;
    vertical-align: text-bottom;
}

@keyframes parpadeo {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ===== DROPDOWN DE UNIVERSIDADES ===== */
.dropdown-lista {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: auto;
    width: auto;
    max-width: auto;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 4px;
}

.dropdown-lista .item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.95rem;
    color: #333;
    text-align: left;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.dropdown-lista .item:hover {
    background: #f0f0f0;
}

.dropdown-lista .item.seleccionado {
    background: #f7971e;
    color: white;
}

.dropdown-lista .item.vacio {
    color: #999;
    cursor: default;
    text-align: center;
    padding: 20px;
}

.dropdown-lista::-webkit-scrollbar {
    width: 6px;
}

.dropdown-lista::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.dropdown-lista::-webkit-scrollbar-thumb {
    background: #f7971e;
    border-radius: 10px;
}

/* ============================================================
   MODO OSCURO AMOLED (TODOS LOS ELEMENTOS)
   ============================================================ */

body.dark-mode {
    background: #0a0a0a;
    color: #ffffff;
}

/* HEADER */
body.dark-mode header {
    background: #0a0a0a;
    border-bottom: 1px solid #222;
    box-shadow: none;
}

body.dark-mode header .logo span {
    color: #ffffff;
}

body.dark-mode .btn-dark-mode {
    border-color: #444;
    background: #1a1a1a;
    color: #ffffff;
}

/* BOTÓN RESEÑA */
body.dark-mode .btn-reseña {
    background: #f7971e;
    color: #000000;
}

body.dark-mode .btn-reseña:hover {
    background: #e07c0a;
}

/* SECCIÓN HERO */
body.dark-mode #seccion-hero h1 {
    color: #ffffff;
}

body.dark-mode #seccion-hero p {
    color: #aaaaaa;
}

/* INPUTS */
body.dark-mode .buscador input,
body.dark-mode .input-wrapper input {
    background: #1a1a1a;
    border-color: #444;
    color: #ffffff;
}

body.dark-mode .buscador input:focus,
body.dark-mode .input-wrapper input:focus {
    border-color: #f7971e;
    outline: none;
}

body.dark-mode .buscador input::placeholder,
body.dark-mode .input-wrapper input::placeholder {
    color: #666;
}

/* BOTÓN BUSCAR */
body.dark-mode .buscador button {
    background: #f7971e;
    color: #000000;
}

body.dark-mode .buscador button:hover {
    background: #e07c0a;
}

/* DROPDOWN UNIVERSIDADES */
body.dark-mode .dropdown-lista {
    background: #1a1a1a;
    border-color: #444;
}

body.dark-mode .dropdown-lista .item {
    color: #ffffff;
}

body.dark-mode .dropdown-lista .item:hover {
    background: #333;
}

body.dark-mode .dropdown-lista .item.seleccionado {
    background: #f7971e;
    color: #000000;
}

body.dark-mode .dropdown-lista .item.vacio {
    color: #666;
}

body.dark-mode .dropdown-lista::-webkit-scrollbar-track {
    background: #222;
}

body.dark-mode .dropdown-lista::-webkit-scrollbar-thumb {
    background: #f7971e;
}

/* X ROJA */
body.dark-mode .clear-btn {
    background: transparent;
    color: #ff4444;
}

/* TARJETAS DE RESULTADOS */
body.dark-mode .tarjeta-docente {
    background: #1a1a1a;
    border-color: #333;
}

body.dark-mode .tarjeta-docente:hover {
    border-color: #f7971e;
}

body.dark-mode .tarjeta-docente .info h3 {
    color: #ffffff;
}

body.dark-mode .tarjeta-docente .info .fila-universidad .universidad,
body.dark-mode .tarjeta-docente .info .fila-universidad .facultad {
    color: #aaaaaa;
}

body.dark-mode .tarjeta-docente .info .fila-universidad .separador {
    color: #444;
}

body.dark-mode .tarjeta-docente .calificacion .reseñas {
    color: #888;
}

body.dark-mode .btn-perfil {
    background: #f7971e;
    color: #000000;
}

body.dark-mode .btn-perfil:hover {
    background: #e07c0a;
}

/* TÍTULO RESULTADOS */
body.dark-mode #titulo-resultados {
    color: #ffffff;
}

/* BOTÓN VOLVER */
body.dark-mode .btn-volver {
    background: #333;
    color: #ffffff;
}

body.dark-mode .btn-volver:hover {
    background: #444;
}

/* PERFIL */
body.dark-mode .perfil-header {
    background: #1a1a1a;
    border: 1px solid #333;
}

body.dark-mode .perfil-header h2 {
    color: #ffffff;
}

body.dark-mode .perfil-header .sub {
    color: #aaaaaa;
}

body.dark-mode .perfil-header .nota {
    color: #f7971e;
}

body.dark-mode #seccion-perfil .perfil-header + div {
    background: #1a1a1a;
    border: 1px solid #333;
}

body.dark-mode #seccion-perfil .perfil-header + div h3 {
    color: #ffffff;
}

body.dark-mode #seccion-perfil .perfil-header + div div p {
    color: #dddddd;
}

body.dark-mode #seccion-perfil .perfil-header + div div {
    border-bottom-color: #333;
}

/* CURSOS */
body.dark-mode .lista-cursos-wrapper::-webkit-scrollbar-track {
    background: #222;
}

body.dark-mode .lista-cursos-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #444, #f7971e);
}

body.dark-mode .lista-cursos-wrapper .curso-item {
    background: rgba(247, 151, 30, 0.12);
    border-color: rgba(247, 151, 30, 0.25);
    color: #cccccc;
}

/* CARRUSEL */
body.dark-mode .carrusel-container {
    box-shadow: 0 8px 30px rgba(247, 151, 30, 0.15);
}

body.dark-mode .carrusel-btn {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
}

body.dark-mode .carrusel-btn:hover {
    background: rgba(247, 151, 30, 0.85);
}

/* TEXTO ESCRITURA */
body.dark-mode #texto-escritura {
    color: #aaaaaa;
}

body.dark-mode #texto-escritura .cursor {
    background: #f7971e;
}

/* FOOTER */
body.dark-mode footer {
    background: #f7971e;
    border-top: 1px solid #222;
}

body.dark-mode footer p {
    color: #000000;
}

/* MENSAJE SIN RESULTADOS */
body.dark-mode #lista-docentes > div {
    background: #1a1a1a;
}

body.dark-mode #lista-docentes > div p {
    color: #aaaaaa;
}

body.dark-mode #lista-docentes > div button {
    background: #f7971e;
    color: #000000;
}

/* ===== SELECT DE FACULTADES CON ESTILO NATIVO ===== */
.facultad-select {
    width: 100%;
    padding: 12px 36px 12px 16px; /* Mismo padding que el input */
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s, color 0.3s;
    box-sizing: border-box;
    color: #333;
    /* Mantener la flecha nativa del navegador */
    appearance: auto;
    -webkit-appearance: auto;
    -moz-appearance: auto;
}

.facultad-select:focus {
    border-color: #f7971e;
    outline: none;
}

.facultad-select:hover {
    border-color: #f7971e;
}

.facultad-select option {
    padding: 10px 16px;
    background: white;
    color: #333;
}

/* ===== MODO OSCURO ===== */
body.dark-mode .facultad-select {
    background: #1a1a1a;
    border-color: #444;
    color: #ffffff;
}

body.dark-mode .facultad-select:focus {
    border-color: #f7971e;
}

body.dark-mode .facultad-select option {
    background: #1a1a1a;
    color: #ffffff;
}

/* ===== SELECT DE FACULTADES CON ESTILO NATIVO ===== */
.input-wrapper select.facultad-select {
    width: 100%;
    padding: 12px 36px 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s, color 0.3s;
    box-sizing: border-box;
    color: #333;
    appearance: auto;
    -webkit-appearance: auto;
    -moz-appearance: auto;
    flex: 1 1 180px;
    min-width: 150px;
}

.input-wrapper select.facultad-select:focus {
    border-color: #f7971e;
    outline: none;
}

.input-wrapper select.facultad-select:hover {
    border-color: #f7971e;
}

.input-wrapper select.facultad-select option {
    padding: 10px 16px;
    background: white;
    color: #333;
}

/* ===== MODO OSCURO ===== */
body.dark-mode .input-wrapper select.facultad-select {
    background: #1a1a1a;
    border-color: #444;
    color: #ffffff;
}

body.dark-mode .input-wrapper select.facultad-select:focus {
    border-color: #f7971e;
}

body.dark-mode .input-wrapper select.facultad-select option {
    background: #1a1a1a;
    color: #ffffff;
}

/* ===== CUSTOM SELECT PARA FACULTADES ===== */
.custom-select-wrapper {
    position: relative;
    flex: 1 1 180px;
    min-width: 220px;
}

.custom-select {
    position: relative;
    width: 100%;
    cursor: pointer;
    user-select: none;
}

.custom-select-trigger {
    width: 100%;
    padding: 11px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s, background 0.3s, color 0.3s;
    box-sizing: border-box;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.custom-select-trigger:hover {
    border-color: #f7971e;
}

.custom-select-trigger .fa-chevron-down {
    transition: transform 0.3s ease;
    font-size: 0.9rem;
    color: #666;
}

.custom-select.open .custom-select-trigger {
    border-color: #f7971e;
    border-radius: 8px;
}

.custom-select.open .fa-chevron-down {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 4px;
}

.custom-select.open .custom-select-options {
    display: block;
}

.custom-option {
    padding: 10px 16px;
    font-size: 0.95rem;
    color: #333;
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: left;
}

.custom-option:hover {
    background: #f0f0f0;
}

/* Scrollbar del dropdown */
.custom-select-options::-webkit-scrollbar {
    width: 6px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: #f7971e;
    border-radius: 10px;
}

/* ===== MODO OSCURO ===== */
body.dark-mode .custom-select-trigger {
    background: #1a1a1a;
    border-color: #444;
    color: #ffffff;
}

body.dark-mode .custom-select-trigger:hover {
    border-color: #f7971e;
}

body.dark-mode .custom-select-trigger .fa-chevron-down {
    color: #888;
}

body.dark-mode .custom-select.open .custom-select-trigger {
    border-color: #f7971e;
}

body.dark-mode .custom-select-options {
    background: #1a1a1a;
    border-color: #444;
}

body.dark-mode .custom-option {
    color: #ffffff;
}

body.dark-mode .custom-option:hover {
    background: #333;
}

body.dark-mode .custom-select-options::-webkit-scrollbar-track {
    background: #222;
}

body.dark-mode .custom-select-options::-webkit-scrollbar-thumb {
    background: #f7971e;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 600px) {
    .splash-content h1 {
        font-size: 1.8rem;
    }

    .splash-content img {
        width: 100px;
        height: 100px;
    }

    .loader-bar {
        width: 200px;
    }

    header .container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .logo span {
        font-size: 0.9rem;
    }

    .logo img {
        width: 32px;
        height: 32px;
    }

    .btn-reseña {
        font-size: 0.8rem;
        padding: 6px 14px;
    }

    .btn-dark-mode {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .header-actions {
        gap: 6px;
    }

    #seccion-hero {
        padding: 30px 0 20px;
    }

    #seccion-hero h1 {
        font-size: 1.5rem;
    }

    #seccion-hero p {
        font-size: 0.95rem;
    }

    .buscador {
        gap: 12px;
    }

    .buscador input {
        flex: 1 1 100%;
        min-width: 100%;
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .buscador button {
        width: 100%;
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    #seccion-carrusel {
        padding: 10px 0 25px;
    }

    .carrusel-slides {
        height: 200px;
    }

    .carrusel-texto {
        padding: 20px 16px 16px;
    }

    .carrusel-texto h3 {
        font-size: 0.95rem;
    }

    .carrusel-texto p {
        font-size: 0.75rem;
    }

    .carrusel-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .carrusel-prev {
        left: 6px;
    }

    .carrusel-next {
        right: 6px;
    }

    .carrusel-indicador {
        width: 8px;
        height: 8px;
        gap: 6px;
    }

    .carrusel-indicadores {
        gap: 6px;
        bottom: 10px;
    }

    #seccion-resultados {
        padding: 15px 0;
    }

    .resultados-header {
        gap: 10px;
        flex-wrap: wrap;
    }

    #titulo-resultados {
        font-size: 1.1rem;
    }

    .tarjeta-docente {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .tarjeta-docente .info h3 {
        font-size: 1rem;
    }

    .tarjeta-docente .info .fila-universidad {
        gap: 4px 8px;
    }

    .tarjeta-docente .info .fila-universidad .universidad,
    .tarjeta-docente .info .fila-universidad .facultad {
        font-size: 0.8rem;
    }

    .lista-cursos-wrapper .curso-item {
        font-size: 0.7rem;
        padding: 2px 10px;
    }
    
    .lista-cursos-wrapper {
        margin-top: 6px;
        padding: 3px 0 8px 0;
    }

    .tarjeta-docente .calificacion {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }

    .tarjeta-docente .calificacion .estrellas {
        font-size: 1rem;
    }

    .tarjeta-docente .calificacion .reseñas {
        font-size: 0.8rem;
    }

    .btn-perfil {
        width: 100%;
        text-align: center;
        padding: 10px;
        font-size: 0.9rem;
    }

    #seccion-perfil {
        padding: 15px 0;
    }

    .perfil-header {
        padding: 20px;
    }

    .perfil-header h2 {
        font-size: 1.3rem;
    }

    .perfil-header .sub {
        font-size: 0.9rem;
    }

    .perfil-header .nota {
        font-size: 1.8rem;
    }

    .btn-volver {
        padding: 6px 16px;
        font-size: 0.85rem;
    }

    footer {
        padding: 20px 0;
        margin-top: auto;
    }

    footer p {
        font-size: 0.8rem;
    }

    .input-wrapper {
        flex: 1 1 100%;
        min-width: 100%;
        width: 100%;
    }
    
    .input-wrapper input {
        padding: 10px 40px 10px 14px;
        font-size: 0.9rem;
    }
    
    .clear-btn {
        font-size: 1.1rem;
        right: 10px;
    }
    .custom-select-wrapper {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .custom-select-trigger {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .custom-option {
        padding: 8px 14px;
        font-size: 0.9rem;
    }
}