/*
Theme Name: PS Pharmaceutical
Theme URI: https://pspharmaceutical.com/
Author: PS Pharmaceutical
Description: Tema multipágina moderno y editable para PS Pharmaceutical.
Version: 1.5.1
Text Domain: pspharma
*/

:root {
  --ink: #0d211e;
  --muted: #5a6d68;
  --paper: #eef4f0;
  --paper-deep: #dde8e1;
  --white: #fff;
  --green: #0f6b57;
  --green-dark: #084437;
  --mint: #cfe8de;
  --gold: #c1963a;
  --gold-soft: rgba(193, 150, 58, .2);
  --line: #cfdcd5;
  --shadow: 0 30px 70px rgba(8, 40, 34, .14);
  --shadow-soft: 0 14px 34px rgba(8, 40, 34, .09);
  --radius: 30px;
  --container: min(1140px, calc(100vw - 40px));
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

.site-accent {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #0f6b57 0%, #c1963a 50%, #0f6b57 100%);
  background-size: 200% 100%;
  animation: accent-shift 8s linear infinite;
}

@keyframes accent-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 100% -10%, rgba(21, 114, 96, .07), transparent 55%),
    radial-gradient(ellipse 60% 40% at -10% 30%, rgba(184, 144, 63, .06), transparent 50%),
    var(--white);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body.nav-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1.25em; }
h1, h2, h3, h4 {
  margin: 0 0 .55em;
  font-family: "Manrope", system-ui, sans-serif;
  line-height: 1.08;
  letter-spacing: -.035em;
}
h1 { font-size: clamp(2.8rem, 6.4vw, 6.2rem); }
h2 { font-size: clamp(2.1rem, 4.2vw, 4.1rem); }
h3 { font-size: clamp(1.3rem, 1.9vw, 1.8rem); }
.container { width: var(--container); margin-inline: auto; }
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--green);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow::before {
  width: 28px;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--gold), transparent);
}

.button, .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: linear-gradient(160deg, #1a8570 0%, var(--green) 55%, var(--green-dark) 100%);
  color: var(--white);
  box-shadow: 0 10px 28px rgba(21, 114, 96, .28);
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: .02em;
  transition: transform .25s var(--ease-out), box-shadow .25s, filter .25s;
}
.button:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(21, 114, 96, .34);
  filter: brightness(1.04);
}
.button--ghost {
  background: transparent;
  box-shadow: none;
  color: var(--green);
}
.button--ghost:hover {
  color: var(--white);
  background: var(--green);
  filter: none;
}
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-weight: 700;
  transition: gap .25s var(--ease-out);
}
.arrow-link::after { content: "→"; transition: transform .25s var(--ease-out); }
.arrow-link:hover { gap: 10px; }
.arrow-link:hover::after { transform: translateX(3px); }

/* Header */
.site-header {
  position: sticky;
  z-index: 50;
  top: 4px;
  border-bottom: 1px solid transparent;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(18px) saturate(1.2);
  transition: background .3s, border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled {
  border-bottom-color: rgba(215, 225, 219, .9);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 30px rgba(12, 42, 36, .06);
}
.header-inner {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.brand, .custom-logo-link { flex: 0 0 auto; display: inline-flex; }
.brand img,
.custom-logo-link img,
.custom-logo {
  width: auto;
  height: 52px;
  max-height: 58px;
  object-fit: contain;
  object-position: left center;
  transition: transform .3s var(--ease-out);
}
.brand:hover img,
.custom-logo-link:hover img { transform: scale(1.02); }
.brand__text { color: var(--green); font: 800 1.25rem "Manrope", sans-serif; }
.footer-brand .custom-logo-link img,
.footer-brand .custom-logo { height: 44px; }
.site-nav__list, .site-nav .menu {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 30px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  position: relative;
  font-size: .84rem;
  font-weight: 700;
  transition: color .2s;
}
.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--gold), #d4b46a);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s var(--ease-out);
}
.site-nav a:hover::after,
.site-nav .current-menu-item a::after { transform: scaleX(1); }
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.35rem;
  cursor: pointer;
}

