/* ============================================================
   STI ASSETS MANAGEMENT
   DAILY MARKET DIGEST PAGE
============================================================ */


/* ============================================================
   WEEKLY DIGEST SECTION
============================================================ */

.downloads-section {
  width: 100%;
  max-width: none;

  padding: var(--page-section-space) 0;
  background: var(--page-surface);
}

.downloads-shell {
  width: min(calc(100% - 48px), var(--page-shell));
  margin: 0 auto;
}

/* ============================================================
   DIGEST GRID
============================================================ */

.downloads-grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr);

  gap: 18px;

  width: 100%;
}

/* ============================================================
   DIGEST CARD
============================================================ */

.downloads-card {
  position: relative;

  display: flex;
  flex-direction: column;

  min-width: 0;
  min-height: 285px;

  padding: 22px;

  background: #ffffff;

  border:
    1px solid var(--page-line);

  border-radius: var(--page-radius);

  box-shadow:
    0 2px 2px rgba(3, 54, 105, 0.04),
    0 8px 16px -4px rgba(3, 54, 105, 0.06);

  overflow: hidden;

  transition:
    transform 260ms
      cubic-bezier(0.22, 1, 0.36, 1),

    border-color 260ms ease,

    box-shadow 260ms
      cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   DIGEST DAY LABEL
============================================================ */

.downloads-card-header {
  display: flex;
  align-items: center;

  margin-bottom: 30px;
}

.downloads-day {
  display: inline-flex;
  align-items: center;

  min-height: 28px;

  padding:
    6px 11px;

  color: var(--color-primary);

  background:
    rgba(3, 54, 105, 0.06);

  border-radius: 999px;

  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.2;

  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================================
   DIGEST CONTENT
============================================================ */

.downloads-card-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;

  gap: 18px;

  min-width: 0;

  margin-bottom: 28px;
}

.downloads-icon-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 46px;
  height: 46px;

  color: var(--page-navy);

  background:
    rgba(3, 54, 105, 0.06);

  border-radius: var(--page-radius);

  flex: 0 0 auto;
}

.downloads-icon-frame
  .ui-icon {
  width: 22px;
  height: 22px;
}

.downloads-card-copy {
  min-width: 0;
}

.downloads-card-copy h3 {
  margin:
    0 0 8px;

  color: var(--color-primary);

  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.45;

  overflow-wrap: anywhere;
}

.downloads-card-copy p {
  margin: 0;

  color: var(--color-text-muted);

  font-size: 0.82rem;
  line-height: 1.6;
}

/* ============================================================
   DOWNLOAD ACTION
============================================================ */

.downloads-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  width: 100%;

  margin-top: auto;

  padding:
    12px 15px;

  color: #ffffff;

  background: var(--page-navy);

  border:
    1px solid
    var(--page-navy);

  border-radius: var(--page-radius);

  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;

  text-decoration: none;

  transition:
    background-color 240ms ease,

    border-color 240ms ease,

    box-shadow 240ms
      cubic-bezier(0.22, 1, 0.36, 1);
}

.downloads-btn
  .ui-icon {
  width: 18px;
  height: 18px;

  flex: 0 0 auto;

  transition:
    translate 240ms
    cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) {
  .downloads-card.is-available:hover {
    transform: translateY(-4px);

    border-color:
      rgba(3, 54, 105, 0.18);

    box-shadow:
      0 2px 2px rgba(3, 54, 105, 0.05),
      0 8px 16px -4px rgba(3, 54, 105, 0.08),
      0 24px 32px -8px rgba(3, 54, 105, 0.06);
  }

  .downloads-btn:not(.downloads-btn-disabled):hover {
    background: #04477f;
    border-color: #04477f;
    box-shadow: none;
  }

  .downloads-btn:not(.downloads-btn-disabled):hover
    .ui-icon {
    translate: 3px 0;
  }
}

/* ============================================================
   UNAVAILABLE DIGEST
============================================================ */

.downloads-card.is-unavailable {
  background: var(--page-surface-warm);

  border-color:
    rgba(3, 54, 105, 0.065);

  box-shadow: none;
}

.downloads-card.is-unavailable
  .downloads-day {
  color:
    var(--color-text-muted);

  background:
    rgba(91, 107, 120, 0.07);
}

.downloads-icon-frame-muted {
  color: #83919c;

  background:
    rgba(91, 107, 120, 0.075);
}

.downloads-btn-disabled {
  color: #7d8b96;

  background: transparent;

  border:
    1px solid rgba(3, 54, 105, 0.12);

  cursor: default;
}
/* ============================================================
   TABLET
============================================================ */

@media (min-width: 560px) {
  .downloads-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}


@media (min-width: 820px) {
  .downloads-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }
}


/* ============================================================
   DESKTOP
============================================================ */

@media (min-width: 1100px) {
  .downloads-grid {
    grid-template-columns:
      repeat(5, minmax(0, 1fr));
  }

  .downloads-card {
    padding: 20px;

    min-height: 300px;
  }
}
/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 559px) {
  .downloads-section {
    padding:
      64px 16px;
  }
  .downloads-card {
    min-height: 0;

    padding: 20px;

    border-radius: var(--page-radius);
  }

  .downloads-card-header {
    margin-bottom: 24px;
  }

  .downloads-card-content {
    margin-bottom: 24px;
  }
}


@media (max-width: 360px) {
  .downloads-section {
    padding-right: 14px;
    padding-left: 14px;
  }
}
/* ============================================================
   MOBILE
============================================================ */


@media (max-width: 360px) {
  .downloads-section {
    padding-right: 14px;
    padding-left: 14px;
  }
}

/* ============================================================
   DOWNLOADS SCROLL REVEALS
============================================================ */

.downloads-reveal {
  opacity: 0;

  translate:
    0 22px;

  transition:
    opacity 660ms
      cubic-bezier(0.22, 1, 0.36, 1),

    translate 660ms
      cubic-bezier(0.22, 1, 0.36, 1);

  transition-delay:
    var(--reveal-delay, 0ms);

  will-change:
    opacity,
    translate;
}

.downloads-reveal.is-visible {
  opacity: 1;

  translate:
    0 0;
}


/* ============================================================
   DOWNLOADS REVEAL REDUCED MOTION
============================================================ */

@media (prefers-reduced-motion: reduce) {
  .downloads-reveal {
    opacity: 1;

    translate: none;

    transition: none;

    will-change: auto;
  }
}
