/* ==========================================================================
   ESTILOS UNIFICADOS Y DEFINITIVOS - FAMILIA UPS / SISTEMAS DE RESPALDO (BIS)
   ========================================================================== */

/* 1. VARIABLES GLOBALES Y RESET BASE */
:root {
  --bis-primary: #0f172a;
  --bis-accent: #0284c7;
  --bis-success: #10b981;
  --bis-success-dark: #059669;
  --bis-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --bis-glow: 0 10px 30px rgba(2, 132, 199, 0.15);
  --bis-border: #e2e8f0;
}

body {
  font-family: 'Inter', sans-serif;
  color: #334155;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* 2. CABECERAS / HERO UNIFICADAS PARA MODELOS UPS */
.page-header {
  padding: 100px 0;
  position: relative;
  color: #ffffff;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-header.page-thermal,
.page-header.page-ups {
  background-blend-mode: overlay;
}

/* Clases de apoyo específicas para cada modelo de UPS (rutas y fondos limpios) */
.page-header.header-ups-ed,
.page-header.page-thermal:has(+ *) {
    background-image: linear-gradient(135deg, rgba(0, 40, 75, 0.25) 80%, rgba(2, 132, 199, 0.1) 100%), url("../imagenes/heard-ups-ed.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-header.header-ups-edrm {
    background-image: linear-gradient(135deg, rgba(0, 40, 75, 0.25) 80%, rgba(2, 132, 199, 0.1) 100%), url("../imagenes/heard-ups-edmr.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-header.header-ups-q5000t {
    background-image: linear-gradient(135deg, rgba(0, 40, 75, 0.25) 80%, rgba(2, 132, 199, 0.1) 100%), url("../imagenes/heard-ups-q5000t.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-header.header-ups-q5500m {
    background-image: linear-gradient(135deg, rgba(0, 40, 75, 0.25) 80%, rgba(2, 132, 199, 0.1) 100%), url("../imagenes/heard-ups-q5500m.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-header.header-ups-sg {
    background-image: linear-gradient(135deg, rgba(0, 71, 75, 0.25) 80%, rgba(2, 132, 199, 0.1) 100%), url("../imagenes/heard-ups-sg.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-header h1 {
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #ffffff;
}

/* 3. TABLAS DE ESPECIFICACIONES MODERNAS */
.spec-table-modern {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  border: 1px solid var(--bis-border);
  width: 100%;
  margin: 2rem 0;
}

.spec-table-modern th, 
.spec-table-modern td {
  padding: 18px 24px;
  vertical-align: middle;
}

.spec-table-modern th {
  background-color: var(--bis-primary);
  color: #ffffff;
  font-weight: 600;
  text-align: left;
  border: none;
}

.spec-table-modern tr:nth-child(even) {
  background-color: #f8fafc;
}

.spec-table-modern tr:hover {
  background-color: #f1f5f9;
  transition: background 0.2s ease;
}

/* 4. GALERÍA INTERACTIVA PRO Y CONTROL ESTRICTO DE IMÁGENES */
.galeria-pro {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  padding: 20px 0;
  width: 100%;
}

.galeria-item {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--bis-border);
  transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  display: flex;
  flex-direction: column;
}

.galeria-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 35px rgba(2, 132, 199, 0.15);
  border-color: var(--bis-accent);
}

.galeria-item img {
  width: 100%;
  max-width: 100%;
  height: 220px;
  object-fit: contain; /* Evita que las imágenes se estiren o salgan del contenedor */
  background: #f8fafc;
  padding: 10px;
  display: block;
  margin: 0 auto;
  transition: transform 0.5s ease;
}

.galeria-item:hover img {
  transform: scale(1.03);
}

.galeria-item .caption {
  padding: 16px;
  font-weight: 600;
  color: var(--bis-primary);
  text-align: center;
  background: #ffffff;
  border-top: 1px solid var(--bis-border);
}

/* 5. TARJETAS DE BENEFICIOS & ANIMACIONES */
.feature-card-pro {
  background: #ffffff;
  padding: 30px;
  border-radius: 16px;
  border: 1px solid var(--bis-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
  height: 100%;
  width: 100%;
}

.feature-card-pro:hover {
  border-color: var(--bis-accent);
  box-shadow: var(--bis-glow);
  transform: translateY(-4px);
}

/* 6. BOTONES DE ALTA CONVERSIÓN */
.btn-pro-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-radius: 50px;
  padding: 14px 32px;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(2, 132, 199, 0.25);
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-pro-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px rgba(2, 132, 199, 0.35);
  color: #ffffff;
}

.btn-pro-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border-radius: 50px;
  padding: 14px 32px;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.25);
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-pro-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px rgba(16, 185, 129, 0.35);
  color: #ffffff;
}