/* ==========================================================
   Soluciones Industriales SpA - estilos.css
   Colores del logo: amarillo #FCC93D, azul #273660, negro #222324
   ========================================================== */
:root {
  --si-amarillo: #fcc93d;
  --si-amarillo-osc: #e5b12a;
  --si-azul: #273660;
  --si-azul-osc: #1b2647;
  --si-negro: #222324;
  --si-gris: #f3f4f6;
  --si-texto: #3b3f46;
}

/* Transición suave entre páginas (View Transitions API).
   Los navegadores que no la soportan simplemente la ignoran. */
@view-transition {
  navigation: auto;
}
::view-transition-group(*) {
  animation-duration: 0.5s;
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

body {
  font-family: "Barlow", system-ui, sans-serif;
  color: var(--si-texto);
  font-size: 1.05rem;
}

h1, h2, h3, h4, h5, .titulo {
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-weight: 700;
  color: var(--si-azul);
  text-transform: uppercase;
  letter-spacing: .5px;
}

a { color: var(--si-azul); }
.bg-gris { background: var(--si-gris); }
.bg-azul { background: var(--si-azul); color: #fff; }
.text-amarillo { color: var(--si-amarillo) !important; }

/* Línea amarilla bajo títulos de sección */
.titulo-seccion { margin-bottom: 2rem; }
.titulo-seccion small {
  display: block;
  color: var(--si-amarillo-osc);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: .85rem;
}
.titulo-seccion h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: .2rem 0 0; }
.titulo-seccion h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--si-amarillo);
  margin-top: .6rem;
}
.text-center .titulo-seccion h2::after,
.titulo-seccion.text-center h2::after { margin-left: auto; margin-right: auto; }

/* Botones */
.btn-si, .btn-si-outline, .btn-azul, .nav-lineas .btn {
  transition: background-color .25s, color .25s, border-color .25s, transform .2s, box-shadow .25s;
}
.btn-si {
  background: var(--si-amarillo);
  color: var(--si-negro);
  font-weight: 700;
  text-transform: uppercase;
  border: 0;
  border-radius: 4px;
  padding: .7rem 1.4rem;
}
.btn-si:hover, .btn-si:focus-visible {
  background: var(--si-azul);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(39, 54, 96, .3);
}
.btn-si-outline {
  border: 2px solid #fff;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 4px;
  padding: .6rem 1.3rem;
}
.btn-si-outline:hover, .btn-si-outline:focus-visible {
  background: #fff;
  color: var(--si-azul);
  border-color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .3);
}

