/*
Theme Name: SUAY168
Theme URI: http://localhost/wordpress/
Author: SUAY168
Description: Tema majalah putih dengan slider artikel untuk SUAY168.
Version: 1.1.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pgbaht
Tags: blog, news, custom-logo, custom-menu, featured-images, threaded-comments
*/

:root {
  --navy: #0a1233;
  --red: #f84643;
  --ink: #0a1233;
  --bg: #f9f9fe;
  --text: #1a202c;
  --muted: #718096;
  --card: #ffffff;
  --line: #e2e8f0;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans Thai", "Sukhumvit Set", Thonburi, sans-serif;
  line-height: 1.7;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--red);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 20;
}
.skip:focus { top: 12px; }
.wrap { width: min(var(--max), calc(100vw - 32px)); max-width: 100%; margin: 0 auto; }
.topbar-inner, .nav-inner, .toptags-inner, .brand-inner, .catrail { min-width: 0; max-width: 100%; }
.trend { flex: 1; min-width: 0; }

.topbar { background: var(--navy); color: var(--ink); font-size: 13px; }
.topbar-inner {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.date-pill {
  background: #3dce4a;
  color: #10210f;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.trend { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trend a { color: var(--ink); text-decoration: none; font-weight: 700; }
.trend a:hover { text-decoration: underline; }
.loc { margin-left: auto; white-space: nowrap; opacity: 0.95; }

.brandbar { background: #fff; }
.brand-inner {
  min-height: 132px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
}
.logo { max-width: 280px; min-width: 0; }
.logo img { height: auto; width: 260px; max-width: 100%; max-height: 92px; object-fit: contain; }
.brand-inner > * { min-width: 0; }
.footer-brand { max-width: 180px; }
.footer-brand img { height: auto; width: 170px; max-width: 100%; }
.tagline { margin: 0; max-width: 520px; color: #1a202c; font-size: 18px; line-height: 1.45; font-weight: 700; }
.social { display: flex; gap: 10px; }
.social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
}
.social svg { width: 16px; height: 16px; fill: currentColor; }
.social .fb { background: #1877f2; }
.social .ig { background: #e1306c; }
.social .x { background: #111; }
.social .tt { background: #111; }

.rednav { background: var(--red); }
.nav-inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 8px 22px;
  flex-wrap: wrap;
}
.nav-inner a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}
.nav-inner a:hover { opacity: 0.85; }
.reg {
  margin-left: auto;
  background: #f0c14a !important;
  color: #10210f !important;
  padding: 8px 14px;
  border-radius: 4px;
  text-decoration: none;
}
.reg:hover { opacity: 1; filter: brightness(1.15); }

.toptags { background: transparent; border-bottom: 0; }
.toptags-inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: auto;
}
.tag-label {
  background: #3dce4a;
  color: #10210f;
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 700;
  white-space: nowrap;
}
.toptags a { color: #0a1233; text-decoration: none; white-space: nowrap; font-weight: 700; }
.toptags a:hover { color: var(--red); }

.featured { padding: 22px 0 8px; }
.feature-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 16px;
}
.feature {
  position: relative;
  display: block;
  min-height: 340px;
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background:
    radial-gradient(420px 180px at 20% 20%, rgba(61, 206, 74, 0.35), transparent 60%),
    radial-gradient(380px 200px at 80% 0%, rgba(240, 193, 74, 0.28), transparent 55%),
    #0a1233;
}
.feature img.mark {
  position: absolute;
  left: 50%;
  top: 28%;
  transform: translate(-50%, -50%);
  width: min(78%, 360px);
  height: auto;
  max-width: none;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.35));
}
.feature-shade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 54px 16px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.88) 42%);
}
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pill {
  background: #3dce4a;
  color: #10210f;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
}
.pill.alt { background: #21a366; }
.pill.gold { background: #e0a106; color: #1c1404; }
.feature h3 { margin: 0 0 6px; font-size: 26px; line-height: 1.35; }
.feature .meta, .mini .meta { margin: 0; color: #d7dbe7; font-size: 13px; }

.section { padding: 8px 0 18px; }
.section h2 {
  margin: 18px 0 12px;
  font-size: 26px;
  border-left: 4px solid #3dce4a;
  padding-left: 10px;
}
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.mini {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background:
    radial-gradient(240px 120px at 15% 20%, rgba(61, 206, 74, 0.35), transparent 60%),
    radial-gradient(200px 120px at 90% 0%, rgba(240, 193, 74, 0.3), transparent 55%),
    #121826;
}
.mini .mark {
  width: 70%;
  max-width: 220px;
  margin: 22px auto 0;
  height: auto;
}
.mini .feature-shade { position: relative; background: linear-gradient(transparent, #0b0f1c 30%); margin-top: auto; }
.mini h3 { margin: 0 0 6px; font-size: 18px; line-height: 1.4; }

.article-page { padding: 28px 0 48px; }
.article-card {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 28px 28px 36px;
}
.crumb { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.crumb a { color: var(--red); text-decoration: none; font-weight: 700; }
.crumb span[aria-hidden] { margin: 0 6px; }
.kicker { color: #178a28; font-weight: 700; margin: 0 0 8px; }
.article-card h1 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 40px); line-height: 1.35; }
.article-card .meta { color: var(--muted); margin: 0 0 18px; }
.article-hero {
  margin: 0 0 22px;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #07110c;
}
.article-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.prose h2 { color: var(--navy); font-size: 24px; margin: 28px 0 8px; }
.prose p, .prose li { font-size: 18px; }
.prose a { color: var(--red); font-weight: 700; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
th { background: #f7fafc; color: var(--navy); }
.related { margin-top: 28px; }
.related h2 { font-size: 22px; border-left: 4px solid #3dce4a; padding-left: 10px; }
.related ul { padding: 0; list-style: none; }
.related li { margin: 8px 0; }
.related a { color: var(--navy); font-weight: 700; text-decoration: none; }
.related a:hover { color: var(--red); }
.cta-row { margin-top: 22px; }
.cta-row a {
  display: inline-block;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 18px;
}

.site-footer { background: #fff; color: var(--text); margin-top: 28px; border-top: 1px solid var(--line); }
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 18px;
}
.footer-brand { max-width: 180px; }
.footer-brand img { height: auto; width: 170px; max-width: 100%; max-height: 64px; object-fit: contain; }
.footer-social { display: flex; gap: 10px; margin-left: auto; }
.footer-social a {
  width: 34px;
  height: 34px;
  border: 1px solid #1a202c;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #1a202c;
  text-decoration: none;
}
.footer-social svg { width: 14px; height: 14px; fill: currentColor; }
.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  padding: 8px 0 36px;
}
.footer-cols h2 {
  margin: 0 0 14px;
  color: #0a1233;
  font-size: 15px;
  letter-spacing: 0.04em;
}
.footer-cols p { margin: 0 0 14px; color: #1a202c; font-size: 15px; line-height: 1.55; }
.footer-cols a { color: #1a202c; text-decoration: none; }
.footer-more { color: #1f9d32 !important; font-weight: 700; text-decoration: none; }
.footer-more:hover { text-decoration: underline; }

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  padding: 22px 0 6px;
}
.hero > .feature { min-height: 460px; }
.hero-side { display: grid; gap: 16px; }
.hero-side .feature { min-height: 222px; }
.hero-side .feature h3 { font-size: 20px; }

.catrail {
  display: flex;
  gap: 12px;
  overflow: auto;
  padding: 18px 0 8px;
}
.catrail a {
  flex: 0 0 auto;
  min-width: 148px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  text-decoration: none;
}
.catrail strong { display: block; color: var(--navy); font-size: 16px; }
.catrail span { color: var(--muted); font-size: 13px; }
.catrail a:hover { border-color: var(--red); }

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
  padding-bottom: 12px;
}
.side { position: sticky; top: 12px; }
.widget {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.widget h2 {
  margin: 0 0 12px;
  font-size: 18px;
  border-left: 4px solid #3dce4a;
  padding-left: 8px;
}
.widget ol, .widget ul { margin: 0; padding-left: 18px; }
.widget li { margin: 8px 0; }
.widget a { color: var(--text); text-decoration: none; font-weight: 600; }
.widget a:hover { color: var(--navy); }
.search { display: grid; gap: 8px; }
.search label { font-weight: 700; }
.search input {
  width: 100%;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
}
.story {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.story .thumb {
  width: 168px;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 4px;
  background: #05080c;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.story .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center center; }
.story h3 { margin: 6px 0; font-size: 20px; line-height: 1.35; }
.story p { margin: 0; color: var(--muted); font-size: 15px; }
.story[hidden], .section[hidden] { display: none; }

@media (max-width: 980px) {
  .feature-grid, .post-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid .feature:first-child { grid-column: 1 / -1; min-height: 300px; }
  .brand-inner { grid-template-columns: 1fr auto; }
  .tagline { grid-column: 1 / -1; }
  .hero, .page-grid { grid-template-columns: 1fr; }
  .hero > .feature { min-height: 320px; }
  .side { position: static; }
}
@media (max-width: 680px) {
  .loc, .trend { display: none; }
  .brand-inner { grid-template-columns: 1fr; justify-items: start; }
  .logo img { height: 72px; }
  .feature-grid, .post-grid { grid-template-columns: 1fr; }
  .reg { margin-left: 0; }
  .article-card { padding: 18px 14px 28px; }
  .feature h3 { font-size: 22px; }
  .story { grid-template-columns: 1fr; }
  .story .thumb { height: 140px; }
}

.pagination { display: flex; gap: 8px; padding: 18px 0 8px; }
.pagination a, .pagination span {
  display: inline-block;
  min-width: 36px;
  text-align: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}
.pagination .current, .pagination a:hover { background: var(--red); color: #fff; border-color: var(--red); }
.archive-head { padding: 22px 0 0; }
.archive-head h1 { margin: 0 0 6px; font-size: clamp(28px, 4vw, 40px); }
.archive-head p { margin: 0; color: var(--muted); }
.prose img { height: auto; border-radius: 4px; }
.prose .wp-block-image { margin: 16px 0; }

.site-top { background: #f0c14a; color: #10210f; }
.site-top-inner { min-height: 49px; display: flex; align-items: center; gap: 16px; }
.date-chip {
  background: #3dce4a;
  color: #10210f;
  border-radius: 0 30px 30px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}
.trend-news { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.trend-news a { color: #10210f; text-decoration: none; }
.trend-news a:hover { text-decoration: underline; }
.site-loc { margin-left: auto; white-space: nowrap; font-size: 14px; }

.site-brand { background: #fff; }
.site-brand-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px 28px;
  align-items: center;
  padding: 22px 0 8px;
}
.site-brand .logo img { width: 280px; max-width: 100%; max-height: 110px; height: auto; background: transparent; }
.site-brand .tagline { grid-column: auto; min-width: 0; overflow-wrap: anywhere; }
.site-brand-inner > * { min-width: 0; }

.site-nav { background: #3dce4a; }
.site-nav-inner { min-height: 58px; display: flex; align-items: center; gap: 8px 22px; flex-wrap: wrap; }
.site-nav a { color: #10210f; text-decoration: none; font-weight: 700; }
.site-nav a:hover { opacity: 0.85; }
.site-nav .reg {
  margin-left: auto;
  background: #f0c14a;
  color: #10210f;
  border-radius: 4px;
  padding: 8px 14px;
}

.tag-label { background: #3dce4a; color: #10210f; border-radius: 20px; }

.feature-slider {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 8px auto 18px;
}
.feature-slider .slides { position: relative; aspect-ratio: 16 / 9; height: auto; border-radius: 6px; overflow: hidden; background: #0a1233; }
.feature-slider .slide {
  position: absolute;
  inset: 0;
  display: block;
  color: #fff;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.feature-slider .slide.is-active { opacity: 1; pointer-events: auto; }
.feature-slider .slide img.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  position: absolute;
  inset: 0;
}
.slide-shade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 70px 28px 24px;
  background: linear-gradient(transparent, rgba(0,0,0,.82) 46%);
}
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.badge {
  background: #3dce4a;
  color: #10210f;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 0 30px 30px;
  text-transform: uppercase;
}
.slide-shade h2 { margin: 0 0 8px; font-size: clamp(26px, 3vw, 40px); line-height: 1.25; color: #fff; }
.slide-shade .meta { margin: 0; color: #edf2f7; font-size: 14px; }
.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: #0a1233;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.slide-btn.prev { left: 12px; }
.slide-btn.next { right: 12px; }
.slide-dots { display: flex; justify-content: center; gap: 8px; padding: 12px 0 0; }
.slide-dots button {
  width: 10px; height: 10px; border-radius: 50%; border: 0; background: #cbd5e0; cursor: pointer;
}
.slide-dots button.is-active { background: #3dce4a; }

.block-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 12px; }
.block-head h2 { margin: 0; font-size: 28px; color: #0a1233; }
.h-slider { position: relative; }
.h-track { display: flex; gap: 16px; overflow: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 8px; }
.h-track::-webkit-scrollbar { display: none; }
.h-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 20px;
}
.cat-card {
  flex: 0 0 180px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.cat-card .thumb {
  height: 140px;
  display: grid;
  place-items: center;
  background: #05080c;
}
.cat-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.cat-card strong { display: block; padding: 10px 12px 0; color: #0a1233; }
.cat-card span { display: block; padding: 0 12px 12px; color: var(--muted); font-size: 13px; }

.mini-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 0;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background: #0a1233;
}
.mini-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center center; }
.mini-card .shade { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 12px 12px; background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.mini-card h3 { margin: 6px 0 0; font-size: 16px; line-height: 1.35; }

@media (max-width: 800px) {
  .site-loc, .trend-news { display: none; }
  .site-brand-inner { grid-template-columns: 1fr; }
  .site-nav .reg { margin-left: 0; }
  .feature-slider .slides { min-height: 0; }
  .footer-cols { grid-template-columns: 1fr; gap: 22px; }
}
