/*! 
 * CET N° 1 "Don Antonio Sánchez Platero"
 * Hoja de Estilos Institucional - Sitio Web Cet 1 Informática
 * Basado en la Bitácora del Proyecto y Colores Institucionales
 */

/* ==========================================================================
   1. VARIABLES Y COLORES INSTITUCIONALES (Escudo CET N° 1)
   ========================================================================== */
:root {
  --azul-primario: #17375e;        /* Azul marino oficial del escudo */
  --azul-oscuro: #0f243e;          /* Variante profunda para encabezados/footer */
  --azul-fondo: #b7c7fa;           /* Azul suave/celeste para fondo de página */
  --amarillo-dorado: #ffd700;      /* Amarillo dorado para acentos, botones y detalles */
  --amarillo-suave: #f0e68c;       /* Amarillo claro para borde izquierdo de títulos h2 */
  --amarillo-hover-start: #fffde7; /* Degradé inicio para hover en noticias */
  --amarillo-hover-end: #fff59d;   /* Degradé fin para hover en noticias */
  --blanco: #ffffff;               /* Fondo de tarjetas de contenido */
  --texto-principal: #2d3748;      /* Color de texto legible */
  --texto-secundario: #64748b;     /* Texto atenuado/subtítulos */
  --borde-suave: #e2e8f0;          /* Líneas divisorias suaves */
  --sombra-card: 0 4px 16px rgba(23, 55, 94, 0.08);
  --sombra-card-hover: 0 8px 24px rgba(23, 55, 94, 0.16);
  --radio-borde: 14px;             /* Radio de esquinas redondeadas */
}

/* ==========================================================================
   2. ESTILOS GENERALES Y RESET
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--azul-fondo);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--texto-principal);
  max-width: 100%;
  overflow-x: clip;
  position: relative;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--azul-primario);
  text-decoration: none;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   3. ENCABEZADO (HEADER) INSTITUCIONAL
   ========================================================================== */
header {
  background-color: var(--azul-primario);
  color: var(--blanco);
  padding: 0.65rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  transition: all 0.25s ease;
}

header.header-scrolled {
  padding: 0.5rem 2rem;
  background-color: rgba(23, 55, 94, 0.97);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(15, 36, 62, 0.4);
  border-bottom: 2px solid var(--amarillo-dorado);
}

/* Ocultar las líneas <hr> que puedan venir del HTML dentro del header */
header hr {
  display: none !important;
}

/* Logotipo CET 1 */
header a img {
  height: 48px;
  width: auto;
  transition: transform 0.2s ease;
}

header a img:hover {
  transform: scale(1.05);
}

/* Menú desplegable nativo con <details> */
header details {
  position: relative;
}

header summary {
  list-style: none;
  background-color: var(--amarillo-dorado);
  color: var(--azul-primario);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: background-color 0.2s ease, transform 0.15s ease;
}

header summary::-webkit-details-marker {
  display: none;
}

header summary:hover {
  background-color: #f5c518;
  transform: translateY(-1px);
}

/* Botones de acceso directo en el header para Superadmin */
.btn-header-admin {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 215, 0, 0.55);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-header-admin:hover,
.btn-header-admin.activo {
  background-color: var(--amarillo-dorado);
  color: var(--azul-primario);
  border-color: var(--amarillo-dorado);
  text-decoration: none;
  transform: translateY(-1px);
}

.badge-alerta-header {
  background-color: #ef4444;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 2px;
}

/* Contenedor flotante del menú desplegable */
header details nav {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 1000;
}

header details ul {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  background-color: var(--blanco);
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  min-width: 190px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  float: none; /* Reemplaza float si existía */
  width: auto;
}

