/* ==========================================================================
   D'Mona – Concesionario de Alimentos
   Hoja de estilos única (sin dependencias de Joomla / Helix / Bootstrap).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variables (paleta tomada de la configuración del Page Builder original)
   -------------------------------------------------------------------------- */
:root {
  --green: #779e5b;          /* color principal: títulos y botones */
  --green-dark: #5f8146;
  --brown: #665952;          /* banda call-to-action */
  --taupe: #948d7c;          /* títulos de las feature boxes */
  --olive-ink: #5c5142;      /* titular itálico del slider */
  --text: #525252;           /* texto base de la plantilla */
  --text-soft: #777;
  --bg: #ffffff;
  --bg-alt: #f6f5f2;
  --dark: #222222;

  --font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;

  --header-h: 80px;
  --header-h-fixed: 70px;
  --radius: 4px;
  --container: 1170px;
  --gutter: 16px;
  --shadow: 0 2px 5px rgba(0, 0, 0, .15);
}

/* --------------------------------------------------------------------------
   2. Reset y base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h-fixed);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; transition: color .2s; }
a:hover { color: var(--green-dark); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
address { font-style: normal; }

:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 10000;
  background: var(--green); color: #fff; padding: .5rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; color: #fff; }

/* Botones (equivalentes a sppb-btn-custom redondeado) */
.btn {
  display: inline-block;
  padding: .8em 1.8em;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: 600 .95rem/1.2 var(--font-body);
  letter-spacing: .02em;
  cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s;
}
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--dark); color: #fff; }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.btn--ghost:hover { background: #fff; color: var(--dark); }

/* Títulos de sección (verde, peso ligero como en el original) */
.section { padding: 80px 0; }
.section-title {
  color: var(--green);
  font-weight: 300;
  font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.8rem);
  margin-bottom: .55em;
}
.section-title span { font-weight: 600; }
.section-title--center { text-align: center; }

/* --------------------------------------------------------------------------
   3. HEADER / MENÚ DE NAVEGACIÓN
   -------------------------------------------------------------------------- */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: background-color .4s, box-shadow .4s, height .4s;
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: block; flex-shrink: 0; }
.brand-logo { height: 62px; width: auto; transition: height .4s; }
.brand-logo--green { display: none; }

.main-nav ul { display: flex; gap: .25rem; }
.main-nav a {
  display: block;
  padding: .5rem .9rem;
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  position: relative;
}
.main-nav a::after {
  content: "";
  position: absolute; left: .9rem; right: .9rem; bottom: .2rem;
  height: 2px; background: currentColor;
  transform: scaleX(0); transition: transform .25s;
}
.main-nav a:hover::after,
.main-nav a.is-active::after { transform: scaleX(1); }

/* Estado fijo al hacer scroll (antes: #sp-header.menu-fixed) */
.site-header.is-fixed {
  position: fixed;
  height: var(--header-h-fixed);
  background: #fff;
  box-shadow: var(--shadow);
  animation: fadeInDown .5s;
}
.site-header.is-fixed .brand-logo { height: 52px; }
.site-header.is-fixed .brand-logo--white { display: none; }
.site-header.is-fixed .brand-logo--green { display: block; }
.site-header.is-fixed .main-nav a { color: var(--text); }
.site-header.is-fixed .main-nav a:hover,
.site-header.is-fixed .main-nav a.is-active { color: var(--green); }

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: none; }
}

