:root {
  --verde: #16A34A;
  --verde-oscuro: #128a3e;
  --negro: #111111;
  --crema: #F8F3E8;
  --gris-texto: #4b4b4b;
  --max-width: 1100px;
  --radio: 14px;
  --sombra: 0 10px 30px rgba(17, 17, 17, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background-color: var(--crema);
  color: var(--negro);
  line-height: 1.6;
}

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

a {
  color: var(--verde);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* ---------- Header ---------- */

.site-header {
  background-color: var(--negro);
  color: var(--crema);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--crema);
  text-decoration: none;
}

.logo .dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--verde);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav a {
  color: var(--crema);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--verde);
  text-decoration: none;
}

.nav .btn {
  margin-left: 8px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--crema);
  font-size: 1.6rem;
  cursor: pointer;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  background-color: var(--verde);
  color: #ffffff !important;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none !important;
  transition: background-color 0.2s ease, transform 0.15s ease;
  border: none;
}

.btn:hover {
  background-color: var(--verde-oscuro);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--crema);
  color: var(--crema) !important;
}

.btn-outline:hover {
  background-color: var(--crema);
  color: var(--negro) !important;
}

/* ---------- Hero ---------- */

.hero {
  background-color: var(--negro);
  color: var(--crema);
  padding: 90px 0 100px;
  text-align: center;
}

.hero .eyebrow {
  display: inline-block;
  color: var(--verde);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  max-width: 820px;
  margin: 0 auto 20px;
  line-height: 1.2;
}

.hero .lema {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--verde);
  margin-bottom: 36px;
}

.hero .descripcion {
  max-width: 620px;
  margin: 0 auto 36px;
  color: #d8d4cc;
  font-size: 1.05rem;
}

/* ---------- Sections ---------- */

.section {
  padding: 80px 0;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
}

.section-subtitle {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 50px;
  color: var(--gris-texto);
  font-size: 1.05rem;
}

.section-alt {
  background-color: #ffffff;
}

/* ---------- Cards Grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.card {
  background-color: #ffffff;
  border-radius: var(--radio);
  padding: 32px 28px;
  box-shadow: var(--sombra);
  border: 1px solid rgba(17, 17, 17, 0.05);
}

.section-alt .card {
  background-color: var(--crema);
  box-shadow: none;
}

.card .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: rgba(22, 163, 74, 0.12);
  color: var(--verde);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 18px;
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.card p {
  color: var(--gris-texto);
  font-size: 0.98rem;
}

/* ---------- CTA final ---------- */

.cta {
  background-color: var(--verde);
  color: #ffffff;
  text-align: center;
  padding: 70px 0;
}

.cta h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.cta p {
  max-width: 540px;
  margin: 0 auto 30px;
  color: rgba(255, 255, 255, 0.9);
}

.cta .btn {
  background-color: var(--negro);
}

.cta .btn:hover {
  background-color: #000000;
}

/* ---------- Footer ---------- */

.site-footer {
  background-color: var(--negro);
  color: var(--crema);
  padding: 50px 0 30px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-brand .logo {
  margin-bottom: 10px;
}

.footer-brand p {
  color: #b9b5ac;
  max-width: 320px;
  font-size: 0.95rem;
}

.footer-links h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--verde);
  margin-bottom: 14px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--crema);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--verde);
}

.footer-bottom {
  border-top: 1px solid rgba(248, 243, 232, 0.12);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: #9c988f;
}

/* ---------- Post cards (home + blog) ---------- */

.home-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 36px;
}

.post-card {
  background-color: #ffffff;
  border-radius: var(--radio);
  padding: 28px 26px 24px;
  box-shadow: var(--sombra);
  border: 1px solid rgba(17, 17, 17, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(17, 17, 17, 0.13);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.post-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
}
.post-card h2 a { color: var(--negro); }
.post-card h2 a:hover { color: var(--verde); text-decoration: none; }

.post-resumen {
  color: var(--gris-texto);
  font-size: 0.96rem;
  line-height: 1.55;
  flex: 1;
  margin-bottom: 20px;
}

.post-categoria {
  display: inline-block;
  background-color: rgba(22, 163, 74, 0.12);
  color: var(--verde);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 999px;
}

.post-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--verde);
  display: inline-flex;
  align-items: center;
  margin-top: 16px;
}
.post-link:hover { text-decoration: none; opacity: 0.8; }

.section-ver-mas {
  text-align: center;
  margin-top: 8px;
}

/* ---------- Newsletter ---------- */

.newsletter {
  background-color: var(--negro);
  color: var(--crema);
  padding: 72px 0;
  text-align: center;
}

.newsletter h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.newsletter > .container > p {
  color: #d8d4cc;
  margin-bottom: 36px;
  font-size: 1.05rem;
}

.newsletter-fields {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.newsletter-fields input {
  padding: 14px 18px;
  border-radius: 999px;
  border: 2px solid rgba(248, 243, 232, 0.2);
  background-color: rgba(248, 243, 232, 0.07);
  color: var(--crema);
  font-size: 0.98rem;
  font-family: inherit;
  width: 220px;
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-fields input::placeholder {
  color: rgba(248, 243, 232, 0.45);
}

.newsletter-fields input:focus {
  border-color: var(--verde);
}

.newsletter-aviso {
  font-size: 0.82rem;
  color: rgba(248, 243, 232, 0.45);
  margin-top: 4px;
}

.nl-exito {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: rgba(22, 163, 74, 0.15);
  border: 1px solid rgba(22, 163, 74, 0.4);
  border-radius: var(--radio);
  padding: 18px 28px;
  max-width: 520px;
  margin: 0 auto;
  color: #6ee79a;
  font-weight: 600;
  font-size: 1rem;
}

.nl-error {
  font-size: 0.88rem;
  color: #f87171;
  margin-top: 10px;
}

@media (max-width: 600px) {
  .newsletter-fields input {
    width: 100%;
  }
  .newsletter-fields {
    flex-direction: column;
    align-items: stretch;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
  }
  .newsletter-fields .btn {
    border-radius: 999px;
  }
}

/* ---------- Legal pages ---------- */

.legal {
  padding: 70px 0 90px;
}

.legal h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 8px;
}

.legal .actualizado {
  color: var(--gris-texto);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

.legal h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 36px 0 12px;
  color: var(--negro);
}

.legal h2 .num {
  color: var(--verde);
  margin-right: 8px;
}

.legal p,
.legal li {
  color: var(--gris-texto);
  font-size: 1rem;
  margin-bottom: 12px;
}

.legal ul {
  padding-left: 22px;
  margin-bottom: 12px;
}

.legal strong {
  color: var(--negro);
}

.legal a {
  word-break: break-word;
}

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--negro);
    flex-direction: column;
    align-items: flex-start;
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav.open {
    max-height: 320px;
    padding-bottom: 20px;
  }

  .nav a {
    padding: 10px 0;
    width: 100%;
  }

  .nav .btn {
    margin-left: 0;
    margin-top: 8px;
  }

  .site-header {
    position: relative;
  }

  .footer-grid {
    flex-direction: column;
  }
}
