:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #4b5563;
  --accent: #0f2e66;
  --accent-strong: #0b234f;
  --border: #d9e0ec;
  --shadow: 0 16px 40px rgba(15, 46, 102, 0.08);
  --header-h: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  padding: 5rem 0;
}

.section-head {
  margin-bottom: 2rem;
}

.section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 2.5vw, 2.5rem);
  color: var(--accent);
}

.section-lead {
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(7px);
  border-bottom: 1px solid rgba(15, 46, 102, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav a {
  font-weight: 500;
  color: var(--muted);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--accent);
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem;
  margin-left: 0.2rem;
}

.lang-btn {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  min-width: 2.25rem;
  min-height: 2rem;
  font-weight: 600;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--accent);
  color: #fff;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 0.28rem 0;
  background: var(--accent);
}

.hero {
  position: relative;
  min-height: 100svh;
  padding-top: var(--header-h);
  display: flex;
  align-items: center;
  isolation: isolate;
  background-color: #0b1a33;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(9, 17, 33, 0.78), rgba(9, 17, 33, 0.45));
  z-index: -1;
}

.hero-content {
  color: #fff;
  padding: 3rem 0;
}

.hero-kicker {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

.hero h1 {
  margin: 0;
  line-height: 1.1;
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.hero-subtitle {
  margin: 1rem 0 1.6rem;
  max-width: 54ch;
  color: rgba(255, 255, 255, 0.95);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.7rem 1.2rem;
  border-radius: 0.65rem;
  border: 1px solid transparent;
  font-weight: 600;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-strong);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

#contact .btn-secondary {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--border);
}

#contact .btn-secondary:hover,
#contact .btn-secondary:focus-visible {
  border-color: var(--accent);
}

.scroll-hint {
  margin-top: 2rem;
  display: inline-block;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
}

.section-about {
  background: linear-gradient(180deg, #fff 0%, #eef3fa 100%);
}

.section-about .section-head {
  text-align: center;
}

.section-about .section-lead {
  margin-inline: auto;
}

.about-text {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
  max-width: 78ch;
  margin-inline: auto;
  text-align: center;
}

.team-title {
  margin: 0 0 1rem;
  color: var(--accent);
}

.team-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.service-card,
.contact-card,
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.card {
  overflow: hidden;
}

.card-image {
  aspect-ratio: 16 / 9;
  background: #dfe6f3;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#directorImage {
  object-position: center 10%;
}

.lawyer-image {
  object-position: center 10%;
}

.director-card {
  grid-column: span 3;
  display: grid;
  grid-template-columns: 1.2fr 1.8fr;
}

.placeholder-holder {
  position: relative;
}

.image-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2rem;
  color: #64748b;
  background: #e8edf7;
}

.placeholder-holder.has-image .image-fallback {
  display: none;
}

.card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.card-body h4 {
  margin: 0;
  color: var(--accent);
}

.role {
  margin: 0.25rem 0 0.5rem;
  font-weight: 600;
  color: var(--muted);
}

.team-actions {
  margin-top: auto;
  padding-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.team-links {
  display: flex;
  gap: 0.6rem;
}

.more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 0.4rem 0.8rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  background: #f7f9fe;
  white-space: nowrap;
}

.more-link:hover,
.more-link:focus-visible {
  border-color: var(--accent);
  background: #ebf1fd;
}

.team-link {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: #f7f9fe;
}

.team-link:hover,
.team-link:focus-visible {
  border-color: var(--accent);
  background: #ebf1fd;
}

.team-link.whatsapp {
  color: #128c7e;
}

.team-link-icon {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
  display: block;
}

.team-link.whatsapp .team-link-icon {
  width: 2rem;
  height: 2rem;
}

.services-grid,
.contact-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card,
.contact-card {
  padding: 1rem;
}

.service-card h3,
.contact-card h3 {
  margin-top: 0;
  color: var(--accent);
}

.disclaimer {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.section-contact {
  background: #fff;
}

.section-head-center {
  text-align: center;
}

.section-head-center .section-lead {
  margin-inline: auto;
}

.section-map {
  background: #f3f6fc;
  padding-top: 3.5rem;
}

.map-wrap {
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}

.map-wrap iframe {
  display: block;
  width: 100%;
  min-height: 360px;
  border: 0;
}

.contact-actions {
  margin: 1.5rem 0;
}

.contact-form {
  padding: 1rem;
}

.form-row {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.form-row input,
.form-row textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.7rem;
  font: inherit;
  color: var(--text);
}

.form-consent {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.65rem;
}

.form-consent input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.25rem;
}

.form-note {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer {
  padding: 1.6rem 0;
  background: #101827;
  color: #d4deec;
}

.footer-inner {
  display: grid;
  gap: 0.3rem;
  text-align: center;
  font-size: 0.92rem;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .services-grid,
  .contact-grid,
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .director-card {
    grid-column: span 2;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 64px;
  }

  .menu-toggle {
    display: inline-block;
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    left: 0;
    display: grid;
    gap: 0.9rem;
    align-items: start;
    padding: 1rem;
    background: #fff;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .lang-switch {
    justify-self: start;
    margin-left: 0;
  }

  .section {
    padding: 4rem 0;
  }
}

@media (max-width: 520px) {
  .services-grid,
  .contact-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .director-card {
    grid-column: auto;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .map-wrap iframe {
    min-height: 300px;
  }
}
