:root {
  --bg: #f3f4f6;
  --bg-alt: #ffffff;
  --bg-dark: #0b1120;
  --bg-darker: #020617;
  --primary: #006633;
  --primary-soft: #e0f3e7;
  --accent: #ffcc00;
  --accent-soft: #fff5cc;
  --text: #111827;
  --text-soft: #6b7280;
  --border-soft: #e5e7eb;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.09);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #ffffff 0, var(--bg) 60%, #e5e7eb 100%);
  color: var(--text);
}

/* LAYOUT BASE */

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.9);
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header-left {
  text-align: left;
}

.section-header h2 {
  font-size: 2rem;
  margin: 0.5rem 0 0.5rem;
}

.section-header p {
  margin: 0.25rem 0;
  color: var(--text-soft);
}

/* HEADER / NAV */

.main-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(55, 65, 81, 0.7);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 1.25rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: #f9fafb;
}

.logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 12px;
  background: #ffffff;
  padding: 4px;
}

.logo-texts {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

.logo-subtitle {
  font-size: 0.75rem;
  color: #9ca3af;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav a {
  text-decoration: none;
  font-size: 0.85rem;
  color: #e5e7eb;
  font-weight: 500;
}

.nav a:hover {
  color: var(--accent);
}

.nav-cta {
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: rgba(15, 23, 42, 0.9);
}

.nav-cta:hover {
  background: var(--accent);
  color: #111827;
}

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
  color: #e5e7eb;
}



/* CARRUSEL */

.carousel {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  min-width: 100%;
  height: 230px;
  display: none;
}

.carousel-slide.active {
  display: block;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(15, 23, 42, 0.7);
  color: #f9fafb;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.carousel-control.prev {
  left: 10px;
}

.carousel-control.next {
  right: 10px;
}

.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  background: rgba(248, 250, 252, 0.4);
  cursor: pointer;
}

.dot.active {
  width: 18px;
  background: var(--accent);
}

/* PEGA ESTO AL FINAL DE TU ARCHIVO CSS */
.hero-carousel {
  border-radius: 0 !important;
}

.hero-carousel .carousel-slide {
  background: transparent !important;
  opacity: 1 !important;
  display: block !important;
}

.hero-carousel .carousel-slide::before,
.hero-carousel .carousel-slide::after {
  display: none !important;
}

.hero-carousel img {
  width: 100%;
  height: 600px;
  object-fit: cover;
  display: block !important;
  opacity: 1 !important;
}

/* SOLUCIÓN TODO EN UNO - PEGA ESTO */
@media (max-width: 768px) {
  /* Reset de márgenes en toda la cadena */
  #inicio, 
  #inicio .hero, 
  #inicio .hero-carousel,
  .hero-section,
  .carousel-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 0 !important;
  }
  
  /* Carrusel responsivo */
  .hero-carousel {
  width: 100%;
  height: clamp(360px, 55vh, 1080px);
  }
  
  /* Imágenes móviles completas */
  .hero-carousel img {
    object-fit: contain !important; /* NO cover, para ver toda la imagen */
  }
  
  /* Si el problema es específico de imágenes móviles */
  .hero-carousel picture source[media="(max-width: 768px)"] + img {
    height: auto !important;
    max-height: 100%;
  }
}

/* BOTONES */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease,
    color 0.12s ease,
    border-color 0.12s ease;
}

.btn-primary {
  background: var(--primary);
  color: #f9fafb;
  box-shadow: 0 16px 38px rgba(22, 163, 74, 0.45);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 52px rgba(22, 163, 74, 0.55);
}

.btn-outline {
  background: #ffffff;
  border-color: var(--border-soft);
  color: var(--text);
}

.btn-outline:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.btn-accent {
  background: var(--accent);
  color: #111827;
  border-color: var(--accent);
}

.btn-accent:hover {
  filter: brightness(1.05);
}

