/* ==========================================================
   AroundWeb.app
   ========================================================== */
:root {
    --primary: #1a73f0;
    --primary-2: #0a56d6;
    --primary-soft: #e8f1fe;
    --ink: #0b1424;
    --text: #1d2740;
    --muted: #4b5670;
    --bg: #ffffff;
    --bg-soft: #f4f8fe;
    --surface: #ffffff;
    --surface-glass: rgba(255, 255, 255, .82);
    --border: #dfe6f1;
    --track: #e3e9f2;
    --shadow: 0 10px 30px rgba(20, 60, 140, .10);
    --shadow-lg: 0 18px 50px rgba(20, 60, 140, .14);
    --radius: 18px;
    --header-h: 92px;
    --green: #22b14c;
}

:root[data-theme="dark"] {
    --primary: #3d8bff;
    --primary-2: #1a73f0;
    --primary-soft: #14264a;
    --ink: #f2f6ff;
    --text: #d9e2f5;
    --muted: #9aa7c2;
    --bg: #0a1222;
    --bg-soft: #0e182c;
    --surface: #121d33;
    --surface-glass: rgba(18, 29, 51, .85);
    --border: #22314f;
    --track: #24324f;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
    margin: 0;
    font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', 'Noto Sans', 'PingFang SC', 'Hiragino Sans', 'Microsoft YaHei', sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    transition: background .3s, color .3s;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { color: var(--ink); margin: 0; letter-spacing: -.02em; }

.container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 60px); }
.icon { width: 1.2em; height: 1.2em; flex-shrink: 0; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    height: var(--header-h);
    background: var(--surface-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }

.brand { position: relative; display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { flex: none; height: 66px; width: auto; max-width: none; object-fit: contain; }
.brand-badge {
    position: relative; flex: none;
    margin-top: 10px;
    padding: 3px 10px 5px;
    font-size: 1.05rem; font-weight: 700; line-height: 1; letter-spacing: .01em;
    color: #fff;
    background: linear-gradient(135deg, #2f8bff, var(--primary-2));
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(26, 115, 240, .35);
    direction: ltr; unicode-bidi: isolate;
}
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
    display: block; padding: 10px 22px; white-space: nowrap;
    font-weight: 600; font-size: 1.05rem; color: var(--ink);
    border-radius: 999px;
    transition: background .2s, color .2s;
}
.main-nav a:hover { background: var(--primary-soft); color: var(--primary); }
.main-nav a.active { background: linear-gradient(135deg, #2f8bff, var(--primary-2)); color: #fff; box-shadow: 0 6px 16px rgba(26, 115, 240, .3); }

.header-actions { display: flex; align-items: center; gap: 14px; margin-left: 24px; }
.icon-btn {
    display: inline-grid; place-items: center;
    width: 42px; height: 42px;
    background: none; border: 0; border-radius: 50%;
    color: var(--ink);
}
.icon-btn:hover { background: var(--primary-soft); }
.icon-btn .icon { width: 24px; height: 24px; }

.theme-toggle {
    position: relative;
    display: flex; gap: 2px; padding: 4px;
    background: var(--primary-soft);
    border: 2px solid var(--primary);
    border-radius: 999px;
}
.tt-opt { position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--primary); transition: color .25s; }
.tt-opt .icon { width: 18px; height: 18px; }
.theme-toggle::before {
    content: ""; position: absolute; top: 4px; left: 4px;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--surface); box-shadow: 0 2px 6px rgba(0,0,0,.15);
    transition: transform .3s;
}
:root[data-theme="dark"] .theme-toggle::before { transform: translateX(32px); }

.lang-switch { position: relative; }
.lang-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 16px;
    font-weight: 600; font-size: 1.05rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
    box-shadow: 0 2px 8px rgba(20, 60, 140, .06);
}
.flag { width: 26px; height: 18px; border-radius: 3px; object-fit: cover; }
.chev { width: 18px; height: 18px; transition: transform .2s; }
.lang-switch.open .chev { transform: rotate(180deg); }
.lang-menu {
    position: absolute; right: 0; top: calc(100% + 8px);
    min-width: 100%; max-height: min(420px, 70vh); overflow-y: auto; margin: 0; padding: 6px; list-style: none;
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
    box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: .2s;
}
.lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; font-weight: 500; white-space: nowrap; }
.lang-menu a:hover, .lang-menu a[aria-selected="true"] { background: var(--primary-soft); color: var(--primary); }

