/*
Theme Name: Jairo Hortúa
Theme URI: https://example.com/
Author: Daniel Camilo Ramírez Martínez
Author URI: https://example.com/
Description: Tema de campaña para Jairo Hortúa (Cámara por Cundinamarca). Diseño basado en el Manual de Marca 2025 y la estructura de contenido del sitio.
Version: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jairo-hortua
Tags: custom-colors, custom-logo, one-column, two-columns, responsive-layout
*/

/* ==========================================================================
   Variables & Custom Properties
   ========================================================================== */
:root {
  /* Manual de Marca (colores) */
  --jh-green: #79b70d;
  --jh-green-dark: #477F0B;
  --jh-teal: #004438;
  --jh-orange: #FF5A24;
  
  /* Sistema de colores */
  --bg: #0D0D0D;
  --surface: #111;
  --text: #ffffff;
  --muted: rgba(255,255,255,.78);
  --border-light: rgba(255,255,255,.12);
  --border-dark: rgba(0,0,0,.08);
  
  /* Layout */
  --container: 1200px;
  --radius: 18px;
  --shadow: 0 18px 40px rgba(0,0,0,.35);
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 36px;
  --space-xxl: 80px;
  
  /* Breakpoints */
  --bp-mobile: 760px;
  --bp-tablet: 992px;
  --bp-desktop: 1200px;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xxl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-title h2 {
  font-size: clamp(28px, 3vw, 42px);
  margin: 0;
  letter-spacing: .01em;
}

.section-title p {
  margin: var(--space-sm) auto 0;
  max-width: 800px;
  opacity: .85;
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.social-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* ==========================================================================
   Components
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--jh-green);
  color: var(--bg);
  border-color: var(--jh-green);
}

.btn-primary:hover {
  background: transparent;
  color: var(--jh-green);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: rgba(255,255,255,.8);
}

.btn-outline:hover {
  background: var(--text);
  color: var(--jh-teal);
}

.btn-sm {
  padding: var(--space-sm) var(--space-md);
  font-size: 14px;
}

/* Cards */
.card,
.social-card {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: var(--space-lg);
}

.card h3,
.social-card h3 {
  margin: 0 0 var(--space-sm);
}

.card p {
  margin: 0;
  opacity: .9;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: 999px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.92);
  font-weight: 700;
  font-size: 14px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.96);
  color: var(--bg);
  box-shadow: 0 2px 15px rgba(0,0,0,.12);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.brand img {
  height: 52px;
  width: auto;
}

.brand-title {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title strong {
  font-size: 16px;
  letter-spacing: .08em;
}

.brand-title span {
  font-size: 12px;
  opacity: .75;
}

/* Navigation */
.primary-nav ul {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
  padding: 0;
  margin: 0;
}

.primary-nav a {
  font-weight: 600;
  position: relative;
  padding: var(--space-xs) var(--space-xs);
  color: var(--bg);
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--jh-teal);
  transition: width 0.2s ease;
}

.primary-nav a:hover {
  color: var(--jh-teal);
}

.primary-nav a:hover::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  padding: var(--space-sm) var(--space-md);
  border-radius: 12px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--surface);
  margin: var(--space-xs) 0;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  min-height: calc(100vh - 74px);
  display: flex;
  align-items: center;
  position: relative;
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(121,183,13,.35), transparent 60%),
    radial-gradient(900px 450px at 85% 30%, rgba(0,68,56,.45), transparent 60%),
    linear-gradient(135deg, rgba(3, 64, 47, .85), rgba(71, 127, 11, .92));
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-xl);
  align-items: center;
  padding: var(--space-xl) 0;
}

.hero h1 {
  font-size: clamp(34px, 4vw, 56px);
  margin: 0 0 var(--space-sm);
  line-height: 1.1;
}

.hero p {
  margin: 0 0 var(--space-lg);
  max-width: 680px;
  color: rgba(255,255,255,.9);
  font-size: 1.1rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: 14px 0 var(--space-md);
}

.hero-card {
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-lg);
}

.hero-card img {
  border-radius: calc(var(--radius) - 6px);
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}

/* ==========================================================================
   Content Areas
   ========================================================================== */
.content-wrap {
  padding: var(--space-xl) 0 var(--space-xxl);
}

