﻿/* ===========================
   ESTILOS GENERALES
=========================== */
html {
  scroll-behavior: smooth;
  height: 100%;
}

:root {
  /* Fallback; JS actualiza este valor en tiempo real */
  --header-h: 88px;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #f5f6f8;
  color: #333;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Fondo específico para la página de comentarios */
.page-comments {
  background-image: url('../img/traba5.jpg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Tarjetas blancas difuminadas para formulario y éxito */
.page-comments .comment-card,
.page-comments .comment-success {
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  backdrop-filter: blur(8px) saturate(140%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Eliminar margen superior del main para permitir hero a pantalla completa */
.site-header + main.main-shell { margin-top: 0; }
/* Asegurar que el primer bloque (hero) pueda subir bajo el header */
.site-header + main.main-shell { padding-top: 0 !important; }
/* En páginas sin hero, como comentarios, empuja el contenido un poco hacia abajo */
.page-comments .site-header + main.main-shell { margin-top: 88px; }

/* Layout robusto y fluido */
*, *::before, *::after { box-sizing: border-box; }
img, video { max-width: 100%; height: auto; display: block; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: anywhere; }

/* .top-border eliminado del layout */

/* ===========================
   HEADER
=========================== */
.site-header {
  background-color: transparent;
  color: #f1faee;
  padding: 8px 0; /* altura más baja */
  position: fixed;
  top: 0;
  left: 0;
  right: 0; /* asegura que cubra todo el ancho sin saltos */
  width: 100%;
  z-index: 1190;
  box-shadow: none;
  transition: all 0.4s ease;
  will-change: background-color, backdrop-filter, box-shadow, transform;
}

/* Estado sólido al hacer scroll */
.site-header.solid {
  background-color: rgba(29, 53, 87, 0.48); /* más liviano */
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  backdrop-filter: blur(6px) saturate(120%);
  box-shadow: 0 2px 10px rgba(0,0,0,0.10);
}

.site-header .container {
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding-left: 24px !important; /* separa del borde izquierdo */
  padding-right: 16px;
  max-width: 100% !important; /* evita el centrado por ancho máximo */
}

.site-header .site-title {
  color: #f1faee;
  margin: 0;
  line-height: 1.2;
  font-weight: 700;
  font-size: 1.8rem;
}

.site-header .site-title a {
  color: inherit;
  text-decoration: none;
}

.site-header .site-title a:hover {
  text-decoration: none;
}

.site-header .site-subtitle {
  color: #a8dadc;
  margin: 0;
  font-size: 0.95rem;
}

/* Ocultar el subtítulo bajo el nombre cuando el header está transparente */
.site-header .site-subtitle {
  transition: opacity .35s ease, transform .35s ease, height .35s ease;
  will-change: opacity, transform, height;
}
.site-header:not(.solid) .site-subtitle {
  opacity: 0;
  transform: translateY(-4px);
  height: 0;
  overflow: hidden;
}

/* Reduce el espacio entre logo y textos hacia la izquierda */
.site-header .ms-3 {
  margin-left: 0.75rem !important;
}

.site-header .logo {
  margin-left: 0 !important; /* centrado visual con el padding */
}

.site-header .logo img {
  display: block;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: 2px solid #000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.site-header .logo a {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
}

@media (max-width: 576px) {
  .site-header .logo img {
    width: 50px;
    height: 50px;
  }
  .site-header .site-title {
    font-size: 1.4rem;
  }
  .site-header .site-subtitle {
    font-size: 0.9rem;
  }
  .site-header .container {
    padding-left: 8px !important; /* da un pequeño respiro en móviles */
  }
  .site-header .logo {
    margin-left: 0 !important; /* evita recorte en móviles */
  }
}

/* Auto-ocultar header al hacer scroll hacia abajo */
/* header-hide deshabilitado: se conserva sticky pero sin ocultarse */
/* body.header-hide .top-border { transform: translateY(-6px); }
body.header-hide .site-header { transform: translateY(-110%); } */

/* Call-to-action en header */
.site-header .header-cta {
  margin-left: auto;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 14px; /* más discreto */
  border-radius: 9999px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.16);
  border: 2px solid #e63946;
  /* Efecto liquid fill con solo color rojo */
  background-image: linear-gradient(#e63946, #e63946);
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 0% 100%; /* inicia vacío */
  color: #ffffff; /* letras siempre blancas */
  transition: background-size .6s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.15s ease, opacity .25s ease;
}

.site-header .header-cta:hover {
  background-size: 100% 100%; /* se rellena completamente en rojo */
  color: #fff;
  transform: translateY(-1px);
}

.site-header .header-cta:active {
  transform: translateY(0);
}

@media (max-width: 576px) {
  .site-header .header-cta {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
}

/* Ocultar CTA cuando el header está arriba (transparente) */
.site-header:not(.solid) .header-cta {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
}

h1, h2, h3, h4, h5 {
  font-weight: 600;
  color: #1d3557;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===========================
   NAVBAR
=========================== */
.navbar {
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.navbar-brand {
  font-weight: 700;
  color: #fff !important;
}

.navbar-nav .nav-link {
  color: #f8f9fa !important;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: #a8dadc !important;
}

/* ===========================
   HERO (IMAGEN PRINCIPAL)
=========================== */
.hero {
  min-height: 100vh !important;
  min-height: 100svh !important;
  min-height: 100dvh !important;
  max-height: none;
  background-size: cover;
  background-position: center 40%; /* desplaza un poco la imagen hacia arriba */
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  overflow: hidden;
  margin-top: 0;
  margin-bottom: 0;
  /* Full-width banner inside container */
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  animation: heroFade 900ms ease both;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0,0,0,0.05));
}

.hero-text {
  position: relative;
  z-index: 2;
  padding: 0 30px;
  max-width: 880px;
  text-align: center;
  animation: slideUp 800ms ease 120ms both;
}

.hero-text h2 {
  font-size: 2.6rem;
  margin-bottom: 0;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,0.35);
}

.hero-text p {
  font-size: 1.2rem;
  color: #e9ecef;
}

/* Botón del hero: rectángulo de borde blanco */
.btn-hero-outline {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 22px;
  border: 2px solid #ffffff;
  color: #ffffff;
  background: transparent;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color .25s ease, color .25s ease, transform .2s ease, opacity .3s ease;
}
.btn-hero-outline:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}

/* Mostrar solo cuando estamos arriba del todo */
body.scrolled .hero .btn-hero-outline { opacity: 0; pointer-events: none; transform: translateY(-6px); }
body.at-top .hero .btn-hero-outline { opacity: 1; transform: none; }

/* ===========================
   SECCIONES GENERALES
=========================== */
section {
  padding: 40px 0;
}

/* Títulos de sección más llamativos (estilo global) */
section h3 {
  margin-bottom: 18px;
  font-weight: 700;
  line-height: 1.2;
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.2rem);
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
}
section h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 72px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #1d3557, #457b9d 65%, #d4af37);
}

/* Centrar la línea bajo el título en "¿Trabajaste con nosotros?" */
#feedback h3::after {
  left: 50%;
  transform: translateX(-50%);
}

/* Título de sección más visual */
.section-title { margin-bottom: 18px; }
.section-title h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 0 0 6px 0;
  margin: 0 0 10px 0;
  font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem);
  background: linear-gradient(90deg, #1d3557, #457b9d 60%, #d4af37);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}
.section-title h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 96px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #d4af37, #457b9d);
}
.section-title .title-accent { display: inline-block; }

