:root {
  --primary: #dd3034;
  --accent: #ffffff;
  --dark: #841c1f;
  --light: #f5f7fb;
  --text: #121417;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ===== NAVBAR ESTILO BOCETO (BLANCO / CORTE DIAGONAL / ROJO) ===== */
.navbar.custom-nav-boceto {
  padding: 0 !important;
  background: var(--primary) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16);
  display: flex;
  align-items: stretch;
  position: sticky;
  top: 0;
  z-index: 1050;
  border-bottom: 2px solid #b71c1c;
}

/* Caja de Marca / Logo (Fondo Blanco sólido con corte diagonal /) */
.nav-brand-box {
  background: #ffffff;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.65rem 3.8rem 0.65rem 2rem;
  clip-path: polygon(0 0, 100% 0, calc(100% - 36px) 100%, 0 100%);
  -webkit-clip-path: polygon(0 0, 100% 0, calc(100% - 36px) 100%, 0 100%);
  z-index: 2;
  flex-shrink: 0;
}

.nav-brand-box .navbar-brand {
  margin: 0;
  padding: 0;
  color: #1a1e24 !important;
  text-decoration: none;
}

.nav-brand-title {
  color: #1a1e24;
  font-weight: 800;
  letter-spacing: 0.8px;
  font-size: 1.35rem;
}

.nav-logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 4px;
}

/* Caja del Menú (Fondo Rojo corporativo sólido con opciones en blanco) */
.nav-menu-box {
  background: var(--primary);
  display: flex;
  align-items: center;
  min-height: 100%;
}

.nav-menu-box .navbar-nav {
  gap: 0.15rem;
}

.nav-menu-box .nav-link {
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.94rem;
  padding: 0.55rem 0.85rem !important;
  border-radius: 8px;
  transition: all 0.25s ease;
  position: relative;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.nav-menu-box .nav-link:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff !important;
  transform: translateY(-1px);
}

.nav-menu-box .nav-link.active {
  background: rgba(0, 0, 0, 0.22);
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.custom-nav-boceto .navbar-toggler {
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  padding: 6px 10px;
  border-radius: 6px;
}

.custom-nav-boceto .navbar-toggler-icon {
  filter: invert(1) brightness(2);
}

/* ===== BOTONES ===== */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  border-radius: 50px;
  padding: 0.75rem 1.8rem;
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--dark);
  border-color: var(--dark);
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--dark);
  border-radius: 50px;
  padding: 0.75rem 1.8rem;
  font-weight: 600;
}

.btn-accent:hover {
  background: #f0f0f0;
  border-color: #f0f0f0;
  color: var(--dark);
}

.btn-outline-light {
  border-radius: 50px;
  padding: 0.75rem 1.8rem;
  font-weight: 600;
}

/* ===== HERO (PORTADA CON CANVAS ANIMADO Y LOGO CENTRAL) ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  color: #000000;
  min-height: auto;
}

.hero-stage {
  position: relative;
  width: 100%;
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #ffffff 0%, #ffffff 75%);
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  transform-origin: 0 0;
}



.hero-center-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-circle {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  overflow: hidden; /* Mantiene la imagen 100% dentro del círculo sin bordes cuadrados */
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-sizing: border-box;
  animation: pulseCircle 3s ease-in-out infinite alternate;
}

.hero-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 15px;
  border-radius: 50%;
  display: block;
  animation: pulseLogo 3s ease-in-out infinite alternate;
}

@keyframes pulseLogo {
  0% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1.05);
  }
}

@keyframes pulseCircle {
  0% {
    transform: scale(0.95);
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.2);
  }
  100% {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgb(250, 2, 2), 0 0 75px rgba(170, 3, 3, 0.6), 0 0 150px rgba(170, 3, 3, 0.25);
    border-color: rgba(255, 255, 255, 0.95);
  }
}

.hero-content-box {
  background: #f5f7fb;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 2.2rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
}

.hero-card-box {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4) !important;
  border-radius: 20px;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.hero .lead {
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.95;
}

/* ===== UI OVERLAY (PORTADA ANIMACIÓN) ===== */
.ui {
  display: none;
  position: fixed;
  z-index: 1050;
  bottom: 0;
  left: 0;
  width: 120px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 4px;
}

.ui p {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #111;
}

.ui p.zoom {
  margin-bottom: 5px;
}

.ui p.zoom span {
  margin-right: 5px;
  border: solid 1px #777;
  cursor: pointer;
  border-radius: 2px;
  display: inline-block;
}

.ui p.zoom span.zoomin {
  padding: 2px 5px;
}

.ui p.zoom span.zoomout {
  padding: 2px 8px;
}

.ui p.zoom span:hover {
  background: black;
  color: white;
}

/* ===== TÍTULOS DE SECCIÓN ===== */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.section-title:after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
}

.text-center .section-title:after {
  left: 50%;
  transform: translateX(-50%);
}

/* ===== TARJETAS ===== */
.card-feature {
  border: none;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  height: 100%;
}

.card-feature:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

