:root {
  --purple-dark: #450056;
  --purple-footer: #5f0267;
  --purple: #8c0398;
  --purple-bright: #9800a5;
  --purple-light: #eed8ff;
  --text: #1c1c1c;
}

* {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}

html,
body {
  width: 100%;
}

body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  color: var(--text);
  background: #ffffff;
  /* Sticky footer: on short pages the footer stays at the bottom of the viewport */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

header,
main,
section,
footer {
  width: 100%;
  max-width: 100%;
}

main {
  background: #ffffff;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

strong {
  font-weight: 700;
}

.container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 64px);
}

.site-header {
  background: var(--purple-light);
  position: relative;
  z-index: 20;
}

.nav {
  min-height: clamp(76px, 7vw, 104px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.logo {
  font-size: clamp(18px, 1.6vw, 28px);
  font-weight: 700;
  color: var(--purple);
  line-height: 1.1;
  text-wrap: balance;
  padding: 16px 0;
}

.logo,
.nav-links {
  min-width: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(4px, 0.8vw, 14px);
  flex-wrap: nowrap;
  color: var(--purple);
  font-size: clamp(15px, 1.15vw, 19px);
}

.nav-links a,
.nav-links button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 999px;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links button:hover,
.nav-links a:focus,
.nav-links button:focus {
  background: rgba(140, 3, 152, 0.12);
  outline: none;
}

.nav-links a[aria-current="page"],
.nav-links button[aria-current="page"] {
  color: var(--purple-dark);
  font-weight: 600;
  position: relative;
  background: transparent;
}

.nav-links > a[aria-current="page"]::after,
.nav-links button[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--purple) 0%,
    rgba(140, 3, 152, 0.2) 100%
  );
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 2px solid rgba(140, 3, 152, 0.4);
  background: #ffffff;
  color: var(--purple);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle-text {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.nav-toggle-bars {
  position: relative;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.2s ease;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-links.is-open {
  display: flex;
}

.nav-dropdown {
  position: relative;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-caret {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -4px;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  max-width: none;
  background: #ffffff;
  border: 1px solid var(--purple);
  border-radius: 16px;
  padding: 10px;
  margin-top: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 10;
}

.dropdown-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -9px;
  height: 9px;
}

.dropdown-menu a {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 17px;
}

.nav-dropdown.is-open .dropdown-menu {
  display: flex;
}

@media (hover: hover) {
  .nav-dropdown:hover .dropdown-menu {
    display: flex;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 36px;
  border-radius: 999px;
  font-size: clamp(18px, 2vw, 32px);
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.btn-primary {
  background: var(--purple-bright);
  color: #ffffff;
}

.btn-outline {
  border: 3px solid var(--purple-bright);
  color: var(--purple-bright);
}

.site-footer {
  /* Pushes the footer to the bottom on short pages (see body); the gap above
     keeps each page's own body background */
  margin-top: auto;
  background: var(--purple-footer);
  color: #ffffff;
  border-radius: clamp(48px, 6vw, 80px) clamp(48px, 6vw, 80px) 0 0;
  padding: clamp(40px, 4vw, 56px) 0 clamp(24px, 2.6vw, 36px);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 2.4vw, 32px);
  text-align: center;
}

.footer-info {
  overflow-wrap: anywhere;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-info p {
  margin: 0;
}

.footer-title {
  font-size: clamp(17px, 1.8vw, 26px);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.footer-email {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: clamp(15px, 1.3vw, 19px);
  color: rgba(255, 255, 255, 0.9);
}

.footer-email span {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.footer-email:hover {
  color: #ffffff;
}

.footer-email:hover span {
  text-decoration-thickness: 2px;
}

.footer-line {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.6);
}

.footer-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(14px, 1.6vw, 24px);
}

/* Fine print below the social icons */
.footer-legal {
  margin-top: -8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0 8px;
  font-size: 13px;
  line-height: 1.2;
}

.footer-legal a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-legal span {
  color: rgba(255, 255, 255, 0.6);
}

.footer-legal a:hover,
.footer-legal a[aria-current="page"] {
  color: #ffffff;
}

.social-icon {
  width: clamp(48px, 4vw, 60px);
  height: clamp(48px, 4vw, 60px);
  border: 2px solid #ffffff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-svg {
  width: clamp(22px, 1.8vw, 28px);
  height: clamp(22px, 1.8vw, 28px);
  fill: #ffffff;
}

/* Pill call-to-action buttons (home hero, error pages) */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px clamp(20px, 2vw, 28px);
  border: 2px solid var(--purple);
  border-radius: 999px;
  font-family: inherit;
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.cta-button--primary {
  background: var(--purple);
  color: #ffffff;
}

.cta-button--primary:hover {
  background: var(--purple-dark);
  border-color: var(--purple-dark);
}

.cta-button--secondary {
  background: #ffffff;
  color: var(--purple);
}

.cta-button--secondary:hover {
  background: var(--purple-light);
}

.cta-button:focus-visible {
  outline: 3px solid var(--purple-dark);
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .cta-button {
    flex: 1 1 100%;
  }
}

@media (max-width: 1100px) {
  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    row-gap: 0;
    column-gap: 16px;
  }

  .nav-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .nav-links {
    grid-column: 1 / -1;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px;
    border: 1px solid rgba(140, 3, 152, 0.2);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 32px rgba(69, 0, 86, 0.12);
    margin-bottom: 16px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    font-size: 16px;
    display: none;
  }

  .nav-links a,
  .nav-links button {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
  }

  .nav-links > a[aria-current="page"]::after,
  .nav-links button[aria-current="page"]::after {
    display: none;
  }

  .nav-dropdown {
    width: 100%;
  }

  /* In the mobile menu "Unidades" is a plain heading with its units always listed */
  .nav-button {
    cursor: default;
    padding-bottom: 4px;
  }

  .nav-button:hover,
  .nav-button:focus {
    background: none;
  }

  .nav-caret {
    display: none;
  }

  .dropdown-menu,
  .nav-dropdown.is-open .dropdown-menu {
    position: static;
    display: flex;
    min-width: 0;
    width: 100%;
    margin: 0;
    border: none;
    background: transparent;
    padding: 0 0 0 16px;
  }

  .dropdown-menu::before {
    display: none;
  }

  .dropdown-menu a {
    padding: 8px 12px;
    font-size: 16px;
  }
}

@media (max-width: 600px) {
  .btn {
    width: 100%;
  }
}
