/* ==========================================================================
   Agrohouse Greenhouse Control — estilos del sitio
   ========================================================================== */

:root {
  --green: #6bc52f;
  --green-dark: #457f1e;
  --green-link-hover: #3e731b;
  --blue: #47b5ed;
  --blue-dark: #148cca;
  --black: #232323;
  --white: #ffffff;
  --font: 'Jost', sans-serif;
  --nav-h: 70px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p {
  margin-top: 0;
  font-weight: 400;
  line-height: 1;
  word-break: break-word;
}

h1, h2, h3, h4, h5, h6 { margin-bottom: .5rem; }
p { margin-bottom: 1rem; }
strong, b { font-weight: 700; }
img { max-width: 100%; height: auto; vertical-align: middle; border: 0; }
a { color: var(--green); text-decoration: none; transition: color .2s ease-in-out; }
button, input, textarea { font: inherit; }

section {
  position: relative;
  background-color: var(--white);
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: cover;
}

/* ---------- Tipografía (escala original) ---------- */
.display-1 { font-size: 4.6rem; line-height: 1.1; }
.display-2 { font-size: 3rem;   line-height: 1.1; }
.display-4 { font-size: 1.1rem; line-height: 1.5; }
.display-5 { font-size: 2rem;   line-height: 1.5; }
.display-7 { font-size: 1.2rem; line-height: 1.5; }


@media (max-width: 992px) {
  .display-1 { font-size: 3.68rem; }
}
@media (max-width: 768px) {
  .display-1 {
    font-size: calc(2.26rem + (4.6 - 2.26) * ((100vw - 20rem) / (48 - 20)));
    line-height: calc(1.1 * (2.26rem + (4.6 - 2.26) * ((100vw - 20rem) / (48 - 20))));
  }
  .display-2 {
    font-size: calc(1.7rem + (3 - 1.7) * ((100vw - 20rem) / (48 - 20)));
    line-height: calc(1.3 * (1.7rem + (3 - 1.7) * ((100vw - 20rem) / (48 - 20))));
  }
  .display-4 {
    font-size: calc(1.035rem + (1.1 - 1.035) * ((100vw - 20rem) / (48 - 20)));
    line-height: calc(1.4 * (1.035rem + (1.1 - 1.035) * ((100vw - 20rem) / (48 - 20))));
  }
  .display-5 {
    font-size: calc(1.35rem + (2 - 1.35) * ((100vw - 20rem) / (48 - 20)));
    line-height: calc(1.4 * (1.35rem + (2 - 1.35) * ((100vw - 20rem) / (48 - 20))));
  }
  .display-7 {
    font-size: calc(1.07rem + (1.2 - 1.07) * ((100vw - 20rem) / (48 - 20)));
    line-height: calc(1.4 * (1.07rem + (1.2 - 1.07) * ((100vw - 20rem) / (48 - 20))));
  }
}

.center { text-align: center; }
.green  { color: var(--green); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 15px;
}
@media (min-width: 576px)  { .container { max-width: 540px; } }
@media (min-width: 768px)  { .container { max-width: 720px; } }
@media (min-width: 992px)  { .container { max-width: 960px; padding: 0 16px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }

.container-fluid { width: 100%; padding: 0 15px; }
@media (min-width: 768px) { .container-fluid { padding: 0 32px; } }

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}
.row > * { width: 100%; padding: 0 15px; }
.row.center-x { justify-content: center; }

@media (min-width: 768px) {
  .md-6 { flex: 0 0 50%; max-width: 50%; }
  .md-grow { flex: 1 0 0%; max-width: 100%; }
}
@media (min-width: 992px) {
  .lg-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .lg-6  { flex: 0 0 50%; max-width: 50%; }
  .lg-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
  .lg-grow { flex: 1 0 0%; max-width: 100%; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: .6rem;
  padding: .6rem 1.2rem;
  font-weight: 600;
  font-style: normal;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--white);
  cursor: pointer;
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .2);
  transition: all .2s ease-in-out;
}
.btn:hover, .btn:focus { box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .2); color: var(--white); }

.btn-green { background: var(--green); border-color: var(--green); }
.btn-green:hover, .btn-green:focus { background: var(--green-dark); border-color: var(--green-dark); }

.btn-blue { background: var(--blue); border-color: var(--blue); }
.btn-blue:hover, .btn-blue:focus { background: var(--blue-dark); border-color: var(--blue-dark); }