/* Botón hamburguesa (solo móvil) */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; margin: 5px 0;
  background: #fff; border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.site-header.is-fixed .nav-toggle span { background: var(--text); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   4. HERO (antes: Revolution Slider a pantalla completa)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  /* La foto es panorámica (16:5) con un degradado claro a la izquierda
     donde va el texto: se respeta esa proporción y se ancla a la izquierda. */
  min-height: clamp(480px, 36vw, 680px);
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 30px) 0 50px;
  background: #e9e4cf url("assets/img/hero-bg.webp") left center / cover no-repeat;
}
/* Velo oscuro arriba para que el menú blanco sea legible */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .55) 0, rgba(0, 0, 0, 0) 110px);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero-kicker {
  margin-bottom: .6rem;
  color: var(--green-dark);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.hero-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.8rem, 1.6rem + 5vw, 4.6rem);
  line-height: .95;
  letter-spacing: -1.5px;
  color: var(--olive-ink);
  margin-bottom: 2rem;
  animation: heroIn 1s ease-out both;
}
.hero-phone {
  display: inline-block;
  max-width: 380px;
  border-radius: 30px;
  transition: transform .25s, box-shadow .25s;
  animation: heroIn 1s .3s ease-out both;
}
.hero-phone:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .2); }

@keyframes heroIn {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   5. BANDA CALL TO ACTION
   -------------------------------------------------------------------------- */
.cta-band { background: var(--brown); color: #fff; padding: 34px 0; }
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.cta-title { font-size: clamp(1.4rem, 1rem + 1.4vw, 1.9rem); font-weight: 600; margin-bottom: .25em; }
.cta-text { margin: 0; opacity: .9; }
.cta-inner .btn { flex-shrink: 0; }

/* --------------------------------------------------------------------------
   6. SOBRE NOSOTROS
   -------------------------------------------------------------------------- */
.about { padding: 60px 0 40px; }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
}
.about-text h3 { color: var(--text); font-size: 1.25rem; font-weight: 600; margin-top: 1.5rem; }
.check-list li { position: relative; padding-left: 1.9rem; margin-bottom: .35rem; }
.check-list li::before {
  content: "✔";
  position: absolute; left: 0; top: 0;
  color: var(--green);
  font-weight: 700;
}
.about-media img { margin-inline: auto; }

/* --------------------------------------------------------------------------
   7. SERVICIOS
   -------------------------------------------------------------------------- */
.services {
  padding: 60px 0 80px;
  background:
    linear-gradient(to right, #fff 0, #fff 42%, rgba(255, 255, 255, .85) 58%, rgba(255, 255, 255, 0) 78%),
    #fff url("assets/img/services-bg.webp") right center / auto 100% no-repeat;
}
.services-head { max-width: 640px; margin-bottom: 2.5rem; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem 2.5rem;
  max-width: 700px;   /* deja visible la foto del buffet a la derecha */
}
.feature { display: flex; gap: 1.1rem; align-items: flex-start; }
.feature-icon { width: 56px; height: 56px; flex-shrink: 0; }
.feature h3 { color: var(--taupe); font-size: 1.3rem; font-weight: 600; margin-bottom: .3em; }
.feature p { margin: 0; }

/* --------------------------------------------------------------------------
   8. GALERÍA
   -------------------------------------------------------------------------- */
.gallery { padding: 50px 0 0; background: var(--bg-alt); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.gallery-grid a {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.gallery-grid img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
/* Overlay verde al pasar el ratón (antes: overlay_color rgba(119,219,31,.5)) */
.gallery-grid a::after {
  content: "+";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: #fff; font-size: 3rem; font-weight: 300;
  background: rgba(119, 158, 91, .7);
  opacity: 0; transition: opacity .3s;
}
.gallery-grid a:hover img, .gallery-grid a:focus-visible img { transform: scale(1.08); }
.gallery-grid a:hover::after, .gallery-grid a:focus-visible::after { opacity: 1; }

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh;
  max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(0, 0, 0, .9);
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(0, 0, 0, .9); }
.lightbox-img { max-width: 92vw; max-height: 86vh; border-radius: var(--radius); }
.lightbox-btn {
  position: absolute;
  width: 48px; height: 48px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  color: #fff; font-size: 2rem; line-height: 1;
  cursor: pointer;
}
.lightbox-btn:hover { background: var(--green); }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev  { left: 16px;  top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 16px; top: 50%; transform: translateY(-50%); }

/* --------------------------------------------------------------------------
   9. CLIENTES
   -------------------------------------------------------------------------- */
.clients { padding: 70px 0; }
.clients-head { text-align: center; margin-bottom: 3rem; }
.clients-title { color: var(--text); font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.4rem); font-weight: 300; }
.clients-title span { color: var(--green); font-weight: 600; }
.clients-head p { color: var(--text-soft); }
.clients-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem 2rem;
  align-items: center;
  justify-items: center;
}
.clients-grid img {
  max-width: 220px;
  width: 100%;
  filter: grayscale(100%);
  opacity: .75;
  transition: filter .3s, opacity .3s;
}
.clients-grid img:hover { filter: none; opacity: 1; }

/* --------------------------------------------------------------------------
   10. CONTACTO
   -------------------------------------------------------------------------- */
.contact {
  position: relative;
  padding: 100px 0;
  color: #fff;
  background: #2b2520 url("assets/img/contact-bg.webp") center / cover no-repeat;
}
.contact::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(20, 16, 12, .55);
}
.contact-inner { position: relative; max-width: 760px; text-align: center; }
.contact-title { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.4rem); font-weight: 300; margin-bottom: 1.4rem; }
.contact-data p { margin-bottom: .4rem; font-size: .95rem; }
.contact-data a { color: #fff; border-bottom: 1px dotted rgba(255, 255, 255, .6); }
.contact-data a:hover { color: #cfe3bf; }

.contact-form { margin-top: 2.2rem; text-align: left; }
.form-row { margin-bottom: 1rem; }
.form-row--half { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: .85rem 1rem;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .92);
  color: var(--dark);
  font: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(119, 158, 91, .45);
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form .is-invalid { border-color: #e57373; box-shadow: 0 0 0 3px rgba(229, 115, 115, .4); }
.form-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.form-status { min-height: 1.5em; margin: 1rem 0 0; text-align: center; font-weight: 600; }

/* --------------------------------------------------------------------------
   11. FOOTER
   -------------------------------------------------------------------------- */
.site-footer { background: var(--dark); color: #aaa; padding: 40px 0 30px; font-size: .9rem; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; text-align: center; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.4rem; }
.footer-nav a { color: #ddd; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 600; }
.footer-nav a:hover { color: var(--green); }
.copyright { margin: 0; }

/* Botón volver arriba */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--green); color: #fff; font-size: 1.2rem;
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .3s, visibility .3s, transform .3s, background-color .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--dark); color: #fff; }

/* --------------------------------------------------------------------------
   12. Animaciones de entrada (equivalente a fadeInDown del Page Builder)
   -------------------------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   13. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  /* La foto del buffet pasa debajo de las tarjetas, a todo el ancho */
  .section.services {
    background: #fff url("assets/img/services-bg.webp") center bottom / 100% auto no-repeat;
    padding-bottom: calc(44vw + 20px);
  }
  .services-grid { max-width: none; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  /* Menú móvil desplegable */
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
  }
  .main-nav.is-open { max-height: 420px; }
  .main-nav ul { flex-direction: column; padding: .5rem var(--gutter) 1rem; gap: 0; }
  .main-nav a { color: var(--text); padding: .85rem 0; border-bottom: 1px solid #eee; }
  .main-nav a::after { display: none; }
  .main-nav a:hover, .main-nav a.is-active { color: var(--green); }

  .cta-inner { flex-direction: column; text-align: center; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-media img { max-width: 360px; }
  .clients-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  :root { --header-h: 70px; }
  .section { padding: 60px 0; }
  .brand-logo { height: 52px; }
  .hero { background-position: 70% center; }
  .hero::after {                     /* aclara la foto para leer el titular */
    content: ""; position: absolute; inset: 0;
    background: rgba(245, 241, 225, .55);
  }
  .hero-inner { z-index: 1; }
  .services-grid { grid-template-columns: 1fr; gap: 2rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row--half { grid-template-columns: 1fr; }
  .contact { padding: 70px 0; }
  .clients-grid { gap: 1.5rem 1rem; }
}
