/*
Theme Name: Sims Archives
Theme URI: https://simsarchives.com
Author: Sims Archives
Author URI: https://simsarchives.com
Description: Modern, clean and responsive WordPress theme for Sims Archives. Sims-inspired blue palette, polished design, fully integrated with the Sims Archives plugin (game pages, release dates, purchase links, galleries, key features).
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sims-archives
Tags: custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, custom-colors, responsive-layout, blog
*/

/* =========================================================
   1. RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--sa-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--sa-text);
    background: var(--sa-bg-soft);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--sa-accent);
    text-decoration: none;
    transition: color .15s ease;
}
a:hover, a:focus { color: var(--sa-primary-dark); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--sa-font-heading);
    color: var(--sa-secondary);
    line-height: 1.25;
    margin: 0 0 .5em;
    font-weight: 700;
    letter-spacing: -.01em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin: 0 0 1em; }

button { font-family: inherit; }

/* =========================================================
   2. DESIGN TOKENS
   ========================================================= */
:root {
    /* Palette Sims-inspired (mix équilibré) */
    --sa-primary: #2DBEEC;          /* Cyan moderne — accent principal */
    --sa-primary-dark: #1A8FBA;     /* Hover */
    --sa-secondary: #0F4C75;        /* Bleu profond — titres */
    --sa-accent: #3282B8;           /* Bleu mid — liens */
    --sa-light: #E0F4FC;            /* Bleu ciel doux — fonds */
    --sa-light-2: #BBE1FA;          /* Bleu clair — accents soft */

    /* Surfaces */
    --sa-bg: #FFFFFF;
    --sa-bg-soft: #F4FBFE;
    --sa-bg-card: #FFFFFF;
    --sa-border: #E1ECF4;
    --sa-border-strong: #C9DDED;

    /* Text */
    --sa-text: #1F2937;
    --sa-text-muted: #5B6B7E;
    --sa-text-light: #94A3B8;

    /* Effets */
    --sa-shadow-sm: 0 1px 2px rgba(15,76,117,.06);
    --sa-shadow: 0 4px 14px rgba(15,76,117,.08);
    --sa-shadow-lg: 0 12px 32px rgba(15,76,117,.12);
    --sa-radius-sm: 8px;
    --sa-radius: 14px;
    --sa-radius-lg: 20px;

    /* Typo */
    --sa-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --sa-font-heading: "Poppins", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Layout */
    --sa-container: 1200px;
    --sa-container-wide: 1380px;
}

/* =========================================================
   3. LAYOUT
   ========================================================= */
.sa-container {
    width: 100%;
    max-width: var(--sa-container);
    margin: 0 auto;
    padding: 0 1.25rem;
}
.sa-container-wide { max-width: var(--sa-container-wide); }

.sa-section { padding: 3.5rem 0; }
.sa-section-tight { padding: 2rem 0; }

.sa-section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}
.sa-section-header h2 { margin: 0; }
.sa-section-header .sa-section-link {
    font-weight: 600;
    color: var(--sa-primary-dark);
    font-size: .95rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
.sa-section-header .sa-section-link::after {
    content: "→"; transition: transform .2s ease;
}
.sa-section-header .sa-section-link:hover::after { transform: translateX(3px); }

/* Skip link (accessibilité) */
.skip-link {
    position: absolute;
    left: -9999px;
    background: var(--sa-secondary);
    color: #fff;
    padding: .75rem 1rem;
    border-radius: var(--sa-radius-sm);
    z-index: 9999;
}
.skip-link:focus { left: 1rem; top: 1rem; color:#fff; }

/* =========================================================
   4. HEADER & NAV
   ========================================================= */
.sa-site-header {
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--sa-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.sa-site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 0;
    gap: 1rem;
}
.sa-site-branding {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--sa-secondary);
    font-weight: 700;
    font-size: 1.15rem;
    font-family: var(--sa-font-heading);
    letter-spacing: -.01em;
}
.sa-site-branding:hover { color: var(--sa-primary-dark); }
.sa-site-branding img { max-height: 38px; width: auto; }

.sa-site-branding .sa-logo-mark {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--sa-primary) 0%, var(--sa-secondary) 100%);
    display: grid; place-items: center;
    color: #fff; font-weight: 800;
    box-shadow: var(--sa-shadow);
}

