:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --text: #101828;
  --muted-text: #475467;
  --primary: #0f4c81;
  --primary-dark: #0b3a62;
  --border: #d0d5dd;
  --container-max: 1100px;
  --container-gutter: 92%;
  --hero-min-height: 560px;
  --hero-shared-height: clamp(620px, 72svh, 720px);
  --hero-content-top: 3.2rem;
  --hero-content-bottom: 2.2rem;
  --hero-content-gap: 0.95rem;
  --hero-shared-image: url('images/main.webp');
  --hero-shared-overlay: linear-gradient(100deg, rgba(5, 16, 29, 0.5) 0%, rgba(10, 35, 60, 0.36) 52%, rgba(15, 76, 129, 0.2) 100%);
  --hero-service-image: none;
  --hero-service-overlay: linear-gradient(100deg, rgba(5, 16, 29, 0.84) 0%, rgba(10, 35, 60, 0.68) 52%, rgba(15, 76, 129, 0.35) 100%);
  --section-padding-y: 4rem;
  --section-padding-y-tight: 3rem;
  --grid-gap: 1rem;
  --grid-gap-md: 1.25rem;
  --grid-gap-lg: 1.5rem;
  --grid-gap-xl: 2rem;
  --surface-radius-sm: 10px;
  --surface-radius-md: 14px;
  --surface-radius-lg: 16px;
  --surface-radius-xl: 20px;
  --pill-radius: 999px;
  --panel-padding-sm: 1rem;
  --panel-padding-md: 1.2rem;
  --panel-padding-lg: 1.4rem;
  --panel-padding-xl: 1.8rem;
  --panel-padding-2xl: 2rem;
  --button-radius: 10px;
  --button-padding-y: 0.7rem;
  --button-padding-x: 1.1rem;
}

* {
  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;
}

.container {
  width: min(var(--container-max), var(--container-gutter));
  margin: 0 auto;
}

.hero {
  color: #fff;
  padding-bottom: 4rem;
  min-height: var(--hero-shared-height);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  position: relative;
  overflow: clip;
  isolation: isolate;
}

header.hero:not(.service-hero)::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hero-shared-overlay), var(--hero-shared-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 0;
}

.hero > .topbar,
.hero > .hero-content {
  position: relative;
}

.hero > .topbar {
  z-index: 3;
}

.hero > .hero-content {
  z-index: 1;
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 1.2rem;
  padding: 0.8rem 1.1rem;
  margin-top: 0.9rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--surface-radius-md);
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
  position: relative;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  width: 2rem;
  height: 2rem;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  z-index: 25;
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all 0.3s ease;
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(0.7rem, 0.6rem);
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(0.5rem, -0.5rem);
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
  padding: 0.2rem 0;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.6rem;
  justify-self: center;
  align-items: center;
  padding: 0;
  margin: 0;
}

.nav-links > li > a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.nav-links > li > a:hover {
  color: var(--primary);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown::after {
  display: none;
}

.nav-arrow {
  display: inline-block;
  font-size: 0.72rem;
  transition: transform 0.18s ease;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  padding: 0.45rem;
  margin: 0;
  list-style: none;
  border-radius: var(--surface-radius-sm);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.12);
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  will-change: opacity, transform, visibility;
}

.dropdown-menu li {
  margin: 0;
}

.dropdown-menu a {
  display: block;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
  background: #f2f4f7;
  color: var(--primary);
  outline: none;
}

.nav-dropdown.is-open > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}

.nav-dropdown.is-open > a .nav-arrow {
  transform: rotate(180deg);
}

.top-contact {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-self: end;
  justify-content: flex-end;
  align-items: center;
}

