/* ===== VARIABLES Y RESET ===== */
:root {
  --primary: #610606;
  --primary-dark: #4a0505;
  --black: #1a1a1a;
  --white: #ffffff;
  --gray-light: #f8f8f8;
  --gray: #666666;
  --accent: #610606;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Raleway', sans-serif;
  line-height: 1.6;
  color: var(--black);
  overflow-x: hidden;
  font-weight: 400;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: var(--white);
  padding: 8px;
  text-decoration: none;
  z-index: 10000;
  font-weight: 500;
}

.skip-link:focus {
  top: 0;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: var(--transition);
  background: transparent;
}

.header.scrolled {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  padding: 1rem 0;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  font-size: 1.4rem;
  transition: var(--transition);
  line-height: 1.2;
}

.header.scrolled .brand {
  color: var(--black);
}

.brand-logo {
  margin-right: 12px;
  flex-shrink: 0;
}

.brand-text {
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand-slogan {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary);
  display: block;
  margin-top: 2px;
}

.header.scrolled .brand-slogan {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  font-size: 0.95rem;
}

.header.scrolled .nav-link {
  color: var(--black);
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: var(--transition);
}

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

/* ===== BOTONES ===== */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0;
  transition: var(--transition);
  border: 2px solid transparent;
  font-family: 'Raleway', sans-serif;
  cursor: pointer;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.header.scrolled .btn-outline {
  color: var(--black);
  border-color: var(--black);
}

.header.scrolled .btn-outline:hover {
  background: var(--black);
  color: var(--white);
}

.btn-bordered {
  border: 2px solid var(--white) !important;
}

.btn-block {
  display: block;
  text-align: center;
  width: 100%;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.header.scrolled .menu-btn {
  color: var(--black);
}

/* ===== HERO SECTION ===== */
.hero-executive {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('/assets/images/hero-bg.jpg') center/cover;
  color: var(--white);
  text-align: center;
  padding: 120px 20px 80px;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.title-line {
  display: block;
}

.title-accent {
  color: var(--primary);
  position: relative;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
  font-weight: 400;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
  flex: 1;
  min-width: 300px;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1rem;
  line-height: 1;
}

.stat-label {
  font-size: 1rem;
  opacity: 0.9;
  line-height: 1.5;
}

.stat-label strong {
  color: var(--white);
  font-weight: 600;
}

/* ===== NAVEGACIÓN SUAVE - NUEVO ===== */
/* Asegurar que las secciones sean detectables correctamente */
section[id] {
  scroll-margin-top: 100px;
}

@media (max-width: 768px) {
  section[id] {
    scroll-margin-top: 80px;
  }
}

/* ===== SECTIONS ===== */
.section {
  padding: 5rem 0;
}

.section-light {
  background: var(--white);
}

.section-gray {
  background: var(--gray-light);
}

.section-dark {
  background: var(--black);
  color: var(--white);
}

.section-primary {
  background: var(--primary);
  color: var(--white);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header.centered {
  text-align: center;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--black);
}

.section-dark .section-header h2,
.section-primary .section-header h2 {
  color: var(--white);
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto;
}

.section-dark .section-subtitle,
.section-primary .section-subtitle {
  color: var(--white);
  font-weight: 400;
  opacity: 0.95;
}

/* ===== PROGRAMAS ===== */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.program-card {
  background: var(--white);
  border: 1px solid #eee;
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.program-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.program-card.featured {
  border-color: var(--primary);
}

.program-badge {
  position: absolute;
  top: -10px;
  right: 20px;
  background: var(--primary);
  color: var(--white);
  padding: 5px 15px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.program-image {
  margin-bottom: 1.5rem;
}

.program-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.program-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--black);
}

.program-description {
  color: var(--gray);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  flex-grow: 1;
}

.program-button {
  margin-top: auto;
}

/* ===== DIFFERENTIATORS ===== */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.diff-card {
  background: var(--white);
  padding: 2.5rem 2rem;
  border: 1px solid #eee;
  text-align: center;
  transition: var(--transition);
}

.diff-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.diff-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diff-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--black);
}

