:root {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --surface-soft: #f1eee8;
  --ink: #162033;
  --muted: #667085;
  --primary: #17324d;
  --primary-2: #214b72;
  --accent: #c7954b;
  --accent-soft: #f1dfc1;
  --border: rgba(22, 32, 51, 0.12);
  --shadow: 0 24px 70px rgba(23, 50, 77, 0.13);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
body.zh { font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; }
.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.skip-link {
  position: fixed; top: 12px; left: 12px; transform: translateY(-160%);
  background: var(--primary); color: white; padding: 10px 14px; border-radius: 999px; z-index: 100;
}
.skip-link:focus { transform: translateY(0); }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 244, 238, 0.86);
  backdrop-filter: blur(18px); border-bottom: 1px solid var(--border);
}
.navbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 13px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: white;
  font-weight: 800; font-size: 1.35rem; box-shadow: 0 16px 30px rgba(23, 50, 77, 0.22);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1rem; letter-spacing: -0.02em; }
.brand small { color: var(--muted); font-size: 0.78rem; margin-top: -2px; }
.nav-links { display: flex; align-items: center; gap: 20px; font-weight: 700; font-size: 0.93rem; }
.nav-links a { color: rgba(22, 32, 51, 0.72); padding: 10px 0; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 3px; border-radius: 999px; background: var(--accent);
}
.language-toggle, .menu-toggle { border: 0; font: inherit; cursor: pointer; }
.language-toggle { background: var(--ink); color: white; padding: 10px 14px; border-radius: 999px; font-weight: 800; }
.menu-toggle {
  display: none; width: 44px; height: 44px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--border); align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.menu-toggle span { width: 18px; height: 2px; background: var(--ink); border-radius: 99px; }
.section { padding: 90px 0; }
.hero {
  min-height: 620px; display: grid; align-items: center;
  background:
    radial-gradient(circle at 12% 20%, rgba(199, 149, 75, 0.30), transparent 26%),
    radial-gradient(circle at 86% 12%, rgba(33, 75, 114, 0.24), transparent 28%);
}
.compact-hero { min-height: 560px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(310px, 0.88fr); gap: 44px; align-items: center; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 0.13em; font-weight: 800; font-size: 0.78rem; margin: 0 0 14px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.35rem, 5.7vw, 5.05rem); line-height: 0.96; letter-spacing: -0.07em; margin-bottom: 24px; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.04; letter-spacing: -0.055em; margin-bottom: 18px; }
h3 { font-size: 1.16rem; line-height: 1.2; letter-spacing: -0.025em; }
.hero-text { max-width: 690px; color: rgba(22, 32, 51, 0.73); font-size: clamp(1.05rem, 1.6vw, 1.22rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 34px 0 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 13px 19px; border-radius: 999px; border: 1px solid transparent; font-weight: 800; cursor: pointer; }
.button.primary { background: var(--primary); color: white; box-shadow: 0 18px 38px rgba(23, 50, 77, 0.22); }
.button.secondary { background: rgba(255,255,255,0.68); border-color: var(--border); color: var(--primary); }
.button.full { width: 100%; }
.hero-card {
  background: rgba(255,255,255,0.78); border: 1px solid rgba(255,255,255,0.55); border-radius: var(--radius-lg);
  padding: 34px; box-shadow: var(--shadow); backdrop-filter: blur(16px);
}
.hero-card h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -0.045em; }
.hero-card ul { padding: 0; margin: 24px 0; list-style: none; display: grid; gap: 14px; }
.hero-card li { position: relative; padding-left: 28px; color: rgba(22, 32, 51, 0.76); }
.hero-card li::before { content: ""; width: 10px; height: 10px; border-radius: 999px; background: var(--accent); position: absolute; left: 0; top: 0.55em; }
.card-link, .text-link { color: var(--primary); font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.trust-points, .stats-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 30px; }
.trust-points div, .stats-panel div { background: rgba(255,255,255,0.7); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; }
.trust-points strong, .trust-points span, .stats-panel strong, .stats-panel span { display: block; }
.trust-points strong, .stats-panel strong { font-size: 1.3rem; color: var(--primary); }
.trust-points span, .stats-panel span { color: var(--muted); font-size: 0.9rem; }
.intro-section, .surface-section { background: var(--surface); }
.intro-grid, .two-column { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 48px; align-items: start; }
.intro-grid > p, .two-column p { color: rgba(22, 32, 51, 0.72); font-size: 1.05rem; }
.section-heading { max-width: 760px; margin-bottom: 36px; }
.section-heading.narrow { margin-inline: auto; text-align: center; }
.section-heading p { color: var(--muted); }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service-grid.wide { gap: 22px; }
.service-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; min-height: 240px;
  box-shadow: 0 14px 40px rgba(23, 50, 77, 0.06); transition: transform .18s ease, box-shadow .18s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 22px 52px rgba(23, 50, 77, 0.1); }
