/* ==========================================================================
   POLIFORUM VIATRIS - PREMIUM LANDING PAGE STYLES
   ========================================================================== */

/* Importar tipografía moderna */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Paleta de Colores de Marca */
  --color-purple: #814C9C;
  --color-purple-dark: #5A3170;
  --color-purple-light: #F4EEF7;
  --color-purple-alpha: rgba(129, 76, 156, 0.15);
  
  --color-navy: #1B175D;
  --color-navy-dark: #0F0C3B;
  --color-navy-light: #EFF1F9;
  --color-navy-alpha: rgba(27, 23, 93, 0.08);

  --color-teal: #0E668C;
  --color-teal-dark: #0A4E6C;
  --color-teal-light: #EBF5FA;
  --color-teal-alpha: rgba(14, 102, 140, 0.15);

  --color-gold: #E5B700;
  --color-gold-dark: #B89200;
  --color-gold-light: #FEFAF0;
  --color-gold-alpha: rgba(229, 183, 0, 0.15);

  --color-red: #D9383A;
  --color-red-light: #FDF2F2;

  /* Colores de Fondo y Texto */
  --bg-main: #F7F8FC;
  --bg-card: #FFFFFF;
  --bg-navbar: rgba(255, 255, 255, 0.95);
  --text-primary: #1A2130;
  --text-secondary: #515B70;
  --text-muted: #8490A6;
  --text-white: #FFFFFF;

  /* Sombras y Bordes */
  --shadow-sm: 0 4px 12px rgba(27, 23, 93, 0.04);
  --shadow-md: 0 12px 32px rgba(27, 23, 93, 0.08);
  --shadow-lg: 0 24px 48px rgba(27, 23, 93, 0.12);
  --shadow-hover: 0 20px 40px rgba(129, 76, 156, 0.15);
  --border-glow: 1px solid rgba(255, 255, 255, 0.6);
  --border-light: 1px solid #E6EAEF;

  /* Transiciones y Bordes */
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* Reset de estilos */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  position: relative;
}

body.menu-open {
  overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--color-navy);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

/* ==========================================
   COMPONENTES COMUNES (BOTONES, BADGES)
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  gap: 8px;
}

.btn-primary {
  background-color: var(--color-purple);
  color: var(--text-white);
}

.btn-primary:hover {
  background-color: var(--color-purple-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(129, 76, 156, 0.3);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background-color: var(--color-navy);
  color: var(--text-white);
}

.btn-secondary:hover {
  background-color: var(--color-navy-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(27, 23, 93, 0.3);
}

.btn-outline-navy {
  background-color: transparent;
  border-color: var(--color-navy);
  color: var(--color-navy);
}

.btn-outline-navy:hover {
  background-color: var(--color-navy);
  color: var(--text-white);
  transform: translateY(-2px);
}

.btn-outline-white {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.6);
  color: #FFFFFF;
}

.btn-outline-white:hover {
  background-color: #FFFFFF;
  color: var(--color-navy-dark);
  border-color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
}

.btn-gold {
  background-color: var(--color-gold);
  color: var(--color-navy-dark);
  font-weight: 700;
}

.btn-gold:hover {
  background-color: #ffd000;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(229, 183, 0, 0.4);
}

.btn-outline-white {
  background-color: transparent;
  border-color: var(--text-white);
  color: var(--text-white);
}

.btn-outline-white:hover {
  background-color: var(--text-white);
  color: var(--color-purple-dark);
  transform: translateY(-2px);
}

.badge-gold {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--color-gold-light);
  color: var(--color-gold-dark);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(229, 183, 0, 0.3);
}

/* Secciones */
.section {
  padding: 40px 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 35px auto;
}

.section-header .subtitle {
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--color-purple);
  display: block;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* ==========================================
   NAVBAR (CABECERA)
   ========================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: var(--transition);
}

.navbar.scrolled {
  background-color: var(--bg-navbar);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: var(--border-light);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 90px;
}

/* Logo: sin fondo, blanco sobre hero oscuro. En scroll: color completo */
.navbar-brand {
  background-color: transparent;
  padding: 6px 0;
  border-radius: 0;
  display: flex;
  align-items: center;
  box-shadow: none;
  transition: var(--transition);
}

/* Logo blanco (escala de grises invertida) cuando la barra es transparente */
.navbar-brand img {
  max-height: 48px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  transition: filter 0.35s ease;
}

