/* ============================================
   ITM de México - Landing Page Styles
   Organizado por secciones y funcionalidad
   ============================================ */

/* ============================================
   0. CSS VARIABLES
   ============================================ */

:root {
  --brand: #282762;      /* azul oscuro */
  --brand-600: #D10101;  /* rojo */
  --accent: #E95B26;     /* naranja */
  --ink: #282762;        /* texto principal */
  --muted: #6B6B8D;      /* gris azulado para textos secundarios */
  --bg: #F8F8FF;         /* fondo claro */
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

/* ============================================
   1. GLOBAL & BODY
   ============================================ */

/* Smooth scroll solo en desktop para mejor rendimiento */
@media (min-width: 1024px) {
  html {
    scroll-behavior: smooth;
  }
}

/* ============================================
   2. HEADER & NAVBAR
   ============================================ */

/* Navegación: fuente más gruesa y blanca */
nav a {
  font-weight: 700;
  color: #fff !important;
  transition: color 0.3s;
  font-family: 'Poppins', 'Inter', Arial, sans-serif;
  letter-spacing: 0.01em;
}

header.solid-navbar nav a:not([href*="contacto"]) {
  color: var(--ink) !important;
}

header.solid-navbar nav a[href*="contacto"] {
  color: white !important;
}

nav a:hover {
  color: var(--accent) !important;
}

/* Navbar sólido con efecto glassmorphism */
header.solid-navbar {
  background: rgba(255,255,255,0.85) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px 0 rgba(40,39,98,0.04);
  backdrop-filter: blur(8px);
  margin-top: 0 !important;
  opacity: 1;
  z-index: 99 !important;
  transition: background 0.18s cubic-bezier(0.4,0,0.2,1), border 0.18s cubic-bezier(0.4,0,0.2,1), box-shadow 0.18s cubic-bezier(0.4,0,0.2,1);
  padding-bottom: 0.25rem !important;
}

header.transparent-navbar {
  transition: none !important;
}

@keyframes navbar-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Logo grande en navbar transparente, normal en sólido */
.main-logo {
  transition: height 0.3s cubic-bezier(0.4,0,0.2,1), max-width 0.3s cubic-bezier(0.4,0,0.2,1);
  height: 80px;
  max-width: 220px;
}

header.transparent-navbar .main-logo {
  transition: none;
  height: 120px;
  max-width: 320px;
}

header.solid-navbar .main-logo {
  height: 50px;
  max-width: 140px;
}

/* Navbar transparente sobre hero, sólido al hacer scroll */
header.transparent-navbar {
  background: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  margin-top: 32px !important;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.3s, border 0.3s, box-shadow 0.3s, margin-top 0.3s;
}

/* Fondo del logo solo en modo hero/navbar transparente */
.logo-bg {
  background: rgba(255,255,255,0.85);
  border-radius: 16px;
  padding: 4px 20px 4px 1px;
  display: inline-block;
  transition: background 0.3s;
}

header.solid-navbar .logo-bg {
  background: none;
  padding: 0;
}

/* Botón Contacto en navbar */
nav a[href="#contacto"].text-white {
  background: #E95B26 !important;
  color: #fff !important;
  transition: background 0.2s, color 0.2s;
}

nav a[href="#contacto"].text-white:hover {
  background: #c96a1a !important;
  color: #E95B26 !important;
}

header.transparent-navbar nav a[href="#contacto"].text-white,
header.transparent-navbar nav a[href="#contacto"].text-white:hover {
  color: #fff !important;
}

/* ============================================
   3. HERO SECTIONy
   ============================================ */

.inicio-section {
  padding-top: 70px;
  padding-bottom: 30px;
}

/* Quitar contorno negro en el botón Cotiza tu proyecto */
#inicio .no-hero-outline,
#inicio .no-hero-outline * {
  text-shadow: none !important;
}

/* Contorno negro para todo el texto del hero section */
#inicio .hero-text-outline,
#inicio .hero-text-outline * {
  text-shadow: none !important;
}