.btn-whatsapp {
  background: #22c55e;
  color: #f9fafb;
  border-color: #16a34a;
  margin-top: 1rem;
}

.btn-whatsapp:hover {
  filter: brightness(1.05);
}

/* GRIDS Y CARDS */

.grid {
  display: grid;
  gap: 1.6rem;
}

.areas-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.area-card {
  position: relative;
  border-radius: 20px;
  padding: 1.6rem 1.4rem;
  background: #ffffff;
  border: 1px solid rgba(209, 213, 219, 0.8);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.area-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 102, 51, 0.06), rgba(17, 24, 39, 0.06));
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.area-card:hover::after {
  opacity: 1;
}

.area-card h3 {
  margin-top: 0.3rem;
}

.area-card p {
  font-size: 0.9rem;
  color: var(--text-soft);
}

.card-link {
  display: inline-flex;
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.card-link:hover {
  text-decoration: underline;
}

.pill {
  display: inline-flex;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.pill-green {
  background: var(--primary-soft);
  color: var(--primary);
}

.pill-yellow {
  background: var(--accent-soft);
  color: #92400e;
}

.pill-dark {
  background: #111827;
  color: #f9fafb;
}

.curso-grid {
  display: grid;
  gap: 2.2rem;
  align-items: flex-start;
}

.three-columns {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.4rem;
  border: 1px solid rgba(209, 213, 219, 0.9);
}

.card-glass {
  background: rgba(15, 23, 42, 0.4);
  border-color: rgba(148, 163, 184, 0.7);
  color: #e5e7eb;
  backdrop-filter: blur(12px);
}

/* SECCIÓN OSCURA CURSO DESTACADO */

.section-dark {
  background: radial-gradient(circle at top left, #111827 0, #020617 55%, #000000 100%);
  color: #e5e7eb;
}

.section-dark h2,
.section-dark h3 {
  color: #f9fafb;
}

.section-dark p {
  color: #d1d5db;
}

.curso-subtitle {
  margin-bottom: 1rem;
}

.curso-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.8rem;
  margin: 1rem 0 1.4rem;
}

.curso-meta span {
  background: rgba(15, 23, 42, 0.8);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.8);
}

/* CHECKLIST */

.checklist {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.checklist li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
}

.checklist li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 0.05rem;
  font-size: 0.8rem;
  color: var(--primary);
}

.checklist-light li::before {
  color: var(--accent);
}

/* FRASES / QUOTES */

.quotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.3rem;
  margin-top: 2rem;
}

.quote {
  margin: 0;
  padding: 1.2rem 1.4rem;
  border-left: 3px solid var(--primary);
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.quote blockquote {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
}

.quote figcaption {
  font-size: 0.8rem;
  color: var(--text-soft);
}

/* FAQ */

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-list details {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  border: 1px solid var(--border-soft);
  margin-bottom: 0.75rem;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 500;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list p {
  margin-top: 0.45rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

/* CTA SECTION OSCURA */

.section-cta {
  background: linear-gradient(135deg, #020617, #111827);
  color: #f9fafb;
}

.section-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* CONTACTO */

.contacto-section {
  background: rgba(255, 255, 255, 0.94);
}

.contacto-grid {
  display: grid;
  gap: 2rem;
}

.contact-form {
  background: #0b1120;
  border-radius: 22px;
  padding: 1.8rem 1.6rem;
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.75);
  color: #e5e7eb;
}

.contact-form h3 {
  margin-top: 0;
  margin-bottom: 1.1rem;
}

.contact-form label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-family: inherit;
  font-size: 0.9rem;
  background: rgba(15, 23, 42, 0.7);
  color: #f9fafb;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  margin-top: 0.4rem;
}

.checkbox input {
  width: auto;
}

.contact-info h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
}

.contact-info p {
  margin: 0.2rem 0;
  font-size: 0.9rem;
}

/* FOOTER */

.main-footer {
  border-top: 1px solid #111827;
  padding: 1.5rem 0;
  background: #020617;
  font-size: 0.8rem;
  color: #9ca3af;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

/* RESPONSIVE */

@media (min-width: 860px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
  }

  .curso-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }

  .contacto-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
  }
}

