/* Platform chooser: port of mena-frontend src/views/switch.vue + src/assets/css/switch.css.
   Card/heading sizes mirror switch.vue's getSize(): 446/1926 and 67.68/1926 of viewport width.
   Fonts match the live /switch page: AvenirArabic for the heading, Tajawal for everything else. */
@font-face {
    font-family: "AvenirArabic";
    src: url("../font/avenir_arabic.otf");
    font-display: swap;
}

@font-face {
    font-family: "Tajawal";
    src: url("../font/Tajawal-Regular.ttf");
    font-display: swap;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: "Tajawal", Tahoma, sans-serif; color: #fff; background: #1b2330; }

.platforms-page { position: relative; min-height: 100vh; display: flex; flex-direction: column;
    background-position: center; background-size: cover; background-repeat: no-repeat; overflow: hidden; }
.platforms-page::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .3); }

.platforms-pattern { position: absolute; right: -11px; top: -17px; width: 180px; z-index: 1; }
.platforms-brand { position: absolute; top: 22px; left: 37px; width: 210px; z-index: 1; }

.platforms-main { position: relative; z-index: 1; flex: 1; width: 91.67%; margin: 0 auto;
    padding-top: 34vh; padding-bottom: 40px;
    --card-w: 23.16vw; --edge: calc((100% / 3 - var(--card-w)) / 2); }

/* Platforms: unchanged from /switch */
.platforms-title { margin: 0 0 0 auto; width: max-content; max-width: 100%; position: relative; padding-bottom: 14px;
    font-family: "AvenirArabic", "Tajawal", Tahoma, sans-serif; font-size: 3.51vw; font-weight: 700; line-height: 1.5;
    text-align: right; }
.platforms-title::after { content: ""; position: absolute; right: 0; bottom: 0; width: 141px; height: 4px;
    border-radius: 5px; background: #b49567; }

.platforms-cards { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 110px; }
.platforms-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    width: var(--card-w); justify-self: center; min-height: max(140px, 17.4vh); padding: 16px; border-radius: 16px;
    text-decoration: none; color: #fff; background: rgba(233, 236, 239, .29);
    box-shadow: 0 20px 27px rgba(0, 0, 0, .05); transition: background .2s; }
.platforms-card:hover, .platforms-card:focus-visible { background: rgba(233, 236, 239, .4); }
.platforms-card img { height: 66px; width: auto; }
.platforms-card span { font-size: 16px; font-weight: 600; line-height: 24px; text-align: center; }

/* Guides: own compact section, deliberately lower emphasis than the platform cards */
.platforms-guides { margin: 44px var(--edge) 0; }
.platforms-guides-label { margin: 0 0 12px; display: flex; align-items: center; gap: 12px;
    font-size: 17px; font-weight: 700; color: rgba(255, 255, 255, .92); }
.platforms-guides-label::after { content: ""; flex: 1; height: 1px;
    background: linear-gradient(to left, rgba(180, 149, 103, .8), rgba(180, 149, 103, 0)); }
.platforms-guides-row { display: flex; align-items: center; gap: 16px; padding: 12px 20px; border-radius: 12px;
    text-decoration: none; color: #fff; background: rgba(233, 236, 239, .14);
    border: 1px solid rgba(255, 255, 255, .16); transition: background .2s, border-color .2s; }
.platforms-guides-row + .platforms-guides-row { margin-top: 10px; }
.platforms-guides-row:hover, .platforms-guides-row:focus-visible { background: rgba(233, 236, 239, .24);
    border-color: rgba(180, 149, 103, .7); }
.platforms-guides-row img { width: 38px; height: 32px; flex: none; }
.platforms-guides-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.platforms-guides-text strong { font-size: 16px; font-weight: 600; }
.platforms-guides-text small { font-size: 13.5px; color: rgba(255, 255, 255, .72); }
.platforms-guides-cta { flex: none; font-size: 14px; font-weight: 700; color: #d2b48a; white-space: nowrap; }

.platforms-footer { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center;
    padding: 18px 5%; font-size: 14px; line-height: 21px; background: rgba(0, 0, 0, .35); }
.platforms-footer a { color: #fff; font-weight: 700; }

@media (max-width: 992px) {
    .platforms-main { width: 88%; padding-top: 190px; --edge: 0px; }
    .platforms-title { font-size: 52px; }
    .platforms-cards { grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 70px; }
    .platforms-card { width: 100%; }
    .platforms-cards .platforms-card:last-child { grid-column: 1 / -1; width: calc(50% - 12px); }
}
@media (max-width: 640px) {
    .platforms-brand { width: 150px; left: 18px; }
    .platforms-pattern { width: 120px; }
    .platforms-main { padding-top: 150px; }
    .platforms-title { font-size: 34px; }
    .platforms-title::after { width: 96px; }
    .platforms-cards { grid-template-columns: 1fr; gap: 16px; margin-top: 44px; }
    .platforms-cards .platforms-card:last-child { width: 100%; }
    .platforms-card { min-height: 140px; }
    .platforms-guides-row { flex-wrap: wrap; padding: 12px 16px; }
    .platforms-guides-cta { width: 100%; padding-right: 54px; }
    .platforms-footer { flex-direction: column; gap: 6px; }
}