/* Botones de cotizar: degradé animado + brillo al pasar el mouse */
.btn-cotizar, .btn-azul {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-size: 250% 100%;
  animation: degradeMov 5s ease-in-out infinite;
}
.btn-cotizar {
  background-image: linear-gradient(110deg, #fcc93d 0%, #ffe189 35%, #f2b51f 65%, #fcc93d 100%);
  color: var(--si-negro);
  box-shadow: 0 4px 14px rgba(252, 201, 61, .45);
}
.btn-cotizar::before, .btn-azul::before {
  content: "";
  position: absolute;
  inset: 0;
  left: -75%;
  width: 50%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg);
  z-index: -1;
  transition: left .6s ease;
}
.btn-cotizar:hover::before, .btn-azul:hover::before { left: 130%; }
.btn-cotizar i, .btn-azul i { display: inline-block; transition: transform .25s; }
.btn-cotizar:hover i, .btn-azul:hover i { transform: translateX(5px); }
.btn-cotizar:hover, .btn-cotizar:focus-visible {
  background-image: linear-gradient(110deg, #273660 0%, #3c5191 50%, #273660 100%);
  color: #fff;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 24px rgba(39, 54, 96, .4), 0 0 0 3px rgba(252, 201, 61, .55);
}
.btn-cotizar.pagina-actual { box-shadow: 0 0 0 3px var(--si-azul); }
@keyframes degradeMov {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ---------- Header ---------- */
.topbar {
  background: var(--si-azul-osc);
  color: #fff;
  font-size: .95rem;
  min-height: 40px;
}
.topbar i { color: var(--si-amarillo); }
.topbar-frases { white-space: nowrap; overflow: hidden; text-align: right; }
.topbar .typed-cursor { color: var(--si-amarillo); font-weight: 600; }

.navbar-si {
  background: #fff;
  border-bottom: 4px solid var(--si-amarillo);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  padding: 0;
  min-height: 76px;
  transition: min-height .3s ease;
}
/* Logo en "pestaña" blanca que sobresale hacia arriba (franja azul) y hacia abajo */
.navbar-si .navbar-brand {
  align-self: flex-start;
  background: #fff;
  padding: .6rem 1.1rem .7rem;
  margin-top: -26px;
  margin-bottom: -40px;
  border-radius: 10px;
  border-bottom: 4px solid var(--si-amarillo);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .2);
  position: relative;
  z-index: 2;
  transition: margin .3s ease, padding .3s ease;
}
.navbar-si .navbar-brand img { height: 118px; display: block; transition: height .3s ease; }

/* Header compacto al hacer scroll (clase agregada por main.js) */
.navbar-si.compacto { min-height: 60px; }
.navbar-si.compacto .navbar-brand { margin-top: 0; margin-bottom: -26px; padding: .35rem .8rem .45rem; border-radius: 0 0 10px 10px; }
.navbar-si.compacto .navbar-brand img { height: 72px; }

.navbar-si .nav-link {
  position: relative;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  text-transform: uppercase;
  color: var(--si-azul);
  padding: .6rem 1rem !important;
  transition: background-color .25s, color .25s, font-size .3s, padding .3s;
}
/* Barra inferior que se monta sobre el borde amarillo del header */
.navbar-si .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 4px;
  background: var(--si-azul);
  transform: scaleX(0);
  transition: transform .3s ease;
}
.navbar-si .nav-link:hover,
.navbar-si .nav-link.active {
  color: var(--si-azul);
  background: rgba(252, 201, 61, .18);
}
.navbar-si .nav-link:hover::after,
.navbar-si .nav-link.active::after { transform: scaleX(1); }

@media (min-width: 992px) {
  /* En escritorio los enlaces ocupan todo el alto de la franja blanca */
  .navbar-si .navbar-collapse { align-self: stretch; }
  .navbar-si .navbar-nav { height: 100%; }
  .navbar-si .nav-item { display: flex; align-items: center; height: 100%; }
  .navbar-si .nav-item .nav-link { height: 100%; display: flex; align-items: center; padding: 0 1.1rem !important; }
  .navbar-si .btn-cotizar { transition: padding .3s, font-size .3s, transform .2s, box-shadow .25s; }
  .navbar-si.compacto .nav-item .nav-link { font-size: 1rem; padding: 0 .8rem !important; }
  .navbar-si.compacto .btn-cotizar { padding: .45rem 1.1rem; font-size: .9rem; }
}
@media (max-width: 991.98px) {
  .navbar-si .nav-link::after { left: 0; right: auto; top: 0; bottom: 0; width: 4px; height: auto; transform: scaleY(0); }
  .navbar-si .nav-link:hover::after,
  .navbar-si .nav-link.active::after { transform: scaleY(1); }
}

