/*
Theme Name: Thailand Lottery Minimal
Theme URI: https://example.com/thai-lottery-theme
Description: Ultra-clean, minimal, lightning-fast, mobile-first WordPress theme for Thailand Lottery Results, inspired by The Thaiger.
Version: 1.0.0
Author: DeepMind Antigravity
Author URI: https://example.com/
Text Domain: thai-lottery
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* -------------------------------------------------------------
   CSS RESET & VARIABLES
------------------------------------------------------------- */
:root {
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --color-bg: #FFFFFF;
  --color-text: #111111;
  --color-muted: #555555;
  --color-card-bg: #F5F5F5;
  --color-card-border: #E5E7EB;
  --color-accent-yellow: #EAB308;
  --color-accent-gold: #FFD700;
  --color-badge-bg: #FEF9C3;
  --color-badge-text: #854D0E;
  --color-dark-footer: #121214;
  --color-dark-footer-text: #A1A1AA;
  --color-highlight: #16A34A;
  --container-max-width: 980px;
  --card-radius: 12px;
  --transition-speed: 0.2s;
}

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

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

body {
  font-family: var(--font-primary);
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

a:hover {
  color: #2563EB;
}

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

button, input, select {
  font-family: inherit;
  font-size: inherit;
}

/* -------------------------------------------------------------
   CONTAINER & LAYOUT
------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.section-spacing {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

/* -------------------------------------------------------------
   HEADER & NAVIGATION
------------------------------------------------------------- */
.site-header {
  background: #FFFFFF;
  border-bottom: 1px solid var(--color-card-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.custom-site-logo {
  height: 80px;
  max-height: 84px;
  width: auto;
  object-fit: contain;
  display: block;
}

.logo-badge {
  background-color: #000000;
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.primary-navigation {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 20px;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  padding: 0;
}

.nav-links li {
  position: relative;
  list-style: none;
}

.nav-links a {
  color: #333333;
  padding: 8px 0;
  display: inline-block;
  position: relative;
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

.nav-links a:hover,
.nav-links li.current-menu-item > a,
.nav-links li.current_page_item > a,
.nav-links a.active {
  color: #000000;
}

.nav-links li.current-menu-item > a::after,
.nav-links li.current_page_item > a::after,
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #000000;
}

/* WordPress Sub-menu Dropdown Support */
.nav-links .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #FFFFFF;
  border: 1px solid var(--color-card-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  min-width: 180px;
  padding: 8px 0;
  list-style: none;
  display: none;
  z-index: 1000;
}

.nav-links li:hover > .sub-menu {
  display: block;
}

.nav-links .sub-menu li {
  padding: 0;
}

.nav-links .sub-menu a {
  padding: 8px 16px;
  display: block;
  font-size: 0.9rem;
  color: #4B5563;
  white-space: nowrap;
}

.nav-links .sub-menu a:hover {
  background-color: #F9FAFB;
  color: #000000;
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #000;
}

/* -------------------------------------------------------------
   HERO SECTION
------------------------------------------------------------- */
.hero-section {
  padding: 2.5rem 0 1.5rem 0;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #ECFDF5;
  color: #065F46;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 9999px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-badge .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.4);
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.2;
  color: #000000;
  margin-bottom: 0.85rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--color-muted);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* -------------------------------------------------------------
   RESULT DISPLAY SECTION (4 BIG CARDS)
------------------------------------------------------------- */
.results-container {
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.prize-card {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: var(--card-radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.prize-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.prize-card.card-featured {
  border-color: #D1D5DB;
  background-color: #FAFAFA;
}

.prize-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #666666;
  margin-bottom: 0.5rem;
}

.prize-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0.5rem 0;
}

.prize-number-large {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #000000;
  line-height: 1.1;
}

.prize-number-sub {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #000000;
  background: #FFFFFF;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--color-card-border);
}

.prize-reward {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.prize-badge-pill {
  background-color: var(--color-accent-yellow);
  color: #000000;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.more-awards-toggle-wrap {
  text-align: center;
  margin-top: 1.25rem;
}

.btn-toggle-awards {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #000000;
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition-speed) ease, transform 0.1s ease;
}

.btn-toggle-awards:hover {
  opacity: 0.9;
  color: #FFFFFF;
}

/* Secondary / Additional Awards Modal or Panel */
.secondary-awards-panel {
  display: none;
  background-color: #FFFFFF;
  border: 1px solid var(--color-card-border);
  border-radius: var(--card-radius);
  padding: 24px;
  margin-top: 1.5rem;
}

.secondary-awards-panel.is-open {
  display: block;
}

.awards-table-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.award-row-group {
  border-bottom: 1px solid var(--color-card-border);
  padding-bottom: 16px;
}

.award-row-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.award-row-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.award-number-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.award-tag {
  font-family: monospace, var(--font-primary);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: var(--color-card-bg);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--color-card-border);
}

/* -------------------------------------------------------------
   LOTTERY CHECKER TOOL
------------------------------------------------------------- */
.checker-tool-wrapper {
  background: #FAFAFA;
  border: 2px solid #E5E7EB;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.checker-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.checker-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.checker-header p {
  font-size: 0.95rem;
  color: var(--color-muted);
}

.checker-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #333333;
}

.form-control {
  background-color: #FFFFFF;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 1.05rem;
  font-weight: 600;
  outline: none;
  transition: border-color var(--transition-speed) ease;
  width: 100%;
}

.form-control:focus {
  border-color: #000000;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

.btn-checker-search {
  background-color: #000000;
  color: #FFFFFF;
  font-weight: 800;
  padding: 13px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--transition-speed) ease;
}

.btn-checker-search:hover {
  background-color: #222222;
}

.checker-result-box {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  display: none;
  font-weight: 600;
}

.checker-result-box.won {
  display: block;
  background-color: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
}

.checker-result-box.lost {
  display: block;
  background-color: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

.checker-result-box.error {
  display: block;
  background-color: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
}

/* -------------------------------------------------------------
   CONTENT SECTION & PRIZE STRUCTURE TABLE
------------------------------------------------------------- */
.content-article {
  font-size: 1.1rem;
  line-height: 1.7;
}

.content-article h2 {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: #000000;
}

.content-article p {
  margin-bottom: 1.25rem;
  color: #222222;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 10px;
  border: 1px solid var(--color-card-border);
}

.prize-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
  background-color: #FFFFFF;
}

.prize-table th {
  background-color: #F9FAFB;
  font-weight: 800;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-card-border);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: #4B5563;
}

.prize-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-card-border);
  color: #111111;
  font-weight: 500;
}

