/* Croatas — sitio público
   Identidad: rojo y blanco del šahovnica, azul del Adriático, papel cálido.
   Tipografías: Fraunces (titulares) + Inter (texto). */

:root {
  --red: #c8102e;
  --red-deep: #9b0c24;
  --blue: #0b2a5b;
  --sea: #1d6fa5;
  --paper: #faf7f2;
  --surface: #ffffff;
  --ink: #15171c;
  --ink-soft: #3a3f4b;
  --muted: #6b7180;
  --line: #e7e2d9;
  --chip: #f1ece3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 20, 30, .06), 0 8px 24px rgba(16, 20, 30, .06);
  --max: 1200px;
  --prose: 70ch;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --red: #ff4d63;
    --red-deep: #e23a51;
    --blue: #9cc3ff;
    --sea: #6fb3e6;
    --paper: #0f1218;
    --surface: #171b23;
    --ink: #eef0f4;
    --ink-soft: #c9cdd6;
    --muted: #9399a6;
    --line: #262c37;
    --chip: #1f2530;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: .18em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
.wrap { width: min(var(--max), 100% - 2rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 99; }
.skip:focus { left: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Franja ajedrezada (šahovnica) */
.checker {
  height: 8px;
  background:
    conic-gradient(var(--red) 25%, #fff 0 50%, var(--red) 0 75%, #fff 0) 0 0 / 16px 16px;
}
@media (prefers-color-scheme: dark) { .checker { opacity: .9; } }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.header-row > * { flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--ink); }
.brand picture, .brand-logo { display: block; height: 30px; width: auto; }
.brand-sub { font: 600 .62rem/1.35 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding-left: .9rem; border-left: 1px solid var(--line); }
@media (max-width: 1100px) { .brand-sub { display: none; } }
.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; }
.nav a {
  display: block; padding: .5rem .7rem; border-radius: 999px;
  font-size: .94rem; font-weight: 500; text-decoration: none; color: var(--ink-soft);
}
.nav a:hover { background: var(--chip); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--red); background: color-mix(in srgb, var(--red) 9%, transparent); }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
}
.icon-btn:hover { border-color: var(--ink-soft); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.menu-toggle { display: none; }
.search-pop { border-top: 1px solid var(--line); padding: 1rem 0; }
.search-pop[hidden] { display: none; }
.search-form { display: flex; gap: .5rem; }
.search-form input {
  flex: 1; font: inherit; padding: .7rem 1rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}

@media (max-width: 960px) {
  .menu-toggle { display: inline-grid; }
  [data-search-toggle] { margin-left: auto; }
  .nav { position: fixed; inset: 69px 0 auto 0; background: var(--paper); border-bottom: 1px solid var(--line); display: none; padding: .75rem 1rem 1.25rem; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; }
  .nav a { font-size: 1.1rem; padding: .75rem 1rem; }
}

/* ---- Botones y chips ---- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.25rem; border-radius: 999px;
  font: 600 .95rem/1 var(--sans); text-decoration: none; border: 1px solid transparent; cursor: pointer;
  background: var(--red); color: #fff;
}
.btn:hover { background: var(--red-deep); color: #fff; }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn.ghost:hover { background: color-mix(in srgb, currentColor 10%, transparent); color: inherit; }
.chip {
  display: inline-block; padding: .2rem .65rem; border-radius: 999px; background: var(--chip);
  font: 600 .72rem/1.6 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--red); text-decoration: none;
}
.chip:hover { background: var(--red); color: #fff; }
.meta { color: var(--muted); font-size: .88rem; }
.meta > * + *::before { content: "·"; margin: 0 .45rem; }

/* ---- Portada ---- */
.hero { padding: 2.25rem 0 1rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 2rem; }
.lead { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--blue); color: #fff; min-height: 440px; display: flex; align-items: flex-end; text-decoration: none; isolation: isolate; }
.lead img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s ease; }
.lead::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6, 12, 28, .05) 0%, rgba(6, 12, 28, .55) 45%, rgba(6, 12, 28, .93) 100%); }
.lead:hover { color: #fff; }
.lead:hover img { transform: scale(1.03); }
.lead-body { padding: 2rem; }
.lead h1, .lead h2 { font-size: clamp(1.5rem, 2.5vw, 2.15rem); margin: .6rem 0 .5rem; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); text-wrap: balance; }
.lead p { margin: 0; max-width: 60ch; color: rgba(255, 255, 255, .85); }
.lead .chip { background: var(--red); color: #fff; }
.lead .meta { color: rgba(255, 255, 255, .75); }
.stack { display: grid; gap: 1.25rem; align-content: start; }
.mini { display: grid; grid-template-columns: 120px 1fr; gap: 1rem; text-decoration: none; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.mini:last-child { border-bottom: 0; }
.mini img { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; }
.mini > div { min-width: 0; }
.mini .chip { margin-bottom: .1rem; }
.mini h3 { font-size: 1.08rem; margin: .3rem 0 .25rem; }
.mini:hover h3 { color: var(--red); }

.intro { padding: 3.5rem 0; }
.intro-card {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); padding: clamp(1.5rem, 4vw, 3rem);
}
.eyebrow { font: 600 .78rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--red); margin: 0 0 1rem; }
.intro h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.intro p { color: var(--ink-soft); }
.intro .hr-sub, .community-body > .hr-sub { font: italic 400 1.15rem/1.4 var(--serif); color: var(--muted); margin: -.3rem 0 1rem; }
.intro .hr-text, .community-body > .hr-text { font-style: italic; color: var(--muted); font-size: .94rem; }
.intro p:has(+ .hr-text), .community-body > p:has(+ .hr-text) { margin-bottom: .5rem; }
.pillars { display: grid; gap: 1rem; list-style: none; padding: 0; margin: 0; }
.pillars li { display: grid; grid-template-columns: 44px 1fr; gap: .9rem; align-items: start; }
.pillars .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--red) 10%, transparent); color: var(--red); }
.pillars .ico svg { width: 22px; height: 22px; }
.pillars strong { display: block; font-size: 1rem; }
.pillars strong em { font-weight: 500; color: var(--muted); }
.pillars span { color: var(--muted); font-size: .94rem; }