/* ---------- Slider (home) ---------- */
.slider .carousel-item {
  transition: transform .6s ease-in-out;
  background: var(--si-azul) url("../img/fondo-encabezado-2.jpg") center/cover no-repeat;
  background-blend-mode: multiply;
  min-height: 520px;
  color: #fff;
}
.slider .slide-contenido {
  min-height: 520px;
  padding: 4.5rem 0 4rem;
}
.slider h1, .slider h2 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
}
.slider h1 span, .slider h2 span { color: var(--si-amarillo); }
.slider p { font-size: 1.15rem; color: #dfe3ee; max-width: 540px; }
.slider .slide-img {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  border-bottom: 6px solid var(--si-amarillo);
  box-shadow: 0 15px 40px rgba(0, 0, 0, .35);
}
.slider .slide-img img { width: 100%; height: 280px; object-fit: contain; }
.slider .carousel-indicators [data-bs-target] {
  width: 30px; height: 5px; background: var(--si-amarillo);
}

/* ---------- Encabezado de páginas internas ---------- */
.page-header {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  padding: 4.5rem 0 4.5rem;
  /* Degradado azul + cuadrícula tipo plano de ingeniería + pieza técnica */
  background-color: var(--si-azul);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 300' fill='none' stroke='%23ffffff' stroke-opacity='0.12' stroke-width='1.2'%3E %3Crect x='40' y='60' width='180' height='110' rx='6'/%3E%3Ccircle cx='80' cy='115' r='18'/%3E%3Ccircle cx='180' cy='115' r='18'/%3E %3Cline x1='20' y1='115' x2='240' y2='115' stroke-dasharray='10 4 2 4'/%3E %3Cline x1='40' y1='200' x2='220' y2='200'/%3E%3Cline x1='40' y1='192' x2='40' y2='208'/%3E%3Cline x1='220' y1='192' x2='220' y2='208'/%3E %3Cline x1='255' y1='60' x2='255' y2='170'/%3E%3Cline x1='247' y1='60' x2='263' y2='60'/%3E%3Cline x1='247' y1='170' x2='263' y2='170'/%3E %3Cpath d='M300 290 A 240 240 0 0 1 540 50' stroke-dasharray='6 6'/%3E %3C/svg%3E"),
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px),
    radial-gradient(ellipse at 85% 10%, rgba(76, 102, 176, .55) 0%, transparent 55%),
    linear-gradient(120deg, #1b2647 0%, #273660 55%, #2f4278 100%);
  background-size: 600px 300px, 100px 100px, 100px 100px, 20px 20px, 20px 20px, 100% 100%, 100% 100%;
  background-position: left -40px top 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  background-repeat: no-repeat, repeat, repeat, repeat, repeat, no-repeat, no-repeat;
}
/* Cordillera con volcán (como en el logo), al pie de la cabecera */
.page-header::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 70%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 400' preserveAspectRatio='none'%3E %3Cpath fill='%23ffffff' fill-opacity='0.05' d='M0 260 L120 200 L210 230 L330 150 L430 210 L520 170 L640 120 L760 190 L860 160 L980 210 L1080 140 L1200 90 L1310 170 L1420 130 L1520 190 L1600 160 L1600 400 L0 400 Z'/%3E %3Cpath fill='%23ffffff' fill-opacity='0.07' d='M0 330 L180 290 L320 300 L470 250 L600 210 L700 150 L760 105 L800 92 L850 110 L920 160 L1010 215 L1130 250 L1260 275 L1400 265 L1600 300 L1600 400 L0 400 Z'/%3E %3Cpath fill='%23ffffff' fill-opacity='0.16' d='M700 150 L760 105 L800 92 L850 110 L920 160 Q 895 158 875 168 Q 860 150 840 162 Q 820 150 800 166 Q 780 150 760 160 Q 735 148 700 150 Z'/%3E %3Cpath fill='%231b2647' fill-opacity='0.55' d='M0 360 L200 330 L380 350 L560 320 L760 345 L960 315 L1160 345 L1360 320 L1600 345 L1600 400 L0 400 Z'/%3E %3C/svg%3E") center bottom / 100% 100% no-repeat;
  z-index: -1;
  pointer-events: none;
}
/* Engranaje técnico que gira lento a la derecha */
.page-header::after {
  content: "";
  position: absolute;
  right: 6%;
  top: 50%;
  width: 230px;
  height: 230px;
  margin-top: -115px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-110 -110 220 220' fill='none' stroke='%23fcc93d' stroke-opacity='0.35' stroke-width='1.6'%3E %3Ccircle r='70'/%3E%3Ccircle r='48'/%3E%3Ccircle r='12'/%3E%3Crect x='-9' y='-86' width='18' height='16' transform='rotate(0)'/%3E%3Crect x='-9' y='-86' width='18' height='16' transform='rotate(30)'/%3E%3Crect x='-9' y='-86' width='18' height='16' transform='rotate(60)'/%3E%3Crect x='-9' y='-86' width='18' height='16' transform='rotate(90)'/%3E%3Crect x='-9' y='-86' width='18' height='16' transform='rotate(120)'/%3E%3Crect x='-9' y='-86' width='18' height='16' transform='rotate(150)'/%3E%3Crect x='-9' y='-86' width='18' height='16' transform='rotate(180)'/%3E%3Crect x='-9' y='-86' width='18' height='16' transform='rotate(210)'/%3E%3Crect x='-9' y='-86' width='18' height='16' transform='rotate(240)'/%3E%3Crect x='-9' y='-86' width='18' height='16' transform='rotate(270)'/%3E%3Crect x='-9' y='-86' width='18' height='16' transform='rotate(300)'/%3E%3Crect x='-9' y='-86' width='18' height='16' transform='rotate(330)'/%3E %3Cline x1='-105' y1='0' x2='105' y2='0' stroke-dasharray='10 4 2 4' stroke-opacity='0.25'/%3E %3Cline x1='0' y1='-105' x2='0' y2='105' stroke-dasharray='10 4 2 4' stroke-opacity='0.25'/%3E %3C/svg%3E") center / contain no-repeat;
  z-index: -1;
  pointer-events: none;
  animation: girarEngranaje 60s linear infinite;
}
@keyframes girarEngranaje { to { transform: rotate(360deg); } }
.page-header h1 { color: #fff; font-size: clamp(2rem, 5vw, 3rem); margin: 0; }
.page-header h1::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--si-amarillo);
  margin-top: .6rem;
}