.top-contact > a:not(.whatsapp) {
  display: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.top-contact > a:hover {
  color: var(--primary);
}

.top-contact .whatsapp {
  display: inline-flex !important;
  justify-content: center;
  align-items: center;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border-radius: var(--pill-radius);
  background: #e9f5ef;
  border: 1px solid #b8d7c7;
  color: #1f6a4f;
  font-size: 0;
  line-height: 0;
}

.top-contact .whatsapp::before {
  content: "";
  width: 0.95rem;
  height: 0.95rem;
  display: block;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.52 3.48A11.86 11.86 0 0 0 12.08 0C5.5 0 .16 5.34.16 11.92c0 2.1.55 4.14 1.6 5.95L0 24l6.3-1.65a11.9 11.9 0 0 0 5.77 1.47h.01c6.58 0 11.92-5.35 11.92-11.93 0-3.18-1.24-6.16-3.48-8.4ZM12.08 21.8h-.01a9.85 9.85 0 0 1-5.02-1.37l-.36-.22-3.73.98 1-3.64-.23-.37a9.86 9.86 0 0 1-1.52-5.26c0-5.45 4.43-9.88 9.88-9.88a9.8 9.8 0 0 1 6.98 2.9 9.8 9.8 0 0 1 2.9 6.98c0 5.45-4.43 9.88-9.89 9.88Zm5.42-7.42c-.3-.15-1.8-.89-2.08-.98-.28-.1-.49-.15-.69.15-.2.3-.79.98-.96 1.18-.18.2-.35.22-.65.08-.3-.15-1.28-.47-2.44-1.5-.9-.8-1.52-1.79-1.7-2.09-.18-.3-.02-.46.13-.6.13-.13.3-.35.45-.52.15-.18.2-.3.3-.5.1-.2.05-.37-.03-.52-.08-.15-.69-1.67-.95-2.29-.25-.6-.5-.52-.69-.53h-.58c-.2 0-.52.08-.8.37-.27.3-1.05 1.02-1.05 2.49s1.08 2.9 1.23 3.1c.15.2 2.13 3.25 5.15 4.55.72.31 1.28.5 1.72.64.72.23 1.37.2 1.88.12.57-.08 1.8-.73 2.05-1.45.25-.72.25-1.34.18-1.46-.08-.12-.27-.2-.57-.35Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.52 3.48A11.86 11.86 0 0 0 12.08 0C5.5 0 .16 5.34.16 11.92c0 2.1.55 4.14 1.6 5.95L0 24l6.3-1.65a11.9 11.9 0 0 0 5.77 1.47h.01c6.58 0 11.92-5.35 11.92-11.93 0-3.18-1.24-6.16-3.48-8.4ZM12.08 21.8h-.01a9.85 9.85 0 0 1-5.02-1.37l-.36-.22-3.73.98 1-3.64-.23-.37a9.86 9.86 0 0 1-1.52-5.26c0-5.45 4.43-9.88 9.88-9.88a9.8 9.8 0 0 1 6.98 2.9 9.8 9.8 0 0 1 2.9 6.98c0 5.45-4.43 9.88-9.89 9.88Zm5.42-7.42c-.3-.15-1.8-.89-2.08-.98-.28-.1-.49-.15-.69.15-.2.3-.79.98-.96 1.18-.18.2-.35.22-.65.08-.3-.15-1.28-.47-2.44-1.5-.9-.8-1.52-1.79-1.7-2.09-.18-.3-.02-.46.13-.6.13-.13.3-.35.45-.52.15-.18.2-.3.3-.5.1-.2.05-.37-.03-.52-.08-.15-.69-1.67-.95-2.29-.25-.6-.5-.52-.69-.53h-.58c-.2 0-.52.08-.8.37-.27.3-1.05 1.02-1.05 2.49s1.08 2.9 1.23 3.1c.15.2 2.13 3.25 5.15 4.55.72.31 1.28.5 1.72.64.72.23 1.37.2 1.88.12.57-.08 1.8-.73 2.05-1.45.25-.72.25-1.34.18-1.46-.08-.12-.27-.2-.57-.35Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.top-contact .whatsapp:hover {
  background: #dff0e8;
  color: #195a43;
}

.contact-phone,
.contact-email {
  display: none !important;
}

.lang-selector {
  position: relative;
  width: 2.2rem;
  height: 2.2rem;
  margin-left: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--pill-radius);
  background: #fff;
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.1);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lang-selector::after {
  content: '';
  position: absolute;
  top: 100%;
  right: -0.2rem;
  width: 3rem;
  height: 7rem;
  pointer-events: auto;
}

.lang-selector::before {
  content: '🌐';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
  z-index: 1;
  pointer-events: none;
}

.lang-selector:is(:hover, :focus-within, .is-open) {
  border-color: #b5bdc8;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.15);
}

.lang-btn {
  position: absolute;
  right: 0;
  width: 2.6rem;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.1;
  letter-spacing: 0.04em;
  min-height: 1.9rem;
  padding: 0.3rem 0.45rem;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, visibility 0s linear 0.2s;
  z-index: 2;
}

.lang-selector .lang-btn:nth-of-type(1) {
  top: calc(100% + 0.12rem);
}

.lang-selector .lang-btn:nth-of-type(2) {
  top: calc(100% + 2.18rem);
}

.lang-selector .lang-btn:nth-of-type(3) {
  top: calc(100% + 4.24rem);
}

.lang-selector:is(:hover, :focus-within, .is-open) .lang-btn {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}

.lang-btn:hover,
.lang-btn:focus-visible {
  background: #f2f4f7;
  outline: none;
}

.lang-btn.active {
  background: #eaf2ff;
  color: var(--primary);
  border-color: #c8dbff;
}

.hero-content {
  display: grid;
  align-content: start;
  row-gap: var(--hero-content-gap);
  padding: var(--hero-content-top) 0 var(--hero-content-bottom);
  position: relative;
}

.hero-content > * {
  margin-top: 0;
  margin-bottom: 0;
}

.hero-content .lead {
  margin-top: 0.25rem;
}

.eyebrow {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  margin-bottom: 1rem;
  color: #dbeafe;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  max-width: 13ch;
  margin-bottom: 1rem;
}

.page-title {
  max-width: 24ch;
}

.services-list .card h3 {
  margin-bottom: 0;
}

.service-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.service-card-link h3 {
  transition: color 0.3s ease;
}

.service-card-link:hover h3 {
  color: var(--primary);
}

.service-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.85rem;
  border: 1px solid var(--border);
  filter: grayscale(100%);
  transition: filter 0.4s ease, transform 0.4s ease;
  cursor: pointer;
}