.prize-table tr:last-child td {
  border-bottom: none;
}

.prize-table tr:hover td {
  background-color: #F8F9FA;
}

.prize-table .prize-name {
  font-weight: 700;
}

.prize-table .prize-amount {
  font-weight: 800;
  color: #000000;
}

/* -------------------------------------------------------------
   HOW TO CHECK TICKET (NUMBERED STEPS 1-3)
------------------------------------------------------------- */
.steps-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 1.5rem;
}

.step-card {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: #000000;
  color: #FFFFFF;
  border-radius: 50%;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.step-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #000000;
}

.step-desc {
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.5;
}

/* -------------------------------------------------------------
   FAQ ACCORDION
------------------------------------------------------------- */
.faq-section {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.faq-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  text-align: center;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--color-card-border);
  border-radius: 10px;
  overflow: hidden;
  background-color: #FFFFFF;
  transition: border-color var(--transition-speed) ease;
}

.faq-item.is-active {
  border-color: #000000;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 16px 20px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #000000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-icon {
  font-size: 1.25rem;
  transition: transform var(--transition-speed) ease;
  font-weight: 400;
}

.faq-item.is-active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding: 0 20px 18px 20px;
  color: #444444;
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-item.is-active .faq-answer {
  display: block;
}

/* -------------------------------------------------------------
   ARCHIVE SECTION (PAST DRAWS)
------------------------------------------------------------- */
.archive-section {
  background-color: #FAFAFA;
  border-radius: 16px;
  padding: 2rem;
  margin-top: 3rem;
}

