/* ============ RESET Y VARIABLES ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #1a3a6b;
  --primary-dark: #0f2447;
  --primary-light: #2c5a9e;
  --accent: #2c5a9e;
  --accent-light: #4a7fc1;
  --gold: #b8945f;
  --dark: #1a1f2e;
  --gray: #5a6472;
  --gray-light: #8b95a5;
  --border: #e2e6ec;
  --light: #f5f7fa;
  --white: #ffffff;
  --gradient-primary: linear-gradient(135deg, #1a3a6b 0%, #2c5a9e 100%);
  --shadow-sm: 0 2px 8px rgba(15,36,71,0.06);
  --shadow-md: 0 8px 24px rgba(15,36,71,0.1);
  --shadow-lg: 0 20px 50px rgba(15,36,71,0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Source Sans 3', sans-serif;
  color: var(--dark);
  line-height: 1.65;
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { font-family: 'Playfair Display', serif; font-weight: 600; line-height: 1.25; color: var(--primary-dark); }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 90px 0; }
.section-light { background: var(--light); }

/* ============ TOP BAR ============ */
.topbar { background: var(--primary-dark); color: rgba(255,255,255,0.85); font-size: 13px; padding: 9px 0; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.topbar-info { display: flex; gap: 26px; flex-wrap: wrap; }
.topbar-info span { display: flex; align-items: center; gap: 7px; }
.topbar-info a { color: inherit; }
.topbar-info a:hover { color: var(--white); }
.topbar-social { display: flex; gap: 8px; }
.topbar-social a {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
  border-radius: 5px;
  color: rgba(255,255,255,0.75);
}
.topbar-social a:hover { background: var(--primary-light); color: white; }

/* ============ HEADER ============ */
header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
header.scrolled { box-shadow: var(--shadow-md); }

.navbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; }

/* ===== LOGO con RUC debajo del nombre ===== */
.logo { display: flex; align-items: center; gap: 14px; }
.logo-img { height: 62px; width: auto; }
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-text strong {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  color: var(--primary);
  letter-spacing: 0.5px;
  font-weight: 700;
  line-height: 1;
}
.logo-ruc {
  font-size: 11px;
  color: var(--primary-light);
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-top: 3px;
}
.logo-text small {
  font-size: 10px;
  color: var(--gray);
  letter-spacing: 0.2px;
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 2px;
}

.nav-links { display: flex; gap: 2px; align-items: center; }
.nav-links a {
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  color: var(--dark);
  position: relative;
}
.nav-links a:hover { color: var(--primary); background: var(--light); }
.nav-links a.active { color: var(--primary); font-weight: 600; }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: 4px; left: 14px; right: 14px;
  height: 2px; background: var(--primary);
}

.btn-cta {
  background: var(--gradient-primary) !important;
  color: white !important;
  padding: 11px 20px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(26,58,107,0.25);
  margin-left: 8px;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(26,58,107,0.35); }
.btn-cta::after { display: none !important; }

.menu-toggle {
  display: none;
  background: none; border: none;
  color: var(--primary);
  padding: 6px;
}

/* ============ PAGE SYSTEM (SPA) ============ */
.page { display: none; animation: pageFadeIn 0.4s ease; }
.page.active { display: block; }
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ PAGE HEADER ============ */
.page-header {
  background: var(--gradient-primary);
  color: white;
  padding: 60px 0 70px;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 0%, transparent 50%),
                    radial-gradient(circle at 80% 70%, rgba(184,148,95,0.15) 0%, transparent 50%);
}
.page-header .container { position: relative; }
.page-header h1 { color: white; margin-bottom: 12px; }
.page-header p { color: rgba(255,255,255,0.85); font-size: 1.05rem; max-width: 700px; }

