/* Poplife site chrome: header, nav, search, trending marquee, newsletter and footer.
   Shared by the homepage and article pages; page-specific styles live elsewhere. */
.poplife-header,
.poplife-header *,
.poplife-footer,
.poplife-footer * {
  box-sizing: border-box;
}

.poplife-header a,
.poplife-footer a {
  text-decoration: none;
}
@font-face {
  font-family: "Sunny Spells";
  src: url("/assets/fonts/sunny-spells.woff2") format("woff2");
  font-display: swap;
}

:root {
  --p-red: #ef2b2d;
  --p-red-dark: #b7151f;
  --p-red-soft: #fff1f2;
  --p-ink: #14151a;
  --p-text: #24252b;
  --p-muted: #70727c;
  --p-line: #e5e7ec;
  --p-soft: #f6f7f9;
  --p-panel: #ffffff;
  --p-dark: #15161b;
  --p-dark-2: #22232a;
  --p-shadow: 0 18px 44px rgba(20, 21, 26, .08);
}

.poplife-shell {
  width: min(1280px, calc(100% - 44px));
  margin: 0 auto;
}

.poplife-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid rgba(20, 21, 26, .08);
  box-shadow: 0 14px 40px rgba(20, 21, 26, .07);
}

.poplife-header-top {
  background: var(--p-dark);
  color: rgba(255, 255, 255, .7);
  font-size: .78rem;
}

.poplife-header-top .poplife-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  gap: 18px;
}

.poplife-header-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-family: "Kanit", sans-serif;
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .14em;
}

.poplife-header-kicker::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--p-red);
}

.poplife-header-date {
  color: rgba(255, 255, 255, .68);
  font-family: "Kanit", sans-serif;
  font-weight: 400;
}

.poplife-brandbar {
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.poplife-logo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 88px;
  padding-right: 24px;
  /* border-right: 1px solid var(--p-line); */
}

.poplife-logo img {
  width: 110px;
  height: auto;
  object-fit: contain;
  padding: 6px;
}

.poplife-nav-cluster {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
}

.poplife-brandbar nav,
.poplife-brandbar nav ul {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.poplife-brandbar nav {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  padding: 5px 2px;
  scrollbar-width: none;
}

.poplife-brandbar nav::-webkit-scrollbar {
  display: none;
}

.poplife-brandbar nav a,
.poplife-brandbar nav li a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  color: #26272e;
  font-family: "Sunny Spells", "Kanit", sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease;
}

.poplife-brandbar nav a::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 3px;
  background: var(--p-red);
  opacity: 0;
  transform: translateY(3px);
  transition: opacity .16s ease, transform .16s ease;
}

.poplife-brandbar nav a:hover {
  color: var(--p-red);
}

.poplife-brandbar nav a:hover::before {
  opacity: 1;
  transform: translateY(0);
}

.poplife-nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.poplife-nav-item > a::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 7px;
  border: 4px solid transparent;
  border-top-color: #9b9ca5;
  transform: translateY(2px);
}

.poplife-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  display: none;
  min-width: 190px;
  padding: 10px;
  border: 1px solid var(--p-line);
  background: #fff;
  box-shadow: 0 22px 54px rgba(20, 21, 26, .14);
}

.poplife-nav-item:hover .poplife-dropdown {
  display: block;
}

.poplife-dropdown a {
  display: block;
  font-family: "Kanit", sans-serif;
  min-height: 0;
  padding: 10px 12px;
  font-size: .88rem;
}

.poplife-dropdown a:hover {
  background: var(--p-red-soft);
}

.poplife-search {
  display: flex;
  align-items: center;
  flex: 0 0 270px;
  height: 44px;
  border: 1px solid var(--p-line);
  border-radius: 50em;
  background: #f8f9fb;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.poplife-search:focus-within {
  border-color: rgba(239, 43, 45, .36);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(239, 43, 45, .08);
}

.poplife-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 14px;
  color: var(--p-text);
  font-size: .92rem;
}

