/* ============================================================
   Festival del Libro Dominicana — Website UI Kit styles
   Direction: "El Jardín" (florecer) recoloured to brand palette
   ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-ui); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }

/* ---------- buttons ---------- */
.btn { font-family: var(--font-brand); font-weight: 700; font-size: 15px; border: none; white-space: nowrap; max-width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 14px 26px; border-radius: var(--r-pill); transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--azul); color: #fff; box-shadow: var(--shadow-blue); }
.btn-primary:hover { background: var(--azul-700); transform: translateY(-2px); }
.btn-accent { background: var(--rojo); color: #fff; box-shadow: 0 14px 30px -14px rgba(236,28,36,.6); }
.btn-accent:hover { background: var(--rojo-700); transform: translateY(-2px); }
.btn-secondary { background: rgba(255,255,255,.7); color: var(--azul-900); border: 1.5px solid var(--line-strong); backdrop-filter: blur(8px); }
.btn-secondary:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--azul); }
.btn-ghost:hover { color: var(--azul-900); }
.btn .ar { transition: transform .2s; }
.btn:hover .ar { transform: translateX(4px); }

/* ---------- eyebrow / section head ---------- */
.eyebrow { font-family: var(--font-brand); font-weight: 700; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--rojo-700); display: inline-flex; align-items: center; gap: 8px; }
.eyebrow.on-blue { color: var(--amarillo); }
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.sec-head h2 { margin: 14px 0 0; }
.sec-head p { margin: 14px 0 0; }

/* ---------- NAV ---------- */
.nav { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.6); padding: 9px 12px 9px 16px; border-radius: var(--r-pill); box-shadow: var(--shadow-lg); transition: padding .3s, transform .35s cubic-bezier(.22,1,.36,1), opacity .25s; }
.nav.nav--hidden { transform: translateX(-50%) translateY(-180%); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .nav { transition: none; } }
.nav__logo { height: 30px; margin-right: 6px; }
.nav__links { display: flex; gap: 2px; }
.nav a.link { font-family: var(--font-brand); font-weight: 600; font-size: 14px; color: var(--ink-2); padding: 9px 15px; border-radius: var(--r-pill); transition: .18s; }
.nav a.link:hover { background: var(--azul-100); color: var(--azul-700); }
.nav a.link.active { background: var(--azul); color: #fff; }
.nav .nav__cta { margin-left: 6px; }
.nav__toggle { display: none; flex: none; width: 42px; height: 42px; border: none; background: transparent; color: var(--azul-900); border-radius: var(--r-pill); align-items: center; justify-content: center; font-size: 22px; cursor: pointer; transition: background .15s; }
.nav__toggle:hover { background: var(--azul-100); }
@media (max-width: 720px){
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute; top: calc(100% + 10px); right: 0; left: auto;
    flex-direction: column; gap: 2px; min-width: 220px;
    background: rgba(255,255,255,.97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
    padding: 10px; display: none;
  }
  .nav__links.open { display: flex; animation: nav-menu-in .22s cubic-bezier(.2,.8,.2,1) both; }
  .nav a.link { padding: 12px 16px; font-size: 16px; }
}
@keyframes nav-menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce){ .nav__links.open { animation: none; } }

/* ---------- skip link + keyboard focus ---------- */
.skip-link { position: absolute; left: 8px; top: -64px; z-index: 100; background: var(--azul); color: #fff; padding: 10px 18px; border-radius: 0 0 var(--r-sm) var(--r-sm); font-family: var(--font-brand); font-weight: 700; font-size: 14px; text-decoration: none; transition: top .15s; }
.skip-link:focus { top: 0; }
.btn:focus-visible, .nav a.link:focus-visible, .nav__toggle:focus-visible, .filter:focus-visible, .footer a.fl:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

/* ---------- HERO ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; background: var(--gris); padding: 130px 0 70px; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
/* Grid/flex children default to min-width:auto and won't shrink below their
   content's intrinsic size — the bloom-art column forces the single mobile
   column wider than the viewport, clipping the hero copy. min-width:0 lets the
   columns shrink to the viewport so the lead/heading wrap. (Verified via CDP:
   lead 400px → 334px at 390.) */
.hero__grid, .hero__grid > * { min-width: 0; }
.hero h1 { margin: 22px 0 0; }
.hero__lead { margin: 22px 0 0; max-width: 460px; }
.hero__cta { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero__art { position: relative; height: 520px; display: flex; align-items: center; justify-content: center; }
/* decorative blobs */
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; pointer-events: none; }
.blob.b1 { width: 360px; height: 360px; background: var(--azul-claro); top: -40px; right: -30px; }
.blob.b2 { width: 320px; height: 320px; background: var(--amarillo); bottom: -50px; left: -20px; opacity:.4; }
/* petals */
.petal { position: absolute; border-radius: 0 50% 0 50%; box-shadow: var(--shadow-md); }
.float { animation: float 7s ease-in-out infinite; }
@keyframes float { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-18px) } }
@keyframes grow { from{ transform: translateY(20px) } to{ transform: translateY(0) } }
.grow { animation: grow .7s ease-out both; }

