/* Homepage visual refinements shared by all localized homepages. */

/* Keep the original responsive navigation on mobile instead of showing the
   compact desktop-only sticky bar after the first scroll. */
@media (max-width: 1023px) {
  #sticky-nav {
    display: none !important;
  }

  #main-nav {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
  }

  #main-nav > .container {
    padding: 0.75rem 1rem;
  }

  #main-nav > .container > .flex > .flex {
    min-width: 0;
    flex: 1 1 auto;
  }

  #main-nav > .container > .flex > .flex > a {
    max-width: 100%;
    overflow: hidden;
    font-size: 1.25rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #main-nav > .container > .flex > .flex > span {
    display: none;
  }

  #main-nav > .container > .flex > div:nth-child(2) {
    display: none !important;
  }

  #main-nav > .container > .flex > button {
    display: block !important;
    flex: 0 0 auto;
    margin-left: 0.75rem;
    padding: 0.5rem;
  }

  #mobileMenu:not(.hidden) {
    display: block !important;
  }
}

/* A shorter, more focused hero with a clearer view of the dunes. */
#home.hero-gradient {
  min-height: 84svh !important;
  max-height: 860px;
  padding-top: 4.5rem;
  background: #4d2f24;
}

#home > .absolute.inset-0 > img {
  opacity: 0.78 !important;
  object-position: center 72% !important;
  transform: scale(1.25);
  transform-origin: center 72%;
}

#home > .absolute.inset-0.bg-black {
  background: linear-gradient(
    180deg,
    rgba(20, 11, 8, 0.18) 0%,
    rgba(20, 11, 8, 0.36) 48%,
    rgba(20, 11, 8, 0.66) 100%
  ) !important;
  opacity: 1 !important;
}

#home h1 {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.72);
}

#home h1 + p {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
}

@media (max-width: 767px) {
  #home.hero-gradient {
    min-height: 78svh !important;
    max-height: 690px;
    padding-top: 4rem;
  }

  #home > .absolute.inset-0 > img {
    object-position: 58% 72% !important;
    transform: scale(1.08);
  }

  #home h1 {
    font-size: clamp(2.45rem, 12vw, 3.35rem);
    line-height: 1.03;
    margin-bottom: 1.25rem;
  }

  #home h1 + p {
    font-size: 1.08rem;
    line-height: 1.45;
    margin-bottom: 1.5rem;
  }

  #home a.touch-target {
    max-width: 315px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }

  #home .absolute.bottom-10 {
    bottom: 1.25rem;
  }
}

/* Give the editorial guide cards the same visual richness as the attraction
   and activity cards. */
#guias > .container > .grid .card-hover {
  background-position: center;
  background-size: cover;
  isolation: isolate;
}

#guias > .container > .grid > :nth-child(1) .card-hover {
  background-image: url("/images/StargazingSkyCanarias.jpg");
}

#guias > .container > .grid > :nth-child(2) .card-hover {
  background-image: url("/images/ferry-routes.webp");
}

#guias > .container > .grid > :nth-child(3) .card-hover {
  background-image: url("/images/papas-arrugadas-mojo.png");
}

#guias > .container > .grid > :nth-child(4) .card-hover {
  background-image: url("/images/Dunas_de_Maspalomas.jpg");
}

#guias > .container > .grid > :nth-child(5) .card-hover {
  background-image: url("/images/hero-car-rental-canary-islands.webp");
}

#guias > .container > .grid > :nth-child(6) .card-hover {
  background-image: url("/images/ccmoganmall.webp");
}

#guias > .container > .grid > :nth-child(7) .card-hover {
  background-image: url("/images/KidsGranCanaria.jpg");
}

#guias > .container > .grid .card-hover > .absolute.inset-0:first-child {
  z-index: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 15, 28, 0.04) 8%,
    rgba(8, 15, 28, 0.4) 50%,
    rgba(8, 15, 28, 0.92) 100%
  ) !important;
}

#guias > .container > .grid .card-hover > .absolute.inset-0.bg-black {
  z-index: 0;
  background: transparent !important;
  opacity: 1 !important;
}

#guias > .container > .grid .card-hover > .relative {
  z-index: 2;
}

#guias > .container > .grid .card-hover h3,
#guias > .container > .grid .card-hover p {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

/* The remaining partner links work better as a compact resource strip than a
   full promotional section. */
#partners {
  padding-top: 1.25rem !important;
  padding-bottom: 1.25rem !important;
  border-top: 1px solid #e5e7eb;
}

#partners > .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
}