.service-card.highlighted, .service-card.cta-card { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: white; }
.service-card.highlighted p, .service-card.cta-card p { color: rgba(255,255,255,0.78); }
.service-card.cta-card .text-link { color: white; }
.icon, .step-number { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--accent-soft); color: #845e21; font-weight: 900; margin-bottom: 20px; }
.service-card.highlighted .icon, .service-card.cta-card .icon { background: rgba(255,255,255,0.14); color: white; }
.service-card p, .feature-item p, .about-card p { color: rgba(22, 32, 51, 0.68); }
.featured { background: linear-gradient(135deg, #132b43, #1e4468); color: white; }
.featured .eyebrow { color: #f2c678; }
.featured p { color: rgba(255,255,255,0.75); }
.featured-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 42px; align-items: start; }
.feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feature-item { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-md); padding: 24px; }
.feature-item p { margin-bottom: 0; }
.check-list, .notice-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px; box-shadow: 0 18px 60px rgba(23, 50, 77, 0.08); }
.check-list p { margin: 0; padding: 14px 0 14px 34px; border-bottom: 1px solid var(--border); position: relative; color: var(--ink); }
.check-list p:last-child { border-bottom: 0; }
.check-list p::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 900; }
.notice-box { background: linear-gradient(135deg, rgba(199,149,75,0.18), rgba(255,255,255,0.88)); }
.about-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 30px; align-items: stretch; }
.about-card, .values-grid > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; box-shadow: 0 18px 60px rgba(23, 50, 77, 0.07); }
.values-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.values-grid strong, .values-grid span { display: block; }
.values-grid strong { color: var(--primary); margin-bottom: 8px; font-size: 1.1rem; }
.values-grid span { color: var(--muted); }
.stats-panel { margin-top: 0; }
.stats-panel div { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.14); }
.stats-panel strong { color: white; font-size: 1.8rem; }
.stats-panel span { color: rgba(255,255,255,0.72); }
.contact-section { background: var(--surface); }
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 44px; align-items: start; }
.contact-cards { display: grid; gap: 14px; margin-top: 28px; }
.contact-card { display: block; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; }
.contact-card span, .contact-card strong { display: block; }
.contact-card span { color: var(--muted); font-size: 0.9rem; }
.contact-card strong { color: var(--primary); margin-top: 2px; overflow-wrap: anywhere; }
.contact-form { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.contact-form label { display: grid; gap: 8px; font-weight: 800; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px 14px; background: white; color: var(--ink); }
.contact-form textarea { resize: vertical; }
.form-note { color: var(--muted); font-size: 0.9rem; margin: 0; }
.map-section iframe { width: 100%; height: 380px; border: 0; display: block; filter: grayscale(0.16); }
.site-footer { background: #101d2e; color: white; padding: 58px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 1.35fr 0.7fr 0.95fr; gap: 36px; }
.footer-brand .brand-mark { box-shadow: none; }
.footer-grid p, .footer-bottom { color: rgba(255,255,255,0.68); }
.footer-grid h3 { margin-bottom: 14px; }
.footer-grid a { display: block; color: rgba(255,255,255,0.8); margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 34px; padding-top: 20px; display: flex; justify-content: space-between; gap: 18px; font-size: 0.9rem; }

@media (max-width: 1180px) {
  .menu-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: 78px 20px auto 20px; display: none; flex-direction: column; align-items: stretch; gap: 6px;
    background: var(--surface); padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 10px; }
  .nav-links a.active::after { left: 10px; right: auto; width: 32px; bottom: 6px; }
  .language-toggle { width: 100%; }
  .hero-grid, .intro-grid, .featured-grid, .about-grid, .contact-grid, .two-column { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-points, .stats-panel { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 28px, var(--container)); }
  .navbar { min-height: 72px; }
  .section { padding: 68px 0; }
  .compact-hero { min-height: auto; }
  h1 { letter-spacing: -0.055em; }
  .hero-card, .contact-form, .about-card, .values-grid > div { padding: 22px; border-radius: 22px; }
  .hero-actions { flex-direction: column; }
  .button { width: 100%; }
  .service-grid, .feature-list, .values-grid, .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}


/* Logos y códigos QR */
.brand-logo {
  display: block;
  width: 86px;
  height: auto;
  max-height: 42px;
  object-fit: contain;
  border-radius: 8px;
  background: white;
}
.brand-text { min-width: 0; }
.site-header .brand-text { max-width: 520px; }
.footer-grid .footer-brand { display: inline-flex; align-items: center; gap: 13px; margin-bottom: 14px; }
.footer-logo { background: transparent; }
.hero-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}
.hero-card-logo {
  width: min(160px, 70%);
  max-height: 180px;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(23, 50, 77, 0.10);
}
.footer-seal {
  margin-top: 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 14px;
  width: fit-content;
}
.footer-seal img {
  display: block;
  width: 82px;
  height: auto;
  border-radius: 12px;
}
.qr-section {
  background:
    radial-gradient(circle at 10% 10%, rgba(199, 149, 75, 0.18), transparent 28%),
    radial-gradient(circle at 90% 0%, rgba(33, 75, 114, 0.16), transparent 30%),
    var(--bg);
}
.qr-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}
.qr-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 18px 55px rgba(23, 50, 77, 0.08);
  display: grid;
  gap: 14px;
  align-content: start;
  text-align: center;
}
.qr-image {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  justify-self: center;
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 10px;
}
.qr-card h3 { margin-bottom: 8px; color: var(--primary); }
.qr-card p { color: var(--muted); margin-bottom: 0; font-size: 0.94rem; }

