/* Corporación Financiera Río Negro — sitio estático */
:root {
  --ink: #12283a;        /* azul río profundo: cabecera, pie, titulares */
  --slate: #2f5d6e;      /* azul pizarra: enlaces, detalles */
  --brass: #a8834a;      /* latón: acento único */
  --text: #24323d;
  --muted: #5d6b75;
  --paper: #ffffff;
  --mist: #eef2f4;       /* fondos secundarios */
  --line: #d6dee3;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--slate); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

/* Cabecera */
.site-header { background: #fff; color: var(--ink); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(18,40,58,.04); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 1.5rem; }
.brand img { height: 46px; width: auto; }
.brand-text { font-family: var(--serif); font-size: 1.35rem; color: #fff; text-decoration: none; letter-spacing: .01em; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--ink); padding: .45rem .8rem; font: inherit; font-size: .95rem; border-radius: 3px; cursor: pointer; }
.main-nav ul { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; }
.main-nav a { display: block; color: var(--text); text-decoration: none; padding: .5rem .55rem; font-size: .95rem; white-space: nowrap; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--slate); }
.main-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--brass); }

@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 76px; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: 0 8px 20px rgba(18,40,58,.08); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: .5rem 1.5rem 1rem; }
  .main-nav a { padding: .7rem 0; border-bottom: 1px solid var(--mist); }
  .main-nav a[aria-current="page"] { border-bottom-color: var(--brass); }
}

/* Portada */
.hero { position: relative; min-height: 78vh; display: flex; align-items: flex-end; overflow: hidden; background: linear-gradient(160deg, #12283a 0%, #2f5d6e 100%); color: #fff; }
.hero-video { position: absolute; inset: 0; pointer-events: none; }
.hero-video iframe { position: absolute; top: 50%; left: 50%; width: 177.78vh; height: 56.25vw; min-width: 100%; min-height: 100%; transform: translate(-50%, -50%); border: 0; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(18,40,58,.88) 0%, rgba(18,40,58,.35) 60%, rgba(18,40,58,.2) 100%); }
.hero .wrap { width: 100%; position: relative; z-index: 1; padding-bottom: 4.5rem; padding-top: 6rem; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.12; max-width: 20ch; margin: 0 0 1.25rem; }
.hero p { max-width: 54ch; font-size: 1.15rem; color: #dce5ea; margin: 0 0 2rem; }
.btn { display: inline-block; background: var(--brass); color: #fff; text-decoration: none; padding: .8rem 1.4rem; border-radius: 2px; font-weight: 600; font-size: .98rem; }
.btn:hover { background: #8f6e3c; color: #fff; }
.btn-ghost { background: transparent; border: 1px solid rgba(255,255,255,.6); margin-left: .5rem; }
.btn-ghost:hover { background: rgba(255,255,255,.1); }

.intro { padding: 5rem 0 3rem; }
.intro .wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: 3rem; align-items: start; }
.intro h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.2; color: var(--ink); margin: 0; }
.intro p { margin: 0 0 1rem; max-width: 64ch; }
@media (max-width: 800px) { .intro .wrap { grid-template-columns: 1fr; gap: 1.5rem; } }

/* Lista de servicios (portada y página Servicios) */
.service-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.service-list li { border-bottom: 1px solid var(--line); }
.service-list a { display: grid; grid-template-columns: 120px 1fr; gap: 1.5rem; align-items: center; padding: 1.1rem 0; text-decoration: none; color: var(--ink); }
.service-list img { width: 120px; height: 72px; object-fit: cover; background: var(--mist); }
.service-list span { font-family: var(--serif); font-size: 1.3rem; }
.service-list a:hover span { color: var(--slate); text-decoration: underline; text-underline-offset: 4px; }
.services-home { padding: 1rem 0 5rem; }
.services-home h2 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; color: var(--ink); margin: 0 0 1.25rem; }

/* Cabecera de página interior */
.page-head { background: var(--ink) center / cover no-repeat; color: #fff; position: relative; }
.page-head::before { content: ""; position: absolute; inset: 0; background: rgba(18,40,58,.78); }
.page-head .wrap { position: relative; padding-top: 3.5rem; padding-bottom: 3rem; }
.page-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.15; margin: 0; max-width: 28ch; }
.crumbs { font-size: .9rem; margin: 0 0 .9rem; color: #b9c7cf; }
.crumbs a { color: #dce5ea; }
.crumbs span[aria-hidden] { margin: 0 .4rem; }

/* Cuerpo de página */
.page-body .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 4rem; padding-top: 3.5rem; padding-bottom: 5rem; }
.page-body.full .wrap { grid-template-columns: 1fr; }
.content { max-width: 70ch; }
.page-body.full .content { max-width: none; }
.content h2 { font-family: var(--serif); font-weight: 400; color: var(--ink); font-size: 1.65rem; line-height: 1.25; margin: 2.2rem 0 1rem; }
.content h2:first-child { margin-top: 0; }
.content h3 { font-family: var(--serif); font-weight: 400; color: var(--ink); font-size: 1.3rem; margin: 1.8rem 0 .75rem; }
.content p { margin: 0 0 1.1rem; }
.content ul { padding-left: 1.2rem; margin: 0 0 1.4rem; }
.content li { margin-bottom: .4rem; }
.content li::marker { color: var(--brass); }
.content blockquote { margin: 2rem 0; padding: .25rem 0 .25rem 1.5rem; border-left: 3px solid var(--brass); font-family: var(--serif); font-size: 1.25rem; line-height: 1.5; color: var(--ink); }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 2.2rem 0; }
.content .lead-img { margin: 0 0 2rem; }
.two-col { columns: 2; column-gap: 2.5rem; }
.two-col li { break-inside: avoid; }
@media (max-width: 600px) { .two-col { columns: 1; } }

details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: 1rem 0; font-family: var(--serif); font-size: 1.2rem; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--brass); font-family: var(--sans); font-size: 1.4rem; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { margin: 0 0 1.2rem; }

