/* ==========================================================================
   ANG PAO (อั่งเปา) — MAIN DESIGN SYSTEM
   Theme: Chinese New Year Festive Dynasty (Crimson Red, Sun Yellow & 24K Gold)
   ========================================================================== */

:root {
  --bg-primary: #FFFBEB;
  --bg-cream: #FFFBEB;
  --bg-secondary: #FEF2F2;
  --bg-stage: linear-gradient(135deg, #7A0C10 0%, #C41E24 50%, #981216 100%);
  --surface-white: #FFFFFF;
  --surface-soft-red: #FFF1F2;
  --brand-red: #C41E24;
  --brand-red-dark: #981216;
  --brand-burgundy: #7A0C10;
  --brand-burgundy-deep: #450A0A;
  --royal-yellow: #FACC15;
  --royal-yellow-light: #FEF08A;
  --gold-24k: #FFD700;
  --gold-dark: #B45309;
  --gold-gradient: linear-gradient(135deg, #FEF08A 0%, #FFD700 50%, #D97706 100%);
  --red-gradient: linear-gradient(135deg, #981216 0%, #C41E24 50%, #DC2626 100%);
  --jade-green: #059669;
  --jade-light: #D1FAE5;
  --amber-cons: #D97706;
  --text-primary: #1F0709;
  --text-secondary: #3B1014;
  --text-muted: #681D23;
  --text-on-red: #FFFBEB;
  --border-gold: #FCD34D;
  --border-red: #FCA5A5;
  --shadow-card: 0 10px 28px rgba(122, 12, 16, 0.10);
  --shadow-hover: 0 16px 36px rgba(122, 12, 16, 0.18);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;
  --container-width: 1260px;
  --font-heading: 'Kanit', sans-serif;
  --font-body: 'Prompt', 'Kanit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  background-image: radial-gradient(rgba(196, 30, 36, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

ul, ol {
  list-style-position: inside;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.28;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.4rem, 2.3vw, 1.95rem);
  font-weight: 700;
  margin-bottom: 0.85rem;
}

h3 {
  font-size: clamp(1.12rem, 1.5vw, 1.32rem);
  font-weight: 700;
  margin-bottom: 0.55rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

code {
  font-family: var(--font-mono);
  background: var(--surface-soft-red);
  color: var(--brand-red-dark);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.88em;
}

/* Top Announcement Bar */
.top-bar {
  background: var(--brand-burgundy-deep);
  color: #FEF08A;
  font-size: 0.8rem;
  border-bottom: 1.5px solid var(--border-gold);
  padding: 7px 0;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.top-bar-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--royal-yellow);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
}

.top-bar-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-bar-links a {
  color: #FEE2E2;
  font-weight: 500;
}

.top-bar-links a:hover {
  color: var(--royal-yellow);
}

/* Sticky Header (Imperial Crimson Red with 24K Gold Trim) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #7A0C10 0%, #C41E24 50%, #7A0C10 100%);
  border-bottom: 2.5px solid var(--border-gold);
  color: var(--text-on-red);
  box-shadow: 0 6px 20px rgba(122, 12, 16, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 16px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #FFFFFF;
}

.logo-mascot-img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--border-gold);
  background: #7A0C10;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.logo-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-main {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #FEF08A;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-main span {
  color: #FFFFFF;
  -webkit-text-fill-color: #FFFFFF;
}

.logo-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: #FEF08A;
  font-weight: 700;
}

/* Desktop Navigation & Dropdowns */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  font-family: var(--font-heading);
  font-size: 0.94rem;
  font-weight: 600;
  color: #FFFBEB;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.dropdown-arrow {
  font-size: 0.65rem;
  opacity: 0.8;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: #FFFFFF;
  background-color: rgba(254, 240, 138, 0.2);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 320px;
  background-color: var(--surface-white);
  color: var(--text-primary);
  border: 2px solid var(--border-gold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 1100;
}

.nav-item:hover .dropdown-menu,
.nav-item:focus-within .dropdown-menu,
.nav-item.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border-bottom: 1px dashed var(--border-red);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover,
.dropdown-item:focus-visible {
  background-color: var(--surface-soft-red);
}

.dropdown-title {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brand-red-dark);
}

.dropdown-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Top-Right Action Buttons (เข้าสู่ระบบ & สมัครสมาชิก) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-header-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1.8px solid var(--border-gold);
  background-color: rgba(255, 255, 255, 0.12);
  color: #FEF08A;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}

.btn-header-login:hover,
.btn-header-login.active {
  background-color: #FFFFFF;
  color: var(--brand-red-dark);
}

.btn-header-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  background: var(--gold-gradient);
  color: #2D0A0D;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 800;
  border: 1.8px solid #FEF08A;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.5);
  white-space: nowrap;
}

.btn-header-register:hover,
.btn-header-register.active {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.7);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid var(--border-gold);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
}

