/* ==========================================================================
   Studio pages (Home, Apps, About, Contact) - written by tools/build-root.py.
   Builds on custom.css; loaded only by those pages.
   ========================================================================== */

.root-narrow { max-width: 720px; }
.root-band {
  background: linear-gradient(180deg, rgba(13, 21, 39, 0.65) 0%, rgba(8, 12, 20, 0) 100%);
  border-top: 1px solid var(--dhin-border);
  border-bottom: 1px solid var(--dhin-border);
}
[dir="rtl"] .flip-rtl { display: inline-block; transform: scaleX(-1); }

/* ---- navbar (.nav-count lives in custom.css: every page's nav uses it) -- */
.lang-toggle {
  background: transparent;
  border: 0;
}
.lang-menu {
  max-height: min(70vh, 420px);
  overflow-y: auto;
  min-width: 13rem;
}
@media (min-width: 992px) {
  .lang-menu { columns: 2; column-gap: 0; min-width: 22rem; }
  .lang-menu li { break-inside: avoid; }
}

/* ---- hero -------------------------------------------------------------- */
.root-hero { padding-top: 56px; padding-bottom: 64px; }
.root-hero-sm { padding: 48px 0 40px; }
.root-hero-img { max-height: 460px; object-fit: cover; }
.root-hero .hero-title { overflow-wrap: anywhere; }
.root-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--dhin-border);
}
.root-stats div { display: flex; flex-direction: column-reverse; }
.root-stats dt { font-weight: 500; font-size: 0.85rem; color: var(--dhin-text-muted); }
.root-stats dd { margin: 0; font-size: 1.6rem; font-weight: 800; color: #fff; line-height: 1.2; }
.root-crumbs .breadcrumb { font-size: 0.875rem; }
.root-crumbs .breadcrumb-item a { color: var(--dhin-text-muted); text-decoration: none; }
.root-crumbs .breadcrumb-item a:hover { color: #fff; }
.root-crumbs .breadcrumb-item.active { color: #fff; }
.root-crumbs .breadcrumb-item + .breadcrumb-item::before { color: var(--dhin-text-muted); }
.about-logo { max-height: 360px; width: auto; object-fit: contain; }

/* ---- app tiles --------------------------------------------------------- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
@media (max-width: 575.98px) { .app-grid { grid-template-columns: 1fr; } }
.app-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.35rem;
  border-radius: 1.1rem;
  background: var(--dhin-bg-card);
  border: 1px solid var(--dhin-border);
  box-shadow: var(--dhin-shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.app-tile:hover,
.app-tile:focus-within {
  transform: translateY(-3px);
  border-color: var(--dhin-border-glow);
  background: var(--dhin-bg-card-hover);
}
@media (prefers-reduced-motion: reduce) { .app-tile, .app-tile:hover { transition: none; transform: none; } }
.app-tile-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.85rem; }
.app-tile-icon {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.app-tile-title { min-width: 0; }
.app-tile-name { font-size: 1.15rem; font-weight: 700; margin: 0 0 0.1rem; line-height: 1.25; }
.app-tile-name a { color: #fff; text-decoration: none; }
.app-tile-name a:hover { color: var(--dhin-accent-blue); }
.app-tile-kind { margin: 0; font-size: 0.85rem; font-weight: 500; color: var(--dhin-accent-blue); line-height: 1.35; }
.app-tile-blurb {
  color: #b6c2d4;
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 0.9rem;
}
.app-tile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.1rem;
}
.app-tile-meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.app-tile-meta li.is-price {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.28);
}
.app-tile-actions {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--dhin-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.app-tile-store {
  border-radius: 999px;
  padding-inline: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: #0067b8;
  border: 1px solid #0067b8;
}
.app-tile-store:hover, .app-tile-store:focus { color: #fff; background: #0078d4; border-color: #0078d4; }
.app-tile-store.is-play { background: #01875f; border-color: #01875f; }
.app-tile-store.is-play:hover, .app-tile-store.is-play:focus { background: #02a370; border-color: #02a370; }

/* ---- home: categories, stores, CTA ------------------------------------ */
.cat-tile, .store-card {
  display: flex;
  flex-direction: column;
  padding: 1.4rem;
  border-radius: 1.1rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.cat-tile:hover, .store-card:hover,
.cat-tile:focus-visible, .store-card:focus-visible { transform: translateY(-3px); border-color: var(--dhin-border-glow); color: inherit; }
.cat-tile-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 1.3rem;
  color: var(--dhin-accent-blue);
  background: rgba(0, 242, 254, 0.1);
  margin-bottom: 0.9rem;
}
.cat-tile-name { font-weight: 700; font-size: 1.1rem; color: #fff; margin-bottom: 0.3rem; }
.cat-tile-desc { color: var(--dhin-text-muted); font-size: 0.88rem; line-height: 1.5; margin-bottom: 1rem; }
.cat-tile-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.cat-tile-icons { display: flex; }
.cat-tile-icons img { width: 28px; height: 28px; border-radius: 8px; border: 2px solid #0d1527; margin-inline-end: -8px; object-fit: cover; }
.cat-tile-count { font-size: 0.82rem; font-weight: 600; color: var(--dhin-accent-blue); white-space: nowrap; }
@media (max-width: 575.98px) {
  .cat-tile { padding: 1rem; }
  .cat-tile-desc { display: none; }
}

.store-card { align-items: flex-start; gap: 0.25rem; padding: 1.75rem; }
.store-card-logo { font-size: 2.2rem; color: #4cc2ff; line-height: 1; margin-bottom: 0.5rem; }
.store-card.is-play .store-card-logo { color: #34d399; }
.store-card-name { font-size: 1.35rem; font-weight: 800; color: #fff; }
.store-card-count { font-size: 0.85rem; color: var(--dhin-accent-blue); font-weight: 600; }
.store-card-desc { color: var(--dhin-text-muted); margin: 0.5rem 0 1rem; }
.store-card-icons { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; }
.store-card-icons img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }

.root-cta {
  max-width: 900px;
  padding: 3rem 1.5rem;
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 15% 0%, rgba(0, 242, 254, 0.16) 0%, transparent 55%),
    radial-gradient(circle at 85% 100%, rgba(118, 75, 162, 0.28) 0%, transparent 55%),
    var(--dhin-bg-card);
}

/* ---- apps page --------------------------------------------------------- */
.apps-hero {
  padding: 40px 0 28px;
  background: radial-gradient(circle at 50% 0%, rgba(79, 172, 254, 0.18) 0%, rgba(8, 12, 20, 0) 65%);
}
.apps-hero-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.apps-hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.88rem;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--dhin-border);
}
.apps-hero-facts i { color: var(--dhin-accent-blue); }

.apps-toolbar {
  position: sticky;
  top: 72px;
  z-index: 1010;
  padding: 0.85rem 0 0.6rem;
  background: rgba(8, 12, 20, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--dhin-border);
}
@media (max-width: 991.98px) { .apps-toolbar { top: 64px; } }
.apps-toolbar-row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.apps-search { position: relative; flex: 1 1 280px; }
.apps-search > i {
  position: absolute;
  inset-inline-start: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dhin-text-muted);
  pointer-events: none;
}
.apps-search input {
  width: 100%;
  height: 46px;
  padding-inline: 2.6rem 2.6rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.apps-search input::placeholder { color: #7c8aa0; }
.apps-search input:focus { border-color: var(--dhin-accent-blue); box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.18); }
.apps-search kbd {
  position: absolute;
  inset-inline-end: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  color: var(--dhin-text-muted);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.apps-search input:focus ~ kbd, .apps-search input:not(:placeholder-shown) ~ kbd { display: none; }
@media (hover: none) { .apps-search kbd { display: none; } }

.apps-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.apps-seg-btn {
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  white-space: nowrap;
}
.apps-seg-btn[aria-pressed="true"] { background: var(--dhin-gradient-primary); color: #04121c; }
.apps-seg-btn:focus-visible, .apps-chip:focus-visible { outline: 2px solid var(--dhin-accent-blue); outline-offset: 2px; }

.apps-chips {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.7rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
  mask-image: linear-gradient(90deg, #000 92%, transparent);
}
[dir="rtl"] .apps-chips {
  -webkit-mask-image: linear-gradient(270deg, #000 92%, transparent);
  mask-image: linear-gradient(270deg, #000 92%, transparent);
}
.apps-chips::-webkit-scrollbar { display: none; }
.apps-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.apps-chip:hover { border-color: rgba(0, 242, 254, 0.45); color: #fff; }
.apps-chip span {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}
.apps-chip[aria-pressed="true"] { color: #04121c; background: var(--dhin-accent-blue); border-color: var(--dhin-accent-blue); }
.apps-chip[aria-pressed="true"] span { background: rgba(4, 18, 28, 0.15); }

.apps-count { color: var(--dhin-text-muted); font-size: 0.88rem; margin: 1.1rem 0 0; min-height: 1.4em; }
.apps-cat { padding-top: 2.25rem; scroll-margin-top: 190px; }
.apps-cat-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.apps-cat-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1.35rem;
  color: var(--dhin-accent-blue);
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.2);
}
.apps-cat-count { color: var(--dhin-text-muted); font-size: 0.85rem; white-space: nowrap; }
@media (max-width: 575.98px) { .apps-cat-count { display: none; } }
.apps-empty { padding: 3rem 1.5rem; margin-top: 2rem; border-radius: 1.25rem; }
.js-filtering .apps-cat { padding-top: 1.5rem; }

.root-faq { max-width: 820px; }
.root-faq .accordion-item {
  background: var(--dhin-bg-card);
  border: 1px solid var(--dhin-border);
  border-radius: 0.9rem !important;
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.root-faq .accordion-button { background: transparent; color: #fff; font-weight: 600; box-shadow: none; }
.root-faq .accordion-button:not(.collapsed) { color: var(--dhin-accent-blue); }
.root-faq .accordion-button:focus-visible { outline: 2px solid var(--dhin-accent-blue); outline-offset: -2px; }

/* ---- about / contact --------------------------------------------------- */
.about-why-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--dhin-accent-blue);
  background: rgba(0, 242, 254, 0.1);
  font-size: 1.15rem;
}
.contact-icon { width: 80px; height: 80px; font-size: 2rem; }
.contact-addresses {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--dhin-border);
}
.contact-label { display: block; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dhin-text-muted); margin-bottom: 0.25rem; }
.contact-mail { color: #fff; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.contact-mail:hover { color: var(--dhin-accent-blue); }
.root-checks li { display: flex; gap: 0.65rem; align-items: flex-start; color: #cbd5e1; margin-bottom: 0.7rem; }
.root-checks li:last-child { margin-bottom: 0; }
.root-checks i { color: var(--dhin-accent-blue); margin-top: 0.15rem; }
.contact-apps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}
.contact-app {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.8rem;
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  background: var(--dhin-bg-card);
  border: 1px solid var(--dhin-border);
  line-height: 1.25;
}
.contact-app:hover { color: #fff; border-color: var(--dhin-border-glow); }
.contact-app img { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; flex-shrink: 0; }


/* ---- "view this page in your language" hint ---------------------------- */
.lang-hint {
  position: fixed;
  inset-inline-start: 50%;
  bottom: 1rem;
  z-index: 1080;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: calc(100vw - 2rem);
  padding: 0.6rem 0.6rem 0.6rem 1rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.96);
  border: 1px solid var(--dhin-border-glow);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  font-size: 0.9rem;
}
[dir="rtl"] .lang-hint { transform: translateX(50%); padding: 0.6rem 1rem 0.6rem 0.6rem; }
.lang-hint a { white-space: nowrap; }
.lang-hint button { border: 0; background: transparent; color: var(--dhin-text-muted); font-size: 1.1rem; line-height: 1; padding: 0.25rem; }
.lang-hint button:hover { color: #fff; }
body.has-consent-bar .lang-hint { bottom: 6rem; }
@media (max-width: 575.98px) {
  .lang-hint { border-radius: 1rem; flex-wrap: wrap; justify-content: center; text-align: center; }
}
