/*
Theme Name: AGRONICS 4.0
Theme URI: https://globaltechgate.ro
Author: GLOBAL TECH GATE SRL
Description: Temă custom pentru proiectul AGRONICS 4.0 — sistem robotic eterogen pentru agricultură 4.0. Cod SMIS 334089, cofinanțat din FEDR prin PCIDIF 2021–2027.
Version: 1.0.0
Text Domain: agronics
*/

/* ================= AGRONICS 4.0 design tokens ================= */
:root {
  --eu-blue: #003399;
  --eu-yellow: #FFCC00;
  --deep-sky: #0A2A66;
  --agro-green: #2E8B57;
  --agro-green-700: #226b43;
  --lime: #8BC34A;
  --soil: #8B6F47;
  --snow: #F7F9FC;
  --ink: #1A1A1A;
  --ash: #555E6B;
  --line: #E5E9F0;
  --line-soft: #EEF1F6;
  --white: #FFFFFF;
  --font-sans: "Ubuntu", "Arial", "Calibri", system-ui, sans-serif;
  --font-mono: "Ubuntu Mono", "JetBrains Mono", ui-monospace, monospace;
  --shadow-1: 0 1px 2px rgba(10, 42, 102, 0.04), 0 1px 1px rgba(10, 42, 102, 0.03);
  --shadow-2: 0 4px 16px rgba(10, 42, 102, 0.06), 0 1px 2px rgba(10, 42, 102, 0.04);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-sans); color: var(--ink); background: white; -webkit-font-smoothing: antialiased; }
::selection { background: var(--agro-green); color: white; }
a { transition: color 120ms ease; }
img { max-width: 100%; height: auto; }

/* ================= Type ================= */
.t-h1 { font-size: clamp(30px, 5.2vw, 46px); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; color: var(--deep-sky); }
.t-h2 { font-size: clamp(24px, 3.6vw, 32px); line-height: 1.18; font-weight: 600; letter-spacing: -0.01em; color: var(--deep-sky); }
.t-h3 { font-size: clamp(19px, 2.4vw, 22px); line-height: 1.25; font-weight: 600; color: var(--deep-sky); }
.t-h4 { font-size: 17px; line-height: 1.3; font-weight: 600; color: var(--ink); }
.t-body { font-size: 16px; line-height: 1.6; color: var(--ink); }
.t-lead { font-size: clamp(15px, 1.8vw, 18px); line-height: 1.55; color: var(--ink); }
.t-meta { font-size: 13px; line-height: 1.4; color: var(--ash); letter-spacing: 0.02em; }
.t-eyebrow { font-size: 12px; line-height: 1; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--agro-green); }
.t-mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }

/* ================= Buttons ================= */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 6px;
  font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent;
  transition: background-color 120ms ease, border-color 120ms ease;
  text-decoration: none;
}
.btn-primary { background: var(--agro-green); color: white; }
.btn-primary:hover { background: var(--agro-green-700); }
.btn-secondary { background: white; color: var(--deep-sky); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--deep-sky); }
.btn-ghost { background: transparent; color: var(--deep-sky); padding: 8px 0; }
.arrow::after { content: "\2192"; font-weight: 400; margin-left: 4px; }

/* ================= Layout helpers ================= */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1280px; margin: 0 auto; padding: 0 48px; }

/* ================= Site header (boxed) ================= */
.site-header { position: sticky; top: 0; z-index: 50; background: white; }
.compliance-bar { background: white; border-bottom: 1px solid var(--line); padding: 10px 24px; }
.compliance-bar-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.compliance-lockups { display: flex; align-items: center; gap: 28px; }
.compliance-lockups a { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
.compliance-lockups a:hover { opacity: 1; text-decoration: none; }
.compliance-divider { width: 1px; height: 36px; background: var(--line); }
.compliance-meta { font-size: 12px; color: var(--ash); font-family: var(--font-mono); letter-spacing: 0.04em; }

.nav-bar { padding: 18px 24px; background: white; border-bottom: 1px solid var(--line); }
.nav-bar-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.nav-menu { display: flex; align-items: center; gap: 28px; list-style: none; padding: 0; margin: 0; }
.nav-menu a { font-size: 14px; font-weight: 500; color: var(--ash); text-decoration: none; position: relative; padding-bottom: 4px; transition: color 150ms ease; }
.nav-menu a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -19px; height: 2px;
  background: var(--agro-green); transform: scaleX(0); transform-origin: center;
  transition: transform 150ms ease;
}
.nav-menu a:hover { color: var(--deep-sky); }
.nav-menu a:hover::after { transform: scaleX(1); background: var(--ash); }
.nav-menu .current-menu-item > a, .nav-menu .current_page_item > a {
  color: var(--deep-sky);
  /* Fake bold via text-shadow so the active item doesn't reflow the menu */
  text-shadow: 0.4px 0 0 currentColor, -0.4px 0 0 currentColor;
}
.nav-menu .current-menu-item > a::after, .nav-menu .current_page_item > a::after {
  transform: scaleX(1); background: var(--agro-green);
}