header details ul li a {
  display: block;
  padding: 10px 18px;
  color: var(--azul-primario);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

header details ul li a:hover {
  background-color: #f1f5fd;
  color: #0b1f38;
}

header details ul li a.activo {
  background-color: #f1f5fd;
  color: var(--azul-primario);
  font-weight: 700;
  border-left: 3.5px solid var(--amarillo-dorado);
}

/* ==========================================================
   4. CONTENIDO PRINCIPAL Y TARJETAS BLANCAS
   ========================================================== */
main {
  flex: 1 0 auto;
  max-width: 1100px;
  width: 92%;
  margin: 35px auto;
  box-sizing: border-box;
}

/* Estilo distintivo para títulos h2 con barra vertical amarilla */
h2 {
  color: var(--azul-primario);
  font-size: 1.65rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 1.2rem;
  border-left: 5px solid var(--amarillo-suave);
  padding-left: 12px;
  line-height: 1.2;
}

/* Tarjetas de sección con fondo blanco y bordes redondeados */
section,
#carrusel,
#seccion1,
#seccion2,
#seccion3,
#ofertas-academicas,
#noticias,
#login,
#registro,
#recuperar,
#panel,
#aprobar,
article[id^="noticia"] {
  background-color: var(--blanco);
  border-radius: var(--radio-borde);
  padding: 26px 32px;
  margin-bottom: 28px;
  box-shadow: var(--sombra-card);
  transition: box-shadow 0.25s ease;
}

/* Enlaces de retorno "↑ Volver al inicio" */
main a[href="#inicio"] {
  display: inline-block;
  margin-top: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--azul-primario);
}

main a[href="#inicio"]:hover {
  text-decoration: underline;
}

/* Separadores en el cuerpo */
main hr {
  border: none;
  border-top: 1px solid var(--borde-suave);
  margin: 22px 0;
}

/* ==========================================================================
   5. CARRUSEL CON SCROLL-SNAP (Técnica CSS limpia y fluida)
   ========================================================================== */
#carrusel {
  overflow: hidden;
}

/* Controles de navegación del carrusel */
#carrusel table {
  width: 100%;
  margin: 0 auto 16px auto;
  text-align: center;
  border-collapse: collapse;
}

#carrusel table td {
  padding: 6px 10px;
}

.carrusel-anterior,
.carrusel-siguiente {
  display: inline-block;
  background-color: #edf2f9;
  color: var(--azul-primario);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.carrusel-anterior:hover,
.carrusel-siguiente:hover {
  background-color: var(--amarillo-dorado);
  color: var(--azul-primario);
  text-decoration: none;
  transform: translateY(-1px);
}

.carrusel-punto {
  color: #94a3b8;
  font-size: 1.4rem;
  margin: 0 4px;
  text-decoration: none;
  display: inline-block;
  transition: color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.carrusel-punto:hover,
.carrusel-punto.activo {
  color: var(--azul-primario);
  transform: scale(1.3);
  text-decoration: none;
}

/* Pista deslizante con scroll-snap */
.carrusel-track {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 20px;
  padding: 10px 0 16px 0;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.carrusel-track::-webkit-scrollbar {
  height: 6px;
}

.carrusel-track::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

/* Cada diapositiva del carrusel */
.carrusel-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  box-sizing: border-box;
  text-align: center;
  padding: 10px;
}

.carrusel-slide table {
  margin: 0 auto;
  border-collapse: collapse;
}

.carrusel-slide img {
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 12px;
}

.carrusel-slide strong {
  display: inline-block;
  font-size: 1.15rem;
  color: var(--azul-primario);
  margin-bottom: 6px;
}

.carrusel-slide a[href^="#seccion"] {
  display: inline-block;
  background-color: #fef08a;
  color: var(--azul-primario);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 7px 16px;
  border-radius: 8px;
  text-decoration: none;
  margin-top: 8px;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.carrusel-slide a[href^="#seccion"]:hover {
  background-color: var(--amarillo-dorado);
  transform: translateY(-1px);
}

/* ==========================================================================
   6. OFERTAS ACADÉMICAS Y SECCIÓN DE NOTICIAS (Con degradé amarillo al hover)
   ========================================================================== */
#noticias {
  display: flex;
  gap: 22px;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

/* Tarjetas de noticias y modalidades */
.noticia-1,
.noticia-2,
.noticia-3,
#noticias article,
#ofertas-academicas td {
  background-color: var(--blanco);
  border-radius: var(--radio-borde);
  padding: 20px;
  margin-bottom: 10px;
  border: 1px solid var(--borde-suave);
  box-shadow: var(--sombra-card);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-sizing: border-box;
  flex: 1 1 300px;
}

/* Efecto hover con degradé amarillo institucional descripto en la bitácora */
.noticia-1:hover,
.noticia-2:hover,
.noticia-3:hover,
#noticias article:hover,
#ofertas-academicas td:hover {
  background: linear-gradient(to bottom, var(--amarillo-hover-start), var(--amarillo-hover-end)) !important;
  transform: translateY(-4px);
  box-shadow: var(--sombra-card-hover);
  border-color: #fde047;
}

.noticia-1 img,
.noticia-2 img,
.noticia-3 img,
#noticias article img,
#ofertas-academicas img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}

#ofertas-academicas table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

/* Enlaces "Leer más »" y "Ver más »" */
#noticias a[href*="noticia"],
#ofertas-academicas a[href*="php"] {
  color: var(--azul-primario);
  font-weight: 700;
  display: inline-block;
  margin-top: 10px;
}

