/* Explotaciones Agrarias Campoverde (GREENFIELD) — hoja de estilos principal */

:root {
  --color-bg: #f6f6f6;
  --color-surface: #ffffff;
  --color-ink: #201b1a;
  --color-ink-soft: #4a4140;
  --color-ink-muted: #756a68;
  --color-green: #0f9d4a;
  --color-green-dark: #0b7a3a;
  --color-border: #e4e0dd;
  --color-header: #171414;
  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1180px;
  --radius: 4px;
  --shadow-card: 0 8px 24px rgba(32, 27, 26, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink-soft);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--color-green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-ink);
  line-height: 1.2;
  margin: 0 0 0.6em;
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: 0.06em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--color-green);
  color: #fff; padding: 12px 18px; z-index: 1000; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--color-green);
  outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--color-header);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 112px;
}
.site-header .logo img { height: 80px; width: auto; }
.site-header .logo { display: flex; align-items: center; flex-shrink: 0; }

@media (max-width: 1024px) {
  .site-header .container { min-height: 92px; }
  .site-header .logo img { height: 64px; }
}
@media (max-width: 640px) {
  .site-header .container { min-height: 72px; }
  .site-header .logo img { height: 48px; }
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid #fff;
  color: #fff;
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: #f2f2f2;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  border-bottom-color: var(--color-green);
  color: #fff;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--color-header);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .main-nav.is-open { max-height: 420px; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 24px 20px; }
  .main-nav a { display: block; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 96px 0 84px;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.72), rgba(10,10,10,0.55));
}
.hero .container { position: relative; }
.hero h1 { color: #fff; margin-bottom: 0.3em; }
.hero p.subtitle { font-family: var(--font-display); font-style: italic; font-size: 1.2rem; color: #ecece9; }

.hero--compact { padding: 64px 0 56px; }
.hero p.subtitle.subtitle--lg {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---------- Hero — portada a pantalla completa, con parallax al hacer scroll ---------- */
.hero--home {
  position: relative;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0;
  background: var(--color-header);
}

.hero__bg {
  position: absolute;
  inset: -10% -6%;
  background-size: cover;
  background-position: center;
  will-change: transform;
  transform: translateY(0) scale(1.08);
}
.hero--home::before {
  background: linear-gradient(180deg, rgba(8,10,9,0.78), rgba(8,10,9,0.5) 55%, rgba(8,10,9,0.82));
  z-index: 1;
}
.hero__glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(480px circle at 20% 20%, rgba(15,157,74,0.35), transparent 60%),
    radial-gradient(420px circle at 82% 75%, rgba(15,157,74,0.22), transparent 60%);
  mix-blend-mode: screen;
  animation: heroGlowDrift 16s ease-in-out infinite;
}
.hero--home .container { z-index: 2; width: 100%; }
@keyframes heroGlowDrift {
  0%, 100% { transform: translate(-4%, -4%) scale(1); opacity: 0.8; }
  50% { transform: translate(4%, 5%) scale(1.15); opacity: 1; }
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-anim {
  opacity: 0;
  animation: heroFadeUp 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  animation-delay: var(--d, 0s);
}

@media (prefers-reduced-motion: reduce) {
  .hero__bg { transform: none !important; }
  .hero__glow { animation: none; }
}
@media (max-width: 640px) {
  .hero--home h1 { font-size: 2.1rem; }
}

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.section-alt { background: var(--color-surface); }
.section-title { text-align: center; margin-bottom: 0.3em; }
.section-lead {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 2.4em;
  color: var(--color-ink-muted);
}

.divider {
  width: 64px; height: 3px; background: var(--color-green);
  margin: 18px auto 0; border: 0;
}

/* ---------- Cards / Grids ---------- */
.grid {
  display: grid;
  gap: 28px;
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-card);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 36px rgba(32, 27, 26, 0.14);
}
.card h3 { margin-bottom: 0.4em; }
.card img.icon { width: 56px; height: 56px; margin-bottom: 16px; }

.icon-badge {
  width: 92px; height: 92px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #e7f6ec;
  margin: 0 auto 20px;
  transition: background 0.35s ease;
}
.icon-badge svg {
  width: 46px; height: 46px;
  stroke: var(--color-green-dark);
  display: block;
  animation: iconSpin 22s linear infinite;
}
.card:hover .icon-badge { background: var(--color-green); }
.card:hover .icon-badge svg { stroke: #fff; }
@keyframes iconSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .icon-badge svg { animation: none; }
}

/* ---------- Scroll reveal (progressive enhancement) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal-stagger.is-visible { transition-delay: var(--reveal-delay, 0s); }

.news-card, .project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.news-card img, .project-card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; transition: transform 0.4s ease; }
.news-card .body, .project-card .body { padding: 20px 22px; flex: 1; display: flex; flex-direction: column; }
.news-card time { font-size: 0.85rem; color: var(--color-ink-muted); }
.news-card h3 a { color: var(--color-ink); }
.news-card h3 a:hover { color: var(--color-green-dark); }
.card-excerpt { color: var(--color-ink-muted); font-size: 0.96rem; flex: 1; }

.project-card h3 a.stretched-link {
  color: var(--color-ink);
  text-decoration: none;
}
.project-card h3 a.stretched-link::after {
  content: "";
  position: absolute;
  inset: 0;
}
.project-card:hover,
.project-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(32, 27, 26, 0.14);
}
.project-card:hover img { transform: scale(1.05); }
.project-card h3 { display: flex; align-items: center; gap: 8px; }
.project-card h3 .arrow { color: var(--color-green-dark); transition: transform 0.25s ease; }
.project-card:hover h3 .arrow { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) {
  .project-card, .project-card img, .project-card h3 .arrow { transition: none; }
  .project-card:hover { transform: none; }
  .project-card:hover img { transform: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--color-green);
  color: #fff;
  padding: 13px 30px;
  border-radius: var(--radius);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  border: 2px solid var(--color-green);
  cursor: pointer;
  min-height: 44px;
}
.btn:hover { background: var(--color-green-dark); border-color: var(--color-green-dark); text-decoration: none; }
.btn--outline { background: transparent; color: #fff; }
.btn--outline:hover { background: rgba(255,255,255,0.1); }
.btn--dark { background: var(--color-header); border-color: var(--color-header); }
.btn--dark:hover { background: #000; border-color: #000; }

/* ---------- Team / Person ---------- */
.person {
  text-align: center;
}
.person img {
  border-radius: 50%;
  width: 220px; height: 220px;
  object-fit: cover;
  margin: 0 auto 18px;
  border: 4px solid var(--color-surface);
  box-shadow: var(--shadow-card);
}

.founder {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 44px;
  align-items: center;
}
.founder figure { margin: 0; }
.founder img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.founder figcaption {
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--color-ink-muted);
  font-style: italic;
  text-align: center;
}
@media (max-width: 760px) {
  .founder { grid-template-columns: 1fr; }
  .founder figure { max-width: 320px; margin: 0 auto; }
}

/* ---------- Timeline / list ---------- */
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
  padding-left: 30px;
  position: relative;
  margin-bottom: 10px;
}
.check-list li::before {
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 10px; height: 10px;
  background: var(--color-green);
  border-radius: 50%;
}