/* ================= Lockups ================= */
.eu-lockup { display: inline-flex; align-items: center; gap: 12px; }
.eu-lockup .eu-flag { width: 56px; height: 38px; display: block; }
.eu-lockup-text { font-size: 12px; line-height: 1.15; color: #003399; font-weight: 600; white-space: nowrap; }
.gov-lockup { display: inline-flex; align-items: center; gap: 10px; }
.gov-lockup img { height: 42px; width: auto; display: block; }
.gov-lockup-text { font-size: 11px; line-height: 1.15; color: #0A2A66; }
.gov-lockup-text strong { font-weight: 700; display: block; }

.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.wordmark-text { font-family: "Ubuntu", Arial, sans-serif; font-weight: 700; font-size: 20px; letter-spacing: 0.02em; color: var(--deep-sky); line-height: 1; }
.wordmark-text .accent { color: var(--agro-green); margin-left: 6px; }

/* ================= Footer ================= */
.site-footer { background: var(--deep-sky); color: white; padding: 56px 48px 32px; }
.site-footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 0.85fr 0.95fr 1.3fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-col h4 { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin: 0 0 16px; font-weight: 600; }
.footer-col a { display: block; margin-bottom: 10px; font-size: 14px; color: rgba(255,255,255,0.78); text-decoration: none; }
.footer-col a:hover { color: white; }
.footer-brand-text { margin-top: 16px; font-size: 13px; line-height: 1.6; color: rgba(255,255,255,0.78); max-width: 380px; }
.footer-lockup-card { display: flex; align-items: center; gap: 20px; margin-top: 24px; padding: 16px; background: var(--snow); border-radius: 4px; }
.footer-lockup-card .compliance-divider { margin: 0; }
.footer-lockup-card a:last-of-type { margin-left: 0; }
.footer-lockup-card a { display: inline-flex; align-items: center; margin: 0; }
.footer-lockup-card a { text-decoration: none; color: inherit; }
.footer-lockup-card a:hover { opacity: 1; text-decoration: none; }
.footer-lockup-card .compliance-divider { background: var(--line); }
.footer-beneficiar-name { font-size: 14px; color: white; font-weight: 600; margin-bottom: 14px; }
.ext-arrow { display: inline-block; vertical-align: baseline; margin-left: 4px; opacity: 0.7; color: currentColor; }
.footer-mailto { font-size: 13px; color: white; text-decoration: none; transition: opacity 150ms ease; }
.footer-mailto:hover { color: white; opacity: 0.8; }
.footer-address { font-size: 13px; color: rgba(255,255,255,0.78); line-height: 1.55; }
.footer-cui-block { padding-top: 12px; margin-top: 14px; border-top: 1px solid rgba(255,255,255,0.12); display: grid; gap: 6px; font-size: 12px; color: rgba(255,255,255,0.6); }
.footer-cui-block .label { color: rgba(255,255,255,0.45); }
.footer-cui-block .value { font-family: var(--font-mono); color: rgba(255,255,255,0.85); }

.footer-legal { padding-top: 28px; font-size: 12px; color: rgba(255,255,255,0.65); line-height: 1.6; display: grid; gap: 14px; }
.footer-legal a { color: white; text-decoration: underline; }
.footer-bottom-bar { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.5); }
.footer-bottom-bar a { color: rgba(255,255,255,0.5); text-decoration: none; }
.footer-bottom-bar .links { display: flex; gap: 24px; }

/* ================= Hover card ================= */
/* Border de bază pus din CSS (NU inline) ca să poată fi suprascris de :hover și .is-touched. */
.hover-card { border: 1px solid var(--line); transition: border-color 200ms ease, transform 200ms ease; }
/* "Trace" — odată ce mouse-ul a trecut, borderul rămâne (deep-sky) până la refresh. */
.hover-card.is-touched { border-color: var(--deep-sky); }
/* Hover state — verde (deep-sky pe varianta blue). Pus DUPĂ .is-touched ca să câștige la egalitate de specificitate. */
.hover-card:hover,
.hover-card.hc-green:hover { border-color: var(--agro-green); }
.hover-card.hc-blue:hover { border-color: var(--deep-sky); }
/* Lift-up — doar pe cardurile cu .hc-lift (carduri de comunicate / CTA strip etc.) */
.hover-card.hc-lift:hover { transform: translateY(-2px); }

/* ================= Section paddings ================= */
.section { padding: 72px 48px; }
.section-snow { background: var(--snow); }
.section-white { background: white; }

/* ================= Hamburger (mobile) ================= */
.nav-toggle-checkbox { display: none; }
.nav-toggle { display: none; cursor: pointer; width: 40px; height: 40px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--deep-sky); border-radius: 1px; transition: transform 200ms ease, opacity 200ms ease; }