/* Solo subrayado (sin barra lateral/acento) en estas secciones */
#about .section-title .title-accent { display: none; }
#about .section-title h3 { gap: 0; }
.title-accent {
  display: inline-block;
  width: 40px;
  height: 4px;
  background: linear-gradient(90deg, #d4af37, #457b9d);
  border-radius: 4px;
}
.section-title .subtitle {
  margin: 0;
  color: #6b7a90;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ===========================
   FEEDBACK CTA (BOTÓN COMENTARIOS)
=========================== */
#feedback { text-align: center; }
#feedback .feedback-cta { margin-top: 10px; }
#feedback .btn-feedback {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 9999px;
  background: transparent;
  border: 2px solid #457b9d; /* borde azul */
  color: #457b9d; /* letras azules */
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 0 4px 14px rgba(0,0,0,0.16);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .22s ease, background-color .22s ease, color .22s ease;
}
#feedback .btn-feedback:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.20);
  background-color: rgba(69,123,157,0.08);
}
#feedback .btn-feedback:active { transform: translateY(0); }
#feedback .btn-feedback .icon { width: 20px; height: 20px; fill: currentColor; display: block; }
@media (max-width: 576px) {
  #feedback .btn-feedback { padding: 11px 18px; gap: 8px; }
  #feedback .btn-feedback .icon { width: 16px; height: 16px; }
}

