/* ==========================================================================
   EES N° 23 - SISTEMA ESCOLAR INTEGRADO
   Estilos Específicos por Módulo y Pantallas (CSS Nativo)
   Color Institucional: #460F1B (Navbar, Headers, Sections, Footers)
   ========================================================================== */

/* --------------------------------------------------------------------------
   A. PORTAL PÚBLICO & LANDING PAGE (portal_p_blico_y_preinscripci_n)
   -------------------------------------------------------------------------- */

/* 1. NAVBAR PÚBLICO (100% RESPONSIVO) */
.public-header {
  background: var(--color-brand-wine); /* #460F1B */
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  height: 7rem;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.public-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1.2rem;
}

.brand-identity {
  display: inline-flex;
  align-items: center;
  gap: 1.2rem;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
}

.brand-logo-img {
  width: 4.2rem;
  height: 4.2rem;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  background: #ffffff;
  padding: 1px;
}

.brand-text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
}

.brand-name {
  font-size: 1.65rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-tagline {
  font-size: 1.15rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

.desktop-nav {
  display: block;
}

.public-nav-links {
  display: flex;
  align-items: center;
  gap: 2.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.public-nav-links a {
  font-size: 1.4rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  transition: color var(--transition-fast), transform var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.public-nav-links a:hover {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.btn-header-access {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-header-access:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

/* Botón Hamburguesa (Móvil) */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  width: 4rem;
  height: 4rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 0;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.mobile-nav-toggle:hover,
.mobile-nav-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  border-color: #ffffff;
  outline: none;
}

.hamburger-line {
  width: 2rem;
  height: 2px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-nav-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.mobile-nav-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.mobile-nav-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Drawer Lateral Móvil */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(32rem, 85vw);
  height: 100vh;
  height: 100dvh;
  background: var(--color-brand-wine);
  box-shadow: -8px 0 25px rgba(0, 0, 0, 0.5);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.mobile-nav-drawer.open {
  transform: translateX(0);
}

.mobile-nav-header {
  padding: 2rem 1.8rem 1.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-nav-close {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.mobile-nav-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.mobile-nav-body {
  flex: 1;
  padding: 1.6rem 1.4rem;
}

.mobile-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius-md);
  color: #ffffff;
  text-decoration: none;
  font-size: 1.45rem;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.1s ease;
}

.mobile-nav-item:hover,
.mobile-nav-item:active {
  background: rgba(255, 255, 255, 0.16);
  transform: translateX(4px);
}

.mobile-nav-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.mobile-nav-footer {
  padding: 1.6rem 1.8rem 2.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.12);
}

/* Backdrop Oscuro */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-nav-backdrop.open {
  opacity: 1;
  visibility: visible;
}

/* 2. SECCIONES: HERO SECTION */
.hero-section {
  background-color: #460f1b !important;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px), linear-gradient(135deg, #460f1b 0%, #2b070f 100%) !important;
  background-size: 24px 24px, 100% 100% !important;
  color: #ffffff !important;
  padding: 6.4rem 0 8.4rem;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4.8rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.18) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-full);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 2.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-title {
  font-size: 4.4rem;
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff !important;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
  font-size: 1.7rem;
  color: #ffffff !important;
  opacity: 0.95;
  line-height: 1.6;
  margin-bottom: 3.2rem;
  max-width: 54rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}

.hero-visual-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.hero-image-frame {
  width: 100%;
  height: 34rem;
  background: #cbd5e1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
}

.hero-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}

.hero-visual-card:hover .hero-image-frame img {
  transform: scale(1.03);
}

.hero-floating-badge {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.4rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  box-shadow: var(--shadow-lg);
  color: var(--text-main);
  max-width: 32rem;
}

.hero-floating-badge .badge-icon-box {
  width: 4rem;
  height: 4rem;
  background: var(--status-success-bg);
  color: var(--status-success-dark);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Métricas del Portal */
.stats-banner-container {
  margin-top: -4.8rem;
  position: relative;
  z-index: 10;
  margin-bottom: 6rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 2.4rem 2.8rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 2rem;
}

.stat-icon-wrapper {
  width: 5.2rem;
  height: 5.2rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-blue { background: #fbebee; color: var(--color-brand-wine); }
.stat-icon-green { background: #dcfce7; color: #16a34a; }
.stat-icon-amber { background: #fef3c7; color: #d97706; }
.stat-icon-purple { background: #f3e8ff; color: #9333ea; }

.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.stat-label {
  font-size: 1.3rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  font-weight: 500;
}

/* Comunicados */
.section-heading-wrapper {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 3.2rem;
}

.section-pretitle {
  text-transform: uppercase;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-brand-wine);
  margin-bottom: 0.6rem;
}

.section-main-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: #0f172a;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.4rem;
  margin-bottom: 7rem;
}

.news-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.news-thumbnail {
  width: 100%;
  height: 18rem;
  object-fit: cover;
  background: #e2e8f0;
}

.news-body {
  padding: 2.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-tag {
  align-self: flex-start;
  margin-bottom: 1.2rem;
}

.news-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.news-excerpt {
  font-size: 1.4rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 2rem;
  flex: 1;
}

.news-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border-light);
  font-size: 1.3rem;
  color: var(--text-subtle);
}

/* 3. SECCIÓN PREINSCRIPCIÓN: Fondo en #460F1B */
.preinscription-section {
  background: var(--color-brand-wine); /* #460F1B */
  padding: 8rem 0;
  position: relative;
  color: #ffffff;
}

.preinscription-section .section-pretitle {
  color: #fbcfe8;
}

.preinscription-section .section-main-title {
  color: #ffffff;
}

.preinscription-section p {
  color: rgba(255, 255, 255, 0.9);
}

.upload-dropzone {
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: var(--radius-lg);
  padding: 3.2rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--color-primary);
  background: var(--color-primary-subtle);
}

.upload-icon {
  width: 4.8rem;
  height: 4.8rem;
  margin: 0 auto 1.2rem;
  color: var(--color-primary);
}

/* 4. FOOTER PÚBLICO: Fondo en #460F1B */
.public-footer {
  background: var(--color-brand-wine) !important; /* #460F1B */
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 3.6rem 0;
  margin-top: auto;
  color: #ffffff;
}

.public-footer p {
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  font-size: 1.3rem;
}

.public-footer a {
  color: #ffffff;
  transition: opacity var(--transition-fast);
}

.public-footer a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   B. SIDEBAR Y ESTRUCTURA DE PANELES PRIVADOS
   -------------------------------------------------------------------------- */
.sidebar {
  width: 26rem;
  min-width: 26rem;
  max-width: 26rem;
  background: #ffffff;
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  z-index: 30;
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: auto;
    min-height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }
}

/* HEADER DEL SIDEBAR: Fondo #460F1B */
.sidebar-header {
  padding: 2.4rem 2rem;
  background: var(--color-brand-wine); /* #460F1B */
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  position: sticky;
  top: 0;
  z-index: 5;
}

.sidebar-header .brand-title {
  color: #ffffff !important;
}

.sidebar-header .brand-subtitle {
  color: rgba(255, 255, 255, 0.8) !important;
}

.sidebar-content {
  padding: 2rem 1.6rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
}

.sidebar-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  padding: 0 1.2rem;
  margin-bottom: 0.8rem;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.1rem 1.4rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: #334155;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.sidebar-nav-item svg {
  width: 2rem;
  height: 2rem;
  color: #64748b;
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.sidebar-nav-item:hover {
  background-color: var(--bg-subtle);
  color: var(--color-primary);
}

.sidebar-nav-item:hover svg {
  color: var(--color-primary);
}

.sidebar-nav-item.active {
  background-color: var(--color-primary);
  color: #ffffff;
}

.sidebar-nav-item.active svg {
  color: #ffffff;
}

/* FOOTER DEL SIDEBAR: Fondo #460F1B */
.sidebar-footer {
  padding: 1.8rem 1.6rem;
  background: var(--color-brand-wine); /* #460F1B */
  color: #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.sidebar-footer .user-name {
  color: #ffffff !important;
}

.sidebar-footer .user-role-tag {
  color: rgba(255, 255, 255, 0.8) !important;
}

.user-avatar-circle {
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.user-info-text {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 1.4rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-tag {
  font-size: 1.2rem;
}

/* NAVBAR SUPERIOR DE LOS PANELES: Fondo #460F1B */
.top-navbar {
  height: 6.4rem;
  background: var(--color-brand-wine); /* #460F1B */
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0 2.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 25;
  margin: 0;
}

.search-input-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  padding: 0.8rem 1.4rem;
  width: 36rem;
  color: #ffffff;
}

.search-input-box svg {
  color: rgba(255, 255, 255, 0.8);
}

.search-input-box input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 1.3rem;
  color: #ffffff;
  outline: none;
}

.search-input-box input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

/* Buscador Global y Dropdown de Resultados */
.search-input-wrapper {
  position: relative;
  width: 40rem;
}

.search-dropdown-results {
  position: absolute;
  top: calc(100% + 0.8rem);
  left: 0;
  width: 48rem;
  max-width: 92vw;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-light);
  z-index: 10000;
  max-height: 48rem;
  overflow-y: auto;
  color: #0f172a;
  display: none;
  animation: fadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-dropdown-header {
  padding: 0.8rem 1.4rem;
  background: #f8fafc;
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-subtle);
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-light);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-dropdown-header:first-child {
  border-top: none;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.search-result-item {
  padding: 1.1rem 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
}

.search-result-item:hover {
  background: #f1f5f9;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.search-result-sub {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.search-highlight-row {
  background: #fef9c3 !important;
  transition: background 0.3s ease;
}

.search-no-results {
  padding: 2.4rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 1.35rem;
}

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.btn-public-switch {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all var(--transition-fast);
}

.btn-public-switch:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #ffffff;
}

.top-navbar .notification-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.7rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background-color var(--transition-fast);
}

.top-navbar .notification-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Sub-navegación por Pestañas */
.tab-pills {
  display: inline-flex;
  background: #e2e8f0;
  padding: 0.4rem;
  border-radius: var(--radius-lg);
  gap: 0.4rem;
}

.tab-pill-btn {
  padding: 0.8rem 2rem;
  font-size: 1.4rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: #475569;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-pill-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: var(--shadow-sm);
}

/* Banner de Acceso Rápido (#460F1B gradiente) */
.quick-access-banner {
  background: linear-gradient(135deg, var(--color-brand-wine) 0%, var(--color-brand-wine-dark) 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 3.2rem;
  position: relative;
  overflow: hidden;
}

.quick-access-banner h3 {
  font-size: 2.4rem;
  color: #ffffff;
  margin-bottom: 1.2rem;
}

.quick-access-banner p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 48rem;
  margin-bottom: 2.4rem;
}

/* Feed de Novedades Recientes */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 1.4rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--border-light);
}

.activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-icon-box {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Barra de Asistencia Mensual (Portal del Estudiante) */
.attendance-month-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.attendance-progress-track {
  flex: 1;
  margin: 0 1.6rem;
  height: 0.8rem;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.attendance-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
}

.fill-optimal { background-color: var(--status-success); }
.fill-warning { background-color: var(--status-warning); }

/* Avatar verificado con tilde verde */
.verified-avatar-wrapper {
  position: relative;
  display: inline-block;
}

.verified-badge-icon {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--status-success);
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 50%;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   G. OFERTA EDUCATIVA INSTITUCIONAL (#oferta)
   -------------------------------------------------------------------------- */
.oferta-banner-card {
  background: linear-gradient(135deg, #460f1b 0%, #2b070f 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 3.6rem 4rem;
  margin-bottom: 3.6rem;
  box-shadow: 0 10px 25px -5px rgba(70, 15, 27, 0.35);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.oferta-banner-card::after {
  content: '';
  position: absolute;
  right: -3rem;
  bottom: -3rem;
  width: 24rem;
  height: 24rem;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.oferta-title-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.6rem;
}

.oferta-degree-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.2rem;
  color: #ffffff;
}

.oferta-slogan {
  font-size: 1.6rem;
  font-style: italic;
  opacity: 0.9;
  color: #fed7aa;
}

.oferta-section-block {
  margin-bottom: 4rem;
}

.oferta-block-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.oferta-block-icon {
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-md);
  background: rgba(70, 15, 27, 0.08);
  color: var(--color-brand-wine);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.oferta-block-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #0f172a;
}

.oferta-card-white {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.8rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.oferta-card-white:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.oferta-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
  gap: 2rem;
}

.profile-capability-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--color-brand-wine);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
}