/* Sombra extra en el fondo del hero section desde arriba */
#inicio .hero-gradient-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(40,39,98,0.95) 0%, rgba(40,39,98,0.45) 60%, rgba(40,39,98,0.18) 85%, rgba(40,39,98,0) 100%);
}

/* Hero overlay */
.hero-overlay {
  background: rgba(40,39,98,0.85);
}

/* Sombra interna para efecto de foco en hero */
#inicio {
  position: relative;
  z-index: 1;
}

#inicio::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: none;
  background: radial-gradient(ellipse at center, rgba(40,39,98,0) 55%, rgba(40,39,98,0.45) 100%);
  transition: background 0.3s;
}

/* ============================================
   4. CARRUSELES
   ============================================ */

/* ============================================
   4.1 CARRUSEL DE MARCAS
   ============================================ */

/* Contenedor principal */
.brand-carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  touch-action: pan-x;
  user-select: none;
  cursor: grab;
}

.brand-carousel-container:active {
  cursor: grabbing;
}

/* Track del carrusel */
.brand-carousel-track {
  display: flex;
  gap: 0.2rem;
  width: fit-content;
  will-change: transform;
  transform: translateZ(0);
  transition: transform 0.1s ease-out;
}

/* Animaciones de scroll */
.brand-carousel-track.scroll-left {
  animation: scroll-left 40s linear infinite;
  padding: 0.125rem 0;
}

.brand-carousel-track.scroll-right {
  animation: scroll-right 40s linear infinite;
  padding: 0.125rem 0;
}

/* Estado activo del track */
.brand-carousel-track.active {
  animation-play-state: paused;
  transition: transform 0.1s ease-out;
}

/* Contenedor de logos individuales */
.brand-carousel-track > div {
  min-width: 180px;
  width: 180px;
  height: 110px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

@media (min-width: 640px) {
  .brand-carousel-track > div {
    min-width: 220px;
    width: 220px;
    height: 130px;
    padding: 0.65rem;
  }
}

@media (min-width: 768px) {
  .brand-carousel-track > div {
    min-width: 240px;
    width: 240px;
    height: 140px;
    padding: 0.8rem;
  }
}

@media (min-width: 1024px) {
  .brand-carousel-track > div {
    min-width: 260px;
    width: 260px;
    height: 150px;
    padding: 0.95rem;
  }
}

.brand-carousel-track > div img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.3);
  padding: 0;
}

.brand-carousel-top .brand-carousel-track {
  gap: 0.12rem;
}

.brand-carousel-top .brand-carousel-track > div {
  min-width: 150px;
  width: 150px;
  height: 100px;
  padding: 0.35rem;
}

@media (min-width: 640px) {
  .brand-carousel-top .brand-carousel-track > div {
    min-width: 190px;
    width: 190px;
    height: 120px;
    padding: 0.5rem;
  }
}

@media (min-width: 768px) {
  .brand-carousel-top .brand-carousel-track > div {
    min-width: 210px;
    width: 210px;
    height: 130px;
    padding: 0.65rem;
  }
}

@media (min-width: 1024px) {
  .brand-carousel-top .brand-carousel-track > div {
    min-width: 230px;
    width: 230px;
    height: 140px;
    padding: 0.8rem;
  }
}

.brand-carousel-bottom {
  margin-top: -0.75rem;
}

/* Contenedor del wrapper */
.brand-carousel-wrapper {
  position: relative;
  overflow: hidden;
}