@media (max-width: 820px) {
  .hero {
    padding-top: 3.25rem;
  }

  .hero-text h1 {
    font-size: 2.1rem;
  }

  .carousel-slide {
    height: 210px;
  }

  .section-cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .nav {
    position: absolute;
    inset: 54px 0 auto 0;
    background: rgba(15, 23, 42, 0.98);
    border-bottom: 1px solid rgba(55, 65, 81, 0.7);
    flex-direction: column;
    padding: 0.75rem 1.25rem 1.25rem;
    display: none;
  }

  .nav.show {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }
}
/* ANIMACIONES */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

/* HEADER SCROLL */
.main-header {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ERRORES FORMULARIO */
.error-message {
  display: block;
  font-size: 0.75rem;
  color: #ef4444 !important;
  margin-top: 0.25rem;
}

.contact-form input.error,
.contact-form textarea.error {
  border-color: #ef4444 !important;
}

/* MENÚ MÓVIL MEJORADO */
@media (max-width: 720px) {
  .nav.show {
    animation: slideDown 0.3s ease;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .nav-toggle[aria-expanded="true"] {
    color: var(--accent);
  }
}

/* LOADING STATE */
.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* MEJORAS DE ACCESIBILIDAD */
:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* FAQ ACCESIBLE */
.faq-list details[open] summary {
  color: var(--primary);
}

.faq-list summary {
  position: relative;
  padding-right: 1.5rem;
}

.faq-list summary::after {
  content: "▼";
  position: absolute;
  right: 0;
  top: 0;
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.faq-list details[open] summary::after {
  transform: rotate(180deg);
}

/* ============ LAYOUT MEJORADO PARA PANTALLAS GRANDES ============ */

.container {
  width: 100%;
  max-width: 1400px; /* Aumentado de 1120px */
  margin: 0 auto;
  padding: 0 2rem;
}

/* Para pantallas EXTRA grandes (más de 1600px) */
@media (min-width: 1600px) {
  .container {
    max-width: 1500px;
    padding: 0 3rem;
  }
  
  .hero-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 4rem;
  }
}


/* SECCIÓN CURSO DESTACADO - FULL BACKGROUND */
.section-dark {
  position: relative;
  overflow: hidden;
}

.section-dark::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -10%;
  width: 40%;
  height: 120%;
  background: radial-gradient(circle at center, rgba(255, 204, 0, 0.08), transparent 70%);
  z-index: 0;
}

.section-dark .container {
  position: relative;
  z-index: 1;
}

/* SECCIÓN CTA - EXTENDIDA */
.section-cta {
  position: relative;
  overflow: hidden;
}

.section-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 80% 20%, rgba(255, 204, 0, 0.1), transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(0, 102, 51, 0.1), transparent 40%);
  z-index: 0;
}

.section-cta-inner {
  position: relative;
  z-index: 1;
}

/* ============ MEJORAS DE ESPACIADO ============ */

/* Aumentar padding en pantallas grandes */
@media (min-width: 1024px) {
  .nav-container {
    padding: 0.75rem 2rem;
  }
  
  .nav {
    gap: 2rem;
  }
  
  .nav a {
    font-size: 0.95rem;
  }
}