/* Menos espacio justo después del hero */
.hero + section { padding-top: 16px; }
/* Evita que la navbar tape el inicio de la siguiente sección al hacer scroll */
/* Mejor anclaje al navegar a secciones (#about, #products, etc.) */
section { scroll-margin-top: 80px; }

/* ===========================
   TARJETAS DE PROYECTOS
=========================== */
.card {
  border: none;
  border-radius: 14px; /* bordes más redondeados */
  overflow: hidden; /* asegura que la imagen respete el radio */
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.card-img-top {
  height: 230px;
  object-fit: cover;
}

/* ===========================
   PRODUCTOS - SCROLLER
=========================== */
.product-scroller {
  position: relative;
  margin-top: 18px; /* más aire bajo el título */
}

#products { margin-top: 2.25rem; }

.product-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 1fr);
  gap: 0.3cm; /* separación exacta de 1cm entre recuadros */
  overflow-x: auto;
  padding: 8px 0; /* flechas irán fuera, no reservar espacio interno */
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  /* Ocultar barra de desplazamiento visual */
  -ms-overflow-style: none;  /* IE y Edge */
  scrollbar-width: none;     /* Firefox */
}

.product-track::-webkit-scrollbar { /* Chrome, Safari */
  display: none;
}

.product-track .card {
  scroll-snap-align: start;
  min-width: 300px;
}

/* Solo fotos en "Nuestros trabajos": cuadrados redondeados, sin textos */
.product-track .card { background: transparent; border: 0; box-shadow: none; }
.product-track .card-body { display: none !important; }
.product-track .card-img-top {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1; /* cuadrado */
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
  transition: transform .35s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow .35s ease;
  will-change: transform, box-shadow, filter;
}

/* Efecto llamativo en hover: leve zoom, brillo y saturación */
.product-track .card:hover .card-img-top,
.product-track .card-img-top:hover {
  transform: translateY(-3px) scale(1.12);
  box-shadow: 0 18px 38px rgba(29,53,87,0.30), 0 2px 0 rgba(212,175,55,0.15) inset;
}

/* Brillo sutil alrededor como marco visual (sin cambiar HTML) */
.product-track .card {
  position: relative;
}
.product-track .card::after { content: none !important; }
.product-track .card:hover::after { content: none !important; }

@media (prefers-reduced-motion: reduce) {
  .product-track .card-img-top { transition: none !important; }
  .product-track .card:hover .card-img-top { transform: none !important; }
  .product-track .card::after { content: none !important; }
}

.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent; /* sin círculo de fondo */
  color: #1d3557; /* color principal */
  border: none;
  padding: 0 6px;
  line-height: 1;
  font-size: 44px; /* forma de flecha grande y clara */
  cursor: pointer;
  z-index: 2;
}

