/* =========================================
   1. VARIABLES & CONFIGURACIÓN BASE
   ========================================= */
:root {
  /* Paleta de colores corporativa */
  --brand-dark: #0a295b;
  --brand-primary: #0c3c7f;
  --brand-accent: #09b2e5;
  --brand-accent-dark: #0790b8;
  --text-body: #4a5568;
  --bg-light: #f8f9fa;
  --white: #ffffff;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  
  /* Configuración de bordes y sombras */
  --radius-sm: 4px;
  --radius-card: 12px;
  --radius-btn: 50px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-hover: 0 12px 24px rgba(0,0,0,0.12);
  
  /* Transiciones */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-body);
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
}

/* =========================================
   ACCESIBILIDAD
   ========================================= */

html {
  scroll-behavior: smooth;
}

:focus-visible {
  outline: 3px solid var(--brand-accent);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--brand-dark);
  color: var(--white);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 1rem;
}

/* =========================================
   2. TIPOGRAFÍA
   ========================================= */

h1, h2, h3, h4, h5, h6 {
  color: var(--brand-dark);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* =========================================
   3. COMPONENTES BOOTSTRAP PERSONALIZADOS
   ========================================= */

/* Botón Primario */
.btn-primary {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  border-radius: var(--radius-btn);
  padding: 0.6rem 1.5rem;
  font-weight: 600;
  transition: all var(--transition-base);
}

.btn-primary:hover {
  background-color: var(--brand-dark);
  border-color: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(12, 60, 127, 0.3);
}

/* Botón Outline */
.btn-outline-primary {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
  border-radius: var(--radius-btn);
  font-weight: 600;
}

.btn-outline-primary:hover {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}

/* Tarjetas */
.card {
  border: none;
  border-radius: var(--radius-card);
  background-color: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  overflow: hidden;
}

.hover-elevate:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover) !important;
}

.transition-scale {
  transition: transform var(--transition-slow);
}

.card:hover .transition-scale {
  transform: scale(1.03);
}

/* =========================================
   FORMULARIOS
   ========================================= */

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 0.25rem rgba(9, 178, 229, 0.25);
}

/* Honeypot - OCULTO */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
}

.form-control.is-invalid {
  border-color: var(--danger);
}

.form-control.is-valid {
  border-color: var(--success);
}

/* =========================================
   4. SECCIONES ESPECÍFICAS
   ========================================= */

/* Navbar */
/* Navbar */
.navbar {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95) !important;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.navbar-brand {
  color: var(--brand-dark) !important;
  font-weight: 800;
}

.nav-link {
  font-weight: 500;
  color: var(--text-body) !important;
  position: relative;
}

.nav-link:hover, 
.nav-link.active {
  color: var(--brand-primary) !important;
}

.nav-link.active {
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background-color: var(--brand-accent);
  border-radius: 2px;
}

/* Banner Estático */
.banner-static {
  background: url("../img/mi_mosaico.70859e4bc614.png") center/cover no-repeat;
  min-height: 440px;
  display: flex;
  align-items: center;
  position: relative;
}

.banner-static::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 41, 91, 0.55);
  z-index: 1;
}

.banner-static .container {
  position: relative;
  z-index: 2;
}

.banner-static h1, 
.banner-static .display-4,
.banner-static .fw-bolder {
  color: #ffffff !important;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  margin-bottom: 1rem;
  font-size: 3.5rem;
  line-height: 1.1;
}

.banner-static .lead {
  color: #f0f0f0 !important;
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 2.5rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
  max-width: 85%;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .banner-static { min-height: auto; padding: 4rem 0; }
  .banner-static h1 { font-size: 2.5rem; }
  .banner-static .lead { font-size: 1.25rem; margin-bottom: 1.5rem; }
}

/* Textos destacados */
.text-primary {
  color: var(--brand-primary) !important;
}

.text-accent {
  color: var(--brand-accent) !important;
}

/* Footer */
footer {
  background-color: #fff;
  border-top: 1px solid #eaeaea;
}

footer h5 {
  color: var(--brand-dark);
  font-size: 1.1rem;
}

/* Social Links */
.social-links a {
  color: var(--text-body);
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.social-links a:hover {
  color: var(--brand-primary);
  transform: translateY(-3px);
}

.social-links .bi-facebook:hover { color: #1877f2; }
.social-links .bi-instagram:hover { color: #e4405f; }
.social-links .bi-whatsapp:hover { color: #25d366; }
.social-links .bi-tiktok:hover { color: #000000; }

/* Galería del Blog */
.post-gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.post-gallery__item img {
  width: 100%;
  border-radius: 8px;
  transition: opacity var(--transition-base);
}

/* Imágenes Soluciones */
.solutions-img {
  width: 100%;
  max-width: 450px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08); 
}

@media (min-width: 768px) {
  .solutions-img {
    margin: 0;
  }
}

/* Fondo primario */
.bg-primary {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand-primary)) !important;
}

.bg-primary h1, 
.bg-primary p, 
.bg-primary .lead,
.bg-primary .display-5 {
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* =========================================
   ALERTAS Y MENSAJES
   ========================================= */

.alert {
  border: none;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}

.alert-success {
  background-color: rgba(40, 167, 69, 0.1);
  color: #155724;
  border-left: 4px solid var(--success);
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.1);
  color: #721c24;
  border-left: 4px solid var(--danger);
}

.alert-warning {
  background-color: rgba(255, 193, 7, 0.1);
  color: #856404;
  border-left: 4px solid var(--warning);
}

.alert-info {
  background-color: rgba(9, 178, 229, 0.1);
  color: #0c5460;
  border-left: 4px solid var(--brand-accent);
}

/* =========================================
   MEDIA QUERIES ADICIONALES
   ========================================= */

/* Reducir movimiento */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Estilos de impresión */
@media print {
  .navbar,
  footer,
  .btn,
  .skip-link,
  .alert,
  .social-links {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }
  
  a {
    text-decoration: none;
    color: inherit;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
  
  .banner-static {
    background: none !important;
    min-height: auto;
    padding: 2rem 0;
  }
  
  .banner-static::before {
    display: none;
  }
  
  .banner-static h1,
  .banner-static .lead {
    color: #000 !important;
    text-shadow: none !important;
  }
}