:root {
  --brand: #e02424;
  --brand-2: #ff5959;
  --dark-0: #0b0b0b;
  --dark-1: #131313;
  --muted: #a0a0a0;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--dark-0);
  color: var(--white);
  font-family: "Montserrat", sans-serif !important;
  scroll-behavior: smooth;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #111, #1a1a1a 40%, #111);
  border-bottom: 2px solid var(--brand);
  box-shadow: 0 2px 10px rgba(224, 36, 36, 0.2);
}

.nav {
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
}

.nav .brand img {
  height: 44px;
}

.nav ul {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  opacity: 0.9;
  font-size: 14px;
}

.nav a:hover {
  color: var(--brand-2);
}

@media (max-width: 768px) {
  .nav ul {
    display: none;
  }
}

/* Hero */
/* ================= HERO PROFESIONAL AUTOREP ================= */

.hero-modern {
  position: relative;
  padding: 120px 20px;
  background: #0b0b0b;
  overflow: hidden;
}

/* Fondo con luces rojas dinámicas */
.hero-modern::before {
  content: "";
  position: absolute;
  top: -20%;
  left: -10%;
  width: 140%;
  height: 140%;
  background: radial-gradient(
      circle at 70% 30%,
      rgba(224, 36, 36, 0.45),
      transparent 60%
    ),
    radial-gradient(circle at 20% 80%, rgba(255, 0, 0, 0.35), transparent 70%);
  filter: blur(50px);
  opacity: 0.7;
  animation: bgMove 12s infinite alternate ease-in-out;
}

@keyframes bgMove {
  0% {
    transform: translate(0, 0);
  }

  100% {
    transform: translate(40px, -30px);
  }
}

/* Overlay sutil oscuro */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.7), #000);
  pointer-events: none;
}

/* Contenido */
.hero-inner-modern {
  position: relative;
  z-index: 5;
  max-width: 1300px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 40px;
}

/* Texto hero */
.hero-text h1 {
  font-size: 58px;
  font-weight: 800;
  line-height: 1.05;
}

.highlight {
  color: #ff2d2d;
  text-shadow: 0 0 12px rgba(255, 0, 0, 0.5);
}

.hero-sub {
  margin-top: 20px;
  color: #d0d0d0;
  font-size: 18px;
  max-width: 500px;
  line-height: 1.6;
}

/* Botón CTA */
.cta-modern {
  margin-top: 32px;
  display: inline-block;
  background: linear-gradient(90deg, #ff0000, #ff4747);
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 0 18px rgba(255, 0, 0, 0.45);
  transition: 0.3s;
}

.cta-modern:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 28px rgba(255, 0, 0, 0.6);
}

/* ================== HEXÁGONOS PREMIUM AUTOREP ================== */

.hero-images {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 210px);
  gap: 32px;
  justify-content: center;
}

/* CONTENEDOR CON BORDE ANIMADO */
.hex-wrapper {
  position: relative;
  width: 220px;
  height: 220px;
}

/* BORDE ANIMADO */
.hex-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  background: linear-gradient(
    120deg,
    rgba(255, 0, 0, 1),
    rgba(255, 60, 60, 1),
    rgba(255, 0, 0, 1)
  );
  background-size: 200% 200%;
  animation: borderGlow 3s linear infinite;
  filter: blur(4px);
  z-index: 1;
}

/* HEXÁGONO BLANCO — FONDO SIN NADA DE ROJO */
.hex-card {
  position: absolute;
  inset: 8px;
  /* controla el grosor del borde */
  background: white;
  /* FONDO BLANCO PERFECTO */

  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px;

  /* sombra suave */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);

  animation: floatAnim 4s ease-in-out infinite;
  z-index: 2;
}

/* Imagen dentro del hexágono */
.hex-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Animaciones */
@keyframes borderGlow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes floatAnim {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }

  100% {
    transform: translateY(0);
  }
}