.btn-black { background: var(--black); border-color: var(--black); }
.btn-black:hover, .btn-black:focus { background: #000; border-color: #000; }

.btn-row { margin: 0 -.6rem; font-size: 0; }

/* ==========================================================================
   Menú
   ========================================================================== */
.menu { position: relative; z-index: 1000; min-height: 60px; }

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  min-height: var(--nav-h);
  padding: 0 1rem;
  background: var(--white);
  border-bottom: 1px solid transparent;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1);
  transition: all .3s;
}
.navbar > .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  min-height: var(--nav-h);
  flex-shrink: 0;
  transition: all .3s;
}
.navbar-brand img { height: 3.8rem; width: auto; transition: height .3s; }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-links a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: .667em 1em;
  padding: 0 .3em;
  font-weight: 500;
  color: var(--black);
  /* subrayado animado del original */
  background-image: linear-gradient(currentColor 50%, currentColor 50%);
  background-size: 10000px 2px;
  background-repeat: no-repeat;
  background-position: -10000px 1.2em;
}
.nav-links a:hover {
  color: #000;
  background-position: 0 1.2em;
  transition: background-position 2s ease-in-out;
}

/* Hamburguesa */
.nav-toggle {
  display: none;
  position: relative;
  width: 31px;
  height: 20px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  position: absolute;
  right: 0;
  width: 30px;
  height: 2px;
  background: #000;
  transition: all .2s;
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2),
.nav-toggle span:nth-child(3) { top: 8px; transition: all .15s; }
.nav-toggle span:nth-child(4) { top: 16px; }

.navbar.opened .nav-toggle span:nth-child(1),
.navbar.opened .nav-toggle span:nth-child(4) { top: 8px; width: 0; opacity: 0; right: 50%; }
.navbar.opened .nav-toggle span:nth-child(2) { transform: rotate(45deg); transition: all .25s; }
.navbar.opened .nav-toggle span:nth-child(3) { transform: rotate(-45deg); transition: all .25s; }

/* Menú compacto al hacer scroll */
.navbar.navbar-short { min-height: 60px; }
.navbar.navbar-short .navbar-brand { min-height: 60px; }
.navbar.navbar-short .navbar-brand img { height: 2.5rem; }

@media (max-width: 991px) {
  .navbar-brand img { height: 3rem; }
  .nav-toggle { display: block; }
  .nav-collapse {
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
  }
  .navbar.opened .nav-collapse { max-height: 300px; }
  .nav-links { flex-direction: column; padding-bottom: 1rem; }
  .nav-links li { margin: auto; }
  .nav-links a { background-image: none; }
}

/* ==========================================================================
   Inicio
   ========================================================================== */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Hero */
.hero {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 3rem 0;
  background-image: url("../img/banner8-1920x1080.png");
}
.hero .overlay { background: rgb(250, 250, 250); opacity: .1; }

/* Intro */
.intro { padding: 5rem 0; }
.intro .section-title { color: var(--green); margin-bottom: 2rem; }
.intro .section-subtitle { margin-bottom: 2rem; }

/* Banda "Alimentos más sanos" */
.banner {
  padding: 6rem 0;
  background-image: url("../img/chiles-1461x975.jpg");
}
.banner .overlay { background: #000; opacity: .4; }
.banner .container { position: relative; z-index: 1; }
.banner h2 { color: var(--white); margin-bottom: 2rem; }

/* Tarjetas (valores y productos) */
.cards { padding: 0; }
.cards.first { padding-top: 6rem; }
.cards-head .section-title { color: var(--green); margin-bottom: 0; }
.cards .row { margin-top: 1.5rem; }

.card { margin-bottom: 2rem; cursor: pointer; }
.card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
  border-radius: 4px;
}
.card-img, .card-img img { width: 100%; }
.card-body { padding: 1rem; }
@media (min-width: 992px) { .card-body { padding: 2rem; } }

.card-title { text-align: center; color: var(--green); line-height: 1.5; }
.card-title a { color: var(--green); }
.card-title a:hover { color: var(--green-link-hover); }
.card-text { margin-top: 1rem; text-align: center; }

