/* ==========================================================================
   INSTITUTO SUPERIOR HUMANÍSTICO "CORRIENTES" (L.T.1 / I.S. 36)
   Hoja de Estilos Personalizados - estilos.css
   ========================================================================== */

/* Suavizado general y desplazamiento */
html {
  scroll-behavior: smooth;
}

/* Barra de scroll personalizada (WebKit / Blink) */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #0f172a;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Distintivo de acreditación jurídica */
.badge-juridico {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-left: 4px solid #2563eb;
}

/* ==========================================================================
   ESTILOS DE FORMULARIO DE ADMISIONES
   ========================================================================== */

/* Transiciones en campos de formulario */
.form-input-custom {
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.form-input-custom:focus {
  outline: none;
  border-color: #2563eb;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Estado de carga en botón de envío */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}

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

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

/* Alertas de formulario */
.alerta-admision {
  border-radius: 0.75rem;
  padding: 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  transition: all 0.3s ease-in-out;
}

.alerta-exito {
  background-color: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}

.alerta-error {
  background-color: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

/* Estilo para el logotipo en la cabecera */
.logo-institucional {
  height: 2.5rem; /* 40px en móvil */
  max-height: 44px;
  width: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
}

@media (min-width: 640px) {
  .logo-institucional {
    height: 3.25rem; /* 52px */
    max-height: 56px;
  }
}

.logo-institucional:hover {
  transform: scale(1.02);
}

/* ==========================================================================
   MENÚ HAMBURGUESA Y PANEL RESPONSIVE PARA DISPOSITIVOS MÓVILES (CELULAR)
   ========================================================================== */

/* Botón Hamburguesa: oculto por defecto en escritorio (>=768px) */
.btn-hamburguesa {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  padding: 8px;
  z-index: 50;
  transition: all 0.25s ease-in-out;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Visible ÚNICAMENTE en dispositivos móviles / celulares (<768px) */
@media (max-width: 767px) {
  .btn-hamburguesa {
    display: flex;
  }
}

.btn-hamburguesa:hover {
  background-color: #e2e8f0;
  border-color: #94a3b8;
}

.btn-hamburguesa:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Las 3 líneas del botón hamburguesa */
.btn-hamburguesa .linea {
  display: block;
  width: 22px;
  height: 2.5px;
  background-color: #1e293b;
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.2s ease, 
              background-color 0.25s ease;
  transform-origin: center;
}

/* Animación y transformación del icono a "X" cuando está abierto */
.btn-hamburguesa.is-active {
  background-color: #eff6ff;
  border-color: #93c5fd;
}

.btn-hamburguesa.is-active .linea {
  background-color: #1d4ed8;
}

.btn-hamburguesa.is-active .linea:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.btn-hamburguesa.is-active .linea:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.btn-hamburguesa.is-active .linea:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Fondo oscuro desenfocado (Backdrop) */
.menu-movil-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 45;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

@media (max-width: 767px) {
  .menu-movil-backdrop {
    display: block;
  }
}

.menu-movil-backdrop.abierto {
  opacity: 1;
  visibility: visible;
}

/* Panel lateral deslizante (Drawer) para celular */
.menu-movil-panel {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 86%;
  max-width: 350px;
  background-color: #ffffff;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
  z-index: 48;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (max-width: 767px) {
  .menu-movil-panel {
    display: flex;
  }
}

.menu-movil-panel.abierto {
  transform: translateX(0);
}

/* Ocultar tajantemente en pantallas de escritorio */
@media (min-width: 768px) {
  .btn-hamburguesa,
  .menu-movil-backdrop,
  .menu-movil-panel {
    display: none !important;
  }
}

/* Enlaces del menú móvil */
.menu-movil-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #334155;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.menu-movil-link:hover,
.menu-movil-link:active {
  background-color: #eff6ff;
  color: #1d4ed8;
  transform: translateX(3px);
}

/* Bloqueo del scroll del body cuando el menú móvil está desplegado */
body.menu-abierto {
  overflow: hidden !important;
  touch-action: none;
}

