/* ======================================== */
/* ESTILOS GENERALES - PROFESIONALES */
/* ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: rotate 30s linear infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ======================================== */
/* COMPONENTES REUTILIZABLES - PROFESIONALES */
/* ======================================== */

.contenedor {
  max-width: 1300px;
  margin: 25px auto;
  padding: 30px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contenedor::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(30, 60, 114, 0.3),
    transparent
  );
  transform: translateX(-100%);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* ======================================== */
/* HEADER CON LOGO - PROFESIONAL */
/* ======================================== */

header {
  margin-bottom: 35px;
  padding-bottom: 25px;
  border-bottom: 2px solid rgba(30, 60, 114, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

.header-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

/* Tamaño mediano para logo de cabecera */
.header-logo img {
  height: 180px;
  width: auto;
  object-fit: contain;
}

.header-titulo {
  flex: 1 1 auto;
  text-align: center;
  padding: 0 20px;
}

.header-titulo h1 {
  color: #1e3c72;
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
  letter-spacing: 0.5px;
  line-height: 1.3;
}

/* ======================================== */
/* INFO SESIÓN CON BOTÓN DEBAJO - ACTUALIZADO */
/* ======================================== */

.info-sesion {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 20px 25px;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.2);
  min-width: 250px;
}

.usuario-info {
  text-align: center;
  width: 100%;
}

.usuario-info span {
  color: #1e3c72;
  font-size: 16px;
  font-weight: 500;
  display: block;
  line-height: 1.5;
}

.usuario-info strong {
  color: #2a5298;
  font-weight: 700;
  font-size: 18px;
  display: block;
  margin-top: 4px;
}

.btn-cerrar {
  padding: 12px 30px;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(220, 53, 69, 0.2);
  letter-spacing: 0.5px;
  width: 100%;
  text-align: center;
  display: inline-block;
}

.btn-cerrar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.8),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn-cerrar:hover::before {
  transform: translateX(100%);
}

.btn-cerrar::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.btn-cerrar:hover::after {
  opacity: 1;
}

.btn-cerrar:hover {
  background: linear-gradient(135deg, #c82333 0%, #b21f2d 100%);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 30px rgba(220, 53, 69, 0.3);
}

.btn-cerrar:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.3);
}

/* ======================================== */
/* MENÚ PRINCIPAL - PROFESIONAL */
/* ======================================== */

.menu-principal {
  margin-bottom: 30px;
  border-bottom: 2px solid rgba(30, 60, 114, 0.1);
  padding-bottom: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.menu-principal a {
  display: inline-block;
  padding: 12px 25px;
  margin-right: 5px;
  color: #495057;
  text-decoration: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid transparent;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.menu-principal a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(30, 60, 114, 0.3),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.menu-principal a:hover::before {
  transform: translateX(100%);
}

.menu-principal a:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  color: #1e3c72;
  transform: translateY(-3px);
  border-color: #1e3c72;
  box-shadow: 0 8px 20px rgba(30, 60, 114, 0.1);
}

.menu-principal a.activo {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  box-shadow: 0 8px 20px rgba(30, 60, 114, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.menu-principal a.activo::before {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.8),
    transparent
  );
}

.menu-principal a.activo:hover {
  background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(30, 60, 114, 0.4);
}

/* ======================================== */
/* ANIMACIONES GLOBALES */
/* ======================================== */

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* ======================================== */
/* SCROLLBAR PERSONALIZADA - PROFESIONAL */
/* ======================================== */

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  border-radius: 10px;
  border: 3px solid #f8f9fa;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
}

/* ======================================== */
/* TIPOGRAFÍA GLOBAL */
/* ======================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #1e3c72;
  font-weight: 600;
  line-height: 1.3;
}

a {
  text-decoration: none;
  color: #1e3c72;
  transition: all 0.3s;
}

a:hover {
  color: #2a5298;
}

/* ======================================== */
/* RESPONSIVE PROFESIONAL */
/* ======================================== */

@media (max-width: 992px) {
  .contenedor {
    max-width: 95%;
    margin: 20px auto;
    padding: 25px;
  }

  .header-logo h1 {
    font-size: 22px;
    text-align: center;
  }

  .header-logo img {
    height: 55px;
  }

  .info-sesion {
    min-width: 220px;
    padding: 18px 22px;
  }

  .usuario-info span {
    font-size: 15px;
  }

  .usuario-info strong {
    font-size: 17px;
  }

  .btn-cerrar {
    padding: 10px 25px;
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .contenedor {
    margin: 15px;
    padding: 20px;
  }

  header {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    padding-bottom: 20px;
  }

  .header-logo {
    flex-direction: column;
    gap: 15px;
  }

  .header-logo img {
    height: 50px;
  }

  .header-logo h1 {
    font-size: 20px;
  }

  .info-sesion {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
  }

  .menu-principal {
    flex-direction: column;
    gap: 10px;
    padding-bottom: 10px;
  }

  .menu-principal a {
    width: 100%;
    text-align: center;
    margin-right: 0;
    padding: 12px 15px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .contenedor {
    margin: 10px;
    padding: 15px;
  }

  .header-logo img {
    height: 45px;
  }

  .header-logo h1 {
    font-size: 18px;
  }

  .info-sesion {
    padding: 15px 18px;
    min-width: auto;
    width: 100%;
  }

  .usuario-info span {
    font-size: 14px;
  }

  .usuario-info strong {
    font-size: 16px;
  }

  .btn-cerrar {
    padding: 10px 20px;
    font-size: 13px;
  }

  .menu-principal a {
    padding: 10px 12px;
    font-size: 13px;
  }
}