/* Al hacer scroll: vuelve a color completo */
.navbar.scrolled .navbar-brand {
  background-color: transparent;
  box-shadow: none;
  border-color: transparent;
}

.navbar.scrolled .navbar-brand img {
  filter: none;
}



.navbar-nav {
  display: flex;
  list-style: none;
  gap: 32px;
}

.navbar-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  transition: var(--transition);
}

.navbar-link:hover {
  color: #FFFFFF;
}

.navbar.scrolled .navbar-link {
  color: var(--color-navy);
}

.navbar.scrolled .navbar-link:hover {
  color: var(--color-purple);
}

.navbar-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-purple);
  transition: var(--transition);
}

.navbar-link:hover::after {
  width: 100%;
}

.navbar-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.navbar-action-icon {
  flex-shrink: 0;
}

.navbar .navbar-actions .btn-outline-navy {
  border-color: rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
}

.navbar .navbar-actions .btn-outline-navy:hover {
  background-color: #FFFFFF;
  color: var(--color-navy);
  border-color: #FFFFFF;
}

.navbar.scrolled .navbar-actions .btn-outline-navy {
  border-color: var(--color-navy);
  color: var(--color-navy);
}

.navbar.scrolled .navbar-actions .btn-outline-navy:hover {
  background-color: var(--color-navy);
  color: var(--text-white);
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  transition: var(--transition);
}

.navbar.scrolled .navbar-toggle {
  color: var(--color-navy);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
  padding-top: 130px;
  padding-bottom: 55px;
  position: relative;
  overflow: hidden;
  color: #FFFFFF;
  /* Overlay oscuro + degradado central horizontal para suavizar la union de las dos mitades */
  background:
    linear-gradient(to right, rgba(4, 8, 18, 0.15) 0%, rgba(4, 8, 18, 0.0) 30%, rgba(4, 8, 18, 0.0) 70%, rgba(4, 8, 18, 0.15) 100%),
    linear-gradient(rgba(4, 8, 18, 0.60), rgba(4, 8, 18, 0.68));
}

/* Imagen de fondo animada en su propio pseudo-elemento */
.hero::before {
  content: '';
  position: absolute;
  inset: -6%;
  background-image: url('public/hero_background.png');
  background-size: cover;
  background-position: center;
  z-index: 0;
  animation: heroPan 32s linear infinite;
  pointer-events: none;
  will-change: transform;
}

/* Movimiento más notorio pero elegante — 0% y 100% idénticos = loop perfecto sin salto */
@keyframes heroPan {
  0%   { transform: scale(1.08) translate(  0px,   0px) rotate(0deg); }
  20%  { transform: scale(1.15) translate(-28px,  18px) rotate(-0.6deg); }
  40%  { transform: scale(1.12) translate(-36px,  32px) rotate(-1.1deg); }
  60%  { transform: scale(1.17) translate(-10px,  42px) rotate(0.7deg); }
  80%  { transform: scale(1.13) translate( 26px,  20px) rotate(1.2deg); }
  100% { transform: scale(1.08) translate(  0px,   0px) rotate(0deg); }
}

/* Pulso de luces de ambiente — lado izquierdo (dolor/púrpura), lado derecho (cardio/teal) */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 40% 40% at 15% 50%, rgba(129, 76, 156, 0.16) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 85% 50%, rgba(21, 114, 147, 0.13) 0%, transparent 70%);
  z-index: 1;
  pointer-events: none;
  animation: ambientPulse 6s ease-in-out infinite alternate, ambientDrift 16s ease-in-out infinite;
}

@keyframes ambientPulse {
  0%   { opacity: 0.7; }
  50%  { opacity: 1.0; }
  100% { opacity: 0.8; }
}

@keyframes ambientDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(0, -10px, 0) scale(1.03); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 60px;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(129, 76, 156, 0.15);
  color: #FFFFFF;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 24px;
  border: 1px solid rgba(129, 76, 156, 0.4);
  box-shadow: 0 4px 15px rgba(129, 76, 156, 0.15);
}