.sa-primary-nav { display: flex; align-items: center; gap: .25rem; }
.sa-primary-nav ul {
    list-style: none; margin: 0; padding: 0;
    display: flex; gap: .25rem;
}
.sa-primary-nav a {
    display: inline-block;
    padding: .55rem .9rem;
    border-radius: 10px;
    color: var(--sa-secondary);
    font-weight: 500;
    font-size: .95rem;
    transition: all .15s ease;
}
.sa-primary-nav a:hover,
.sa-primary-nav .current-menu-item > a,
.sa-primary-nav .current_page_item > a {
    background: var(--sa-light);
    color: var(--sa-primary-dark);
}

.sa-header-actions {
    display: flex; align-items: center; gap: .5rem;
}
.sa-header-search-toggle,
.sa-menu-toggle {
    background: transparent;
    border: 1px solid var(--sa-border-strong);
    border-radius: 10px;
    padding: .5rem .65rem;
    cursor: pointer;
    color: var(--sa-secondary);
    transition: all .15s ease;
    display: inline-flex; align-items: center; justify-content: center;
}
.sa-header-search-toggle:hover,
.sa-menu-toggle:hover {
    background: var(--sa-light);
    border-color: var(--sa-primary);
}
.sa-menu-toggle { display: none; }
.sa-menu-toggle span {
    width: 18px; height: 2px; background: currentColor; display: block; position: relative;
}
.sa-menu-toggle span::before,
.sa-menu-toggle span::after {
    content:""; position:absolute; left:0; width:18px; height:2px; background: currentColor;
}
.sa-menu-toggle span::before { top:-6px; }
.sa-menu-toggle span::after  { top: 6px; }

.sa-header-search {
    display: none;
    padding: .75rem 0 1rem;
    border-top: 1px solid var(--sa-border);
}
.sa-header-search.is-open { display: block; }

/* =========================================================
   5. SEARCH FORM
   ========================================================= */
.sa-search-form {
    display: flex;
    background: #fff;
    border: 1px solid var(--sa-border-strong);
    border-radius: 999px;
    padding: .35rem .35rem .35rem 1.1rem;
    box-shadow: var(--sa-shadow-sm);
    align-items: center;
    gap: .5rem;
}
.sa-search-form input[type="search"] {
    flex: 1;
    border: 0;
    outline: none;
    padding: .5rem 0;
    font-size: 1rem;
    background: transparent;
    color: var(--sa-text);
    font-family: inherit;
}
.sa-search-form button {
    background: var(--sa-primary);
    color: #fff;
    border: 0;
    padding: .55rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease;
}
.sa-search-form button:hover { background: var(--sa-primary-dark); }

/* =========================================================
   6. BUTTONS
   ========================================================= */