.service-media:hover,
.service-card-link:hover .service-media {
  filter: grayscale(0%);
  transform: scale(1.08);
}

.service-hero {
  position: relative;
}

.service-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hero-service-overlay), var(--hero-service-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.service-hero--arraigo {
  --hero-service-image: url('images/asylum.webp');
}

.service-hero--certificado-ue {
  --hero-service-image: url('images/eu_certificado.webp');
}

.service-hero--contratar-extranjero {
  --hero-service-image: url('images/extranjero.webp');
}

.service-hero--emprender {
  --hero-service-image: url('images/business.webp');
}

.service-hero--gestoria {
  --hero-service-image: url('images/gestion_administrativa.webp');
}

.service-hero--homologacion {
  --hero-service-image: url('images/degree.webp');
}

.service-hero--nacionalidad {
  --hero-service-image: url('images/passport.webp');
}

.service-hero--recursos {
  --hero-service-image: url('images/recursos.webp');
}

.service-hero--residencia {
  --hero-service-image: url('images/residencia_no_luucrativa.webp');
}

.service-hero--tarjeta-comunitaria {
  --hero-service-image: url('images/communitario.webp');
}

.service-hero--team {
  --hero-service-image: url('images/main.webp');
  --hero-service-overlay: var(--hero-shared-overlay);
}

.service-hero--visa-estudios {
  --hero-service-image: url('images/study_visa.webp');
}

.service-hero--visa-nomada {
  --hero-service-image: url('images/digital_nomad.webp');
}

.service-hero .back-link {
  position: absolute;
  top: calc(var(--hero-content-top) - 1.9rem);
  left: 0;
  margin: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #dbeafe;
  text-decoration: none;
  font-weight: 600;
  margin: 0;
}

.back-link::before {
  content: '←';
}

.service-intro-grid,
.service-detail-grid,
.service-dual-grid,
.service-steps {
  display: grid;
  gap: var(--grid-gap-md);
}

.stats-grid,
.values-grid,
.about-values,
.principles,
.team-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-intro-grid,
.service-detail-grid,
.service-dual-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-panel,
.service-note,
.service-step,
.service-cta-card,
.card,
.stat-card,
.principle,
.team-card {
  background: #fff;
  border: 1px solid var(--border);
}

.service-panel,
.service-note,
.service-step,
.service-cta-card {
  border-radius: var(--surface-radius-lg);
  padding: var(--panel-padding-lg);
}

.service-panel h2,
.service-note h2,
.service-step h3,
.service-cta-card h2 {
  margin-bottom: 0.7rem;
}

.service-highlight {
  background: linear-gradient(145deg, #0c2c49 0%, #0f4c81 100%);
  color: #fff;
  border-radius: var(--surface-radius-xl);
  padding: 1.7rem;
  box-shadow: 0 18px 40px rgba(15, 76, 129, 0.16);
}

.service-highlight h2,
.service-highlight p,
.service-highlight li,
.service-highlight strong {
  color: #fff;
}

.service-highlight .checklist li,
.service-highlight .service-facts li {
  color: #fff;
}

.service-highlight .checklist li::before,
.service-highlight .service-facts li::before {
  color: #fff;
}

.service-highlight .btn-secondary {
  border-color: rgba(255, 255, 255, 0.7);
}

.service-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.service-tag-list span {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--pill-radius);
  padding: 0.45rem 0.8rem;
  font-size: 0.88rem;
}

.checklist,
.service-facts {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.checklist li,
.service-facts li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.7rem;
  color: var(--muted-text);
}

.checklist li::before,
.service-facts li::before {
  content: '•';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary);
  font-weight: 800;
}

