/*==================================================
01. VARIABLES NATIVAS (SOBRESCRIBIR BOOTSTRAP)
==================================================*/
:root {
  --bs-primary: #E60000;
  --bs-primary-rgb: 230, 0, 0;
  
  --bs-body-bg: #050505;
  --bs-body-color: #ffffff;
  --bs-dark: #121212;
  --bs-dark-rgb: 18, 18, 18;

  --pc-red: #E60000;
  --pc-red-dark: #990000;
  --pc-black: #050505;
  --pc-dark-grey: #121212;
  --pc-light-grey: #a0a0a0;

  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --transition-normal: 300ms ease-in-out;
}

/*==================================================
02. RESET & BASE
==================================================*/
html { scroll-behavior: initial; }

body {
  font-family: var(--font-primary);
  background-color: var(--pc-black);
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  /* PREVENCIÓN ESTRICTA DE SCROLL HORIZONTAL EN MÓVILES */
  overflow-x: hidden !important; 
  width: 100%;
}

::selection {
  background-color: var(--pc-red);
  color: #ffffff;
}

a { text-decoration: none; transition: var(--transition-normal); }

/*==================================================
03. HEADER & LOGO FIX
==================================================*/
.header {
  background-color: rgba(5, 5, 5, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: all var(--transition-normal);
}

.header.scrolled {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
  background-color: rgba(0, 0, 0, 1) !important;
  box-shadow: 0 4px 30px rgba(230, 0, 0, 0.15);
}

.navbar-brand img {
  max-height: 45px !important;
  width: auto !important;
  object-fit: contain;
}

.nav-link {
  color: var(--pc-light-grey) !important;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}
.nav-link:hover, .nav-link.active { color: #ffffff !important; }

.navbar-toggler { border-color: rgba(255,255,255,0.1); outline: none !important; box-shadow: none !important; }
.navbar-toggler-icon { filter: invert(1); }

/*==================================================
04. HERO SECTION
==================================================*/
.hero {
  position: relative;
  background-color: var(--pc-black);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(5,5,5,0.9) 0%, rgba(5,5,5,0.7) 100%);
  z-index: 1;
}

.hero-img-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.4;
}

.hero-content { z-index: 2; position: relative; }

/*==================================================
05. UTILIDADES Y COMPONENTES
==================================================*/
.py-section { padding-top: 6rem; padding-bottom: 6rem; }
.text-balance { text-wrap: balance; }
.tracking-wider { letter-spacing: 0.1em; }
.text-pc-red { color: var(--pc-red) !important; }
.bg-pc-dark { background-color: var(--pc-dark-grey) !important; }

.btn-primary {
  background-color: var(--pc-red) !important;
  border-color: var(--pc-red) !important;
  color: #fff !important;
  border-radius: 4px;
}
.btn-primary:hover {
  background-color: var(--pc-red-dark) !important;
  border-color: var(--pc-red-dark) !important;
  box-shadow: 0 0 20px rgba(230, 0, 0, 0.4);
}

.btn-outline-light { border-radius: 4px; }

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

/*==================================================
06. CARDS DE SERVICIOS
==================================================*/
.service-card {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  background-color: #000;
}
.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(230, 0, 0, 0.2);
  border-color: var(--pc-red);
}
.service-card img {
  height: 350px;
  width: 100%;
  object-fit: cover;
  opacity: 0.5;
  transition: opacity var(--transition-normal);
}
.service-card:hover img { opacity: 0.8; }
.service-card .card-img-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
}

/*==================================================
07. ALINEACIÓN DE ICONOS (MISIÓN/VISIÓN)
==================================================*/
.icon-box {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(230, 0, 0, 0.1);
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid rgba(230, 0, 0, 0.3);
}

/*==================================================
08. BOTONES FLOTANTES
==================================================*/
.floating-whatsapp {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background-color: #25D366; 
  color: white;
  border-radius: 50%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
}
.floating-whatsapp:hover {
  background-color: #128C7E;
  color: white;
  transform: scale(1.1);
}

/*==================================================
09. RESPONSIVE DESIGN (MEJORAS CRÍTICAS PARA MÓVIL)
==================================================*/
@media (max-width: 991.98px) {
  /* Fondo sólido para el menú de hamburguesa al abrirse */
  .navbar-collapse {
    background-color: var(--pc-dark-grey);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.9);
  }
  .navbar-nav .nav-item {
    margin-bottom: 10px;
    text-align: center;
  }
  .navbar-nav .nav-item:last-child {
    margin-bottom: 0;
    margin-top: 15px;
  }
}

@media (max-width: 767.98px) {
  /* Reducción de espacios vacíos */
  .py-section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  
  /* Ajuste de tipografía masiva */
  .display-3 { font-size: 2.2rem !important; line-height: 1.2; }
  .display-4 { font-size: 2rem !important; }
  .display-5 { font-size: 1.8rem !important; }
  .lead { font-size: 1rem; }
  
  /* Ajuste del Hero para que no sea excesivamente alto */
  .hero { min-height: auto; padding-top: 80px; padding-bottom: 40px; }
  
  /* El logo / imagen lateral del hero se reduce */
  .hero-img-box { margin-top: 2rem; }
  .hero-img-box img { max-height: 180px !important; }

  /* Misión / Visión: Reducir tamaño del icono en móvil */
  .icon-box { width: 50px; height: 50px; margin-right: 1rem !important; }
  .icon-box i { font-size: 1.25rem !important; }

  /* Contacto Final: Asegurar que el icono de fondo no rompa el ancho */
  .contact-bg-icon { font-size: 15rem !important; top: -30px !important; right: -30px !important; }
  
  /* Botones 100% ancho en móvil */
  .mobile-w-100 { width: 100% !important; }

  /* Ajuste Botón WhatsApp Flotante para no estorbar en pantallas pequeñas */
  .floating-whatsapp { bottom: 1.5rem; right: 1.5rem; width: 50px; height: 50px; }
  .floating-whatsapp i { font-size: 1.5rem !important; }
}