.sa-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.4rem;
    border-radius: 999px;
    background: var(--sa-primary);
    color: #fff !important;
    font-weight: 600;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s ease;
    box-shadow: 0 2px 8px rgba(45,190,236,.3);
    font-size: .95rem;
    line-height: 1;
}
.sa-btn:hover {
    background: var(--sa-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(45,190,236,.35);
}
.sa-btn-secondary {
    background: #fff;
    color: var(--sa-secondary) !important;
    border: 1px solid var(--sa-border-strong);
    box-shadow: var(--sa-shadow-sm);
}
.sa-btn-secondary:hover {
    background: var(--sa-light);
    border-color: var(--sa-primary);
    color: var(--sa-primary-dark) !important;
}
.sa-btn-ghost {
    background: transparent;
    color: var(--sa-secondary) !important;
    box-shadow: none;
    border: 1px solid transparent;
}
.sa-btn-ghost:hover {
    background: var(--sa-light);
    color: var(--sa-primary-dark) !important;
}
.sa-btn-lg { padding: .9rem 1.7rem; font-size: 1rem; }
.sa-btn-sm { padding: .5rem 1rem; font-size: .85rem; }

/* =========================================================
   7. HOMEPAGE — HERO
   ========================================================= */
.sa-hero {
    position: relative;
    padding: 4rem 0 3.5rem;
    background: linear-gradient(135deg, var(--sa-light) 0%, #fff 60%, var(--sa-light) 100%);
    overflow: hidden;
}
.sa-hero::before {
    content: "";
    position: absolute;
    top: -120px; right: -120px;
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(45,190,236,.25) 0%, transparent 70%);
    border-radius: 50%;
}
.sa-hero::after {
    content: "";
    position: absolute;
    bottom: -150px; left: -150px;
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(15,76,117,.15) 0%, transparent 70%);
    border-radius: 50%;
}
.sa-hero-inner { position: relative; text-align: center; max-width: 760px; margin: 0 auto; }
.sa-hero h1 { color: var(--sa-secondary); margin-bottom: 1rem; }
.sa-hero p {
    font-size: 1.15rem;
    color: var(--sa-text-muted);
    margin-bottom: 2rem;
}
.sa-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem;
    margin-bottom: 2rem;
}
.sa-hero .sa-search-form { max-width: 540px; margin: 0 auto; }

/* =========================================================
   8. GAME CARDS GRID
   ========================================================= */
.sa-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}
.sa-games-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.sa-game-card {
    background: var(--sa-bg-card);
    border-radius: var(--sa-radius);
    overflow: hidden;
    box-shadow: var(--sa-shadow-sm);
    transition: all .25s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--sa-border);
}
.sa-game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sa-shadow-lg);
    border-color: var(--sa-primary);
}
.sa-game-card-cover {
    position: relative;
    aspect-ratio: 4 / 5;
    background: linear-gradient(135deg, var(--sa-light) 0%, var(--sa-light-2) 100%);
    overflow: hidden;
}
.sa-game-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.sa-game-card:hover .sa-game-card-cover img { transform: scale(1.04); }
.sa-game-card-cover .sa-game-card-placeholder {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    color: var(--sa-secondary);
    opacity: .35;
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--sa-font-heading);
}
.sa-game-card-type {
    position: absolute;
    top: .75rem; left: .75rem;
    background: rgba(255,255,255,.94);
    color: var(--sa-primary-dark);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .3rem .65rem;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}
.sa-game-card-body {
    padding: 1rem 1.1rem 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.sa-game-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--sa-secondary);
    margin: 0 0 .35rem;
    line-height: 1.3;
}
.sa-game-card-title a { color: inherit; }
.sa-game-card-title a:hover { color: var(--sa-primary-dark); }
.sa-game-card-meta {
    font-size: .82rem;
    color: var(--sa-text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .75rem;
    margin-top: auto;
    padding-top: .5rem;
}
.sa-game-card-meta span { display: inline-flex; align-items: center; gap: .25rem; }

/* =========================================================
   9. SECTIONS BY TYPE (HOMEPAGE)
   ========================================================= */
.sa-type-section { padding: 2rem 0; }
.sa-type-section + .sa-type-section { border-top: 1px solid var(--sa-border); }

/* =========================================================
   10. SINGLE GAME PAGE
   ========================================================= */
.sa-game-hero {
    position: relative;
    padding: 0;
    background: var(--sa-secondary);
    color: #fff;
    overflow: hidden;
    min-height: 380px;
    display: flex;
    align-items: end;
}
.sa-game-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.sa-game-hero-bg img {
    width: 100%; height: 100%; object-fit: cover;
    opacity: .55;
}
.sa-game-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15,76,117,.3) 0%, rgba(15,76,117,.95) 100%);
}
.sa-game-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 5rem 0 2.5rem;
}
.sa-game-hero-logo {
    max-height: 110px;
    width: auto;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,.3));
}
.sa-game-hero h1 {
    color: #fff;
    margin: 0 0 .75rem;
    font-size: clamp(2rem, 5vw, 3.25rem);
}
.sa-game-hero-tagline {
    font-size: 1.1rem;
    color: rgba(255,255,255,.85);
    max-width: 720px;
    margin: 0 0 1.25rem;
}
.sa-game-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.5rem;
}
.sa-game-hero-meta .sa-tag {
    background: rgba(255,255,255,.18);
    color: #fff;
    border: 1px solid rgba(255,255,255,.25);
    padding: .35rem .8rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    text-decoration: none;
}
.sa-game-hero-meta .sa-tag:hover {
    background: rgba(255,255,255,.28);
    color: #fff;
}