.profile-capability-card:hover {
  border-left-color: #2b070f;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.profile-cap-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.profile-cap-text {
  font-size: 1.35rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.curricular-cycle-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.8rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.cycle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.8rem;
  padding-bottom: 1.4rem;
  border-bottom: 2px solid #f1f5f9;
}

.cycle-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
}

.cycle-badge {
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
}

.subject-item {
  padding: 1rem 1.4rem;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  border-left: 3px solid #cbd5e1;
  font-size: 1.35rem;
  line-height: 1.5;
  color: #334155;
}

.subject-item strong {
  color: #0f172a;
  display: block;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr));
  gap: 2rem;
}

.project-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 2.4rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
}

.project-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.project-icon-circle {
  width: 4.8rem;
  height: 4.8rem;
  border-radius: 50%;
  background: rgba(70, 15, 27, 0.08);
  color: var(--color-brand-wine);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.6rem;
}

.project-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.8rem;
}

.project-desc {
  font-size: 1.35rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.req-item {
  display: flex;
  align-items: flex-start;
  gap: 1.4rem;
  margin-bottom: 1.4rem;
  font-size: 1.4rem;
  color: #334155;
}

.req-number {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background: var(--color-brand-wine);
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-highlight-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.8rem;
}

.contact-info-row {
  display: flex;
  align-items: flex-start;
  gap: 1.4rem;
  margin-bottom: 1.8rem;
  font-size: 1.4rem;
}

.contact-info-icon {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: var(--radius-md);
  background: #e2e8f0;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   H. PANELES ESTADÍSTICOS Y GESTIÓN ESCOLAR INTEGRAL
   -------------------------------------------------------------------------- */
.stats-analytics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 3.2rem 0 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.stats-card-kpi {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.stats-card-kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.bar-horizontal-container {
  margin-bottom: 1.2rem;
}

.bar-horizontal-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.bar-horizontal-track {
  height: 0.8rem;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.bar-horizontal-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s ease-in-out;
}

.weekly-chart-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.2rem;
  align-items: flex-end;
  height: 14rem;
  padding: 1.6rem 0.8rem 0;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 1.2rem;
}

.weekly-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.weekly-bar-pillar {
  width: 2.8rem;
  background: linear-gradient(180deg, var(--color-brand-wine) 0%, #2b070f 100%);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: height 0.5s ease;
  position: relative;
}

.weekly-bar-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-brand-wine);
  margin-bottom: 0.4rem;
}

.weekly-bar-day {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.8rem;
}

/* =============================================================================
   MÓDULO DE ACTIVIDADES Y TAREAS ESCOLARES (CONSIGNAS PDF + MULTIPLE CHOICE)
   ============================================================================= */

.nav-tabs-academic {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 2.4rem;
}

.tab-btn-academic {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.2rem 2.2rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-btn-academic:hover {
  color: var(--color-primary);
  background: rgba(70, 15, 27, 0.04);
}

.tab-btn-academic.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  background: #ffffff;
}

.actividad-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.6rem;
}

