.official-channels {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  min-block-size: 100vh;
  min-block-size: 100svh;
  padding-block: clamp(96px, 12vh, 114px) clamp(32px, 13.5vh, 116px);
  color: #f6f3ff;
  background:
    radial-gradient(ellipse at 13% 4%, rgba(98, 80, 179, .36), transparent 59%),
    radial-gradient(ellipse at 100% 77%, rgba(154, 101, 79, .17), transparent 58%),
    linear-gradient(153deg, #1c1a43, #141332 64%, #10102c);
}

.official-channels::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: var(--star) center top / 86px;
  opacity: .48;
  -webkit-mask-image: linear-gradient(#000 8%, transparent 96%);
  mask-image: linear-gradient(#000 8%, transparent 96%);
  pointer-events: none;
}

.official-channels-content {
  inline-size: 100%;
  max-inline-size: 868px;
  padding-inline: clamp(14px, 3vw, 24px);
}

.official-channels-intro {
  --intro-gap: clamp(22px, 3.3vh, 32px);
  --title-gradient-angle: 102deg;
  position: relative;
  isolation: isolate;
  max-inline-size: 43rem;
  margin: 0 auto var(--intro-gap);
  text-align: center;
}

.official-channels-intro::before,
.official-channels-intro::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.official-channels-intro::before {
  z-index: -1;
  inset: -1.75rem 0 -1rem;
  background:
    radial-gradient(ellipse 50% 50% at center, rgba(157, 135, 242, .26), transparent),
    radial-gradient(ellipse 33% 48% at 67% 50%, rgba(251, 205, 136, .12), transparent);
}

.official-channels-intro::after {
  inset-inline: 0;
  inset-block-end: calc(var(--intro-gap) / -2);
  inline-size: clamp(68px, 11vw, 116px);
  block-size: 8px;
  margin-inline: auto;
  transform: translateY(50%);
  background:
    radial-gradient(circle, #ffe4b0 45%, transparent 54%) center / 8px 8px no-repeat,
    linear-gradient(90deg, transparent, rgba(247, 213, 138, .58), transparent) center / 100% 1px no-repeat;
}

.official-channels-intro h1 {
  inline-size: fit-content;
  max-inline-size: 100%;
  margin: 0 auto 8px;
  padding-block-end: .04em;
  color: #fffbff;
  font-size: clamp(2.14rem, 4.8vw, 3.95rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.043em;
  text-wrap: balance;
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
  .official-channels-intro h1 {
    background-image: linear-gradient(var(--title-gradient-angle), #fffbff 18%, #f7efff 54%, #ffe4b3 78%, #ffc776 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
  }
}

[dir="rtl"] .official-channels-intro { --title-gradient-angle: 258deg; }

.official-channels-intro h1:lang(ar) {
  line-height: 1.28;
  letter-spacing: normal;
}

.official-channels-intro p {
  max-inline-size: 38rem;
  margin-inline: auto;
  color: #ded7ef;
  font-size: clamp(.94rem, 1.5vw, 1.06rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.official-channels .sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.official-channels-grid {
  --surface-start: 0%;
  --surface-end: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.5vh, 14px);
  padding: clamp(14px, 2vh, 19px);
  border: 1px solid rgba(222, 224, 255, .18);
  border-radius: clamp(26px, 4vw, 38px);
  background:
    radial-gradient(ellipse at var(--surface-start) 0%, rgba(176, 168, 255, .16), transparent 63%),
    radial-gradient(ellipse at var(--surface-end) 100%, rgba(255, 209, 132, .09), transparent 68%),
    linear-gradient(150deg, rgba(255, 255, 255, .09), rgba(209, 202, 245, .035));
  box-shadow: inset 0 1px 0 rgba(242, 235, 255, .16), 0 24px 70px -36px rgba(4, 3, 24, .9);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  backdrop-filter: blur(18px) saturate(135%);
  list-style: none;
}

[dir="rtl"] .official-channels-grid {
  --surface-start: 100%;
  --surface-end: 0%;
}

.official-channels-grid li {
  display: flex;
  min-inline-size: 0;
}

.official-channels-link {
  --channel-rgb: 160 150 211;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  flex: 1;
  min-inline-size: 0;
  min-block-size: clamp(60px, 8.45vh, 72px);
  gap: 12px;
  padding: 8px 13px;
  scroll-margin-block: 84px 16px;
  border: 1px solid rgba(218, 220, 255, .2);
  border-radius: 999px;
  background:
    radial-gradient(ellipse at var(--surface-start) 0%, rgb(var(--channel-rgb) / .19), transparent 68%),
    linear-gradient(155deg, rgba(255, 255, 255, .13), rgba(222, 216, 253, .045));
  box-shadow: inset 0 1px 0 rgba(247, 243, 255, .16), 0 10px 21px -15px rgba(3, 2, 22, .85);
  transition: transform .23s cubic-bezier(.2,.75,.3,1), border-color .23s ease, box-shadow .23s ease;
}

.official-channels-link[data-channel="youtube"] { --channel-rgb: 237 91 127; }
.official-channels-link[data-channel="instagram"] { --channel-rgb: 210 100 187; }
.official-channels-link[data-channel="whatsapp"] { --channel-rgb: 61 180 121; }
.official-channels-link[data-channel="facebook"] { --channel-rgb: 86 145 235; }
.official-channels-link[data-channel="tiktok"] { --channel-rgb: 81 167 200; }
.official-channels-link[data-channel="soundcloud"] { --channel-rgb: 234 145 86; }

.official-channels-link[data-channel="contact"] {
  --channel-rgb: 226 172 94;
  border-color: rgba(246, 206, 141, .34);
}

.official-channels-icon {
  display: block;
  inline-size: clamp(35px, 4.6vh, 38px);
  block-size: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: contain;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .15), 0 8px 17px -9px rgb(var(--channel-rgb) / .6);
}

.official-channels-copy { min-inline-size: 0; }

.official-channels-name {
  display: inline-flex;
  align-items: center;
  max-inline-size: 100%;
  gap: .32em;
  overflow-wrap: anywhere;
  font-size: clamp(.92rem, 1.4vw, 1.06rem);
  font-weight: 700;
  line-height: 1.24;
}

.official-channels-name bdi { font-family: "Quicksand", system-ui, sans-serif !important; }

.official-channels-name::after {
  content: "";
  flex: none;
  inline-size: 17px;
  block-size: 17px;
  background: url("/assets/social-icons/official-check.png") center / contain no-repeat;
}

.official-channels-note {
  display: block;
  margin-block-start: 3px;
  color: #dbd2ea;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.24;
}

.official-channels-arrow {
  display: grid;
  place-items: center;
  inline-size: 30px;
  block-size: 30px;
  border: 1px solid rgba(230, 222, 255, .19);
  border-radius: 50%;
  background: linear-gradient(150deg, rgba(237, 228, 255, .14), rgba(217, 209, 251, .03));
  color: #e7ddf8;
  font-size: .78rem;
  line-height: 1;
  transition: border-color .23s ease, color .23s ease;
}

[dir="rtl"] .official-channels-arrow { transform: scaleX(-1); }

.official-channels-link:focus-visible {
  border-color: #ffdc96;
  outline: 2px solid #ffdc96;
  outline-offset: 3px;
}

@media (hover: hover) {
  .official-channels-link:hover {
    transform: translateY(-2px);
    border-color: rgb(var(--channel-rgb) / .67);
    box-shadow: inset 0 1px 0 rgba(247, 243, 255, .24), 0 14px 25px -14px rgba(3, 2, 22, .86);
  }

  .official-channels-link:hover .official-channels-arrow {
    border-color: rgb(var(--channel-rgb) / .62);
    color: #fff;
  }
}

@media (min-width: 561px) and (max-width: 1080px) and (min-height: 1000px) and (orientation: portrait) {
  .official-channels-content { max-inline-size: 700px; }

  .official-channels-intro h1 { font-size: clamp(2.55rem, 6vw, 3.6rem); }

  .official-channels-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 20px;
  }

  .official-channels-link { min-block-size: clamp(66px, 6vh, 78px); }
}

@media (max-width: 560px) {
  .official-channels {
    align-content: start;
    padding-block: 90px 22px;
    padding-block: clamp(88px, 12svh, 106px) clamp(18px, 3svh, 28px);
  }

  .official-channels-intro { --intro-gap: 19px; }

  .official-channels-intro h1 {
    margin-block-end: 6px;
    font-size: clamp(1.8rem, 8.1vw, 2.25rem);
  }

  .official-channels-intro p {
    max-inline-size: 36ch;
    margin-inline: auto;
    font-size: .9rem;
    line-height: 1.45;
  }

  .official-channels-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    gap: clamp(6px, .85svh, 8px);
    padding: 9px;
  }

  .official-channels-link {
    min-block-size: 48px;
    min-block-size: clamp(48px, 7.25svh, 60px);
    gap: 9px;
    padding: 6px 10px;
  }

  .official-channels-icon {
    inline-size: 32px;
    inline-size: clamp(30px, 4.1svh, 34px);
  }

  .official-channels-arrow {
    inline-size: 26px;
    block-size: 26px;
    font-size: .72rem;
  }
}

@media (forced-colors: active) {
  .official-channels-intro h1 {
    background: none;
    color: CanvasText;
  }
}

@media (prefers-reduced-motion: reduce) {
  .official-channels-link,
  .official-channels-arrow { transition: none; }

  .official-channels-link:hover { transform: none; }
}