.service-step {
  position: relative;
}

.service-step-number {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--pill-radius);
  background: #eaf2ff;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 0.9rem;
}

.service-callout {
  border-left: 4px solid var(--primary);
  padding-left: 1rem;
  color: var(--muted-text);
  margin-top: 1rem;
}

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

.intro-text {
  max-width: 70ch;
  margin-left: auto;
  margin-right: auto;
}

.cta-strip {
  display: flex;
  gap: var(--grid-gap);
  margin-top: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

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

.stats-grid {
  margin-top: 1.5rem;
  gap: 1.2rem;
}

.stat-card {
  border-radius: var(--surface-radius-md);
  padding: var(--panel-padding-2xl);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--muted-text);
  margin: 0.5rem 0 0 0;
  font-weight: 500;
}

.final-cta {
  background: linear-gradient(140deg, #0f172a 0%, #0b3a62 45%, #0f4c81 100%);
  color: #fff;
  text-align: center;
  padding: var(--section-padding-y-tight) 0;
}

.final-cta h2,
.final-cta p {
  color: #fff;
}

.principles {
  display: grid;
  gap: var(--grid-gap-lg);
  margin-top: 1.5rem;
}

.principle {
  padding: 1.5rem;
  border-radius: var(--surface-radius-md);
}

.principle h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.lead {
  max-width: 62ch;
  color: #e5efff;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-block;
  border-radius: var(--button-radius);
  padding: var(--button-padding-y) var(--button-padding-x);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
}

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

.btn-primary:hover {
  background: #f3f5f9;
}

.btn-secondary {
  background: transparent;
  border-color: #e5efff;
  color: #e5efff;
}

.section {
  padding: var(--section-padding-y) 0;
}

.section-intro {
  color: var(--muted-text);
  max-width: 68ch;
}

.grid {
  display: grid;
  gap: var(--grid-gap);
}

.services-grid {
  margin-top: 1.6rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  border-radius: var(--surface-radius-md);
  padding: var(--panel-padding-md);
}

.card p {
  margin-bottom: 0;
  color: var(--muted-text);
}

.muted {
  background: #eaf2ff;
}

.values-grid {
  margin-top: 1.2rem;
}

.value {
  background: #fff;
  border-radius: 12px;
  padding: var(--panel-padding-sm);
  border: 1px solid #c9dcfa;
}

.value p {
  margin: 0;
  color: var(--muted-text);
}

.footer {
  border-top: 1px solid var(--border);
  background: #fff;
}

.footer-content {
  min-height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer a {
  color: var(--primary);
  text-decoration: none;
}

.team-grid {
  display: grid;
  gap: var(--grid-gap-xl);
  margin-top: 2rem;
}

.team-card {
  border-radius: var(--surface-radius-lg);
  padding: var(--panel-padding-xl);
  text-align: center;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.team-card:hover {
  box-shadow: 0 12px 32px rgba(15, 76, 129, 0.12);
  transform: translateY(-4px);
}

.team-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 1.2rem;
}

.team-card h3 {
  font-size: 1.3rem;
  margin: 0.7rem 0 0.4rem;
  color: var(--text);
}

.team-role {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 0.8rem;
}

.team-bio {
  font-size: 0.9rem;
  color: var(--muted-text);
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.team-contact {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.team-contact:hover {
  background: var(--primary-dark);
}

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

  .service-intro-grid,
  .service-detail-grid,
  .service-dual-grid,
  .service-steps,
  .values-grid,
  .about-values,
  .stats-grid,
  .principles,
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 680px) {
  :root {
    --hero-min-height: 0;
    --hero-shared-height: auto;
    --hero-content-top: 3rem;
    --hero-content-bottom: 1.2rem;
    --hero-content-gap: 0.8rem;
    --section-padding-y: 3rem;
    --section-padding-y-tight: 2.4rem;
  }

  .hero {
    min-height: 0;
  }

  .service-hero .back-link {
    top: calc(var(--hero-content-top) - 1.6rem);
  }

  /* Mobile menu button */
  .mobile-menu-btn {
    display: flex;
    justify-self: end;
    order: 3;
  }

  /* Rearrange topbar layout for mobile */
  .topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.65rem;
  }

  .brand {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
  }

  .contact-phone,
  .contact-email {
    display: none !important;
  }

  .nav-links {
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.35rem;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-links.open {
    max-height: 500px;
    padding: 0.5rem 0 0;
  }

  .nav-links > li {
    width: 100%;
  }

  .nav-links > li > a {
    width: 100%;
    justify-content: space-between;
    padding: 0.5rem 0;
    white-space: normal;
  }

  .nav-dropdown::after {
    display: none;
  }

  .dropdown-menu {
    position: static;
    min-width: 0;
    margin-top: 0.35rem;
    box-shadow: none;
    border: none;
    background: transparent;
    padding-left: 0.8rem;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-dropdown.is-open > .dropdown-menu {
    max-height: 600px;
  }

  .nav-dropdown.is-open > a .nav-arrow {
    transform: rotate(180deg);
  }

  .top-contact {
    order: 2;
    flex-basis: auto;
    width: auto;
    gap: 0.35rem;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
  }

  .lang-selector {
    margin-left: 0;
    order: unset;
  }

  .top-contact .whatsapp {
    order: unset;
  }

  /* Better typography on mobile */
  h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    max-width: none;
  }

  .team-grid,
  .services-grid,
  .service-intro-grid,
  .service-detail-grid,
  .service-dual-grid,
  .service-steps,
  .values-grid,
  .about-values,
  .stats-grid,
  .principles {
    grid-template-columns: 1fr;
  }

  .stat-number {
    font-size: 2rem;
  }

  .cta-strip {
    flex-direction: column;
  }

  .cta-strip a {
    width: 100%;
    text-align: center;
  }

  .footer-content {
    flex-direction: column;
    justify-content: center;
    padding: 1rem 0;
  }

  /* Better spacing for buttons */
  .btn {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  :root {
    --section-padding-y: 2.4rem;
    --section-padding-y-tight: 1.8rem;
  }

  .container {
    --container-gutter: 95%;
  }

  .topbar {
    padding: 0.6rem 0.5rem;
  }

  .brand {
    font-size: 0.85rem;
  }

  h1 {
    font-size: clamp(1.3rem, 5vw, 2rem);
  }

  h2 {
    font-size: 1.4rem;
  }

  .btn {
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
  }

  .hero-actions,
  .cta-strip {
    gap: 0.5rem;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .team-photo {
    width: 80px;
    height: 80px;
  }

  .nav-links > li > a {
    font-size: 0.9rem;
  }

  .dropdown-menu a {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
  }
}

/* Large screens */
@media (min-width: 1200px) {
  .topbar {
    padding: 1rem 1.4rem;
  }

  .nav-links {
    gap: 2.2rem;
  }

  /* Show contact options on large screens */
  .contact-email {
    display: inline-flex !important;
  }
}