/* ---------- PROGRAM ---------- */
.section { padding: 96px 0; }
.section.alt { background: var(--gris); }
.section.blue { background: var(--azul); color: #fff; }
.filters { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.filter { font-family: var(--font-brand); font-weight: 600; font-size: 13px; padding: 9px 18px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink-2); transition: .16s; }
.filter:hover { border-color: var(--azul-400); color: var(--azul-700); }
.filter.active { background: var(--azul); border-color: var(--azul); color: #fff; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px){ .cards{ grid-template-columns: 1fr 1fr; } .hero__grid{ grid-template-columns:1fr; } .hero__art{ height:380px; } }
@media (max-width: 620px){ .cards{ grid-template-columns: 1fr; } }
.ecard { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .2s, box-shadow .2s; cursor: pointer; border: 1px solid var(--line); }
.ecard:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.ecard__cover { height: 152px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ecard__cover .pet { position: absolute; border-radius: 0 50% 0 50%; opacity: .85; }
.ecard__cover i { font-size: 48px; color: #fff; position: relative; z-index: 2; opacity: .95; }
.ecard__tag { position: absolute; top: 12px; left: 12px; z-index: 3; font-family: var(--font-brand); font-weight: 800; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 6px; background: rgba(255,255,255,.92); color: var(--azul-900); }
.ecard__body { padding: 18px 20px 20px; }
.ecard__k { font-family: var(--font-brand); font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--rojo-700); }
.ecard__ti { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--azul-900); line-height: 1.12; margin: 7px 0 10px; }
.ecard__me { display: flex; flex-direction: column; gap: 6px; }
.ecard__me span { font-family: var(--font-ui); font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.ecard__me i { color: var(--azul-400); font-size: 15px; }

/* ---------- AUTHORS ---------- */
.authors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 900px){ .authors{ grid-template-columns: 1fr 1fr; } }
.author { text-align: center; }
.author__ph { width: 130px; height: 130px; margin: 0 auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; }
.author__ph .ring { position: absolute; inset: -6px; border-radius: 50%; border: 2px dashed; opacity: .5; }
.author__ph i { font-size: 52px; color: #fff; }
.author__n { font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--azul-900); }
.author__r { font-family: var(--font-brand); font-weight: 600; font-size: 12px; letter-spacing: .04em; color: var(--ink-3); margin-top: 4px; }

/* ---------- CTA strip (blue) ---------- */
.cta-strip { position: relative; overflow: hidden; border-radius: var(--r-xl); background: var(--azul); color: #fff; padding: 60px; display: flex; align-items: center; justify-content: space-between; gap: 30px; box-shadow: var(--shadow-blue); }
.cta-strip h2 { color: #fff; }
.cta-strip .petal { opacity: .9; }
@media (max-width: 760px){ .cta-strip{ flex-direction: column; text-align: center; padding: 44px 28px; } }

/* ---------- FOOTER ---------- */
.footer { background: var(--azul-900); color: rgba(255,255,255,.78); padding: 64px 0 36px; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 760px){ .footer__top{ grid-template-columns: 1fr 1fr; } }
.footer img { height: 56px; margin-bottom: 16px; }
.footer h3 { font-family: var(--font-brand); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #fff; margin: 0 0 16px; }
.footer a.fl { display: block; font-family: var(--font-ui); font-size: 14px; color: rgba(255,255,255,.7); padding: 5px 0; transition: .15s; }
.footer a.fl:hover { color: #fff; }
.footer__bottom { margin-top: 46px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.15); display: flex; justify-content: space-between; font-size: 13px; color: rgba(255,255,255,.55); font-family: var(--font-ui); }
.footer__social { display: flex; gap: 14px; }
.footer__social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; color: #fff; transition: .16s; }
.footer__social a:hover { background: var(--rojo); }

/* ---------- newsletter pill ---------- */
.news { display: flex; gap: 10px; background: #fff; border-radius: var(--r-pill); padding: 7px 7px 7px 20px; box-shadow: var(--shadow-md); max-width: 440px; }
.news input { flex: 1; border: none; outline: none; font-family: var(--font-read); font-size: 15px; color: var(--ink); background: transparent; }
.news input::placeholder { color: var(--ink-3); }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(20,33,58,.55); backdrop-filter: blur(4px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; animation: fade .2s ease; }
@keyframes fade { from{opacity:0} to{opacity:1} }
.modal { background: #fff; border-radius: var(--r-xl); max-width: 460px; width: 100%; padding: 34px; box-shadow: var(--shadow-lg); position: relative; animation: grow .3s ease both; }
.modal__close { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--gris); color: var(--ink-2); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.modal__close:hover { background: var(--line-strong); }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: var(--azul-900); color: #fff; font-family: var(--font-brand); font-weight: 600; font-size: 14px; padding: 14px 24px; border-radius: var(--r-pill); box-shadow: var(--shadow-lg); z-index: 200; display: flex; align-items: center; gap: 10px; animation: grow .3s ease; }
.toast i { color: var(--amarillo); }

@media (prefers-reduced-motion: reduce){ *{ animation: none !important; } .float{ animation: none !important; } }
.no-anim *, .no-anim .float, .no-anim .mark-plain, .no-anim .spon-track, .no-anim .news-bar__icon, .no-anim .news-bar__pulse, .no-anim .news-tab__pulse { animation: none !important; }
.no-anim .news-bar__pulse, .no-anim .news-tab__pulse { display: none; }

/* ---------- NAV responsive fixes ---------- */
/* position:fixed + left:50% makes shrink-to-fit width resolve to ~50vw, so below
   ~1320px the content can't fit and the logo's <a> (the only shrinkable child)
   collapsed. width:max-content sizes the pill to its content regardless of the
   left:50% anchor; the cap keeps it inside the viewport on small screens. */
.nav { width: max-content; max-width: calc(100vw - 20px); }
.nav > a { flex: 0 0 auto; }
.nav__logo { flex: 0 0 auto; width: auto; }
.nav .nav__cta { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 520px){
  .nav { gap: 4px; padding: 8px 10px 8px 12px; }
  .nav__logo { height: 26px; margin-right: 2px; }
  .nav__cta-text { display: none; }
  .nav .nav__cta { margin-left: auto; padding: 11px 13px; }
  .nav .nav__cta i { font-size: 16px; margin: 0; }
  /* long CTAs wrap rather than clip on small phones (.btn is nowrap by default) */
  .btn { white-space: normal; text-align: center; }
}

/* ---------- Newsletter inline (in content flow, not a fixed overlay) ---------- */
.news-bar.news-bar--inline {
  position: static; left: auto; bottom: auto; transform: none;
  width: 100%; max-width: 880px; margin: 0 auto; z-index: auto;
  animation: none;
}

/* Presentational form confirmation (data-fake-submit; no backend yet) */
.form-done {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-brand);
    font-weight: 700;
    font-size: 15px;
    color: var(--azul-700);
    padding: 6px 0;
}
.form-done i { color: #1f8a5b; font-size: 20px; }

/* ============================================================
   Umbraco Forms "fldc" theme — restyle the default theme markup
   (.umbraco-forms-*) to match the design, scoped to .fldc-uform.
   ============================================================ */
/* Drop the form caption (the section already has a heading) + Bootstrap grid remnants */
.fldc-uform .umbraco-forms-caption { display: none; }
.fldc-uform .row-fluid { display: block; margin: 0; }
.fldc-uform .umbraco-forms-container,
.fldc-uform [class*="col-md-"] { width: 100%; padding: 0; float: none; }
.fldc-uform .umbraco-forms-fieldset, .fldc-uform fieldset { border: 0; padding: 0; margin: 0; }

/* Field spacing + label */
.fldc-uform .umbraco-forms-field { margin-bottom: 16px; }
.fldc-uform .umbraco-forms-form .umbraco-forms-label,
.fldc-uform .umbraco-forms-form label.umbraco-forms-label,
.fldc-uform .umbraco-forms-form label {
    font-family: var(--font-brand); font-weight: 600; font-size: 13px;
    color: var(--ink-2); display: block; margin-bottom: 6px;
}
.fldc-uform .umbraco-forms-indicator { color: var(--rojo); margin-left: 2px; }
/* Default theme shows field placeholder/help as grey subtext under the label — the
   developed design didn't, so hide it for a clean label→input rhythm. */
.fldc-uform .umbraco-forms-tooltip,
.fldc-uform .help-block { display: none; }

/* Inputs / textarea / select. NOTE: the default Forms stylesheet (style.min.css)
   loads AFTER site.css and uses `.umbraco-forms-form input.text` (specificity
   0,2,1) which ties + beats a bare `.fldc-uform input.text`. So scope ours under
   `.umbraco-forms-form` (0,3,1) to win regardless of load order. */
.fldc-uform .umbraco-forms-form input.text, .fldc-uform .umbraco-forms-form input[type="text"],
.fldc-uform .umbraco-forms-form input[type="email"], .fldc-uform .umbraco-forms-form input[type="tel"],
.fldc-uform .umbraco-forms-form input[type="number"], .fldc-uform .umbraco-forms-form input[type="url"],
.fldc-uform .umbraco-forms-form input[type="date"], .fldc-uform .umbraco-forms-form input[type="password"],
.fldc-uform .umbraco-forms-form textarea, .fldc-uform .umbraco-forms-form select {
    width: 100%; box-sizing: border-box; font-family: var(--font-read); font-size: 15px;
    color: var(--ink); padding: 11px 14px; border: 1.5px solid var(--line-strong);
    border-radius: var(--r-sm); background: #fff; outline: none; transition: .15s;
}
.fldc-uform .umbraco-forms-form input.text:focus, .fldc-uform .umbraco-forms-form input:focus,
.fldc-uform .umbraco-forms-form textarea:focus, .fldc-uform .umbraco-forms-form select:focus {
    border-color: var(--azul); box-shadow: 0 0 0 3px var(--focus-ring);
}
.fldc-uform .umbraco-forms-form textarea { resize: vertical; min-height: 84px; }
.fldc-uform .checkboxlist, .fldc-uform .radiobuttonlist { display: flex; flex-direction: column; gap: 7px; font-family: var(--font-read); font-size: 15px; }
.fldc-uform .checkboxlist label, .fldc-uform .radiobuttonlist label { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 0; }

/* Submit (theme gives it .btn.btn-primary; default Forms stylesheet greys it — override) */
.fldc-uform .umbraco-forms-navigation { margin-top: 6px; }
.fldc-uform .umbraco-forms-navigation .btn,
.fldc-uform .umbraco-forms-navigation .btn-primary,
.fldc-uform .umbraco-forms-navigation input[type="submit"],
.fldc-uform .umbraco-forms-navigation button[type="submit"] {
    width: 100%; justify-content: center; display: inline-flex; align-items: center;
    font-family: var(--font-brand); font-weight: 700; font-size: 15px; cursor: pointer;
    border: none; border-radius: var(--r-pill); padding: 15px 26px;
    background: var(--azul); color: #fff;
}
.fldc-uform .umbraco-forms-navigation .btn:hover,
.fldc-uform .umbraco-forms-navigation .btn-primary:hover,
.fldc-uform .umbraco-forms-navigation input[type="submit"]:hover,
.fldc-uform .umbraco-forms-navigation button[type="submit"]:hover { background: var(--azul-700); }

/* Validation + submit message */
.fldc-uform .field-validation-error { font-family: var(--font-ui); font-size: 13px; color: var(--rojo); display: block; margin-top: 5px; }
.fldc-uform input.input-validation-error, .fldc-uform textarea.input-validation-error,
.fldc-uform select.input-validation-error, .fldc-uform .umbraco-forms-field.error input,
.fldc-uform .umbraco-forms-field.error textarea, .fldc-uform .umbraco-forms-field.error select {
    border-color: var(--rojo); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rojo) 18%, transparent);
}
.fldc-uform .validation-summary-errors { color: var(--rojo); font-family: var(--font-ui); font-size: 13px; margin-bottom: 12px; }
.fldc-uform .umbraco-forms-submitmessage {
    display: flex; align-items: center; gap: 9px; font-family: var(--font-brand); font-weight: 700;
    color: var(--azul-700); background: var(--azul-100); border-radius: var(--r-md); padding: 16px 18px;
}

/* ---- Boletín (newsletter) Umbraco forms ----
   Hide the redundant email label (card/bar has its own heading). !important
   beats the default Forms stylesheet + the general .fldc-uform label rule above. */
.stay-form.fldc-uform .umbraco-forms-label,
.news-bar--inline .news-bar__form.fldc-uform .umbraco-forms-label { display: none !important; }
.stay-form.fldc-uform .umbraco-forms-field, .stay-form.fldc-uform .umbraco-forms-fieldset,
.news-bar--inline .news-bar__form.fldc-uform .umbraco-forms-field,
.news-bar--inline .news-bar__form.fldc-uform .umbraco-forms-fieldset { margin: 0 !important; }
.stay-form.fldc-uform input.text,
.news-bar--inline .news-bar__form.fldc-uform input.text { border-radius: var(--r-pill) !important; }

/* Stay-tuned card boletín: input (≈70%) + Suscribirse (≈30%) on one row.
   Forms DOM: form > .umbraco-forms-page > [fieldset(input), .umbraco-forms-hidden
   (honeypot), .umbraco-forms-navigation(button)] — so flex the PAGE. */
.stay-form.fldc-uform .umbraco-forms-page {
    display: flex !important; gap: 10px; align-items: stretch; width: 100%;
}
.stay-form.fldc-uform .umbraco-forms-fieldset { flex: 7 1 0%; min-width: 0; margin: 0 !important; }
.stay-form.fldc-uform .umbraco-forms-hidden { display: none !important; }
.stay-form.fldc-uform .umbraco-forms-navigation { flex: 3 1 auto; min-width: max-content; margin: 0 !important; padding: 0 !important; }
.stay-form.fldc-uform .umbraco-forms-navigation .btn,
.stay-form.fldc-uform .umbraco-forms-navigation input[type="submit"],
.stay-form.fldc-uform .umbraco-forms-navigation input.btn {
    width: 100% !important; height: 100%; justify-content: center; white-space: nowrap; padding: 12px 14px;
}

/* Inline boletín bar (wide): email + submit on one row */
.news-bar--inline .news-bar__form.fldc-uform { flex: 1 1 380px; min-width: 260px; display: block; }
.news-bar--inline .news-bar__form.fldc-uform .umbraco-forms-page {
    display: flex !important; gap: 8px; align-items: stretch; flex-wrap: nowrap; width: 100%;
}
.news-bar--inline .news-bar__form.fldc-uform .umbraco-forms-fieldset { flex: 7 1 0% !important; min-width: 0; margin: 0 !important; }
.news-bar--inline .news-bar__form.fldc-uform .umbraco-forms-hidden { display: none !important; }
.news-bar--inline .news-bar__form.fldc-uform .umbraco-forms-navigation { flex: 3 1 auto !important; min-width: max-content; margin: 0 !important; padding: 0 !important; }
.news-bar.news-bar--inline .news-bar__copy span { white-space: normal; }
.news-bar--inline .news-bar__form.fldc-uform .umbraco-forms-navigation .btn,
.news-bar--inline .news-bar__form.fldc-uform .umbraco-forms-navigation input[type="submit"],
.news-bar--inline .news-bar__form.fldc-uform .umbraco-forms-navigation input.btn {
    width: 100% !important; height: 100%; justify-content: center; white-space: nowrap !important; padding: 12px 14px; }
