/* php-platforms.php - a periodic table of twelve PHP platforms in three groups, each tile opening a
   detail panel; then the care routine as four moments on one line; then a plain row of links.
   The symbols are our own two letters in the display face, never a platform's logo.
   Without JavaScript every panel is listed under the table and the tiles are anchors to them;
   with it (.pt-js) one panel shows at a time. One copper accent, flat surfaces, hairlines, mono
   for numbers. Motion: transform and opacity only, once; hover movement only on a real pointer. */

.pt-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.pt-actions.is-center { justify-content: center; }

/* ── 1. The table ──────────────────────────────────────────────────── */
.pt-table { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.6vw, 32px); }
.pt-ghead { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line-strong); }
.pt-ghead span { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.pt-ghead b { font-size: 15px; color: var(--text-strong); }
.pt-cells { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pt-cells li { display: flex; }

.pt-tile { position: relative; flex: 1; display: grid; grid-template-rows: auto 1fr auto auto; min-height: clamp(128px, 12vw, 158px); padding: 10px 12px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--text-strong); text-decoration: none; overflow: hidden;
    transition: border-color var(--dur-1, 160ms) ease-out, background-color var(--dur-1, 160ms) ease-out; }
/* the selected element: a copper bar across the top edge, drawn with transform so it can grow */
.pt-tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--copper-500); transform: scaleX(0); transform-origin: left center; transition: transform 200ms var(--ease-out, ease-out); }
html[dir="rtl"] .pt-tile::before { transform-origin: right center; }
.pt-no { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; direction: ltr; justify-self: start; }
.pt-sym { align-self: center; font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 3.6vw, 46px); line-height: 1; letter-spacing: -0.02em; color: var(--text-strong); direction: ltr; unicode-bidi: isolate; justify-self: start; }
.pt-name { font-size: 13.5px; font-weight: 600; line-height: 1.25; overflow-wrap: break-word; }
.pt-role { margin-top: 2px; font-size: 12px; line-height: 1.35; color: var(--text-muted); }
.pt-tile:focus-visible { outline: 2px solid var(--patina-300, #6FCBBB); outline-offset: 2px; }
.pt-js .pt-tile.is-on { border-color: var(--copper-500); background: var(--bg); }
.pt-js .pt-tile.is-on::before { transform: scaleX(1); }
.pt-js .pt-tile.is-on .pt-sym { color: var(--copper-ink); }

/* ── 2. The panels ─────────────────────────────────────────────────── */
.pt-panels { margin-top: clamp(28px, 4vw, 44px); }
.pt-panel { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: clamp(24px, 4vw, 56px); padding: clamp(24px, 3vw, 36px) 0; border-top: 1px solid var(--line-strong); scroll-margin-top: 96px; }
.pt-panel[hidden] { display: none; }
.pt-panel:focus { outline: none; }
.pt-panel:focus-visible { outline: 2px solid var(--patina-300, #6FCBBB); outline-offset: 6px; border-radius: 4px; }
.pt-js .pt-panel { border: 1px solid var(--line-strong); border-radius: 18px; padding: clamp(22px, 3vw, 36px); background: var(--surface); }
.pt-js .pt-panel:not([hidden]) { animation: pt-in 220ms var(--ease-out, ease-out) both; }
.pt-id { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 18px; align-content: start; align-items: center; }
.pt-card { width: 84px; height: 84px; border: 1px solid var(--copper-500); border-radius: 10px; padding: 7px 9px; display: grid; grid-template-rows: auto 1fr; box-sizing: border-box; }
.pt-card .pt-sym { font-size: 36px; color: var(--copper-ink); }
.pt-kick { margin: 0 0 4px; font-size: 13px; color: var(--text-muted); }
.pt-id h3 { margin: 0; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.1; letter-spacing: -0.02em; color: var(--text-strong); }
.pt-for { grid-column: 1 / -1; margin: 4px 0 0; color: var(--text-2); font-size: 16px; line-height: 1.7; }
.pt-runs { grid-column: 1 / -1; }
.pt-runs small { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.pt-runs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pt-runs li { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--well); direction: ltr; }
.pt-more { grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-strong); font-weight: 600; font-size: 14.5px; text-decoration: none; transition: border-color var(--dur-1, 160ms) ease-out, color var(--dur-1, 160ms) ease-out; }
.pt-go { color: var(--copper-ink); display: inline-block; transition: transform 200ms var(--ease-out, ease-out); }
html[dir="rtl"] .pt-go { transform: scaleX(-1); }
.pt-more:focus-visible, .pt-else-links a:focus-visible { outline: 2px solid var(--patina-300, #6FCBBB); outline-offset: 2px; }

.pt-does { margin: 0; counter-reset: row; }
.pt-does > div { display: grid; grid-template-columns: minmax(0, 130px) minmax(0, 1fr); gap: 6px 20px; padding: 13px 0; border-top: 1px solid var(--line); }
.pt-does > div:first-child { border-top: 0; padding-top: 0; }
.pt-does dt { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--copper-ink); padding-top: 3px; }
.pt-does dd { margin: 0; color: var(--text); font-size: 15px; line-height: 1.65; }

/* ── 3. The care line ──────────────────────────────────────────────── */
.pt-care { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(18px, 2.6vw, 32px); position: relative; }
/* one line joins the four moments; each sits on it as a node */
.pt-care::before { content: ""; position: absolute; top: 6px; inset-inline: 0; border-top: 1px solid var(--line-strong); }
.pt-care li { position: relative; padding-top: 30px; }
.pt-care li::before { content: ""; position: absolute; top: 0; inset-inline-start: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--bg-alt); border: 2px solid var(--copper-500); box-sizing: border-box; }
.pt-care b { display: block; font-size: 17px; line-height: 1.35; color: var(--text-strong); margin-bottom: 6px; }
.pt-care p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.65; }

/* ── 4. Your own code ──────────────────────────────────────────────── */
.pt-else { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px clamp(28px, 5vw, 64px); align-items: center; }
.pt-else h2 { margin: 0 0 10px; font-size: clamp(26px, 3vw, 38px); letter-spacing: -0.02em; line-height: 1.15; }
html[dir="rtl"] .pt-else h2 { letter-spacing: 0; line-height: 1.35; }
.pt-else p { margin: 0; color: var(--text-2); font-size: 17px; line-height: 1.7; }
.pt-else-links { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.pt-else-links a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; border-top: 1px solid var(--line); color: var(--text-strong); font-size: 18px; font-weight: 600; text-decoration: none; transition: color var(--dur-1, 160ms) ease-out; }

/* ── Motion ────────────────────────────────────────────────────────── */
@keyframes pt-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pt-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.pt-table.revealed .pt-tile { animation: pt-rise 220ms var(--ease-out, ease-out) both; animation-delay: calc(var(--i) * 25ms); }
.pt-care.revealed li { animation: pt-rise 240ms var(--ease-out, ease-out) both; animation-delay: calc(var(--i) * 70ms); }

@media (hover: hover) and (pointer: fine) {
    .pt-tile { transition: border-color 160ms ease-out, background-color 160ms ease-out, transform 200ms var(--ease-out, ease-out); }
    .pt-tile:hover { border-color: var(--copper-500); transform: translateY(-2px); }
    .pt-more:hover, .pt-else-links a:hover { border-color: var(--copper-500); color: var(--copper-ink); }
    .pt-more:hover .pt-go, .pt-else-links a:hover .pt-go { transform: translateX(3px); }
    html[dir="rtl"] .pt-more:hover .pt-go, html[dir="rtl"] .pt-else-links a:hover .pt-go { transform: scaleX(-1) translateX(3px); }
}

@media (prefers-reduced-motion: reduce) {
    .pt-table .pt-tile, .pt-care li, .pt-js .pt-panel:not([hidden]) { animation: none !important; }
    .pt-tile, .pt-tile::before, .pt-go { transition-property: border-color, background-color, color; }
    .pt-tile:hover { transform: none; }
}

/* ── Widths ────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
    .pt-panel { grid-template-columns: minmax(0, 1fr); }
    .pt-care { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
    .pt-care::before { display: none; }
    .pt-care li { border-top: 1px solid var(--line-strong); padding-top: 22px; }
    .pt-care li::before { top: -7px; }
}
@media (max-width: 1000px) and (min-width: 701px) {
    /* three groups side by side leave a tile too narrow for "WooCommerce"; each group becomes a row */
    .pt-table { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    .pt-cells { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .pt-tile { min-height: 118px; padding: 8px 10px 10px; }
    .pt-sym { font-size: 30px; }
    .pt-else { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
    /* the three groups stack; each keeps its own two-by-two block, tiles laid on their side */
    .pt-table { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .pt-tile { min-height: 72px; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 8px 10px; }
    .pt-no { grid-column: 1; grid-row: 1; }
    .pt-sym { grid-column: 1; grid-row: 2; font-size: 26px; }
    .pt-name { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 13px; }
    .pt-does > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .pt-id { grid-template-columns: auto minmax(0, 1fr); }
    .pt-card { width: 64px; height: 64px; padding: 5px 7px; }
    .pt-card .pt-sym { font-size: 26px; }
}
@media (max-width: 560px) {
    .pt-care { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
    .sp-hero .pt-actions .btn, .sp-close .pt-actions .btn { width: 100%; justify-content: center; }
}
@media (pointer: coarse) {
    .pt-more { min-height: 44px; }
}

/* Arabic labels leave the mono face: its Latin-width space pulls Arabic words apart. The numbers,
   the symbols and the technology names stay as they are. */
html[dir="rtl"] .pt-ghead span, html[dir="rtl"] .pt-runs small, html[dir="rtl"] .pt-does dt { font-family: var(--font-body); letter-spacing: 0; text-transform: none; font-size: 13px; }
html[dir="rtl"] .pt-id h3 { letter-spacing: 0; }