/* Hero */
.hero {
  position: relative;
  display: grid;
  min-height: min(680px, calc(100vh - 120px));
  align-items: end;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}
.hero__slides {
  position: absolute;
  inset: 0;
}
.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .9s var(--ease-out), visibility .9s var(--ease-out);
  z-index: 0;
}
.hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}
.hero__media, .hero__media::after, .hero__media::before { position: absolute; inset: 0; }
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  transform: scale(1);
  transform-origin: center center;
}
.hero__slide.is-active .hero__media img {
  animation: hero-ken 10s var(--ease-out) forwards;
}
.hero__media::after {
  content: "";
  background:
    linear-gradient(105deg, rgba(8, 31, 27, .78) 0%, rgba(8, 31, 27, .42) 48%, rgba(8, 31, 27, .12) 100%),
    linear-gradient(to top, rgba(8, 31, 27, .38), transparent 42%);
}
.hero__media::before {
  content: "";
  background: radial-gradient(circle at 85% 20%, rgba(184, 144, 63, .22), transparent 35%);
  z-index: 1;
  pointer-events: none;
}
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding-block: 78px;
}
.hero__dots {
  position: absolute;
  z-index: 3;
  right: max(20px, calc((100vw - var(--container)) / 2));
  bottom: 36px;
  display: flex;
  gap: 10px;
}
.hero__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .35);
  cursor: pointer;
  transition: background .25s ease, transform .25s ease, width .25s ease;
}
.hero__dot.is-active {
  width: 28px;
  background: var(--white);
}
.hero__dot:focus-visible {
  outline: 2px solid #c6eadb;
  outline-offset: 3px;
}
.hero h1 { max-width: 760px; text-wrap: balance; }
.hero h1 em {
  color: #b7e4d2;
  font-style: normal;
  background: linear-gradient(120deg, #b7e4d2, #e8d5a3);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  max-width: 560px;
  margin: 22px 0 34px;
  color: rgba(255, 255, 255, .84);
  font-size: 1.12rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .button--ghost {
  border-color: rgba(255, 255, 255, .45);
  color: var(--white);
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, .06);
}
.hero .button--ghost:hover {
  background: var(--white);
  color: var(--green-dark);
  border-color: var(--white);
}
.hero .eyebrow { color: #c6eadb; }

/* Sections */
.section {
  position: relative;
  padding-block: clamp(78px, 9vw, 132px);
}
.section--soft {
  background:
    linear-gradient(180deg, rgba(243, 246, 242, .96), rgba(231, 238, 233, .9)),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 18px,
      rgba(21, 114, 96, .015) 18px,
      rgba(21, 114, 96, .015) 19px
    );
}
.section--dark { background: var(--ink); color: var(--white); }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 52px;
}
.section-heading h2 { max-width: 720px; margin-bottom: 0; text-wrap: balance; }
.section-heading p { max-width: 420px; margin: 0; color: var(--muted); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(42px, 7vw, 96px);
}
.split__media { position: relative; }
.split__media img {
  width: 100%;
  min-height: 540px;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: var(--shadow);
}
.split__media::before {
  position: absolute;
  inset: auto -18px -18px auto;
  width: 42%;
  height: 42%;
  border-radius: 22px;
  background: linear-gradient(145deg, var(--gold-soft), transparent);
  content: "";
  z-index: -1;
}
.split__media::after {
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 34%;
  height: 36%;
  border: 1px solid var(--gold);
  border-radius: 22px;
  content: "";
  z-index: -1;
}
.split__copy > p { color: var(--muted); font-size: 1.05rem; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 42px;
  border-top: 1px solid var(--line);
}
.stat { padding: 26px 18px 0 0; }
.stat strong {
  display: block;
  color: var(--green);
  font: 800 clamp(1.9rem, 3.6vw, 3rem) "Manrope", sans-serif;
  letter-spacing: -.04em;
}
.stat span { color: var(--muted); font-size: .82rem; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.value-card, .post-card, .product-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(215, 225, 219, .95);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform .35s var(--ease-out), box-shadow .35s, border-color .35s;
}
.value-card:hover, .post-card:hover, .product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: rgba(21, 114, 96, .22);
}
.value-card__image { position: relative; height: 340px; overflow: hidden; }
.value-card__image::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(transparent 35%, rgba(5, 28, 24, .78));
}
.value-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease-out);
}
.value-card:hover img { transform: scale(1.05); }
.value-card__number {
  position: absolute;
  z-index: 2;
  top: 20px;
  left: 20px;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: var(--green);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
  font-weight: 800;
}
.value-card__content { padding: 26px; }
.value-card__content p { margin: 0; color: var(--muted); }