.poplife-search button {
  width: 46px;
  height: 42px;
  border: 0;
  /* background: var(--p-red); */
  background: radial-gradient(circle, rgb(255 0 53) 0%, rgba(239, 43, 45, 1) 100%);
  color: #fff;
  cursor: pointer;
  border-radius: 50em;
}

.poplife-trending {
    /* background: #f3f4f6; */
    background-color: #ef2b2d;
    color: #3d3f47;
    border-top: 1px solid var(--p-line);
    max-width: 1267px;
    margin: 0 auto;
    border-radius: 50em;
    margin-bottom: 20px;
}

.poplife-trending .poplife-shell {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
}

.poplife-trending-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 11px;
  background: var(--p-red);
  color: #fff;
  font-family: "Kanit", sans-serif;
  font-size: .78rem;
  font-weight: 400;
}

.poplife-trending-list {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  /* color: #50525c; */
  color: #eeeeee;
  font-size: .9rem;
  font-weight: 400;
  scrollbar-width: none;
}

.poplife-trending-list::-webkit-scrollbar {
  display: none;
}

.poplife-trending-list a {
  /* color: #30313a; */
  color: #eeeeee;
}

.poplife-trending-list a:hover,
.poplife-trending-list a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Headline marquee: two identical groups scroll left by exactly one group. */
.poplife-marquee-track {
  display: flex;
  width: max-content;
  animation: poplife-marquee 60s linear infinite;
  will-change: transform;
}

.poplife-marquee-group {
  flex: 0 0 auto;
  padding-right: .5em;
}

.poplife-trending-list:hover .poplife-marquee-track,
.poplife-trending-list:focus-within .poplife-marquee-track {
  animation-play-state: paused;
}

@keyframes poplife-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) { 
  .poplife-trending-list {
    overflow-x: auto;
  }

  .poplife-marquee-track {
    animation: none;
  }

  .poplife-marquee-group[aria-hidden="true"] {
    display: none;
  }
}

.poplife-footer {
  padding: 48px 0 0;
  background: var(--p-dark);
  color: rgba(255, 255, 255, .72);
}

/* Social media banner: dark card on the page background, just above the footer.
   Scoped so it does not clash with the legacy .social-banner / .footer-social styles. */
.poplife-social-section {
  padding: 40px 0 56px;
}

.poplife-social-section,
.poplife-social-section * {
  box-sizing: border-box;
}

.poplife-social-section .social-banner {
  margin: 0;
  padding: 30px 24px;
  border-radius: 10px;
  background: #1f1f22;
  text-align: center;
}

.poplife-social-section .social-banner__head {
  color: #fff;
  font-family: "Kanit", sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.4;
}

.poplife-social-section .footer-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 0;
}

.poplife-social-section .footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1rem;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease;
}

.poplife-social-section .footer-social a:hover,
.poplife-social-section .footer-social a:focus-visible {
  border-color: var(--p-red);
  background: var(--p-red);
}

.poplife-footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: 40px;
}

.poplife-footer-brand {
  min-width: 0;
}

.poplife-footer-logo {
  display: inline-block;
  margin-bottom: 14px;
}

.poplife-footer-logo img {
  display: block;
  width: 88px;
  height: auto;
}

.poplife-footer-tagline {
  display: grid;
  gap: 4px;
  max-width: 300px;
  margin: 0;
  font-family: "Kanit", sans-serif;
  font-weight: 400;
}

.poplife-footer-tagline__en {
  color: #fff;
  font-size: .98rem;
  letter-spacing: .01em;
  line-height: 1.4;
}

.poplife-footer-tagline__th {
  color: rgba(255, 255, 255, .58);
  font-size: .88rem;
  line-height: 1.65;
}

.poplife-footer-col {
  min-width: 0;
}

.poplife-footer-col h3 {
  display: inline-block;
  margin: 0 0 22px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--p-red);
  color: #fff;
  font-family: "Kanit", sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.3;
}

.poplife-footer-col ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.poplife-footer-col a {
  color: rgba(255, 255, 255, .72);
  font-family: "Kanit", sans-serif;
  font-size: .92rem;
  font-weight: 400;
  transition: color .16s ease;
}

