/*
Theme Name: Biomédica de Referencia
Theme URI: https://biomedicadereferencia.com
Author: Luis Kuronox
Description: Tema custom para Biomédica de Referencia — Análisis Clínicos e Imagenología
Version: 1.0
*/

/* =============================================
   VARIABLES GLOBALES
   ============================================= */
:root {
  /* Colores */
  --color-rojo: #c0272d;
  --color-rojo-oscuro: #9a1f24;
  --color-rojo-claro: #e8353c;
  --color-blanco: #ffffff;
  --color-gris-claro: #f7f6f4;
  --color-gris-medio: #e8e5e0;
  --color-gris-texto: #6b6560;
  --color-negro: #1a1714;

  /* Tipografía */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  /* Espaciado */
  --espacio-xs: 0.5rem;
  --espacio-sm: 1rem;
  --espacio-md: 2rem;
  --espacio-lg: 4rem;
  --espacio-xl: 7rem;

  /* Bordes */
  --radio: 4px;
  --radio-lg: 12px;

  /* Sombras */
  --sombra-sm: 0 2px 12px rgba(26, 23, 20, 0.06);
  --sombra-md: 0 8px 32px rgba(26, 23, 20, 0.10);
  --sombra-lg: 0 20px 60px rgba(26, 23, 20, 0.14);

  /* Transiciones */
  --transicion: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   RESET Y BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-negro);
  background: var(--color-blanco);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* =============================================
   TIPOGRAFÍA
   ============================================= */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-gris-texto);
}

/* =============================================
   UTILIDADES
   ============================================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--espacio-md);
}

.container--angosto {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--espacio-md);
}

.seccion {
  padding: var(--espacio-xl) 0;
}

.seccion--gris {
  background: var(--color-gris-claro);
}

.seccion--rojo {
  background: var(--color-rojo);
  color: var(--color-blanco);
}

.etiqueta {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-rojo);
  margin-bottom: var(--espacio-sm);
}

.etiqueta--blanca {
  color: rgba(255,255,255,0.7);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radio);
  transition: var(--transicion);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn--primario {
  background: var(--color-rojo);
  color: var(--color-blanco);
}

.btn--primario:hover {
  background: var(--color-rojo-oscuro);
  transform: translateY(-2px);
  box-shadow: var(--sombra-md);
}

.btn--outline {
  background: transparent;
  color: var(--color-rojo);
  border: 2px solid var(--color-rojo);
}

.btn--outline:hover {
  background: var(--color-rojo);
  color: var(--color-blanco);
  transform: translateY(-2px);
}

.btn--blanco {
  background: var(--color-blanco);
  color: var(--color-rojo);
}

.btn--blanco:hover {
  background: var(--color-gris-claro);
  transform: translateY(-2px);
  box-shadow: var(--sombra-md);
}

/* Línea decorativa */
.linea-deco {
  width: 48px;
  height: 3px;
  background: var(--color-rojo);
  margin-bottom: var(--espacio-md);
}

/* =============================================
   ANIMACIONES DE ENTRADA
   ============================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animar {
  opacity: 0;
  animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animar--delay-1 { animation-delay: 0.1s; }
.animar--delay-2 { animation-delay: 0.2s; }
.animar--delay-3 { animation-delay: 0.3s; }
.animar--delay-4 { animation-delay: 0.4s; }
.animar--delay-5 { animation-delay: 0.5s; }

/* =============================================
   RESPONSIVE HELPERS
   ============================================= */
@media (max-width: 768px) {
  :root {
    --espacio-lg: 2.5rem;
    --espacio-xl: 4rem;
  }

  .container {
    padding: 0 1.25rem;
  }
}