.scroll-arrow.left { left: -28px; }
.scroll-arrow.right { right: -28px; }

.scroll-arrow:hover { color: #457b9d; }

@media (max-width: 576px) {
  .scroll-arrow.left { left: -10px; }
  .scroll-arrow.right { right: -10px; }
  .scroll-arrow { font-size: 36px; }
}

/* Indicador de scroll en el hero */
.scroll-cue {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #f1faee;
  font-size: 28px;
  text-decoration: none;
  opacity: .85;
  transition: transform .2s ease, opacity .2s ease;
}
.scroll-cue:hover { opacity: 1; transform: translateX(-50%) translateY(2px); }

/* ===========================
   RESEÑAS
=========================== */
.review {
  background-color: #ffffff;
  border-left: 4px solid #457b9d;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.review:hover {
  transform: scale(1.02);
}

.review strong {
  color: #1d3557;
}

/* ===========================
   BURBUJA FLOTANTE DE CONTACTO
=========================== */
.contact-bubble {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 65px;
  height: 65px;
  background-color: #25D366; /* verde WhatsApp */
  color: #fff;
  font-size: 28px;
  /* Centrado perfecto del contenido */
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 50%;
  box-shadow: 0 6px 15px rgba(0,0,0,0.3);
  /* Sin animación del círculo al pasar el ratón */
  transition: none;
  text-decoration: none;
  z-index: 1000;
}

.contact-bubble:hover {
  background-color: #1ebe5d; /* verde más oscuro al hover */
}
/* Asegurar que el ícono SVG de WhatsApp se vea centrado y nítido */
.contact-bubble .icon {
  width: 30px;
  height: 30px;
  display: block;
  color: #ffffff; /* logo blanco dentro del círculo verde */
  fill: currentColor;
}

/* Tooltip al pasar el ratón: a la izquierda del círculo */
.contact-bubble::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 78px; /* desplazar a la izquierda del círculo */
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}
/* Sin flecha para simplificar al estar a la izquierda */
.contact-bubble::before { content: none; }
.contact-bubble:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.contact-bubble:hover::before { opacity: 1; }

/* ===========================
   FOOTER
=========================== */
.site-footer {
  background-color: #1d3557;
  color: #f1faee;
  margin-top: 40px;
  font-size: 0.95rem;
  border-top: 4px solid #457b9d;
}

/* En la página de contacto no dejar espacio entre la imagen y el footer */
.page-contact .site-footer { margin-top: 0 !important; }

/* ===========================
   AJUSTES DE SECCIONES
   =========================== */
/* Productos: evitar que quede pegado a la navbar */
#products { margin-top: 2.25rem; }

/* Testimonios: menos espacio arriba y tipografía más legible */
#testimonials { margin-top: 2.25rem; }
#testimonials h3 { margin-bottom: .5rem; }
#testimonials .review { padding: 1rem 1.1rem; }
#testimonials .review p { font-size: 1.08rem; }

/* ¿Trabajaste con nosotros?: menos espacio arriba */
#feedback { margin-top: 2rem; }

.site-footer a {
  color: #f1faee;
  text-decoration: none;
}

.site-footer a:hover {
  color: #a8dadc;
}

.site-footer .social-link,
.site-footer .contact-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.site-footer .icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.site-footer .social-links .sep,
.site-footer .contact-info .sep {
  margin: 0 8px;
  opacity: 0.7;
}

.site-footer .social-links,
.site-footer .contact-info {
  display: flex;
  align-items: center;
  justify-content: center; /* igual en móvil */
  flex-wrap: wrap;
  gap: 12px; /* misma separación en ambos */
}

@media (min-width: 768px) {
  .site-footer .social-links,
  .site-footer .contact-info {
    justify-content: flex-start; /* alineación igual en desktop */
  }
}

.bottom-bar {
  background: #0b1f3a;
  color: #ccd6e0;
  font-size: 0.85rem;
  padding: 10px 0;
  border-top: 1px solid #2b4a6a;
}