#partners h3 {
  flex: 0 0 auto;
  margin: 0 !important;
  color: #6b7280;
  font-size: 0.75rem !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#partners .grid {
  display: flex !important;
  gap: 0.75rem !important;
}

#partners .grid > div > a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

#partners .grid i {
  margin: 0 !important;
  font-size: 1rem !important;
}

#partners .grid h4 {
  margin: 0 !important;
  font-size: 0.82rem !important;
  white-space: nowrap;
}

#partners .grid p {
  display: none;
}

@media (max-width: 640px) {
  #partners > .container {
    flex-direction: column;
    gap: 0.65rem;
  }

  #partners .grid {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Four cards across on wide screens; the final two cards form a centered row. */
#atracciones {
  padding-top: 4.5rem !important;
  padding-bottom: 3.5rem !important;
}

#attractions-grid {
  align-items: stretch;
}

#attractions-grid > * {
  min-width: 0;
}

#attractions-grid .card-hover {
  min-height: 320px !important;
}

@media (min-width: 1200px) {
  #attractions-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 1.5rem !important;
  }

  #attractions-grid > :nth-last-child(2):nth-child(4n + 1) {
    grid-column: 2;
  }
}

@media (max-width: 767px) {
  #atracciones {
    padding-top: 3.5rem !important;
    padding-bottom: 2.75rem !important;
  }

  #attractions-grid {
    gap: 1.25rem !important;
  }

  #attractions-grid .card-hover {
    min-height: 310px !important;
  }
}

/* Turn the activity tiles into image-led editorial cards while preserving all
   current content and links. */
#actividades {
  padding-top: 4.5rem !important;
  padding-bottom: 4.5rem !important;
}

#actividades .grid > * {
  position: relative;
  display: flex;
  min-height: 300px;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background-position: center;
  background-size: cover;
  color: #fff;
  isolation: isolate;
}

#actividades .grid > :nth-child(1) {
  background-image: url("/images/senderismo.webp");
}

#actividades .grid > :nth-child(2) {
  background-image: url("/images/playadeamadores.webp");
}

#actividades .grid > :nth-child(3) {
  background-image: url("/images/StargazingSkyCanarias.jpg");
}

#actividades .grid > :nth-child(4) {
  background-image: url("/images/family-poema-del-mar.webp");
}

#actividades .grid > :nth-child(5) {
  background-image: url("/images/maspalomas-hero.webp");
  background-position: 58% center;
}

#actividades .grid > :nth-child(6) {
  background-image: url("/images/las-canteras-bengt-nyman.jpg");
  background-position: center;
}

#actividades .grid > :nth-child(7) {
  grid-column: 1 / -1;
  background-image: url("/images/stargazing-roque-nublo.webp");
  background-position: center 62%;
}

@media (min-width: 1280px) {
  #actividades .grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  #actividades .grid > * {
    grid-column: span 2;
  }

  #actividades .grid > :nth-child(5) {
    grid-column: 2 / span 2;
  }

  #actividades .grid > :nth-child(6) {
    grid-column: 4 / span 2;
  }

  #actividades .grid > :nth-child(7) {
    grid-column: 6 / span 2;
  }
}

#actividades .grid > *::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 15, 28, 0.08) 12%,
    rgba(8, 15, 28, 0.58) 58%,
    rgba(8, 15, 28, 0.92) 100%
  );
  content: "";
  transition: background 0.3s ease;
}

#actividades .grid > *:hover::before {
  background: linear-gradient(
    180deg,
    rgba(8, 15, 28, 0.02) 5%,
    rgba(8, 15, 28, 0.48) 54%,
    rgba(8, 15, 28, 0.9) 100%
  );
}

#actividades .grid > a::after {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  color: #fff;
  content: "→";
  font-size: 1.05rem;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
  backdrop-filter: blur(8px);
}

#actividades .grid > a:hover::after,
#actividades .grid > a:focus-visible::after {
  background: rgba(234, 88, 12, 0.92);
  transform: translateX(0.15rem);
}

#actividades .grid > * > i {
  display: inline-grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.54);
  color: #fff !important;
  backdrop-filter: blur(8px);
}

#actividades .grid h3,
#actividades .grid p,
#actividades .grid a {
  color: #fff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.72);
}

#actividades .grid .activity-card-cta {
  color: #fff !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25rem;
}

#actividades .grid a:not([class*="bg-white"]) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25rem;
}

@media (max-width: 767px) {
  #actividades {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }

  #actividades .grid > * {
    min-height: 280px;
  }
}
