/* ==========================================================================
   Merly Events · Planner & Decoration
   Paleta tomada del logo: verde oliva, lino/arena y blanco.
   ========================================================================== */
:root {
  --olive: #6b7150;
  --olive-dark: #4f5439;
  --olive-soft: #8c9170;
  --linen: #e8dfd4;
  --linen-soft: #f3eee7;
  --cream: #faf8f4;
  --ink: #34362b;
  --muted: #7a7b6e;
  --line: #ddd4c7;
  --white: #ffffff;

  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-script: "Great Vibes", cursive;
  --font-sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 18px;
  --shadow: 0 18px 40px -24px rgba(52, 54, 43, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Bootstrap */
  --bs-body-font-family: var(--font-sans);
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--cream);
  --bs-link-color: var(--olive);
  --bs-link-hover-color: var(--olive-dark);
  --bs-border-color: var(--line);
  --bs-primary-rgb: 107, 113, 80;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); font-weight: 300; color: var(--ink); background: var(--cream); letter-spacing: .01em; }
h1, h2, h3, h4, .serif { font-family: var(--font-serif); font-weight: 500; color: var(--olive-dark); letter-spacing: .01em; }
a { text-decoration: none; }
img { max-width: 100%; }
::selection { background: var(--olive); color: var(--white); }

.script { font-family: var(--font-script); color: var(--olive); font-weight: 400; line-height: 1; }
.eyebrow { font-size: .75rem; letter-spacing: .32em; text-transform: uppercase; color: var(--olive-soft); font-weight: 500; }
.lead-soft { font-size: 1.125rem; color: var(--muted); line-height: 1.75; }
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.section-linen { background: var(--linen-soft); }
.section-title { font-size: clamp(2.2rem, 4.5vw, 3.4rem); line-height: 1.05; margin: .35rem 0 1rem; }
.section-head { max-width: 640px; margin: 0 auto 3.5rem; text-align: center; }
.divider-leaf { display: block; width: 84px; height: 42px; margin: 1rem auto 0; color: var(--olive-soft); }
.divider-leaf svg { width: 100%; height: 100%; display: block; }

/* ---------- Botones ---------- */
.btn-merly, .btn-merly-outline {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .9rem 2rem; border-radius: 999px; font-size: .8rem; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase; transition: all .35s var(--ease); border: 1px solid var(--olive);
}
.btn-merly { background: var(--olive); color: var(--white); }
.btn-merly:hover { background: var(--olive-dark); border-color: var(--olive-dark); color: var(--white); transform: translateY(-2px); }
.btn-merly-outline { background: transparent; color: var(--olive-dark); }
.btn-merly-outline:hover { background: var(--olive); color: var(--white); }
.btn-merly-light { background: var(--white); color: var(--olive-dark); border-color: var(--white); }
.btn-merly-light:hover { background: transparent; color: var(--white); border-color: var(--white); }
.link-arrow { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; color: var(--olive); }
.link-arrow::after { content: "→"; margin-left: .5rem; transition: margin .3s var(--ease); }
.link-arrow:hover::after { margin-left: .9rem; }