.bottom-bar a {
  color: #ccd6e0;
  text-decoration: none;
}

.bottom-bar a:hover {
  color: #a8dadc;
}

/* ===========================
   CONTACTO: FONDO + PANEL
=========================== */
.contact-hero {
  background-size: cover;
  background-position: center 40%; /* misma alineación vertical que el hero principal */
  background-repeat: no-repeat;
  position: relative;
  min-height: 100vh !important;
  padding: 60px 0;
}

.contact-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35),
    rgba(0, 0, 0, 0.15)
  );
}

.contact-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.contact-panel {
  width: 100%;
  max-width: 640px;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

main {
  flex: 1 0 auto;
}

/* Cuando el header se vuelve sólido, compensar su altura para el contenido */


/* Contact page: make background cover 100% viewport, remove container gaps */
.page-contact main.container {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-left: 0;
  padding-right: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0; /* permite que el hijo flex calcule correctamente */
}

.page-contact .contact-hero {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  min-height: 100vh; /* cubrir toda la pantalla */
  height: auto;
}

.page-contact .contact-overlay {
  min-height: 100%; /* ocupar toda la altura del hero disponible */
  padding-top: 96px; /* separa el formulario del header fijo */
  padding-bottom: 24px;
}

.page-contact {
  overflow-x: hidden;
}

/* ===========================
   REVEAL ON SCROLL
=========================== */
.reveal-init {
  opacity: 0;
  transform: translateY(16px);
}
.hero.reveal-init { transform: none; }
.reveal-show {
  opacity: 1;
  transform: none;
  transition: opacity 600ms ease, transform 700ms ease;
}

/* ===========================
   Viewport Height Fixes (Mobile)
   Ensure heroes cover full visual viewport on load
=========================== */
.hero {
  min-height: 100svh !important;
  min-height: 100dvh !important;
  /* Extender por debajo del header fijo */
  margin-top: calc(-1 * var(--header-h, 88px));
  padding-top: var(--header-h, 88px);
}
.contact-hero,
.page-contact .contact-hero {
  /* Extender por debajo del header fijo */
  margin-top: calc(-1 * var(--header-h, 88px));
  padding-top: var(--header-h, 88px);
}
.contact-hero,
.page-contact .contact-hero {
  min-height: 100svh !important;
  min-height: 100dvh !important;
}

/* ===========================
   BACK TO TOP BUTTON
=========================== */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 120px; /* más arriba para no competir con WhatsApp */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #1d3557;
  color: #f1faee;
  font-size: 18px;
  line-height: 44px;
  text-align: center;
  box-shadow: 0 6px 15px rgba(0,0,0,0.25);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
  z-index: 1100;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #457b9d;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 768px) {
  
  .hero {
    height: 100vh;
    height: 100dvh;
  }
  .hero-text {
    padding: 20px;
  }
  .hero-text h2 {
    font-size: 2rem;
  }
}

/* Animaciones suaves */
@keyframes heroFade {
  from { opacity: 0; transform: scale(1.02); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===========================
   MODAL DE CONFIRMACIÓN
=========================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 2000;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #fff;
  padding: 40px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  max-width: 400px;
  width: 90%;
  animation: popUp 0.3s ease;
}

.modal-content h3 {
  color: #1d3557;
  margin-bottom: 15px;
}

.modal-content p {
  color: #333;
  margin-bottom: 25px;
}

.modal-content .btn {
  background-color: #1d3557;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.modal-content .btn:hover {
  background-color: #457b9d;
}

@keyframes popUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ===========================
   Carousel reseñas: transición fluida
=========================== */
#reviewsCarousel.carousel.carousel-fade .carousel-item {
  transition: opacity 0.8s ease-in-out;
}

#reviewsCarousel .carousel-item {
  transition: transform 1s ease-in-out;
}

