@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Lao:wght@400;500;600;700&family=Noto+Sans+Thai:wght@400;500;600;700&display=swap');

:root {
  --blue: #0c68c7;
  --blue-dark: #064c8f;
  --orange: #ff9700;
  --yellow: #ffc20d;
  --border: #333;
  --page-bg: #edf2f7;
  --text: #252525;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Noto Sans Lao", "Noto Sans Thai", sans-serif;
  color: var(--text);
  background: var(--page-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  width: min(1470px, calc(100% - 34px));
  margin: 10px auto 0;
  background: #fff;
}

.hero {
  width: 100%;
  aspect-ratio: 1470 / 335;
  min-height: 220px;
  background-image: url("images/as-scaled.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr) 340px;
  gap: 18px;
  padding: 14px 10px 30px;
  background: #eef3f8;
}

.sidebar,
.content {
  min-width: 0;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blue-bar {
  height: 52px;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, #0867c6, #2276cb);
  color: #fff;
  padding: 0 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.hamburger {
  appearance: none;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 24px;
  margin-right: 12px;
  cursor: pointer;
}

.mini-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}

.mini-logo {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
}

.crumb {
  margin-top: 20px;
  background: #e6e6e6;
  color: #ed1c24;
  padding: 14px;
  font-weight: 700;
}

.side-card {
  background: #fff;
  margin-top: 12px;
  overflow: hidden;
}

.side-card h2 {
  margin: 12px 12px 4px;
  font-size: 25px;
  line-height: 1.25;
  color: #111;
}

.side-card p {
  margin: 0 12px 14px;
  color: #555;
  font-size: 14px;
}

.ad-card {
  display: block;
  margin-top: 14px;
}

.ad-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #fff;
}

.placeholder-img {
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.9);
  font-weight: 700;
  background:
    linear-gradient(135deg, rgba(255,255,255,.15), transparent),
    linear-gradient(145deg, #7e99ac, #4e657a);
}

.placeholder-img.tall {
  height: 340px;
  background: linear-gradient(160deg, #ee7988, #f8c3c6 45%, #8ea0b1);
}

.placeholder-img.ad-one {
  height: 340px;
  background: linear-gradient(145deg, #1b9bd4, #0878bb 58%, #f14d1d);
}

.placeholder-img.ad-two {
  height: 430px;
  background: linear-gradient(145deg, #1a81a3, #d6e0e4 52%, #323d45);
}

.custom-container {
  display: block;
  width: 100%;
  border: 1px solid #555;
  border-radius: 10px;
  background-color: #fff;
  font-size: 18px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, .14);
  overflow: hidden;
  padding: 0 0 10px;
}

.custom-header {
  background: linear-gradient(to bottom, var(--orange), var(--yellow));
  color: #fff;
  padding: 13px 10px 12px;
  text-align: center;
  font-size: 18px;
  line-height: 1.6;
}

.custom-header strong {
  font-size: 21px;
}

.custom-numbers {
  display: flex;
  padding: 12px 10px 0;
  justify-content: center;
  margin-bottom: 14px;
  color: #333;
}

.custom-numbers div {
  background: linear-gradient(#fff, #f7f7f7);
  margin: 0 5px;
  border-radius: 5px;
  width: 58px;
  height: 77px;
  border: 1px solid #777;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
  font-weight: 700;
  font-size: 55px;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
}

#currentDate {
  font-size: 18px;
  text-align: center;
  font-weight: 700;
  color: #24304a;
  margin: 0 0 16px;
}

.custom-table {
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 17px;
  color: #333;
  width: 90%;
  table-layout: fixed;
}

.custom-table td {
  border: 1px solid #666;
  padding: 12px !important;
  text-align: center;
  width: 50%;
  background: #fbfbfb;
  color: #333;
}


.center-banner {
  min-height: 145px;
  display: flex;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e0e0e0;
}

.banner-text {
  flex: 1;
  padding: 25px 28px;
  background:
    linear-gradient(110deg, #fff 0 74%, transparent 74%),
    #fff;
}

.banner-text small {
  display: block;
  color: #777;
  margin-bottom: 8px;
}

.banner-text strong {
  display: block;
  color: #f01919;
  font-size: 27px;
  margin-bottom: 8px;
}

.banner-text span {
  color: #555;
}

.lottery-balls {
  width: 40%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e80027 0 40%, #ef1b3a 40% 100%);
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  transform: skewX(-12deg);
}

.lottery-balls::first-line {
  transform: skewX(12deg);
}

.mini-news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mini-news-grid article {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  padding: 8px;
}

.mini-news-grid p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.mini-thumb {
  background: linear-gradient(145deg, #9fc58d, #c9d4c7);
  min-height: 68px;
}


.history-section {
  background: #fff;
}

#custom-table-container {
  font-family: "Noto Sans Thai", "Noto Sans Lao", sans-serif;
  overflow-x: auto;
}

#custom-table-container table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

#custom-table-container th,
#custom-table-container td {
  border: 1px solid #555;
  padding: 10px 6px;
  text-align: center;
  color: #111;
  font-size: 15px;
  white-space: nowrap;
}

#custom-table-container th {
  background: linear-gradient(to bottom, var(--orange), var(--yellow));
  color: #fff;
  font-weight: 700;
}

#custom-table-container tbody tr:nth-child(even) td {
  background: #fafafa;
}

.loading-cell {
  padding: 20px !important;
  color: #777 !important;
}

.sidebar-right .ad-card:first-child {
  margin-top: 0;
}

.placeholder-img.right-ad.blue {
  height: 190px;
  background: linear-gradient(145deg, #00608e, #0a78af);
}

.placeholder-img.right-ad.car {
  height: 480px;
  background: linear-gradient(145deg, #4a5155, #23292e 55%, #d85a6f);
}

.news-site-card {
  margin-top: 16px;
  background: #fff;
}

.news-site-head {
  height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid #eee;
}

.news-site-head strong {
  font-size: 38px;
  color: #65734d;
  letter-spacing: -2px;
}

.placeholder-img.landscape {
  height: 190px;
  background: linear-gradient(165deg, #87b9e1 0 42%, #8ebd5f 42% 70%, #bc9f76 70%);
}

.news-site-card h3 {
  font-size: 19px;
  line-height: 1.35;
  margin: 14px;
  color: #222;
  text-align: left;
}

.news-site-card p {
  font-size: 13px;
  line-height: 1.55;
  margin: 0 14px 18px;
  color: #444;
}

.placeholder-img.building {
  height: 150px;
  margin: 0 14px 14px;
  background: linear-gradient(100deg, #d2c7a9, #ededed 50%, #6b9172);
}

@media (max-width: 1180px) {
  .page-grid {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .sidebar-right {
    display: none;
  }

  .hero {
    min-height: 180px;
  }
}

@media (max-width: 820px) {
  .site-shell {
    width: 100%;
    margin: 0;
  }

  .hero {
    min-height: 120px;
    background-size: cover;
  }

  .page-grid {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .sidebar-left {
    order: 2;
  }

  .content {
    order: 1;
  }

  .sidebar-right {
    display: block;
    order: 3;
  }

  .custom-numbers div {
    width: 48px;
    height: 66px;
    font-size: 45px;
    margin: 0 3px;
  }

  .mini-news-grid {
    grid-template-columns: 1fr;
  }

  #custom-table-container th,
  #custom-table-container td {
    font-size: 12px;
    padding: 8px 4px;
  }
}
