:root {
  --bg-soft: #d7dade;
  --bg-header: #ffffff;
  --ink: #21364f;
  --ink-muted: #3f5874;
  --lime: #9cc431;
  --hero-overlay: rgba(6, 18, 35, 0.62);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: clip;
}

body {
  background: var(--bg-soft);
  color: var(--ink);
  font-family: "Urbanist", sans-serif;
}

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

.container {
  width: min(1260px, 92vw);
  margin: 0 auto;
}

.top-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  overflow-x: clip;
  background: var(--bg-header);
  border-bottom: 1px solid #ccd2d9;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
}

.header-inner {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
}

.logo-link img {
  width: clamp(210px, 26vw, 330px);
  display: block;
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
  min-width: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 30px;
  font-size: 17px;
  letter-spacing: 0.02em;
  font-family: "Questrial", sans-serif;
  min-width: 0;
}

.main-nav > a,
.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--ink);
  text-transform: uppercase;
}

.main-nav > a:hover,
.nav-trigger:hover {
  color: var(--lime);
}

.main-nav i {
  font-size: 16px;
}

.nav-item {
  position: relative;
}

.nav-trigger {
  border: 0;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  padding: 0;
}

.has-dropdown.is-open .nav-trigger,
.has-dropdown:focus-within .nav-trigger {
  color: var(--lime);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 300px;
  background: #f0f2f6;
  border: 1px solid #c5ccd3;
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(4, 15, 32, 0.16);
  padding: 10px 0;
  display: grid;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 1200;
}

.nav-dropdown--wide {
  min-width: 430px;
}

.nav-dropdown a {
  display: block;
  padding: 10px 16px;
  font-family: "Questrial", sans-serif;
  font-size: 18px;
  color: var(--ink);
  line-height: 1.25;
  text-transform: none;
}

.nav-dropdown a:hover {
  background: #e5e9ee;
  color: #1a2c42;
}

.has-dropdown:focus-within .nav-dropdown,
.has-dropdown.is-open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.social-list {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--lime);
}

.social-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.social-list a:hover {
  transform: translateY(-2px);
  color: #6f8f16;
}

.hero-slider {
  position: relative;
  min-height: 520px;
  margin-top: 0;
  overflow: hidden;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-image {
  --hero-slide-image: url("../img/hero.jpg");
  position: absolute;
  inset: 0;
  min-height: 520px;
  background-image: linear-gradient(var(--hero-overlay), var(--hero-overlay)), var(--hero-slide-image);
  background-position: center 22%;
  background-size: cover;
  filter: grayscale(100%);
  box-shadow: inset 160px 0 0 rgba(0, 12, 26, 0.45), inset -160px 0 0 rgba(0, 12, 26, 0.45);
  opacity: 0;
  transform: translateX(100%);
  transition: transform 0.8s ease, opacity 0.8s ease;
  will-change: transform, opacity;
}

.hero-image.is-current,
.hero-image.is-next,
.hero-image.is-exit {
  opacity: 1;
}

.hero-image.is-current {
  transform: translateX(0);
  z-index: 1;
}

.hero-image.is-next {
  transform: translateX(100%);
  z-index: 2;
}

.hero-image.is-exit {
  transform: translateX(-100%);
  z-index: 0;
}

.hero-copy {
  position: absolute;
  right: max(4vw, 28px);
  top: 22px;
  bottom: auto;
  width: min(520px, 38vw);
  padding: 22px 24px;
  z-index: 4;
  background: linear-gradient(135deg, rgba(5, 15, 29, 0.94), rgba(5, 15, 29, 0.82));
  border: 1px solid rgba(156, 196, 49, 0.42);
  border-radius: 14px;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(4px);
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.hero-copy p {
  color: #f7fbff;
}

.hero-copy h1,
.hero-copy h2,
.hero-copy h3 {
  margin: 0;
  line-height: 1.25;
  font-family: "Questrial", sans-serif;
}

.hero-copy h1 {
  font-size: clamp(24px, 1.9vw, 34px);
  margin-bottom: 10px;
  font-weight: 700;
}

.hero-copy h2 {
  font-size: clamp(16px, 1.05vw, 19px);
  color: #f4f8ff;
  margin-bottom: 8px;
  font-weight: 600;
}

.hero-copy h3 {
  font-size: clamp(15px, 1vw, 18px);
  color: #e9f0fb;
  margin-bottom: 4px;
  font-weight: 500;
}

.hero-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  padding: 9px 14px;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  background: var(--lime);
  color: #ffffff;
  border: 1px solid #88ad29;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.hero-btn i {
  font-size: 1.15em;
}

.hero-btn--primary {
  box-shadow: 0 10px 24px rgba(88, 116, 18, 0.38);
}

.hero-btn--dark {
  background: #8fb52b;
  color: #ffffff;
  border: 1px solid #7ea225;
}

.hero-btn:hover {
  transform: translateY(-2px);
  background: #ffffff;
  border-color: #ffffff;
  color: #000000;
}

.slider-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 5;
}