/* ---------- Navegación ---------- */
.site-header { position: sticky; top: 0; z-index: 1030; background: rgba(250, 248, 244, .88); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; }
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(52,54,43,.4); }
.site-header .navbar { padding: .65rem 0; }
.brand { display: flex; align-items: center; gap: .75rem; }
.brand img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; }
.brand-text { line-height: 1; }
.brand-text .script { font-size: 1.8rem; display: block; }
.brand-text small { font-family: var(--font-serif); font-size: .82rem; letter-spacing: .14em; color: var(--muted); }
.site-header .nav-link { font-size: .78rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); padding: .5rem 1rem !important; position: relative; }
.site-header .nav-link::after { content: ""; position: absolute; left: 1rem; right: 1rem; bottom: .2rem; height: 1px; background: var(--olive); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.site-header .nav-link:hover::after, .site-header .nav-link.active::after { transform: scaleX(1); }
.site-header .nav-link.active, .site-header .nav-link:hover { color: var(--olive-dark); }
.navbar-toggler { border: 0; box-shadow: none !important; }
.navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%236b7150' stroke-linecap='round' stroke-width='1.6' d='M5 9h20M5 15h20M5 21h20'/%3e%3c/svg%3e"); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem); background: radial-gradient(1200px 600px at 85% 10%, var(--linen) 0, transparent 60%), var(--cream); }
.hero h1 { font-size: clamp(2.8rem, 6.2vw, 5.2rem); line-height: 1; margin: .6rem 0 1.4rem; }
.hero h1 em { font-family: var(--font-script); font-style: normal; color: var(--olive); font-size: 1.15em; }
.hero-art { position: relative; aspect-ratio: 4/5; max-width: 480px; margin-left: auto; }
.hero-art .frame { position: absolute; inset: 0; border-radius: 240px 240px var(--radius) var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero-art .frame img, .hero-art .frame .media-placeholder { width: 100%; height: 100%; object-fit: cover; }
.hero-art .ring { position: absolute; inset: -18px -18px 30px 30px; border: 1px solid var(--olive-soft); border-radius: 260px 260px var(--radius) var(--radius); opacity: .5; }
.hero-art .badge-logo { position: absolute; left: -38px; bottom: 40px; width: 120px; height: 120px; border-radius: 50%; background: var(--white); padding: 6px; box-shadow: var(--shadow); }
.hero-art .badge-logo img { border-radius: 50%; }
.hero-stats { display: flex; gap: 2.5rem; margin-top: 2.75rem; padding-top: 1.75rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hero-stats strong { font-family: var(--font-serif); font-size: 2rem; color: var(--olive-dark); font-weight: 500; display: block; line-height: 1; }
.hero-stats span { font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* ---------- Áreas ---------- */
.area-card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--white); box-shadow: var(--shadow); transition: transform .5s var(--ease); height: 100%; }
.area-card:hover { transform: translateY(-6px); }
.area-card .media { aspect-ratio: 4/5; overflow: hidden; }
.area-card .media > * { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.area-card:hover .media > * { transform: scale(1.05); }
.area-card .body { position: absolute; inset: auto 0 0 0; padding: 2rem 1.75rem 1.75rem; background: linear-gradient(to top, rgba(52,54,43,.78), rgba(52,54,43,0)); color: var(--white); }
.area-card .body .script { color: var(--linen); font-size: 2rem; }
.area-card .body h3 { color: var(--white); font-size: 2.1rem; margin: 0 0 .35rem; }
.area-card .body p { font-size: .92rem; margin: 0; opacity: .9; }
.chip-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
.chip { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; padding: .35rem .8rem; border-radius: 999px; border: 1px solid currentColor; opacity: .9; }
.chip-olive { color: var(--olive); border-color: var(--line); background: var(--white); }
.chip-olive:hover { background: var(--olive); color: var(--white); border-color: var(--olive); }

/* ---------- Placeholder de imagen ---------- */
.media-placeholder { display: grid; place-items: center; width: 100%; height: 100%; min-height: 160px; color: var(--olive-soft); background:
  radial-gradient(circle at 30% 20%, rgba(255,255,255,.7), transparent 55%),
  linear-gradient(135deg, var(--linen) 0%, var(--linen-soft) 55%, #dfe1d3 100%); }
.media-placeholder svg { width: 38%; max-width: 140px; opacity: .55; }
.media-placeholder.ph-flores { background: radial-gradient(circle at 70% 30%, rgba(255,255,255,.75), transparent 55%), linear-gradient(135deg, #efe4dc, #e8dfd4 50%, #dde2cf); }
.media-placeholder.ph-charcuteria { background: radial-gradient(circle at 30% 70%, rgba(255,255,255,.6), transparent 55%), linear-gradient(135deg, #e6dccd, #efe7dc 50%, #d9dcc8); }

/* ---------- Tarjetas de servicio ---------- */
.offer-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); height: 100%; display: flex; flex-direction: column; transition: transform .45s var(--ease); }
.offer-card:hover { transform: translateY(-5px); }
.offer-card .media { aspect-ratio: 4/3; overflow: hidden; }
.offer-card .media > * { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.offer-card:hover .media > * { transform: scale(1.05); }
.offer-card .body { padding: 1.6rem 1.6rem 1.8rem; display: flex; flex-direction: column; flex: 1; }
.offer-card h3 { font-size: 1.65rem; margin: .35rem 0 .5rem; }
.offer-card p { color: var(--muted); font-size: .95rem; flex: 1; }
.offer-card .price { font-family: var(--font-serif); color: var(--olive-dark); font-size: 1.15rem; }

/* ---------- Sobre nosotros ---------- */
.about-media { position: relative; }
.about-media .frame { border-radius: var(--radius); overflow: hidden; aspect-ratio: 5/6; box-shadow: var(--shadow); }
.about-media .frame > * { width: 100%; height: 100%; object-fit: cover; }
.about-media::before { content: ""; position: absolute; inset: 24px -24px -24px 24px; border: 1px solid var(--olive-soft); border-radius: var(--radius); z-index: -1; opacity: .5; }
.about-text p { color: var(--muted); line-height: 1.85; font-size: 1.05rem; }
.feature-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem; }
.feature-list li { display: flex; gap: .9rem; align-items: flex-start; }
.feature-list .dot { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--linen); color: var(--olive-dark); display: grid; place-items: center; font-family: var(--font-serif); font-size: 1rem; }

/* ---------- Proceso ---------- */
.step { text-align: center; padding: 0 1rem; }
.step .num { font-family: var(--font-serif); font-size: 3.2rem; color: var(--olive-soft); line-height: 1; opacity: .7; }
.step h4 { font-size: 1.45rem; margin: .5rem 0; }
.step p { color: var(--muted); font-size: .95rem; }

/* ---------- Galería ---------- */
.gallery-grid { columns: 4 240px; column-gap: 1rem; }
.gallery-item { break-inside: avoid; margin-bottom: 1rem; border-radius: 14px; overflow: hidden; position: relative; display: block; background: var(--linen); cursor: zoom-in; }
.gallery-item img, .gallery-item .media-placeholder { width: 100%; display: block; transition: transform 1s var(--ease); }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item figcaption { position: absolute; inset: auto 0 0; padding: 1.2rem 1rem .8rem; color: var(--white); font-size: .85rem; background: linear-gradient(to top, rgba(52,54,43,.65), transparent); opacity: 0; transition: opacity .35s; }
.gallery-item:hover figcaption { opacity: 1; }
.filter-pills { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.5rem; }
.filter-pills a { padding: .55rem 1.3rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 500; }
.filter-pills a.active, .filter-pills a:hover { background: var(--olive); color: var(--white); border-color: var(--olive); }
.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(30, 31, 25, .92); display: none; align-items: center; justify-content: center; padding: 2rem; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 88vh; max-width: 92vw; border-radius: 10px; }
.lightbox button { position: absolute; top: 1rem; right: 1.25rem; background: none; border: 0; color: var(--white); font-size: 2.4rem; line-height: 1; }

/* ---------- Testimonios ---------- */
.testimonial { background: var(--white); border-radius: var(--radius); padding: 2.25rem 2rem; height: 100%; box-shadow: var(--shadow); position: relative; }
.testimonial::before { content: "“"; position: absolute; top: .4rem; left: 1.4rem; font-family: var(--font-serif); font-size: 5rem; color: var(--linen); line-height: 1; }
.testimonial blockquote { position: relative; font-family: var(--font-serif); font-size: 1.3rem; line-height: 1.45; color: var(--ink); margin: 0 0 1.4rem; font-style: italic; }
.testimonial .who { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--olive); font-weight: 500; }
.testimonial .stars { color: var(--olive-soft); letter-spacing: .2em; font-size: .85rem; }

/* ---------- CTA ---------- */
.cta { position: relative; overflow: hidden; border-radius: calc(var(--radius) * 1.5); background: var(--olive); color: var(--linen-soft); padding: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 5vw, 4rem); text-align: center; }
.cta h2 { color: var(--white); font-size: clamp(2.2rem, 4.5vw, 3.5rem); }
.cta .script { color: var(--linen); font-size: 2.4rem; }
.cta p { opacity: .85; max-width: 560px; margin: 0 auto 2rem; }
.cta::before, .cta::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; }
.cta::before { width: 420px; height: 420px; left: -140px; top: -180px; }
.cta::after { width: 520px; height: 520px; right: -200px; bottom: -280px; }

/* ---------- Encabezado de página ---------- */
.page-hero { padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem); text-align: center; background: linear-gradient(to bottom, var(--linen-soft), var(--cream)); }
.page-hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); margin: .3rem 0 1rem; }
.page-hero .script { font-size: clamp(2.2rem, 4vw, 3rem); }
.page-hero p { max-width: 640px; margin: 0 auto; }
.breadcrumb-merly { display: flex; justify-content: center; gap: .5rem; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb-merly a { color: var(--olive); }

.category-block + .category-block { margin-top: 5rem; }
.category-block .head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.category-block h2 { font-size: 2.4rem; margin: 0; }
.empty-note { text-align: center; color: var(--muted); padding: 2.5rem; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--white); }

