/*
Theme Name: Aseagro Vanguardia
Theme URI: https://crecienta1.com.ar
Author: Crecienta
Author URI: https://crecienta.com.ar
Description: Custom theme for Aseagro — Infraestructura IA para el Agro. 23 años de trayectoria, potenciados por inteligencia artificial de gestión hídrica.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
License URI: https://crecienta.com.ar
Text Domain: aseagro-vanguardia
Tags: custom-theme, gutenberg, agriculture, ai
*/

/* =============================================================
   VARIABLES GLOBALES — FUENTE DE VERDAD DE LA MARCA ASEAGRO
   ============================================================= */
:root {
  /* Colores Primarios */
  --color-primary:        #064B87;
  --color-primary-dark:   #043a6b;
  --color-primary-light:  #0d6cc4;
  --color-accent:         #00A9E0;
  --color-accent-dark:    #007bb5;

  /* Neutros */
  --color-white:          #ffffff;
  --color-off-white:      #f4f7fb;
  --color-light-gray:     #e8edf5;
  --color-mid-gray:       #8fa3bc;
  --color-dark-gray:      #3d5166;
  --color-dark:           #0c1824;

  /* Estados */
  --color-success:        #22c55e;
  --color-warning:        #f59e0b;

  /* Tipografías */
  --font-display:         'Space Grotesk', 'Inter', sans-serif;
  --font-body:            'Inter', 'Segoe UI', sans-serif;
  --font-mono:            'JetBrains Mono', 'Fira Code', monospace;

  /* Escala tipográfica */
  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-lg:    1.125rem;
  --text-xl:    1.25rem;
  --text-2xl:   1.5rem;
  --text-3xl:   1.875rem;
  --text-4xl:   2.25rem;
  --text-5xl:   3rem;
  --text-6xl:   3.75rem;
  --text-7xl:   4.5rem;

  /* Pesos tipográficos */
  --font-regular:    400;
  --font-medium:     500;
  --font-semibold:   600;
  --font-bold:       700;
  --font-extrabold:  800;

  /* Espaciado */
  --space-xs:    0.5rem;
  --space-sm:    1rem;
  --space-md:    1.5rem;
  --space-lg:    2rem;
  --space-xl:    3rem;
  --space-2xl:   4rem;
  --space-3xl:   6rem;
  --space-4xl:   8rem;

  /* Layout */
  --container-max:  1280px;
  --container-wide: 1440px;
  --container-sm:   768px;

  /* Bordes */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   20px;
  --radius-full: 9999px;

  /* Sombras */
  --shadow-sm:  0 1px 3px rgba(6, 75, 135, 0.08);
  --shadow-md:  0 4px 16px rgba(6, 75, 135, 0.12);
  --shadow-lg:  0 8px 32px rgba(6, 75, 135, 0.18);
  --shadow-xl:  0 20px 60px rgba(6, 75, 135, 0.25);

  /* Transiciones */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

  /* Header */
  --header-height:     72px;
  --header-height-mob: 60px;

  /* Z-index */
  --z-header:   100;
  --z-modal:    200;
  --z-tooltip:  300;
}

/* =============================================================
   RESET & BASE
   ============================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: 1.6;
  color: var(--color-dark);
  background-color: var(--color-white);
  overflow-x: hidden;
}

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

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

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

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input,
textarea,
select {
  font-family: inherit;
}

/* =============================================================
   TIPOGRAFÍA
   ============================================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-bold);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-dark);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  line-height: 1.7;
  color: var(--color-dark-gray);
}

.text-display {
  font-family: var(--font-display);
}

.text-mono {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
}

/* =============================================================
   LAYOUT & CONTENEDOR
   ============================================================= */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.container--wide {
  max-width: var(--container-wide);
}

.container--sm {
  max-width: var(--container-sm);
}

.section {
  padding-block: var(--space-4xl);
}

.section--sm {
  padding-block: var(--space-3xl);
}

.section--lg {
  padding-block: var(--space-4xl) calc(var(--space-4xl) * 1.5);
}

/* Grid sistema */
.grid {
  display: grid;
  gap: var(--space-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); }

.flex {
  display: flex;
  gap: var(--space-md);
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* =============================================================
   BOTONES — SISTEMA CTA
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: all var(--transition-base);
  cursor: pointer;
  white-space: nowrap;
  border: 2px solid transparent;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn--secondary {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-white);
  color: var(--color-white);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn--accent {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

.btn--accent:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn--lg {
  padding: 1rem 2.5rem;
  font-size: var(--text-base);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: var(--text-xs);
}

/* =============================================================
   BADGES & ETIQUETAS
   ============================================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge--primary {
  background: rgba(6, 75, 135, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(6, 75, 135, 0.2);
}

.badge--accent {
  background: rgba(0, 169, 224, 0.1);
  color: var(--color-accent-dark);
  border: 1px solid rgba(0, 169, 224, 0.25);
}

.badge--white {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge--dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* =============================================================
   CARDS
   ============================================================= */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-light-gray);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
}

.card:hover {
  border-color: rgba(6, 75, 135, 0.2);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card--dark {
  background: var(--color-dark);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
}

.card--primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.card__icon {
  width: 48px;
  height: 48px;
  background: rgba(6, 75, 135, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.card__icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
}

.card__number {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: var(--font-extrabold);
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

/* =============================================================
   SECCIÓN: TÍTULOS DE SECCIÓN
   ============================================================= */
.section-header {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: var(--space-3xl);
}

.section-header .badge {
  margin-bottom: var(--space-md);
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header p {
  font-size: var(--text-lg);
  max-width: 560px;
  margin-inline: auto;
}

/* =============================================================
   DIVIDER
   ============================================================= */
.divider {
  width: 48px;
  height: 3px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  margin: var(--space-md) auto;
}

/* =============================================================
   UTILIDADES
   ============================================================= */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }

.text-primary  { color: var(--color-primary); }
.text-accent   { color: var(--color-accent); }
.text-white    { color: var(--color-white); }
.text-muted    { color: var(--color-mid-gray); }

.bg-primary    { background-color: var(--color-primary); }
.bg-dark       { background-color: var(--color-dark); }
.bg-off-white  { background-color: var(--color-off-white); }

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

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1024px) {
  :root {
    --text-7xl: 3.5rem;
    --text-6xl: 3rem;
    --text-5xl: 2.5rem;
  }

  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --text-5xl: 2rem;
    --text-4xl: 1.75rem;
    --text-3xl: 1.5rem;
  }

  .container {
    padding-inline: var(--space-md);
  }

  .section {
    padding-block: var(--space-3xl);
  }

  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }

  .section-header {
    margin-bottom: var(--space-2xl);
  }
}

@media (max-width: 480px) {
  :root {
    --text-4xl: 1.625rem;
    --text-3xl: 1.375rem;
  }

  .btn--lg {
    padding: 0.875rem 1.5rem;
    font-size: var(--text-sm);
  }
}
