/**
 * WildSino - Dark Theme Stylesheet
 * ================================
 * Semantic structure: Base → Layout → Components → Responsive
 * Dark theme with high contrast for readability
 */

/* ========== CSS VARIABLES (Design Tokens) ========== */
:root {
  /* Dark theme color palette */
  --color-bg-primary: #0d1117;
  --color-bg-secondary: #161b22;
  --color-bg-tertiary: #21262d;
  --color-text-primary: #e6edf3;
  --color-text-secondary: #8b949e;
  --color-accent: #58a6ff;
  --color-accent-hover: #79b8ff;
  --color-border: #30363d;
  --color-overlay: rgba(13, 17, 23, 0.75);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.5;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;

  /* Breakpoints (used in media queries) */
  --breakpoint-mobile: 480px;
  --breakpoint-tablet: 768px;
  --breakpoint-desktop: 1024px;

  /* Banner heights */
  --banner-height-desktop: 400px;
  --banner-height-mobile: 280px;
}

/* ========== BASE / RESET ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

/* Mobile: lock screen orientation - prevents landscape on phones */
@media screen and (max-width: 768px) {
  html {
    /* Meta viewport handles scaling; this reinforces lock intent */
    -webkit-text-size-adjust: 100%;
  }
}

body {
  font-family: var(--font-sans);
  line-height: var(--line-height-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========== ACCESSIBILITY ========== */
/* Skip link - visible on focus for keyboard users */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--color-accent);
  color: var(--color-bg-primary);
  text-decoration: none;
  font-weight: 600;
  z-index: 9999;
  border-radius: 4px;
  transition: top 0.2s;
}

.skip-link:focus {
  top: var(--spacing-md);
  outline: 2px solid var(--color-accent-hover);
  outline-offset: 2px;
}

/* Hide visually but keep for screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========== LAYOUT - HEADER ========== */
.site-header {
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  padding: var(--spacing-md) var(--spacing-lg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-lg);
}

/* Logo component */
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

/* Navigation component */
.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: var(--spacing-xl);
}

.nav-list a {
  color: var(--color-text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-list a:hover,
.nav-list a:focus {
  color: var(--color-accent);
}

/* ========== BUTTON COMPONENT ========== */
.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  background: var(--color-accent);
  color: var(--color-bg-primary);
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover,
.btn:focus {
  background: var(--color-accent-hover);
  outline: 2px solid var(--color-accent-hover);
  outline-offset: 2px;
}

.btn-primary {
  /* Same as .btn, can add overrides */
}

.btn-cta {
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: 1.1rem;
}

.btn-small {
  padding: var(--spacing-xs) var(--spacing-md);
  font-size: 0.875rem;
}

/* ========== BREADCRUMBS ========== */
.breadcrumbs {
  padding: var(--spacing-xs) var(--spacing-lg);
  background: var(--color-bg-primary);
  border-bottom: 1px solid var(--color-border);
}

.breadcrumb-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

.breadcrumb-list li {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.breadcrumb-list li:not(:last-child)::after {
  content: "/";
  color: var(--color-text-secondary);
  margin-left: var(--spacing-sm);
}

.breadcrumb-list a {
  color: var(--color-accent);
  text-decoration: none;
}

.breadcrumb-list a:hover {
  text-decoration: underline;
}

/* ========== BANNER HERO ========== */
.banner-hero {
  position: relative;
  width: 100%;
  min-height: var(--banner-height-desktop);
  overflow: hidden;
}

/* Banner background - desktop version; top-aligned to avoid cropping hats/ears */
.banner-bg {
  position: absolute;
  inset: 0;
  background-image: url("../img/baner/baner.webp");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

/* Mobile: banner stretched to fill viewport - full width, proportional height */
@media screen and (max-width: 768px) {
  .banner-hero {
    min-height: 50vh;
  }

  .banner-bg {
    background-image: url("../img/baner/baner-mob.webp");
    background-position: center center;
    background-size: cover;
  }
}

/* CTA overlay - no darkening; banner shown in original colors/size */
.banner-cta-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: var(--spacing-xl);
  /* No overlay - banner displays in original form */
}

.banner-cta-content {
  max-width: 480px;
  padding: var(--spacing-xl);
  background: rgba(22, 27, 34, 0.85);
  border-radius: 12px;
  border: 1px solid var(--color-border);
}

/* Mobile: center the CTA block */
@media screen and (max-width: 768px) {
  .banner-cta-overlay {
    justify-content: center;
    align-items: center;
    padding: var(--spacing-md);
  }

  .banner-cta-content {
    text-align: center;
    max-width: 100%;
  }
}

.banner-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-primary);
}

.banner-subtitle {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-lg);
}

/* ========== MAIN CONTENT ========== */
.main-content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-lg);
  width: 100%;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-lg);
  color: var(--color-text-primary);
}

/* ========== POPULAR SLOTS GRID ========== */
/* 6 columns on desktop, 2 on tablet, 1-2 on mobile */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.slot-card {
  background: var(--color-bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.slot-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.slot-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.slot-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

/* Tablet: 3 columns */
@media screen and (max-width: 1024px) {
  .slots-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile: 2 columns */
@media screen and (max-width: 480px) {
  .slots-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }
}

/* ========== TABLE - RESPONSIVE ========== */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg-secondary);
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 400px;
}

