/* ========================================
   Variables globales y estilos base
======================================== */
:root {
  --primary-color: #001163;       /* Azul seguridad */
  --secondary-color: #fcf122;     /* Naranja destacado */
  --accent-color: #3A3A3A;        /* Gris tecnológico */
  --text-light: #F0F0F0;          /* Texto claro */
  --bg-dark: #22231a;             /* Fondo oscuro */
  --camera-pattern: url('/SPP/Public/Resources/seccionCotizar2.png');
  --shadow-depth: 0 8px 30px rgba(0, 0, 0, 0.3);
  --container-padding: clamp(2rem, 6vw, 5rem);
}

body {
  line-height: 1.7;
  font-family: 'Poppins', sans-serif;
  color: var(--text-light);
  background: 
    linear-gradient(rgba(93, 92, 92, 0.9), rgba(1, 8, 87, 0.9)),
    var(--camera-pattern);
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
}

/* Ajuste para centrar títulos y justificar textos */
h1, h2, h3 {
  text-align: center;
}

p {
  text-align: justify;
}

/* Evitar desbordes de texto */
.card *,
.caracteristica-box *,
.intro-content * {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

/* =========================================================
   BOTÓN FLOTANTE WHATSAPP
   ========================================================= */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  z-index: 1000;
}

.whatsapp-float img {
  width: 35px;
  height: 35px;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px #25D366;
}

/* ========================================
   Espaciado y contenedores
======================================== */
.container {
  width: min(92%, 1400px);
  margin: 1rem auto;
  padding: 1rem;
  position: relative;
  z-index: 1;
}

/* ========================================
   Sección introductoria mejorada
======================================== */
.intro-section {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  background: rgba(42, 78, 110, 0.4);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
  margin-bottom: 0; 
}

.intro-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 145, 255, 0.217) 0%, transparent 70%);
  animation: radar 12s infinite linear;
  z-index: 1;
}

@keyframes radar {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.intro-content {
  position: relative;
  z-index: 2;
}

.intro-image {
  width: 100%;
  height: 400px;
  border-radius: 15px;
  object-fit: cover;
  transform: perspective(1000px) rotateY(-5deg);
  box-shadow: 
    0 0 30px rgb(255, 255, 255),
    var(--shadow-depth);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.intro-image:hover {
  transform: perspective(1000px) rotateY(0deg) translateZ(30px);
}

/* Botón Cotizar */
.btn-cotizar {
  display: inline-block;
  padding: 10px 40px;
  background-color: #fff834; 
  color: rgb(0, 0, 0);
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s ease-in-out;
  border: 2px solid #fffb87;
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.904);
  position: relative;
  z-index: 2;
}

.btn-cotizar:hover {
  background-color: #0056b3; /* Azul más oscuro al pasar el mouse */
  border-color: #ffffff;
  box-shadow: 0 6px 12px rgba(0, 86, 179, 0.4);
  color: #fff;
}

.btn-cotizar:focus,
.btn-cotizar:active {
  outline: none;
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.6);
}

/* ========================================
   Tarjetas con efecto holográfico
   (Ajuste de distribución en las 3 cards finales)
======================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin: 3rem auto;
  max-width: 1200px;
  padding: 0 2rem;
  margin-left: -35px;
}

.card {
  background: rgba(14, 14, 14, 0.6);
  backdrop-filter: blur(8px);
  border-radius: 15px;
  padding: 2.5rem;
  border: 1px solid rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  margin-top: 0;
}

.card-features h3 {
  color: #ffffff;
  font-family: 'Philosopher', sans-serif;
  font-size: 20px;
}

.card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(129, 129, 129, 0.402), transparent);
  transform: rotate(45deg);
  animation: hologram 6s infinite linear;
}

@keyframes hologram {
  0% { transform: rotate(45deg) translateX(-100%); }
  100% { transform: rotate(45deg) translateX(100%); }
}

.card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 
    0 0 40px rgba(255, 255, 255, 0.806),
    var(--shadow-depth);
}

/* ========================================
   Galería con efecto de circuito
======================================== */
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
  position: relative;
}

.galeria-grid::before {
  content: '';
  position: absolute;
  top: -2rem;
  left: -2rem;
  right: -2rem;
  bottom: -2rem;
  background: 
    linear-gradient(45deg, transparent 95%, var(--secondary-color) 100%),
    linear-gradient(-45deg, transparent 95%, var(--secondary-color) 100%);
  z-index: -1;
  opacity: 0.1;
}