.product-card__media {
  display: grid;
  height: 300px;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, .9), transparent 55%),
    linear-gradient(180deg, #f7faf7, #eef4f0);
}
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform .4s var(--ease-out);
}
.product-card:hover .product-card__media img { transform: translateY(-6px) scale(1.03); }
.product-card__content { padding: 24px; }
.product-card__meta {
  display: block;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.product-card h3 { font-size: 1.2rem; }
.product-card p { color: var(--muted); font-size: .9rem; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 42px; }
.filter-row a {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .85);
  font-size: .84rem;
  font-weight: 700;
  transition: border-color .2s, color .2s, background .2s, transform .2s;
}
.filter-row a:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--mint);
  transform: translateY(-2px);
}

.post-card__image {
  height: 236px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--mint), var(--paper-deep));
}
.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s var(--ease-out);
}
.post-card:hover .post-card__image img { transform: scale(1.05); }
.post-card__placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--green);
  font: 800 3rem "Manrope", sans-serif;
}
.post-card__content { padding: 26px; }
.post-card time {
  display: block;
  margin-bottom: 12px;
  color: var(--green);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.post-card h3 { font-size: 1.28rem; }
.post-card p { color: var(--muted); font-size: .92rem; }

/* Inner pages */
.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: 100px 88px;
  background:
    radial-gradient(circle at 88% 18%, rgba(184, 144, 63, .18), transparent 32%),
    linear-gradient(135deg, #0d2f29 0%, #12362f 45%, #0a2420 100%);
  color: var(--white);
}
.page-hero::before {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      115deg,
      transparent,
      transparent 36px,
      rgba(255, 255, 255, .015) 36px,
      rgba(255, 255, 255, .015) 37px
    );
  content: "";
}
.page-hero::after {
  position: absolute;
  top: -120px;
  right: -70px;
  width: 400px;
  height: 400px;
  border: 90px solid rgba(93, 169, 141, .1);
  border-radius: 50%;
  content: "";
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { max-width: 960px; font-size: clamp(2.7rem, 5.5vw, 5.4rem); text-wrap: balance; }
.page-hero p {
  max-width: 620px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, .76);
  font-size: 1.08rem;
}

.prose { max-width: 830px; margin-inline: auto; }
.prose > * + * { margin-top: 1.3em; }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: #3f514d; }
.prose blockquote {
  margin: 35px 0;
  padding: 26px 30px;
  border-left: 4px solid var(--gold);
  border-radius: 0 18px 18px 0;
  background: linear-gradient(90deg, var(--paper), rgba(243, 246, 242, .4));
  font-size: 1.12rem;
}