.breadcrumb {
  display: flex; gap: 10px; align-items: center;
  font-size: 13.5px; margin-bottom: 20px;
  color: rgba(255,255,255,0.7);
}
.breadcrumb a { color: rgba(255,255,255,0.85); }
.breadcrumb a:hover { color: white; }
.breadcrumb span:last-child { color: white; font-weight: 500; }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex; align-items: center;
  background: linear-gradient(135deg, #0f2447 0%, #1a3a6b 50%, #2c5a9e 100%);
  overflow: hidden;
  color: white;
}
.hero-overlay {
  position: absolute; inset: 0;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(44,90,158,0.4) 0%, transparent 50%),
    radial-gradient(circle at 85% 80%, rgba(184,148,95,0.15) 0%, transparent 50%);
}
.hero-content {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 60px; align-items: center;
  width: 100%; padding: 60px 0;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 18px; border-radius: 50px;
  font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.3px; margin-bottom: 26px;
  backdrop-filter: blur(8px);
}
.hero-badge .dot {
  width: 7px; height: 7px;
  background: var(--gold); border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184,148,95,0.6); }
  50% { box-shadow: 0 0 0 8px rgba(184,148,95,0); }
}
.hero h1 { color: white; margin-bottom: 22px; }
.hero h1 .highlight {
  background: linear-gradient(120deg, #d4b483, #b8945f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p { font-size: 1.08rem; color: rgba(255,255,255,0.85); max-width: 560px; margin-bottom: 34px; }
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border-radius: 6px;
  font-weight: 600; font-size: 15px;
  transition: var(--transition); border: none;
}
.btn-primary { background: white; color: var(--primary); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.25); }
.btn-outline { background: transparent; color: white; border: 1.5px solid rgba(255,255,255,0.4); }
.btn-outline:hover { background: rgba(255,255,255,0.08); border-color: white; }
.btn-outline-dark {
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline-dark:hover { background: var(--primary); color: white; }

.hero-stats {
  display: flex; gap: 44px;
  margin-top: 48px; padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.hero-stat h3 { font-family: 'Playfair Display', serif; font-size: 2.1rem; color: var(--gold); margin-bottom: 4px; }
.hero-stat p { font-size: 13px; color: rgba(255,255,255,0.7); margin: 0; }

.hero-visual { position: relative; }
.hero-image-wrapper {
  position: relative; border-radius: 12px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
  border: 4px solid rgba(255,255,255,0.1);
}
.hero-image-wrapper img { width: 100%; height: 480px; object-fit: cover; }
.hero-image-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15,36,71,0.6) 100%);
}
.hero-card {
  position: absolute; bottom: -25px; left: -25px;
  background: white; padding: 18px 22px; border-radius: 10px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 14px;
  animation: floatCard 5s ease-in-out infinite;
}
@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.hero-card-icon {
  width: 48px; height: 48px;
  background: var(--gradient-primary); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; color: white;
}
.hero-card-text strong { display: block; font-size: 14px; color: var(--dark); font-weight: 600; }
.hero-card-text small { color: var(--gray); font-size: 12px; }

/* ============ PILARES ============ */
.pillars { padding: 80px 0; background: var(--white); }
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
}
.pillar {
  text-align: center; padding: 40px 24px;
  border-radius: 10px; transition: var(--transition);
  border: 1px solid var(--border); background: white;
}
.pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.pillar-icon {
  width: 62px; height: 62px; margin: 0 auto 20px;
  background: var(--light); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); transition: var(--transition);
}
.pillar:hover .pillar-icon { background: var(--gradient-primary); color: white; }
.pillar h3 { font-size: 1.15rem; margin-bottom: 10px; }
.pillar p { color: var(--gray); font-size: 0.92rem; }

/* ============ SECTION HEADERS ============ */
.section-header { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-tag {
  display: inline-block;
  color: var(--primary-light);
  background: rgba(44,90,158,0.08);
  padding: 6px 16px; border-radius: 50px;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.5px;
  margin-bottom: 16px;
}
.section-header h2 { margin-bottom: 14px; }
.section-header p { color: var(--gray); font-size: 1.02rem; }

/* ============ SERVICIOS ============ */
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 26px;
}
.servicio-card {
  background: white; border-radius: 12px;
  padding: 36px 30px;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer; position: relative; overflow: hidden;
}
.servicio-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; width: 100%; height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0); transform-origin: left;
  transition: var(--transition);
}
.servicio-card:hover::before { transform: scaleX(1); }
.servicio-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.servicio-icon {
  width: 66px; height: 66px;
  background: var(--light); border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); margin-bottom: 24px;
  transition: var(--transition);
}
.servicio-card:hover .servicio-icon { background: var(--gradient-primary); color: white; }
.servicio-card h3 { font-size: 1.2rem; margin-bottom: 12px; }
.servicio-card p { color: var(--gray); font-size: 0.94rem; margin-bottom: 18px; }
.servicio-link { color: var(--primary-light); font-weight: 600; font-size: 14px; }
.servicio-card:hover .servicio-link { color: var(--primary); }

/* ============ GALERÍA PREVIEW (inicio) ============ */
.galeria-preview {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 280px 280px;
  gap: 16px;
}
.galeria-preview-item {
  position: relative; border-radius: 12px;
  overflow: hidden; cursor: pointer;
}
.galeria-preview-item:first-child {
  grid-row: 1 / 3;
}
.galeria-preview-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.galeria-preview-item:hover img { transform: scale(1.08); }
.galeria-preview-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15,36,71,0.85) 100%);
  display: flex; align-items: flex-end; padding: 24px;
  opacity: 0; transition: var(--transition);
}
.galeria-preview-item:hover .galeria-preview-overlay { opacity: 1; }
.galeria-preview-overlay span {
  color: white; font-family: 'Playfair Display', serif;
  font-size: 1.15rem; font-weight: 600;
  transform: translateY(10px);
  transition: transform 0.3s ease;
}
.galeria-preview-item:hover .galeria-preview-overlay span { transform: translateY(0); }