/* ---------- Detalle ---------- */
.detail-media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; box-shadow: var(--shadow); }
.detail-media > * { width: 100%; height: 100%; object-fit: cover; }
.detail-body { white-space: pre-line; color: var(--muted); line-height: 1.85; font-size: 1.05rem; }

/* ---------- Formularios ---------- */
.form-card { background: var(--white); border-radius: calc(var(--radius) * 1.3); padding: clamp(1.75rem, 4vw, 3rem); box-shadow: var(--shadow); }
.form-label { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: .4rem; }
.form-control, .form-select { border-radius: 12px; border-color: var(--line); padding: .8rem 1rem; background-color: var(--cream); font-weight: 300; }
.form-control:focus, .form-select:focus { border-color: var(--olive-soft); box-shadow: 0 0 0 .2rem rgba(107,113,80,.15); background-color: var(--white); }
.form-check-input:checked { background-color: var(--olive); border-color: var(--olive); }
.field-validation-error, .validation-summary-errors { color: #9b4a3c; font-size: .85rem; }
.validation-summary-errors ul { padding-left: 1rem; margin: 0; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-list { list-style: none; padding: 0; display: grid; gap: 1.2rem; margin-top: 2rem; }
.contact-list li span { display: block; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--olive-soft); }
.contact-list li a, .contact-list li strong { font-family: var(--font-serif); font-size: 1.35rem; color: var(--olive-dark); font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer { background: var(--olive-dark); color: rgba(243, 238, 231, .8); padding: 4.5rem 0 2rem; margin-top: 0; }
.site-footer h5 { color: var(--white); font-family: var(--font-serif); font-size: 1.3rem; margin-bottom: 1.1rem; }
.site-footer a { color: rgba(243, 238, 231, .8); }
.site-footer a:hover { color: var(--white); }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: .55rem; font-size: .95rem; }
.site-footer .brand-text .script { color: var(--linen); font-size: 2.4rem; }
.site-footer .brand-text small { color: rgba(243, 238, 231, .7); }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 3rem; padding-top: 1.5rem; font-size: .8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.socials { display: flex; gap: .6rem; margin-top: 1.25rem; }
.socials a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); display: grid; place-items: center; transition: all .3s; }
.socials a:hover { background: var(--linen); color: var(--olive-dark); border-color: var(--linen); }
.socials svg { width: 17px; height: 17px; }

