/* ==========================================================================
   Layout - Structure, Header, Navigation, Footer, Breadcrumbs
   ParhaatNettikasinot.ai
   Class names match HTML templates exactly (flat naming, no BEM)
   ========================================================================== */

/* ------------------------------------------------------------------
   Container
   ------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* ------------------------------------------------------------------
   Page structure
   ------------------------------------------------------------------ */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.site-main {
  flex: 1;
  min-height: calc(100vh - 72px);
  background-color: var(--color-bg);
}

/* ------------------------------------------------------------------
   HEADER (Sticky) — identical to index.html
   ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15,23,42,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo img {
  flex-shrink: 0;
}

.logo-text span {
  color: #10b981;
}

.main-nav {
  display: none;
  align-items: center;
  gap: 0;
}

.main-nav a {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  color: #94a3b8;
  transition: color 0.3s ease;
  position: relative;
  padding: 4px 10px;
}

.main-nav a:hover {
  color: #f8fafc;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #10b981;
  transition: width 0.3s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

.header-cta {
  display: none;
  align-items: center;
  gap: 6px;
  margin-left: 32px;
  padding: 8px 16px;
  background: #10b981;
  color: #fff;
  font-size: 0.8rem;
  white-space: nowrap;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
}

.header-cta:hover {
  background: #059669;
  transform: translateY(-1px);
}

.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #f8fafc;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  z-index: 1001;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background: rgba(15,23,42,0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.mobile-nav.active {
  max-height: 400px;
}

.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  padding: 16px 24px 24px;
  gap: 4px;
}

.mobile-nav-inner a {
  display: block;
  padding: 12px 0;
  font-size: 1rem;
  font-weight: 500;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 0.3s ease;
}

.mobile-nav-inner a:last-child {
  border-bottom: none;
}

.mobile-nav-inner a:hover {
  color: #10b981;
}

.mobile-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  padding: 14px 20px;
  background: #10b981;
  color: #fff !important;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  transition: background 0.3s ease;
}

.mobile-nav-cta:hover {
  background: #059669;
}

/* Body scroll lock when mobile nav open */
body.nav-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* Mobile overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active {
  display: block;
  opacity: 1;
}

/* ------------------------------------------------------------------
   BREADCRUMBS
   HTML: nav.breadcrumb > ol > li > a  (li[aria-current="page"] for current)
   ------------------------------------------------------------------ */
.breadcrumb {
  padding: var(--space-4) 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.breadcrumb li + li::before {
  content: var(--breadcrumb-separator);
  color: var(--color-text-light);
  font-size: var(--font-size-xs);
}

.breadcrumb a {
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  padding: var(--space-1) 0;
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb li[aria-current="page"] {
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
}

/* ------------------------------------------------------------------
   FOOTER (matches index.php home-footer design)
   HTML: .site-footer > .container >
         .footer-grid > .footer-brand + .footer-col (h4, a)
         hr.footer-divider
         .footer-bottom > .footer-bottom-inner >
           .payment-icons + .footer-disclaimer
   ------------------------------------------------------------------ */
.site-footer {
  background: #0a0f1a;
  padding: 64px 0 0;
}

/* Footer grid */
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}

/* Footer brand */
.footer-brand {
  max-width: none;
}

.footer-brand p {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.7;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.footer-logo img {
  height: 36px;
  width: auto;
  flex-shrink: 0;
}

.footer-logo .logo-text span {
  color: #10b981;
}

/* Footer link columns */
.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: #64748b;
  padding: 5px 0;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: #10b981;
}

/* Footer divider */
.footer-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin: 0;
}

/* Footer bottom */
.footer-bottom {
  padding: 28px 0;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

/* Payment icons */
.payment-icons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.payment-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 500;
}

.age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid #ef4444;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 800;
  color: #ef4444;
}

/* Footer disclaimer */
.footer-disclaimer {
  max-width: 600px;
}

.footer-disclaimer .copyright {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 6px;
}

.footer-disclaimer .disclaimer-text {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.6;
  opacity: 0.7;
}

/* ------------------------------------------------------------------
   HERO SECTION (index.php)
   HTML: .hero-section > .container > h1 + .hero-subtitle
   ------------------------------------------------------------------ */
.hero-section {
  background: var(--gradient-hero);
  color: var(--color-text-inverse);
  padding: var(--space-10) 0 var(--space-12);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 30% 0%, rgba(64, 145, 108, 0.3) 0%, transparent 70%);
  pointer-events: none;
}

.hero-section .container {
  position: relative;
  z-index: var(--z-above);
  max-width: 800px;
}

.hero-section h1 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--space-4);
  line-height: var(--line-height-tight);
  color: #FFFFFF;
}

.hero-section h1 span {
  color: var(--color-accent);
}

.hero-subtitle {
  font-size: var(--font-size-md);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-8);
  line-height: var(--line-height-relaxed);
}

/* ------------------------------------------------------------------
   PAGE HERO (full-width header for subpages)
   HTML: .page-hero > .container > .breadcrumb + h1 + .page-hero-desc
   ------------------------------------------------------------------ */
.page-hero {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  padding: var(--space-8) 0 var(--space-12);
  text-align: center;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 30% 0%, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero .breadcrumb {
  justify-content: center;
  margin-bottom: var(--space-6);
}

.page-hero .breadcrumb ol {
  justify-content: center;
}

.page-hero h1 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-extrabold);
  color: #FFFFFF;
  margin-bottom: var(--space-4);
  line-height: var(--line-height-tight);
}

.page-hero-desc {
  font-size: var(--font-size-md);
  color: rgba(255, 255, 255, 0.7);
  max-width: 640px;
  margin: 0 auto;
  line-height: var(--line-height-relaxed);
}

/* ------------------------------------------------------------------
   PAGE CONTENT (main content area for subpages)
   ------------------------------------------------------------------ */
.page-content {
  padding: var(--space-10) 0 var(--space-16);
  background-color: var(--color-bg);
  min-height: 50vh;
}

/* ------------------------------------------------------------------
   SECTION SPACING (Index page sections)
   ------------------------------------------------------------------ */
.categories-section,
.categories-section h2,
/* Alternate background for visual separation */
.categories-section {
  background-color: var(--color-bg-alt);
}

.tags-section {
  background-color: var(--color-bg-alt);
}

.description-section {
  background-color: var(--color-bg);
}

/* Mobile overflow prevention */
@media (max-width: 768px) {
  body, .site-wrapper, .site-main, main { overflow-x: hidden; max-width: 100%; }
  .container, .art-content, .article-content, .article-body, .prose, section { overflow-wrap: break-word; word-break: break-word; }
  .casino-features, .features { min-width: auto !important; }
  .feature, .bonus-text, .casino-cta, .kw-pill, .keyword-pill { white-space: normal !important; }
}