/* Game body layout */
.sa-game-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2.5rem;
    padding: 3rem 0;
    align-items: start;
}
.sa-game-main { min-width: 0; }
.sa-game-aside { position: sticky; top: 90px; }

.sa-block {
    background: #fff;
    border-radius: var(--sa-radius);
    padding: 1.75rem;
    box-shadow: var(--sa-shadow-sm);
    border: 1px solid var(--sa-border);
    margin-bottom: 1.5rem;
}
.sa-block h2 {
    margin: 0 0 1rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.sa-block h2::before {
    content: "";
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, var(--sa-primary) 0%, var(--sa-secondary) 100%);
    border-radius: 4px;
}
.sa-block-content :first-child { margin-top: 0; }
.sa-block-content :last-child { margin-bottom: 0; }

/* Buy buttons block */
.sa-buy-block .sa-block-h2 { margin-bottom: .75rem; }
.sa-buy-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: .5rem;
}
.sa-buy-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .75rem 1rem;
    border-radius: 10px;
    background: var(--sa-bg-soft);
    border: 1px solid var(--sa-border);
    color: var(--sa-secondary) !important;
    font-weight: 600;
    font-size: .9rem;
    transition: all .15s ease;
}
.sa-buy-link:hover {
    background: var(--sa-light);
    border-color: var(--sa-primary);
    color: var(--sa-primary-dark) !important;
    transform: translateX(2px);
}
.sa-buy-link::after {
    content: "→";
    margin-left: auto;
    color: var(--sa-text-light);
    transition: transform .15s ease;
}
.sa-buy-link:hover::after { color: var(--sa-primary); transform: translateX(3px); }

/* Release dates table */
.sa-release-table {
    width: 100%;
    border-collapse: collapse;
}
.sa-release-table th,
.sa-release-table td {
    padding: .65rem .85rem;
    text-align: left;
    font-size: .92rem;
    border-bottom: 1px solid var(--sa-border);
}
.sa-release-table tr:last-child td,
.sa-release-table tr:last-child th { border-bottom: 0; }
.sa-release-table th {
    color: var(--sa-text-muted);
    font-weight: 500;
    width: 50%;
}
.sa-release-table td {
    color: var(--sa-secondary);
    font-weight: 600;
    text-align: right;
}

/* Key features */
.sa-features { display: flex; flex-direction: column; gap: 2rem; }
.sa-feature {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 2rem;
    align-items: center;
}
.sa-feature-image {
    border-radius: var(--sa-radius);
    overflow: hidden;
    background: var(--sa-light);
    aspect-ratio: 16 / 10;
    box-shadow: var(--sa-shadow);
}
.sa-feature-image img { width: 100%; height: 100%; object-fit: cover; }
.sa-feature-text h3 {
    color: var(--sa-secondary);
    font-size: 1.3rem;
    margin: 0 0 .6rem;
}
.sa-feature-text p {
    color: var(--sa-text-muted);
    margin: 0;
    line-height: 1.6;
}