/* Mejorar jerarquía tipográfica en desktop */
@media (min-width: 1024px) {
  .section-header h2 {
    font-size: 2.5rem;
  }
  
  .section-header p {
    font-size: 1.1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ============ MEJORAS PARA PANTALLAS MUY GRANDES (4K) ============ */

@media (min-width: 2000px) {
  .container {
    max-width: 1800px;
  }
  
  .hero-text h1 {
    font-size: 3.8rem;
  }
  
  .carousel-slide {
    height: 450px;
  }
  
  .areas-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
  
  .area-card {
    padding: 2.5rem 2rem;
  }
  
  .area-card h3 {
    font-size: 1.5rem;
  }
  
  .area-card p {
    font-size: 1.05rem;
  }
}

/* ============ UTILIDADES PARA ESPACIADO ============ */

.full-width-container {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 4rem 0;
}

/* Opcional: Si quieres que el hero ocupe todo el ancho en desktop */
@media (min-width: 1400px) {
  .hero .container {
    max-width: 95%;
  }
}
/* ============ CARRUSEL MÁS GRANDE EN PANTALLAS GRANDES ============ */

/* Para pantallas medianas (tablets) */
@media (min-width: 768px) {
  .carousel-slide {
    height: 280px; /* Aumentado de 230px */
  }
  
  .hero-card {
    padding: 1.3rem 1.3rem 1.5rem;
  }
}

/* Para laptops y desktops */
@media (min-width: 1024px) {
  .carousel-slide {
    height: 320px; /* Más grande */
  }
  
  .carousel {
    border-radius: 24px; /* Bordes más redondeados */
  }
  
  .hero-card {
    padding: 1.5rem 1.5rem 1.8rem;
    border-radius: 28px; /* Más redondeado */
  }
  
  /* Controles del carrusel más grandes */
  .carousel-control {
    width: 42px;
    height: 42px;
    font-size: 1.4rem;
  }
  
  .dot {
    width: 10px;
    height: 10px;
  }
  
  .dot.active {
    width: 22px;
  }
}

/* Para pantallas grandes (desktops amplios) */
@media (min-width: 1280px) {
  .carousel-slide {
    height: auto; /* Aún más grande */
  }
  
  /* Hacer que el carrusel ocupe más espacio relativo */
  .hero-media {
    position: relative;
  }
  
  .hero-card {
    transform: scale(1.05);
    margin-left: 1rem;
  }
  
  /* Sombra más pronunciada para destacar */
  .hero-card {
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.95);
  }
}

/* Para pantallas extra grandes (4K, monitores grandes) */
@media (min-width: 1536px) {
  .carousel-slide {
    height: auto; /* Máximo tamaño */
  }
  
  .hero-card {
    padding: 1.8rem 1.8rem 2rem;
    border-radius: 32px;
  }
  
  /* Hacer que el carrusel "flote" más */
  .hero-card {
    position: relative;
    z-index: 2;
    transform: scale(1.08);
    margin-left: 1.5rem;
  }
  
  /* Efecto de brillo extra */
  .hero-card::before {
    inset: -50%;
    background:
      radial-gradient(circle at top left, rgba(34, 197, 94, 0.25), transparent 60%),
      radial-gradient(circle at bottom right, rgba(250, 204, 21, 0.25), transparent 55%);
  }
}

/* ============ EFECTO DE DESTAQUE ESPECIAL ============ */

/* Solo para pantallas donde queremos el efecto especial */
@media (min-width: 1280px) {
  .hero-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .hero-card:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 
      0 40px 100px rgba(15, 23, 42, 0.98),
      0 0 0 1px rgba(255, 204, 0, 0.2); /* Borde sutil dorado */
  }
  
  /* Animación sutil de flotación */
  @keyframes float {
    0%, 100% { transform: scale(1.05) translateY(0); }
    50% { transform: scale(1.05) translateY(-10px); }
  }
  
  /* Aplicar animación solo si no hay hover */
  .hero-card:not(:hover) {
    animation: float 6s ease-in-out infinite;
  }
}

/* ============ AJUSTES PARA EL TEXTO DEL CARRUSEL ============ */

@media (min-width: 1024px) {
  .hero-card-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }
  
  .hero-card-info p {
    font-size: 0.9rem;
    line-height: 1.5;
  }
}