/* ---------- Bloques ---------- */
.seccion { padding: 4.5rem 0; }

.icono-box {
  width: 56px; height: 56px;
  border-radius: 6px;
  background: var(--si-amarillo);
  color: var(--si-azul);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.tarjeta {
  background: #fff;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  height: 100%;
  box-shadow: 0 4px 18px rgba(39, 54, 96, .08);
  transition: transform .2s, box-shadow .2s;
}
.tarjeta:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(39, 54, 96, .15); }
.tarjeta img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: #fff;
  padding: .8rem;
  border-bottom: 4px solid var(--si-amarillo);
}
.tarjeta .card-body h3 { font-size: 1.35rem; margin-bottom: .4rem; }
.tarjeta .card-body p { font-size: .97rem; margin: 0; }
a.tarjeta { text-decoration: none; color: inherit; display: block; }

.franja-cta {
  background: var(--si-amarillo);
  padding: 2.8rem 0;
}
.franja-cta h2 { color: var(--si-negro); margin: 0; font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
.franja-cta .btn-azul {
  background-image: linear-gradient(110deg, #273660 0%, #3c5191 40%, #1b2647 70%, #273660 100%);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  padding: .8rem 1.6rem;
  border: 0;
  box-shadow: 0 6px 16px rgba(39, 54, 96, .35);
}
.franja-cta .btn-azul:hover, .franja-cta .btn-azul:focus-visible {
  background-image: linear-gradient(110deg, #222324 0%, #3a3c3e 50%, #222324 100%);
  color: var(--si-amarillo);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .35), 0 0 0 3px #fff;
}

/* FAQs */
.faq .accordion-item { border: 0; margin-bottom: .7rem; border-radius: 6px !important; overflow: hidden; }
.faq .accordion-button {
  font-weight: 600;
  color: var(--si-azul);
  background: #fff;
  box-shadow: none;
}
.faq .accordion-button:not(.collapsed) {
  background: var(--si-azul);
  color: #fff;
}
.faq .accordion-button:not(.collapsed)::after { filter: brightness(0) invert(1); }

/* Misión / visión */
.mv {
  border-top: 5px solid var(--si-amarillo);
  background: #fff;
  border-radius: 6px;
  padding: 2rem;
  height: 100%;
  box-shadow: 0 4px 18px rgba(39, 54, 96, .08);
}

/* Servicios: navegación por líneas */
.nav-lineas .btn {
  border: 2px solid var(--si-azul);
  color: var(--si-azul);
  font-weight: 600;
  margin: .25rem;
}
.nav-lineas .btn:hover { background: var(--si-azul); border-color: var(--si-azul); color: var(--si-amarillo); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(39, 54, 96, .25); }
.linea { scroll-margin-top: 110px; }

/* Contacto */
.form-control, .form-select { border-radius: 4px; padding: .7rem .9rem; }
.form-control:focus, .form-select:focus {
  border-color: var(--si-amarillo);
  box-shadow: 0 0 0 .2rem rgba(252, 201, 61, .3);
}
.dato-contacto { display: flex; gap: 1rem; margin-bottom: 1.6rem; }
.dato-contacto h3 { font-size: 1.2rem; margin-bottom: .2rem; }
.dato-contacto p { margin: 0; }
.g-recaptcha { min-height: 78px; }
.form-alerta ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.mapa {
  background: var(--si-gris);
  border-radius: 6px;
  min-height: 300px;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--si-negro);
  color: #b8bcc4;
  font-size: .95rem;
}
.footer h4 { color: #fff; font-size: 1.2rem; }
.footer a { color: #b8bcc4; text-decoration: none; }
.footer a:hover { color: var(--si-amarillo); }
.footer .logo-footer { width: 170px; height: auto; }
.footer .copy { border-top: 1px solid #3a3c3e; font-size: 1rem; }
.footer .copy-diseno { border-top: none; font-size: .7rem; color:#888888;}
.footer .copy-diseno a { border-top: none; font-size: .7rem; color:#888888;}
.footer .copy-diseno a:hover { color:#BBBBBB; }

/* ---------- WhatsApp flotante ---------- */
.whatsapp-flotante {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35), 0 3px 8px rgba(0, 0, 0, .25);
  z-index: 1050;
  text-decoration: none;
  transition: transform .2s;
}
.whatsapp-flotante:hover { color: #fff; transform: scale(1.08); box-shadow: 0 12px 28px rgba(0, 0, 0, .45), 0 4px 10px rgba(0, 0, 0, .3); }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .navbar-si { min-height: 64px; }
  .navbar-si .navbar-brand { margin-top: 0; margin-bottom: -26px; padding: .4rem .7rem .5rem; border-radius: 0 0 10px 10px; }
  .navbar-si .navbar-brand img { height: 74px; }
  .navbar-si.compacto .navbar-brand { margin-bottom: -14px; }
  .navbar-si.compacto .navbar-brand img { height: 56px; }
  .navbar-si .navbar-toggler { margin: .9rem 0; }
  .navbar-si .navbar-collapse { padding: 1.8rem 0 1rem; }
  .slider .slide-contenido { padding: 2.5rem 0 3.5rem; }
}
@media (max-width: 767.98px) {
  .topbar { font-size: .85rem; }
  .seccion { padding: 3rem 0; }
  .slider .carousel-item,
  .slider .slide-contenido { min-height: auto; }
  .slider .slide-img img { height: 190px; }
  .page-header { padding: 3rem 0 3.2rem; }
  .page-header::after { width: 150px; height: 150px; margin-top: -75px; right: -30px; }
  .tarjeta img { height: 170px; }
  .whatsapp-flotante { width: 54px; height: 54px; font-size: 1.75rem; right: 14px; bottom: 14px; }
}

/* Respeta a quienes prefieren menos animación */
@media (prefers-reduced-motion: reduce) {
  .btn-cotizar, .btn-azul { animation: none; }
  .btn-cotizar::before, .btn-azul::before { display: none; }
  .page-header::after { animation: none; }
}
