/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", "Open Sans", Arial, sans-serif;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ===== HEADER / MENU BUTTON ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(45, 45, 45, 0.92);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 1000;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-flask { height: 36px; width: auto; flex-shrink: 0; }
.brand-text {
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 1.5px;
  line-height: 1;
  white-space: nowrap;
}
.brand-text small {
  display: block;
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 6.5px;
  color: #d6d6d6;
  margin-top: 4px;
}
.top-nav { display: flex; align-items: center; gap: 26px; margin-left: 24px; }
.top-nav a {
  color: #cfcfcf;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color .2s;
  white-space: nowrap;
}
@media (min-width: 992px) and (max-width: 1220px) {
  .top-nav { gap: 14px; }
  .top-nav a { font-size: 12.5px; letter-spacing: 1px; }
}
.top-nav a:hover { color: #fff; }
.top-nav a.active { color: #6fbf73; }
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  width: 34px; height: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
}

/* ===== SIDE MENU ===== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s;
  z-index: 1100;
}
.overlay.open { opacity: 1; visibility: visible; }

.side-menu {
  position: fixed;
  top: 0; right: 0;
  width: 380px;
  max-width: 85vw;
  height: 100%;
  background: #f2f2f2;
  transform: translateX(100%);
  transition: transform .35s ease;
  z-index: 1200;
  padding: 70px 40px 40px;
  box-shadow: -4px 0 20px rgba(0,0,0,.15);
}
.side-menu.open { transform: translateX(0); }
.menu-close {
  position: absolute;
  top: 0; right: 0;
  width: 54px; height: 54px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}
.menu-title {
  color: #555;
  letter-spacing: 2px;
  font-size: 15px;
  margin-bottom: 12px;
}
.menu-search {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccc;
  background: #fff;
  margin-bottom: 24px;
  font-size: 15px;
}
.menu-list { list-style: none; }
.menu-list li { position: relative; padding: 12px 0; }
.menu-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 22px; height: 1px;
  background: #bbb;
}
.menu-list a {
  display: block;
  padding-left: 40px;
  letter-spacing: 4px;
  color: #9a9a9a;
  font-size: 16px;
  transition: color .2s;
}
.menu-list a:hover { color: #2e7d32; }
.menu-list a.active { color: #1b7a3d; font-weight: 600; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  background: #4a7c1e url("../images/hero-cerdos.jpg") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 100px 20px;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 130px;
  background: linear-gradient(180deg, rgba(16, 24, 14, 0) 0%, rgba(16, 24, 14, .85) 100%);
  pointer-events: none;
}
.hero-inner { max-width: 900px; }
.hero h1 {
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeInUp 1.4s ease forwards 1s;
}
.hero p {
  font-size: clamp(18px, 2.6vw, 30px);
  font-weight: 600;
  text-shadow: 0 2px 10px rgba(0,0,0,.6);
  opacity: 0;
  animation: fadeInUp 1.4s ease forwards 1.8s;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Aparición suave de textos al hacer scroll */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== EMPRESA ===== */
.empresa {
  background: #2f5d34 url("../images/dehesa.jpg") center/cover no-repeat;
  color: #fff;
  padding: 140px 20px 160px;
  position: relative;
}
/* Transiciones suaves con las secciones contiguas */
.empresa::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 130px;
  background: linear-gradient(180deg, rgba(16, 24, 14, .85) 0%, rgba(16, 24, 14, 0) 100%);
  pointer-events: none;
}
/* Separadores ondulados entre secciones */
.wave-sep { line-height: 0; }
.wave-sep svg { width: 100%; height: 130px; display: block; }
.wave-abajo {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  pointer-events: none;
}
.empresa-inner { position: relative; max-width: 1100px; margin: 0 auto; z-index: 1; }
.empresa h2 {
  font-weight: 400;
  font-size: clamp(22px, 3vw, 30px);
  margin-bottom: 50px;
  text-shadow: 0 1px 4px rgba(0,0,0,.85), 0 0 18px rgba(0,0,0,.55);
}
.empresa h2 strong { font-weight: 700; }
.empresa p {
  font-size: clamp(16px, 2vw, 21px);
  text-align: justify;
  margin-bottom: 8px;
  text-shadow: 0 1px 4px rgba(0,0,0,.85), 0 0 18px rgba(0,0,0,.55);
}