.actividad-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.actividad-tipo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
}

.actividad-tipo-pdf {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.actividad-tipo-mc {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.upload-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 2.4rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--color-primary);
  background: #fdf2f4;
}

.builder-pregunta-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  margin-bottom: 1.6rem;
  position: relative;
}

.builder-opcion-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.8rem;
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-light);
  background: #ffffff;
  transition: all 0.2s ease;
}

.builder-opcion-row:hover {
  border-color: #94a3b8;
}

.builder-opcion-row.is-correct {
  border-color: #10b981;
  background: #f0fdf4;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.btn-builder-correcta {
  padding: 0.45rem 1.1rem;
  font-size: 1.15rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-builder-correcta:hover {
  border-color: #10b981;
  color: #047857;
  background: #ecfdf5;
}

.btn-builder-correcta.active {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.35);
}

.quiz-pregunta-box {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-xs);
}

.quiz-option-label {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.2rem 1.6rem;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  margin-top: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.35rem;
}

.quiz-option-label:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.quiz-option-label.selected {
  background: #fdf2f4;
  border-color: var(--color-primary);
  font-weight: 600;
  color: var(--color-primary);
}

.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 1.25rem;
}

.score-pill-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.score-pill-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.score-pill-danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.entrega-table-row {
  transition: background 0.15s ease;
}

.entrega-table-row:hover {
  background: #f8fafc;
}