/* Respeto por usuarios con movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .reveal-show, .reveal-init { transition: none !important; }
  #reviewsCarousel .carousel-item { transition: none !important; }
  .scroll-arrow { transition: none !important; }
}

/* ===========================
   ABOUT PANEL
=========================== */
.about-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  max-width: 820px;
}
.about-panel p {
  margin-bottom: 0.75rem;
  line-height: 1.75;
}
.about-panel .lead {
  font-size: 1.05rem;
}
.about-panel p > strong:last-child {
  display: block;
  margin-top: 0.25rem;
  background: none;
  border: 0;
  padding: 0;
  color: #1d3557;
}
@media (max-width: 576px) {
  .about-panel { padding: 0; }
}

/* Imagen en "Sobre nosotros" */
.about-media { position: relative; width: 100%; height: auto; min-height: 0; }
.about-media:not(.duo) {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0,0,0,0.18);
}
.about-media .about-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* Variante con dos imágenes lado a lado */
.about-media.duo { display: grid; grid-template-columns: 1fr 1fr; column-gap: 11cm; row-gap: 11cm;
  align-items: stretch;
  /* en la variante duo, dejamos que el alto se adapte a sus tarjetas */
  height: auto;
  min-height: initial;
  overflow: visible;
  /* cada imagen en su propio recuadro: sin tarjeta contenedora única */
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.about-media.duo .about-card + .about-card { margin-left: 0; }
.about-media.duo .about-card {
  position: relative;
  height: auto;
  min-height: clamp(360px, 46vh, 640px);
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0,0,0,0.14);
  background: #fff;
}
.about-media.duo .about-card .about-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* llena el recuadro sin deformarse */
  display: block;
}
.about-wrap { row-gap: 1.25rem; }
/* Centrado vertical del texto respecto a la imagen y mejor proporción de columnas */
.about-wrap .col-md-6 { display: flex; }
.about-panel { display: flex; flex-direction: column; justify-content: center; max-width: 86ch; }

/* Tipografía específica de "Acerca de nosotros" */
#about .about-panel p {
  font-size: 1.24rem;
  line-height: 1.65; /* mayor tamaño sin alargar en exceso */
}
@media (min-width: 992px) {
  #about .about-panel p { font-size: 1.32rem; }
}

@media (min-width: 768px) {
  .about-wrap.row { display: grid !important; grid-template-columns: 1fr 1fr; align-items: stretch; gap: 0.10cm; }
  .about-wrap .col-md-6:last-child { align-self: stretch; }
  .about-media { min-height: 0; }
}
/* Dar mas protagonismo a la imagen en pantallas grandes */
@media (min-width: 992px) {
  /* Proporción equilibrada */
  .about-wrap.row { grid-template-columns: 1.05fr 0.95fr; }
  .about-panel { max-width: 96ch; }
}
@media (min-width: 1200px) {
  .about-wrap.row { grid-template-columns: 1.1fr 0.9fr; }
  .about-panel { max-width: 104ch; }
}
@media (min-width: 1400px) {
  .about-wrap.row { grid-template-columns: 1.15fr 0.85fr; }
  .about-panel { max-width: 112ch; }
}

@media (max-width: 576px) {
  .about-media { min-height: 260px; }
}

/* Hide About images on small screens (keep desktop unchanged) */
@media (max-width: 767.98px) {
  #about .about-media { display: none !important; }
}

/* ===========================
   RESPONSIVE TWEAKS (MOBILE/TABLET)
   =========================== */
/* Header: ocultar subtítulo en pantallas muy angostas para evitar desbordes */
@media (max-width: 420px) {
  .site-header .site-subtitle { display: none; }
}

/* Hero: tipografías y padding más compactos en móvil */
@media (max-width: 576px) {
  .hero { background-position: center 50%; }
  .hero-text { padding: 0 18px; }
  .hero-text h2 { font-size: 1.8rem; }
  .hero-text p { font-size: 1rem; }
}