/* ===== RESPUESTA / SERVICIOS ===== */
.respuesta {
  background: #171b26;
  color: #fff;
  padding: 90px 0 0;
  position: relative;
}
.respuesta-head { max-width: 1000px; margin: 0 auto 70px; padding: 0 20px; text-align: center; }
.respuesta-head h2 {
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 800;
  margin-bottom: 30px;
}
.respuesta-head p { font-size: clamp(15px, 1.8vw, 19px); color: #d8dbe0; }

.features {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: start;
  padding: 0 20px 40px;
}
.features-image { align-self: center; }
.features-image img { max-height: 620px; }

.feature {
  margin-bottom: 26px;
  padding: 18px 20px;
  border-radius: 14px;
  transition: background .25s ease;
}
.feature:hover { background: rgba(255, 255, 255, .05); }
.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.features-col:not(.features-col-right) .feature-tags { justify-content: flex-end; }
.feature-tags span {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 15px;
  padding: 3px 12px;
  font-size: 13px;
  color: #c7cbd3;
  white-space: nowrap;
}
.feature-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.features-col:not(.features-col-right) .feature-head { justify-content: flex-end; }
.features-col:not(.features-col-right) .feature,
.features-col:not(.features-col-right) .feature p { text-align: right; }
.feature h3 { font-size: 20px; font-weight: 700; }
.feature p { color: #c7cbd3; font-size: 15px; }
.feature-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-icon svg {
  width: 26px;
  height: 26px;
  fill: #171b26;
}

/* ===== WAVE ===== */
.wave { line-height: 0; }
.wave svg { width: 100%; height: 130px; display: block; }

/* ===== CLIENTES ===== */
.clientes {
  background: #fff;
  padding: 90px 20px 100px;
  text-align: center;
}
.clientes h2 {
  font-size: clamp(30px, 4.5vw, 46px);
  font-weight: 700;
  color: #2b2b2b;
  letter-spacing: 1px;
  position: relative;
  padding-bottom: 16px;
  margin-bottom: 24px;
}
.clientes h2::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 64px; height: 4px;
  border-radius: 2px;
  background: #6fbf73;
}
.clientes-intro { max-width: 900px; margin: 0 auto 60px; font-size: clamp(15px,2vw,19px); color: #667; }
.clientes-grid {
  max-width: 1150px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.clientes-grid figure {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: 250px;
  box-shadow: 0 8px 24px rgba(20, 40, 25, .12);
  transition: transform .3s ease, box-shadow .3s ease;
  cursor: default;
}
.clientes-grid figure:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 44px rgba(20, 40, 25, .22);
}
.clientes-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.clientes-grid figure:hover img { transform: scale(1.09); }
.clientes-grid figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 42px 14px 14px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.72) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
}

