/* ==========================================================================
   Sinergia Proyectos Publicitarios - Estilos Hero Editorial
   Namespace: .sinergia-hero
   ========================================================================== */

/* Suavizado tipográfico y legibilidad base */
body {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background-color: #ffffff;
}

/* ==========================================================================
   Hero Container y Separación de Control de Overflow
   ========================================================================== */
.sinergia-hero {
  position: relative;
  width: 100%;
  overflow-x: clip; /* Previene scrollbar horizontal sin romper contextos de apilamiento */
}

/* 1. Decoración de Fondo: Contenedor con overflow-hidden exclusivo para las ondas SVG */
.sinergia-hero .background-waves {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; /* Aísla exclusivamente el SVG del fondo */
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   Detalle Lateral Izquierdo: MARKETING AGENCY + Línea Vertical
   ========================================================================== */
.vertical-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.lateral-accent-line {
  width: 2px;
  height: 38px;
  background: linear-gradient(to bottom, #fc5c3b, #fdca16);
  border-radius: 9999px;
}

/* ==========================================================================
   Estructura de Dos Zonas: hero-content (42%) vs slider-area (58%)
   ========================================================================== */
.sinergia-hero .hero-content {
  position: relative;
  z-index: 20;
}

.sinergia-hero .slider-area {
  position: relative;
  z-index: 10;
  width: 100%;
}

@media (min-width: 1024px) {
  .sinergia-hero .slider-area {
    /* El slider ocupa el 58% y se extiende hacia el margen derecho sin tocar el texto */
    margin-right: -2rem;
  }
}

@media (min-width: 1280px) {
  .sinergia-hero .slider-area {
    margin-right: -4rem;
  }
}

/* ==========================================================================
   Slider Viewport: Recorta y desvanece suavemente las imágenes hacia la izquierda
   ========================================================================== */
.sinergia-hero .slider-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;

  /* Máscara de desvanecimiento suave (fade out) hacia el lado del texto */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.05) 3%,
    rgba(0, 0, 0, 0.4) 8%,
    rgba(0, 0, 0, 0.85) 14%,
    #000000 20%,
    #000000 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.05) 3%,
    rgba(0, 0, 0, 0.4) 8%,
    rgba(0, 0, 0, 0.85) 14%,
    #000000 20%,
    #000000 100%
  );
}