/* Delay por cada pieza */
.h1 {
  animation-delay: 0s;
}

.h2 {
  animation-delay: 0.3s;
}

.h3 {
  animation-delay: 0.6s;
}

.h4 {
  animation-delay: 0.9s;
}

/* Responsive */
@media (max-width: 480px) {
  .hex-wrapper {
    width: 160px;
    height: 160px;
  }
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #fff;
  padding: 14px 22px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 25px rgba(224, 36, 36, 0.3);
}

.portadafb img {
  width: 300px;
  padding: 15px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* Sections */
section {
  padding: 70px 20px;
}

.container {
  max-width: 1200px;
  margin: auto;
}

.section-title {
  text-align: center;
  font-size: 30px;
  margin-bottom: 40px;
  color: var(--brand);
  font-weight: 800;
}

/* Nosotros */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.about-card {
  background: linear-gradient(180deg, #191919, #101010);
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(224, 36, 36, 0.06);
}

.about-card h3 {
  margin: 0 0 8px;
}

.about-card p {
  color: var(--muted);
  margin: 0;
}

/* Marcas */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  max-width: 1200px;
  margin: auto;
}

.brand-card {
  background: #fff;
  border: 1px solid #303030;
  border-radius: 14px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, border 0.25s;
}

.brand-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(224, 36, 36, 0.25);
  border-color: var(--brand);
}

.brand-card img {
  max-width: 180px;
  max-height: 110px;
  object-fit: contain;
}

/* Mapa SVG (dentro del contenedor, marcadores encima) */
.map-wrap {
  display: flex;
  justify-content: center;
}

.container-map {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.imgmap {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.marker {
  position: absolute;
  transform: translate(-50%, -50%);
  text-align: center;
  cursor: pointer;
  user-select: none;
}

.marker img {
  width: 40px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

.marker p {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.75);
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(224, 36, 36, 0.35);
  white-space: nowrap;
}

/* Coordenadas reajustadas para separar los puntos */
.dot-1 {
  top: 52%;
  left: 70%;
}

/* Ate - Av. Calca 174 */
.dot-2 {
  top: 35%;
  left: 32%;
}

/* Ate - Av. La Mar 395 */
.dot-3 {
  top: 59%;
  left: 36%;
}

/* Ate - Av. Calca 178 */
.dot-4 {
  top: 70%;
  left: 70%;
}

/* Surquillo - Av. Angamos 1061 */

/* Modales */
.modal-content {
  background: #fff;
  color: #111;
  border: 0;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.modal-header {
  border: 0;
  padding: 22px 24px 0;
}

.modal-title {
  font-weight: 800;
}

.modal-body {
  padding: 8px 24px 0;
}

.modal-body p {
  margin: 0.25rem 0;
}

.modal-body .muted {
  color: #666;
}

.modal-body .row > div {
  margin-bottom: 10px;
}

.modal-footer {
  border: 0;
  padding: 16px 24px 24px;
}

.btn-modal {
  background: #21a366;
  border: 0;
  color: #fff;
  border-radius: 10px;
  padding: 0.55rem 1rem;
}

.btn-modal-cerrar {
  background: #f1f1f1;
  border: 0;
  color: #111;
  border-radius: 10px;
  padding: 0.55rem 1rem;
}

.thumb {
  width: 100%;
  max-width: 260px;
  border-radius: 10px;
  border: 1px solid #e6e6e6;
}

/* ==== FOOTER PROFESIONAL AUTOREP (MEJORADO) ==== */
.footer-autorep {
  background: linear-gradient(140deg, #e02424 0%, #b81818 100%);
  color: #fff;
  padding-top: 70px;
  margin-top: 60px;
  font-family: "Montserrat", sans-serif;
  box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.35);
}

.footer-top {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  gap: 60px;
  padding: 0 20px 50px;
}

.brand-block {
  flex: 1;
}

.brand-logo {
  width: 240px;
  margin-bottom: 18px;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.35));
}

/* NUEVO estilo elegante para texto institucional */
.brand-info {
  font-size: 16px;
  line-height: 1.7;
  opacity: 0.95;
  font-weight: 500;
  margin-bottom: 15px;
}

/* Correo */
.footer-email {
  margin-top: 6px;
  font-size: 15px;
  opacity: 0.9;
  font-weight: 600;
}

.footer-email a {
  color: #fff;
  text-decoration: underline;
  opacity: 0.95;
}

.footer-email a:hover {
  opacity: 1;
}

/* Columnas de números */
.numbers-block {
  flex: 1.2;
}

.title-footer {
  font-size: 30px;
  font-weight: 900;
  margin-bottom: 28px;
  letter-spacing: 0.5px;
}

/* Línea de cada sede */
.line-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 16px;
}

