/* Custom utility animations and transitions */
.fade-transition {
  transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1), transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Subtle custom scrollbar */
::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #070a0f;
}

::-webkit-scrollbar-thumb {
  background: #1f2838;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #dca626;
}

/* Logo oficial: PNG blanco con fondo transparente (imagenes/logo-sonovix-horizontal.png) */
.brand-official-logo {
  object-fit: contain;
}

/* Glow effect with refined golden tone */
.gold-glow {
  box-shadow: 0 0 25px -5px rgba(220, 166, 38, 0.35);
}

.gold-glow-sm {
  box-shadow: 0 0 15px -3px rgba(220, 166, 38, 0.25);
}

/* Gradient overlay for hero - softened so background images are clearly visible */
.hero-vignette {
  background: linear-gradient(90deg, rgba(7, 10, 15, 0.82) 0%, rgba(7, 10, 15, 0.58) 38%, rgba(7, 10, 15, 0.16) 72%, rgba(7, 10, 15, 0.04) 100%);
}

@media (max-width: 1024px) {
  .hero-vignette {
    background: linear-gradient(180deg, rgba(7, 10, 15, 0.84) 0%, rgba(7, 10, 15, 0.55) 55%, rgba(7, 10, 15, 0.20) 100%);
  }
}

.hero-text-shadow {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}

/* Fondos del carrusel: capa propia en GPU para fundidos sin parpadeo */
.carousel-slide-layer {
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* ================= FICHA TÉCNICA CLARA (pestaña Lana de Roca, estilo PDF) ================= */
.ficha-sheet {
  font-family: "Inter", sans-serif;
}

/* Diagonal dorada de la banda superior */
.ficha-diagonal {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 46%;
  width: 6px;
  background: #DCA626;
  transform: skewX(-35deg);
}

.ficha-dots {
  grid-template-columns: repeat(3, 6px);
  gap: 6px;
}

.ficha-dots span {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #DCA626;
}

.ficha-icon-circle {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 9999px;
  border: 2px solid #DCA626;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

/* Títulos de sección con barra dorada a la izquierda */
.ficha-h3 {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1.1;
  text-transform: uppercase;
  color: #111;
  border-left: 4px solid #DCA626;
  padding-left: 10px;
  margin-bottom: 12px;
}

.ficha-card {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  padding: 16px 18px;
}

.ficha-card.p-0 {
  padding: 0;
}

.ficha-check,
.ficha-dot {
  position: relative;
  padding-left: 22px;
}

.ficha-check::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #DCA626;
  font-weight: 800;
}

.ficha-dot::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: #DCA626;
}

.ficha-th-row {
  text-align: left;
  font-weight: 700;
  color: #27272a;
  padding: 10px 14px;
  width: 45%;
  background: #fafafa;
}

.ficha-td {
  padding: 10px 14px;
  color: #3f3f46;
}

.ficha-td-left {
  text-align: left;
  padding: 9px 12px;
  color: #27272a;
}

.ficha-sheet tbody td {
  padding-top: 8px;
  padding-bottom: 8px;
}

.ficha-val {
  font-weight: 700;
  color: #111;
}

/* Pasos de montaje de la pestaña Black (viñeta dorada como en la ficha) */
.black-step {
  position: relative;
  padding-left: 22px;
  color: #d4d4d8;
}

.black-step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: #DCA626;
}

.black-step b {
  color: #fff;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.03em;
}

/* Íconos de aplicaciones */
.ficha-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 12px 8px;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  color: #3f3f46;
  line-height: 1.2;
}

.ficha-app svg {
  width: 36px;
  height: 36px;
  color: #111;
}

/* ================= TARJETAS DE REDES SOCIALES (pestaña Empresa) ================= */
.social-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: 14px;
  background: #0D121B;
  border: 1px solid #27272a;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.social-card:hover {
  border-color: rgba(220, 166, 38, 0.6);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px -12px rgba(220, 166, 38, 0.35);
}

.social-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.6);
}

.social-arrow {
  color: #71717a;
  font-size: 1.25rem;
  transition: color 0.25s, transform 0.25s;
}

.social-card:hover .social-arrow {
  color: #DCA626;
  transform: translate(2px, -2px);
}

/* ================= PESTAÑA ABERTURAS (cascada) ================= */
.abertura-chip {
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(220, 166, 38, 0.5);
  color: #DCA626;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.2s, color 0.2s;
}

.abertura-chip:hover {
  background: #DCA626;
  color: #000;
}

.abertura-details summary::-webkit-details-marker {
  display: none;
}

.abertura-details summary {
  list-style: none;
}

/* Resalta la fila elegida desde el menú */
@keyframes abertura-flash {
  0% { box-shadow: inset 0 0 0 3px rgba(220, 166, 38, 0.9); }
  100% { box-shadow: inset 0 0 0 3px rgba(220, 166, 38, 0); }
}

.abertura-highlight {
  animation: abertura-flash 1.8s ease-out 0.4s both;
}

/* ================= CARRUSELES DE PROYECTOS ================= */
.gallery {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #27272a;
}

@media (min-width: 640px) {
  .gallery {
    aspect-ratio: 16 / 9;
  }
}

.gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.gallery-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Copia difuminada de la foto como fondo: rellena los costados de las fotos verticales */
.gallery-blur {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(24px) brightness(0.45);
  transform: scale(1.15);
}

/* La foto se muestra completa, sin recortes */
.gallery-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 12px 14px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
}

/* Puntos: mismo estilo que el carrusel principal */
.gallery-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.3s;
}

.gallery-dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

.gallery-dot.is-active {
  width: 32px;
  background: #DCA626;
  box-shadow: 0 4px 12px rgba(220, 166, 38, 0.3);
}

/* ================= FOTOS DEL CARRUSEL PRINCIPAL: MISMO TAMAÑO Y ESCALA ================= */
/* Cada capa es un contenedor de medidas; la foto interna siempre tiene proporción 16:9 y cubre
   el hero. Como todas pasan por el mismo marco, se ven con idéntico tamaño y escala sin importar
   la proporción del archivo original (se recorta con el mismo criterio, centrada). */
.carousel-slide-layer {
  container-type: size;
}

.carousel-photo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100cqw, calc(100cqh * 16 / 9));
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
  background-size: cover;
  background-position: center;
}

/* Navegadores sin unidades de contenedor: se vuelve al comportamiento anterior (cubrir el hero) */
@supports not (width: 1cqw) {
  .carousel-photo {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    transform: none;
  }
}
