/* ===== Tokens ===== */
:root {
  --navy-950: #0a1a2f;
  --navy-900: #0d2340;
  --navy-800: #123059;
  --navy-700: #1a4173;
  --gold-500: #c9a13b;
  --gold-400: #d9b95c;
  --gold-050: #f7f0dd;
  --ink: #142033;
  --ink-soft: #4a5568;
  --paper: #faf8f4;
  --paper-alt: #f0ece2;
  --white: #ffffff;
  --surface: #ffffff;
  --border: #e2ddd0;

  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --radius: 8px;
  --shadow: 0 4px 20px rgba(10, 26, 47, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1826;
    --paper-alt: #142033;
    --ink: #eef1f5;
    --ink-soft: #b7c0cd;
    --border: #253449;
    --surface: #16233a;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 14.5px; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { font-family: var(--font-serif); font-weight: 700; margin: 0 0 12px; color: var(--ink); }
h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); margin-bottom: 28px; }
h3 { font-size: 1.05rem; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 92px;
}
.brand-logo { height: 62px; width: auto; }
@media (prefers-color-scheme: dark) {
  .brand-logo { filter: invert(1); }
}
.site-nav { display: flex; gap: 32px; }
.site-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy-900);
  letter-spacing: 0.02em;
  position: relative;
  padding: 4px 0;
}
@media (prefers-color-scheme: dark) {
  .site-nav a { color: var(--ink); }
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--gold-500);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.site-nav a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(160deg, var(--navy-950), var(--navy-800));
  color: var(--white);
  text-align: center;
  padding: 96px 0 88px;
}
.hero-logo { height: 150px; width: auto; margin: 0 auto 28px; }
.hero h1 { color: var(--white); font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 8px; }
.hero-subtitle {
  color: var(--gold-400);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.9rem;
  margin: 0 0 32px;
}
.hero-text {
  max-width: 560px;
  margin: 0 auto 36px;
  color: #d7deea;
  font-size: 1.05rem;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold-500); color: var(--navy-950); }
.btn-outline { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.5); }

/* ===== Sections ===== */
.section { padding: 80px 0; }
.section-alt { background: var(--paper-alt); }
.section-lead { color: var(--ink-soft); max-width: 620px; margin: 0 0 40px; font-size: 1.05rem; }

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.service-card {
  display: flex;
  align-items: center;
  padding: 22px 26px;
  border-left: 4px solid var(--gold-500);
}
.service-card h3 { color: var(--navy-800); margin: 0; }
@media (prefers-color-scheme: dark) { .service-card h3 { color: var(--gold-400); } }
.service-card p { color: var(--ink-soft); margin: 0; font-size: 0.95rem; }

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 20px;
}
.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy-700);
  border-radius: var(--radius);
  padding: 22px;
}
.team-card-titular { border-left-color: var(--gold-500); }
.team-card h3 { margin-bottom: 4px; font-size: 1.05rem; }
.team-role {
  color: var(--gold-500);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 10px;
}
.team-card a {
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
}
.team-card a:hover { color: var(--navy-800); text-decoration: underline; }

/* Privacy notice */
.privacy-actions { display: flex; justify-content: flex-end; margin: -12px 0 16px; }
.btn-small {
  padding: 8px 18px;
  font-size: 0.85rem;
  background: var(--navy-800);
  color: var(--white);
}
.privacy {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--gold-500);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 44px 56px;
  max-height: 640px;
  overflow-y: auto;
}
.privacy p {
  text-align: justify;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.75;
  margin: 0;
  text-indent: 3em;
}
.privacy .doc-title {
  text-align: center;
  text-indent: 0;
  font-weight: 700;
  margin-bottom: 18px;
}
.privacy .doc-heading { font-weight: 700; text-align: left; }
.privacy .doc-gap { margin-top: 18px; }
.doc-phones {
  display: flex;
  gap: 8px;
  padding-left: 3em;
  font-size: 0.92rem;
  line-height: 1.75;
}
.doc-break { border: 0; border-top: 1px solid var(--border); margin: 36px 0; }
.privacy a { color: var(--navy-700); text-decoration: underline; word-break: break-word; }
@media (prefers-color-scheme: dark) { .privacy a { color: var(--gold-400); } }

/* Location */
.location-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 32px;
  align-items: stretch;
}
.location-info { display: flex; flex-direction: column; gap: 24px; }
.info-block h3 { color: var(--navy-800); margin-bottom: 6px; }
@media (prefers-color-scheme: dark) { .info-block h3 { color: var(--gold-400); } }
.info-block p { margin: 0; color: var(--ink-soft); }
.info-block a { color: var(--ink); font-weight: 600; text-decoration: none; }
.info-block a:hover { text-decoration: underline; }
.location-map {
  min-height: 340px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.location-map iframe { width: 100%; height: 100%; min-height: 340px; }

/* ===== Footer ===== */
.site-footer {
  background: var(--navy-950);
  color: #b9c3d3;
  padding: 48px 0;
  text-align: center;
}
.footer-logo { height: 54px; margin: 0 auto 20px; opacity: 0.9; }
.site-footer p { margin: 4px 0; font-size: 0.9rem; }
.site-footer a { color: var(--gold-400); text-decoration: none; }
.footer-copy { margin-top: 16px; color: #6f7d92; font-size: 0.8rem; }

/* ===== Responsive ===== */
@media (max-width: 820px) {
  .location-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .header-inner { height: 76px; }
  .brand-logo { height: 48px; }
  .hero-logo { height: 110px; }
  .team-grid { grid-template-columns: 1fr; }
  .team-card a { white-space: normal; word-break: break-all; }
  .privacy { padding: 24px 18px; }
  .privacy p { text-indent: 1.5em; }
  .doc-phones { padding-left: 1.5em; }
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .site-nav.open { max-height: 360px; }
  .site-nav a { padding: 16px 24px; border-top: 1px solid var(--border); }
  .hero { padding: 64px 0 56px; }
}

/* ===== Subpáginas (Aviso de Privacidad, Directorio) ===== */
.site-nav a.active::after { transform: scaleX(1); }
.page-hero {
  background: linear-gradient(160deg, var(--navy-950), var(--navy-800));
  padding: 44px 0 40px;
}
.page-hero h1 { color: var(--white); font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin: 0; }
.back-link {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--gold-400);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}
.back-link:hover { text-decoration: underline; }
.subpage .privacy { max-height: none; overflow: visible; }
.subpage .privacy-actions { margin-top: 0; }

/* Botones dentro de la información de inicio */
.info-block .btn-small { margin-top: 2px; }
.info-block a.btn-small { color: var(--white); font-weight: 700; }
.info-block a.btn-small:hover { text-decoration: none; }
.location-map, .location-map iframe { min-height: 440px; }
