/*
Theme Name: Mac Apps Theme
Theme URI: https://macappdown.com
Description: Production-ready RTL Arabic theme for a Mac apps download site. App Store Light design, SEO-first, speed-optimized.
Author: Mounir Toumi
Version: 2.0
Text Domain: mac-theme
*/

/* ============================================================
   Design tokens — App Store Light
   ============================================================ */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --text: #1d1d1f;
  --text-2: #515154;
  --text-3: #6e6e73; /* AA contrast on white — #86868b was 3.9:1, below the 4.5:1 minimum */
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-tint: #eaf2fd;
  --accent-press: #006edb;
  --border: #e3e3e8;
  --border-2: #d2d2d7;
  --radius: 20px;
  --radius-sm: 10px;
  --radius-pill: 980px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow: 0 6px 20px rgba(0, 0, 0, .06);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, .10);
  --container: 1080px;
  --header-h: 56px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
          "Tajawal", "Cairo", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
}

/* ============================================================
   Reset & base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }

::selection { background: var(--accent-tint); }

/* Accessibility helpers */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: -9999px; top: 0; z-index: 1000;
  background: var(--accent); color: #fff; padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.skip-link:focus { inset-inline-start: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ============================================================
   Layout
   ============================================================ */
.container { max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.main { padding-block: 28px 48px; min-height: 60vh; }

/* ============================================================
   Site header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex; align-items: center; gap: 18px;
  height: var(--header-h);
  max-width: var(--container); margin-inline: auto; padding-inline: 20px;
}
.site-logo {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 19px; font-weight: 700; color: var(--text);
  letter-spacing: -.02em; white-space: nowrap; flex-shrink: 0;
}
.site-logo:hover { text-decoration: none; }
.site-logo:hover .site-logo__mark { transform: translateY(1px); }
.site-logo__mark {
  flex-shrink: 0; border-radius: 8.5px;
  box-shadow: 0 2px 8px rgba(0, 113, 227, .32);
  transition: transform .18s ease;
}
.site-logo__arrow {
  transform-box: fill-box; transform-origin: center;
  animation: dlbounce 3.2s ease-in-out infinite;
}
@keyframes dlbounce {
  0%, 55%, 100% { transform: translateY(0); }
  68% { transform: translateY(-2px); }
  82% { transform: translateY(2.5px); }
  92% { transform: translateY(0); }
}
.site-logo__text {
  display: flex; flex-direction: column; align-items: flex-start;
  line-height: 1.05; gap: 1px;
}
.site-logo__name { font-size: 19px; }
.site-logo__sub {
  font-size: 10.5px; font-weight: 600; letter-spacing: .12em; word-spacing: .1em;
  color: var(--text-2); opacity: .92;
}
.site-logo__sub b { color: var(--accent); font-weight: 700; }
.site-logo b { color: var(--accent); font-weight: 700; }

.site-nav { display: flex; gap: 22px; margin-inline-start: auto; }
.site-nav a { color: var(--text-2); font-size: 14px; font-weight: 500; }
.site-nav a:hover { color: var(--text); text-decoration: none; }

/* Search */
.search-form {
  display: flex; align-items: center; gap: 8px; flex: 1; max-width: 340px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 7px 14px;
  transition: border-color .15s, background .15s;
}
.search-form:focus-within { background: #fff; border-color: var(--border-2); }
.search-form svg { width: 16px; height: 16px; color: var(--text-3); flex-shrink: 0; }
.search-form input {
  border: 0; background: transparent; width: 100%;
  font: inherit; font-size: 14px; color: var(--text); outline: none;
}
.search-form input::placeholder { color: var(--text-3); }

/* ============================================================
   Breadcrumb
   ============================================================ */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 13px; color: var(--text-3); margin-bottom: 22px; }
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.breadcrumb svg { width: 14px; height: 14px; opacity: .6; }
.breadcrumb [aria-current] { color: var(--text); }

/* ============================================================
   Page heading (archive)
   ============================================================ */
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 28px; }
.page-head p { color: var(--text-2); font-size: 15px; margin-top: 4px; }

/* ============================================================
   App grid (archive / home)
   ============================================================ */