/* Galería de 3 imágenes */
.gallery { padding-top: 15px; }
.gallery-row { display: flex; justify-content: center; flex-wrap: wrap; }
.gallery-item {
  width: 100%;
  padding: 25rem 2rem 5rem;
  border-radius: 4px;
  background-size: cover;
  background-position: 0 0;
}
@media (min-width: 768px) { .gallery-item { flex: 0 0 50%; max-width: 50%; } }
@media (min-width: 992px) {
  .gallery-row { flex-wrap: nowrap; }
  .gallery-item { flex: 0 0 33.3333%; max-width: 33.3333%; }
}
@media (max-width: 767px) { .gallery-item { padding: 15rem 1rem 3rem; } }
.gallery-1 { background-image: url("../img/captura-de-pantalla-2021-05-24-a-las-13.34.20-637x472.png"); }
.gallery-2 { background-image: url("../img/captura-de-pantalla-2021-05-24-a-las-13.34.26-636x472.png"); }
.gallery-3 { background-image: url("../img/captura-de-pantalla-2021-05-24-a-las-13.34.33-639x472.png"); }

/* Contacto */
.contact { padding: 90px 0; background-color: var(--green); color: var(--white); }
.contact .row { align-items: center; }
.contact h2, .contact h3, .contact h4, .contact p { color: var(--white); }
.contact h2, .contact h3, .contact h4 { margin-bottom: 2rem; }

.form-block { position: relative; padding: 3rem; }
.form-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #2c1616;
  opacity: .5;
}
.form-block form { position: relative; z-index: 1; }

.form-control {
  display: block;
  width: 100%;
  min-height: 3.5em;
  margin-bottom: 15px;
  padding: 1.07em;
  font-size: 1.1rem;
  line-height: 1rem;
  color: #656565;
  background: #f5f5f5;
  border: 1px solid #e8e8e8;
  border-radius: .25rem;
  outline: none;
  transition: border-color .25s ease;
}
textarea.form-control { height: 150px; line-height: 1.5rem; resize: none; }
.form-control::placeholder { color: #656565; opacity: 1; }
.form-control:focus { border-color: var(--green); }

.form-actions { margin-top: .5rem; text-align: center; }
.form-actions .btn { display: inline-flex; min-height: 48px; margin: 0; }

.alert {
  margin-bottom: 1.875rem;
  padding: 1.25rem;
  font-size: 1.1rem;
  text-align: center;
  color: var(--white);
}
.alert-success { background: #70c770; }
.alert-danger  { background: #ff9966; }
.hp-field { position: absolute; left: -9999px; }

.contact .subtext {
  padding-top: 3rem;
  margin-bottom: 2rem;
  border-top: 1px solid rgba(255, 255, 255, .5);
}
.contact .btn-row { margin-bottom: 3rem; }

@media (min-width: 768px) {
  .contact .row > .md-6:first-child { padding-right: 30px; }
  .contact .row > .md-6:last-child  { padding-left: 30px; }
}
@media (max-width: 767px) { .contact h2 { padding-top: 2rem; } }
@media (max-width: 499px) {
  .contact .block-content { padding: 0; }
  .form-block { padding: 1rem; }
}

/* Footer */
.footer { padding: 30px 0; background-color: var(--black); color: var(--white); text-align: center; }
.footer p { margin: 0; color: var(--white); }
.footer a { color: var(--green); }
.footer a:hover { color: var(--green-link-hover); }

/* ==========================================================================
   Página de producto
   ========================================================================== */
.product { padding-top: 5rem; }
.product .row { align-items: center; }
.product-img img { width: 100%; object-fit: cover; }

.product-info { padding: 1rem; }
@media (min-width: 768px) { .product-info { padding: 2rem; } }
@media (min-width: 992px) { .product-info { padding: 2rem 4rem 2rem 2rem; } }

.product-info h1 { color: var(--green); margin-bottom: .5rem; }
.product-info .text { margin-bottom: 1rem; }
.product-price { padding-right: .5rem; color: var(--black); }
.product-info .btn-row { padding-top: 1rem; }

.back { text-align: center; }

.about { padding: 5rem 0 4rem; }
.about .section-subtitle { color: var(--green); margin-bottom: 2rem; }

/* Espaciados que el original generaba con líneas vacías (<div><br></div>) */
.intro .section-subtitle > div + div { margin-top: 1.5em; }
.contact h3 { margin-bottom: calc(2rem + 1.5em); }