/* Botón */
.phone-btn {
  background: #fff;
  color: #e02424;
  font-weight: 800;
  padding: 7px 18px;
  border-radius: 10px;
  text-decoration: none;
  transition: 0.25s ease-in-out;
  font-size: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.phone-btn:hover {
  background: #ffe1e1;
  transform: translateY(-2px);
}

/* Footer final */
.footer-bottom {
  background: #0b0b0b;
  color: #e1e1e1;
  text-align: center;
  padding: 18px 10px;
  font-size: 13px;
  border-top: 2px solid rgba(255, 255, 255, 0.15);
  letter-spacing: 0.3px;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
  .footer-top {
    flex-direction: column;
    text-align: center;
  }

  .line-item {
    flex-direction: column;
    gap: 8px;
  }
}

/* WHATSAPP FLOAT */
.wa-float {
  position: fixed;
  bottom: 18px;
  right: 18px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  font-size: 28px;
  box-shadow: 0 10px 24px rgba(224, 36, 36, 0.3);
  z-index: 60;
  cursor: pointer;
}

/* ================== NUEVAS SECCIONES ================== */

/* ENVÍOS A PROVINCIAS */
.envios-autorep {
  padding: 70px 20px;
  background: linear-gradient(120deg, #b0001f, #e4002b);
  background-size: 200% 200%;
  animation: enviosBG 7s infinite alternate;
  color: #fff;
}

@keyframes enviosBG {
  0% {
    background-position: left;
  }

  100% {
    background-position: right;
  }
}

.envios-content {
  max-width: 1100px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.envios-content h2 {
  font-size: 32px;
  margin-bottom: 10px;
  font-weight: 800;
}

.envios-content p {
  font-size: 15px;
  opacity: 0.95;
}

.envios-content img {
  width: 100%;
  max-width: 340px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.4));
  animation: truckFloat 3s infinite ease-in-out;
}

@keyframes truckFloat {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0);
  }
}

/* ================= MÉTODOS DE PAGO PREMIUM AUTOREP ================= */

/* ================= MÉTODOS DE PAGO — ESTILO CORPORATIVO AUTOREP ================= */

.pagos-autorep {
  padding: 100px 20px;
  background: #0d0d0d;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Fondo suave con luces */
.pagos-autorep::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 30% 20%,
      rgba(255, 0, 0, 0.18),
      transparent 60%
    ),
    radial-gradient(circle at 80% 80%, rgba(255, 10, 10, 0.15), transparent 70%);
  filter: blur(40px);
}

/* Grid */
.pagos-grid-autorep {
  max-width: 950px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  position: relative;
  z-index: 2;
}

/* Tarjetas */
.pago-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 25px 18px;
  text-align: center;
  transition: 0.35s ease;
  box-shadow: 0 0 0 rgba(255, 0, 0, 0);
}

/* Hover limpio, profesional */
.pago-item:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 0, 0, 0.55);
  box-shadow: 0 8px 25px rgba(255, 0, 0, 0.28);
  background: rgba(255, 0, 0, 0.07);
}