.diff-card p {
  color: var(--gray);
  line-height: 1.6;
}

/* ===== LABORATORIO ===== */
.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.lab-card {
  background: var(--white);
  border: 1px solid #eee;
  padding: 2rem;
  transition: var(--transition);
}

.lab-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.lab-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--black);
}

.lab-content {
  margin-bottom: 2rem;
}

.lab-content p {
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.lab-summary {
  font-style: italic;
  color: var(--primary);
  margin-bottom: 1rem;
  font-weight: 500;
}

/* ===== TESTIMONIALS ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background: var(--white);
  border: 1px solid #eee;
  padding: 2rem;
  transition: var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.testimonial-content {
  margin-bottom: 2rem;
}

.testimonial-content p {
  font-style: italic;
  color: var(--gray);
  line-height: 1.6;
  font-size: 1.1rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.author-name {
  font-weight: 700;
  color: var(--black);
}

.author-role {
  color: var(--gray);
  font-size: 0.9rem;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
  background: var(--primary);
  color: var(--white);
}

.contact-card {
  background: var(--primary);
  padding: 4rem;
  text-align: center;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
}

.contact-card h2 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.contact-card > p {
  font-size: 1.3rem;
  margin-bottom: 3rem;
  color: var(--white);
  font-weight: 400;
  line-height: 1.6;
  opacity: 0.95;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-group {
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--white);
  font-size: 1rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.15);
  color: var(--white);
  font-family: 'Raleway', sans-serif;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input::placeholder {
  color: rgba(255,255,255,0.7);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--white);
  background: rgba(255,255,255,0.2);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.2);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--black);
  color: var(--white);
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand .brand {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-tagline {
  color: #ccc;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.link-group h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--white);
}

.link-group a {
  display: block;
  color: #ccc;
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: var(--transition);
  font-size: 0.9rem;
}

.link-group a:hover {
  color: var(--white);
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.contact-item i {
  width: 16px;
  text-align: center;
}

.whatsapp-link {
  color: #ccc;
  text-decoration: none;
  transition: var(--transition);
}

.whatsapp-link:hover {
  color: #25D366;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.copyright {
  color: #ccc;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .nav-link {
    color: var(--black);
    padding: 0.5rem 0;
  }
  
  .menu-btn {
    display: block;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-stats {
    flex-direction: column;
  }
  
  .stat {
    min-width: 100%;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .contact-card {
    padding: 2.5rem;
  }
  
  .contact-card h2 {
    font-size: 2.2rem;
  }
  
  .contact-card > p {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .programs-grid {
    grid-template-columns: 1fr;
  }
  
  .lab-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-card {
    padding: 2rem;
  }
  
  .contact-card h2 {
    font-size: 1.8rem;
  }
  
  .contact-card > p {
    font-size: 1rem;
  }
}

/* Estilos para el mapa interactivo */
.mapa-interactivo {
  position: relative;
  width: 100%;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  padding: 1rem;
}

.mapa-svg {
  width: 100%;
  height: auto;
  display: block;
}

.pais {
  transition: all 0.3s ease;
  cursor: pointer;
}

.pais-silhouette {
  transition: all 0.3s ease;
}

.pais:hover .pais-silhouette,
.pais.active .pais-silhouette {
  fill: #fff3f3;
  stroke: #610606;
  stroke-width: 2;
  filter: drop-shadow(0 2px 4px rgba(97, 6, 6, 0.2));
}

.pais:hover .pais-nombre,
.pais.active .pais-nombre {
  fill: #610606;
  font-weight: 700;
}

.mapa-leyenda {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.leyenda-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--gray);
}

.leyenda-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

/* Efecto en la lista de países */
.paises-list li {
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.paises-list li:hover,
.paises-list li.active {
  background-color: #fff3f3;
  color: var(--primary);
}

.paises-list li:hover i,
.paises-list li.active i {
  color: var(--primary);
}