/* ── Categories browse ── */
.cat-section { margin-bottom: 36px; }
.cat-section__title { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 14px; letter-spacing: -.01em; }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.cat-card {
  position: relative; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 14px 16px;
  background: linear-gradient(135deg, var(--cat-from) 0%, var(--cat-to) 100%);
  border-radius: var(--radius); aspect-ratio: 3/2;
  text-decoration: none;
  transition: transform .22s ease, filter .22s ease;
}
.cat-card:hover { transform: scale(1.035); filter: brightness(1.07); text-decoration: none; }
.cat-card__icon {
  position: absolute; top: 4px; inset-inline-end: -2px;
  font-size: 112px; line-height: 1;
  transform: rotate(12deg) translateY(0);
  user-select: none; pointer-events: none;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.22));
}
.cat-card__name {
  font-size: 14px; font-weight: 700; color: #fff; line-height: 1.3;
  text-shadow: 0 1px 6px rgba(0,0,0,.3);
  position: relative; z-index: 1;
}

/* ── Essentials section ── */
.essentials {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px; margin-bottom: 32px;
}
.essentials__head { margin-bottom: 4px; }
.essentials__label {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 4px;
}
.essentials__title { font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -.02em; }
.essentials__list { display: flex; flex-direction: column; margin-top: 8px; }
.essentials__item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 0; border-top: 1px solid var(--border);
  text-decoration: none; color: inherit;
}
.essentials__item:first-child { border-top: none; }
.essentials__icon {
  width: 58px; height: 58px; border-radius: 13px; object-fit: cover;
  flex-shrink: 0; border: 1px solid var(--border); background: var(--surface-2);
}
.essentials__icon--empty { display: block; }
.essentials__info { flex: 1; min-width: 0; }
.essentials__name {
  display: block; font-size: 15px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.essentials__tagline {
  display: block; font-size: 13px; color: var(--text-3); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.essentials__item:hover .essentials__name { color: var(--accent); }
.btn-view {
  display: inline-block; font-size: 13px; font-weight: 700;
  background: var(--accent-tint); color: var(--accent);
  padding: 6px 18px; border-radius: var(--radius-pill); flex-shrink: 0;
}

/* ── App grid ── */
.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .app-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .app-grid { grid-template-columns: 1fr; } }

/* ── Editorial app card ── */
.app-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 3/4; background: #1a1a1f;
  border: 5px solid var(--cat-from, rgba(255,255,255,.15));
}
.app-card__link {
  display: block; position: absolute; inset: 0; color: #fff; text-decoration: none;
}
.app-card__bg {
  position: absolute; inset: 0;
  background: #2a2a30 center/cover no-repeat;
  transition: transform .35s ease;
}
.app-card__bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    transparent 0%,
    transparent 58%,
    var(--cat-to, rgba(0,0,0,.6)) 82%,
    var(--cat-to, rgba(0,0,0,.95)) 100%
  );
}
.app-card:hover .app-card__bg { transform: scale(1.04); }
.app-card__overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  padding: 14px; z-index: 1;
}
.app-card__badge {
  position: absolute; top: 0; left: 0;
  font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  background: var(--cat-from, rgba(255,255,255,.3));
  color: #fff; padding: 5px 12px;
  border-radius: 0 0 var(--radius-sm) 0;
}
.app-card__body { margin-top: auto; margin-bottom: 12px; }
.app-card__title {
  font-size: 19px; font-weight: 700; color: #fff; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.app-card__tagline {
  font-size: 13px; color: rgba(255,255,255,.85); margin-top: 5px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.app-card__foot {
  display: flex; align-items: center; gap: 10px;
  background: var(--cat-to, rgba(0,0,0,.75));
  margin: 10px -16px -16px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.18);
}
.app-card__icon {
  width: 36px; height: 36px; border-radius: 8px; object-fit: cover;
  flex-shrink: 0; border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.35), 0 0 0 1.5px rgba(255,255,255,.35);
}
.app-card__appname {
  flex: 1; min-width: 0; font-size: 12px; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-card__appname small { font-weight: 400; opacity: .7; margin-inline-start: 4px; }
.btn-get {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.92); color: var(--accent); font-size: 12px; font-weight: 700;
  padding: 6px 14px; border-radius: var(--radius-pill); flex-shrink: 0;
  transition: background .15s;
}
.btn-get svg { width: 12px; height: 12px; }
.app-card__link:hover .btn-get { background: #fff; }

/* ============================================================
   Single app — hero
   ============================================================ */
.app-hero {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: none;
}
.app-hero__backdrop {
  position: absolute; inset: 0;
  background-image: var(--hero-icon, none);
  background-size: cover; background-position: center;
  filter: blur(72px) saturate(2.4);
  transform: scale(1.3);
  opacity: .28;
}
.app-hero__inner {
  position: relative; z-index: 1;
  display: flex; gap: 22px; align-items: flex-start;
  padding: 28px 28px 22px;
}
.app-hero__icon {
  width: 120px; height: 120px; border-radius: 26px; object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 8px 28px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.06);
}
.app-hero__body { flex: 1; min-width: 0; }
.app-hero__title { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.app-hero__dev { color: var(--text-2); font-size: 14px; margin-top: 4px; }
.app-hero__dev a { color: var(--accent); }
.app-hero__free { font-size: 13px; color: var(--text-3); margin-top: 3px; margin-bottom: 16px; }
.btn-download {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 600;
  padding: 11px 26px; border-radius: var(--radius-pill);
  box-shadow: 0 4px 14px rgba(0, 113, 227, .28);
  transition: background .15s, transform .12s;
}
.btn-download:hover { background: var(--accent-hover); text-decoration: none; transform: translateY(-1px); }
.btn-download:active { transform: translateY(0); background: var(--accent-press); }
.btn-download svg { width: 17px; height: 17px; }

/* ============================================================
   Stats strip (replaces quick facts)
   ============================================================ */
.app-stats {
  display: flex; overflow-x: auto; scrollbar-width: none;
  background: var(--surface); border: 1px solid var(--border);
  border-top: 1px solid var(--border-2);
  border-radius: 0 0 var(--radius) var(--radius);
  margin-bottom: 28px;
}
.app-stats::-webkit-scrollbar { display: none; }
.app-stat {
  flex: 1; min-width: 80px;
  padding: 13px 14px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  border-inline-end: 1px solid var(--border);
}
.app-stat:last-child { border-inline-end: none; }
.app-stat__label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-3); white-space: nowrap;
}
.app-stat__value {
  font-size: 13px; font-weight: 600; color: var(--text); text-align: center; white-space: nowrap;
}
.app-stat__value a { color: var(--accent); }