/* Logos */
.pago-item img {
  height: 55px;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.25));
}

/* Texto */
.pago-item span {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  opacity: 0.95;
}

/* Título */
.pagos-autorep .section-title {
  margin-bottom: -10px;
}

.pagos-sub {
  margin-bottom: 35px;
  color: #c8c8c8;
  font-size: 17px;
}

/* ESTADÍSTICAS PREMIUM AUTOREP */
.stats-autorep {
  background: radial-gradient(circle at top, #ff002b, #780018 80%);
  padding: 90px 20px;
  color: #fff;
  text-align: center;
}

.stats-grid-autorep {
  max-width: 1150px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
}

/* Caja */
.stat-box {
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  border-radius: 20px;
  padding: 38px 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.45),
    inset 0 0 12px rgba(255, 255, 255, 0.05);
  transition: 0.35s;
  position: relative;
  overflow: hidden;
}

/* Glow animado */
.stat-box::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.15),
    transparent 60%
  );
  opacity: 0;
  transition: 0.4s ease-out;
}

.stat-box:hover::before {
  opacity: 1;
  transform: scale(1.2);
}

/* Hover */
.stat-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(255, 255, 255, 0.18);
}

/* Íconos circulares */
.stat-icon {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
  animation: floatIcon 3s infinite ease-in-out;
}

.stat-icon img {
  width: 38px;
  height: 38px;
  filter: brightness(1.1);
}

/* Flotación suave */
@keyframes floatIcon {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }

  100% {
    transform: translateY(0);
  }
}

/* Número */
.stat-box h2 {
  font-size: 42px;
  font-weight: 900;
  margin-bottom: 6px;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Texto */
.stat-box p {
  font-size: 15px;
  opacity: 0.95;
}

/* Responsive */
@media (max-width: 480px) {
  .stat-box {
    padding: 28px 15px;
  }

  .stat-icon {
    width: 60px;
    height: 60px;
  }

  .stat-icon img {
    width: 30px;
  }

  .stat-box h2 {
    font-size: 34px;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about {
    grid-template-columns: 1fr;
  }

  .brand-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-top {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }

  .line-item {
    flex-direction: column;
    gap: 6px;
  }

  .envios-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .brand-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h2 {
    font-size: 34px;
  }
}

/* Evita márgenes excesivos y desbordes en móvil */
.container,
.container-fluid {
  padding-left: 12px !important;
  padding-right: 12px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Ajusta las filas Bootstrap para que no se rompan en grid personalizado */
.row {
  margin-right: 0 !important;
  margin-left: 0 !important;
}

/* Corrige padding inconsistente en columnas */
[class*="col-"] {
  padding-right: 10px !important;
  padding-left: 10px !important;
}

/* Mejora tipografía en pantallas pequeñas */
@media (max-width: 768px) {
  body {
    font-size: 15px;
    line-height: 1.5;
  }

  header .nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .nav ul li a {
    font-size: 14px;
    padding: 6px 0;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 50px 20px !important;
  }

  .hero h2 {
    font-size: 28px !important;
    line-height: 1.2;
  }

  .hero p {
    font-size: 14px !important;
  }

  .portadafb img {
    width: 240px !important;
    margin-top: 20px;
  }

  .about-card {
    text-align: center;
    padding: 20px;
  }

  .brand-card {
    min-height: 120px !important;
    padding: 16px !important;
  }

  .footer-top {
    padding-bottom: 30px;
  }

  .footer-bottom {
    font-size: 12px;
  }

  .envios-autorep,
  .stats-autorep,
  .pagos-autorep {
    padding: 50px 20px;
  }
}

@media (max-width: 400px) {
  .hero h2 {
    font-size: 24px !important;
  }

  .cta {
    padding: 10px 16px !important;
    font-size: 14px;
  }

  .brand-card img {
    max-width: 130px;
  }

  .marker img {
    width: 32px !important;
  }
}
