/*
Theme Name: 18WIN Casino Guides
Description: Editorial casino game guides in English, Burmese, Khmer and Thai.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 8.0
Text Domain: 18win-casino-guides
*/

:root {
    --ground: #0b1712;
    --panel: #14251d;
    --rule: #31453a;
    --paper: #f7f5ee;
    --ink: #213128;
    --white: #fbf6e9;
    --muted: #b4c5b9;
    --gold: #e6bf77;
    --green-link: #145740;
    --display: Georgia, "Times New Roman", serif;
    --body: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--ground);
    color: var(--white);
    font: 16px/1.6 var(--body);
    -webkit-font-smoothing: antialiased;
}

:lang(my) {
    --display: "Noto Sans Myanmar", "Myanmar Sangam MN", "Myanmar Text", sans-serif;
    --body: "Noto Sans Myanmar", "Myanmar Sangam MN", "Myanmar Text", sans-serif;
}

:lang(km) {
    --display: "Noto Sans Khmer", "Khmer Sangam MN", "Khmer UI", sans-serif;
    --body: "Noto Sans Khmer", "Khmer Sangam MN", "Khmer UI", sans-serif;
}

:lang(th) {
    --display: "Noto Sans Thai", Thonburi, "Leelawadee UI", sans-serif;
    --body: "Noto Sans Thai", Thonburi, "Leelawadee UI", sans-serif;
}

img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.23; overflow-wrap: anywhere; }
button, input, textarea, select { font: inherit; }

a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

.shell { width: min(1180px, calc(100% - 72px)); margin-inline: auto; }
.reading-width { width: min(854px, calc(100% - 72px)); margin-inline: auto; }

.skip-link {
    position: fixed;
    inset: 8px auto auto 8px;
    padding: .55rem .8rem;
    color: var(--ground);
    background: var(--gold);
    transform: translateY(-150%);
    z-index: 10;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
    background: #0e1d16;
    border-bottom: 1px solid var(--rule);
}

.site-header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3rem);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .22rem;
    text-decoration: none;
    color: var(--white);
    font: 800 23px/1 var(--body);
    letter-spacing: -.065em;
}

.brand-mark {
    color: var(--ground);
    background: var(--gold);
    border: 1px solid #f4d599;
    border-radius: 7px;
    padding: .25rem .38rem .28rem;
}

.header-guides {
    color: var(--muted);
    text-decoration: none;
    font-size: .94rem;
}

.languages {
    margin-inline-start: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .2rem;
}

.languages a {
    color: var(--muted);
    padding: .36rem .65rem;
    border: 1px solid transparent;
    border-radius: 6px;
    font-family: var(--body);
    font-size: .91rem;
    text-decoration: none;
    white-space: nowrap;
}

.languages a[aria-current="true"] {
    border-color: #6d6140;
    color: var(--gold);
    background: #29291e;
}

.languages a:hover, .header-guides:hover, .site-footer a:hover { color: var(--gold); }

.site-hero { margin-top: clamp(1.35rem, 3.4vw, 2.85rem); }

.hero-panel {
    position: relative;
    isolation: isolate;
    min-height: clamp(345px, 37vw, 492px);
    overflow: hidden;
    display: grid;
    align-items: center;
    border: 1px solid #405346;
    border-radius: 19px;
    background: #112b20;
}