/* ==========================================================================
   7. FORMULARIOS Y PÁGINAS DE GESTIÓN (Login, Registro, Panel, Aprobar)
   ========================================================================== */
#login,
#registro,
#recuperar {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

#panel,
#aprobar {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

#login table,
#registro table,
#recuperar table,
#panel table {
  width: 100%;
  border-collapse: collapse;
}

/* Estilos de inputs de formularios */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  margin-top: 6px;
  border: 1.5px solid var(--borde-suave);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--texto-principal);
  background-color: #f8fafc;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  box-sizing: border-box;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--azul-primario);
  background-color: var(--blanco);
  box-shadow: 0 0 0 3px rgba(23, 55, 94, 0.15);
}

label {
  color: var(--azul-primario);
  font-size: 0.95rem;
}

/* Botones de acción principales */
button[type="submit"],
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--amarillo-dorado), #f5c518);
  color: var(--azul-primario);
  font-weight: 700;
  font-size: 1rem;
  padding: 11px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
  margin-top: 10px;
}

button[type="submit"]:hover,
.btn-primary:hover {
  background: linear-gradient(135deg, #f5c518, #e5b307);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

button[type="submit"]:active,
.btn-primary:active {
  transform: translateY(0);
}

/* Tabla de gestión de solicitudes (#aprobar) */
#aprobar table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

#aprobar th {
  background-color: var(--azul-primario);
  color: var(--blanco);
  padding: 12px 14px;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
}

#aprobar td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--borde-suave);
  font-size: 0.95rem;
  color: var(--texto-principal);
}

#aprobar tr:nth-child(even) td {
  background-color: #f8fafc;
}

#aprobar tr:hover td {
  background-color: #f1f5fd;
}

#aprobar a[href*="aprobar"] {
  display: inline-block;
  padding: 5px 12px;
  background-color: #10b981;
  color: white;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background-color 0.2s;
}

#aprobar a[href*="aprobar"]:hover {
  background-color: #059669;
}

#aprobar a[href*="rechazar"] {
  display: inline-block;
  padding: 5px 12px;
  background-color: #ef4444;
  color: white;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background-color 0.2s;
}

#aprobar a[href*="rechazar"]:hover {
  background-color: #dc2626;
}

/* ==========================================================================
   8. PIE DE PÁGINA (FOOTER) INSTITUCIONAL
   ========================================================================== */
footer {
  background-color: var(--azul-primario);
  color: var(--blanco);
  padding: 38px 20px 24px 20px;
  margin-top: auto;
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.15);
}

footer hr {
  display: none !important;
}

footer table {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  border-collapse: separate;
  border-spacing: 20px 0;
}

footer td {
  vertical-align: top;
  padding: 10px 14px;
  font-size: 0.92rem;
  line-height: 1.7;
}

/* Títulos de columnas en footer con subrayado amarillo institucional */
footer strong {
  display: inline-block;
  color: var(--blanco);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 2px solid var(--amarillo-dorado);
  padding-bottom: 6px;
  margin-bottom: 12px;
}

footer a {
  color: #c9dbfc;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--amarillo-dorado);
  text-decoration: underline;
}

/* Texto de copyright inferior */
footer p {
  text-align: center;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
}

/* ==========================================================================
   9. DISEÑO RESPONSIVO (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 820px) {
  header {
    padding: 0.75rem 1.2rem;
  }

  main {
    width: 95%;
    margin: 20px auto;
  }

  section,
  #carrusel,
  #seccion1,
  #seccion2,
  #seccion3,
  #ofertas-academicas,
  #login,
  #registro,
  #recuperar,
  #panel,
  #aprobar {
    padding: 20px;
  }

  footer table {
    display: block;
    border-spacing: 0;
  }

  footer tr {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  footer td {
    display: block;
    padding: 6px 0;
  }

  #noticias {
    flex-direction: column;
  }
}


/* ==========================================================================
   10. SISTEMA DE ROLES, SUPERADMIN, APROBACIÓN Y ANUNCIOS
   ========================================================================== */