.page-surface {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 22px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-light);
  padding: var(--space-xl) 0;
  color: rgba(255,255,255,.85);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-md);
}

.footer-title {
  font-weight: 800;
  margin: 0 0 var(--space-sm);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin: var(--space-xs) 0;
}

.footer-links a {
  opacity: .9;
  transition: opacity 0.2s ease;
}

.footer-links a:hover {
  opacity: 1;
}

.small {
  font-size: 12px;
  opacity: .7;
  margin-top: var(--space-lg);
}

/* ==========================================================================
   Social Components
   ========================================================================== */
.social-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  gap: var(--space-sm);
}

.social-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.social-embed {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
  border-radius: calc(var(--radius) - 8px);
  background: rgba(0,0,0,.18);
  border: 1px solid var(--border-light);
  padding: var(--space-sm);
  min-height: 540px;
}

.social-embed iframe,
.social-embed .instagram-media,
.social-embed .tiktok-embed {
  max-width: 100% !important;
}

.social-note {
  margin: var(--space-md) 0 0;
  font-size: 13px;
  opacity: .8;
  line-height: 1.4;
}

.tiktok-fallback {
  width: 100%;
  text-align: center;
  padding: 14px var(--space-sm);
}

/* ==========================================================================
   Theme Variations
   ========================================================================== */

/* Light Theme */
.light,
.section.light {
  background: #f8f9fa;
  color: var(--surface);
}

.light a,
.section.light a {
  color: var(--surface);
}

.light .card,
.section.light .card {
  background: #fff;
  border-color: var(--border-dark);
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  color: var(--surface);
}

.light .page-surface,
.section.light .page-surface {
  background: #fff;
  border-color: var(--border-dark);
}

/* Protección de Datos Personales Page */
.page-poteccion-de-datos-personales {
  background: #fff !important;
  color: var(--surface) !important;
}

.page-poteccion-de-datos-personales h1,
.page-poteccion-de-datos-personales h2,
.page-poteccion-de-datos-personales h3 {
  color: var(--surface) !important;
}

.page-poteccion-de-datos-personales a {
  color: var(--surface) !important;
  text-decoration: underline;
}

.page-poteccion-de-datos-personales .content-wrap a,
.page-poteccion-de-datos-personales .page-surface a {
  color: #0a5b2e !important;
}

.page-poteccion-de-datos-personales .card {
  background: #f6f7f8 !important;
  border-color: var(--border-dark) !important;
  color: var(--surface) !important;
}

.page-poteccion-de-datos-personales .page-surface {
  background: #fff !important;
  border-color: var(--border-dark) !important;
}

.page-poteccion-de-datos-personales p,
.page-poteccion-de-datos-personales li,
.page-poteccion-de-datos-personales strong,
.page-poteccion-de-datos-personales em,
.page-poteccion-de-datos-personales blockquote {
  color: var(--surface) !important;
}

.page-poteccion-de-datos-personales hr {
  border-color: var(--border-dark) !important;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet */
@media (max-width: 992px) {
  .hero-inner,
  .grid-3,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .social-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .menu-toggle {
    display: block;
  }
  
  .primary-nav {
    display: none;
    width: 100%;
  }
  
  .primary-nav.is-open {
    display: block;
  }
  
  .primary-nav ul {
    flex-direction: column;
    gap: 0;
    padding: var(--space-sm) 0;
  }
  
  .primary-nav li {
    border-top: 1px solid rgba(0,0,0,.08);
  }
  
  .primary-nav a {
    display: block;
    padding: var(--space-md) 0;
  }
}

/* Mobile */
@media (max-width: 760px) {
  .social-grid {
    grid-template-columns: 1fr;
  }
  
  .section {
    padding: var(--space-xl) 0;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
  
  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Desktop Adjustments */
@media (min-width: 1200px) {
  .container {
    padding: 0;
  }
}

/* ==========================================================================
   Accessibility Improvements
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Focus Styles */
:focus-visible {
  outline: 2px solid var(--jh-green);
  outline-offset: 2px;
}

/* Skip to Content Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--jh-teal);
  color: white;
  padding: var(--space-sm);
  text-decoration: none;
  z-index: 9999;
}

.skip-link:focus {
  top: 0;
}