.galeria-preview-cta { text-align: center; margin-top: 40px; }

/* ============ EQUIPO PREVIEW (inicio) ============ */
.equipo-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
}
.equipo-preview-card {
  text-align: center;
  padding: 30px 20px;
  background: white; border-radius: 12px;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}
.equipo-preview-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.equipo-preview-avatar {
  width: 130px; height: 130px;
  margin: 0 auto 20px;
  border-radius: 50%; overflow: hidden;
  border: 4px solid var(--light);
  transition: var(--transition);
}
.equipo-preview-card:hover .equipo-preview-avatar { border-color: var(--primary-light); }
.equipo-preview-avatar img { width: 100%; height: 100%; object-fit: cover; }
.equipo-preview-card h4 { font-size: 1.1rem; margin-bottom: 4px; }
.equipo-preview-card span { color: var(--primary-light); font-size: 13px; font-weight: 500; }

/* ============ CTA FINAL ============ */
.cta-final {
  background: var(--gradient-primary);
  color: white; text-align: center;
  padding: 80px 0; position: relative; overflow: hidden;
}
.cta-final::before {
  content: ''; position: absolute;
  top: -50%; left: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  border-radius: 50%;
}
.cta-final h2 { color: white; margin-bottom: 16px; position: relative; }
.cta-final p { font-size: 1.05rem; opacity: 0.9; margin-bottom: 30px; max-width: 600px; margin-left: auto; margin-right: auto; position: relative; }

/* ============ ABOUT ============ */
.about-intro { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }
.about-text h2 { margin: 12px 0 20px; }
.about-text p { color: var(--gray); margin-bottom: 18px; font-size: 1.02rem; }
.about-facts {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin-top: 30px;
  padding-top: 30px; border-top: 1px solid var(--border);
}
.fact strong {
  display: block; color: var(--primary);
  font-size: 12px; text-transform: uppercase;
  letter-spacing: 1.5px; margin-bottom: 6px; font-weight: 700;
}
.fact span { color: var(--dark); font-weight: 500; font-size: 14.5px; }
.about-image img {
  border-radius: 12px; box-shadow: var(--shadow-lg);
  height: 460px; width: 100%; object-fit: cover;
}

/* ============ MISIÓN Y VISIÓN ============ */
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.mv-card {
  background: white; border-radius: 12px;
  padding: 44px 40px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.mv-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; width: 100%; height: 4px;
  background: var(--gradient-primary);
}
.mv-card.vision::before { background: linear-gradient(135deg, #b8945f 0%, #d4b483 100%); }
.mv-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.mv-icon {
  width: 64px; height: 64px; border-radius: 14px;
  background: var(--light);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); margin-bottom: 24px;
}
.mv-card.vision .mv-icon { color: var(--gold); background: #faf6ef; }
.mv-card h3 { font-size: 1.5rem; margin-bottom: 14px; }
.mv-card p { color: var(--gray); line-height: 1.75; }

/* ============ VALORES ============ */
.valores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.valor-card {
  background: white; border-radius: 10px;
  padding: 32px 28px;
  border: 1px solid var(--border);
  transition: var(--transition); position: relative;
}
.valor-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.valor-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem; font-weight: 700;
  color: var(--light); line-height: 1;
  margin-bottom: 12px; transition: var(--transition);
}
.valor-card:hover .valor-number { color: var(--primary-light); }
.valor-card h4 { font-size: 1.1rem; margin-bottom: 10px; }
.valor-card p { color: var(--gray); font-size: 0.92rem; }

/* ============ SERVICIOS FULL ============ */
.servicios-grid-full {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
  gap: 26px;
}
.servicio-full {
  background: white; border-radius: 12px;
  padding: 36px; border: 1px solid var(--border);
  display: flex; gap: 24px;
  transition: var(--transition);
}
.servicio-full:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: var(--primary-light); }
.servicio-full-icon {
  width: 66px; height: 66px; min-width: 66px;
  background: var(--light); border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); transition: var(--transition);
}
.servicio-full:hover .servicio-full-icon { background: var(--gradient-primary); color: white; }
.servicio-full-body h3 { font-size: 1.25rem; margin-bottom: 12px; }
.servicio-full-body > p { color: var(--gray); font-size: 0.94rem; margin-bottom: 16px; }
.servicio-list { display: grid; gap: 6px; }
.servicio-list li { font-size: 0.9rem; color: var(--dark); padding-left: 22px; position: relative; }
.servicio-list li::before {
  content: '✓'; position: absolute; left: 0; top: 0;
  color: var(--primary-light); font-weight: 700;
}