.hero-badge span {
  width: 8px;
  height: 8px;
  background-color: var(--color-purple-light);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.hero-content h1 {
  font-size: 3.4rem;
  line-height: 1.15;
  margin-bottom: 24px;
  color: #FFFFFF;
}

.hero-content h1 span {
  background: linear-gradient(135deg, var(--color-purple-light) 0%, var(--color-teal-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 40px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 20px;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Tarjeta de perfil académico flotante (Glassmorphism) */
.hero-profile-card {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  width: 100%;
  max-width: 420px;
  position: relative;
  transition: var(--transition);
}

.hero-profile-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.profile-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 20px;
}

.profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-purple) 0%, var(--color-teal) 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(129, 76, 156, 0.3);
}

.profile-user-info {
  flex-grow: 1;
}

.profile-user-info h4 {
  font-size: 1.1rem;
  color: #FFFFFF;
  font-weight: 600;
  margin-bottom: 2px;
}

.profile-user-info p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.profile-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: rgba(240, 165, 0, 0.15);
  color: var(--color-gold);
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(240, 165, 0, 0.3);
}

.profile-card-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-stat-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--color-teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-stat-row:nth-child(2) .profile-stat-icon {
  color: var(--color-purple-light);
}

.profile-stat-row:nth-child(3) .profile-stat-icon {
  color: var(--color-gold);
}

.profile-stat-details span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: block;
}

.profile-stat-details p {
  font-size: 0.95rem;
  color: #FFFFFF;
  font-weight: 500;
  margin-top: 1px;
}
/* FIN hero glassmorphism card */

/* ==========================================
   FORMATOS DE ACTUALIZACIÓN
   ========================================== */
.formats {
  background-color: #FFFFFF;
  position: relative;
}

.formats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.format-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 30px 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.format-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(129, 76, 156, 0.15);
}

.format-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--color-purple-light);
  color: var(--color-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: var(--transition);
}

.format-card:hover .format-icon {
  background-color: var(--color-purple);
  color: var(--text-white);
  transform: rotate(5deg) scale(1.05);
}

.format-card:nth-child(even) .format-icon {
  background-color: var(--color-teal-light);
  color: var(--color-teal);
}

.format-card:nth-child(even):hover .format-icon {
  background-color: var(--color-teal);
  color: var(--text-white);
}

.format-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--color-navy);
  font-family: 'Outfit', sans-serif;
}

.format-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================
   LÍNEAS ACADÉMICAS (RAMAS)
   ========================================== */
.branches {
  background-color: #F6F8FB;
  background-image: radial-gradient(rgba(27, 23, 93, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  position: relative;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.branches::before {
  content: '';
  position: absolute;
  top: 10%;
  left: -10%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(129, 76, 156, 0.06) 0%, rgba(0,0,0,0) 75%);
  filter: blur(40px);
  pointer-events: none;
}

.branches::after {
  content: '';
  position: absolute;
  bottom: 10%;
  right: -10%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(14, 102, 140, 0.06) 0%, rgba(0,0,0,0) 75%);
  filter: blur(40px);
  pointer-events: none;
}

.branches-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.branch-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.branch-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  transition: var(--transition);
}

.branch-card.dolor::before {
  background-color: var(--color-purple);
}

.branch-card.cardiometabolico::before {
  background-color: var(--color-teal);
}

.branch-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.branch-card.dolor:hover {
  border-color: rgba(129, 76, 156, 0.3);
}

.branch-card.cardiometabolico:hover {
  border-color: rgba(14, 102, 140, 0.3);
}

.branch-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

.branch-card.dolor .branch-icon {
  background-color: var(--color-purple-light);
  color: var(--color-purple);
}

.branch-card.cardiometabolico .branch-icon {
  background-color: var(--color-teal-light);
  color: var(--color-teal);
}