.hero-art, .hero-panel::before {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-art {
    z-index: -2;
    object-fit: cover;
    object-position: center 57%;
}

.hero-panel::before {
    content: "";
    z-index: -1;
    background: linear-gradient(90deg, #0b1c15 0%, #0c2018f5 23%, #0d2119ba 45%, #0d211932 72%, #0a160f14 100%);
}

.hero-copy {
    width: min(100%, 590px);
    padding: clamp(2rem, 5.8vw, 5.4rem);
    padding-inline-end: 1.75rem;
}

.hero-copy h1 {
    margin: 0;
    font: 500 clamp(3rem, 5.7vw, 5.4rem)/1.02 var(--display);
    letter-spacing: -.045em;
    text-wrap: balance;
}

.hero-copy p {
    max-width: 27rem;
    margin: 1.3rem 0 1.55rem;
    color: #d3dfd4;
    font-size: clamp(1rem, 1.65vw, 1.2rem);
}

.hero-button {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    padding: .62rem .9rem;
    background: var(--gold);
    border: 1px solid #f0ce91;
    border-radius: 7px;
    color: #19241a;
    font-weight: 700;
    text-decoration: none;
}

.hero-button:hover { background: #f4d398; }

.guide-list { padding-block: clamp(2.2rem, 4.5vw, 3.9rem) clamp(3rem, 5vw, 5.2rem); }

.guide-list > h1, .guide-list > h2 {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin: 0 0 1.2rem;
    font: 500 clamp(1.9rem, 3.1vw, 2.65rem)/1.24 var(--display);
}

.guide-list > h1::after, .guide-list > h2::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--rule);
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(.85rem, 1.65vw, 1.3rem);
}

.guide-card {
    overflow: hidden;
    border: 1px solid var(--rule);
    border-radius: 12px;
    background: var(--panel);
}

.guide-card > a { display: block; height: 100%; text-decoration: none; }
.guide-card:hover, .guide-card:focus-within { border-color: #957846; }
.guide-card > a:focus-visible { outline-offset: -4px; outline-color: var(--gold); }

.card-image { aspect-ratio: 16 / 9; background: #0b1d14; }
.card-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-copy { padding: 1rem 1.1rem 1.35rem; min-height: 8.4rem; }
.card-copy time { color: var(--gold); font-size: .8rem; }

.card-copy h2, .card-copy h3 {
    margin: .42rem 0 0;
    font: 500 clamp(1.15rem, 1.8vw, 1.55rem)/1.3 var(--display);
}

.pagination { margin-top: 1.5rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .8rem; }
.screen-reader-text { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.empty-state { color: var(--muted); }

.article-mast {
    padding-block: clamp(2.15rem, 4.2vw, 4rem) clamp(2rem, 4.6vw, 3.8rem);
    background: radial-gradient(ellipse at top right, #284b36 0%, #12281d 41%, #0c1a13 81%);
    border-bottom: 1px solid #6b6649;
}

.back-guides {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--gold);
    text-underline-offset: .23em;
    font-size: .95rem;
}

.entry-title {
    margin: .85rem 0 .7rem;
    font: 500 clamp(2.1rem, 4.7vw, 4.35rem)/1.12 var(--display);
    letter-spacing: -.026em;
    text-wrap: pretty;
}

.article-mast time { color: var(--muted); font-size: .86rem; }
.article-surface { background: var(--paper); color: var(--ink); }

.entry-content {
    min-height: 300px;
    padding-block: clamp(1.85rem, 4.7vw, 3.45rem) clamp(3rem, 6vw, 5rem);
    font-size: clamp(1rem, 1.65vw, 1.12rem);
    line-height: 1.73;
    overflow-wrap: anywhere;
}

.entry-content > :first-child { margin-top: 0; }
.entry-content > :last-child { margin-bottom: 0; }
.entry-content > p:first-of-type { font-size: 1.075em; }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1.2rem; }
.entry-content li + li { margin-top: .48rem; }

.entry-content h2, .entry-content h3, .entry-content h4 {
    margin: 2.15em 0 .65em;
    color: #173b2b;
    font-family: var(--display);
    font-weight: 600;
}

.entry-content h2 { font-size: clamp(1.5rem, 2.85vw, 2.2rem); }
.entry-content h3 { font-size: clamp(1.25rem, 2.15vw, 1.6rem); }
.entry-content a { color: var(--green-link); text-decoration-thickness: .08em; text-underline-offset: .2em; }
.entry-content a:hover { color: #754c17; }

.entry-content figure { margin: 1.45rem 0; }
.entry-content figcaption { color: #516457; font-size: .84rem; }

.entry-content img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.entry-content .lead-fallback { margin-bottom: 1.45rem; }

.entry-content table {
    width: 100%;
    margin: 1.3rem 0 1.65rem;
    border-collapse: collapse;
    background: #fffdf6;
    font-size: .92em;
}

.entry-content th, .entry-content td {
    padding: .7rem .78rem;
    border: 1px solid #cbd7ca;
    text-align: start;
    vertical-align: top;
}

.entry-content th { background: #e2ece1; color: #1c392b; }
.entry-content blockquote { margin: 1.5rem 0; padding: .45rem 1rem; border-inline-start: 3px solid #a88149; }

.site-footer { border-top: 1px solid var(--rule); }
.site-footer-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-footer a { color: var(--muted); text-decoration: none; font-size: .91rem; }
.site-footer .footer-brand { color: var(--gold); font: 750 1rem/1 var(--body); letter-spacing: .04em; }

:where(html[lang^="my"], html[lang^="km"], html[lang^="th"]) :is(.hero-copy h1, .entry-title) {
    line-height: 1.33;
    letter-spacing: normal;
    font-weight: 650;
}

:where(html[lang^="my"], html[lang^="km"], html[lang^="th"]) .hero-copy h1 {
    font-size: clamp(2.05rem, 4.7vw, 4.22rem);
}

@media (max-width: 920px) {
    .shell, .reading-width { width: calc(100% - 48px); }
    .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .shell, .reading-width { width: calc(100% - 30px); }
    .site-header-inner { min-height: 64px; flex-wrap: wrap; gap: .45rem .8rem; padding-block: .7rem; }
    .brand { font-size: 20px; }
    .header-guides { margin-inline-start: auto; font-size: .88rem; }
    .languages { margin-inline-start: 0; width: 100%; }
    .languages a { padding: .29rem .56rem; font-size: .84rem; }
    .hero-panel { min-height: 380px; align-items: end; border-radius: 13px; }
    .hero-art { object-position: 73% 54%; }
    .hero-panel::before { background: linear-gradient(0deg, #0a1a13 5%, #0b1e16e8 34%, #0b1e1680 65%, #0b1b1414 100%); }
    .hero-copy { padding: 1.35rem; }
    .hero-copy h1 { font-size: clamp(2.75rem, 8.8vw, 3.35rem); }
    .hero-copy p { margin: .95rem 0 1rem; }
    .guide-list { padding-top: 1.85rem; }
    .guide-grid { grid-template-columns: 1fr; }
    .card-copy { min-height: 0; }
    .entry-content { line-height: 1.68; }
    .entry-content table { display: block; max-width: 100%; overflow-x: auto; }
    .entry-content th, .entry-content td { min-width: 2.6rem; padding: .56rem; }
}