/* ============ PRUEBAS ============ */
.pruebas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.prueba-card {
  background: white; border-radius: 12px;
  padding: 34px 28px; text-align: center;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.prueba-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.prueba-icon {
  width: 66px; height: 66px; margin: 0 auto 20px;
  background: var(--light); border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); transition: var(--transition);
}
.prueba-card:hover .prueba-icon { background: var(--gradient-primary); color: white; }
.prueba-card h4 { font-size: 1.1rem; margin-bottom: 10px; }
.prueba-card p { color: var(--gray); font-size: 0.9rem; margin-bottom: 20px; min-height: 60px; }
.prueba-btn {
  background: var(--light); color: var(--primary);
  border: 1px solid var(--border);
  padding: 9px 22px; border-radius: 6px;
  font-size: 13.5px; font-weight: 600;
  transition: var(--transition);
}
.prueba-btn:hover { background: var(--gradient-primary); color: white; border-color: transparent; }

/* ============ GALERÍA (página completa) ============ */
.galeria-filtros {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: center; margin-bottom: 40px;
}
.filtro-btn {
  background: white; color: var(--gray);
  border: 1px solid var(--border);
  padding: 9px 22px; border-radius: 50px;
  font-size: 13.5px; font-weight: 500;
  transition: var(--transition);
}
.filtro-btn:hover { border-color: var(--primary-light); color: var(--primary); }
.filtro-btn.active {
  background: var(--gradient-primary); color: white;
  border-color: transparent;
}

.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.galeria-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  animation: fadeIn 0.4s ease;
}
.galeria-item.hidden { display: none; }
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.galeria-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.galeria-item:hover img { transform: scale(1.1); }
.galeria-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,36,71,0.1) 0%, rgba(15,36,71,0.9) 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  opacity: 0; transition: var(--transition);
  color: white;
}
.galeria-item:hover .galeria-overlay { opacity: 1; }
.galeria-overlay svg { transform: translateY(-10px); transition: transform 0.3s ease; }
.galeria-item:hover .galeria-overlay svg { transform: translateY(0); }
.galeria-overlay span {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 600;
  transform: translateY(10px); transition: transform 0.3s ease 0.05s;
}
.galeria-item:hover .galeria-overlay span { transform: translateY(0); }

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(10,20,40,0.95);
  display: none; align-items: center; justify-content: center;
  z-index: 9999;
  padding: 40px;
  backdrop-filter: blur(6px);
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 90vw; max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  animation: zoomIn 0.3s ease;
}
@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
.lightbox-close {
  position: absolute; top: 24px; right: 24px;
  width: 46px; height: 46px;
  background: rgba(255,255,255,0.1);
  border: none; border-radius: 50%;
  color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); transform: rotate(90deg); }

.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 54px; height: 54px;
  background: rgba(255,255,255,0.1);
  border: none; border-radius: 50%;
  color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.lightbox-caption {
  position: absolute; bottom: 30px;
  color: white; font-size: 15px;
  font-family: 'Playfair Display', serif;
  padding: 10px 22px;
  background: rgba(255,255,255,0.1);
  border-radius: 50px;
  backdrop-filter: blur(10px);
}

/* ============ EQUIPO (página completa) ============ */
.equipo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}
.equipo-card {
  background: white; border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.equipo-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.equipo-foto {
  height: 320px; overflow: hidden;
  background: var(--light);
}
.equipo-foto img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.equipo-card:hover .equipo-foto img { transform: scale(1.05); }
.equipo-info { padding: 26px 28px; }
.equipo-info h3 { font-size: 1.25rem; margin-bottom: 4px; }
.equipo-cargo {
  display: inline-block; color: var(--primary-light);
  font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 8px;
}
.equipo-spec {
  color: var(--gray); font-size: 13.5px;
  font-style: italic; margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.equipo-bio { color: var(--gray); font-size: 0.92rem; margin-bottom: 18px; }
.equipo-contacto { display: flex; gap: 10px; }
.equipo-contacto a {
  width: 38px; height: 38px;
  background: var(--light); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-light);
  transition: var(--transition);
}
.equipo-contacto a:hover { background: var(--gradient-primary); color: white; transform: translateY(-2px); }

/* ============ NOVEDADES ============ */
.novedades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}
.articulo-card {
  background: white; border-radius: 12px;
  overflow: hidden; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.articulo-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.articulo-img { height: 200px; position: relative; overflow: hidden; }
.articulo-img img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.articulo-card:hover .articulo-img img { transform: scale(1.06); }
.articulo-tag {
  position: absolute; top: 16px; left: 16px;
  background: white; color: var(--primary);
  padding: 5px 14px; border-radius: 50px;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.8px; text-transform: uppercase;
  z-index: 2;
}
.articulo-body { padding: 26px; }
.articulo-body h3 { font-size: 1.15rem; margin-bottom: 12px; line-height: 1.4; }
.articulo-body p { color: var(--gray); font-size: 0.92rem; margin-bottom: 18px; }
.articulo-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--gray);
  padding-top: 16px; border-top: 1px solid var(--border);
}
.articulo-meta a { color: var(--primary-light); font-weight: 600; }
.articulo-meta a:hover { color: var(--primary); }

