/* main.css — Ruta Verde Knowledge Hub */

:root {
  /* ── CTH Brand Palette ── */
  --rv-deep-blue:    #0C498A;
  --rv-sky-blue:     #69B5FA;
  --rv-light-cyan:   #B2EEFA;
  --rv-forest-green: #669348;
  --rv-light-green:  #9DC384;

  /* ── Semantic tokens ── */
  --rv-primary:      var(--rv-deep-blue);
  --rv-accent:       var(--rv-light-cyan);
  --rv-success:      var(--rv-forest-green);
  --rv-warning:      #f57c00;
  --rv-danger:       #c62828;

  /* ── Surfaces ── */
  --rv-bg:           #f5f8fc;
  --rv-surface:      #ffffff;
  --rv-surface-alt:  #f0fafe;
  --rv-border:       #e0e0e0;
  --rv-border-light: #f0f0f0;

  /* ── Text ── */
  --rv-text:         #212121;
  --rv-text-secondary: #555555;
  --rv-text-muted:   #888888;
  --rv-text-inverse: #ffffff;

  /* ── Typography ── */
  --font-sans:       'Open Sans', 'PT Sans', system-ui, sans-serif;
  --font-display:    'PT Sans', 'Open Sans', system-ui, sans-serif;

  /* ── Spacing scale ── */
  --sp-xs: 4px; --sp-sm: 8px; --sp-md: 16px; --sp-lg: 24px;
  --sp-xl: 32px; --sp-2xl: 48px; --sp-3xl: 64px;

  /* ── Radius ── */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;

  /* ── Shadows ── */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
  --shadow-xl: 0 12px 40px rgba(0,0,0,.15);

  /* ── Transitions ── */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration: 0.3s;

  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--rv-bg); color: var(--rv-text); min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--rv-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--sp-xl); }
.section { padding: var(--sp-3xl) 0; }
.section--alt { background: var(--rv-surface); }
.section--dark { background: var(--rv-deep-blue); color: var(--rv-text-inverse); }
.section--gradient {
  background: linear-gradient(135deg, #0C498A 0%, #69B5FA 50%, #669348 100%);
  color: var(--rv-text-inverse);
}

/* ── Grid ── */
.grid { display: grid; gap: var(--sp-lg); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* ── Flex helpers ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { justify-content: space-between; }
.gap-sm { gap: var(--sp-sm); }
.gap-md { gap: var(--sp-md); }
.gap-lg { gap: var(--sp-lg); }

/* ── Typography ── */
.h1 { font-family: var(--font-display); font-size: 36px; font-weight: 800; line-height: 1.2; }
.h2 { font-family: var(--font-display); font-size: 28px; font-weight: 700; line-height: 1.3; }
.h3 { font-size: 20px; font-weight: 600; line-height: 1.4; }
.h4 { font-size: 16px; font-weight: 600; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--rv-text-muted); }
.text-center { text-align: center; }
.text-uppercase { text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Section header ── */
.section-header { text-align: center; max-width: 700px; margin: 0 auto var(--sp-2xl); }
.section-header h2 { color: var(--rv-primary); margin-bottom: var(--sp-sm); }
.section-header .accent-line {
  width: 60px; height: 3px;
  background: var(--rv-accent);
  margin: var(--sp-md) auto;
  border-radius: 2px;
}