@media (max-width: 1100px) {
  .qr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .brand-logo { width: 78px; max-height: 38px; }
  .brand-text small { display: none; }
  .qr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 500px) {
  .qr-grid { grid-template-columns: 1fr; }
  .qr-card { text-align: left; grid-template-columns: 120px 1fr; align-items: center; }
  .qr-image { max-width: 120px; padding: 6px; border-radius: 14px; }
}


/* Ajustes solicitados: logo profesional en encabezado y logo Nara integrado en el pie */
.navbar { min-height: 106px; }
.site-header .brand { gap: 18px; }
.site-header .header-logo {
  width: auto;
  height: 72px;
  max-height: none;
  object-fit: contain;
  border-radius: 10px;
  background: transparent;
}
.site-header .brand strong {
  font-size: clamp(1.45rem, 2.1vw, 2.05rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.site-header .brand small {
  font-size: clamp(0.98rem, 1.15vw, 1.18rem);
  line-height: 1.2;
  margin-top: 2px;
}
.site-header .nav-links {
  font-size: 1.08rem;
  gap: 24px;
}
.site-header .language-toggle {
  font-size: 1rem;
  padding: 12px 17px;
}
.site-footer .footer-brand {
  align-items: center;
  gap: 18px;
}
.site-footer .footer-logo {
  width: 148px;
  max-height: 74px;
  border-radius: 12px;
  background: transparent;
}
.site-footer .footer-brand strong {
  font-size: 1.35rem;
  line-height: 1.1;
}
.site-footer .footer-brand small {
  font-size: 0.95rem;
}

@media (max-width: 960px) {
  .navbar { min-height: 94px; }
  .site-header .header-logo { height: 62px; }
  .site-header .nav-links { font-size: 1rem; }
}
@media (max-width: 760px) {
  .navbar { min-height: 86px; }
  .site-header .header-logo { height: 56px; width: auto; max-height: none; }
  .site-header .brand strong { font-size: 1.18rem; line-height: 1.08; }
  .site-footer .footer-logo { width: 130px; max-height: 66px; }
}


/* Páginas añadidas: aviso legal y colegios profesionales */
.professional-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.professional-card,
.legal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: 0 18px 60px rgba(23, 50, 77, 0.07);
}
.professional-card {
  display: grid;
  gap: 12px;
  align-content: start;
}
.professional-card h3 { margin-bottom: 0; }
.professional-card p { color: var(--muted); }
.professional-name {
  color: var(--primary) !important;
  font-weight: 900;
  font-size: 1.08rem;
}
.highlighted-professional {
  background: linear-gradient(135deg, rgba(199,149,75,0.18), rgba(255,255,255,0.92));
}
.legal-layout {
  display: grid;
  gap: 20px;
  max-width: 980px;
}
.legal-card h2 { margin-bottom: 16px; }
.legal-card p { color: var(--muted); }
.legal-data-list { display: grid; gap: 12px; margin: 0; }
.legal-data-list div {
  display: grid;
  grid-template-columns: minmax(160px, 0.32fr) 1fr;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.legal-data-list div:last-child { border-bottom: 0; }
.legal-data-list dt {
  font-weight: 900;
  color: var(--primary);
}
.legal-data-list dd { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.legal-note p:last-child { margin-bottom: 0; }
.footer-legal-links a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
}
.footer-legal-links a:hover { color: white; }

@media (max-width: 1180px) {
  .menu-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: 96px 20px auto 20px; display: none; flex-direction: column; align-items: stretch; gap: 6px;
    background: var(--surface); padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 10px; }
  .nav-links a.active::after { left: 10px; right: auto; width: 32px; bottom: 6px; }
  .language-toggle { width: 100%; }
}
@media (max-width: 980px) {
  .professional-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .legal-data-list div { grid-template-columns: 1fr; gap: 4px; }
}

/* Ajuste: mantener el nombre del despacho en una sola línea en el encabezado */
.site-header .brand {
  flex: 0 0 auto;
}
.site-header .brand-text {
  max-width: none;
  flex: 0 0 auto;
}
.site-header .brand strong {
  white-space: nowrap;
  font-size: clamp(1.38rem, 1.85vw, 1.82rem);
}
.site-header .brand small {
  white-space: nowrap;
}
@media (max-width: 1300px) {
  .menu-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: 96px 20px auto 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    background: var(--surface);
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 10px; }
  .nav-links a.active::after { left: 10px; right: auto; width: 32px; bottom: 6px; }
  .language-toggle { width: 100%; }
}
@media (max-width: 760px) {
  .navbar { gap: 12px; }
  .site-header .brand { gap: 12px; }
  .site-header .header-logo { height: 48px; }
  .site-header .brand strong { font-size: clamp(0.92rem, 4.1vw, 1.12rem); line-height: 1.05; }
  .site-header .brand small { display: none; }
}
@media (max-width: 390px) {
  .navbar { gap: 10px; }
  .site-header .brand { gap: 10px; }
  .site-header .header-logo { height: 42px; }
  .site-header .brand strong { font-size: 0.86rem; letter-spacing: -0.045em; }
}

@media (max-width: 340px) {
  .site-header .header-logo { height: 36px; }
  .site-header .brand strong { font-size: 0.76rem; }
}