.timeline { position: relative; max-width: 900px; margin-inline: auto; }
.timeline::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 80px;
  width: 1px;
  content: "";
  background: linear-gradient(to bottom, var(--gold), var(--line) 20%, var(--line));
}
.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 115px 1fr;
  gap: 35px;
  padding-bottom: 54px;
}
.timeline__year { color: var(--green); font: 800 1.25rem "Manrope", sans-serif; }
.timeline__year::after {
  position: absolute;
  top: 6px;
  left: 73px;
  width: 15px;
  height: 15px;
  border: 4px solid var(--white);
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 0 0 8px rgba(184, 144, 63, .12);
  content: "";
}
.timeline__copy {
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .8);
  box-shadow: var(--shadow-soft);
}
.timeline__copy p { margin-bottom: 0; color: var(--muted); }

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(42px, 7vw, 96px);
}
.product-detail__media {
  position: sticky;
  top: 110px;
  display: grid;
  height: 560px;
  place-items: center;
  padding: 42px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 30%, #fff, transparent 60%),
    linear-gradient(180deg, #f7faf7, #e8f0eb);
  box-shadow: var(--shadow-soft);
}
.product-detail__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.product-detail__content h1 { font-size: clamp(2.4rem, 4.6vw, 4.5rem); }
.product-detail__excerpt {
  margin-bottom: 28px;
  color: var(--green);
  font-size: 1.1rem;
  font-weight: 600;
}
.product-detail__body { padding-top: 32px; border-top: 1px solid var(--line); }
.product-detail__body p { color: #3f514d; }

.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 64px; }
.contact-list { margin: 32px 0; padding: 0; list-style: none; }
.contact-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left .25s var(--ease-out);
}
.contact-list li:hover { padding-left: 6px; }
.contact-list small { display: block; color: var(--muted); }
.contact-form {
  padding: clamp(24px, 4.5vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(165deg, #fff, var(--paper));
  box-shadow: var(--shadow-soft);
}
.contact-form label { display: block; margin-bottom: 16px; font-size: .82rem; font-weight: 700; }
.contact-form input, .contact-form textarea {
  width: 100%;
  margin-top: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: rgba(21, 114, 96, .55);
  box-shadow: 0 0 0 4px rgba(21, 114, 96, .12);
}
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form .g-recaptcha { margin: 4px 0 12px; }
.contact-form__captcha { margin: 4px 0 20px; }
.contact-form__captcha-hint {
  margin: 0;
  color: #8a2d22;
  font-size: .86rem;
  font-weight: 600;
}
.contact-form__captcha-hint.is-visible { display: block; }
.notice { margin-bottom: 18px; padding: 14px 18px; border-radius: 10px; background: var(--mint); color: var(--green-dark); }
.notice--error { background: #fbe8e5; color: #8a2d22; }
.map {
  overflow: hidden;
  height: 420px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.map iframe { width: 100%; height: 100%; border: 0; }

.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(42px, 7vw, 82px);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 90% 120%, rgba(193, 150, 58, .35), transparent 40%),
    linear-gradient(135deg, #12806a, #0a5347 55%, #073d35);
  color: var(--white);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, .08);
}
.cta::after {
  position: absolute;
  right: -80px;
  bottom: -150px;
  width: 360px;
  height: 360px;
  border: 70px solid rgba(255, 255, 255, .07);
  border-radius: 50%;
  content: "";
}
.cta h2 { position: relative; z-index: 1; max-width: 720px; }
.cta .button {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  border-color: var(--white);
  background: var(--white);
  color: var(--green);
  box-shadow: none;
}

.pagination { margin-top: 48px; text-align: center; }
.pagination .page-numbers {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  transition: background .2s, color .2s;
}
.pagination .current { background: var(--green); color: var(--white); }
.empty-state {
  grid-column: 1 / -1;
  padding: 60px;
  border-radius: var(--radius);
  background: var(--paper);
  text-align: center;
}

/* Footer */
.site-footer {
  position: relative;
  overflow: hidden;
  padding: 78px 0 28px;
  background:
    radial-gradient(circle at 10% 0%, rgba(184, 144, 63, .12), transparent 35%),
    linear-gradient(180deg, #0d2a25, #071916);
  color: var(--white);
}
.footer-grid { display: grid; grid-template-columns: 1.3fr .7fr .9fr; gap: 64px; }
.footer-brand img {
  width: auto;
  height: 64px;
  margin-bottom: 22px;
  filter: brightness(0) invert(1);
}
.footer-brand p { max-width: 420px; color: rgba(255, 255, 255, .62); }
.site-footer h3 {
  margin-bottom: 18px;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #d4b46a;
}
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links li { margin: 10px 0; }
.footer-links a, .footer-contact { color: rgba(255, 255, 255, .68); transition: color .2s; }
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .45);
  font-size: .76rem;
}

/* Animaciones: hero al cargar + revelado al scroll */
@keyframes hero-in {
  from { opacity: 0; transform: translate3d(0, 36px, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes hero-ken {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

/* Hero siempre anima al cargar (solo CSS) */
.hero__content > * {
  opacity: 0;
  animation: hero-in 1s var(--ease-out) forwards;
}
.hero__content > *:nth-child(1) { animation-delay: .1s; }
.hero__content > *:nth-child(2) { animation-delay: .25s; }
.hero__content > *:nth-child(3) { animation-delay: .4s; }
.hero__content > *:nth-child(4) { animation-delay: .55s; }

.hero__scroll-hint {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 28px;
  left: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.hero__scroll-hint span {
  width: 22px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, .65);
  border-radius: 999px;
  opacity: 0;
  animation: hero-in .8s var(--ease-out) .9s forwards, scroll-pulse 1.6s ease-in-out 1.6s infinite;
}
.hero__scroll-hint span::before {
  display: block;
  width: 4px;
  height: 8px;
  margin: 8px auto 0;
  border-radius: 999px;
  background: #fff;
  content: "";
  animation: scroll-dot 1.6s ease-in-out 1.6s infinite;
}

@keyframes scroll-pulse {
  0%, 100% { transform: translateY(0); opacity: .85; }
  50% { transform: translateY(8px); opacity: 1; }
}
@keyframes scroll-dot {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 0; transform: translateY(0); }
}

/* Revelado al entrar en viewport (una sola vez, controlado por JS) */
.anim-pending {
  opacity: 0;
  transform: translate3d(0, 48px, 0);
  transition:
    opacity .9s var(--ease-out),
    transform .9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.anim-pending.anim-from-left { transform: translate3d(-40px, 0, 0); }
.anim-pending.anim-from-right { transform: translate3d(40px, 0, 0); }
.anim-pending.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-accent { animation: none; }
  .hero__content > *,
  .hero__media img,
  .anim-pending {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    inset: 83px 0 auto;
    display: none;
    min-height: calc(100vh - 83px);
    padding: 42px 20px;
    background: rgba(255, 255, 255, .98);
    backdrop-filter: blur(12px);
  }
  .site-nav.is-open { display: block; }
  .site-nav__list, .site-nav .menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .site-nav a { font: 700 1.5rem "Manrope", sans-serif; }
  .split, .product-detail, .contact-grid { grid-template-columns: 1fr; }
  .card-grid, .product-grid { grid-template-columns: repeat(2, 1fr); }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .product-detail__media { position: static; height: 480px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .timeline__item.reveal { transform: translateY(28px); }
}

@media (max-width: 640px) {
  :root { --container: min(100% - 28px, 1160px); --radius: 20px; }
  body { font-size: 16px; }
  .header-inner { min-height: 74px; }
  .brand img,
  .custom-logo-link img,
  .custom-logo { height: 44px; width: auto; }
  .site-nav { inset-block-start: 75px; }
  .hero { min-height: 560px; }
  .hero__content { padding-block: 64px; }
  .hero__media::after { background: rgba(8, 31, 27, .68); }
  .hero__dots { right: 20px; bottom: 22px; }
  .hero__media img { object-position: center 40%; }
  .card-grid, .product-grid { grid-template-columns: 1fr; }
  .value-card__image { height: 290px; }
  .product-card__media { height: 280px; }
  .split__media img { min-height: 380px; }
  .stat-row { grid-template-columns: 1fr; }
  .stat { padding-bottom: 16px; }
  .timeline::before { left: 10px; }
  .timeline__item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-left: 38px;
  }
  .timeline__year::after { left: 3px; }
  .product-detail__media { height: 380px; padding: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
}

/* Elementor: full-bleed sin alterar el markup del tema dentro del widget HTML */
.elementor-section.elementor-section-boxed > .elementor-container {
  max-width: none;
}
.elementor-widget-html > .elementor-widget-container {
  margin: 0;
  padding: 0;
}
.elementor-element.elementor-widget-html {
  width: 100%;
}
body.elementor-editor-active .site-accent {
  z-index: 0;
}