/* Animaciones compartidas */
@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes scroll-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* Responsive */
@media (max-width: 768px) {
  .brand-carousel-container {
    overflow: hidden;
    margin: 0;
    padding: 0;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  }
  
  .brand-carousel-track {
    display: flex;
    width: max-content;
    padding: 1rem 0;
    gap: 1.2rem;
  }
  
  .brand-carousel-track > div {
    min-width: 150px;
    width: 150px;
    height: 100px;
    padding: 0.4rem;
  }
  
  .brand-carousel-track > div img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1);
  }
  
  /* Ajustar velocidad de animación para móvil */
  .brand-carousel-track.scroll-left {
    animation: scroll-left 30s linear infinite;
  }
  
  .brand-carousel-track.scroll-right {
    animation: scroll-right 30s linear infinite;
  }
  
  .brand-carousel-top .brand-carousel-track {
    gap: 0.8rem;
  }
  
  .brand-carousel-bottom {
    margin-top: -0.5rem;
  }
  
  /* Pausar animación al tocar en móvil */
  .brand-carousel-container:active .brand-carousel-track {
    animation-play-state: paused;
  }
  
  /* Ocultar los logos duplicados en móvil */
  .brand-carousel-track > div.hidden {
    display: none;
  }
  
  /* Asegurar que los logos originales sean visibles */
  .brand-carousel-track > div:not(.hidden) {
    display: grid;
  }
}

/* Ajustar tamaños para diferentes breakpoints móviles */
@media (max-width: 640px) {
  .brand-carousel-track {
    gap: 1.4rem;
  }
  
  .brand-carousel-track > div {
    min-width: 140px;
    width: 140px;
    height: 95px;
  }
  
  .brand-carousel-top .brand-carousel-track {
    gap: 0.7rem;
  }

  .brand-carousel-bottom {
    margin-top: -0.4rem;
  }
}

@media (max-width: 480px) {
  .brand-carousel-track {
    gap: 1.1rem;
  }
  
  .brand-carousel-track > div {
    min-width: 130px;
    width: 130px;
    height: 90px;
  }
  
  .brand-carousel-top .brand-carousel-track {
    gap: 0.6rem;
  }
}

/* ============================================
   4.2 CERTIFICACIONES - GRID ESTÁTICO
   ============================================ */

.certificaciones-section {
  background-image: url('img/cert/fondo.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.certificaciones-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.12), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(233, 91, 38, 0.15), transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(209, 1, 1, 0.18), transparent 50%);
  opacity: 0.8;
  pointer-events: none;
}

.certificaciones-wrapper {
  position: relative;
  z-index: 1;
}

#certificaciones-titulo h2 {
  font-size: clamp(2.5rem, 4vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 18px 35px rgba(0, 0, 0, 0.45);
}

#certificaciones-titulo p {
  font-size: clamp(1rem, 1.35vw, 1.35rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 12px 25px rgba(0, 0, 0, 0.35);
}

#certificaciones-titulo .certificaciones-label {
  text-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.certificaciones-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  letter-spacing: 0.4em;
  font-size: 0.65rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(1rem, 2vw, 2.5rem);
  margin-top: 0;
  width: 100%;
  justify-items: center;
}

@media (min-width: 1280px) {
  .cert-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.cert-logo-card {
  position: relative;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  transition: transform 0.4s ease, opacity 0.4s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cert-logo-card img {
  width: 100%;
  max-width: 170px;
  object-fit: contain;
  filter: drop-shadow(0 18px 35px rgba(0, 0, 0, 0.55));
  opacity: 0.9;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.cert-logo-card:hover img {
  opacity: 1;
  transform: translateY(-6px) scale(1.06);
}

/* Carrusel sección seguridad */
.seguridad-carousel {
  position: relative;
  z-index: 0;
  border-radius: 1.5rem;
  overflow: hidden;
  width: 20rem;
  height: 20rem;
}

@media (min-width: 640px) {
  .seguridad-carousel {
    width: 24rem;
    height: 24rem;
  }
}

.seguridad-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}

.seguridad-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.seguridad-slide-image {
  border-radius: 1.5rem;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  box-shadow: 0 25px 45px rgba(5, 9, 31, 0.4);
}

.seguridad-slide-image::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1.5rem;
  background: linear-gradient(180deg, rgba(12, 18, 38, 0.25), rgba(12, 18, 38, 0.65));
}

@media (max-width: 1024px) {
  .cert-grid {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.25rem;
    min-height: auto;
    margin-top: 1rem;
    justify-items: center;
  }

  .cert-logo-card {
    position: static !important;
    transform: none !important;
    left: auto !important;
    top: auto !important;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0;
  }

  .cert-logo-card img {
    width: min(160px, 70vw);
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .cert-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    justify-items: center;
  }
  
  .certificaciones-label {
    font-size: 0.6rem;
    letter-spacing: 0.3em;
  }

  .cert-logo-card img {
    width: min(130px, 60vw);
  }
}

/* ============================================
   SOSTENIBILIDAD SECTION
   ============================================ */

#sostenibilidad {
  background: linear-gradient(135deg, #f0fdf4 0%, #d1fae5 50%, #ccfbf1 100%);
  position: relative;
  z-index: auto;
  isolation: isolate;
}

#sostenibilidad .max-w-7xl {
  position: relative;
  z-index: 1;
}