/* ============================================================
   Content sections (single page — borderless, separator style)
   ============================================================ */
.app-section { margin-bottom: 8px; padding: 22px 0; border-top: 1px solid var(--border); }
.app-section:first-of-type { border-top: none; }
.app-section > h2 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 16px; color: var(--text); }
.section__body { color: var(--text); font-size: 15.5px; line-height: 1.75; }
.section__body p { margin-bottom: 12px; }
.section__body p:last-child { margin-bottom: 0; }
.section__body ul { padding-inline-start: 22px; }
.section__body li { margin-bottom: 6px; }

/* What's New card — featured latest release */
.whats-new-card {
  background: var(--accent-tint); border-radius: var(--radius-sm);
  border-inline-start: 3px solid var(--accent);
  padding: 16px 20px; margin-bottom: 16px;
}
.whats-new-card__meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.whats-new-card__ver {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  background: var(--accent); color: #fff; padding: 2px 9px; border-radius: var(--radius-pill);
}
.whats-new-card__date { font-size: 12px; color: var(--text-3); }
.whats-new-card__notes { font-size: 14.5px; color: var(--text); line-height: 1.65; }
.whats-new-card__notes p { margin-bottom: 8px; }
.whats-new-card__notes p:last-child { margin-bottom: 0; }

/* Legacy .section — kept for any remaining usages */
.section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px; }
.section > h2 { font-size: 13px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }

/* Requirements list */
.req-list { list-style: none; display: grid; gap: 8px; }
.req-list li { display: flex; align-items: flex-start; gap: 9px; font-size: 14.5px; color: var(--text); }
.req-list svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; margin-top: 4px; }

/* ============================================================
   Screenshots
   ============================================================ */
.shots { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.shots img {
  height: 260px; width: auto; border-radius: var(--radius-sm);
  border: 1px solid var(--border); flex-shrink: 0; scroll-snap-align: start;
  cursor: zoom-in; background: var(--surface-2);
}

/* ============================================================
   Changelog (version history)
   ============================================================ */
.changelog { display: grid; gap: 18px; }
.changelog__item { border-inline-start: 2px solid var(--border-2); padding-inline-start: 16px; }
.changelog__head { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.changelog__ver { background: var(--accent-tint); color: var(--accent); font-size: 12.5px; font-weight: 600; padding: 2px 11px; border-radius: var(--radius-pill); }
.changelog__date { font-size: 12px; color: var(--text-3); }
.changelog__notes { font-size: 14.5px; color: var(--text-2); }
.changelog__notes ul { padding-inline-start: 20px; }
.changelog__notes li { margin-bottom: 4px; }

/* ============================================================
   Downloads
   ============================================================ */
.dl-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 12px; }
.dl-group__label { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.dl-group__label svg { width: 17px; height: 17px; color: var(--text-3); }
.dl-hosts { display: flex; flex-wrap: wrap; gap: 10px; }
.dl-host {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--host, var(--accent)); border: 1px solid var(--host, var(--accent)); color: #fff;
  font-size: 13.5px; font-weight: 500; padding: 9px 18px; border-radius: var(--radius-sm);
  transition: filter .15s;
}
.dl-host svg { width: 17px; height: 17px; color: #fff; }
.dl-host:hover { filter: brightness(1.1); text-decoration: none; }
.dl-host--primary { font-weight: 600; }

/* ── Lightbox (screenshots) ── */
.lightbox {
  position: fixed; inset: 0; z-index: 9999; background: rgba(0, 0, 0, .85);
  display: flex; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out;
}
.lightbox__img {
  max-width: 94vw; max-height: 88vh; width: auto; height: auto;
  object-fit: contain; border-radius: 10px; box-shadow: 0 16px 50px rgba(0, 0, 0, .5); cursor: default;
}
.lightbox__close {
  position: absolute; top: 16px; inset-inline-end: 16px;
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.lightbox__close:hover { background: rgba(255, 255, 255, .26); }
@media (max-width: 480px) {
  .lightbox__img { max-width: 96vw; max-height: 82vh; }
  .lightbox__close { top: 10px; inset-inline-end: 10px; }
}

/* ============================================================
   Related apps
   ============================================================ */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.related-card { text-align: center; }
.related-card img { width: 56px; height: 56px; border-radius: 13px; margin-inline: auto; margin-bottom: 8px; border: 1px solid var(--border); background: var(--surface-2); }
.related-card span { font-size: 12.5px; color: var(--text-2); display: block; line-height: 1.4; }
.related-card:hover span { color: var(--accent); }

/* ── Recommended accessories (disclosed affiliate) ── */
.aff__disclosure {
  font-size: 12.5px; color: var(--text-3); margin: -6px 0 16px;
  display: flex; align-items: center; gap: 6px;
}
.aff__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.aff__card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px; text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.aff__card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-2); text-decoration: none; }
.aff__img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 10px;
}
.aff__title { font-size: 13px; color: var(--text-2); line-height: 1.45; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.aff__price { font-size: 14px; font-weight: 700; color: var(--text); margin-top: 8px; direction: ltr; text-align: start; }

/* ============================================================
   Pagination
   ============================================================ */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 36px; }
.pagination a, .pagination span {
  min-width: 40px; text-align: center; padding: 8px 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-2); font-weight: 500;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 40px; }
.site-footer__cols {
  max-width: var(--container); margin-inline: auto; padding: 36px 20px 28px;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px;
}
.site-footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.site-footer__logo { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.site-footer__logo b { color: var(--accent); }
.site-footer__brand p { font-size: 13px; color: var(--text-3); max-width: 320px; }
.site-footer__follow { font-weight: 600; color: var(--text-2) !important; margin-top: 4px; }
.site-footer__social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2px; }