.branch-card h3 {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.branch-card p {
  color: var(--text-secondary);
  margin-bottom: 30px;
  font-size: 1rem;
}

.branch-list {
  list-style: none;
  margin-bottom: 40px;
}

.branch-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.branch-card.dolor .branch-list li svg {
  color: var(--color-purple);
}

.branch-card.cardiometabolico .branch-list li svg {
  color: var(--color-teal);
}

/* ==========================================
   CURSOS POR INDICACIÓN TERAPÉUTICA
   ========================================== */
.courses {
  background-color: #FFFFFF;
}

.courses-filter {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 50px;
}

.filter-btn {
  background-color: var(--bg-main);
  border: 1px solid var(--border-light);
  color: var(--color-navy);
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  background-color: var(--color-purple-light);
  color: var(--color-purple);
  border-color: rgba(129, 76, 156, 0.2);
}

.filter-btn.active {
  background-color: var(--color-purple);
  color: var(--text-white);
  border-color: var(--color-purple);
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.course-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: var(--border-light);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(27, 23, 93, 0.15);
}

.course-img-wrapper {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.course-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.course-card:hover .course-img-wrapper img {
  transform: scale(1.05);
}

.course-card-hypertension .course-img-wrapper {
  background:
    radial-gradient(circle at 20% 18%, rgba(129, 76, 156, 0.22), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(14, 102, 140, 0.26), transparent 30%),
    linear-gradient(135deg, #07111f 0%, #0d1b33 52%, #081321 100%);
}

.course-card-hypertension .course-img-wrapper img {
  object-position: center;
  background-color: #091527;
}

.form-textarea {
  min-height: 132px;
  resize: vertical;
}

.course-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-white);
  letter-spacing: 1px;
}

.course-tag.cardiometabolico {
  background-color: var(--color-teal);
}

.course-tag.dolor {
  background-color: var(--color-purple);
}

.course-info {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.course-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.course-pts {
  color: var(--color-purple-dark);
  font-weight: 700;
  font-size: 0.85rem;
}

.course-info h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  line-height: 1.35;
  color: var(--color-navy);
  font-family: 'Outfit', sans-serif;
}

.course-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
  line-height: 1.5;
}

.course-topics-highlight {
  background-color: var(--bg-main);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-top: auto;
  border-left: 3px solid var(--color-purple);
}

.course-card[data-category="cardiometabolico"] .course-topics-highlight {
  border-left-color: var(--color-teal);
}

.course-topics-highlight h5 {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.course-topics-highlight ul {
  list-style: none;
}

.course-topics-highlight ul li {
  font-size: 0.8rem;
  color: var(--text-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.course-topics-highlight ul li:last-child {
  margin-bottom: 0;
}

.course-topics-highlight ul li::before {
  content: "•";
  color: var(--color-purple);
  font-weight: bold;
}

.course-card[data-category="cardiometabolico"] .course-topics-highlight ul li::before {
  color: var(--color-teal);
}

.course-footer {
  padding: 16px 24px;
  border-top: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-main);
}

.course-lecturer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.course-lecturer-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-light);
}

.course-lecturer-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-navy);
}

.btn-enroll-action {
  background-color: transparent;
  border: none;
  color: var(--color-purple);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.course-card[data-category="cardiometabolico"] .btn-enroll-action {
  color: var(--color-teal);
}

.btn-enroll-action:hover {
  transform: translateX(4px);
}

/* ==========================================
   SECCIÓN DE CERTIFICACIÓN
   ========================================== */
.certification {
  background: linear-gradient(135deg, var(--color-navy-dark) 0%, #151147 100%);
  color: var(--text-white);
  position: relative;
  overflow: hidden;
}

.certification::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(129, 76, 156, 0.15) 0%, rgba(0,0,0,0) 70%);
  filter: blur(40px);
  pointer-events: none;
}

.certification .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 60px;
}

.certification-content h2 {
  color: var(--text-white);
  font-size: 2.6rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.certification-content p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.15rem;
  margin-bottom: 36px;
}

.certification-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}