/* Decorative background elements */
.sostenibilidad-deco-top {
  position: absolute;
  top: 2.5rem;
  right: 2.5rem;
  width: 18rem;
  height: 18rem;
  background-color: rgba(134, 239, 172, 0.2);
  border-radius: 9999px;
  filter: blur(3rem);
  z-index: -1;
}

.sostenibilidad-deco-bottom {
  position: absolute;
  bottom: 5rem;
  left: 2.5rem;
  width: 24rem;
  height: 24rem;
  background-color: rgba(110, 231, 183, 0.2);
  border-radius: 9999px;
  filter: blur(3rem);
  z-index: -1;
}

/* Badge */
.sostenibilidad-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background-color: #dcfce7;
  color: #15803d;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Title underline */
.sostenibilidad-title-line {
  width: 6rem;
  height: 0.25rem;
  background: linear-gradient(to right, #22c55e, #10b981);
  margin: 0 auto;
  border-radius: 9999px;
}

/* Icon cards */
.sostenibilidad-icon-card {
  background-color: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid #dcfce7;
  transition: box-shadow 0.3s ease;
}

.sostenibilidad-icon-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.sostenibilidad-icon-wrapper {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.sostenibilidad-icon-wrapper.green {
  background-color: #dcfce7;
}

.sostenibilidad-icon-wrapper.emerald {
  background-color: #d1fae5;
}

.sostenibilidad-icon-wrapper.teal {
  background-color: #ccfbf1;
}

.sostenibilidad-icon-wrapper.lime {
  background-color: #ecfccb;
}

.sostenibilidad-icon-wrapper svg {
  width: 2rem;
  height: 2rem;
}

.sostenibilidad-icon-wrapper.green svg {
  color: #16a34a;
}

.sostenibilidad-icon-wrapper.emerald svg {
  color: #059669;
}

.sostenibilidad-icon-wrapper.teal svg {
  color: #0d9488;
}

.sostenibilidad-icon-wrapper.lime svg {
  color: #65a30d;
}

/* ============================================
   5. SERVICIOS - CARDS HORIZONTALES
   ============================================ */

/* Asegurar que la sección de servicios no interfiera con el navbar */
#servicios {
  isolation: isolate;
}

/* Contenedor de servicios horizontales */
.services-horizontal-container {
  display: flex;
  gap: 0.5rem;
  overflow: visible;
  padding: clamp(0.75rem, 1.4vw, 2rem) clamp(1.25rem, 5vw, 4rem) 1.5rem;
  justify-content: center;
  scroll-behavior: smooth;
  min-height: 450px;
}

/* Card individual de servicio */
.service-horizontal-card {
  position: relative;
  min-width: calc(100% / 6 - 0.5rem);
  width: calc(100% / 6 - 0.5rem);
  height: 400px;
  min-height: 400px;
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 2s cubic-bezier(0.19, 1, 0.22, 1);
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  will-change: width, min-width, transform;
  contain: layout style paint;
}

.service-horizontal-card.expanded {
  min-width: calc(100% / 3 - 0.5rem) !important;
  width: calc(100% / 3 - 0.5rem) !important;
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.service-horizontal-card.shrink {
  min-width: calc(100% / 7.5 - 0.5rem) !important;
  width: calc(100% / 7.5 - 0.5rem) !important;
}

/* Imagen de fondo */
.service-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-color: #1e293b;
  transition: transform 2s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.6s ease;
  will-change: transform;
  opacity: 0;
}

.service-card-bg.loaded {
  opacity: 1;
}

.service-horizontal-card.expanded .service-card-bg {
  transform: scale(1.08);
}

/* Overlay oscuro */
.service-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(30, 41, 59, 0.3) 0%,
    rgba(30, 41, 59, 0.7) 50%,
    rgba(30, 41, 59, 0.95) 100%
  );
  transition: background 2s cubic-bezier(0.19, 1, 0.22, 1);
}

