/* PORTAL WEB AC LOCAL v0.3.7 — refinament de centrats i proporcions */

/* 1) Hero: centra sempre el botó Descobreix el portal */
.hero-scroll-cue {
  left: 50%;
  right: auto;
  translate: none;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 0;
  justify-content: center;
  text-align: center;
}

.hero-scroll-cue:hover,
.hero-scroll-cue:focus-visible {
  transform: translateX(-50%) translateY(-4px);
}

/* 2) Carrusel: difuminat molt més fort per amagar millor el tall */
.media-carousel::before,
.media-carousel::after {
  width: clamp(96px, 11vw, 160px);
}

.media-carousel::before {
  left: 42px;
  background: linear-gradient(
    90deg,
    #f7fafc 0%,
    #f7fafc 42%,
    rgba(247, 250, 252, 0.96) 56%,
    rgba(247, 250, 252, 0.72) 72%,
    rgba(247, 250, 252, 0.28) 88%,
    rgba(247, 250, 252, 0) 100%
  );
}

.media-carousel::after {
  right: 42px;
  background: linear-gradient(
    270deg,
    #f7fafc 0%,
    #f7fafc 42%,
    rgba(247, 250, 252, 0.96) 56%,
    rgba(247, 250, 252, 0.72) 72%,
    rgba(247, 250, 252, 0.28) 88%,
    rgba(247, 250, 252, 0) 100%
  );
}

.media-viewport {
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.10) 4%,
    rgba(0, 0, 0, 0.82) 14%,
    #000000 24%,
    #000000 76%,
    rgba(0, 0, 0, 0.82) 86%,
    rgba(0, 0, 0, 0.10) 96%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.10) 4%,
    rgba(0, 0, 0, 0.82) 14%,
    #000000 24%,
    #000000 76%,
    rgba(0, 0, 0, 0.82) 86%,
    rgba(0, 0, 0, 0.10) 96%,
    transparent 100%
  );
}

/* 3) Programa: mateixa alçada a dalt i a baix + CTA més potent */
@media (min-width: 901px) {
  .program-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 392px;
    align-items: stretch;
  }

  .program-card {
    height: 392px;
    min-height: 392px;
  }

  .program-card-content {
    min-height: 100%;
    padding: 30px 28px 30px;
  }

  .program-card h3 {
    font-size: calc(clamp(1.08rem, 1.55vw, 1.46rem) + var(--ac-font-increase));
  }

  .program-card p {
    max-width: 338px;
    font-size: calc(0.74rem + var(--ac-font-increase));
    line-height: 1.42;
  }

  .program-card-visual {
    width: min(35%, 212px);
    right: clamp(16px, 1.8vw, 24px);
  }
}

.center-action {
  margin-top: 40px;
}

.program-full-button {
  position: relative;
  min-width: 360px;
  min-height: 74px;
  padding: 18px 40px;
  border-radius: 16px;
  font-size: calc(1.04rem + var(--ac-font-increase));
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #11548b 0%, #0a3b66 100%);
  color: #ffffff;
  box-shadow:
    0 24px 46px rgba(5, 42, 76, 0.22),
    0 8px 16px rgba(5, 42, 76, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.program-full-button::before {
  content: "";
  position: absolute;
  top: -30%;
  left: -18%;
  width: 28%;
  height: 170%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: translateX(-180%) rotate(18deg);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.program-full-button:hover::before,
.program-full-button:focus-visible::before {
  transform: translateX(540%) rotate(18deg);
}

.program-full-button:hover,
.program-full-button:focus-visible {
  transform: translateY(-5px) scale(1.02);
  box-shadow:
    0 30px 56px rgba(5, 42, 76, 0.28),
    0 10px 18px rgba(5, 42, 76, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

@media (max-width: 900px) {
  .hero-scroll-cue {
    max-width: calc(100% - 24px);
  }

  .media-carousel::before {
    left: 16px;
  }

  .media-carousel::after {
    right: 16px;
  }

  .media-carousel::before,
  .media-carousel::after {
    width: clamp(64px, 12vw, 108px);
  }

  .program-full-button {
    min-width: 290px;
    min-height: 66px;
    padding: 16px 28px;
    font-size: calc(0.96rem + var(--ac-font-increase));
  }
}