/* ============ AGENDA ============ */
.agenda-list { display: grid; gap: 18px; max-width: 940px; margin: 0 auto; }
.agenda-item {
  display: flex; align-items: center; gap: 26px;
  background: white; border: 1px solid var(--border);
  border-radius: 12px; padding: 26px 30px;
  transition: var(--transition);
}
.agenda-item:hover { transform: translateX(6px); box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.agenda-date {
  min-width: 82px; text-align: center;
  background: var(--gradient-primary); color: white;
  border-radius: 10px; padding: 12px 8px;
}
.agenda-date .day { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 700; line-height: 1; }
.agenda-date .month { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; opacity: 0.9; margin-top: 4px; }
.agenda-info { flex: 1; }
.agenda-info h4 { font-size: 1.1rem; margin-bottom: 8px; color: var(--primary-dark); }
.agenda-info p { font-size: 13.5px; color: var(--gray); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.agenda-info p svg { color: var(--primary-light); vertical-align: middle; }
.agenda-btn {
  background: var(--primary); color: white;
  border: none; padding: 11px 24px; border-radius: 6px;
  font-weight: 600; font-size: 13.5px;
  transition: var(--transition); white-space: nowrap;
}
.agenda-btn:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ============ CONTACTO ============ */
.contacto-wrapper { display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; }
.contacto-info h2 { margin: 12px 0 16px; }
.contacto-info > p { color: var(--gray); margin-bottom: 34px; }
.contacto-items { display: grid; gap: 20px; }
.contacto-item {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px; background: white;
  border-radius: 10px; border: 1px solid var(--border);
  transition: var(--transition);
}
.contacto-item:hover { border-color: var(--primary-light); box-shadow: var(--shadow-sm); }
.contacto-item-icon {
  width: 46px; height: 46px; min-width: 46px;
  background: var(--light); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
}
.contacto-item strong { display: block; font-size: 13px; color: var(--primary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.contacto-item p { color: var(--dark); font-size: 15px; margin: 0; font-weight: 500; }
.contacto-item a { color: var(--dark); }
.contacto-item a:hover { color: var(--primary); }

.consultas-form {
  background: white; border-radius: 14px;
  padding: 44px; box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.consultas-form h3 { font-size: 1.5rem; margin-bottom: 8px; }
.consultas-form > p { color: var(--gray); font-size: 0.94rem; margin-bottom: 28px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 13px;
  font-weight: 600; margin-bottom: 7px; color: var(--dark);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit;
  transition: var(--transition);
  background: var(--light); color: var(--dark);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--primary-light);
  background: white; box-shadow: 0 0 0 4px rgba(44,90,158,0.1);
}
.form-group textarea { resize: vertical; min-height: 110px; }

.form-submit {
  width: 100%; background: #25d366; color: white;
  border: none; padding: 15px; border-radius: 8px;
  font-size: 15px; font-weight: 600;
  transition: var(--transition);
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
}
.form-submit:hover { background: #1eb858; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(37,211,102,0.35); }
.form-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.form-privacy { font-size: 12.5px; color: var(--gray); text-align: center; margin-top: 14px; }

/* ============ FOOTER ============ */
footer { background: var(--primary-dark); color: rgba(255,255,255,0.7); padding: 70px 0 0; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 44px; margin-bottom: 50px;
}
.footer-brand .logo { margin-bottom: 20px; }
.footer-brand .logo-text strong { color: white; }
.footer-brand .logo-ruc { color: var(--gold); }
.footer-brand .logo-text small { color: rgba(255,255,255,0.6); }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; margin-bottom: 22px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.75);
  transition: var(--transition);
}
.footer-social a:hover { background: var(--primary-light); color: white; transform: translateY(-3px); }

.footer-col h4 {
  color: white; font-family: 'Playfair Display', serif;
  font-size: 1.05rem; margin-bottom: 20px;
  position: relative; padding-bottom: 12px;
}
.footer-col h4::after {
  content: ''; position: absolute;
  bottom: 0; left: 0;
  width: 32px; height: 2px; background: var(--gold);
}
.footer-col ul { display: grid; gap: 11px; }
.footer-col ul a { font-size: 0.9rem; transition: var(--transition); display: inline-block; }
.footer-col ul a:hover { color: white; transform: translateX(4px); }

.footer-contact li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 0.9rem; color: rgba(255,255,255,0.7);
}
.footer-contact li svg { color: var(--gold); flex-shrink: 0; margin-top: 3px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 24px 0; text-align: center; font-size: 0.85rem;
}
.footer-bottom strong { color: white; }

/* ============ WHATSAPP FLOTANTE ============ */
.whatsapp-float {
  position: fixed; bottom: 28px; right: 28px;
  width: 58px; height: 58px;
  background: #25d366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; box-shadow: 0 8px 25px rgba(37,211,102,0.4);
  z-index: 999; transition: var(--transition);
  animation: whatsappPulse 2.5s infinite;
}
.whatsapp-float:hover { transform: scale(1.1); }
@keyframes whatsappPulse {
  0%, 100% { box-shadow: 0 8px 25px rgba(37,211,102,0.4); }
  50% { box-shadow: 0 8px 38px rgba(37,211,102,0.7); }
}

/* ============ BACK TO TOP ============ */
.back-to-top {
  position: fixed; bottom: 100px; right: 28px;
  width: 46px; height: 46px;
  background: var(--primary); color: white;
  border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; visibility: hidden;
  transition: var(--transition); z-index: 998;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-4px); }

/* ============ REVEAL ============ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .nav-links a { padding: 10px 10px; font-size: 13.5px; }
  .logo-text small { display: none; }
}

@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; text-align: center; }
  .hero p, .hero-buttons, .hero-stats { margin-left: auto; margin-right: auto; }
  .hero-buttons, .hero-stats { justify-content: center; }
  .about-intro { grid-template-columns: 1fr; }
  .mv-grid { grid-template-columns: 1fr; }
  .contacto-wrapper { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .galeria-preview { grid-template-columns: 1fr 1fr; grid-template-rows: 240px 240px; }
  .galeria-preview-item:first-child { grid-row: auto; }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-links {
    position: fixed; top: 0; right: -100%;
    width: 82%; max-width: 340px; height: 100vh;
    background: white; flex-direction: column;
    align-items: stretch; padding: 90px 24px 24px;
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 4px; overflow-y: auto;
  }
  .nav-links.open { right: 0; }
  .nav-links a { padding: 14px 16px; }
  .btn-cta { margin: 10px 0 0 !important; justify-content: center; }
  
  .section { padding: 60px 0; }
  .page-header { padding: 40px 0 50px; }
  .hero-stats { gap: 24px; flex-wrap: wrap; padding-top: 26px; margin-top: 32px; }
  .hero-card { left: 0; bottom: -20px; padding: 14px 18px; }
  .hero-image-wrapper img { height: 380px; }
  .servicio-full { flex-direction: column; padding: 28px; }
  .agenda-item { flex-direction: column; text-align: center; gap: 16px; }
  .agenda-btn { width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .consultas-form { padding: 30px 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .about-image img { height: 320px; }
  .topbar-info span:nth-child(2) { display: none; }
  .galeria-grid { grid-template-columns: 1fr 1fr; }
  .equipo-grid { grid-template-columns: 1fr; }
  .equipo-foto { height: 280px; }
  .lightbox-nav { width: 44px; height: 44px; }
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
}

@media (max-width: 480px) {
  .hero-buttons .btn { width: 100%; justify-content: center; }
  .container { padding: 0 18px; }
  .servicios-grid-full { grid-template-columns: 1fr; }
  .galeria-grid { grid-template-columns: 1fr; }
  .galeria-preview { grid-template-columns: 1fr; grid-template-rows: repeat(3, 220px); }
  .logo-img { height: 48px; }
  .logo-text strong { font-size: 19px; }
  .logo-text small { display: none; }
}
/* ============================================================ */
/* ============ DIRECTOR DESTACADO - DISEÑO PREMIUM =========== */
/* ============================================================ */

.director-section {
  margin-bottom: 80px;
}

.director-card {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 50px;
  background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
  border-radius: 20px;
  padding: 50px;
  box-shadow: 0 20px 60px rgba(15,36,71,0.12);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.director-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 5px;
  background: var(--gradient-primary);
}

.director-card::after {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(44,90,158,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Foto del director */
.director-foto-wrapper {
  position: relative;
  align-self: start;
  position: sticky;
  top: 100px;
}

.director-foto {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15,36,71,0.25);
  aspect-ratio: 3/4;
}

.director-foto::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(15,36,71,0.4) 100%);
  z-index: 2;
  pointer-events: none;
}