.section { padding: 2.5rem 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; border-bottom: 2px solid var(--ink); padding-bottom: .75rem; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0; }
.section-head a { font-weight: 600; font-size: .92rem; text-decoration: none; color: var(--red); white-space: nowrap; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem 1.75rem; }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.card { display: flex; flex-direction: column; text-decoration: none; }
.card .chip { align-self: flex-start; }
.card .thumb { aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--chip); margin-bottom: .9rem; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .thumb img { transform: scale(1.04); }
.card h3, .mini h3, .article-head h1, .page-head h1 { text-wrap: balance; }
.card h3 { font-size: 1.22rem; margin: .45rem 0 .4rem; }
.card:hover h3 { color: var(--red); }
.card p { margin: 0 0 .6rem; color: var(--ink-soft); font-size: .97rem; }
.placeholder { width: 100%; height: 100%; background: conic-gradient(var(--chip) 25%, var(--line) 0 50%, var(--chip) 0 75%, var(--line) 0) 0 0 / 28px 28px; }

.assoc { margin: 3rem 0 1rem; background: var(--blue); color: #fff; border-radius: calc(var(--radius) + 6px); overflow: hidden; position: relative; }
@media (prefers-color-scheme: dark) { .assoc { background: #10264d; } }
.assoc::before { content: ""; position: absolute; right: -40px; top: -40px; width: 260px; height: 260px; opacity: .14;
  background: conic-gradient(#fff 25%, transparent 0 50%, #fff 0 75%, transparent 0) 0 0 / 52px 52px; transform: rotate(12deg); }
.assoc-body { position: relative; padding: clamp(1.75rem, 5vw, 3.5rem); max-width: 760px; }
.assoc .eyebrow { color: #ffb3bd; }
.assoc h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.assoc p { color: rgba(255, 255, 255, .85); }
.assoc .actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.assoc .btn.ghost { color: #fff; }

/* ---- Comunidad · Croatas en Argentina ---- */
.community-hero {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  margin: 2.5rem 0 2rem; padding: clamp(1.5rem, 4vw, 3rem);
  background: linear-gradient(135deg, color-mix(in srgb, #74acdf 22%, var(--surface)), var(--surface) 55%);
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); position: relative; overflow: hidden;
}
.community-hero::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 8px;
  background: conic-gradient(var(--red) 25%, #fff 0 50%, var(--red) 0 75%, #fff 0) 0 0 / 8px 8px; }
.community-crest { width: clamp(120px, 16vw, 200px); height: auto; filter: drop-shadow(0 10px 24px rgba(16, 20, 30, .18)); }
.community-body h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin-bottom: .4rem; }
.community-body > p:not(.eyebrow) { color: var(--ink-soft); max-width: 60ch; margin: 0 0 1.25rem; }
.community-body .search-form { max-width: 620px; }
.community-links { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: 1rem; font-size: .93rem; font-weight: 600; }
.community-links a { color: var(--red); text-decoration: none; }
.community-links a:hover { text-decoration: underline; }
.result-count { color: var(--muted); margin: 0 0 1.25rem; }
.page-crest { width: 130px; height: auto; margin: 0 auto 1.25rem; filter: drop-shadow(0 8px 20px rgba(16, 20, 30, .15)); }
.assoc { display: grid; grid-template-columns: 1fr auto; align-items: center; }
.assoc-crest { order: 2; width: clamp(110px, 14vw, 180px); height: auto; margin-right: clamp(1.5rem, 5vw, 4rem); position: relative; z-index: 1;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .35)); }
@media (max-width: 700px) {
  .community-hero { grid-template-columns: 1fr; text-align: center; }
  .community-crest { margin: 0 auto; }
  .community-body .search-form { margin-inline: auto; }
  .community-links { justify-content: center; }
  .assoc { grid-template-columns: 1fr; }
  .assoc-crest { order: 0; margin: 2rem auto 0; }
}

/* ---- Listados ---- */
.page-head { padding: 3rem 0 2rem; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: .3rem; }
.page-head p { color: var(--muted); margin: 0; max-width: 60ch; }
.cat-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1.5rem; }
.cat-tabs a { padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: .9rem; font-weight: 500; background: var(--surface); }
.cat-tabs a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pager { display: flex; justify-content: center; gap: .4rem; margin: 3rem 0 1rem; flex-wrap: wrap; }
.pager a, .pager span { min-width: 42px; height: 42px; display: grid; place-items: center; padding: 0 .8rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-weight: 500; background: var(--surface); }
.pager [aria-current] { background: var(--red); color: #fff; border-color: var(--red); }
.empty { padding: 3rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---- Nota ---- */
.article-head { max-width: 860px; margin: 0 auto; padding: 3rem 0 1.5rem; text-align: center; }
.article-head .chips { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; }
.article-head h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); margin: 1rem 0; }
.article-head .lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 62ch; margin: 0 auto 1rem; }
.article-figure { max-width: 1040px; margin: 0 auto 2.5rem; }
.article-figure img { width: 100%; max-height: 640px; object-fit: cover; border-radius: var(--radius); }
.article-figure figcaption { color: var(--muted); font-size: .85rem; margin-top: .5rem; text-align: center; }

.prose { max-width: var(--prose); margin: 0 auto; font-size: 1.12rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose p + p { margin-top: 1.1em; }
.prose h2 { font-size: 1.75rem; margin-top: 2em; }
.prose h3 { font-size: 1.4rem; margin-top: 1.8em; }
.prose h4 { font-size: 1.15rem; margin-top: 1.5em; }
.prose a { color: var(--red); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose blockquote { margin: 1.8em 0; padding: .3em 0 .3em 1.3em; border-left: 4px solid var(--red); font-family: var(--serif); font-size: 1.3rem; color: var(--ink-soft); }
.prose hr, .prose .wp-block-separator { border: 0; height: 8px; width: 96px; margin: 2.5em auto;
  background: conic-gradient(var(--red) 25%, transparent 0 50%, var(--red) 0 75%, transparent 0) 0 0 / 16px 16px; opacity: .8; }
.prose img { border-radius: 10px; margin-inline: auto; }
.prose figure { margin: 2em 0; }
.prose figcaption, .prose .wp-element-caption { color: var(--muted); font-size: .88rem; text-align: center; margin-top: .5rem; }
.prose .wp-block-image.aligncenter img, .prose .aligncenter { margin-inline: auto; }
.prose .wp-block-gallery, .prose .blocks-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; padding: 0; list-style: none; }
.prose .wp-block-gallery figure { margin: 0; }
.prose .wp-block-gallery img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.prose .wp-block-embed__wrapper, .prose .video { position: relative; aspect-ratio: 16 / 9; }
.prose iframe { width: 100%; height: 100%; min-height: 320px; border: 0; border-radius: 10px; }
.prose .wp-block-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: .5rem; text-align: left; }

.share { max-width: var(--prose); margin: 3rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.share strong { margin-right: .4rem; font-size: .95rem; }
.share a, .share button { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: 500 .88rem/1 var(--sans); color: var(--ink); text-decoration: none; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--red); color: var(--red); }

.prevnext { max-width: 1040px; margin: 3rem auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.prevnext a { display: block; padding: 1.25rem 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--surface); }
.prevnext a:hover { border-color: var(--red); }
.prevnext small { display: block; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; margin-bottom: .35rem; }
.prevnext span { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; line-height: 1.3; }
.prevnext .next { text-align: right; grid-column: 2; }

/* ---- Footer ---- */
.site-footer { margin-top: 5rem; background: #0b1220; color: #c8cdd8; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #ff8a99; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; padding: 3.5rem 0 2.5rem; }
.footer-grid h4 { font: 600 .78rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #8a93a6; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; font-size: .95rem; }
.footer-grid p { font-size: .95rem; margin: .75rem 0 0; }
.footer-brand img { height: 28px; width: auto; }
.footer-bottom { border-top: 1px solid #1e2738; padding: 1.25rem 0 2rem; font-size: .85rem; color: #8a93a6; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .grid.four { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero-grid, .intro-card { grid-template-columns: minmax(0, 1fr); }
  .lead { min-height: 380px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .header-row { gap: .5rem; }
  .brand-sub { display: none; }
  .brand picture, .brand-logo { height: 26px; }
  .icon-btn { width: 38px; height: 38px; }
  .grid, .grid.four { grid-template-columns: 1fr; }
  .lead-body { padding: 1.4rem; }
  .mini { grid-template-columns: 96px 1fr; }
  .mini img { width: 96px; height: 76px; }
  .prevnext { grid-template-columns: 1fr; }
  .prevnext .next { grid-column: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .prose { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
