/* ==========================================================================
   LINEA ABIERTA (lineaabierta.net.pe)
   Archivo: css/main.css - Sistema de diseño, variables y estilos base
   Identidad: Verde oscuro profundo, verde esmeralda, verde brillante y dorado
   ========================================================================== */

:root {
  /* Paleta Periodística Institucional - Identidad Linea Abierta */
  --color-primary: #041f16;          /* Verde oscuro profundo */
  --color-primary-light: #0b3d2b;    /* Verde bosque medio */
  --color-primary-surface: #0a2d20;  /* Verde oscuro elevado */
  
  --color-emerald: #0d7350;          /* Verde esmeralda institucional */
  --color-emerald-light: #108e63;    /* Verde esmeralda claro */
  --color-green-bright: #00c07f;     /* Verde brillante / señal */
  --color-green-subtle: #e8f7f0;     /* Fondo suave esmeralda */

  /* Acento Amarillo / Dorado */
  --color-accent: #f59e0b;           /* Amarillo dorado */
  --color-accent-hover: #d97706;     /* Dorado oscuro hover */
  --color-accent-light: #fbbf24;     /* Oro brillante */
  --color-accent-subtle: #fffbeb;    /* Fondo crema dorado */
  --color-gold: #eab308;             /* Dorado neutro */

  /* Escala de Grises y Superficies (Modo Claro) */
  --bg-body: #f5f8f6;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-subtle: #ebf3ef;
  --border-color: #d6e4dc;
  --border-color-strong: #b5cdc1;

  /* Tipografía */
  --text-primary: #081a13;           /* Verde grafito profundo para lectura */
  --text-secondary: #334b40;
  --text-muted: #597367;
  --text-inverse: #ffffff;

  /* Fuentes del Sistema y Editoriales */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Merriweather', 'Georgia', 'Times New Roman', serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  /* Espaciados y Layout */
  --container-max-width: 1240px;
  --header-height: 74px;
  --topbar-height: 32px;             /* Compacta y limpia */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(4, 31, 22, 0.05), 0 1px 2px rgba(4, 31, 22, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(4, 31, 22, 0.07), 0 2px 4px -1px rgba(4, 31, 22, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(4, 31, 22, 0.08), 0 4px 6px -2px rgba(4, 31, 22, 0.04);
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.25s ease-in-out;
}

/* Modo Oscuro Elegante */
[data-theme="dark"] {
  --bg-body: #03140e;
  --bg-surface: #072218;
  --bg-surface-elevated: #0c2c20;
  --bg-subtle: #0f3527;
  --border-color: #14402f;
  --border-color-strong: #1b533e;

  --text-primary: #f2fbf6;
  --text-secondary: #c0dacd;
  --text-muted: #7fa694;
  --text-inverse: #03140e;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.5);
}

/* Reset y Normalización */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

a:hover {
  color: var(--color-emerald-light);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* Contenedor */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Badges y Categorías */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius-sm);
  background-color: var(--color-primary);
  color: #ffffff;
  width: fit-content;
}

.badge.badge-accent {
  background-color: var(--color-accent);
  color: #041f16;
  font-weight: 900;
}

.badge.badge-live {
  background-color: #dc2626;
  color: #ffffff;
  animation: pulse-live 1.8s infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.03); }
}

.badge.badge-politica   { background-color: #064e3b; color: #ffffff; }
.badge.badge-regiones   { background-color: #0d7350; color: #ffffff; }
.badge.badge-economia   { background-color: #b45309; color: #ffffff; }
.badge.badge-deportes   { background-color: #047857; color: #ffffff; }
.badge.badge-opinion    { background-color: #065f46; color: #ffffff; }
.badge.badge-actualidad { background-color: #0f766e; color: #ffffff; }

/* Tipografía de Encabezados */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 800;
  line-height: 1.25;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1.15rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--color-accent);
}

.section-title a.view-more {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-emerald);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.section-title a.view-more:hover {
  color: var(--color-accent-hover);
}