@media (min-width: 1280px) {
  .hero-card-info {
    margin-top: 1.2rem;
  }
  
  .hero-card-info h3 {
    font-size: 1.2rem;
  }
  
  .hero-card-info p {
    font-size: 0.95rem;
  }
}

/* ============ MEJORAS DE CONTRASTE Y VISIBILIDAD ============ */

@media (min-width: 1024px) {
  .carousel-slide img {
    filter: brightness(1.05); /* Imágenes un poco más brillantes */
    transition: filter 0.3s ease;
  }
  
  .carousel-slide.active img {
    filter: brightness(1.1); /* Slide activo más brillante */
  }
  
  /* Overlay sutil para mejorar legibilidad del texto sobre imágenes */
  .carousel-slide::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
    pointer-events: none;
  }
}

/* ============ RESPONSIVE PARA DISPOSITIVOS PEQUEÑOS (mantener como está) ============ */

@media (max-width: 767px) {
  /* Mantener el tamaño original en móviles */
  .carousel-slide {
    height: 230px;
  }
  
  .hero-card {
    padding: 1.1rem 1.1rem 1.3rem;
  }
}

/* ============ ESTILOS PARA VIDEOS EN CARRUSEL ============ */

.carousel-slide {
  position: relative;
  overflow: hidden;
}

.carousel-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000; /* Fondo negro mientras carga */
}

/* Captiones para slides */
.slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
  padding: 1.5rem 1rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  z-index: 2;
}

/* Controles de video */
.video-control {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.9;
}

.video-control:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: white;
  transform: translate(-50%, -50%) scale(1.1);
  opacity: 1;
}

/* Ocultar el ícono de pausa inicialmente */
.pause-icon {
  display: none;
}

/* Cuando el video está reproduciéndose */
.carousel-slide[data-playing="true"] .play-icon {
  display: none;
}

.carousel-slide[data-playing="true"] .pause-icon {
  display: inline;
}

.carousel-slide[data-playing="true"] .video-control {
  opacity: 0.6;
}

.carousel-slide[data-playing="true"] .video-control:hover {
  opacity: 1;
}

/* Indicador de que es un video */
.carousel-slide[data-type="video"]::before {
  content: "VIDEO";
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent);
  color: #111827;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  z-index: 2;
  opacity: 0.9;
}

/* Loading state para videos */
.carousel-video.loading {
  filter: blur(5px);
}

/* Mejores controles para móviles */
@media (max-width: 767px) {
  .video-control {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .slide-caption {
    font-size: 0.8rem;
    padding: 1rem 0.75rem 0.5rem;
  }
}

/* Para desktop - controles más grandes */
@media (min-width: 1024px) {
  .video-control {
    width: 70px;
    height: 70px;
    font-size: 1.8rem;
  }
  
  .slide-caption {
    font-size: 1rem;
    padding: 2rem 1rem 1rem;
  }
  
  .carousel-slide[data-type="video"]::before {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
  }
}

/* Mejoras para las tarjetas de área */
.area-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Efecto de elevación al hover */
.area-card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 20px 40px rgba(15, 23, 42, 0.15),
    0 0 0 1px rgba(0, 102, 51, 0.1);
}

/* Línea decorativa inferior */
.area-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.4s ease;
}

.area-card:hover::before {
  width: 100%;
}

/* Efecto de fondo sutil al hover */
.area-card:hover::after {
  opacity: 0.8;
}

/* Agregar íconos */
.area-card {
  padding-left: 4rem; /* Espacio para el ícono */
  position: relative;
}

