/*
Theme Name: PGSLOT Light
Theme URI: https://pg-slot.asia/
Author: PG SLOT
Description: ธีม WordPress โทนสว่างสำหรับ PG SLOT เน้นความเร็ว การเข้าถึง และโครงสร้าง SEO ที่สะอาด
Version: 1.0.11
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Text Domain: pgslot-light
*/

:root {
  color-scheme: only light;
  --card: #fff;
}

/* Keep the game information dialog within the light-only visual system. */
.game-modal {
  background: rgba(224,241,252,.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.game-modal-card {
  border-color: rgba(8,125,255,.16);
  background: #fff;
  color: #0d2340;
  box-shadow: 0 28px 72px rgba(17,84,139,.24);
}
.game-modal-body { background: linear-gradient(160deg,#fff 0%,#f5fbff 100%); }
.game-modal-body h2 { color: #092855; }
.game-modal-body p { color: #526b84; }
.game-modal-meta span {
  color: #075fad;
  background: #edf7ff;
  border-color: rgba(8,125,255,.18);
}
.game-modal-close {
  border-color: rgba(8,125,255,.18);
  background: #f2f9ff;
  color: #075fad;
  box-shadow: 0 8px 20px rgba(17,84,139,.12);
}

html { scroll-padding-top: 1rem; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
*, *::before, *::after { box-sizing: border-box; }
body { min-width: 320px; }
img, svg, video, canvas { max-width: 100%; }
iframe { width: 100%; max-width: 100%; border: 0; }
body.admin-bar .sidebar { top: 50px; height: calc(100vh - 68px); }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  position: fixed !important; top: 8px; left: 8px; z-index: 100000;
  width: auto; height: auto; padding: .75rem 1rem; margin: 0;
  clip: auto; background: #fff; color: #092855; border-radius: 10px;
}
.site-content-card {
  margin-top: 28px; padding: clamp(22px, 4vw, 42px); border-radius: 28px;
  background: rgba(255,255,255,.88); border: 1px solid rgba(255,255,255,.96);
  box-shadow: 0 16px 38px rgba(17,84,139,.10);
}
.site-content-card > :first-child { margin-top: 0; }
.site-content-card > :last-child { margin-bottom: 0; }
.site-content-card p, .entry-content p { line-height: 1.85; }
.entry-content h2, .entry-content h3 { color: #092855; line-height: 1.35; }
.entry-content a { color: #087dff; text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { height: auto; border-radius: 18px; }
.entry-content { overflow-wrap: anywhere; }
.entry-content table { display: block; width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-collapse: collapse; }
.entry-content th, .entry-content td { min-width: 8rem; }
.entry-content pre { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.entry-content code { overflow-wrap: break-word; }
.entry-content details { margin-block: 1rem; padding: .85rem 1rem; border: 1px solid #dcecf8; border-radius: 14px; background: #f8fcff; }
.entry-content summary { min-height: 44px; cursor: pointer; font-weight: 800; }
.entry-content .legacy-media-grid {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr));
  align-items: start; gap: clamp(10px,2vw,18px); margin-block: 24px;
}
.entry-content .legacy-media-grid > img,
.entry-content .legacy-media-grid > a { width: 100%; margin: 0; }
.entry-content .legacy-media-grid > a > img { width: 100%; height: auto; }
.entry-content h2 { margin-top: clamp(32px,5vw,54px); }
.entry-content h3 { margin-top: clamp(24px,4vw,38px); }
.entry-content h2 + p,
.entry-content h3 + p,
.entry-content h3 + figure { margin-top: 12px; }
.legacy-article-actions {
  display: grid; gap: 16px; margin-block: 28px; padding: clamp(16px,3vw,22px);
  border: 1px solid #d8eaf7; border-radius: 20px; background: #f8fcff;
}
.article-more-link {
  justify-self: start; display: inline-flex; min-height: 44px; align-items: center;
  padding: 10px 15px; border-radius: 12px; background: #e8f5ff;
  color: #075fad !important; font-weight: 800; text-decoration: none !important;
}
.article-share { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.article-share__label { flex: 1 0 100%; color: #355a78; font-weight: 800; }
.article-share__link {
  display: inline-flex; min-height: 44px; align-items: center; gap: 8px;
  padding: 8px 12px; border: 1px solid rgba(8,125,255,.15); border-radius: 12px;
  background: #fff; color: #244f74 !important; font-size: 14px; font-weight: 700;
  text-decoration: none !important; box-shadow: 0 7px 18px rgba(17,84,139,.08);
}
.article-share__link:hover { border-color: rgba(8,125,255,.38); transform: translateY(-1px); }
.article-share__mark {
  display: inline-grid; width: 26px; height: 26px; place-items: center;
  border-radius: 8px; background: #e8f5ff; color: #087dff; font-size: 13px; font-weight: 900;
}
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.post-card { overflow: hidden; border-radius: 22px; background: #fff; box-shadow: 0 14px 36px rgba(17,84,139,.11); }
.post-card__image { display: block; aspect-ratio: 16/9; background: #e6f6ff; overflow: hidden; }
.post-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.post-card:hover .post-card__image img { transform: scale(1.035); }
.post-card__body { padding: 18px; }
.post-card__body h2 { margin: 0 0 8px; font-size: 1.15rem; line-height: 1.4; }
.post-card__body p { margin: 0; color: #6e829b; line-height: 1.7; }
.post-meta { margin: 0 0 12px; color: #6e829b; font-size: .875rem; }
.pagination { margin-top: 26px; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 12px; border-radius: 10px; background: #fff; }
.pagination .current { background: #087dff; color: #fff; }
.game-catalog-empty { grid-column: 1/-1; padding: 28px; text-align: center; color: #6e829b; }
.wp-caption, .aligncenter { max-width: 100%; }
.aligncenter { margin-left: auto; margin-right: auto; }
.pgslot-theme-logo { display: block; line-height: 0; }
.pgslot-theme-logo .custom-logo { display: block; width: 175px; max-width: 100%; height: auto; object-fit: contain; }
.icon-btn svg, .mobile-nav b svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid #ffbf00;
  outline-offset: 3px;
}
.breadcrumbs { margin: 14px 0 4px; font-size: .875rem; color: #637d98; }
.breadcrumbs ol { display: flex; align-items: center; gap: 7px; margin: 0; padding: 0; list-style: none; overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
.breadcrumbs li { display: inline-flex; align-items: center; }
.breadcrumbs li:not(:last-child)::after { content: '/'; margin-left: 7px; color: #9bb0c2; }
.breadcrumbs a { color: #087dff; text-decoration: none; }
.post-navigation { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 24px; }
.post-navigation > div:last-child { text-align: right; }
.post-navigation a { display: inline-flex; min-height: 44px; align-items: center; padding: 10px 14px; border: 1px solid #d8eaf7; border-radius: 14px; background: #fff; color: #087dff; font-weight: 800; }
.related-posts > h2 { margin-bottom: 18px; color: #092855; }
.mobile-header, .mobile-menu-backdrop { -webkit-backdrop-filter: blur(18px); }
.mobile-menu-drawer { min-height: 100vh; min-height: 100dvh; }
@media (max-width: 760px) {
  .mobile-header {
    border-color: rgba(8,125,255,.14);
    background: rgba(255,255,255,.94);
    box-shadow: 0 12px 32px rgba(17,84,139,.12);
  }
  .mobile-menu-toggle {
    border-color: rgba(8,125,255,.18);
    background: linear-gradient(145deg,#f7fcff,#e8f6ff);
    box-shadow: inset 0 1px #fff,0 8px 20px rgba(8,125,255,.12);
  }
  .mobile-menu-toggle span { background: #087dff; }
  .mobile-menu-backdrop {
    background: rgba(25,67,105,.18);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
  }
  .mobile-menu-drawer {
    color: #193a5b;
    border-left-color: rgba(8,125,255,.14);
    background: linear-gradient(160deg,#fff 0%,#f4fbff 58%,#eaf7ff 100%);
    box-shadow: -22px 0 50px rgba(17,84,139,.18);
  }
  .mobile-menu-head { border-bottom-color: rgba(8,125,255,.12); }
  .mobile-menu-close {
    border-color: rgba(8,125,255,.16);
    background: #eef8ff;
    color: #0a64c9;
  }
  .mobile-menu-links a {
    color: #355a78;
    background: rgba(255,255,255,.72);
    border-color: rgba(8,125,255,.07);
  }
  .mobile-menu-links a::before { color: #087dff; }
  .mobile-menu-links a.active {
    color: #0758ae;
    border-color: rgba(8,125,255,.20);
    background: linear-gradient(135deg,#e7f4ff,#d9f7fb);
    box-shadow: 0 8px 20px rgba(8,125,255,.10);
  }
  .mobile-menu-auth { border-top-color: rgba(8,125,255,.12); }
  .mobile-drawer-login {
    color: #0758ae;
    border: 1px solid rgba(8,125,255,.18);
    background: #e8f5ff;
    box-shadow: 0 8px 22px rgba(8,125,255,.10);
  }
  .mobile-drawer-register {
    color: #6b4500;
    border: 1px solid rgba(230,167,0,.18);
    background: linear-gradient(135deg,#fff4bd,#ffe27a);
    box-shadow: 0 8px 22px rgba(211,154,0,.13);
  }
  .mobile-nav {
    border-color: rgba(8,125,255,.13);
    background: rgba(255,255,255,.96);
    box-shadow: 0 14px 34px rgba(17,84,139,.15);
  }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .brand .pgslot-theme-logo img { display: block; width: 70px; }
  .brand-mini { display: none !important; }
}
@media (max-width: 980px) { .post-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
  body.admin-bar .sidebar { top: 18px; height: calc(100vh - 36px); }
  .mobile-header-brand .pgslot-theme-logo .custom-logo { width: 142px; }
  input, select, textarea { font-size: 16px; }
  .post-navigation { grid-template-columns: 1fr; }
  .post-navigation > div:last-child { text-align: left; }
  .mobile-header { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
  .mobile-menu-drawer { padding-top: max(18px, env(safe-area-inset-top)); padding-right: max(18px, env(safe-area-inset-right)); padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .mobile-nav { padding-bottom: env(safe-area-inset-bottom); }
  .entry-content .legacy-media-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .page-shell, .main-content { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .article-share { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .article-share__label { grid-column: 1 / -1; }
  .article-share__link { width: 100%; padding-inline: 10px; }
}
@media (max-width: 360px) {
  .cards, .dynamic-game-grid, .promo-image-grid { grid-template-columns: 1fr !important; }
  .page-hero { padding-inline: 16px; }
  .page-visual { display: none; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .mobile-menu-links { padding-block: 8px; }
  .mobile-menu-links a { padding-block: 9px; }
  .mobile-menu-head { padding-bottom: 8px; }
}
@media (forced-colors: active) {
  :where(a, button, input, select, textarea, summary):focus-visible { outline-color: Highlight; }
  .post-card, .site-content-card, .post-navigation a { border: 1px solid CanvasText; }
}

/* WCAG AA contrast refinements for the light-only interface. */
:root { --muted: #526b84; }
.eyebrow { color: #075fad; }
.mobile-nav a { color: #526d8b; }
.premium-footer h2 { margin: 0 0 12px; color: #173e63; font-size: 17px; }
.game-cover img.game-image { opacity: 1; }
@media (max-width: 760px) {
  .mobile-nav a { min-height: 48px; font-size: 12px; line-height: 1.15; }
}