/* ============================================================
   Follow-for-updates CTA (single app page + home)
   ============================================================ */
.follow-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
  background: var(--accent-tint); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 22px; margin: 28px 0;
}
.follow-cta__text { display: flex; flex-direction: column; gap: 3px; }
.follow-cta__text strong { font-size: 16px; color: var(--text); }
.follow-cta__text span { font-size: 13.5px; color: var(--text-2); }
.follow-cta__btns { display: flex; gap: 10px; flex-shrink: 0; }
@media (max-width: 540px) {
  .follow-cta { padding: 16px; }
  .follow-cta__btns { width: 100%; }
  .follow-cta__btns .tg-btn, .follow-cta__btns .x-btn { flex: 1; justify-content: center; }
}
.site-footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.site-footer__col h3 { font-size: 13px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.site-footer__col a { font-size: 14px; color: var(--text-2); }
.site-footer__col a:hover { color: var(--accent); text-decoration: none; }
.site-footer__inner { max-width: var(--container); margin-inline: auto; padding: 28px 20px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.site-footer__bottom { border-top: 1px solid var(--border); padding-block: 16px; }
.site-footer p { font-size: 13px; color: var(--text-3); }
.site-footer nav { display: flex; gap: 20px; }
.site-footer .site-footer__col { display: flex; flex-direction: column; gap: 8px; }
.site-footer nav a { font-size: 13px; color: var(--text-2); }
@media (max-width: 768px) {
  .site-footer__cols { grid-template-columns: 1fr; gap: 24px; }
}

/* ============================================================
   Header actions — Telegram + dark-mode toggle
   ============================================================ */
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.tg-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #229ED9; color: #fff; font-size: 13px; font-weight: 600;
  padding: 6px 13px; border-radius: var(--radius-pill); white-space: nowrap;
}
.tg-btn:hover { background: #1e8dc2; color: #fff; text-decoration: none; }
.tg-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.x-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #000; color: #fff; font-size: 13px; font-weight: 600;
  padding: 6px 13px; border-radius: var(--radius-pill); white-space: nowrap;
}
.x-btn:hover { background: #222; color: #fff; text-decoration: none; }
.x-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
:root[data-theme="dark"] .x-btn { background: #fff; color: #000; }
:root[data-theme="dark"] .x-btn:hover { background: #e8e8e8; color: #000; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-2); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }
@media (max-width: 768px) {
  .tg-btn span { display: none; }
  .tg-btn { padding: 8px; }
}

/* ============================================================
   Static pages (About / Privacy / DMCA …)
   ============================================================ */
.static-page { max-width: 760px; margin-inline: auto; }
.static-page__body {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 26px; font-size: 15.5px;
}
.static-page__body h2 { font-size: 19px; margin: 22px 0 8px; }
.static-page__body h2:first-child { margin-top: 0; }
.static-page__body p { margin-bottom: 12px; }
.static-page__body ul { padding-inline-start: 22px; margin-bottom: 12px; }

/* ============================================================
   Dark theme — App Store Dark. Toggled via <html data-theme="dark">
   (set pre-paint in header.php; user choice persisted in localStorage).
   ============================================================ */
:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #98989d;
  --accent: #0a84ff;
  --accent-hover: #409cff;
  --accent-tint: #102a43;
  --accent-press: #0977e6;
  --border: #38383a;
  --border-2: #48484a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow: 0 6px 20px rgba(0, 0, 0, .45);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, .55);
}
:root[data-theme="dark"] .site-header {
  background: rgba(28, 28, 30, .82);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .app-hero__inner { gap: 16px; padding: 20px 20px 16px; }
  .app-hero__icon { width: 88px; height: 88px; border-radius: 20px; }
  .app-hero__title { font-size: 22px; }
  .site-nav { display: none; }
  .search-form { max-width: none; }
}
@media (max-width: 480px) {
  .app-hero__inner { flex-direction: column; }
  .btn-download { width: 100%; justify-content: center; }
  .shots img { height: 180px; }
  .app-stats { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
