/* ==========================================================================
   Fijate Tools - Calculadora de riego por goteo y fertirrigación
   Tokens corporativos, layout canónico y visualizador de riego
   ========================================================================== */

:root {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Paleta agua y riego */
  --water-900: #082f49;
  --water-800: #075985;
  --water-700: #0369a1;
  --water-600: #0284c7;
  --water-500: #0ea5e9;
  --water-100: #e0f2fe;
  --water-50:  #f0f9ff;

  --fert-green: #15803d;
  --fert-green-light: #dcfce7;

  --bg-page: #f8fafc;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-border-hover: #cbd5e1;
  --card-shadow: 0 4px 20px -2px rgba(2, 132, 199, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.03);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;

  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #f0f9ff;
  --primary-text: #ffffff;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg-page: #070d14;
  --card-bg: #0d1726;
  --card-border: #1a293d;
  --card-border-hover: #294061;
  --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.6);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --primary: #38bdf8;
  --primary-hover: #0ea5e9;
  --primary-light: #082136;
  --primary-text: #04121d;

  --water-100: #0c2d44;
  --fert-green: #4ade80;
  --fert-green-light: rgba(74, 222, 128, 0.16);
}

body {
  font-family: var(--font-main);
  background: var(--bg-page);
  color: var(--text-main);
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .brand-title, .section-title, .hero-title {
  font-family: var(--font-heading);
}

.mono, code {
  font-family: var(--font-mono);
}

/* Suite banner switcher */
.suite-nav-strip {
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  padding: 0.6rem 1rem;
}
.suite-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.suite-nav-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.suite-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.suite-link-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-muted);
  background: var(--bg-page);
  border: 1px solid var(--card-border);
  transition: var(--transition);
}
.suite-link-item:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.suite-link-item.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
}

/* Tool main layout */
.tool-layout {
  max-width: 1240px;
  margin: 1.25rem auto 3rem;
  padding: 0 1rem;
  width: 100%;
}
.tool-with-sidebar {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

/* Hero card */
.hero-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
}
.hero-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.35rem;
}
.hero-tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Form section & tabs */
.form-section-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
}
.form-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  background: none;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.tab-btn:hover {
  color: var(--primary);
  background: var(--bg-page);
}
.tab-btn.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.inputs-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.field-group label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}
.field-group select,
.field-group input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: var(--bg-page);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}
.field-group select {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  padding-right: 36px;
}
.field-group select:focus,
.field-group input:focus {
  border-color: var(--primary);
}

/* Results panel with large gauges / cards */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.result-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.result-card.highlight {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--card-bg) 60%, var(--primary-light));
}
.result-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.result-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.result-card-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  margin: 0.2rem 0;
  font-family: var(--font-mono);
}
.result-card-sub {
  font-size: 0.82rem;
  color: var(--text-subtle);
  margin-top: 0.35rem;
}

/* Water frequency schedule table */
.schedule-table-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
}
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.88rem;
}
.schedule-table th, .schedule-table td {
  padding: 0.75rem;
  border: 1px solid var(--card-border);
  text-align: left;
}
.schedule-table th {
  background: var(--bg-page);
  font-weight: 700;
}

/* Fertigation box */
.fert-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
}
.fert-calculator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}
.fert-result-box {
  background: var(--bg-page);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.fert-dose-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--fert-green);
  font-family: var(--font-mono);
  margin: 0.3rem 0;
}

/* Editorial guide */
.seo-guide-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--card-shadow);
  margin-top: 2rem;
}
.seo-guide-section h2 {
  font-size: 1.35rem;
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
}
.seo-guide-section h2:first-of-type {
  margin-top: 0;
}
.seo-guide-section p, .seo-guide-section li {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}