/* Galleries */
.sa-gallery-group { margin-bottom: 2rem; }
.sa-gallery-group:last-child { margin-bottom: 0; }
.sa-gallery-group-head { margin-bottom: 1rem; }
.sa-gallery-group-head h3 {
    margin: 0 0 .25rem;
    font-size: 1.2rem;
}
.sa-gallery-group-head p {
    color: var(--sa-text-muted);
    font-size: .92rem;
    margin: 0;
}
.sa-gallery-loader { /* wrapper around grid + load more button */ }
.sa-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
}
.sa-gallery-thumb {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 10px;
    background: var(--sa-light);
    cursor: pointer;
    border: 0;
    padding: 0;
    transition: all .2s ease;
    position: relative;
}
.sa-gallery-thumb.is-hidden { display: none !important; }
.sa-gallery-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .3s ease;
}
.sa-gallery-thumb:hover { box-shadow: var(--sa-shadow); }
.sa-gallery-thumb:hover img { transform: scale(1.05); }

/* Load more button */
.sa-load-more-wrap {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--sa-border);
}
.sa-load-more-btn { min-width: 220px; }
.sa-load-more-meta {
    margin-left: .35rem;
    color: var(--sa-text-muted);
    font-weight: 500;
    font-size: .9rem;
}

/* Gallery grid responsive */
@media (max-width: 980px) {
    .sa-gallery-thumbs { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
    .sa-gallery-thumbs { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
}

/* Media gallery (categorized) */
.sa-media-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--sa-border);
    padding-bottom: 0;
}
.sa-media-tab {
    background: transparent;
    border: 0;
    padding: .55rem .9rem;
    border-radius: 8px 8px 0 0;
    color: var(--sa-text-muted);
    font-weight: 600;
    font-size: .88rem;
    cursor: pointer;
    transition: all .15s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.sa-media-tab:hover { color: var(--sa-primary-dark); background: var(--sa-bg-soft); }
.sa-media-tab.is-active {
    color: var(--sa-primary-dark);
    border-bottom-color: var(--sa-primary);
    background: transparent;
}
.sa-media-pane { display: none; }
.sa-media-pane.is-active { display: block; }

/* Connected games */
.sa-connections-list { list-style: none; padding: 0; margin: 0; }
.sa-connections-list li + li { margin-top: .55rem; }
.sa-connection {
    display: flex;
    gap: .75rem;
    padding: .65rem;
    border-radius: 10px;
    background: var(--sa-bg-soft);
    border: 1px solid var(--sa-border);
    align-items: center;
    text-decoration: none !important;
    color: var(--sa-text);
    transition: all .15s ease;
}
.sa-connection:hover {
    background: var(--sa-light);
    border-color: var(--sa-primary);
    transform: translateX(2px);
}
.sa-connection-thumb {
    flex-shrink: 0;
    width: 50px; height: 64px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--sa-light-2);
}
.sa-connection-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sa-connection-body { min-width: 0; flex: 1; }
.sa-connection-title {
    font-weight: 600;
    color: var(--sa-secondary);
    font-size: .92rem;
    margin: 0 0 .15rem;
    line-height: 1.3;
}
.sa-connection-meta {
    font-size: .76rem;
    color: var(--sa-text-muted);
    text-transform: uppercase;
    letter-spacing: .03em;
}

/* =========================================================
   11. LIGHTBOX
   ========================================================= */