.info-table th,
.info-table td {
  padding: var(--spacing-md) var(--spacing-lg);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.info-table th {
  background: var(--color-bg-tertiary);
  font-weight: 600;
  color: var(--color-text-primary);
}

.info-table td {
  color: var(--color-text-secondary);
}

.info-table tbody tr:hover {
  background: rgba(88, 166, 255, 0.05);
}

.info-table a {
  color: var(--color-accent);
}

/* Mobile: card-style table - each row becomes a card */
@media screen and (max-width: 768px) {
  .table-wrapper {
    overflow: visible;
  }

  .info-table,
  .info-table thead,
  .info-table tbody,
  .info-table th,
  .info-table td,
  .info-table tr {
    display: block;
  }

  .info-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .info-table tr {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--color-bg-tertiary);
  }

  .info-table td {
    border: none;
    padding: var(--spacing-sm) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
  }

  .info-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--color-text-primary);
  }

  .info-table td:last-child {
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
    margin-top: var(--spacing-sm);
  }

  .info-table td:last-child::before {
    display: none;
  }

  .info-table .btn-small {
    width: 100%;
    text-align: center;
  }
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-xl) var(--spacing-lg);
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

/* Payment logos - horizontal row */
.payment-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.payment-logos img {
  height: 28px;
  width: auto;
  object-fit: contain;
  filter: brightness(0.9);
}

.payment-logos img:hover {
  filter: brightness(1);
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

/* Mobile: smaller payment logos */
@media screen and (max-width: 480px) {
  .payment-logos {
    gap: var(--spacing-md);
  }

  .payment-logos img {
    height: 22px;
  }
}

/* ========== HAMBURGER MENU (Mobile) ========== */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--color-text-primary);
  transition: background 0.2s;
}

.menu-toggle:hover,
.menu-toggle:focus {
  background: var(--color-bg-tertiary);
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.menu-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile: hamburger layout - logo left, menu toggle right */
@media screen and (max-width: 768px) {
  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
  }

  .main-nav.is-open {
    max-height: 300px;
    opacity: 1;
  }

  .nav-list {
    flex-direction: column;
    padding: var(--spacing-md);
    gap: 0;
  }

  .nav-list li {
    border-bottom: 1px solid var(--color-border);
  }

  .nav-list li:last-child {
    border-bottom: none;
  }

  .nav-list a {
    display: block;
    padding: var(--spacing-md);
  }

  .header-inner {
    flex-wrap: nowrap;
    position: relative;
  }

  .btn-primary {
    display: none;
  }
}
/* ========== CONTENT SECTION ========== */
.content-section {
  margin-bottom: var(--spacing-xl);
  color: var(--color-text-secondary);
}

.content-section p {
  margin-bottom: var(--spacing-lg);
  line-height: 1.7;
}

.content-section h3 {
  margin: var(--spacing-lg) 0 var(--spacing-sm);
  color: var(--color-text-primary);
}

/* Lists */
.content-list {
  margin-bottom: var(--spacing-lg);
  padding-left: 1.2rem;
}

.content-list li {
  margin-bottom: var(--spacing-xs);
}
/* ========== FAQ (No JS) ========== */
.faq-section {
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.faq-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-lg);
  color: var(--color-text-primary);
}

.faq-list {
  display: grid;
  gap: var(--spacing-md);
}

/* One item */
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-bg-secondary);
  overflow: hidden;
}

/* Remove default marker */
.faq-item > summary {
  list-style: none;
}
.faq-item > summary::-webkit-details-marker {
  display: none;
}

.faq-question {
  cursor: pointer;
  padding: var(--spacing-md) var(--spacing-lg);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--spacing-md);

  color: var(--color-text-primary);
  font-weight: 600;
  line-height: 1.35;

  user-select: none;
  outline: none;
}

.faq-question:hover {
  background: rgba(88, 166, 255, 0.06);
}

.faq-item[open] .faq-question {
  background: rgba(88, 166, 255, 0.08);
  border-bottom: 1px solid var(--color-border);
}

/* Plus/chevron icon (CSS only) */
.faq-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-tertiary);
  position: relative;
  margin-top: 2px;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  background: var(--color-text-primary);
  transform: translate(-50%, -50%);
  border-radius: 1px;
  opacity: 0.9;
}

.faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

/* When open -> turn plus into minus */
.faq-item[open] .faq-icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
  opacity: 0;
}

/* Answer block */
.faq-answer {
  padding: var(--spacing-md) var(--spacing-lg);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.faq-answer p + p {
  margin-top: var(--spacing-sm);
}

.faq-answer ul,
.faq-answer ol {
  margin-top: var(--spacing-sm);
  padding-left: 1.2rem;
}

.faq-answer li {
  margin-bottom: var(--spacing-xs);
}

/* Smooth open animation (no JS) */
.faq-item .faq-answer {
  animation: faqFadeIn 160ms ease-out;
}

@keyframes faqFadeIn {
  from { opacity: 0; transform: translateY(-2px); }
  to   { opacity: 1; transform: translateY(0); }
}