.area-icon {
  position: absolute;
  left: 1.4rem;
  top: 1.6rem;
  width: 32px;
  height: 32px;
  background: var(--primary-soft);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.area-card:hover .area-icon {
  transform: scale(1.1) rotate(5deg);
  background: var(--primary);
  color: white;
}

/* Colores específicos por área */
.area-card[data-area="salud"] .area-icon {
  background: var(--primary-soft);
  color: var(--primary);
}

.area-card[data-area="criminalistica"] .area-icon {
  background: rgba(15, 23, 42, 0.1);
  color: var(--bg-darker);
}

.area-card[data-area="tecnologia"] .area-icon {
  background: rgba(30, 58, 138, 0.1);
  color: #1e3a8a;
}

/* Grid adaptable */
.areas-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

@media (min-width: 1024px) {
  .areas-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1400px) {
  .areas-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
  
  .area-card {
    padding: 2.2rem 2rem 2.2rem 5rem; /* Más espacio para ícono */
  }
}



/* ============ FILTRO DE ÁREAS ============ */
.areas-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 2.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
}

.filter-btn {
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border-soft);
  background: white;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ============ METADATOS DE ÁREAS ============ */
.area-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.2rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.meta-icon {
  font-size: 1rem;
}

/* ============ BOTONES DENTRO DE ÁREAS ============ */
.area-cta {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.btn-small {
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
}

/* ============ TOOLTIPS ============ */
.area-tooltip {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  z-index: 10;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  border: 1px solid var(--border-soft);
}

.area-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.area-tooltip h4 {
  margin-top: 0;
  margin-bottom: 0.8rem;
  color: var(--primary);
}

.tooltip-link {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.tooltip-link:hover {
  text-decoration: underline;
}

/* ============ ANIMACIONES DE FILTRO ============ */
.area-card {
  transition: 
    opacity 0.4s ease,
    transform 0.4s ease,
    box-shadow 0.3s ease;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 767px) {
  .areas-filter {
    gap: 0.5rem;
    padding: 0.8rem;
  }
  
  .filter-btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
  }
  
  .area-cta {
    flex-direction: column;
  }
  
  .area-meta {
    gap: 0.8rem;
  }
}

@media (min-width: 1024px) {
  .area-card {
    min-height: 280px;
    display: flex;
    flex-direction: column;
  }
  
  .area-description {
    flex-grow: 1;
  }
}

/* ============ TARJETAS CON FOTOS CIRCULARES ============ */

.area-card {
  display: flex;
  flex-direction: column;
  padding: 1.8rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.area-image-container {
  position: relative;
  margin-bottom: 1.5rem;
  text-align: center;
}

.area-image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: all 0.4s ease;
}

.area-card:hover .area-image {
  transform: scale(1.05);
  box-shadow: 0 12px 35px rgba(0, 102, 51, 0.25);
}

/* Pill sobre la imagen */
.area-image-container .pill {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.area-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.area-content h3 {
  margin-top: 0;
  margin-bottom: 0.8rem;
  text-align: center;
  font-size: 1.3rem;
}

.area-description {
  margin-bottom: 1.2rem;
  line-height: 1.5;
  flex-grow: 1;
}

.area-meta {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

.area-cta {
  text-align: center;
}

/* Efecto hover mejorado */
.area-card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 20px 40px rgba(15, 23, 42, 0.15),
    0 0 0 1px rgba(0, 102, 51, 0.1);
}

/* ESTILOS MEJORADOS PARA HERO */
.hero-logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(0, 82, 204, 0.1) 0%, rgba(0, 82, 204, 0.05) 100%);
  border-radius: 16px;
  border-left: 4px solid var(--primary);
  max-width: 400px;
}

.hero-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.hero-logo-text {
  display: flex;
  flex-direction: column;
}

.hero-logo-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.hero-logo-subtitle {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
}

.eyebrow-badge {
  font-size: 1.2rem;
  margin-right: 0.5rem;
}