.menu-btn { display: none; }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    min-height: clamp(520px, 44vw, 680px);
    display: flex; align-items: center;
    background: #cfe7fb;
}
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg img { object-fit: cover; object-position: right center; }
:root[data-theme="dark"] .hero-bg img { filter: brightness(.55) saturate(1.1); }
.hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(90deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.15) 40%, transparent 60%);
}
:root[data-theme="dark"] .hero::after { background: linear-gradient(90deg, rgba(10,18,34,.85) 0%, rgba(10,18,34,.35) 45%, transparent 65%); }

.hero-content { position: relative; z-index: 1; padding-top: 40px; padding-bottom: 110px; }
.eyebrow {
    display: inline-block; position: relative;
    font-size: 1.2rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--primary);
    padding-bottom: 12px;
}
.hero .eyebrow::after { content: ""; position: absolute; left: 0; bottom: 0; width: 68px; height: 5px; border-radius: 4px; background: var(--primary); }
.hero h1 { margin-top: 14px; font-size: clamp(2.6rem, 5.2vw, 4.6rem); font-weight: 700; line-height: 1.02; }
.text-brand { background: linear-gradient(135deg, #1e8bff, #0a56d6); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="dark"] .text-brand { background-image: linear-gradient(135deg, #5fb0ff, #2f8bff); }
.hero-text { max-width: 460px; margin: 22px 0 34px; font-size: 1.3rem; line-height: 1.4; color: var(--ink); }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; }
.btn {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 15px 28px;
    font-size: 1.2rem; font-weight: 600;
    border-radius: 999px;
    transition: transform .2s, box-shadow .2s, background .2s;
}
.btn .icon { width: 22px; height: 22px; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, #2f8bff, var(--primary-2)); box-shadow: 0 10px 24px rgba(26, 115, 240, .35); }
.btn-primary:hover { box-shadow: 0 14px 30px rgba(26, 115, 240, .45); }
.btn-primary .icon:last-child { transition: transform .2s; }
.btn-primary:hover .icon:last-child { transform: translateX(4px); }
.btn-outline { color: var(--ink); background: var(--surface); border: 1.5px solid var(--border); box-shadow: 0 4px 14px rgba(20, 60, 140, .08); }

/* ---------- Features strip ---------- */
.features-wrap { position: relative; z-index: 2; margin-top: -86px; }
.features {
    display: grid; grid-template-columns: repeat(4, 1fr);
    margin: 0; padding: 28px 20px; list-style: none;
    background: var(--surface-glass);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border); border-radius: 28px;
    box-shadow: var(--shadow);
}
.feature { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 4px 20px; }
.feature + .feature { border-left: 1px solid var(--border); }
.feature-icon { color: var(--primary); }
.feature-icon .icon { width: 46px; height: 46px; stroke-width: 1.8; }
.feature strong { display: block; font-size: 1.2rem; font-weight: 700; color: var(--ink); }
.feature span { display: block; color: var(--muted); font-size: 1rem; }

/* ---------- Projects ---------- */
.projects-intro { padding: 44px 0 8px; }
.eyebrow-line { display: inline-flex; align-items: center; gap: 16px; padding: 0; font-size: 1rem; }
.eyebrow-line::before { content: ""; width: 36px; height: 5px; border-radius: 4px; background: var(--primary); }
.projects-intro h2 { margin-top: 8px; font-size: clamp(2rem, 3.2vw, 2.7rem); font-weight: 700; }

.cat-jump { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.chip {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 10px 22px;
    font-weight: 600; font-size: 1.05rem; color: var(--ink);
    background: var(--surface); border: 1.5px solid var(--border); border-radius: 999px;
    box-shadow: 0 2px 8px rgba(20, 60, 140, .06);
    transition: .2s;
}
.chip .icon { width: 20px; height: 20px; color: var(--cat); }
.chip:hover { border-color: var(--cat); color: var(--cat); transform: translateY(-2px); }

/* Category palette */
.chip-games, .category-games, .card-games { --cat: #1f9d55; --cat-2: #3ccf6b; --cat-soft: rgba(34, 177, 76, .12); }
.chip-apps,  .category-apps,  .card-apps  { --cat: #1a73f0; --cat-2: #2f8bff; --cat-soft: rgba(26, 115, 240, .12); }
.chip-food,  .category-food,  .card-food  { --cat: #ea5a2a; --cat-2: #ff8a3d; --cat-soft: rgba(234, 90, 42, .12); }

.category { padding: 46px 0 50px; scroll-margin-top: calc(var(--header-h) - 10px); }
.category-apps { background: var(--bg-soft); }
.category[hidden] { display: none; }
.category-head { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.category-icon {
    display: grid; place-items: center; flex: none;
    width: 60px; height: 60px; border-radius: 18px;
    color: #fff; background: linear-gradient(135deg, var(--cat-2), var(--cat));
    box-shadow: 0 10px 22px var(--cat-soft);
}
.category-icon .icon { width: 30px; height: 30px; }
.category-head h2 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); font-weight: 700; }
.category-head p { margin: 2px 0 0; color: var(--muted); font-size: 1.08rem; }
.category-count {
    margin-left: auto; flex: none;
    min-width: 44px; padding: 6px 14px; text-align: center;
    font-weight: 700; color: var(--cat); background: var(--cat-soft); border-radius: 999px;
}
[dir="rtl"] .category-count { margin-left: 0; margin-right: auto; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.card {
    position: relative;
    display: flex; flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border); border-radius: 22px;
    box-shadow: var(--shadow);
    transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-8px); box-shadow: 0 24px 50px rgba(20, 60, 140, .18); border-color: rgba(26, 115, 240, .35); }
.card.is-hidden { display: none; }
.card-link { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.card-link:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

/* Media */
.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; display: grid; place-items: center; isolation: isolate; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.card:hover .card-media img { transform: scale(1.06); }
.card-media::after { /* bottom shade for legibility of badges */
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(0,0,0,.18) 0%, transparent 35%, transparent 70%, rgba(0,0,0,.18) 100%);
}

/* Placeholder art (used until a cover image is added) */
.card-art { position: absolute; inset: 0; display: grid; place-items: center; }
.card-art::before, .card-art::after {
    content: ""; position: absolute; border-radius: 50%;
    background: rgba(255,255,255,.18);
}
.card-art::before { width: 70%; aspect-ratio: 1; top: -25%; right: -18%; }
.card-art::after  { width: 45%; aspect-ratio: 1; bottom: -22%; left: -10%; background: rgba(255,255,255,.12); }
.card-tile {
    position: relative; z-index: 1;
    display: grid; place-items: center;
    width: 96px; height: 96px; border-radius: 26px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 16px 30px rgba(0,0,0,.18), inset 0 -4px 0 rgba(0,0,0,.06);
    transform: rotate(-6deg);
    transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.card:hover .card-tile { transform: rotate(0) scale(1.08); }
.card-tile .icon { width: 52px; height: 52px; stroke-width: 1.8; }
.theme-green  { background: radial-gradient(circle at 75% 25%, #c6f77a, #27b35a 55%, #157a3c); }
.theme-blue   { background: radial-gradient(circle at 75% 25%, #a7e0ff, #2f8bff 55%, #1452c2); }
.theme-pink   { background: radial-gradient(circle at 75% 25%, #ffd6ea, #f164ae 55%, #b8337c); }
.theme-orange { background: radial-gradient(circle at 75% 25%, #ffdc8f, #f0792f 55%, #b8461a); }
.theme-green .card-tile  { color: #1f9d55; }
.theme-blue .card-tile   { color: #1a73f0; }
.theme-pink .card-tile   { color: #e0479a; }
.theme-orange .card-tile { color: #e0601f; }

.badge {
    position: absolute; top: 14px; left: 14px; z-index: 1;
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 13px;
    font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff;
    border-radius: 999px;
    box-shadow: 0 6px 14px rgba(0,0,0,.22);
}
.badge .icon { width: 17px; height: 17px; }
.badge-games { background: var(--green); }
.badge-apps  { background: #1453c4; }
.badge-food  { background: #ea5a2a; }

.card-platforms {
    position: absolute; right: 14px; bottom: 14px; z-index: 1;
    display: flex; gap: 4px; padding: 5px;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    border-radius: 999px;
}
.card-platforms span { display: grid; place-items: center; width: 26px; height: 26px; color: #1d2740; }
.card-platforms .icon { width: 16px; height: 16px; }

/* Body */
.card-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.card h3 { font-size: 1.55rem; font-weight: 700; }
.card p { margin: 6px 0 20px; font-size: 1.02rem; line-height: 1.4; color: var(--muted); flex: 1; }
.status-soon {
    display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
    padding: 8px 14px; font-size: .95rem; font-weight: 700; color: #fff;
    background: #111827; border-radius: 12px;
}
.status-soon svg { width: 16px; height: 16px; color: var(--cat-2); flex: none; }
.progress-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: .95rem; }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #f5a524; box-shadow: 0 0 0 4px rgba(245, 165, 36, .2); }
.progress-row strong { font-size: 1.05rem; color: var(--primary); }
.progress { height: 8px; background: var(--track); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #2f8bff, var(--primary-2)); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.card .progress span { background: linear-gradient(90deg, var(--cat-2), var(--cat)); }
.card .progress-row strong { color: var(--cat); }
.progress.in span { width: var(--p); }

.card-cta {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 18px; padding: 11px 16px;
    font-weight: 600; color: var(--primary);
    background: var(--primary-soft);
    border-radius: 12px;
    transition: background .25s, color .25s;
}
.card-cta .icon { width: 18px; height: 18px; transition: transform .25s; }
.card-cta { color: var(--cat); background: var(--cat-soft); }
.card:hover .card-cta { background: linear-gradient(135deg, var(--cat-2), var(--cat)); color: #fff; }
.card:hover .card-cta .icon { transform: translateX(4px); }
[dir="rtl"] .card-cta .icon { transform: scaleX(-1); }
[dir="rtl"] .card:hover .card-cta .icon { transform: scaleX(-1) translateX(4px); }

.card-soon {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    min-height: 260px; padding: 24px; text-align: center;
    font-weight: 600; color: var(--muted);
    background: transparent; border: 2px dashed var(--border); box-shadow: none;
}
.card-soon:hover { transform: none; box-shadow: none; border-color: var(--cat); }
.soon-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; color: var(--cat); background: var(--cat-soft); }
.soon-icon .icon { width: 26px; height: 26px; }
.searching .card-soon { display: none; }

/* ---------- Footer ---------- */
.site-footer {
    --f-text: #a9b6d3; --f-line: rgba(255,255,255,.1);
    margin-top: 40px; padding: 64px 0 0;
    color: var(--f-text);
    background: radial-gradient(circle at 85% 0%, rgba(47,139,255,.22), transparent 45%), #0a1530;
}
.site-footer .logo-light { display: none; }
.site-footer .logo-dark { display: block; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; }
.footer-brand p { max-width: 360px; margin: 18px 0 22px; line-height: 1.55; }
.footer-label { display: block; margin-bottom: 10px; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; opacity: .7; }
.footer-network { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-network a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px; font-size: .92rem; font-weight: 500; color: #fff;
    background: rgba(255,255,255,.06); border: 1px solid var(--f-line); border-radius: 999px;
    transition: .2s;
}
.footer-network a:hover { background: rgba(47,139,255,.25); border-color: rgba(47,139,255,.6); }
.footer-network .icon { width: 14px; height: 14px; opacity: .7; }
.footer-col h4 { margin-bottom: 18px; font-size: 1.1rem; color: #fff; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer-col a { transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-contact li { display: flex; align-items: flex-start; gap: 10px; }
.footer-contact .icon { width: 18px; height: 18px; margin-top: 2px; color: #5fb0ff; }
.footer-langs {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 22px;
    padding: 6px 12px; border: 1px solid var(--f-line); border-radius: 12px; background: rgba(255,255,255,.05);
}
.footer-langs .icon { width: 18px; height: 18px; color: #5fb0ff; }
.footer-langs select { font: inherit; color: #fff; background: transparent; border: 0; outline: 0; cursor: pointer; }
.footer-langs option { color: #0b1424; }
.footer-bottom {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
    padding: 22px 0; border-top: 1px solid var(--f-line); font-size: .92rem;
}
.footer-bottom p { margin: 0; }
.to-top { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 600; }
.to-top .icon { width: 18px; height: 18px; transition: transform .2s; }
.to-top:hover .icon { transform: translateY(-3px); }
.brand-sm { gap: 7px; }
.brand-sm .brand-logo { height: 44px; }
.brand-sm .brand-badge { font-size: .8rem; padding: 2px 8px 4px; margin-top: 6px; }

/* ---------- Search overlay ---------- */
.search-overlay {
    position: fixed; inset: 0; z-index: 100;
    display: flex; justify-content: center; align-items: flex-start;
    padding: 120px 16px 0;
    background: rgba(8, 20, 45, .45);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.search-overlay[hidden] { display: none; }
.search-box {
    display: flex; align-items: center; gap: 12px;
    width: 100%; max-width: 640px; padding: 10px 10px 10px 22px;
    background: var(--surface); border-radius: 999px; box-shadow: var(--shadow-lg);
}
.search-box > .icon { width: 24px; height: 24px; color: var(--primary); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 1.2rem; color: var(--ink); }

/* ---------- RTL (Arabic, Urdu) ---------- */
[dir="rtl"] .brand { flex-direction: row-reverse; }
[dir="rtl"] .main-nav { margin-left: 0; margin-right: auto; }
[dir="rtl"] .header-actions { margin-left: 0; margin-right: 24px; }
[dir="rtl"] .lang-menu { right: auto; left: 0; }
/* Hero image is not mirrored (it contains text): keep the copy block on the left, beside the laptop */
[dir="rtl"] .hero-content { max-width: 720px; margin-left: max(0px, (100vw - 1440px) / 2); margin-right: auto; }
[dir="rtl"] .hero .eyebrow::after { left: auto; right: 0; }
[dir="rtl"] .btn .icon:last-child, [dir="rtl"] .btn-primary:hover .icon:last-child { transform: scaleX(-1); }
[dir="rtl"] .feature + .feature { border-left: 0; border-right: 1px solid var(--border); }
[dir="rtl"] .badge { left: auto; right: 14px; }
[dir="rtl"] .card-platforms { right: auto; left: 14px; }
[dir="rtl"] .hero h1, [dir="rtl"] .hero-text { line-height: 1.35; }

/* ---------- Responsive ---------- */
@media (max-width: 1360px) {
    .main-nav a { padding: 10px 14px; }
    .grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Collapsed nav: below 1100px, or when JS detects the menu doesn't fit (long translations) */
.nav-collapsed .menu-btn { display: inline-grid; }
.nav-collapsed .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    margin: 0; padding: 12px 16px 20px;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    display: none;
}
.nav-collapsed .main-nav.open { display: block; }
.nav-collapsed .main-nav ul { flex-direction: column; }
.nav-collapsed .header-actions { margin-left: auto; }
[dir="rtl"] .nav-collapsed .header-actions { margin-left: 0; margin-right: auto; }

@media (max-width: 1100px) {
    .features { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
    .feature { justify-content: flex-start; }
    .feature:nth-child(3) { border-left: 0; border-right: 0; }
}

@media (max-width: 767px) {
    :root { --header-h: 70px; }
    .header-inner { gap: 10px; }
    .brand { gap: 5px; }
    .brand-logo { height: 34px; }
    .brand-badge { font-size: .72rem; padding: 2px 6px 3px; margin-top: 5px; }
    .header-actions { gap: 4px; margin-left: auto; }
    .icon-btn { width: 36px; height: 36px; }
    .icon-btn .icon { width: 22px; height: 22px; }
    .lang-name, .lang-btn .chev { display: none; }
    .lang-btn { padding: 7px 7px; }
    /* Compact theme toggle: only the icon of the current theme */
    .theme-toggle { padding: 2px; border-width: 1.5px; }
    .theme-toggle::before { display: none; }
    .tt-opt { width: 28px; height: 28px; }
    .tt-moon, :root[data-theme="dark"] .tt-sun { display: none; }
    :root[data-theme="dark"] .tt-moon { display: grid; }

    .hero { flex-direction: column; align-items: stretch; min-height: 0; background: linear-gradient(180deg, #d6ecfc, #b9e0fa); }
    :root[data-theme="dark"] .hero { background: linear-gradient(180deg, #0d1a30, #10233f); }
    .hero-bg { order: 2; position: relative; inset: auto; height: auto; margin-top: -45vw; }
    .hero-bg img {
        position: static; height: auto; object-fit: contain;
        -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 35%);
        mask-image: linear-gradient(180deg, transparent 0%, #000 35%);
    }
    .hero::after { display: none; }
    .hero-content { padding-top: 32px; padding-bottom: 0; z-index: 2; }
    [dir="rtl"] .hero-content { max-width: none; margin: 0; }
    .eyebrow { font-size: 1rem; }
    .hero h1 { font-size: clamp(2.2rem, 10vw, 3rem); }
    .hero-text { font-size: 1.1rem; margin: 14px 0 22px; }
    .btn { padding: 13px 22px; font-size: 1.05rem; }

    .features-wrap { margin-top: -40px; }
    .features { grid-template-columns: 1fr; padding: 16px; border-radius: 22px; row-gap: 0; }
    .feature { padding: 14px 6px; }
    .feature + .feature, [dir="rtl"] .feature + .feature { border-left: 0; border-right: 0; border-top: 1px solid var(--border); }
    .feature-icon .icon { width: 38px; height: 38px; }

    .chip { padding: 9px 18px; font-size: 1rem; }
    .grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
    .category { padding: 36px 0 40px; }
    .category-head { gap: 14px; }
    .category-icon { width: 50px; height: 50px; border-radius: 15px; }
    .category-head p { font-size: 1rem; }
    .card-soon { min-height: 140px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