.sa-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 2rem;
}
.sa-lightbox.is-open { display: flex; }
.sa-lightbox img {
    max-width: 95%;
    max-height: 90vh;
    border-radius: var(--sa-radius-sm);
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.sa-lightbox-close,
.sa-lightbox-prev,
.sa-lightbox-next {
    position: absolute;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4rem;
    display: grid;
    place-items: center;
    transition: all .15s ease;
}
.sa-lightbox-close:hover,
.sa-lightbox-prev:hover,
.sa-lightbox-next:hover {
    background: rgba(255,255,255,.25);
}
.sa-lightbox-close { top: 1.5rem; right: 1.5rem; }
.sa-lightbox-prev  { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.sa-lightbox-next  { right: 1.5rem; top: 50%; transform: translateY(-50%); }
.sa-lightbox-caption {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0,0,0,.5);
    padding: .5rem 1rem;
    border-radius: 999px;
    font-size: .9rem;
    max-width: 80%;
    text-align: center;
}

/* =========================================================
   12. ARCHIVE PAGES
   ========================================================= */
.sa-page-header {
    background: linear-gradient(135deg, var(--sa-light) 0%, #fff 100%);
    padding: 3rem 0 2.5rem;
    border-bottom: 1px solid var(--sa-border);
}
.sa-page-header h1 { margin: 0 0 .5rem; }
.sa-page-header .sa-page-description {
    color: var(--sa-text-muted);
    font-size: 1.05rem;
    max-width: 720px;
    margin: 0;
}

.sa-archive-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1.5rem 0 0;
}
.sa-archive-filters .sa-filter-label {
    font-size: .85rem;
    color: var(--sa-text-muted);
    margin-right: .5rem;
    align-self: center;
}
.sa-filter-chip {
    padding: .4rem .9rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--sa-border-strong);
    color: var(--sa-secondary);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s ease;
}
.sa-filter-chip:hover { background: var(--sa-light); border-color: var(--sa-primary); }
.sa-filter-chip.is-active {
    background: var(--sa-primary);
    color: #fff;
    border-color: var(--sa-primary);
}

/* Pagination */
.sa-pagination {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .35rem;
}
.sa-pagination .page-numbers {
    min-width: 40px;
    height: 40px;
    padding: 0 .8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--sa-border);
    color: var(--sa-secondary);
    font-weight: 600;
    text-decoration: none;
    transition: all .15s ease;
}
.sa-pagination .page-numbers:hover { background: var(--sa-light); border-color: var(--sa-primary); }
.sa-pagination .current {
    background: var(--sa-primary);
    color: #fff;
    border-color: var(--sa-primary);
}

/* =========================================================
   13. POSTS / PAGES (default WP content)
   ========================================================= */
.sa-content-area { padding: 3rem 0; }
.sa-prose {
    background: #fff;
    border-radius: var(--sa-radius);
    padding: 2.5rem;
    box-shadow: var(--sa-shadow-sm);
    border: 1px solid var(--sa-border);
    max-width: 820px;
    margin: 0 auto;
}
.sa-prose h1, .sa-prose h2, .sa-prose h3 { color: var(--sa-secondary); }
.sa-prose img { border-radius: var(--sa-radius-sm); margin: 1.5rem 0; }
.sa-prose blockquote {
    border-left: 3px solid var(--sa-primary);
    padding: .25rem 0 .25rem 1.25rem;
    margin: 1.5rem 0;
    color: var(--sa-text-muted);
    font-style: italic;
}
.sa-prose code {
    background: var(--sa-bg-soft);
    padding: .15rem .4rem;
    border-radius: 4px;
    font-size: .92em;
    border: 1px solid var(--sa-border);
}
.sa-prose pre {
    background: var(--sa-secondary);
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: var(--sa-radius-sm);
    overflow-x: auto;
}
.sa-prose pre code { background: transparent; border: 0; color: inherit; }
.sa-prose ul, .sa-prose ol { padding-left: 1.5rem; }
.sa-prose li + li { margin-top: .35rem; }

.sa-post-meta {
    color: var(--sa-text-muted);
    font-size: .9rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1rem;
}

/* =========================================================
   14. 404 / NO RESULTS
   ========================================================= */
