:root {
  --primary: #111f62;
  --secondary: #223a8d;
  --accent: #3d5bd4;
  --bg: #f5f8ff;
  --surface: #ffffff;
  --text: #101426;
  --muted: #4e5978;
  --border: #dbe2ff;
  --success: #16a34a;
  --shadow: 0 12px 30px rgba(13, 34, 100, 0.12);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

.section {
  padding: 84px 0;
}

.section-title {
  font-size: clamp(1.8rem, 2.4vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 14px;
}

.section-subtitle {
  margin: 0 auto 38px;
  color: var(--muted);
  max-width: 760px;
}

.text-center {
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: all 0.25s ease;
}

.btn-primary {
  background: linear-gradient(130deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

.btn-outline {
  border-color: var(--border);
  color: var(--primary);
  background: #fff;
}

.btn-outline:hover {
  border-color: var(--secondary);
  transform: translateY(-2px);
}

.topbar {
  background: var(--primary);
  color: #fff;
  font-size: 0.9rem;
}

.topbar .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  padding: 10px 0;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all 0.28s ease;
}

.navbar.scrolled {
  border-color: var(--border);
  box-shadow: 0 8px 24px rgba(17, 31, 98, 0.1);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--primary);
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.menu {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu a {
  padding: 10px 12px;
  border-radius: 8px;
  color: #1f2a4d;
  font-weight: 500;
  transition: all 0.22s ease;
}

.menu a:hover,
.menu a.active {
  background: rgba(34, 58, 141, 0.1);
  color: var(--secondary);
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--primary);
  font-size: 1.8rem;
  line-height: 1;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 66px;
  background-color: #0f1a3d;
  background-image: url("../images/bg-hero-agricultura.png");
  background-size: cover;
  background-position: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(17, 31, 98, 0.88) 0%,
    rgba(17, 31, 98, 0.62) 42%,
    rgba(255, 255, 255, 0.22) 100%
  );
  z-index: 0;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
}

.hero h1 {
  color: #fff;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.25);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.12;
  margin: 0 0 16px;
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 24px;
  max-width: 620px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero .btn-outline {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
  backdrop-filter: blur(6px);
}

.hero .btn-outline:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: #fff;
}

.hero-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.stats {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stats article {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  backdrop-filter: blur(6px);
}

.stats strong {
  font-size: 1.2rem;
  color: var(--primary);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 8px 24px rgba(19, 35, 86, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(19, 35, 86, 0.16);
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--secondary);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  align-items: center;
}

.surface {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 22px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
  transition: border-color 0.2s ease;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.field {
  margin-bottom: 14px;
}

.error-msg {
  color: #dc2626;
  font-size: 0.82rem;
  min-height: 1rem;
}

.success-box {
  display: none;
  margin-top: 10px;
  color: var(--success);
  font-weight: 600;
}

.map-wrap iframe {
  width: 100%;
  min-height: 340px;
  border: 0;
  border-radius: var(--radius);
}

.footer {
  background: #0f163d;
  color: #dce4ff;
  padding: 42px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px;
}

.footer a {
  color: #dce4ff;
}

.copyright {
  margin-top: 20px;
  border-top: 1px solid rgba(220, 228, 255, 0.25);
  padding-top: 16px;
  font-size: 0.92rem;
}

.floating-actions {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.floating-actions a {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.floating-actions a:hover {
  transform: translateY(-4px);
  opacity: 0.94;
}

.wa {
  background: #25d366;
}

.fb {
  background: #1877f2;
}

.ig {
  background: linear-gradient(135deg, #f58529, #dd2a7b, #515bd4);
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 34px;
  border-bottom: 1px solid var(--border);
  background-color: #0f1a3d;
  background-image: url("../images/bg-campo-sostenible.png");
  background-size: cover;
  background-position: center;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(17, 31, 98, 0.86) 0%,
    rgba(17, 31, 98, 0.55) 50%,
    rgba(245, 248, 255, 0.35) 100%
  );
  z-index: 0;
  pointer-events: none;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero .section-title {
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.page-hero .section-subtitle {
  color: rgba(255, 255, 255, 0.92);
}

.section-agro {
  position: relative;
  overflow: hidden;
}

.section-agro::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      180deg,
      rgba(245, 248, 255, 0.9) 0%,
      rgba(245, 248, 255, 0.82) 100%
    ),
    url("../images/bg-semillas-hortalizas.png");
  background-size: cover;
  background-position: center;
  z-index: 0;
  pointer-events: none;
}

.section-agro .container {
  position: relative;
  z-index: 1;
}

.section-products {
  position: relative;
  overflow: hidden;
}

.section-products::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      180deg,
      rgba(245, 248, 255, 0.94) 0%,
      rgba(245, 248, 255, 0.9) 100%
    ),
    url("../images/bg-semillas-hortalizas.png");
  background-size: cover;
  background-position: center;
  z-index: 0;
  pointer-events: none;
}

.section-products .container {
  position: relative;
  z-index: 1;
}

.product-ai-note {
  margin: 0 0 14px;
  padding: 12px 16px;
  font-size: 0.92rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: 10px;
  max-width: 720px;
}

.product-toolbar {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 12px;
  margin-bottom: 16px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.products-grid .product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 260px;
  background-color: #1e2a5e;
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow: hidden;
}

.products-grid .product-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(165deg, rgba(15, 22, 61, 0.18) 0%, rgba(15, 22, 61, 0.9) 72%);
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.products-grid .product-card > * {
  position: relative;
  z-index: 1;
}

.products-grid .product-card.product-card--img-fail::after {
  background: linear-gradient(165deg, rgba(30, 42, 94, 0.92) 0%, rgba(17, 31, 98, 0.98) 100%);
}

.products-grid .product-card .pill {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.38);
  color: #eef2ff;
}

.products-grid .product-card h4 {
  margin: 0 0 8px;
  color: #fff;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.35);
}

.products-grid .product-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

.products-grid .product-card strong {
  color: #fff;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 18px;
}

.cv-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.cv-toolbar p {
  margin: 0;
  color: var(--muted);
  max-width: 520px;
}

.pdf-viewer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 72vh;
}

.pdf-viewer iframe {
  display: block;
  width: 100%;
  height: 72vh;
  min-height: 480px;
  border: 0;
}

.pdf-fallback {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  background: rgba(245, 248, 255, 0.9);
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}

.pdf-fallback a {
  color: var(--secondary);
  font-weight: 600;
  text-decoration: underline;
}

@media (max-width: 980px) {
  .hero-grid,
  .grid-3,
  .split,
  .contact-grid,
  .footer-grid,
  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-toolbar {
    grid-template-columns: 1fr;
  }

  .menu {
    position: fixed;
    top: 76px;
    right: 14px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: 12px;
    padding: 10px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    min-width: 220px;
  }

  .menu.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}