/* Secciones: menos padding vertical en móvil */
@media (max-width: 576px) {
  section { padding: 28px 0; }
}

/* Productos: columnas más anchas y gap menor en móvil */
@media (max-width: 576px) {
  .product-track { grid-auto-columns: 85vw; gap: 12px; }
  .product-track .card { min-width: 0; }
}

/* Contact bubble: tamaño reducido y ocultar tooltip en móvil */
@media (max-width: 576px) {
  .contact-bubble { width: 56px; height: 56px; bottom: 16px; right: 16px; }
  .contact-bubble .icon { width: 26px; height: 26px; }
  .contact-bubble::after { display: none; }
}

/* About (duo): reducir grandes espacios en tablets */
@media (max-width: 991.98px) {
  .about-media.duo { column-gap: 16px; row-gap: 16px; }
  .about-media.duo .about-card { min-height: clamp(260px, 42vh, 480px); }
}











/* ===========================
   TESTIMONIALS CAROUSEL ARROWS
   Estilo igual a .scroll-arrow del scroller de trabajos
=========================== */
#reviewsCarousel .carousel-control-prev,
#reviewsCarousel .carousel-control-next {
  position: absolute;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  color: #1d3557;
  opacity: 1;
}
#reviewsCarousel .carousel-control-prev { left: -34px; }
#reviewsCarousel .carousel-control-next { right: -34px; }
#reviewsCarousel .carousel-control-prev-icon,
#reviewsCarousel .carousel-control-next-icon { display: none; }
#reviewsCarousel .carousel-control-prev::after,
#reviewsCarousel .carousel-control-next::after {
  display: block;
  line-height: 48px;
  font-size: 44px;
}
#reviewsCarousel .carousel-control-prev::after { content: '\2039'; }
#reviewsCarousel .carousel-control-next::after { content: '\203A'; }
#reviewsCarousel .carousel-control-prev:hover,
#reviewsCarousel .carousel-control-next:hover { color: #457b9d; }
@media (max-width: 576px) {
  #reviewsCarousel .carousel-control-prev { left: -12px; }
  #reviewsCarousel .carousel-control-next { right: -12px; }
  #reviewsCarousel .carousel-control-prev,
  #reviewsCarousel .carousel-control-next { width: 42px; height: 42px; }
  #reviewsCarousel .carousel-control-prev::after,
  #reviewsCarousel .carousel-control-next::after { font-size: 36px; line-height: 42px; }
}

 





















/* ===========================
   ¿POR QUÉ ELEGIRNOS?
   =========================== */
#why-us h3 { margin-bottom: 1rem; }
#why-us .why-card .why-icon { width: 44px; height: 44px; color: #1d3557; }
#why-us .why-card .why-icon .icon { width: 44px; height: 44px; display: block; fill: currentColor; }
#why-us .why-card h5 { color: #1d3557; font-weight: 700; }
#why-us .why-card p { color: #334; line-height: 1.6; }
#why-us .why-card { transition: transform .18s ease, box-shadow .22s ease; }
#why-us .why-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,0.14); }
#why-us .why-icon { width: auto; height: auto; display: inline-flex; align-items: center; justify-content: center; color: #1d3557; background: none; border-radius: 0; box-shadow: none; }
#why-us .why-icon .icon { width: 36px; height: 36px; display: block; }
#why-us .why-icon .icon path,
#why-us .why-icon .icon rect,
#why-us .why-icon .icon circle,
#why-us .why-icon .icon polyline,
#why-us .why-icon .icon line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===========================
   ¿POR QUÉ ELEGIRNOS? (override)
=========================== */
#why-us .why-card { background:#fff; border:1px solid #e5e7eb; border-radius:16px; box-shadow:0 10px 24px rgba(0,0,0,0.08); }
#why-us .why-card h5 { color: #1d3557; font-weight: 700; margin-top: 6px; }