.service-horizontal-card.expanded .service-card-overlay {
  background: linear-gradient(
    180deg,
    rgba(30, 41, 59, 0.5) 0%,
    rgba(30, 41, 59, 0.8) 50%,
    rgba(30, 41, 59, 0.98) 100%
  );
}

/* Contenido de la card */
.service-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Título siempre visible */
.service-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: font-size 1.4s cubic-bezier(0.19, 1, 0.22, 1), 
              margin-bottom 1.4s ease;
}

.service-horizontal-card.expanded .service-card-title {
  font-size: 1.65rem;
  margin-bottom: 1rem;
}

/* Detalles ocultos por defecto */
.service-card-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 1.4s cubic-bezier(0.19, 1, 0.22, 1),
              opacity 1s ease 0.4s;
}

.service-horizontal-card.expanded .service-card-details {
  max-height: 300px;
  opacity: 1;
}

/* Descripción */
.service-card-description {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
  line-height: 1.5;
  text-align: center;
  width: 80%;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Lista */
.service-card-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
}

.service-card-list li {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.service-card .bg-blue-900\/80 {
  background: rgba(24,24,58,0.85) !important;
}

/* ============================================
   6. ANIMACIONES FADE-IN UNIFICADAS
   ============================================ */

/* Clase base para todos los efectos fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive padding para elementos con p-6 */
@media (max-width: 640px) {
  .fade-in.p-6 {
    padding: 0.8rem !important;
  }
}

/* ============================================
   6.1 TRUST CARDS
   ============================================ */

/* Estilos base para las trust cards */
[id^="trust-card-"] {
  border: 1.2px solid rgba(240,240,240,0.18);
  background: #f8fafc;
  box-shadow: 0 8px 32px 0 rgba(240,240,240,0.10);
  position: relative;
  overflow: hidden;
}

/* Efecto de grano para todas las trust cards */
[id^="trust-card-"] .grain-effect {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.2;
  z-index: 2;
}

/* Contenido de las trust cards */
[id^="trust-card-"] .trust-card-content {
  position: relative;
  z-index: 3;
}

/* Colores de texto unificados */
[id^="trust-card-"] h3 {
  color: #1a202c; /* text-gray-900 */
}

[id^="trust-card-"] p {
  color: #374151; /* text-gray-700 */
}

/* ============================================
   6.2 SECURITY GRAPH ANIMATIONS
   ============================================ */

/* Animation styles for security graph */
@media (min-width: 1024px) {
  /* When group-hover class is added by intersection observer */
  .group.group-hover {
    cursor: default;
  }

  .group.group-hover .w-80,
  .group.group-hover .sm\:w-96 {
    transform: scale(1.05);
    box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.25);
  }

  .group.group-hover .text-center {
    transform: scale(1.1);
  }

  .group.group-hover .w-20 {
    background-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
  }

  .group.group-hover .w-10 {
    transform: scale(1.1);
    filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.04));
  }

  .group.group-hover .text-xl {
    font-size: 1.5rem;
    color: rgb(219, 234, 254);
  }

  .group.group-hover .opacity-90 {
    opacity: 1;
    font-size: 1rem;
    color: rgb(219, 234, 254);
  }

  .group.group-hover .absolute.-bottom-4.-right-4 {
    opacity: 0.4;
    transform: scale(1.25);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  }

  .group.group-hover .absolute.-top-4.-left-4 {
    opacity: 0.3;
    transform: scale(1.1);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  }

  .group.group-hover .bg-gradient-to-r {
    transform: translate(50%, 50%) rotate(45deg);
  }

  .group.group-hover .w-2,
  .group.group-hover .w-1\.5,
  .group.group-hover .w-1 {
    opacity: 0.6;
    animation: bounce 2s infinite;
  }
}