.certification-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.certification-item-icon {
  width: 36px;
  height: 36px;
  background-color: rgba(229, 183, 0, 0.15);
  color: var(--color-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 4px;
}

.certification-item-text h4 {
  color: var(--text-white);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.certification-item-text p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.certification-visual {
  display: flex;
  justify-content: center;
}

.certification-badge-wrapper {
  background-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  max-width: 350px;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.certification-badge-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--color-gold);
  color: var(--color-navy-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(229, 183, 0, 0.3);
}

.certification-badge-wrapper h3 {
  color: var(--text-white);
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.certification-badge-wrapper p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.certification-badge-pts {
  font-family: 'Outfit', sans-serif;
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--color-gold);
  line-height: 1;
}

.certification-badge-subpts {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 700;
  letter-spacing: 1px;
}

/* ==========================================
   PIE DE PÁGINA (FOOTER)
   ========================================== */
.footer {
  background-color: #FFFFFF;
  border-top: var(--border-light);
  padding: 40px 0 24px 0;
  position: relative;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-brand img {
  max-height: 55px;
  width: auto;
  margin-bottom: 24px;
  object-fit: contain;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-column h4 {
  font-size: 1.1rem;
  color: var(--color-navy);
  margin-bottom: 24px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-link {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.footer-link:hover {
  color: var(--color-purple);
  padding-left: 4px;
}

.footer-bottom {
  border-top: var(--border-light);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-zenzei {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-navy);
}

.footer-zenzei span {
  color: var(--color-purple);
}

/* ==========================================
   MODALES DE AUTENTICACIÓN
   ========================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 12, 59, 0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background-color: var(--bg-card);
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 48px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: var(--border-light);
  overflow: hidden;
  position: relative;
  transform: translateY(30px);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
}

.modal-backdrop.active .modal {
  transform: translateY(0);
}

.modal-large {
  max-width: 760px;
}

.modal-legal {
  max-width: 860px;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.modal-close:hover {
  background-color: var(--bg-main);
  color: var(--text-primary);
}

.modal-header {
  padding: 36px 36px 20px 36px;
}

.modal-header h3 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.modal-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.modal-body {
  padding: 0 36px 36px 36px;
  overflow-y: auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}

.form-grid .form-group {
  margin-bottom: 18px;
}

.form-grid > button {
  grid-column: 1 / -1;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: inherit;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-purple);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px var(--color-purple-light);
}

.form-helper {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.hidden-field {
  display: none;
}

.legal-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.legal-section {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(27, 23, 93, 0.08);
  background: linear-gradient(180deg, rgba(239, 241, 249, 0.8) 0%, rgba(255, 255, 255, 1) 100%);
}

.legal-section h4 {
  font-size: 1rem;
  margin-bottom: 10px;
}

.legal-section p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.legal-section a {
  color: var(--color-purple-dark);
  font-weight: 700;
}

.legal-section code {
  background-color: var(--color-navy-light);
  color: var(--color-navy);
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.82rem;
}

.modal-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.modal-footer a {
  color: var(--color-purple);
  font-weight: 700;
}

.modal-footer a:hover {
  text-decoration: underline;
}

/* Toast de Notificaciones */
.toast {
  position: fixed;
  bottom: 95px;
  right: 30px;
  background-color: var(--color-navy-dark);
  color: var(--text-white);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 3000;
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition);
  border-left: 4px solid var(--color-gold);
}

.toast.active {
  transform: translateY(0);
  opacity: 1;
}

.toast.error {
  background-color: #7A1E2C;
  border-left-color: #F6BDC6;
}

.toast.error .toast-success-icon {
  color: #FDE6EA;
}

.toast-success-icon {
  color: var(--color-gold);
  flex-shrink: 0;
}

/* Botón Go Top (Ir arriba) */
.go-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--color-purple);
  color: var(--text-white);
  border: none;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 3600;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.go-top-btn.show {
  opacity: 1;
  visibility: visible;
}

.go-top-btn:hover {
  background-color: var(--color-purple-dark);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.go-top-btn svg {
  transition: transform 0.3s ease;
}

.go-top-btn:hover svg {
  transform: translateY(-2px);
}

/* ==========================================
   DISEÑO RESPONSIVO (MEDIA QUERIES)
   ========================================== */
@media (max-width: 1024px) {
  .hero-content h1 {
    font-size: 2.8rem;
  }
  
  .formats-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .courses-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  body,
  .hero,
  .section,
  .footer {
    overflow-x: clip;
  }

  body {
    touch-action: pan-y;
  }

  .go-top-btn {
    right: 18px;
    bottom: 18px;
    width: 54px;
    height: 54px;
    z-index: 4200;
  }

  .modal-backdrop {
    padding: 16px;
  }

  .modal-header {
    padding: 28px 24px 18px 24px;
  }

  .modal-body {
    padding: 0 24px 28px 24px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* ---- NAVBAR MOVIL: siempre fija y sólida ---- */
  .navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    background-color: transparent !important;
    box-shadow: none !important;
    backdrop-filter: blur(0px) !important;
    -webkit-backdrop-filter: blur(0px) !important;
    border-bottom: 1px solid transparent !important;
  }

  .navbar.scrolled,
  .navbar.menu-open {
    background-color: rgba(255, 255, 255, 0.97) !important;
    box-shadow: 0 2px 16px rgba(27, 23, 93, 0.10) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-bottom: var(--border-light) !important;
  }

  /* Logo a color en scroll o con menú abierto */
  .navbar.scrolled .navbar-brand img,
  .navbar.menu-open .navbar-brand img {
    filter: none !important;
  }

  .navbar .container {
    min-height: 74px;
    height: auto;
    position: relative;
    flex-wrap: wrap;
    align-items: center;
    padding: 0 24px;
  }

  .navbar-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px;
    height: 42px;
    background: none !important;
    border: none !important;
    color: #FFFFFF !important;
    cursor: pointer;
    padding: 4px;
    margin-right: 0;
  }

  .navbar-toggle svg {
    width: 26px !important;
    height: 26px !important;
    stroke: currentColor !important;
    stroke-width: 2.5px !important;
  }

  .navbar.scrolled .navbar-toggle,
  .navbar.menu-open .navbar-toggle {
    color: var(--color-navy) !important;
  }

  .navbar-nav {
    display: none;
    order: 3;
    width: 100%;
  }

  .navbar-nav.active {
    display: flex;
    flex-direction: column;
    position: static;
    width: 100%;
    background-color: transparent;
    padding: 14px 0 10px;
    gap: 10px;
    margin-top: 2px;
    border-top: 1px solid rgba(27, 23, 93, 0.08);
    z-index: 100;
  }

  .navbar-nav.active .navbar-link {
    display: block;
    color: var(--color-navy) !important;
    font-size: 1rem;
    font-weight: 700;
    padding: 8px 0;
  }

  .navbar-nav.active .navbar-link::after {
    bottom: 2px;
  }

  .navbar-actions {
    display: none;
    order: 4;
    width: 100%;
  }

  .navbar-actions.active {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: static;
    width: 100%;
    background-color: transparent;
    padding: 6px 0 18px;
    gap: 10px;
    z-index: 100;
  }

  .navbar-actions.active .btn {
    min-width: 0;
    width: 100%;
    padding: 11px 12px;
    font-size: 0.84rem;
    gap: 6px;
    border-radius: 14px;
  }

  .navbar-actions.active .btn-outline-navy {
    background-color: rgba(27, 23, 93, 0.04);
    border-color: rgba(27, 23, 93, 0.18);
    color: var(--color-navy);
  }

  .navbar-actions.active .btn-primary {
    box-shadow: 0 10px 18px rgba(129, 76, 156, 0.16);
  }

  /* ---- HERO MOVIL ---- */
  .hero {
    padding-top: 100px;
    padding-bottom: 50px;
  }

  .hero .container {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .hero-content,
  .hero-visual {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .hero-content h1 {
    font-size: clamp(2.35rem, 10vw, 3rem);
    line-height: 1.06;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
  }

  .hero-content p {
    font-size: 1.06rem;
    overflow-wrap: anywhere;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    max-width: 100%;
  }

  /* Texto primero (order 1), tarjeta despues (order 2) */
  .hero-content {
    order: 1;
  }

  .hero-visual {
    order: 2;
  }

  .hero-badge {
    margin-bottom: 16px;
  }

  .hero-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* ---- LAYOUT MOVIL ---- */
  .branches-grid {
    grid-template-columns: 1fr;
  }

  .formats-grid {
    grid-template-columns: 1fr;
  }

  .courses-grid {
    grid-template-columns: 1fr;
  }

  .certification .container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .certification-list {
    align-items: center;
  }

  .certification-item {
    text-align: left;
    max-width: 500px;
  }

  .footer {
    padding: 24px 0 16px 0;
  }

  .footer-brand img,
  .footer-column h4 {
    margin-bottom: 12px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================
   EFFECTS - INTERACTIVE GLOW & MODERN HOVER
   ========================================== */
.format-card::after, 
.branch-card::after, 
.course-card::after, 
.hero-profile-card::after,
.certification-badge-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: radial-gradient(350px circle at var(--mouse-x, 0px) var(--mouse-y, 0px), rgba(129, 76, 156, 0.1) 0%, rgba(21, 114, 147, 0.04) 50%, transparent 100%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.format-card:hover::after, 
.branch-card:hover::after, 
.course-card:hover::after, 
.hero-profile-card:hover::after,
.certification-badge-wrapper:hover::after {
  opacity: 1;
}

/* Asegurar que el contenido interactivo de las tarjetas esté por encima del glow */
.format-card > *,
.branch-card > *,
.course-card > *,
.hero-profile-card > * {
  position: relative;
  z-index: 2;
}

/* Hover effects for buttons - magnetic/active feedback */
.btn:active {
  transform: scale(0.96) translateY(-1px);
}