.whatsapp-fab { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1040; width: 58px; height: 58px; border-radius: 50%; background: var(--olive); color: var(--white); display: grid; place-items: center; box-shadow: 0 12px 30px -10px rgba(52,54,43,.6); transition: transform .3s var(--ease); }
.whatsapp-fab:hover { transform: scale(1.08); color: var(--white); background: var(--olive-dark); }
.whatsapp-fab svg { width: 28px; height: 28px; }

/* ---------- Animación de aparición ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto !important; }
}

@media (max-width: 991.98px) {
  .hero-art { margin: 3rem auto 0; max-width: 360px; }
  .hero-art .badge-logo { left: -10px; width: 96px; height: 96px; }
  .site-header .navbar-collapse { padding: 1rem 0; }
}
@media (max-width: 575.98px) {
  .brand img { width: 44px; height: 44px; }
  .brand-text .script { font-size: 1.5rem; }
  .hero-stats { gap: 1.5rem; }
}

/* Cormorant usa numerales antiguos por defecto; forzamos números alineados. */
h1, h2, h3, h4, .serif, .hero-stats strong, .step .num, .offer-card .price { font-variant-numeric: lining-nums; }

/* Menú con 6 enlaces: evita que el nombre se parta en pantallas medianas. */
.brand-text { white-space: nowrap; }
@media (min-width: 992px) and (max-width: 1199.98px) {
  .site-header .nav-link { padding: .5rem .45rem !important; letter-spacing: .08em; font-size: .72rem; }
  .site-header .nav-link::after { left: .45rem; right: .45rem; }
  .brand-text small { display: none; }
}