.hamburger-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: #FEF08A;
  border-radius: 2px;
}

.mobile-nav-drawer {
  display: none;
  background: var(--brand-burgundy);
  color: #FFFBEB;
  border-top: 1px solid var(--border-gold);
  border-bottom: 3px solid var(--border-gold);
  padding: 16px 24px 24px;
}

.mobile-nav-drawer.is-open {
  display: block;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(252, 211, 77, 0.3);
}

.mobile-brand-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: #FEF08A;
}

.mobile-drawer-close {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid var(--border-gold);
  color: #FEF08A;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.mobile-drawer-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav-link {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: #FFFBEB;
  font-family: var(--font-heading);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-nav-link:hover {
  background: rgba(254, 240, 138, 0.2);
  color: var(--royal-yellow);
}

/* Section Layout Helpers */
.section-block {
  padding: 52px 0;
}

.bg-festive-tint {
  background: linear-gradient(180deg, #FEF2F2 0%, #FFFBEB 100%);
  border-top: 1.5px solid var(--border-red);
  border-bottom: 1.5px solid var(--border-red);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border-red);
}

.section-header.text-center {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
}

.section-header.text-center .section-desc {
  margin: 0 auto;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand-red-dark);
  margin-bottom: 6px;
}

.section-title {
  color: var(--text-primary);
  margin-bottom: 6px;
}

.text-red {
  color: var(--brand-red);
}

.text-gold {
  color: var(--gold-dark);
}

.section-desc {
  max-width: 800px;
  margin-bottom: 0;
  font-size: 1rem;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.breadcrumb-nav a {
  color: var(--brand-red-dark);
  font-weight: 700;
}

.breadcrumb-nav a:hover {
  text-decoration: underline;
}

.breadcrumb-nav .sep {
  color: var(--text-muted);
}

/* Deep Burgundy Chinese New Year Footer (100% High-Contrast Light Text) */
.site-footer {
  background: linear-gradient(180deg, #7A0C10 0%, #450A0A 100%);
  color: #FFFBEB;
  padding: 56px 0 32px;
  margin-top: 48px;
  border-top: 3px solid var(--border-gold);
}

.site-footer p {
  color: #FFFBEB;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand-name {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: #FEF08A;
}

.footer-brand-name span {
  color: #FFFFFF;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 32px;
  margin-bottom: 36px;
}

.footer-desc {
  color: #FFFBEB !important;
  font-size: 0.94rem;
  line-height: 1.65;
  margin-top: 14px;
}

.footer-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.trust-pill {
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid var(--border-gold);
  color: #FEF08A;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.footer-col-title {
  color: #FACC15 !important;
  font-size: 1.08rem;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: #FEF08A;
  font-size: 0.92rem;
  font-weight: 500;
}

.footer-links a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.footer-disclaimer {
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(252, 211, 77, 0.55);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 0.88rem;
  color: #FFFBEB !important;
  margin-bottom: 24px;
  line-height: 1.65;
}

.footer-disclaimer p {
  color: #FFFBEB !important;
  margin-bottom: 0;
}

.footer-disclaimer strong {
  color: #FEF08A !important;
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid rgba(254, 240, 138, 0.3);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.88rem;
  color: #FDE68A !important;
}

.footer-bottom p {
  color: #FDE68A !important;
  margin-bottom: 0;
  font-weight: 500;
}