.titulo-galeria {
  grid-column: span 3;
  font-size: 1.5rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.galeria-grid .item {
  position: relative;
  text-align: center;
}

.galeria-grid .item p {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
  color: var(--text-light);
  font-weight: bold;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  z-index: 2;
  text-align: center;
}

.galeria-grid img {
  width: 100%;
  height: 250px;
  border-radius: 10px;
  object-fit: cover;
  transition: all 0.4s ease;
  filter: brightness(0.7); 
  border: 2px solid transparent;
}

.galeria-grid img:hover {
  transform: scale(1.05) rotate(1deg);
  filter: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 30px rgba(240,90,40,0.3);
}

/* ========================================
   Efectos y responsive
======================================== */

/* === Pantallas hasta 1200px === */
@media (max-width: 1200px) {
  .intro-section {
    grid-template-columns: 1fr;
    margin: 0;
  }
  
  .intro-image {
    height: 300px;
    transform: none;
  }
}

/* === Pantallas hasta 768px === */
@media (max-width: 768px) {
  .container {
    width: 95%;
    margin: 0.5rem auto;
    padding: 0.5rem;
  }

  .intro-section {
    grid-template-columns: 1fr;
    padding: 0.8rem;
    margin-bottom: 1rem;
  }

  .intro-image {
    height: 250px;
    transform: perspective(500px) rotateY(0deg);
    order: -1;
    margin-bottom: 1rem;
  }

  .intro-content h1 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
  }
  
  .galeria-grid img {
    height: 200px;
  }

  /* Ajustes para las cards y su contenido */
  .card-grid {
    grid-template-columns: 1fr;
    margin-left: 0; 
    gap: 1rem;
    width: 100%;
  }

  .card {
    width: 100%;
    box-sizing: border-box;
    padding: 1rem;
    min-height: auto;
    margin: 0.5rem 0;
  }

  .caracteristica-box {
    padding: 0.5rem;
  }

  .caracteristica-box h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    line-height: 1.2;
  }

  .caracteristica-box p {
    font-size: 0.85rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
  }

  /* Ajuste para textos largos */
  .caracteristica-box > div {
    display: flex;
    flex-direction: column;
    min-height: 120px; 
    justify-content: center;
  }

  /* Las cajas (caracteristica-box) pasan a una columna */
  .caracteristicas-container {
    flex-direction: column;
    align-items: center;
  }
}

/* === Pantallas muy pequeñas (hasta 400px ancho y 710px alto) === */
@media screen and (max-width: 400px) and (max-height: 710px) {
  .container {
    width: 95%;
    margin: 0.5rem auto;
    padding: 0.5rem;
  }

  .intro-section {
    grid-template-columns: 1fr;
    padding: 0.8rem;
    margin-bottom: 1rem;
  }

  .intro-image {
    height: 250px;
    transform: perspective(500px) rotateY(0deg);
    order: -1;
    margin-bottom: 1rem;
  }

  .intro-content h1 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
  }

  .btn-cotizar {
    padding: 8px 20px;
    font-size: 16px;
    display: block;
    margin: 0 auto;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 0;
    margin-left: 0;
    width: 100%;
  }

  .card {
    width: 100%;
    box-sizing: border-box;
    padding: 1.2rem;
    margin: 0.5rem 0;
  }

  .caracteristicas-container {
    padding: 0.8rem;
    position: relative;
    z-index: 2;
    flex-direction: column;
    align-items: center;
  }

  .caracteristica-box {
    padding: 0.8rem;
    position: relative;
    z-index: 2;
    margin-bottom: 1rem;
  }

  .caracteristica-box h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
  }

  .caracteristica-box p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
  }

  .galeria-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
  }

  .galeria-grid img {
    height: 180px;
  }

  .titulo-galeria {
    grid-column: 1 / -1;
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  /* Ajustes generales */
  body {
    font-size: 14px;
    line-height: 1.5;
  }

  h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }

  .card-features h3 {
    font-size: 1.1rem;
  }
}

/* === Pantallas muy pequeñas (hasta 480px) === */
@media (max-width: 480px) {
  .intro-content h1 {
    font-size: 1.3rem;
  }

  .card,
  .caracteristica-box,
  .galeria-grid .item p {
    font-size: 0.9rem;
  }
}

/* Efecto de escaneo */
@keyframes scan {
  0% { background-position: 0 -100%; }
  100% { background-position: 0 200%; }
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 95%,
    rgba(240,90,40,0.1) 100%
  );
  animation: scan 6s infinite linear;
  pointer-events: none;
  z-index: 999;
}

/* ========================================
   Sección de 3 cajas holográficas
======================================== */
.section-title {
  display: flex;
  align-items: center;
  gap: 15px;
}

.section-title img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffcc00;
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.8);
}

/* 
   Para que las 3 cajas tengan el mismo ancho en filas grandes,
   se utiliza align-items: stretch y flex: 1 en cada caja.
*/
.caracteristicas-container {
  display: flex;  
  justify-content: space-between;
  align-items: stretch; /* Fuerza que todas las cajas tengan la misma altura y se alineen */
  gap: 1rem;
  margin-top: 2rem;
}

.caracteristica-box {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: 10px;
  color: #fff;
  background: #1e1e1e;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  flex: 1; /* Todas las cajas ocupan el mismo espacio horizontal */
  box-sizing: border-box;
}

.caracteristica-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(45deg);
  animation: hologram 3s infinite linear;
  pointer-events: none;
}

.box1 {
  background: linear-gradient(45deg, transparent, rgba(15, 37, 232), transparent);
}

.box2 {
  background: linear-gradient(45deg, transparent, rgb(6, 6, 6), transparent);
}

.box3 {
  background: linear-gradient(45deg, transparent, rgb(15, 37, 232), transparent);
}

.box1, .box2, .box3 {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.box1:hover,
.box2:hover,
.box3:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 
    0 0 40px rgba(255, 255, 255, 0.806),
    var(--shadow-depth);
}

@keyframes hologram {
  0% { transform: rotate(45deg) translateX(-100%); }
  100% { transform: rotate(45deg) translateX(100%); }
}

/* Ajustes de enlace "Ver más" */
.caracteristica-box a {
  display: inline-block;
  margin-top: 1rem;
  color: #fff;
  text-decoration: underline;
}

/* Opcional: Efecto de brillo al pasar el mouse */
.caracteristica-box:hover::before {
  background: rgba(255, 255, 255, 0.4);
}