/* =========================================================================
   BiblePro — Download section (all 7 platform options)
   Uses the design tokens defined in styles.css (:root). Loaded after
   styles.css so it can rely on those variables.
   ========================================================================= */

/* Hero "available for…" becomes a jump link to the download grid */
.hero-avail-link {
  color: var(--snow-2);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.hero-avail-link:hover { color: var(--snow); border-bottom-color: var(--snow-3); }
.hero-avail-link b { color: var(--snow); }

/* Grid of platform cards */
.download-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 36px;
}
@media (max-width: 1000px) { .download-grid { grid-template-columns: repeat(2, 1fr); } }
/* Phones: keep TWO cards per row (compact) instead of one giant card per row.
   minmax(0,1fr) lets the tracks shrink below the button's min-content width
   (otherwise the long "Microsoft Store" label would blow out the grid).
   NB: the per-card / per-button tightening lives at the END of this file so it
   sits AFTER the base .dl-btn rule and actually wins the cascade. */
@media (max-width: 560px) {
  .download-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: none; margin-top: 28px; }
}
@media (max-width: 360px) {
  .dl-card { padding: 16px 8px; }
  .dl-btn { font-size: .72rem; }
}

.dl-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.dl-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-2); }

.dl-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.dl-head h3 { margin: 0; font-size: 1.12rem; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.dl-ico {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 13px;
  background: var(--peach);
  color: var(--orange);
  display: grid; place-items: center;
}
.dl-ico svg { width: 24px; height: 24px; }

/* Download buttons inside a card */
.dl-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 13px;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.dl-btn-ico { display: inline-flex; }
.dl-btn-ico svg { width: 20px; height: 20px; display: block; }

.dl-btn.primary { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }
.dl-btn.primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: #0a1322; }

.dl-btn.ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.dl-btn.ghost:hover { transform: translateY(-2px); border-color: var(--orange); color: var(--orange-deep); }
.dl-btn.ghost .dl-btn-ico svg { stroke: currentColor; }

/* Keyboard focus gets the same emphasis as hover */
.dl-btn.primary:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-md); background: #0a1322; }
.dl-btn.ghost:focus-visible { transform: translateY(-2px); border-color: var(--orange); color: var(--orange-deep); }

.dl-note { margin: 2px 0 0; font-size: .82rem; color: var(--ink-3); text-align: center; }

/* Footer of the download section */
.dl-foot { text-align: center; margin-top: 34px; }
.dl-foot .btn { display: inline-flex; }
.dl-disclaimer {
  max-width: 620px;
  margin: 16px auto 0;
  font-size: .84rem;
  line-height: 1.6;
  color: var(--ink-3);
}

/* Complex-script locales: give Thai/Burmese a touch more line-height for legibility */
.locale-th .dl-card, .locale-my .dl-card,
.locale-th .dl-disclaimer, .locale-my .dl-disclaimer { line-height: 1.7; }

/* =========================================================================
   Social / community section
   ========================================================================= */
.social-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 36px;
}
@media (max-width: 900px) { .social-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .social-grid { grid-template-columns: repeat(2, 1fr); } }

.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 26px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--ink);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.social-card-ico {
  width: 54px; height: 54px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: var(--paper-3);
  transition: background .3s var(--ease), color .3s var(--ease);
}
.social-card-ico svg { width: 27px; height: 27px; display: block; }
.social-card-name { font-weight: 800; font-size: 1rem; letter-spacing: -.01em; }
.social-card-handle { font-size: .82rem; color: var(--ink-3); transition: color .3s var(--ease); }

/* Brand-colored icons at rest */
.social-card.fb .social-card-ico { color: #1877F2; }
.social-card.ig .social-card-ico { color: #DD2A7B; }
.social-card.yt .social-card-ico { color: #FF0000; }
.social-card.tt .social-card-ico { color: #111418; }
.social-card.x  .social-card-ico { color: #111418; }

/* Lift + flood with the brand colour on hover/focus */
.social-card:hover, .social-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  color: #fff;
  border-color: transparent;
}
.social-card:hover .social-card-handle, .social-card:focus-visible .social-card-handle { color: rgba(255, 255, 255, .85); }
.social-card:hover .social-card-ico, .social-card:focus-visible .social-card-ico { background: rgba(255, 255, 255, .18); color: #fff; }

.social-card.fb:hover, .social-card.fb:focus-visible { background: #1877F2; }
.social-card.ig:hover, .social-card.ig:focus-visible { background: linear-gradient(45deg, #F58529, #DD2A7B 45%, #8134AF 75%, #515BD4); }
.social-card.yt:hover, .social-card.yt:focus-visible { background: #FF0000; }
.social-card.tt:hover, .social-card.tt:focus-visible { background: #111418; }
.social-card.x:hover,  .social-card.x:focus-visible  { background: #111418; }

@media (prefers-reduced-motion: reduce) {
  .dl-card, .dl-btn, .social-card, .social-card-ico { transition: background .2s, color .2s, border-color .2s; }
  .dl-card:hover, .dl-btn:hover, .dl-btn:focus-visible,
  .social-card:hover, .social-card:focus-visible { transform: none; }
}

/* =========================================================================
   PHONE download-card tightening — placed at the very end so it overrides the
   base .dl-card / .dl-btn rules above (two-per-row needs smaller everything).
   ========================================================================= */
@media (max-width: 560px) {
  .dl-card { padding: 18px 12px; gap: 9px; border-radius: 16px; }
  .dl-head { gap: 9px; margin-bottom: 2px; }
  .dl-ico { width: 42px; height: 42px; border-radius: 12px; }
  .dl-ico svg { width: 22px; height: 22px; }
  .dl-head h3 { font-size: 1rem; }
  /* The card's big platform icon + title already name the platform, so drop the
     in-button icon and shrink the label. Single line for en/zh store names;
     wraps gracefully (min-height keeps the pair even) for longer th/my labels. */
  .dl-btn {
    padding: 9px 6px; font-size: .76rem; gap: 0; border-radius: 11px;
    white-space: normal; line-height: 1.2; min-height: 44px; text-align: center;
  }
  .dl-btn .dl-btn-ico { display: none; }
  .dl-note { font-size: .74rem; line-height: 1.45; }
}
@media (max-width: 360px) {
  .dl-card { padding: 16px 8px; }
  .dl-btn { font-size: .72rem; }
}