/* ===== MARCAS ===== */
.marcas {
  background: #fff;
  padding: 40px 20px 90px;
}
.marcas-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 55px 40px;
}
.marca { text-align: left; }
.marca-logo {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.marca-logo img { max-height: 120px; max-width: 100%; object-fit: contain; }
.marca p { font-size: 14px; color: #444; text-align: justify; }

/* ===== IMAGE PLACEHOLDERS (until real images are dropped in) ===== */
.img-ph {
  background: repeating-linear-gradient(45deg, #e9ecef, #e9ecef 12px, #dfe3e7 12px, #dfe3e7 24px);
  min-height: 160px;
}
.img-ph::after {
  content: "imagen";
  color: #9aa0a6;
  font-size: 13px;
}
.logo-ph {
  width: 140px; height: 80px;
  background: #f0f2f4;
  border: 1px dashed #c4c9cf;
}

/* ===== FOOTER ===== */
.site-footer { background: #171b26; color: #cfd3da; }
.footer-inner {
  max-width: 1150px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.7fr 1fr;
  gap: 50px;
  padding: 60px 20px 40px;
}
.footer-col h3 { color: #fff; font-size: 18px; margin-bottom: 14px; }
.footer-col a { color: #7fc088; }
.footer-bottom {
  border-top: 1px solid #2a2f3c;
  text-align: center;
  padding: 20px;
  font-size: 14px;
  color: #8a8f99;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .features { grid-template-columns: 1fr; }
  .features-image { order: -1; }
  .features-image img { max-height: 380px; margin: 0 auto; }
  .features-col:not(.features-col-right) .feature-head { justify-content: flex-start; }
  .features-col:not(.features-col-right) .feature,
  .features-col:not(.features-col-right) .feature p { text-align: left; }
  .clientes-grid { grid-template-columns: repeat(2, 1fr); }
  .marcas-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .clientes-grid { grid-template-columns: 1fr; }
  .marcas-grid { grid-template-columns: 1fr; }
}

/* ===== RESPONSIVE: menú superior en PC, hamburguesa en móvil ===== */
@media (max-width: 991px) {
  .top-nav { display: none; }
}
@media (min-width: 992px) {
  .menu-toggle { display: none; }
}

/* ===== FOOTER: lista de centros con teléfonos ===== */
.centros-lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 36px;
}
.centros-lista li {
  display: flex;
  flex-direction: column;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 14px;
  line-height: 1.45;
}
.centros-lista span { color: #c9cdd4; font-weight: 600; }
.centros-lista a { color: #6fbf73; white-space: nowrap; font-size: 15px; }
.centros-lista a:hover { color: #9ad99e; }
.footer-legal { margin-top: 16px; font-size: 13px; }
.footer-legal a { color: #8a8f99; text-decoration: underline; }
.footer-legal a:hover { color: #cfd3da; }
@media (max-width: 900px) {
  .centros-lista { grid-template-columns: 1fr; }
}

/* ===== TIENDA destacada en el menú ===== */
.top-nav a.btn-tienda {
  background: #2e7d32;
  color: #fff;
  padding: 8px 20px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 10px rgba(46, 125, 50, .45);
  transition: background .2s, transform .2s;
}
.top-nav a.btn-tienda:hover { background: #37953c; color: #fff; transform: translateY(-1px); }
.top-nav a.btn-tienda svg { width: 15px; height: 15px; fill: #fff; }
.menu-list a.btn-tienda { color: #1b7a3d; font-weight: 700; }

/* ===== PRODUCTOS / MARCAS: más espectacular ===== */
.marcas {
  background: #eef3ef;
  padding: 70px 20px 100px;
}
.marcas-head { text-align: center; max-width: 800px; margin: 0 auto 65px; }
.marcas-head h2 {
  color: #2b2b2b;
  font-size: clamp(30px, 4.5vw, 46px);
  font-weight: 700;
  letter-spacing: 1px;
  position: relative;
  padding-bottom: 16px;
  margin-bottom: 18px;
}
.marcas-head h2::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 64px; height: 4px;
  border-radius: 2px;
  background: #6fbf73;
}
.marcas-head p { color: #667; font-size: clamp(15px, 2vw, 19px); }
.marca {
  background: #fff;
  border-radius: 18px;
  padding: 30px 26px;
  box-shadow: 0 6px 22px rgba(20, 40, 25, .08);
  border-bottom: 4px solid transparent;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.marca:hover {
  transform: translateY(-10px);
  box-shadow: 0 22px 44px rgba(20, 40, 25, .16);
  border-bottom-color: #6fbf73;
}
.marca-logo { transition: transform .3s ease; }
.marca:hover .marca-logo { transform: scale(1.07); }