/* ============================================
   7. RESPONSIVE - MOBILE
   ============================================ */

/* ============================================
   7. SECURITY GRAPH ANIMATIONS
   ============================================ */

/* Animation styles for security graph */
@media (min-width: 1024px) {
  /* When group-hover class is added by intersection observer */
  .group.group-hover {
    cursor: default;
  }

  .group.group-hover .rounded-2xl {
    transform: scale(1.05);
    box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.25);
  }

  .group.group-hover .text-center {
    transform: scale(1.1);
  }

  .group.group-hover .bg-white\/20 {
    background-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
  }

  .group.group-hover .transition-all {
    transform: scale(1.1);
    filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.04));
  }

  .group.group-hover .text-xl {
    font-size: 1.5rem;
    color: rgb(219, 234, 254);
  }

  .group.group-hover .opacity-90 {
    opacity: 1;
    font-size: 1rem;
    color: rgb(219, 234, 254);
  }

  .group.group-hover .bg-blue-400 {
    opacity: 0.4;
    transform: scale(1.25);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  }

  .group.group-hover .bg-slate-600 {
    opacity: 0.3;
    transform: scale(1.1);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  }

  .group.group-hover .bg-gradient-to-r {
    transform: translate(50%, 50%) rotate(45deg);
  }

  .group.group-hover .bg-blue-300,
  .group.group-hover .bg-slate-300,
  .group.group-hover .bg-blue-200 {
    opacity: 0.6;
    animation: bounce 2s infinite;
  }
}

/* ============================================
   8. CTA SECTION
   ============================================ */

.cta-container {
  padding-left: 0;
  padding-right: 0;
}

@media (min-width: 768px) {
  .cta-container {
    padding-left: 10vw;
    padding-right: 10vw;
  }
}

.cta-card {
  border-radius: 1.5rem;
  background: linear-gradient(to bottom right, #E95B26, #ff944d, #ffb380);
  padding: 2rem;
  color: white;
  display: grid;
  gap: 2rem;
  align-items: center;
  position: relative;
  overflow: hidden;
  width: 100%;
}

@media (min-width: 768px) {
  .cta-card {
    padding: 3rem;
    grid-template-columns: repeat(2, 1fr);
  }
}

.cta-grain-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><filter id="grain"><feTurbulence type="fractalNoise" baseFrequency="2.8" numOctaves="2" stitchTiles="stitch"/><feColorMatrix type="saturate" values="0.2"/><feComponentTransfer><feFuncA type="linear" slope="0.25"/></feComponentTransfer></filter><rect width="100%" height="100%" filter="url(#grain)" opacity="0.35" fill="white"/></svg>');
  background-size: cover;
}

.cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
}