@media (max-width: 640px) {
  .sinergia-hero .slider-viewport {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

.sinergia-hero .slider-viewport:active {
  cursor: grabbing;
}

/* Plano Inclinado Editorial (-6.5deg en desktop, más sutil en mobile para compilar altura) */
.sinergia-hero .slider-tilted-plane {
  transform: rotate(-6.5deg);
  transform-origin: center center;
  padding: 36px 0;
  will-change: transform;
}

@media (max-width: 640px) {
  .sinergia-hero .slider-tilted-plane {
    transform: rotate(-4deg);
    padding: 12px 0 16px 0;
  }
}

/* Pista continua de desplazamiento */
.sinergia-hero .slider-track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  will-change: transform;
}

@media (max-width: 640px) {
  .sinergia-hero .slider-track {
    gap: 16px;
  }
}

/* Slide individual: esquinas redondeadas suaves para no recortar la imagen */
.sinergia-hero .slide {
  position: relative;
  flex-shrink: 0;
  border-radius: 28px;
  overflow: hidden;
}

@media (min-width: 1280px) {
  .sinergia-hero .slide {
    border-radius: 32px;
  }
}

@media (max-width: 640px) {
  .sinergia-hero .slide {
    border-radius: 16px;
  }
}

/* Cápsula Horizontal Principal */
.sinergia-hero .capsule-main {
  width: 480px;
  height: 290px;
  box-shadow: 0 20px 40px -10px rgba(252, 92, 59, 0.22),
              0 8px 18px -6px rgba(67, 67, 66, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.95);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
}

@media (min-width: 1280px) {
  .sinergia-hero .capsule-main {
    width: 580px;
    height: 340px;
  }
}

@media (max-width: 640px) {
  .sinergia-hero .capsule-main {
    width: 320px;
    height: 180px;
    box-shadow: 0 12px 24px -6px rgba(252, 92, 59, 0.18);
  }
}

/* Cápsulas Horizontales Secundarias con Desplazamiento Vertical */
.sinergia-hero .capsule-secondary {
  width: 310px;
  height: 200px;
  box-shadow: 0 14px 28px -8px rgba(0, 0, 0, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 1280px) {
  .sinergia-hero .capsule-secondary {
    width: 380px;
    height: 240px;
  }
}

@media (max-width: 640px) {
  .sinergia-hero .capsule-secondary {
    width: 240px;
    height: 140px;
  }
}

/* Desplazamientos verticales asimétricos tipo galería */
.sinergia-hero .capsule-offset-up {
  transform: translateY(-20px);
}

.sinergia-hero .capsule-offset-down {
  transform: translateY(22px);
}

@media (max-width: 640px) {
  .sinergia-hero .capsule-offset-up {
    transform: translateY(-8px);
  }
  .sinergia-hero .capsule-offset-down {
    transform: translateY(10px);
  }
}

/* ==========================================================================
   Indicadores Editoriales Inferiores
   ========================================================================== */
.sinergia-hero .indicator-bar {
  height: 3px;
  border-radius: 9999px;
  background-color: #e5e7eb;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.sinergia-hero .indicator-bar.active {
  width: 38px;
  background: linear-gradient(90deg, #fc5c3b, #fdca16);
}

.sinergia-hero .indicator-bar:not(.active) {
  width: 18px;
}

.sinergia-hero .indicator-bar:not(.active):hover {
  background-color: #fdca16;
}

/* ==========================================================================
   Animaciones de Entrada al Cargar
   ========================================================================== */
@keyframes heroFadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-animate-title {
  animation: heroFadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-animate-subtitle {
  opacity: 0;
  animation: heroFadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.18s forwards;
}

.hero-animate-desc {
  opacity: 0;
  animation: heroFadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.32s forwards;
}

.hero-animate-slider {
  opacity: 0;
  animation: heroFadeInUp 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.22s forwards;
}

/* ==========================================================================
   Menú Fullscreen Vanilla JS
   ========================================================================== */
#fullscreen-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.99);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}

#fullscreen-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.menu-link {
  position: relative;
  display: inline-block;
  transition: color 0.3s ease;
}

.menu-link::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: linear-gradient(90deg, #fc5c3b, #fdca16);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ==========================================================================
   Gradientes de Marca y Utilidades Visuales
   ========================================================================== */
.brand-gradient-text {
  background: linear-gradient(135deg, #fc5c3b 0%, #fd8d24 50%, #fdca16 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.brand-gradient-bg {
  background: linear-gradient(135deg, #fc5c3b 0%, #fdca16 100%);
}

.brand-border-gradient {
  border-image: linear-gradient(135deg, #fc5c3b, #fdca16) 1;
}

/* ==========================================================================
   Animaciones Reveal al Hacer Scroll
   ========================================================================== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* ==========================================================================
   Zoom suave de imágenes en cards
   ========================================================================== */
.img-zoom-container {
  overflow: hidden;
  position: relative;
}

.img-zoom-container img {
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.group:hover .img-zoom-container img {
  transform: scale(1.06);
}

/* ==========================================================================
   Acordeón Interactivo FAQ
   ========================================================================== */
.faq-item {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
}

.faq-item.is-open .faq-content {
  opacity: 1;
}

.faq-item.is-open .faq-icon {
  transform: rotate(180deg);
  color: #fc5c3b;
}

.faq-item.is-open {
  border-color: rgba(252, 92, 59, 0.4);
  background-color: #ffffff;
  box-shadow: 0 10px 30px -10px rgba(252, 92, 59, 0.12);
}

/* ==========================================================================
   Menú Fullscreen: Adaptación del Header cuando el menú está abierto
   ========================================================================== */
body.menu-open header,
header.menu-is-active {
  background-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  border-color: transparent !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 50 !important;
}

body.menu-open #header-brand-logo,
body.menu-open #header-social-links,
header.menu-is-active #header-brand-logo,
header.menu-is-active #header-social-links {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

/* ==========================================================================
   Accesibilidad: Prefers Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .hero-animate-title,
  .hero-animate-subtitle,
  .hero-animate-desc,
  .hero-animate-slider,
  .reveal-on-scroll {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