.director-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.director-card:hover .director-foto img {
  transform: scale(1.03);
}

/* Badge Director */
.director-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.95);
  color: var(--primary);
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  backdrop-filter: blur(8px);
}

.director-badge svg {
  color: var(--gold);
}

/* Info del director */
.director-info {
  padding: 10px 0;
}

.director-tag {
  display: inline-block;
  background: rgba(184,148,95,0.12);
  color: var(--gold);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.director-info h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-bottom: 8px;
  color: var(--primary-dark);
}

.director-cargo {
  display: block;
  color: var(--primary-light);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.director-especialidades {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.badge {
  display: inline-block;
  background: var(--light);
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 12.5px;
  font-weight: 500;
}

.director-bio {
  color: var(--gray);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 18px;
}

.director-bio strong {
  color: var(--primary);
  font-weight: 600;
}

.director-contacto {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.director-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  background: var(--light);
  color: var(--primary);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.director-contact-link:hover {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26,58,107,0.25);
}

.director-contact-link.director-wa {
  background: #25d366;
  color: white;
  border-color: #25d366;
}

.director-contact-link.director-wa:hover {
  background: #1eb858;
  border-color: #1eb858;
  box-shadow: 0 8px 20px rgba(37,211,102,0.35);
}

/* Separador visual antes del resto del equipo */
.equipo-separator {
  text-align: center;
  margin: 60px 0 50px;
  position: relative;
}

.equipo-separator::before,
.equipo-separator::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 140px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.equipo-separator::before { left: 0; }
.equipo-separator::after { right: 0; }

.equipo-separator span {
  display: inline-block;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-dark);
  background: white;
  padding: 0 30px;
  position: relative;
  z-index: 2;
}

/* ============================================================ */
/* ============ RESPONSIVE DIRECTOR =========================== */
/* ============================================================ */

@media (max-width: 992px) {
  .director-card {
    grid-template-columns: 1fr;
    padding: 36px 30px;
    gap: 34px;
  }

  .director-foto-wrapper {
    position: relative;
    top: 0;
    max-width: 380px;
    margin: 0 auto;
  }

  .director-foto {
    aspect-ratio: 1/1;
  }
}

@media (max-width: 768px) {
  .director-card {
    padding: 28px 22px;
  }

  .director-info h2 {
    font-size: 1.5rem;
  }

  .director-contacto {
    flex-direction: column;
  }

  .director-contact-link {
    justify-content: center;
    width: 100%;
  }

  .equipo-separator span {
    font-size: 1.2rem;
    padding: 0 20px;
  }

  .equipo-separator::before,
  .equipo-separator::after {
    width: calc(50% - 100px);
  }
}
/* ============================================================ */
/* ============ ASISTENTE IA - CENPSIA ======================== */
/* ============================================================ */

/* Pestaña destacada del asistente */
.nav-links a.nav-ia {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(0,194,178,0.1), rgba(44,90,158,0.1));
  border: 1px solid rgba(0,194,178,0.3);
  color: var(--primary) !important;
  font-weight: 600;
}
.nav-links a.nav-ia:hover {
  background: linear-gradient(135deg, rgba(0,194,178,0.2), rgba(44,90,158,0.2));
  border-color: var(--accent);
}
.nav-links a.nav-ia.active {
  background: linear-gradient(135deg, #00c2b2, #1a4d8f);
  color: white !important;
  border-color: transparent;
}
.nav-links a.nav-ia.active svg { color: white; }

/* Preview del IA en Inicio */
.ia-preview-section {
  background: linear-gradient(135deg, #0f2447 0%, #1a3a6b 100%);
  color: white;
  padding: 80px 0;
}
.ia-preview-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.ia-preview-content h2 { color: white; margin: 16px 0; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.ia-preview-content > p { color: rgba(255,255,255,0.85); font-size: 1.05rem; margin-bottom: 24px; }
.ia-preview-list {
  display: grid;
  gap: 10px;
  margin-bottom: 30px;
}
.ia-preview-list li {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
}
.ia-preview-visual { display: flex; justify-content: center; }
.ia-preview-chat-demo {
  background: white;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ia-demo-msg {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--dark);
}
.ia-demo-bot {
  background: #f4f6f9;
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}
.ia-demo-user {
  background: linear-gradient(135deg, #1a4d8f, #2c5a9e);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}
.ia-demo-typing {
  align-self: flex-start;
  background: #f4f6f9;
  padding: 12px 18px;
  border-radius: 12px;
  border-bottom-left-radius: 3px;
  display: flex;
  gap: 4px;
}
.ia-demo-typing span {
  width: 7px;
  height: 7px;
  background: #b0b8c4;
  border-radius: 50%;
  animation: iaTyping 1.4s infinite;
}
.ia-demo-typing span:nth-child(2) { animation-delay: 0.2s; }
.ia-demo-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes iaTyping {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Página completa del Asistente IA */
.page-header-ia {
  background: linear-gradient(135deg, #0f2447 0%, #1a3a6b 50%, #00c2b2 100%);
}
.section-ia { padding: 40px 0 80px; background: #f4f6f9; }

.ia-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: start;
}

/* Sidebar del asistente */
.ia-sidebar { position: sticky; top: 100px; }
.ia-sidebar-card {
  background: white;
  border-radius: 16px;
  padding: 26px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.ia-sidebar-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.ia-avatar {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, #1a4d8f, #00c2b2);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: white;
}
.ia-sidebar-header strong {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--primary-dark);
}
.ia-sidebar-header small {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gray);
  font-size: 12.5px;
  margin-top: 2px;
}
.ia-status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: #25d366;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(37,211,102,0.7);
  animation: statusPulse 2s infinite;
}
@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0.7); }
  50% { box-shadow: 0 0 0 6px rgba(37,211,102,0); }
}
.ia-sidebar-desc {
  color: var(--gray);
  font-size: 13.5px;
  margin-bottom: 14px;
}
.ia-sidebar-list {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}
.ia-sidebar-list li {
  color: var(--dark);
  font-size: 13.5px;
  padding: 6px 0;
}
.ia-sidebar-contact {
  padding: 18px;
  background: var(--light);
  border-radius: 10px;
  margin-bottom: 14px;
}
.ia-sidebar-contact p {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 10px;
}
.ia-sidebar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  background: #25d366;
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
  transition: var(--transition);
}
.ia-sidebar-btn:hover {
  background: #1eb858;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37,211,102,0.3);
}
.ia-sidebar-disclaimer {
  font-size: 12px;
  color: var(--gray-light);
  line-height: 1.5;
  text-align: center;
}

/* Chat principal */
.ia-chat-wrapper {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
  min-height: 600px;
}
.ia-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  background: linear-gradient(135deg, #1a4d8f, #2c5a9e);
  color: white;
}
.ia-chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ia-chat-avatar {
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
}
.ia-chat-header-info strong {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
}
.ia-chat-header-info small {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  margin-top: 1px;
}
.ia-btn-clear {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.ia-btn-clear:hover { background: rgba(255,255,255,0.25); }

.ia-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 22px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ia-chat-body .mensaje {
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
  max-width: 82%;
  word-wrap: break-word;
  white-space: pre-wrap;
  animation: msgFadeIn 0.3s ease;
}
@keyframes msgFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.ia-chat-body .mensaje strong { font-weight: 700; }
.ia-chat-body .usuario {
  background: linear-gradient(135deg, #1a4d8f, #2c5a9e);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.ia-chat-body .cenpsia {
  background: white;
  color: var(--dark);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(15,36,71,0.05);
}
.ia-chat-body .cargando {
  background: #fff8e1;
  color: #b78103;
  border: 1px solid #ffe082;
  align-self: flex-start;
  font-style: italic;
}
.ia-chat-body .error {
  background: #fdecea;
  color: #b71c1c;
  border: 1px solid #f5c6cb;
  align-self: flex-start;
}

/* Sugerencias */
.ia-chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 22px 0;
  background: white;
  border-top: 1px solid var(--border);
}
.ia-suggestion {
  background: var(--light);
  border: 1px solid var(--border);
  color: var(--primary);
  padding: 7px 14px;
  border-radius: 50px;
  font-size: 12.5px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.ia-suggestion:hover {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  transform: translateY(-1px);
}

/* Input del chat */
.ia-chat-input {
  display: flex;
  gap: 10px;
  padding: 14px 22px 18px;
  background: white;
  border-top: 1px solid var(--border);
  align-items: flex-end;
}
.ia-chat-input textarea {
  flex: 1;
  min-height: 44px;
  max-height: 140px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  outline: none;
  transition: var(--transition);
  background: var(--light);
  color: var(--dark);
  line-height: 1.5;
}
.ia-chat-input textarea:focus {
  border-color: var(--primary-light);
  background: white;
  box-shadow: 0 0 0 4px rgba(44,90,158,0.1);
}
.ia-btn-send {
  width: 46px;
  height: 46px;
  min-width: 46px;
  background: linear-gradient(135deg, #1a4d8f, #00c2b2);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-family: inherit;
}
.ia-btn-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26,77,143,0.35);
}
.ia-btn-send:disabled {
  background: #b0b8c4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Responsive */
@media (max-width: 992px) {
  .ia-container { grid-template-columns: 1fr; }
  .ia-sidebar { position: relative; top: 0; }
  .ia-preview-card { grid-template-columns: 1fr; text-align: center; }
  .ia-preview-content .btn { margin: 0 auto; }
  .ia-chat-wrapper { height: 70vh; min-height: 500px; }
}

@media (max-width: 768px) {
  .ia-chat-body .mensaje { max-width: 92%; font-size: 13.5px; }
  .ia-chat-suggestions { padding: 10px 16px 0; }
  .ia-chat-input { padding: 12px 16px 16px; }
  .ia-btn-clear span { display: none; }
  .nav-links a.nav-ia { background: var(--light); }
}