/* ================= Responsive ================= */
@media (max-width: 880px) {
  /* Header / nav */
  .compliance-meta { display: none; }
  .compliance-bar-inner { justify-content: center; }
  .nav-toggle { display: inline-flex; }
  .nav-bar-inner > .btn-primary,
  .nav-bar-inner > a.btn-primary { display: none; }
  .nav-wrap {
    position: absolute; top: 100%; left: 0; right: 0;
    background: white; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-2);
    max-height: 0; overflow: hidden; transition: max-height 250ms ease;
  }
  .nav-toggle-checkbox:checked ~ .nav-wrap { max-height: 80vh; }
  .nav-toggle-checkbox:checked ~ .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle-checkbox:checked ~ .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-toggle-checkbox:checked ~ .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-bar { position: relative; }
  .nav-menu { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 16px; }
  .nav-menu li { border-bottom: 1px solid var(--line-soft); }
  .nav-menu li:last-child { border-bottom: 0; }
  .nav-menu a { display: block; padding: 14px 0; font-size: 15px; }
  .nav-menu a::after, .nav-menu .current-menu-item > a::after, .nav-menu .current_page_item > a::after { display: none; }

  /* Layouts: stack everything */
  main section > div[style*="grid-template-columns"],
  main section div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  /* Section padding shrink */
  main section[style*="padding:"], main section > div[style*="padding:"] {
    padding-left: 20px !important; padding-right: 20px !important;
  }
  main section[style*="padding:72px"], main section[style*="padding:80px"], main section[style*="padding:56px"] {
    padding-top: 48px !important; padding-bottom: 48px !important;
  }
  .section { padding: 48px 20px; }
  .container, .container-wide { padding: 0 20px; }

  /* Hero image: drop fixed height */
  main section img[style*="height:380px"] { height: auto !important; max-height: 320px; }
  /* NDVI floating chip: don't overflow */
  main section div[style*="position:absolute"][style*="bottom:-24px"] {
    position: static !important; margin-top: 16px;
  }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .site-footer { padding: 40px 20px 24px; }
  .footer-bottom-bar { flex-direction: column; gap: 12px; }

  /* Hover-card inner grids (e.g., 80px 1fr 100px) → stack */
  .hover-card[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}

@media (max-width: 600px) {
  /* Compliance bar: keep text, just tighten spacing */
  .compliance-lockups { gap: 14px; }
  .compliance-lockups .eu-lockup { gap: 8px; }
  .compliance-lockups .gov-lockup { gap: 8px; }
  .compliance-divider { height: 32px; }
  .eu-lockup .eu-flag { height: 32px !important; }
  .gov-lockup img { height: 32px; }
  .eu-lockup-text { font-size: 10px; }
  .gov-lockup-text { font-size: 10px; }

  /* Footer lockup card: keep EU/GOV side-by-side but tighter */
  .footer-lockup-card { padding: 12px; gap: 14px; flex-wrap: wrap; }

  /* Section paddings even tighter */
  main section[style*="padding:"], main section > div[style*="padding:"] {
    padding-left: 16px !important; padding-right: 16px !important;
  }
  main section[style*="padding:72px"], main section[style*="padding:80px"], main section[style*="padding:56px"] {
    padding-top: 36px !important; padding-bottom: 36px !important;
  }
  .section { padding: 36px 16px; }
  .container, .container-wide { padding: 0 16px; }

  /* Footer bottom: stack links */
  .footer-bottom-bar .links { flex-direction: column; gap: 8px; }
}

/* ===== Obiective specifice grid ===== */
@media (max-width: 880px) {
  .ob-specifice-grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: none !important;
    grid-auto-flow: row !important;
  }
}

/* ===== SRE Table ===== */
.sre-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 880px) {
  .sre-desktop { display: none !important; }
  .sre-mobile  { display: flex !important; }
}