.preinscription-card {
  padding: 4rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN & MOBILE OPTIMIZATIONS (SMARTPHONES & TABLETS)
   ========================================================================== */

@media (max-width: 992px) {
  .desktop-nav {
    display: none !important;
  }
  .mobile-nav-toggle {
    display: flex !important;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
  .hero-image-frame {
    height: 30rem;
  }
  .search-input-wrapper {
    width: 100%;
    max-width: 32rem;
  }
}

@media (max-width: 768px) {
  .public-header {
    height: 6.6rem;
  }

  .hero-section {
    padding: 4rem 0 5.6rem;
  }

  .hero-title {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.6rem;
  }

  .hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2.4rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 1.2rem;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-image-frame {
    height: 22rem;
  }

  .hero-floating-badge {
    position: static;
    margin-top: 1.4rem;
    max-width: 100%;
    width: 100%;
  }

  .stats-banner-container {
    margin-top: 2rem;
    margin-bottom: 3.6rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }

  .section-heading-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
  }

  .preinscription-section {
    padding: 3.6rem 0;
  }

  .preinscription-section .card {
    padding: 2.2rem 1.6rem !important;
    border-radius: var(--radius-lg);
  }

  .stepper-nav {
    margin-bottom: 2.4rem;
  }

  .step-circle {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.35rem;
  }

  .step-title {
    font-size: 1.1rem;
    max-width: 6.8rem;
    text-align: center;
    line-height: 1.15;
  }

  .stepper-nav::before {
    top: 1.75rem;
  }

  #consulta {
    padding: 4.8rem 0 !important;
  }

  #formConsultaDni {
    flex-direction: column;
    width: 100%;
    gap: 1.2rem;
  }

  #formConsultaDni input,
  #formConsultaDni button {
    width: 100%;
  }

  .public-footer {
    padding: 3.6rem 0;
  }

  .public-footer .public-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.8rem;
  }

  .public-footer .d-flex.align-center.gap-sm {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  /* Paneles Privados en Tablet/Móvil */
  .top-navbar {
    padding: 0 1.2rem;
    gap: 0.8rem;
  }

  .search-input-wrapper {
    max-width: none;
    flex: 1;
  }

  .search-input-box {
    width: 100%;
    padding: 0.6rem 1rem;
  }

  .btn-public-switch {
    padding: 0.6rem 1rem;
    font-size: 1.15rem;
    white-space: nowrap;
  }

  .tab-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    width: 100%;
    padding-bottom: 0.6rem;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  .public-header {
    height: 6.2rem;
  }

  .brand-logo-img {
    width: 3.5rem;
    height: 3.5rem;
  }

  .brand-name {
    font-size: 1.45rem;
  }

  .brand-tagline {
    font-size: 1.05rem;
  }

  .btn-header-access {
    padding: 0.75rem 1rem;
    font-size: 1.25rem;
    gap: 0.4rem;
  }

  .btn-header-access .btn-access-text {
    display: none;
  }

  .mobile-nav-toggle {
    width: 3.6rem;
    height: 3.6rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.35rem;
    line-height: 1.5;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .preinscription-section .card {
    padding: 1.8rem 1.2rem !important;
  }

  .step-circle {
    width: 3rem;
    height: 3rem;
    font-size: 1.2rem;
  }

  .step-title {
    font-size: 1rem;
    max-width: 5.2rem;
  }

  .stepper-nav::before {
    top: 1.5rem;
  }
}

/* ==========================================================================
   Controlador de Desplazamiento Horizontal Superior para Tablas
   ========================================================================== */
.table-scroll-top-wrapper {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.8rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.scroll-top-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  gap: 1rem;
}

.scroll-top-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: #334155;
}

.scroll-top-hint svg {
  color: var(--color-brand-wine);
  flex-shrink: 0;
}

.scroll-top-buttons {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-scroll-nudge {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--color-brand-wine);
  width: 3.2rem;
  height: 2.8rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-scroll-nudge:hover {
  background: var(--color-brand-wine);
  color: #ffffff;
  border-color: var(--color-brand-wine);
  transform: translateY(-1px);
}

.table-double-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  height: 16px;
  background: #edf2f7;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}

.table-double-scroll-inner {
  height: 1px;
}

/* Estilización de scrollbar superior e inferior */
.table-double-scroll::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
  height: 13px;
}

.table-double-scroll::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
  background: #e2e8f0;
  border-radius: 8px;
}

.table-double-scroll::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
  background: #460f1b;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
}

.table-double-scroll::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #6b1a2c;
}