/* Badges e Identificadores */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.badge-superadmin {
  background: linear-gradient(135deg, #1e3a8a, #172554);
  color: #ffd700;
  border: 1px solid #facc15;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.badge-emisor {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-pendiente {
  background-color: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-usuario {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.badge-cargo {
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-size: 0.8rem;
}

.badge-categoria {
  background-color: #e0e7ff;
  color: #3730a3;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 6px;
}

.badge-cat-institucional { background-color: #dbeafe; color: #1e40af; }
.badge-cat-urgente { background-color: #fee2e2; color: #991b1b; }
.badge-cat-académico, .badge-cat-academico { background-color: #fef3c7; color: #92400e; }
.badge-cat-eventos { background-color: #f3e8ff; color: #6b21a8; }
.badge-cat-informática, .badge-cat-informatica { background-color: #ccfbf1; color: #115e59; }

.badge-micro-superadmin {
  background-color: #1e3a8a;
  color: #ffd700;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
}

.badge-micro-emisor {
  background-color: #059669;
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
}

.badge-alerta {
  background-color: #ef4444;
  color: white;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
}

.badge-alerta-header {
  background-color: #ef4444;
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 4px;
}

/* Indicadores de Estado (Punto de luz) */
.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
}
.status-activo { background-color: #10b981; box-shadow: 0 0 6px #10b981; }
.status-pendiente { background-color: #f59e0b; box-shadow: 0 0 6px #f59e0b; }
.status-rechazado { background-color: #ef4444; box-shadow: 0 0 6px #ef4444; }

/* Banners y Alertas */
.alerta {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.alerta-exito {
  background-color: #ecfdf5;
  color: #065f46;
  border-left: 5px solid #10b981;
}
.alerta-advertencia {
  background-color: #fffbeb;
  color: #92400e;
  border-left: 5px solid #f59e0b;
}
.alerta-peligro {
  background-color: #fef2f2;
  color: #991b1b;
  border-left: 5px solid #ef4444;
}
.alerta-info {
  background-color: #eff6ff;
  color: #1e40af;
  border-left: 5px solid #3b82f6;
}

/* Grilla de Métricas */
.metricas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.metrica-card {
  background-color: #f8fafc;
  border: 1px solid var(--borde-suave);
  border-radius: 10px;
  padding: 18px 20px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.metrica-alerta {
  background-color: #fffbeb;
  border-color: #fde68a;
}

.metrica-numero {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--azul-primario);
  line-height: 1.1;
}

.metrica-alerta .metrica-numero {
  color: #b45309;
}

.metrica-etiqueta {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 4px;
}

/* Barra de Acciones del Panel */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--borde-suave);
  margin-bottom: 24px;
}

.panel-acciones {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.btn-panel-accion {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #f1f5f9;
  color: var(--azul-primario);
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid #cbd5e1;
  transition: all 0.2s;
}

.btn-panel-accion:hover {
  background-color: #e2e8f0;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-panel-destacado {
  background: linear-gradient(135deg, var(--amarillo-dorado), #f5c518);
  color: var(--azul-primario);
  border-color: #eab308;
}

.btn-panel-destacado:hover {
  background: linear-gradient(135deg, #f5c518, #e5b307);
}

.contador-badge {
  background-color: #dc2626;
  color: white;
  border-radius: 12px;
  padding: 2px 7px;
  font-size: 0.75rem;
  font-weight: 800;
}

/* Botones Secundarios y Links */
.btn-secundario {
  display: inline-block;
  padding: 7px 14px;
  background-color: #e2e8f0;
  color: var(--azul-primario);
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background-color 0.2s;
}

.btn-secundario:hover {
  background-color: #cbd5e1;
  text-decoration: none;
}

.btn-aprobar {
  display: inline-block;
  padding: 6px 14px;
  background-color: #10b981;
  color: white;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background-color 0.2s;
}

.btn-aprobar:hover {
  background-color: #059669;
  text-decoration: none;
}

.btn-rechazar {
  display: inline-block;
  padding: 6px 14px;
  background-color: #ef4444;
  color: white;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  margin-left: 6px;
  transition: background-color 0.2s;
}

.btn-rechazar:hover {
  background-color: #dc2626;
  text-decoration: none;
}

.btn-micro {
  padding: 3px 8px;
  font-size: 0.8rem;
  background-color: var(--azul-primario);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 0;
  width: auto;
}

.btn-link-aprobar {
  color: #10b981;
  font-weight: 700;
}
.btn-link-eliminar {
  color: #dc2626;
  font-weight: 600;
}

/* Tablas de Gestión */
.tabla-gestion {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tabla-gestion th {
  background-color: var(--azul-primario);
  color: var(--blanco);
  padding: 12px 14px;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 600;
}

.tabla-gestion td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--borde-suave);
  font-size: 0.92rem;
  vertical-align: middle;
}

.tabla-gestion tr:nth-child(even) td {
  background-color: #f8fafc;
}

.tabla-gestion tr:hover td {
  background-color: #f1f5fd;
}

/* Tarjeta de Cuentas Demo */
.tarjeta-cuentas-demo {
  margin-top: 25px;
  padding: 18px;
  background-color: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
}

.cuentas-demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.demo-item {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
}

.demo-item:hover {
  border-color: var(--amarillo-dorado);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.demo-item code {
  background-color: #f1f5f9;
  padding: 2px 5px;
  border-radius: 4px;
  font-family: monospace;
}

/* Anuncios y Formularios */
.card-formulario-anuncio {
  background-color: #f8fafc;
  border: 1px solid var(--borde-suave);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 30px;
}

.anuncios-lista {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.anuncio-item {
  background-color: white;
  border: 1px solid var(--borde-suave);
  border-radius: 10px;
  padding: 18px 22px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s, box-shadow 0.2s;
}

.anuncio-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(23, 55, 94, 0.08);
}

.anuncio-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.anuncio-titulo {
  margin: 6px 0 0 0;
  color: var(--azul-primario);
  font-size: 1.25rem;
}

.anuncio-meta {
  color: #64748b;
  text-align: right;
  line-height: 1.4;
}

.anuncio-cuerpo p {
  color: #334155;
  font-size: 0.96rem;
  line-height: 1.6;
  margin: 0;
}

.anuncio-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
}

/* Anuncios en Home */
.anuncios-grid-home {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.tarjeta-anuncio-home {
  background: white;
  border: 1px solid var(--borde-suave);
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.tarjeta-anuncio-home:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(23, 55, 94, 0.12);
  border-color: #fde047;
}

/* Tarjetas Informativas en Panel */
.card-pendiente {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1.5px solid #fde68a;
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  margin: 20px 0;
}

.card-estudiante {
  background-color: #f8fafc;
  border: 1px solid var(--borde-suave);
  border-radius: 10px;
  padding: 20px;
}

.card-solicitud-emisor {
  background-color: #f1f5fd;
  border: 1.5px dashed #93c5fd;
  border-radius: 10px;
  padding: 22px;
}


/* ==========================================================================
   11. MEJORAS INTEGRALES DE RESPONSIVIDAD MOBILE (Todos los celulares)
   ========================================================================== */

/* Contenedor fluido para tablas de gestión y datos */
.tabla-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 14px 0;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* Grilla responsive fluida para formularios de emisión */
.form-grid-responsive {
  display: flex;
  gap: 15px;
  width: 100%;
}

.form-grid-responsive > div {
  min-width: 0;
}

/* --------------------------------------------------------------------------
   A. TABLETS Y PANTALLAS MEDIANAS (Hasta 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  main {
    width: 94%;
    margin: 18px auto;
  }

  /* Evitar zoom automático indeseado en iPhones al tocar campos de texto */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  textarea,
  select {
    font-size: 16px !important;
  }

  /* Transformar tablas estructurales antiguas en bloques fluidos */
  #login table,
  #registro table,
  #recuperar table,
  #panel table:not(.tabla-gestion),
  #ofertas-academicas table {
    width: 100% !important;
    display: block !important;
  }

  #login table tbody, #registro table tbody, #recuperar table tbody,
  #login table tr, #registro table tr, #recuperar table tr,
  #login table td, #registro table td, #recuperar table td,
  #ofertas-academicas table tbody, #ofertas-academicas table tr, #ofertas-academicas table td {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
  }

  /* Formulario en 1 columna en mobile */
  .form-grid-responsive {
    flex-direction: column;
    gap: 12px;
  }

  /* Encabezado del Panel Institucional */
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* Botones principales con altura táctil adecuada */
  button[type="submit"],
  .btn-primary,
  .btn-panel-accion {
    min-height: 44px;
  }

  /* Menú desplegable header */
  header details nav {
    right: 0;
    left: auto;
    max-width: 85vw;
    min-width: 210px;
  }
}

/* --------------------------------------------------------------------------
   B. SMARTPHONES ESTÁNDAR Y COMPACTOS (Hasta 600px: Samsung, iPhone, Xiaomi)
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  header {
    padding: 0.5rem 0.9rem;
  }

  header a img {
    height: 38px;
    width: auto;
  }

  header summary {
    padding: 6px 12px;
    font-size: 0.88rem;
  }

  section,
  #carrusel,
  #seccion1,
  #seccion2,
  #seccion3,
  #ofertas-academicas,
  #login,
  #registro,
  #recuperar,
  #panel,
  #aprobar,
  #anuncios-gestion,
  #anuncios-institucionales {
    padding: 18px 14px;
    margin-bottom: 20px;
    border-radius: 12px;
  }

  h2 {
    font-size: 1.35rem;
    padding-left: 10px;
    margin-bottom: 1rem;
  }

  /* Carrusel en mobile */
  .carrusel-slide {
    padding: 4px;
  }

  .carrusel-slide img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 200px;
    object-fit: cover;
  }

  .carrusel-slide strong {
    font-size: 1.05rem;
  }

  .carrusel-anterior,
  .carrusel-siguiente {
    padding: 5px 10px;
    font-size: 0.8rem;
  }

  .carrusel-punto {
    font-size: 1.15rem;
    margin: 0 2px;
  }

  /* Botones del panel de control ocupan ancho completo */
  .panel-acciones {
    flex-direction: column;
    gap: 8px;
  }

  .btn-panel-accion {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* Grilla de anuncios en Home */
  .anuncios-grid-home {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Grilla de cuentas demo en Login */
  .cuentas-demo-grid {
    grid-template-columns: 1fr;
  }

  /* Grilla de métricas */
  .metricas-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .metrica-numero {
    font-size: 1.8rem;
  }

  /* Anuncios en lista */
  .anuncio-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .anuncio-meta {
    text-align: left;
  }

  .anuncio-titulo {
    font-size: 1.1rem;
  }
}

/* --------------------------------------------------------------------------
   C. SMARTPHONES PEQUEÑOS (Hasta 400px: iPhone SE, Galaxy compactos)
   -------------------------------------------------------------------------- */
@media (max-width: 400px) {
  html {
    font-size: 15px;
  }

  header {
    padding: 0.45rem 0.65rem;
  }

  header summary {
    padding: 5px 10px;
    font-size: 0.82rem;
  }

  header details nav {
    width: calc(100vw - 20px);
    right: -5px;
  }

  header details ul {
    min-width: 100%;
  }

  section,
  #login,
  #registro,
  #panel,
  #aprobar {
    padding: 14px 10px;
  }

  /* Acciones en tablas con mejor espacio táctil */
  .tabla-gestion th,
  .tabla-gestion td {
    padding: 8px 10px;
    font-size: 0.85rem;
  }

  .btn-aprobar,
  .btn-rechazar {
    display: block;
    margin: 3px 0;
    text-align: center;
  }
}


/* ==========================================================================
   12. ELEMENTOS TÉCNICOS STICKY HEADER, FILTROS Y PROYECTOS
   ========================================================================== */

#barra-progreso-scroll {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--amarillo-dorado), #ffffff);
  transition: width 0.1s ease-out;
  z-index: 1002;
  border-radius: 0 2px 2px 0;
}

.tech-badge-header {
  background-color: rgba(15, 36, 62, 0.65);
  border: 1px solid rgba(255, 215, 0, 0.35);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.4px;
}

.tech-dot-pulsing {
  display: inline-block;
  width: 7px;
  height: 7px;
  background-color: #10b981;
  border-radius: 50%;
  margin-right: 7px;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: techPulse 2s infinite;
}

@keyframes techPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.proyectos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.tarjeta-proyecto {
  background-color: #ffffff;
  border: 1px solid var(--borde-suave);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--sombra-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tarjeta-proyecto:hover {
  transform: translateY(-3px);
  box-shadow: var(--sombra-card-hover);
  border-color: #fde047;
}

.btn-filtro {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  background-color: #f1f5f9;
  color: var(--azul-primario);
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid #cbd5e1;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-filtro:hover {
  background-color: #e2e8f0;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-filtro-activo {
  background-color: var(--azul-primario) !important;
  color: #ffffff !important;
  border-color: var(--azul-primario) !important;
  box-shadow: 0 2px 8px rgba(23, 55, 94, 0.25);
}

/* Categorías específicas */
.badge-cat-viaje { background-color: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-cat-proyectos { background-color: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.badge-cat-expoenet { background-color: #f3e8ff; color: #6b21a8; border: 1px solid #e9d5ff; }
.badge-cat-talleres\ y\ laboratorios, .badge-cat-talleres { background-color: #ccfbf1; color: #115e59; border: 1px solid #99f6e4; }
.badge-cat-avisos\ importantes, .badge-cat-avisos { background-color: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.badge-cat-novedades\ generales { background-color: #eff6ff; color: #1e40af; border: 1px solid #dbeafe; }

/* ==========================================================================
   INSIGNIAS OFICIALES DE COMUNICADOS: Preceptor, Profesor, Administrador, MEP
   ========================================================================== */
.badge-comunicado {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 3px 9px;
  border-radius: 12px;
  display: inline-block;
  text-transform: uppercase;
}

.badge-comunicado-administrador {
  background-color: #17375e;
  color: #ffd700;
  border: 1px solid #0f243e;
}

.badge-comunicado-profesor {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-comunicado-preceptor {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-comunicado-mep {
  background-color: #ccfbf1;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

/* ==========================================================================
   TARJETA DE PRESENTACIÓN INSTITUCIONAL INTERACTIVA (3D & JavaScript)
   ========================================================================== */
.tarjeta-presentacion-contenedor {
  perspective: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 25px auto;
  max-width: 580px;
  width: 100%;
}

.tarjeta-presentacion-card {
  width: 580px;
  max-width: 100%;
  height: 330px;
  background-color: #ffffff;
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(10, 25, 47, 0.28), 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  position: relative;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  transform-style: preserve-3d;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.25s ease;
  user-select: none;
}

.tarjeta-presentacion-card:hover {
  box-shadow: 0 24px 55px rgba(10, 25, 47, 0.38), 0 8px 18px rgba(0, 0, 0, 0.12);
}

/* Fondo SVG posicionado en toda la tarjeta */
.tarjeta-fondo-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Lado izquierdo con información nítida del titular */
.tarjeta-lado-izquierdo {
  position: absolute;
  top: 0;
  left: 0;
  width: 53%;
  height: 100%;
  padding: 28px 20px 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  z-index: 2;
  box-sizing: border-box;
}

.tarjeta-encabezado {
  margin-bottom: 2px;
}

.tarjeta-nombre {
  margin: 0 !important;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif !important;
  font-size: 1.12rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  line-height: 1.24 !important;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border: none !important;
  padding: 0 !important;
}

.tarjeta-subtitulo {
  font-size: 0.70rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 1.5px;
  margin-top: 5px;
  text-transform: uppercase;
}

.tarjeta-datos-contacto {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.tarjeta-contacto-fila {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tarjeta-contacto-direccion {
  align-items: flex-start;
}

.tarjeta-contacto-icono {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tarjeta-contacto-direccion .tarjeta-contacto-icono {
  margin-top: 2px;
}

.tarjeta-contacto-texto {
  font-size: 0.83rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.34;
  word-break: break-word;
}

.tarjeta-direccion-multilinea {
  line-height: 1.34;
}

/* Lado derecho con logotipo y branding institucional */
.tarjeta-lado-derecho {
  position: absolute;
  top: 0;
  right: 0;
  width: 44%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  padding-left: 24px;
  box-sizing: border-box;
}

.tarjeta-branding-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.tarjeta-logo-marco {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tarjeta-logo-img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.65));
  transition: transform 0.3s ease;
}

.tarjeta-logo-img:hover {
  transform: scale(1.08) rotate(2deg);
}

.tarjeta-compania-contenedor,
.tarjeta-compania-texto {
  color: #ffffff;
  margin-top: 10px;
  line-height: 1.25;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
  text-transform: uppercase;
}

.tarjeta-compania-titulo {
  font-size: 0.94rem;
  font-weight: 900;
  letter-spacing: 1.4px;
  color: #ffffff;
}

.tarjeta-compania-sub {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #00d2ff;
  margin-top: 3px;
}

.tarjeta-brillo-specular {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 60%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 5;
}

.tarjeta-acciones-js {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 15px;
}

.btn-tarjeta-accion {
  background-color: #ffffff;
  color: var(--azul-primario);
  border: 1.5px solid #cbd5e1;
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  text-decoration: none;
}

.btn-tarjeta-accion:hover {
  background-color: var(--amarillo-dorado);
  color: var(--azul-primario);
  border-color: var(--amarillo-dorado);
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.3);
}

.btn-tarjeta-admin {
  background-color: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.toast-tarjeta-notificacion {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #0f243e;
  color: #ffd700;
  border: 1px solid #ffd700;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
}

.toast-tarjeta-notificacion.mostrar {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ==========================================================================
   POP-UP MODAL: TARJETA DE PRESENTACIÓN DE BIENVENIDA AL INGRESAR
   ========================================================================== */
.modal-tarjeta-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(10, 25, 47, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  padding: 15px;
  box-sizing: border-box;
}

.modal-tarjeta-overlay.activo {
  opacity: 1;
  visibility: visible;
}

.modal-tarjeta-contenido {
  position: relative;
  max-width: 580px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.85) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-tarjeta-overlay.activo .modal-tarjeta-contenido {
  transform: scale(1) translateY(0);
}

/* Cruz de cierre en el lado derecho junto a la tarjeta */
.btn-cerrar-tarjeta-cruz {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 40px;
  height: 40px;
  background-color: var(--amarillo-dorado);
  color: #0f243e;
  border: 2.5px solid #ffffff;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  z-index: 100;
}

.btn-cerrar-tarjeta-cruz:hover {
  background-color: #dc2626;
  color: #ffffff;
  transform: scale(1.15) rotate(90deg);
}

@media (max-width: 650px) {
  .btn-cerrar-tarjeta-cruz {
    top: -12px;
    right: 6px;
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

@media (max-width: 620px) {
  .tarjeta-presentacion-contenedor {
    transform: scale(0.86);
    transform-origin: center center;
  }
  .btn-cerrar-tarjeta-cruz {
    top: -10px;
    right: 0px;
  }
}

@media (max-width: 480px) {
  .tarjeta-presentacion-contenedor {
    transform: scale(0.72);
    transform-origin: center center;
  }
  header {
    padding: 0.5rem 1rem;
  }
  .btn-header-admin {
    padding: 5px 8px;
    font-size: 0.74rem;
    gap: 4px;
  }
}

/* ==========================================================================
   16. BOTÓN FLOTANTE "VOLVER ARRIBA" CON INDICADOR CIRCULAR DE PROGRESO
   Réplica idéntica al diseño solicitado con anillo de progreso dinámico SVG
   ========================================================================== */
.btn-volver-arriba {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #0c172b;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(16px) scale(0.92);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s ease,
              background-color 0.25s ease;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-volver-arriba.mostrar {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.btn-volver-arriba:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 22px rgba(0, 168, 232, 0.45), 0 2px 8px rgba(0, 0, 0, 0.6);
  background-color: #0e1e38;
}

.btn-volver-arriba:active {
  transform: translateY(0) scale(0.95);
}

.progreso-scroll-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg); /* El arco inicia a las 12 en punto */
  pointer-events: none;
}

.progreso-scroll-track {
  fill: none;
  stroke: #1e293b;
  stroke-width: 3.5;
}

.progreso-scroll-bar {
  fill: none;
  stroke: #00a8e8;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 125.664;
  stroke-dashoffset: 125.664;
  transition: stroke-dashoffset 0.08s linear;
}

.icono-flecha-arriba {
  position: relative;
  z-index: 2;
  color: #ffffff;
  font-size: 13px;
  line-height: 1;
  margin-top: -1px;
  transition: transform 0.2s ease;
}

.btn-volver-arriba:hover .icono-flecha-arriba {
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .btn-volver-arriba {
    bottom: 20px;
    right: 20px;
    width: 46px;
    height: 46px;
  }
}