.slider-dots button {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--lime);
  display: inline-block;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.slider-dots button:hover,
.slider-dots button:focus-visible {
  transform: scale(1.1);
  outline: none;
}

.slider-dots button.active {
  background: var(--lime);
}

.gestiones-section {
  background: var(--bg-soft);
  padding: 36px 0 44px;
}

.gestiones-title {
  margin: 0 0 14px;
  padding: 0 4vw;
  font-family: "Questrial", sans-serif;
  font-size: 30px;
  color: var(--ink);
}

.expert-btn {
  border: 1px solid #88ad29;
  background: var(--lime);
  color: #fff;
  font-family: "Questrial", sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 12px;
  cursor: pointer;
  line-height: 1.2;
}

.expert-btn:hover {
  background: #fff;
  color: #000;
}

.expert-btn--card {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  width: calc(100% - 28px);
  text-align: center;
}

.gestiones-marquee {
  overflow: hidden;
  background: transparent;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
}

.gestiones-track {
  display: flex;
  gap: 24px;
  width: max-content;
  padding: 8px 4vw;
  animation: gestiones-scroll 90s linear infinite;
}

.gestiones-marquee:hover .gestiones-track {
  animation-play-state: paused;
}

.gestion-card {
  position: relative;
  width: clamp(220px, 18vw, 300px);
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  flex: 0 0 auto;
}

.gestion-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
}

.gestion-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(6, 19, 35, 0.5), rgba(6, 19, 35, 0.92));
}

.gestion-card h3 {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 62px;
  margin: 0;
  z-index: 1;
  color: #ffffff;
  font-family: "Questrial", sans-serif;
  font-size: clamp(17px, 1.2vw, 22px);
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}

@keyframes gestiones-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.modal-dialog {
  max-width: 760px;
}

.modal-card {
  max-height: none;
  overflow: visible;
  background: #e0e3e7;
  border-radius: 14px;
  border: 1px solid #bcc2c9;
}

.modal-card h2 {
  margin: 0;
  font-family: "Questrial", sans-serif;
  color: var(--ink);
  font-size: 34px;
}

.modal-copy {
  margin: 0 0 12px;
  font-family: "Questrial", sans-serif;
  color: #2a3f5b;
  font-size: 14px;
  line-height: 1.35;
}

.modal-close {
  font-size: 12px;
}

.expert-form {
  display: block;
}

.step {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.is-hidden {
  display: none;
}

.form-field {
  display: grid;
  gap: 4px;
}

.form-field--full {
  grid-column: 1 / -1;
}

.expert-form label {
  font-family: "Questrial", sans-serif;
  font-size: 14px;
  color: var(--ink);
}

.expert-form input,
.expert-form select,
.expert-form textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid #b6bdc5;
  border-radius: 8px;
  padding: 7px 10px;
  font-family: "Questrial", sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
}

.expert-form input:focus,
.expert-form select:focus,
.expert-form textarea:focus {
  outline: 2px solid #9cc431;
  border-color: #9cc431;
}

.expert-submit {
  grid-column: 1 / -1;
  margin-top: 2px;
  border: 1px solid #88ad29;
  background: var(--lime);
  color: #fff;
  font-family: "Questrial", sans-serif;
  font-size: 15px;
  border-radius: 10px;
  min-height: 40px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.expert-submit--ghost {
  background: #fff;
  color: var(--ink);
  border-color: #a7b0ba;
}

.expert-submit:hover {
  background: #fff;
  color: #000;
}

.expert-submit:disabled {
  cursor: wait;
}

.expert-submit.is-loading {
  padding-right: 48px;
  opacity: 0.92;
}

.expert-submit.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 15px;
  height: 15px;
  margin-top: -7.5px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  animation: contempla-button-spin 0.9s linear infinite;
}

@keyframes contempla-button-spin {
  to {
    transform: rotate(360deg);
  }
}

.schedule-note {
  grid-column: 1 / -1;
  background: #d1d8df;
  border: 1px solid #bcc6d0;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: "Questrial", sans-serif;
  color: #2a3f5b;
  font-size: 14px;
  line-height: 1.35;
}