.cta-badge span {
  font-size: 0.75rem;
  font-weight: 500;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  color: #0f172a;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

.cta-button:hover {
  background: #f1f5f9;
  transform: scale(1.05);
}

/* ============================================
   9. SOCIAL/RESPONSABILIDAD SECTION
   ============================================ */

.social-section {
  background: linear-gradient(to bottom right, #f8fafc, #dbeafe);
  position: relative;
}

.social-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.social-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .social-title {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .social-title {
    font-size: 3.75rem;
  }
}

.social-intro {
  font-size: 1.125rem;
  color: #4b5563;
  max-width: 48rem;
  margin: 0 auto;
}

.social-event-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

.social-event-badge.deporte {
  background: #fed7aa;
  color: #c2410c;
}

.social-event-badge.artes-marciales {
  background: #e9d5ff;
  color: #7e22ce;
}

.social-event-badge.networking {
  background: #dbeafe;
  color: #1e40af;
}

.social-event-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .social-event-title {
    font-size: 1.875rem;
  }
}

.social-event-description {
  color: #374151;
  line-height: 1.625;
  margin-bottom: 1rem;
}

.social-event-note {
  color: #4b5563;
  font-style: italic;
}

.social-event-image {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.social-event-image img {
  width: 100%;
  height: 20rem;
  object-fit: cover;
}

/* ============================================
   10. CONTACTO SECTION
   ============================================ */

.contacto-section {
  background: linear-gradient(135deg,#e6edfa 0%,#c7d6f7 100%);
}

.contacto-grain-overlay,
.contacto-info-grain-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><filter id="grain"><feTurbulence type="fractalNoise" baseFrequency="2.8" numOctaves="2" stitchTiles="stitch"/><feColorMatrix type="saturate" values="0.2"/><feComponentTransfer><feFuncA type="linear" slope="0.35"/></feComponentTransfer></filter><rect width="100%" height="100%" filter="url(#grain)" opacity="0.55" fill="white"/></svg>');
  background-size: cover;
}

.contacto-info-card {
  border: 1.1px solid rgba(40,39,98,0.22);
  background: linear-gradient(135deg, #282762 80%, #3a3e7c 100%);
}

.contacto-form-container {
  border: 1.1px solid rgba(40,39,98,0.22);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
}

/* ============================================
   11. FOOTER
   ============================================ */

.site-footer {
  border-top: 2px solid #282762;
  background: radial-gradient(80% 60% at 50% -10%, rgba(14,165,233,0.25), transparent 60%), linear-gradient(180deg, #282762, #282762);
}

.submit-button {
  background-color: #282762;
}

.submit-button:hover {
  background-color: #3a3e7c;
}

/* ============================================
   10. RESPONSIVE - MOBILE
   ============================================ */

/* Responsive: en móviles las cards se apilan */
@media (max-width: 1024px) {
  .services-horizontal-container {
    flex-direction: column;
    gap: 0.75rem;
    overflow: visible !important;
    padding: 1rem clamp(1rem, 6vw, 2.5rem) 1.5rem;
  }

  .service-horizontal-card {
    min-width: 100% !important;
    width: 100% !important;
    height: auto;
    min-height: 250px;
  }

  .service-horizontal-card.expanded,
  .service-horizontal-card.shrink {
    min-width: 100% !important;
    width: 100% !important;
    transform: none !important;
  }

  /* Mostrar siempre todos los detalles en móvil */
  .service-card-details {
    max-height: none !important;
    opacity: 1 !important;
  }

  /* Ajustar contenido para móvil - más compacto */
  .service-card-content {
    padding: 1.25rem 1rem;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 250px;
  }

  .service-card-title {
    font-size: 1.35rem !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.3;
  }

  .service-card-description {
    font-size: 0.9rem;
    margin-bottom: 0.65rem;
    line-height: 1.4;
  }

  .service-card-list {
    font-size: 0.85rem;
  }

  .service-card-list li {
    margin-bottom: 0.35rem;
    line-height: 1.3;
  }

  /* Overlay más oscuro en móvil para mejor legibilidad */
  .service-card-overlay {
    background: linear-gradient(
      180deg,
      rgba(30, 41, 59, 0.75) 0%,
      rgba(30, 41, 59, 0.85) 50%,
      rgba(30, 41, 59, 0.95) 100%
    ) !important;
  }
}