/* Navegación lateral */
.side-nav h2 { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; color: var(--ink); margin: 0 0 .75rem; }
.side-nav ul { list-style: none; margin: 0 0 2rem; padding: 0; border-left: 1px solid var(--line); }
.side-nav a { display: block; padding: .45rem 0 .45rem 1rem; text-decoration: none; color: var(--muted); font-size: .97rem; margin-left: -1px; border-left: 2px solid transparent; }
.side-nav a:hover { color: var(--ink); }
.side-nav a[aria-current="page"] { color: var(--ink); border-left-color: var(--brass); font-weight: 600; }
.side-nav .pending { display: block; padding: .45rem 0 .45rem 1rem; color: #9aa6ae; font-size: .97rem; }
.side-card { background: var(--mist); padding: 1.4rem; font-size: .95rem; }
.side-card h2 { margin-bottom: .5rem; }
.side-card p { margin: 0 0 .6rem; }

@media (max-width: 900px) {
  .page-body .wrap { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* Logos de clientes y trayectoria */
.logo-grid { list-style: none; padding: 0; margin: 2rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.logo-grid li { background: #fff; padding: 1.1rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .6rem; margin: 0; }
.logo-grid img { max-height: 70px; width: auto; object-fit: contain; }
.logo-grid span { font-size: .85rem; color: var(--muted); line-height: 1.3; }
.record-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.record-grid img { max-height: 90px; }
.record-grid span { color: var(--ink); font-size: .95rem; }

/* Noticias */
.news { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.news li { padding: 1.2rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.news h3 { margin: 0 0 .3rem; font-size: 1.2rem; }
.news time { font-size: .9rem; color: var(--muted); }

/* Formulario */
.form { display: grid; gap: 1.1rem; max-width: 560px; margin-top: 1rem; }
.form label { display: block; font-size: .95rem; font-weight: 600; color: var(--ink); margin-bottom: .3rem; }
.form input, .form textarea { width: 100%; font: inherit; padding: .7rem .8rem; border: 1px solid #b8c4cb; border-radius: 2px; background: #fff; color: var(--text); }
.form input:focus, .form textarea:focus { outline: 2px solid var(--slate); outline-offset: 0; border-color: var(--slate); }
.form textarea { min-height: 160px; resize: vertical; }
.form .btn { border: 0; cursor: pointer; justify-self: start; font: inherit; font-weight: 600; }
.form .hp { position: absolute; left: -9999px; }
.form small { color: var(--muted); }

.map { border: 0; width: 100%; height: 320px; background: var(--mist); margin: .5rem 0 2rem; }

/* Pie */
.site-footer { background: var(--ink); color: #c4d1d8; font-size: .95rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 3rem; padding-top: 3.5rem; padding-bottom: 2.5rem; }
.site-footer h2 { font-family: var(--serif); font-weight: 400; color: #fff; font-size: 1.2rem; margin: 0 0 1rem; }
.site-footer p { margin: 0 0 .8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: #e4ecf0; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer dt { color: #fff; font-weight: 600; font-size: .9rem; margin-top: .7rem; }
.site-footer dd { margin: 0; }
.legal { border-top: 1px solid rgba(255,255,255,.12); }
.legal .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding-top: 1.2rem; padding-bottom: 1.2rem; font-size: .88rem; color: #9fb1bb; grid-template-columns: none; }
@media (max-width: 800px) { .site-footer .wrap { grid-template-columns: 1fr; gap: 2rem; } }

@media (prefers-reduced-motion: reduce) { .hero-video { display: none; } }
@media print { .site-header, .site-footer, .side-nav, .hero-video { display: none; } }
.side-nav .side-card a { display: inline; padding: 0; margin: 0; border: 0; color: var(--slate); text-decoration: underline; }
.news p { margin: .4rem 0 0; max-width: 70ch; }
.news h3 a { color: var(--ink); text-decoration: none; }
.news h3 a:hover { text-decoration: underline; }
.page-body.full .content > p, .page-body.full .content > .video { max-width: 70ch; }
.meta { color: var(--muted); font-size: .95rem; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 1.5rem; background: var(--mist); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.source a { font-weight: 600; }
.pager { display: flex; justify-content: space-between; gap: 2rem; border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: 1.2rem; font-size: .95rem; }
.pager a { max-width: 45%; }
.pager a:last-child { text-align: right; }
@media (max-width: 600px) { .pager { flex-direction: column; gap: 1rem; } .pager a { max-width: none; } .pager a:last-child { text-align: left; } }
/* Selector de idioma */
@media (min-width: 1101px) { .main-nav { display: flex; align-items: center; gap: 1rem; } }
.lang-switch { list-style: none; display: flex; gap: .15rem; margin: 0; padding: 0 0 0 .9rem; border-left: 1px solid var(--line); }
.lang-switch a { display: block; white-space: nowrap; color: var(--muted); text-decoration: none; font-size: .82rem; font-weight: 600; padding: .35rem .45rem; border-radius: 2px; }
.lang-switch a:hover { color: var(--ink); background: var(--mist); }
.lang-switch a[aria-current="true"] { color: #fff; background: var(--ink); }
@media (max-width: 1100px) {
  .main-nav.open { display: block; }
  .main-nav .lang-switch { flex-direction: row; border-left: 0; padding: .5rem 1.5rem 1.2rem; gap: .4rem; }
  .lang-switch a { border: 1px solid var(--line); padding: .4rem .7rem; }
}
.service-list .item { display: grid; grid-template-columns: 120px 1fr; gap: 1.5rem; align-items: center; padding: 1.1rem 0; color: var(--ink); }
:lang(zh-Hans) body, html[lang="zh-Hans"] body { font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", var(--sans); }
html[lang="zh-Hans"] h1, html[lang="zh-Hans"] h2, html[lang="zh-Hans"] h3 { font-family: "Songti SC", "SimSun", "Noto Serif SC", var(--serif); }