.hero-title {
  font-size: 3.2rem;
  line-height: 1.2;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hero-title-line {
  display: block;
}

.hero-title-highlight {
  position: relative;
  display: inline-block;
  padding: 0.5rem 1rem;
}

.highlight-text {
  position: relative;
  z-index: 2;
  color: white;
  font-weight: 700;
  background: linear-gradient(90deg, var(--primary), #0055cc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.highlight-underline {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(90deg, var(--primary), #0055cc);
  border-radius: 4px;
  opacity: 0.3;
  z-index: 1;
}

.hero-subtitle {
  font-size: 1.2rem;
  line-height: 1.6;
  margin: 1.5rem 0;
  color: var(--text);
}

.hero-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0.25rem;
}

/* Botones del Hero mejorados */
.btn-hero {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 82, 204, 0.3);
}

.btn-icon {
  font-size: 1.3rem;
}

/* Estadísticas mejoradas */
.hero-stats-enhanced {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 82, 204, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 82, 204, 0.15);
}

.stat-number-wrapper {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-plus {
  font-size: 1.2rem;
  color: var(--text-light);
  font-weight: 600;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
  line-height: 1.4;
}

/* Badge de garantía */
.hero-badge-guarantee {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #e8f4ff, #ffffff);
  border-radius: 12px;
  border: 2px solid var(--primary-light);
  margin-top: 1rem;
}

.badge-icon {
  font-size: 1.5rem;
  color: var(--success);
}

.badge-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

/* Hero card mejorado */
.hero-card-enhanced {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  position: relative;
}

.hero-card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: linear-gradient(90deg, #ff6b6b, #ff8e53);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 10;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.video-placeholder-enhanced {
  position: relative;
  height: 100%;
  min-height: 300px;
  overflow: hidden;
  border-radius: 8px;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 2;
}

.video-overlay p {
  margin-top: 1rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.hero-card-info-enhanced {
  padding: 2rem;
  background: linear-gradient(135deg, #f8faff, #ffffff);
}

.card-info-title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.info-icon {
  font-size: 1.6rem;
}

.card-info-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.card-info-features {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: white;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.feature-icon {
  font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-logo-container {
    padding: 0.75rem;
    max-width: 100%;
  }
  
  .hero-logo {
    width: 60px;
    height: 60px;
  }
  
  .hero-logo-title {
    font-size: 1.4rem;
  }
  
  .hero-stats-enhanced {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .btn-hero {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    width: 100%;
    justify-content: center;
  }
  
  .hero-ctas {
    flex-direction: column;
    gap: 1rem;
  }
}
/* =========================================================
   HEADER - Opción 3 (Subrayado dinámico bajo el logo)
========================================================= */
.main-header.header--underline .logo{
  position: relative;
  padding: .35rem .2rem .7rem; /* un pelín más para que el subrayado respire */
}

.main-header.header--underline .logo::after{
  content:"";
  position:absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #006633, #ffcc00);
  opacity: .85;
  transform-origin: left;
  animation: underlineSweep 3.2s ease-in-out infinite;
}

@keyframes underlineSweep{
  0%,100% { transform: scaleX(.35); filter: blur(.2px); }
  50%     { transform: scaleX(1);   filter: blur(0); }
}

/* Evitamos duplicado: define SOLO una vez el logo-img */
.main-header.header--underline .logo-img{
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.35));
}

.logo-title{
  font-weight: 800;
  letter-spacing: .10em;
}

/* Accesibilidad: si el usuario prefiere menos movimiento */
@media (prefers-reduced-motion: reduce){
  .main-header.header--underline .logo::after{
    animation: none;
    transform: scaleX(1);
    filter: none;
  }
}


/* =========================================================
   HERO + CARRUSEL FULL WIDTH (DESDE CERO)
========================================================= */

.hero{
  position: relative;
  width: 100%;
    height:100%;
  overflow: hidden;
}


/* =========================================================
   CARRUSEL CON ALTURA DINÁMICA (NO FIXED)
========================================================= */

.hero-carousel {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #0b1120;
  border: 1px solid rgba(148, 163, 184, 0.35);
  /* ELIMINADO: height: 100% */
border-radius:0px;
}

.carousel-viewport {
  width: 100%;
  /* ELIMINADO: height: 100% */
  overflow: hidden;
}

/* Track se ajusta a la altura de la imagen actual */
.hero-carousel .carousel-track {
  display: flex;
  width: 100%;
  /* ELIMINADO: height: 100% */
  will-change: transform;
  transition: transform .6s ease;
  align-items: flex-start; /* Evita estiramiento vertical */
}

/* Slide ocupa el ancho completo, altura automática */
.hero-carousel .carousel-slide {
  flex: 0 0 100%;
  position: relative;
  overflow: hidden;
  background: #0b1120;
  /* ELIMINADO: aspect-ratio fijo */
  /* ELIMINADO: height: 100% */
  min-height: 300px; /* Altura mínima de respaldo */
}

/* Contenedor interno que mantiene proporción de imagen */
.slide-inner {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 por defecto, se ajustará con JS */
}

/* Fondo blur (manteniendo proporción) */
.hero-carousel .carousel-slide::before {
  content: "";
  position: absolute;
  inset: -14%;
  background-image: var(--bg-desktop);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(18px) brightness(.85);
  transform: translateZ(0) scale(1.15);
  z-index: 0;
  /* Aseguramos que siga la proporción de la imagen */
  padding-bottom: inherit;
}

/* Overlay oscuro */
.hero-carousel .carousel-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,.38),
    rgba(0,0,0,.28)
  );
  z-index: 1;
  pointer-events: none;
}