.archive-section h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
}

.past-draws-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  list-style: none;
}

.past-draw-item a {
  display: block;
  background: #FFFFFF;
  border: 1px solid var(--color-card-border);
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #111111;
  transition: all var(--transition-speed) ease;
}

.past-draw-item a:hover {
  border-color: #000000;
  transform: translateY(-1px);
}

/* -------------------------------------------------------------
   ADSENSE SLOTS
------------------------------------------------------------- */
.adsense-slot-wrapper {
  margin: 2rem auto;
  text-align: center;
  max-width: 728px;
  width: 100%;
}

.adsense-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.adsense-box-placeholder {
  min-height: 90px;
  background-color: #F3F4F6;
  border: 1px dashed #D1D5DB;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6B7280;
  font-size: 0.85rem;
  font-weight: 600;
}

/* -------------------------------------------------------------
   FOOTER (DARK, SLEEK)
------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-dark-footer);
  color: var(--color-dark-footer-text);
  padding: 3.5rem 0 2rem 0;
  margin-top: 4rem;
  font-size: 0.9rem;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #27272A;
}

.footer-brand h3 {
  color: #FFFFFF;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  line-height: 1.6;
  max-width: 400px;
}

.footer-col h4 {
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.footer-links li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--color-dark-footer-text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-speed) ease;
}

.footer-links a:hover,
.footer-links li.current-menu-item > a {
  color: #FFFFFF;
}

.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.disclaimer-note {
  max-width: 650px;
  line-height: 1.5;
  color: #71717A;
}

/* -------------------------------------------------------------
   MOBILE FIRST RESPONSIVENESS (98% Mobile Users Optimization)
------------------------------------------------------------- */
@media (max-width: 768px) {
  .header-inner {
    height: 76px;
  }

  .custom-site-logo {
    height: 60px;
    max-height: 64px;
  }

  .primary-navigation {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    width: 100%;
    background: #FFFFFF;
    border-bottom: 1px solid var(--color-card-border);
    padding: 16px 20px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.06);
  }

  .primary-navigation.is-mobile-open {
    display: block;
  }

  .nav-links {
    flex-direction: column;
    gap: 14px;
  }

  .nav-links .sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding: 6px 0 6px 14px;
    display: block;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .hero-title {
    font-size: 1.7rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .results-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .prize-card {
    padding: 1.25rem 1rem;
  }

  .prize-number-large {
    font-size: 2.25rem;
  }

  .checker-form {
    grid-template-columns: 1fr;
  }

  .btn-checker-search {
    width: 100%;
  }

  .steps-container {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .latest-posts-grid {
    grid-template-columns: 1fr !important;
  }
}

/* -------------------------------------------------------------
   LATEST POSTS GRID (3 COLUMNS, 2 ROWS = 6 POSTS)
------------------------------------------------------------- */
.latest-posts-section {
  margin-top: 2rem;
  margin-bottom: 2.5rem;
}

.section-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #000000;
}

.section-header-wrap h2 {
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #000000;
}

.latest-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.post-card-item {
  background: #FFFFFF;
  border: 1px solid var(--color-card-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.post-card-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.post-card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #F3F4F6;
  overflow: hidden;
}

.post-card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card-item:hover .post-card-thumb-wrap img {
  transform: scale(1.04);
}

.post-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #000000;
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.post-card-meta {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6B7280;
  margin-bottom: 6px;
}

.post-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.4;
  color: #111111;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.post-card-title a:hover {
  color: #2563EB;
}

.post-card-excerpt {
  font-size: 0.9rem;
  color: #4B5563;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.load-more-wrap {
  text-align: center;
  margin-top: 2rem;
}

.btn-load-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #FFFFFF;
  color: #000000;
  border: 2px solid #000000;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 12px 28px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}

.btn-load-more:hover {
  background-color: #000000;
  color: #FFFFFF;
}
