/*
Theme Name: UFASLOT345 Red Gold
Theme URI: https://www.ufaslot345.com/
Author: UFASLOT345
Description: ธีมหน้าแรกโทนแดง ทอง และดำ สำหรับ UFASLOT345 พร้อมคลังเกม การ์ดแนะนำ และเลย์เอาต์ Responsive
Version: 1.3.1
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Text Domain: ufaslot345
*/

:root {
  --us-black: #050505;
  --us-black-soft: #101010;
  --us-red-dark: #620006;
  --us-red: #a8000d;
  --us-crimson: #d21820;
  --us-gold: #d7a316;
  --us-gold-light: #ffe38a;
  --us-ivory: #f7f4ed;
  --us-text: #18120f;
  --us-muted: #796c64;
  --us-border: rgba(215, 163, 22, .55);
  --us-radius: 16px;
  --us-shadow: 0 18px 55px rgba(76, 0, 5, .18);
  --us-container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--us-text);
  background: var(--us-ivory);
  font-family: "Noto Sans Thai", "Tahoma", system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.admin-bar .site-header { top: 32px; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
.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;
}
.skip-link:focus {
  position: fixed !important; left: 16px; top: 16px; z-index: 10000;
  width: auto; height: auto; margin: 0; clip: auto; padding: 10px 16px;
  color: #000; background: var(--us-gold-light); border-radius: 8px;
}
.us-container { width: min(calc(100% - 48px), var(--us-container)); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(5, 5, 5, .96);
  border-bottom: 1px solid var(--us-gold);
  box-shadow: 0 10px 35px rgba(0,0,0,.2);
  backdrop-filter: blur(12px);
}
.header-inner { min-height: 78px; display: flex; align-items: center; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 260px; color: #fff; }
.brand-mark {
  width: 56px; aspect-ratio: 1; display: grid; place-items: center; flex: 0 0 auto;
  color: #090909; font-weight: 950; font-size: 21px; letter-spacing: -2px;
  background: linear-gradient(145deg, #fff0a6 0%, #d79f11 45%, #6f4300 100%);
  border: 2px solid #f7d86d; border-radius: 18px 8px 18px 8px;
  box-shadow: inset 0 0 0 4px rgba(0,0,0,.25), 0 0 22px rgba(235,184,38,.28);
  transform: skewX(-7deg);
}
.brand-copy { display: grid; line-height: 1; }
.brand-name { font-weight: 900; font-size: 27px; font-style: italic; letter-spacing: -.8px; }
.brand-name strong { color: #f2bd28; }
.brand-domain { margin-top: 7px; font-size: 11px; letter-spacing: 4px; color: #d8d0ca; }
.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; align-items: center; gap: 8px; padding: 0; margin: 0; list-style: none; }
.primary-nav a {
  display: inline-flex; min-height: 44px; align-items: center; padding: 10px 15px;
  color: #f8f4ee; font-size: 16px; font-weight: 650; border-radius: 10px;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.primary-nav a:hover, .primary-nav a:focus-visible { color: var(--us-gold-light); background: rgba(255,255,255,.06); transform: translateY(-1px); }
.header-cta, .button-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px; border: 1px solid var(--us-gold-light);
  color: #fff; background: linear-gradient(180deg, var(--us-crimson), #84000a);
  border-radius: 12px; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 0 24px rgba(210,24,32,.2);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.header-cta:hover, .button-primary:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 9px 30px rgba(210,24,32,.3); }
.menu-toggle { display: none; margin-left: auto; width: 46px; height: 46px; border: 1px solid var(--us-gold); background: transparent; border-radius: 10px; color: #fff; cursor: pointer; }
.menu-toggle span { display: block; width: 22px; height: 2px; margin: 5px auto; background: currentColor; }

/* Hero */
.hero {
  position: relative; min-height: 520px; overflow: hidden; color: #fff;
  background: #430005 url("assets/images/hero-pgsoft-v130.jpg") center/cover no-repeat;
  border-bottom: 2px solid var(--us-gold);
}
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,0,2,.94) 0%, rgba(77,0,5,.72) 35%, rgba(77,0,5,.12) 68%, rgba(0,0,0,.12) 100%); }
.hero::before { content: ""; position: absolute; inset: auto 0 0; height: 150px; z-index: 1; background: linear-gradient(transparent, rgba(5,0,0,.5)); pointer-events: none; }
.hero-inner { position: relative; z-index: 2; min-height: 520px; display: grid; align-items: center; grid-template-columns: minmax(0, 520px) 1fr; }
.hero-copy { padding-block: 74px; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 18px; font-size: 13px; font-weight: 800; letter-spacing: 4px; text-transform: uppercase; }
.eyebrow::after { content: ""; width: 92px; height: 1px; background: linear-gradient(90deg, var(--us-gold), transparent); }
.hero h1 { margin: 0; font-size: clamp(44px, 6vw, 72px); line-height: 1.08; letter-spacing: -2px; text-wrap: balance; text-shadow: 0 5px 28px rgba(0,0,0,.42); }
.hero h1 span { display: block; margin-top: 6px; color: var(--us-gold-light); }
.hero p { max-width: 520px; margin: 22px 0 30px; color: #f1e8e1; font-size: 18px; }
.hero .button-primary { min-width: 250px; min-height: 58px; border-radius: 999px; font-size: 20px; }
.hero-note { display: flex; flex-wrap: wrap; gap: 14px 24px; margin-top: 28px; color: #f4dfb1; font-size: 13px; }
.hero-note span::before { content: "◆"; margin-right: 8px; color: var(--us-gold); font-size: 9px; }

/* Sections */
.game-section { padding: 24px 0 56px; background: radial-gradient(circle at 50% 0, #fff 0%, #f8f5ef 45%, #eee8df 100%); }
.game-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 28px; }
.game-tab {
  min-height: 58px; border: 2px solid var(--us-gold); background: rgba(255,255,255,.82); color: #221b17;
  border-radius: 14px; font-weight: 850; font-size: 18px; cursor: pointer; transition: .2s ease;
}
.game-tab:hover { background: #fff; transform: translateY(-1px); }
.game-tab[aria-selected="true"] { color: #fff; background: linear-gradient(180deg, var(--us-crimson), #84000a); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 8px 22px rgba(132,0,10,.18); }
.section-heading { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 18px 0 26px; }
.section-heading::before, .section-heading::after { content: ""; width: 110px; height: 1px; background: linear-gradient(90deg, transparent, var(--us-gold)); }
.section-heading::after { transform: scaleX(-1); }
.section-heading h2 { margin: 0; color: #780009; font-size: clamp(32px, 4vw, 44px); line-height: 1.2; text-align: center; }
.section-heading h2::before, .section-heading h2::after { content: "◇"; padding: 0 12px; color: var(--us-gold); font-size: 20px; vertical-align: middle; }
.game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.game-card { position: relative; overflow: hidden; border: 2px solid var(--us-gold); border-radius: var(--us-radius); background: #180003; box-shadow: var(--us-shadow); transition: transform .24s ease, box-shadow .24s ease; }
.game-card:hover { transform: translateY(-6px); box-shadow: 0 22px 52px rgba(95,0,8,.24), 0 0 0 4px rgba(215,163,22,.13); }
.game-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.game-card-content { min-height: 82px; padding: 15px 17px 16px; color: #fff; background: linear-gradient(145deg, #180003, #720009); border-top: 1px solid rgba(255,225,119,.28); }
.game-card-content h3 { margin: 0 0 4px; color: var(--us-gold-light); font-size: 18px; line-height: 1.2; text-transform: uppercase; text-shadow: 0 2px 8px #000; }
.game-card-content p { margin: 0; color: #eee3d8; font-size: 12px; font-weight: 750; letter-spacing: 1px; }
.game-card[hidden] { display: none; }

/* PG SOFT guide */
.pgsoft-home-content {
  position: relative; overflow: hidden; padding: 74px 0 80px; color: #f8f3ed;
  background:
    radial-gradient(circle at 90% 5%, rgba(226,165,39,.2), transparent 27%),
    radial-gradient(circle at 0 75%, rgba(177,0,13,.2), transparent 30%),
    linear-gradient(145deg, #090505 0%, #170306 55%, #080505 100%);
  border-block: 1px solid rgba(215,163,22,.72);
}
.pgsoft-home-content::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .3;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 44px 44px;
}
.pgsoft-home-content > .us-container { position: relative; z-index: 1; }
.content-heading { max-width: 880px; margin: 0 auto 34px; text-align: center; }
.content-heading .eyebrow { justify-content: center; color: var(--us-gold-light); }
.content-heading .eyebrow::before { content: ""; width: 92px; height: 1px; background: linear-gradient(90deg, transparent, var(--us-gold)); }
.content-heading h2 { margin: 0; color: #fff; font-size: clamp(32px, 4vw, 48px); line-height: 1.2; text-wrap: balance; }
.content-heading > p:last-child { max-width: 720px; margin: 18px auto 0; color: #d8ccc4; font-size: 17px; }
.pgsoft-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 26px; }
.pgsoft-intro p { margin: 0; padding: 28px; color: #eadfd8; background: rgba(255,255,255,.045); border: 1px solid rgba(215,163,22,.24); border-radius: 18px; line-height: 1.82; }
.pgsoft-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pgsoft-guide-card { position: relative; padding: 28px 26px; background: linear-gradient(155deg, rgba(255,255,255,.075), rgba(255,255,255,.022)); border: 1px solid rgba(215,163,22,.42); border-radius: 20px; box-shadow: 0 18px 45px rgba(0,0,0,.2); }
.guide-number { display: inline-grid; place-items: center; width: 50px; height: 36px; margin-bottom: 18px; color: #140300; background: linear-gradient(145deg, #fff0a8, #c98b0c); border-radius: 999px; font-weight: 950; letter-spacing: 1px; }
.pgsoft-guide-card h3 { margin: 0 0 16px; color: var(--us-gold-light); font-size: 23px; line-height: 1.3; }
.pgsoft-guide-card p { margin: 0 0 15px; color: #e3d7cf; line-height: 1.78; }
.pgsoft-guide-card p:last-child { margin-bottom: 0; }
.pgsoft-guide-card ul { margin: 0 0 18px; padding-left: 22px; color: #e3d7cf; }
.pgsoft-guide-card li { margin-bottom: 9px; line-height: 1.65; }
.pgsoft-guide-card strong { color: #fff; }
.responsible-note { margin: 26px 0 0; padding: 18px 22px; color: #f8e9d6; background: rgba(127,0,8,.35); border: 1px solid rgba(255,214,91,.46); border-radius: 14px; text-align: center; }
.responsible-note strong { color: var(--us-gold-light); }

/* Promo */
.promo-wrap { padding: 0 0 64px; background: #eee8df; }
.promo-banner {
  position: relative; min-height: 270px; overflow: hidden; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center;
  color: #fff; background: radial-gradient(circle at 85% 18%, rgba(255,210,87,.22), transparent 27%), linear-gradient(120deg, #310003 0%, #9c000c 50%, #3a0003 100%);
  border: 2px solid var(--us-gold); border-radius: 18px; box-shadow: var(--us-shadow);
}
.promo-banner::before, .promo-banner::after { content: ""; position: absolute; width: 520px; height: 3px; background: linear-gradient(90deg, transparent, rgba(255,225,119,.9), transparent); transform: rotate(-19deg); }
.promo-banner::before { top: 52px; left: -120px; }
.promo-banner::after { bottom: 42px; right: -100px; }
.promo-copy { position: relative; z-index: 2; padding: 44px 54px; }
.promo-copy small { color: var(--us-gold-light); font-weight: 800; letter-spacing: 3px; }
.promo-copy h2 { margin: 10px 0 16px; font-size: clamp(36px, 5vw, 58px); line-height: 1.05; text-wrap: balance; }
.promo-copy p { margin: 0; max-width: 560px; color: #f5e7e3; }
.device-showcase { position: relative; z-index: 2; min-height: 270px; display: grid; place-items: center; padding: 28px; }
.desktop-frame { width: 330px; max-width: 90%; aspect-ratio: 1.55; padding: 11px; border-radius: 16px; background: linear-gradient(145deg, #2b2b2b, #060606); border: 3px solid #cbc0ae; box-shadow: 0 18px 38px rgba(0,0,0,.45); }
.desktop-screen { height: 100%; display: grid; place-items: center; background: linear-gradient(145deg, #4c0005, #a5000c 55%, #240003); border: 1px solid var(--us-gold); }
.desktop-screen .brand { min-width: 0; transform: scale(.82); }
.desktop-base { width: 110px; height: 12px; margin: 12px auto 0; background: #ada79f; border-radius: 50%; }
.phone-frame { position: absolute; left: 9%; bottom: 25px; width: 74px; height: 150px; padding: 6px; background: #111; border: 2px solid #ddd1bd; border-radius: 17px; transform: rotate(-3deg); box-shadow: 0 15px 28px rgba(0,0,0,.38); }
.phone-screen { height: 100%; display: grid; place-items: center; color: var(--us-gold-light); background: linear-gradient(165deg, #80000a, #1f0003); border-radius: 11px; font-weight: 950; font-size: 12px; }

/* Content and footer */
.content-shell { width: min(calc(100% - 48px), 900px); margin: 48px auto; padding: 38px; background: #fff; border: 1px solid #e4dbd0; border-radius: var(--us-radius); box-shadow: 0 12px 38px rgba(31,15,8,.08); }
.content-shell h1 { color: #730007; line-height: 1.2; }
.content-shell a { color: #9a000b; text-decoration: underline; text-decoration-color: var(--us-gold); }
.site-footer { color: #fff; background: #050505; border-top: 1px solid var(--us-gold); }
.footer-main { display: grid; grid-template-columns: 1.3fr auto; align-items: center; gap: 32px; min-height: 104px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 22px; color: #e9e1da; font-weight: 650; }
.footer-nav a:hover { color: var(--us-gold-light); }
.footer-label { justify-self: end; padding-left: 28px; border-left: 1px solid rgba(215,163,22,.65); color: #ddd0c8; font-size: 13px; text-align: right; }
.footer-brand { padding: 38px 24px 44px; text-align: center; border-top: 1px solid rgba(215,163,22,.45); }
.footer-brand .brand { display: inline-flex; min-width: 0; transform: scale(1.15); transform-origin: center; }
.footer-meta { margin-top: 28px; color: #8f8883; font-size: 12px; }

/* Focus and reduced motion */
:focus-visible { outline: 3px solid var(--us-gold-light); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

@media (max-width: 980px) {
  body.admin-bar .site-header { top: 46px; }
  .header-inner { min-height: 70px; }
  .brand { min-width: 0; }
  .brand-name { font-size: 23px; }
  .brand-domain { display: none; }
  .menu-toggle { display: block; }
  .header-cta { display: none; }
  .primary-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; padding: 14px 24px 20px; background: #080808; border-bottom: 1px solid var(--us-gold); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: grid; gap: 5px; }
  .primary-nav a { width: 100%; }
  .hero, .hero-inner { min-height: 500px; }
  .hero { background-position: 58% center; }
  .hero-inner { grid-template-columns: minmax(0, 62%) 1fr; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pgsoft-guide-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr auto; padding-block: 26px; }
}

@media (max-width: 720px) {
  .us-container { width: min(calc(100% - 32px), var(--us-container)); }
  .brand-mark { width: 48px; border-radius: 15px 7px 15px 7px; }
  .brand-name { font-size: 20px; }
  .hero { background-position: 68% center; }
  .hero::after { background: linear-gradient(90deg, rgba(16,0,1,.96) 0%, rgba(73,0,5,.78) 58%, rgba(73,0,5,.24) 100%); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { padding-block: 58px 190px; }
  .hero h1 { font-size: clamp(40px, 12vw, 58px); }
  .hero p { font-size: 16px; }
  .hero .button-primary { width: 100%; min-width: 0; }
  .game-tabs { grid-template-columns: repeat(2, 1fr); }
  .pgsoft-home-content { padding-block: 56px; }
  .pgsoft-intro { grid-template-columns: 1fr; }
  .pgsoft-intro p, .pgsoft-guide-card { padding: 23px 20px; }
  .content-heading .eyebrow::before, .content-heading .eyebrow::after { width: 42px; }
  .section-heading::before, .section-heading::after { width: 45px; }
  .section-heading h2::before, .section-heading h2::after { display: none; }
  .promo-banner { grid-template-columns: 1fr; }
  .promo-copy { padding: 38px 28px 12px; text-align: center; }
  .device-showcase { min-height: 240px; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-label { justify-self: start; border-left: 0; padding-left: 0; text-align: left; }
  .footer-nav { padding-top: 20px; border-top: 1px solid rgba(215,163,22,.3); }
  .content-shell { width: min(calc(100% - 32px), 900px); padding: 24px; }
}

@media (max-width: 430px) {
  .header-inner { gap: 12px; }
  .brand-name { font-size: 18px; }
  .brand-mark { width: 44px; }
  .game-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 170px; }
  .game-tab { min-height: 52px; font-size: 16px; }
}