/* Imagen principal en CONTAIN - altura natural */
.hero-carousel picture {
  position: relative;
  display: block;
  width: 100%;
}

.hero-carousel img {
  width: 100%;
  height: auto; /* Altura automática según proporción */
  display: block;
  object-fit: contain; /* Mantiene proporción sin recortar */
  object-position: center center;
  z-index: 2;
  position: relative;
}

/* Caption se ajusta al final de la imagen */
.hero-carousel .slide-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 1.15rem 1rem .85rem;
  color: rgba(255,255,255,.95);
  font-size: .95rem;
  font-weight: 500;
  text-align: center;
  background: linear-gradient(to top, rgba(0,0,0,.72), transparent);
}

/* Controles siempre visibles sobre la imagen */
.hero-carousel .carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(15, 23, 42, 0.7);
  color: #f9fafb;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.hero-carousel .carousel-control.prev { left: 12px; }
.hero-carousel .carousel-control.next { right: 12px; }

.hero-carousel .carousel-control:hover {
  background: rgba(15, 23, 42, 0.9);
}

/* Dots se posicionan relativos al carrusel */
.hero-carousel .carousel-dots {
  position: absolute;
  bottom: 20px; /* Ajustado para altura dinámica */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .45rem;
  z-index: 6;
}

.hero-carousel .dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: none;
  background: rgba(248, 250, 252, 0.45);
  cursor: pointer;
}

.hero-carousel .dot.active {
  width: 22px;
  background: var(--accent);
}

/* MÓVIL: ajustes específicos */
@media (max-width: 768px) {
  .hero-carousel .carousel-slide {
    min-height: 250px; /* Altura mínima menor en móvil */
  }
  
  .hero-carousel .carousel-slide::before {
    background-image: var(--bg-mobile);
    filter: blur(14px) brightness(.85);
    inset: -18%;
  }
  
  .hero-carousel .carousel-control {
    width: 40px;
    height: 40px;
    font-size: 1.35rem;
  }
  
  .hero-carousel .slide-caption {
    font-size: .9rem;
    padding: 1rem .85rem .75rem;
  }
  
  .hero-carousel .carousel-dots {
    bottom: 15px;
  }
}

/* Para pantallas muy altas */
@media (min-height: 900px) {
  .hero-carousel .carousel-slide {
    min-height: 400px;
  }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .hero-carousel .carousel-track {
    transition: none;
  }
}