.step-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.site-footer {
  padding: 72px 0 22px;
  background: var(--bg-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.9fr 1fr;
  gap: 28px;
}

.lead {
  max-width: 410px;
  margin: 0 0 18px;
  color: var(--ink-muted);
  font-size: 17px;
  font-family: "Questrial", sans-serif;
  line-height: 1.35;
}

.contact-line {
  margin: 0 0 14px;
  font-size: 17px;
  font-family: "Questrial", sans-serif;
  color: var(--ink-muted);
}

.social-list--footer {
  margin: 7px 0 16px;
}

.legal-link {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 17px;
  font-family: "Questrial", sans-serif;
}

.footer-links h3 {
  margin: 0 0 16px;
  font-size: 17px;
  font-family: "Questrial", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.footer-links a {
  display: block;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 17px;
  font-family: "Questrial", sans-serif;
}

.footer-links a:hover,
.legal-link:hover {
  color: #6d87a3;
}

.footer-brand {
  display: grid;
  place-items: center;
}

.footer-brand img {
  width: min(420px, 94%);
  opacity: 0.95;
}

.copyright {
  margin: 58px 0 0;
  text-align: center;
  color: var(--ink-muted);
  font-size: 16px;
  font-family: "Questrial", sans-serif;
}

@media (max-width: 1240px) {
  .header-inner {
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 18px 0;
  }

  .header-right {
    width: 100%;
    justify-content: flex-end;
    gap: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
    margin-top: 24px;
  }
}

@media (max-width: 860px) {
  .container {
    width: min(1260px, 100%);
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .top-header {
    position: relative;
    z-index: 20;
  }

  .header-inner {
    min-height: auto;
    padding: 14px 0 12px;
    gap: 10px;
  }

  .logo-link {
    width: 100%;
    display: grid;
    place-items: center;
  }

  .logo-link img {
    width: min(78vw, 320px);
  }

  .header-right {
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    width: 100%;
  }

  .main-nav {
    position: relative;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
    font-size: clamp(14px, 4vw, 18px);
  }

  .social-list--header {
    width: 100%;
    justify-content: center;
    gap: 10px;
    padding-bottom: 4px;
  }

  .social-list--header a {
    font-size: 26px;
  }

  .hero-image,
  .hero-slider {
    min-height: 740px;
  }

  .nav-item {
    position: static;
    width: auto;
  }

  .nav-dropdown {
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    transform: translateY(10px);
  }

  .nav-dropdown--wide {
    min-width: 0;
  }

  .has-dropdown:focus-within .nav-dropdown,
  .has-dropdown.is-open .nav-dropdown {
    transform: translateY(0);
  }

  .hero-copy {
    right: 10px;
    left: 10px;
    top: 12px;
    bottom: auto;
    max-width: none;
    width: auto;
    padding: 12px;
  }

  .hero-copy h1 {
    font-size: clamp(18px, 5.4vw, 34px);
    margin-bottom: 6px;
    line-height: 1.16;
    overflow-wrap: anywhere;
  }

  .hero-copy h2 {
    font-size: clamp(14px, 4.2vw, 24px);
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .hero-copy h3 {
    font-size: clamp(13px, 3.8vw, 20px);
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
  }

  .hero-btn {
    width: 100%;
    justify-content: center;
    font-size: 15px;
    padding: 9px 12px;
  }

  .gestiones-title {
    font-size: 24px;
  }

  .gestion-card {
    width: clamp(220px, 56vw, 300px);
  }

  .gestion-card h3 {
    font-size: 20px;
    bottom: 64px;
  }

  .expert-btn--card {
    font-size: 14px;
  }

  .modal-dialog {
    max-width: 94vw;
  }

  .modal-card h2 {
    font-size: 28px;
  }

  .expert-form {
    display: block;
  }

  .step {
    grid-template-columns: 1fr;
  }

  .step-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-image,
  .hero-slider {
    min-height: 730px;
  }

  .hero-slider {
    margin-top: 0;
  }

  .gestiones-track {
    gap: 18px;
  }

  .gestion-card {
    width: clamp(200px, 68vw, 280px);
  }

  .gestion-card h3 {
    font-size: 18px;
    bottom: 60px;
  }

  .expert-btn--card {
    font-size: 13px;
    padding: 8px 10px;
  }

  .main-nav {
    gap: 8px 14px;
    font-size: 14px;
  }

  .nav-dropdown a {
    font-size: 16px;
    padding: 9px 13px;
  }

  .nav-dropdown {
    max-height: 54vh;
    overflow-y: auto;
  }

  .social-list--header a {
    font-size: 24px;
  }

  .hero-copy {
    top: 12px;
    bottom: auto;
    padding: 11px;
  }

  .hero-copy h1 {
    font-size: clamp(17px, 6.6vw, 30px);
  }

  .hero-copy h2 {
    font-size: clamp(14px, 4.7vw, 20px);
  }

  .hero-copy h3 {
    font-size: clamp(13px, 4.2vw, 18px);
  }

  .hero-btn {
    font-size: 14px;
    padding: 8px 10px;
  }

  .slider-dots {
    gap: 10px;
    bottom: 10px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