/* ---------- Nuestra historia ---------- */
.story-section { background: var(--linen); }
.story-section .breadcrumb-merly { margin-bottom: 2rem; }
.story-hearts { width: 72px; height: 66px; color: var(--olive); margin-bottom: .75rem; }
.story-title { font-size: clamp(2.6rem, 6vw, 4.2rem); color: var(--ink); margin: 0; }
.story-subtitle { font-size: clamp(1.7rem, 3vw, 2.2rem); color: var(--olive); margin: .75rem 0 0; }
.story-card { display: grid; grid-template-columns: 1fr 1fr; background: var(--white); overflow: hidden; box-shadow: var(--shadow); border-radius: 4px; }
.story-media { min-height: 420px; }
.story-media > * { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-body { padding: clamp(2rem, 5vw, 4rem); display: flex; flex-direction: column; justify-content: center; text-align: center; }
.story-body h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); color: var(--ink); margin-bottom: 1.75rem; line-height: 1.2; }
.story-body p { font-family: var(--font-serif); font-size: 1.2rem; line-height: 1.75; color: #5a5b50; margin: 0 auto 1.1rem; max-width: 560px; }
@media (max-width: 767.98px) {
  .story-card { grid-template-columns: 1fr; }
  .story-media { min-height: 0; aspect-ratio: 1.1; }
}

/* ---------- Misión, visión y valores ---------- */
.purpose-card { position: relative; height: 100%; background: var(--white); border-radius: calc(var(--radius) * 1.3); padding: clamp(2rem, 4vw, 3.25rem); box-shadow: var(--shadow); overflow: hidden; transition: transform .45s var(--ease); }
.purpose-card:hover { transform: translateY(-5px); }
.purpose-card::after { content: ""; position: absolute; width: 260px; height: 260px; right: -90px; top: -90px; border: 1px solid var(--line); border-radius: 50%; }
.purpose-card h3 { font-size: clamp(2.6rem, 4vw, 3.2rem); margin: .5rem 0 1rem; color: var(--olive); }
.purpose-card p { font-family: var(--font-serif); font-size: 1.22rem; line-height: 1.75; color: #5a5b50; margin: 0; position: relative; }
.purpose-icon { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--linen); color: var(--olive-dark); }
.purpose-icon svg { width: 28px; height: 28px; }
.purpose-card.dark { background: var(--olive); }
.purpose-card.dark::after { border-color: rgba(255,255,255,.18); }
.purpose-card.dark h3 { color: var(--linen); }
.purpose-card.dark p { color: rgba(250,248,244,.9); }
.purpose-card.dark .purpose-icon { background: rgba(255,255,255,.14); color: var(--white); }

.value-card { position: relative; height: 100%; background: var(--white); border-radius: var(--radius); padding: 2.25rem 1.75rem 2rem; box-shadow: var(--shadow); border-top: 3px solid var(--olive-soft); transition: transform .45s var(--ease), border-color .45s; }
.value-card:hover { transform: translateY(-6px); border-color: var(--olive-dark); }
.value-num { font-family: var(--font-serif); font-size: 2.8rem; line-height: 1; color: var(--linen); font-variant-numeric: lining-nums; font-weight: 600; display: block; margin-bottom: .9rem; transition: color .45s; }
.value-card:hover .value-num { color: var(--olive-soft); }
.value-card h3 { font-size: 1.6rem; margin: 0 0 .65rem; }
.value-card p { color: var(--muted); font-size: .97rem; line-height: 1.7; margin: 0; }

@media (min-width: 1200px) and (max-width: 1399.98px) {
  .site-header .nav-link { padding: .5rem .7rem !important; letter-spacing: .14em; }
}

/* ---------- Blog ---------- */
.blog-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); height: 100%; display: flex; flex-direction: column; transition: transform .45s var(--ease); }
.blog-card:hover { transform: translateY(-5px); }
.blog-card .media { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.blog-card .media > img, .blog-card .media > .media-placeholder { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.blog-card:hover .media > img { transform: scale(1.05); }
.blog-card .body { padding: 1.5rem 1.6rem 1.75rem; display: flex; flex-direction: column; flex: 1; }
.blog-card h3 { font-size: 1.6rem; line-height: 1.2; margin: .5rem 0 .6rem; }
.blog-card p { color: var(--muted); font-size: .95rem; margin-bottom: 1.25rem; }
.blog-tag { position: absolute; left: 1rem; top: 1rem; background: rgba(250,248,244,.92); color: var(--olive-dark); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; padding: .35rem .8rem; border-radius: 999px; }
.blog-meta { display: flex; gap: .5rem; flex-wrap: wrap; font-size: .75rem; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.blog-featured { display: grid; grid-template-columns: 1.1fr 1fr; background: var(--white); border-radius: calc(var(--radius) * 1.3); overflow: hidden; box-shadow: var(--shadow); }
.blog-featured .media { min-height: 380px; }
.blog-featured .media > * { width: 100%; height: 100%; object-fit: cover; }
.blog-featured .body { padding: clamp(2rem, 4vw, 3.5rem); display: flex; flex-direction: column; justify-content: center; }
.blog-featured h2 { font-size: clamp(2rem, 3.4vw, 2.8rem); margin: .5rem 0 1rem; }
.blog-cover { border-radius: calc(var(--radius) * 1.3); overflow: hidden; aspect-ratio: 16/8; box-shadow: var(--shadow); }
.blog-cover > * { width: 100%; height: 100%; object-fit: cover; }
.blog-content { font-family: var(--font-serif); font-size: 1.28rem; line-height: 1.85; color: #46473c; }
.blog-content p { margin: 0 0 1.4rem; }
.blog-content h2 { font-size: 2.1rem; margin: 2.5rem 0 1rem; }
.blog-content h3 { font-size: 1.6rem; margin: 2rem 0 .8rem; }
.blog-content ul { padding-left: 1.3rem; margin: 0 0 1.4rem; }
.blog-content li { margin-bottom: .4rem; }
.blog-content li::marker { color: var(--olive); }
.blog-content blockquote { margin: 2rem 0; padding: 1.25rem 1.75rem; border-left: 3px solid var(--olive); background: var(--linen-soft); border-radius: 0 12px 12px 0; font-style: italic; font-size: 1.45rem; color: var(--olive-dark); }
.blog-share { margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
@media (max-width: 767.98px) {
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured .media { min-height: 0; aspect-ratio: 16/10; }
  .blog-cover { aspect-ratio: 4/3; }
  .blog-content { font-size: 1.18rem; }
}

/* ---------- Cotizaciones: formularios y seguimiento ---------- */
.quote-choice { display: flex; flex-direction: column; height: 100%; background: var(--white); border-radius: var(--radius); padding: 2.25rem 2rem; box-shadow: var(--shadow); border-top: 3px solid var(--olive-soft); transition: transform .45s var(--ease), border-color .45s; }
.quote-choice:hover { transform: translateY(-5px); border-color: var(--olive-dark); }
.quote-choice .script { font-size: 2rem; }
.quote-choice h2 { font-size: 2rem; margin: .25rem 0 .6rem; }
.quote-choice p { color: var(--muted); margin-bottom: 1.5rem; }
.form-section { font-size: 1.5rem; margin: 0 0 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.choice-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice { position: relative; cursor: pointer; margin: 0; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-block; padding: .55rem 1.1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--cream); font-size: .92rem; transition: all .2s; }
.choice input:checked + span { background: var(--olive); border-color: var(--olive); color: var(--white); }
.choice input:focus-visible + span { outline: 2px solid var(--olive-soft); outline-offset: 2px; }
.input-validation-error { border-color: #c27766 !important; }
.quote-steps { padding-left: 1.2rem; color: var(--muted); line-height: 1.9; }
.tracking-code { display: inline-block; font-family: var(--font-serif); font-size: 1.6rem; letter-spacing: .12em; color: var(--olive-dark); background: var(--white); padding: .5rem 1.4rem; border-radius: 999px; box-shadow: var(--shadow); font-variant-numeric: lining-nums; }
.progress-steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); padding: 0; margin: 0; position: relative; }
.progress-steps::before { content: ""; position: absolute; top: 9px; left: 10%; right: 10%; height: 2px; background: var(--line); }
.progress-steps li { position: relative; text-align: center; font-size: .8rem; color: var(--muted); }
.progress-steps .dot { display: block; width: 20px; height: 20px; margin: 0 auto .5rem; border-radius: 50%; background: var(--white); border: 2px solid var(--line); position: relative; }
.progress-steps li.done .dot { background: var(--olive-soft); border-color: var(--olive-soft); }
.progress-steps li.current .dot { background: var(--olive); border-color: var(--olive); box-shadow: 0 0 0 5px rgba(107,113,80,.18); }
.progress-steps li.current .label { color: var(--olive-dark); font-weight: 500; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 1.25rem 1.25rem; border-left: 2px solid var(--line); }
.timeline li::before { content: ""; position: absolute; left: -6px; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--olive); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline .when { font-size: .75rem; color: var(--muted); letter-spacing: .04em; }
.timeline p { margin: .25rem 0 0; color: var(--muted); white-space: pre-line; }
.answers dt { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--olive-soft); font-weight: 500; margin-top: .9rem; }
.answers dt:first-child { margin-top: 0; }
.answers dd { margin: .15rem 0 0; white-space: pre-line; }
.toast-merly { border-radius: 12px; padding: .9rem 1.2rem; background: #e1e6d2; color: #3f4b23; border: 1px solid #cdd5b6; }
.toast-merly.error { background: #fbf1ef; color: #8c3f31; border-color: #efd2cb; }
@media (max-width: 575.98px) {
  .progress-steps { grid-template-columns: 1fr; gap: .75rem; }
  .progress-steps::before { display: none; }
  .progress-steps li { display: flex; align-items: center; gap: .75rem; text-align: left; }
  .progress-steps .dot { margin: 0; flex: none; }
}

/* ---------- Carrusel de portada ---------- */
.hero-carousel { --hc-duration: 7000ms; position: relative; height: clamp(560px, calc(100vh - 76px), 900px); overflow: hidden; background: var(--olive-dark); color: var(--white); isolation: isolate; }
.hc-slides, .hc-slide { position: absolute; inset: 0; }
.hc-slide { opacity: 0; visibility: hidden; transition: opacity 1.4s ease, visibility 0s linear 1.4s; }
.hc-slide.is-active { opacity: 1; visibility: visible; z-index: 1; transition: opacity 1.4s ease, visibility 0s; }
.hc-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform calc(var(--hc-duration) + 1.6s) linear; }
.hc-slide.is-active .hc-image { transform: scale(1); }
.hc-overlay { position: absolute; inset: 0; background:
  linear-gradient(100deg, rgba(37,39,29,.74) 0%, rgba(37,39,29,.46) 42%, rgba(37,39,29,.08) 78%),
  linear-gradient(to top, rgba(37,39,29,.55) 0%, rgba(37,39,29,0) 35%); }
.hc-content { position: relative; height: 100%; display: flex; align-items: center; padding-bottom: 4rem; }
.hc-text { max-width: 640px; }
.hc-eyebrow { display: block; font-family: var(--font-script); font-size: clamp(2.1rem, 4vw, 3rem); color: var(--linen); line-height: 1; margin-bottom: .6rem; }
.hc-title { font-family: var(--font-serif); font-weight: 500; color: var(--white); font-size: clamp(2.7rem, 6vw, 5.4rem); line-height: 1.02; margin: 0 0 1.25rem; letter-spacing: -.005em; }
.hc-word { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .06em; }
.hc-word > span { display: inline-block; transform: translateY(105%); opacity: 0; }
.hc-subtitle { font-size: clamp(1rem, 1.6vw, 1.15rem); line-height: 1.75; color: rgba(255,255,255,.9); max-width: 520px; margin: 0 0 2rem; }
.hc-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.hc-link { color: var(--white); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; border-bottom: 1px solid rgba(255,255,255,.5); padding-bottom: .25rem; }
.hc-link:hover { color: var(--linen); border-color: var(--linen); }
.hc-eyebrow, .hc-subtitle, .hc-actions { opacity: 0; transform: translateY(18px); }

/* Entrada de textos: palabra por palabra, con retraso escalonado. Al salir se ocultan sin retraso. */
.hc-slide.is-active .hc-eyebrow { opacity: 1; transform: none; transition: opacity 1s ease .25s, transform 1s var(--ease) .25s; }
.hc-slide.is-active .hc-word > span { transform: none; opacity: 1; transition: transform 1s var(--ease), opacity 1s ease; transition-delay: calc(.4s + var(--i) * .09s); }
.hc-slide.is-active .hc-subtitle { opacity: 1; transform: none; transition: opacity 1s ease 1s, transform 1s var(--ease) 1s; }
.hc-slide.is-active .hc-actions { opacity: 1; transform: none; transition: opacity 1s ease 1.2s, transform 1s var(--ease) 1.2s; }

.hc-controls { position: absolute; left: 0; right: 0; bottom: 2rem; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.hc-dots { display: flex; gap: .6rem; }
.hc-dot { width: 46px; height: 18px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; align-items: center; }
.hc-dot > span { display: block; height: 2px; background: rgba(255,255,255,.35); position: relative; overflow: hidden; border-radius: 2px; }
.hc-dot > span::after { content: ""; position: absolute; inset: 0; background: var(--white); transform: scaleX(0); transform-origin: left; }
.hc-dot.is-active > span::after { animation: hc-progress var(--hc-duration) linear forwards; }
.hero-carousel.is-paused .hc-dot.is-active > span::after { animation-play-state: paused; }
.hero-carousel.no-autoplay .hc-dot.is-active > span::after { animation: none; transform: scaleX(1); }
@keyframes hc-progress { to { transform: scaleX(1); } }
.hc-dot:focus-visible { outline: 1px solid var(--white); outline-offset: 3px; }
.hc-arrows { display: flex; align-items: center; gap: .5rem; }
.hc-counter { font-family: var(--font-serif); font-size: 1rem; color: rgba(255,255,255,.75); margin-right: .75rem; font-variant-numeric: lining-nums tabular-nums; letter-spacing: .08em; }
.hc-counter b { color: var(--white); font-weight: 500; }
.hc-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.04); color: var(--white); display: grid; place-items: center; transition: background .3s, border-color .3s; backdrop-filter: blur(4px); }
.hc-arrow:hover { background: rgba(255,255,255,.16); border-color: var(--white); }
.hc-arrow svg { width: 18px; height: 18px; }
.hc-arrow .i-play { display: none; }
.hero-carousel.is-user-paused .hc-arrow .i-pause { display: none; }
.hero-carousel.is-user-paused .hc-arrow .i-play { display: block; }

@media (max-width: 767.98px) {
  .hero-carousel { height: clamp(560px, calc(100svh - 68px), 760px); }
  .hc-overlay { background: linear-gradient(to top, rgba(37,39,29,.85) 0%, rgba(37,39,29,.45) 55%, rgba(37,39,29,.15) 100%); }
  .hc-content { align-items: flex-end; padding-bottom: 6.5rem; }
  .hc-arrow[data-prev], .hc-arrow[data-next], .hc-counter { display: none; }
  .hc-dot { width: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .hc-image, .hc-slide.is-active .hc-image { transform: none; transition: none; }
  .hc-slide, .hc-slide.is-active { transition: opacity .4s ease; }
  .hc-word > span, .hc-eyebrow, .hc-subtitle, .hc-actions { transform: none !important; transition: opacity .4s ease !important; }
}

/* Tarjetas de áreas sobre fotografías: degradado más profundo para que el texto se lea bien. */
.area-card .body { padding-top: 6rem; background: linear-gradient(to top, rgba(37,39,29,.86) 0%, rgba(37,39,29,.6) 48%, rgba(37,39,29,.18) 82%, rgba(37,39,29,0) 100%); }
.area-card .body h3, .area-card .body p { text-shadow: 0 1px 10px rgba(0,0,0,.3); }
.area-card .body .script { color: var(--linen); text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.area-card .body p { color: rgba(255,255,255,.92); }
.form-block { padding-top: 1.25rem; }
.section-text { color: var(--muted); white-space: pre-line; margin: -.25rem 0 .5rem; }

/* ==========================================================================
   Responsive (móvil y tableta)
   ========================================================================== */
/* Margen lateral de 16 px en móviles y espaciados que no se salen del contenedor.
   Las filas .g-5 de Bootstrap usan márgenes negativos de 24 px: más que el padding del contenedor. */
@media (max-width: 767.98px) {
  .container, .container-fluid { --bs-gutter-x: 2rem; }
  .row.g-5, .row.gx-5 { --bs-gutter-x: 2rem; }
  .row.g-5, .row.gy-5 { --bs-gutter-y: 2.25rem; }
  .section { padding: 3.5rem 0; }
  .section-head { margin-bottom: 2.25rem; }
  .section-title { font-size: clamp(2rem, 8vw, 2.6rem); }
  .page-hero { padding: 2.75rem 0 2rem; }
  .page-hero h1 { font-size: clamp(2.3rem, 10vw, 3rem); }
  .form-card { padding: 1.5rem 1.15rem; border-radius: var(--radius); }
  .cta { padding: 2.75rem 1.25rem; border-radius: var(--radius); }
  .cta .script { font-size: 2rem; }
  .btn-merly, .btn-merly-outline { padding: .85rem 1.5rem; letter-spacing: .16em; }
  .category-block + .category-block { margin-top: 3.5rem; }
  .category-block h2 { font-size: 2rem; }
  .breadcrumb-merly { flex-wrap: wrap; justify-content: center; }
  .filter-pills { gap: .4rem; }
  .filter-pills a { padding: .5rem 1rem; font-size: .7rem; letter-spacing: .12em; }
  .gallery-grid { columns: 2 140px; column-gap: .6rem; }
  .gallery-item { margin-bottom: .6rem; }
  .testimonial { padding: 1.75rem 1.4rem; }
  .testimonial blockquote { font-size: 1.15rem; }
  .about-media::before { inset: 14px -10px -14px 14px; }
  .story-body { padding: 1.75rem 1.25rem; }
  .story-body p { font-size: 1.1rem; }
  .purpose-card { padding: 1.75rem 1.4rem; }
  .purpose-card p { font-size: 1.1rem; }
  .value-card { padding: 1.75rem 1.4rem; }
  .blog-featured .body { padding: 1.75rem 1.4rem; }
  .site-footer { padding: 3.25rem 0 1.5rem; }
  .site-footer .legal { justify-content: center; text-align: center; }
  .hero-stats { gap: 1.25rem 1.75rem; }
  .hero-stats strong { font-size: 1.7rem; }
  .tracking-code { font-size: 1.2rem; padding: .45rem 1rem; }
  .choice span { padding: .5rem .95rem; font-size: .88rem; }
  .whatsapp-fab { right: 1rem; bottom: 1rem; width: 52px; height: 52px; }
  /* Evita que iOS haga zoom al tocar un campo (necesita 16 px o más). */
  .form-control, .form-select { font-size: 16px; }
}

/* Menú desplegable del móvil: enlaces cómodos de tocar y botón a lo ancho. */
@media (max-width: 991.98px) {
  .site-header .navbar-collapse { max-height: calc(100svh - 76px); overflow-y: auto; }
  .site-header .nav-link { padding: .8rem .25rem !important; border-bottom: 1px solid var(--line); }
  .site-header .nav-link::after { display: none; }
  .site-header .nav-item:last-child { margin-top: 1rem !important; }
  .site-header .nav-item:last-child .btn-merly { width: 100%; justify-content: center; }
}

/* Red de seguridad: nada puede provocar desplazamiento lateral (clip no rompe el encabezado fijo). */
html, body { overflow-x: clip; }
img, video, svg, iframe { max-width: 100%; }
.answers dd, .detail-body, .blog-content, .timeline p { overflow-wrap: anywhere; }