.poplife-footer-col a:hover,
.poplife-footer-col a:focus-visible {
  color: #fff;
}

.poplife-footer-bottom {
  padding: 16px 0 20px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .45);
  font-size: .8rem;
}

@media (max-width: 1060px) { 
  .poplife-brandbar {
    gap: 20px;
  }

  .poplife-brandbar nav,
  .poplife-brandbar nav ul {
    gap: 6px;
  }

  .poplife-search {
    flex-basis: 220px;
  }
}

@media (max-width: 760px) { 
  .poplife-shell {
    width: min(100% - 28px, 1280px);
  }

  .poplife-header {
    position: static;
  }

  .poplife-brandbar {
    min-height: auto;
    padding: 12px 0;
    gap: 14px;
  }

  .poplife-header-top .poplife-shell {
    min-height: 30px;
  }

  .poplife-logo {
    min-height: 0;
    padding-right: 0;
    border-right: 0;
  }

  .poplife-logo img {
    width: 88px;
    height: 48px;
  }

  .poplife-brandbar nav {
    display: none;
  }

  .poplife-search {
    flex: 1;
    height: 40px;
  }

  .poplife-trending {
    width: calc(100% - 28px);
    margin-left: auto;
    margin-right: auto;
  }

  .poplife-trending .poplife-shell {
    gap: 10px;
    padding: 8px 0;
  }

  .poplife-footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 20px;
    padding-bottom: 32px;
  }

  .poplife-footer-brand {
    grid-column: 1 / -1;
  }

  .poplife-footer-tagline {
    max-width: none;
  }

  .poplife-footer-col h3 {
    margin-bottom: 16px;
  }
}

@media (max-width: 1060px) { 
  .poplife-brandbar {
    flex-wrap: wrap;
    min-height: 0;
    column-gap: 20px;
    row-gap: 0;
  }

  .poplife-logo {
    min-height: 76px;
    padding-right: 0;
  }

  .poplife-search {
    flex: 0 1 300px;
    margin-left: auto;
  }

  /* Menu gets its own full-width row that scrolls sideways when needed. */
  .poplife-nav-cluster {
    order: 3;
    flex: 1 0 100%;
    border-top: 1px solid var(--p-line);
  }

  .poplife-brandbar nav {
    display: flex;
    gap: 2px;
    margin: 0 -10px;
    padding: 4px 28px 4px 0;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
  }

  .poplife-brandbar nav a,
  .poplife-brandbar nav li a {
    min-height: 44px;
    padding: 0 10px;
    font-size: 1.3rem;
    scroll-snap-align: start;
  }

  .poplife-brandbar nav a::before {
    left: 10px;
    right: 10px;
  }
}

@media (max-width: 760px) { 
  .poplife-brandbar {
    padding: 0;
    column-gap: 12px;
  }

  .poplife-logo {
    min-height: 64px;
  }

  .poplife-logo img {
    width: 76px;
    height: auto;
    padding: 4px;
  }

  .poplife-search {
    flex: 1 1 auto;
    max-width: 260px;
    height: 40px;
  }

  .poplife-search button {
    width: 40px;
    height: 38px;
  }

  .poplife-brandbar nav {
    display: flex;
  }

  .poplife-brandbar nav a,
  .poplife-brandbar nav li a {
    min-height: 42px;
    font-size: 1.15rem;
  }
}

@media (max-width: 430px) { 

  .poplife-search input {
    padding: 0 10px;
    font-size: .88rem;
  }
}


@media (min-width: 761px) and (max-width: 1060px) {
  .poplife-footer-main {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .poplife-footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .poplife-social-section {
    padding: 28px 0 36px;
  }

  .poplife-social-section .social-banner {
    padding: 24px 16px;
  }
}

.poplife-footer-contact a {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  overflow-wrap: anywhere;
}

.poplife-footer-contact .bi {
  margin-top: 2px;
  color: var(--p-red);
}