.icon-wrap {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light);
  border-radius: 14px;
  font-size: 1.8rem;
  color: var(--primary);
}

.small-icon {
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
}

/* ===== BADGES ===== */
.module-badge {
  background: var(--light);
  border: 1px solid #e6e9ef;
  border-radius: 50px;
  padding: 0.5rem 1rem;
  margin: 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.module-badge i {
  color: var(--primary);
}

/* ===== STRIP SERVICIOS ===== */
.strip {
  background: linear-gradient(90deg, var(--primary), var(--dark));
  color: #fff;
  padding: 3rem 0;
}

/* ===== SLIDER CLIENTES (COVERFLOW CAROUSEL 3D) ===== */
.coverflow-wrapper {
  position: relative;
  width: 100%;
  height: 480px;
  margin: 25px auto 15px;
  overflow: hidden;
  perspective: 1200px;
  -webkit-perspective: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.coverflow-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  cursor: grab;
}

.coverflow-track:active {
  cursor: grabbing;
}

.coverflow-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 310px;
  height: 360px;
  margin-top: -180px;
  margin-left: -155px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12), 0 5px 15px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1),
              opacity 0.45s cubic-bezier(0.25, 1, 0.5, 1),
              filter 0.45s cubic-bezier(0.25, 1, 0.5, 1),
              box-shadow 0.45s ease,
              border-color 0.45s ease;
  will-change: transform, opacity, filter;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Panel activo con iluminación y resplandor rojo */
.coverflow-card.active {
  box-shadow: 0 20px 45px rgba(221, 48, 52, 0.4), 0 0 30px rgba(221, 48, 52, 0.25), 0 10px 25px rgba(0, 0, 0, 0.18);
  border: 2px solid rgba(221, 48, 52, 0.65);
}

.coverflow-card .card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.coverflow-card .card-img-wrap {
  width: 100%;
  height: 240px;
  background: #f4f6fa;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid #edf2f7;
}

.coverflow-card .card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 10px;
  transition: transform 0.4s ease;
}

.coverflow-card:hover .card-img-wrap img {
  transform: scale(1.04);
}

.coverflow-card .card-body-content {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  background: #ffffff;
  text-align: center;
}

.card-client-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1e24;
  margin-bottom: 4px;
}

.card-client-desc {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 0;
  line-height: 1.4;
}

/* Botones de navegación laterales estilo tarjeta flotante */
.coverflow-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  color: #1e293b;
  font-size: 1.35rem;
  cursor: pointer;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.coverflow-prev {
  left: 20px;
}

.coverflow-next {
  right: 20px;
}

.coverflow-nav:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 8px 25px rgba(221, 48, 52, 0.4);
}

.coverflow-pagination {
  text-align: center;
  margin-top: 15px;
}

.coverflow-counter {
  display: inline-block;
  background: rgba(0, 0, 0, 0.05);
  color: #475467;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* =========================
   VISTA PREVIA
========================= */
.image-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.image-modal.show {
  display: flex;
}

.image-modal img {
  width: 80vw;
  height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(255, 255, 255, .2);
}
  
/* X */
.close-modal {
  position: absolute;
  top: 20px;
  right: 30px;
  border: none;
  background: transparent;
  color: white;
  font-size: 50px;
  cursor: pointer;
  line-height: 1;
}

.close-modal:hover {
  color: #dc3545;
}

/* ===== CONTACTO ===== */
.contact {
  background: var(--light);
  padding: 4rem 0;
}

/* ===== FOOTER ===== */
footer {
  background: var(--dark);
  color: #dfe7f5;
  padding: 2rem 0;
  text-align: center;
}

/* ===== UTILIDADES ===== */
.text-danger {
  color: var(--primary) !important;
}

.text-justificado {
  text-align: justify;
}

.bg-light-custom {
  background: var(--light);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
  .navbar.custom-nav-boceto {
    flex-wrap: wrap;
  }
  
  .nav-brand-box {
    padding: 0.55rem 2.8rem 0.55rem 1.2rem;
    clip-path: polygon(0 0, 100% 0, calc(100% - 26px) 100%, 0 100%);
    -webkit-clip-path: polygon(0 0, 100% 0, calc(100% - 26px) 100%, 0 100%);
  }

  .nav-brand-title {
    font-size: 1.2rem;
  }

  .nav-logo-img {
    width: 32px;
    height: 32px;
  }

  .nav-menu-box {
    width: 100%;
  }

  .nav-menu-box .collapse {
    padding: 0.8rem 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  .nav-menu-box .nav-link {
    padding: 0.6rem 1rem !important;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero .lead {
    font-size: 0.95rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .coverflow-wrapper {
    height: 410px;
  }

  .coverflow-card {
    width: 260px;
    height: 310px;
    margin-top: -155px;
    margin-left: -130px;
  }

  .coverflow-card .card-img-wrap {
    height: 195px;
  }

  .card-client-title {
    font-size: 0.95rem;
  }

  .card-client-desc {
    font-size: 0.75rem;
  }
}