.sa-empty {
    text-align: center;
    padding: 4rem 1.5rem;
    background: #fff;
    border-radius: var(--sa-radius);
    border: 1px dashed var(--sa-border-strong);
}
.sa-empty-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: .45;
}
.sa-empty h2 { margin: 0 0 .5rem; }
.sa-empty p { color: var(--sa-text-muted); margin-bottom: 1.5rem; }

/* =========================================================
   15. FOOTER
   ========================================================= */
.sa-site-footer {
    background: var(--sa-secondary);
    color: rgba(255,255,255,.85);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}
.sa-site-footer h3 {
    color: #fff;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0 0 1rem;
}
.sa-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.sa-footer-brand p {
    color: rgba(255,255,255,.7);
    font-size: .92rem;
    margin: .75rem 0 0;
}
.sa-site-footer ul {
    list-style: none; padding: 0; margin: 0;
}
.sa-site-footer li + li { margin-top: .4rem; }
.sa-site-footer a {
    color: rgba(255,255,255,.75);
    font-size: .92rem;
    transition: color .15s ease;
}
.sa-site-footer a:hover { color: #fff; }
.sa-footer-bottom {
    padding-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .75rem;
    font-size: .85rem;
    color: rgba(255,255,255,.55);
}

/* Widgets */
.widget { margin-bottom: 1.5rem; }
.widget_search .sa-search-form { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); }
.widget_search input { color: #fff; }
.widget_search input::placeholder { color: rgba(255,255,255,.6); }

/* =========================================================
   16. UTILITIES
   ========================================================= */
.sa-mt-0 { margin-top: 0 !important; }
.sa-mb-0 { margin-bottom: 0 !important; }
.sa-text-center { text-align: center; }
.sa-text-muted { color: var(--sa-text-muted); }

/* Screen reader only */
.screen-reader-text {
    position: absolute !important;
    clip: rect(1px,1px,1px,1px);
    width: 1px; height: 1px;
    overflow: hidden;
}

/* =========================================================
   17. RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
    .sa-game-body {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .sa-game-aside { position: static; }
    .sa-feature {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .sa-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    .sa-section { padding: 2.5rem 0; }
    .sa-primary-nav { display: none; }
    .sa-primary-nav.is-open {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: #fff;
        border-bottom: 1px solid var(--sa-border);
        padding: 1rem 1.25rem;
        flex-direction: column;
        align-items: stretch;
        box-shadow: var(--sa-shadow);
    }
    .sa-primary-nav.is-open ul {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    .sa-primary-nav.is-open a {
        display: block;
        padding: .75rem 1rem;
    }
    .sa-menu-toggle { display: inline-flex; }
    .sa-hero { padding: 2.5rem 0; }
    .sa-game-hero-inner { padding: 3rem 0 2rem; }
    .sa-games-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
    .sa-block { padding: 1.25rem; }
    .sa-prose { padding: 1.5rem; }
    .sa-footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .sa-footer-bottom { flex-direction: column; align-items: center; text-align: center; }
}

@media (max-width: 480px) {
    .sa-games-grid-compact { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
    .sa-gallery-thumbs { grid-template-columns: repeat(2, 1fr); }
    .sa-hero-actions .sa-btn { width: 100%; justify-content: center; }
}

/* =========================================================
   18. WORDPRESS REQUIRED CLASSES
   ========================================================= */
.alignleft  { float: left;  margin: .5em 1.5em 1em 0; }
.alignright { float: right; margin: .5em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide { max-width: 100%; }
.wp-caption {
    background: var(--sa-bg-soft);
    border: 1px solid var(--sa-border);
    border-radius: var(--sa-radius-sm);
    padding: .5rem;
    max-width: 100%;
}
.wp-caption-text {
    text-align: center;
    color: var(--sa-text-muted);
    font-size: .85rem;
    margin: .5rem 0 0;
}
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .5rem;
    margin: 1rem 0;
}
.sticky { background: var(--sa-light); }
.bypostauthor { font-style: normal; }