.check-list--lg {
  max-width: 780px;
  margin: 0 auto;
}
.check-list--lg li {
  padding-left: 38px;
  margin-bottom: 18px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-ink);
  line-height: 1.4;
}
.check-list--lg li::before {
  top: 11px;
  width: 13px; height: 13px;
}

.marca-espana {
  max-width: 640px;
  margin: 0 auto 3em;
  padding: 20px 28px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info dt { font-weight: 700; color: var(--color-ink); margin-top: 18px; }
.contact-info dd { margin: 4px 0 0; color: var(--color-ink-soft); }

form.contact-form {
  display: grid;
  gap: 18px;
}
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-weight: 600; font-size: 0.92rem; color: var(--color-ink); }
.form-row input, .form-row textarea {
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-surface);
}
.form-row input:invalid[data-touched="true"], .form-row textarea:invalid[data-touched="true"] {
  border-color: #c0392b;
}
.form-note { font-size: 0.85rem; color: var(--color-ink-muted); }
.form-status { font-size: 0.92rem; padding: 10px 14px; border-radius: var(--radius); display: none; }
.form-status.is-visible { display: block; }
.form-status.is-success { background: #e6f6ec; color: var(--color-green-dark); }
.form-status.is-error { background: #fbeae8; color: #c0392b; }
.consent-row { display: flex; align-items: flex-start; gap: 10px; }
.consent-row input { width: 20px; height: 20px; margin-top: 2px; }
.consent-row label { font-size: 0.9rem; color: var(--color-ink-soft); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-header);
  color: #cfcac8;
  padding: 56px 0 28px;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { color: #fff; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.08em; }
.site-footer a { color: #cfcac8; }
.site-footer a:hover { color: var(--color-green); }
.footer-logo img { height: 40px; width: auto; margin-bottom: 14px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: #948b89;
}
.footer-bottom a { color: #948b89; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--color-ink-muted);
  padding: 16px 0 0;
}
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--color-border); }
.breadcrumbs a { color: var(--color-ink-muted); }

/* ---------- Article ---------- */
.article-body { max-width: 760px; margin: 0 auto; }
.article-body h2 { margin-top: 1.6em; }
.article-meta { color: var(--color-ink-muted); font-size: 0.9rem; margin-bottom: 2em; }
.article-hero { max-width: 900px; margin: 0 auto 2.4em; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); }
.source-note {
  margin-top: 2.4em; padding: 18px 20px;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  font-size: 0.92rem; color: var(--color-ink-muted);
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-lg { margin-top: 48px; }
.bg-dark {
  background: var(--color-header); color: #efe9e7;
}
.bg-dark h2 { color: #fff; }
.stat { text-align: center; }
.stat strong { font-family: var(--font-display); font-size: 2.4rem; color: var(--color-green); display: block; }

.error-page { text-align: center; padding: 120px 0; }
.error-page h1 { font-size: 5rem; color: var(--color-green); }

/* ---------- Botón flotante de WhatsApp ---------- */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 58px; height: 58px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  z-index: 90;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.whatsapp-float:hover { transform: scale(1.08); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34); }
.whatsapp-float svg { width: 30px; height: 30px; }
@media (max-width: 480px) {
  .whatsapp-float { right: 14px; bottom: 14px; width: 52px; height: 52px; }
  .whatsapp-float svg { width: 26px; height: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-float:hover { transform: none; }
}

/* ---------- Mapas de Google (delegaciones) ---------- */
.map-card h3 { margin-bottom: 14px; }
.map-embed {
  position: relative;
  width: 100%;
  height: 300px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--color-surface);
}
.map-embed iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

@media (max-width: 480px) {
  section { padding: 44px 0; }
  .hero { padding: 72px 0 56px; }
}
