/* WOOFIE HEADER — Clean, iPad-friendly */
/* Landscape: Logo | Nav | Spacer | Play Button (RIGHT) */
/* Portrait: Logo | Spacer | Play Button | Burger */
/* Narrow Landscape: Logo | Spacer | Play Button | Burger (RIGHT) */

/* ========================== RESET EVERYTHING ========================== */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
}

/* ========================== HEADER BASE ========================== */
header.site-header,
#woofie-hdr {
  background: linear-gradient(90deg, #FFA23A, #FFD84A, #7ED957, #3DBBFF, #8E5CFF) !important;
  position: relative;
  z-index: 1000;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  padding: 0 !important;
}

/* Remove white band at top */
.wp-site-blocks,
#page,
.site {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ========================== HEADER INNER LAYOUT ========================== */
header.site-header .header-inner,
#woofie-hdr .hdr-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 8px 16px;
  flex-wrap: nowrap;
  box-sizing: border-box;
}

/* Neutralize any helper that pushes items to the far right */
header.site-header .header-actions {
  margin-left: 0 !important;
  display: contents !important;
}

/* ========================== LOGO ========================== */
header.site-header .brand,
header.site-header .site-branding,
header.site-header .custom-logo-link,
header.site-header .custom-logo,
.custom-logo,
.custom-logo-link img {
  height: 120px;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ========================== NAVIGATION ========================== */
header.site-header nav,
#woofie-hdr nav {
  flex-shrink: 0;
  margin: 0 !important;
  padding: 0 !important;
}

header.site-header nav ul,
#woofie-hdr nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 18px;
  align-items: center;
}

header.site-header nav a,
#woofie-hdr nav a {
  color: #111;
  font-weight: 800;
  text-decoration: none;
  padding: 8px 4px;
  border-radius: 8px;
  transition: text-decoration 0.2s;
  display: inline-block;
  line-height: 1.2;
}

header.site-header nav a:hover,
#woofie-hdr nav a:hover {
  text-decoration: underline;
}

/* ========================== SPACER ========================== */
header.site-header .hdr-spacer,
#woofie-hdr .hdr-spacer {
  flex: 1;
  display: none;
}

@media (min-width: 1024px) {
  header.site-header .hdr-spacer,
  #woofie-hdr .hdr-spacer {
    display: block;
  }
}

/* ========================== PLAY BUTTON ========================== */
header.site-header .header-play-btn,
header.site-header .btn-3d.play-latest,
#woofie-hdr .hdr-play,
#play-latest {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(180deg, #ff5a5f, #d91623);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px rgba(217, 22, 35, 0.3);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
  border-bottom-width: 0;
  position: static;
  transform: none;
  line-height: 1.2;
  visibility: visible !important;
  opacity: 1 !important;
  height: fit-content;
  flex-shrink: 0;
  margin: 0 !important;
}

header.site-header .header-play-btn:hover,
#woofie-hdr .hdr-play:hover,
#play-latest:hover {
  opacity: 0.9;
}

/* ========================== BURGER MENU ========================== */
header.site-header #menu-toggle,
#woofie-hdr #menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0 !important;
  margin-left: auto !important;
  gap: 5px;
}

header.site-header #menu-toggle span,
#woofie-hdr #menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: #111;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ========================== LANDSCAPE (WIDE) ========================== */
@media (orientation: landscape) and (min-width: 1024px) {
  header.site-header .header-inner,
  #woofie-hdr .hdr-inner {
    flex-direction: row;
    padding: 8px 16px;
  }

  /* Show nav */
  header.site-header nav,
  #woofie-hdr nav {
    display: block !important;
    position: static !important;
    background: transparent !important;
    box-shadow: none !important;
    flex-shrink: 0;
  }

  header.site-header nav ul,
  #woofie-hdr nav ul {
    display: flex !important;
    flex-direction: row !important;
    gap: 18px !important;
    align-items: center !important;
  }

  /* Hide burger in wide landscape */
  header.site-header #menu-toggle,
  #woofie-hdr #menu-toggle {
    display: none !important;
  }

  /* +30% logo & nav text in landscape */
  header.site-header .brand img,
  header.site-header .custom-logo,
  header.site-header .custom-logo-link img {
    height: 156px !important;
    width: auto !important;
  }

  header.site-header nav a {
    font-size: 21px !important;
    line-height: 1.2 !important;
  }

  header.site-header .header-play-btn,
  #play-latest {
    font-size: 16px !important;
  }
}

/* ========================== LANDSCAPE (NARROW) — Show burger RIGHT ========================== */
@media (orientation: landscape) and (max-width: 1023px) {
  header.site-header .header-inner,
  #woofie-hdr .hdr-inner {
    flex-direction: row;
    padding: 8px 16px;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
  }

  /* Hide nav in narrow landscape */
  header.site-header nav,
  #woofie-hdr nav {
    display: none !important;
  }

  /* Show drawer when menu is open */
  body.menu-open header.site-header nav,
  body.menu-open #woofie-hdr nav {
    display: block !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: #fff !important;
    padding: 12px 16px !important;
    border-radius: 0 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    z-index: 9999 !important;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
  }

  body.menu-open header.site-header nav ul,
  body.menu-open #woofie-hdr nav ul {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    align-items: flex-start !important;
  }

  /* Drawer links: black, bold, left-aligned */
  header.site-header nav a,
  #woofie-hdr nav a {
    color: #111 !important;
    font-weight: 700 !important;
    text-align: left !important;
  }

  /* Spacer fills middle */
  header.site-header .hdr-spacer,
  #woofie-hdr .hdr-spacer {
    display: block;
    flex: 1;
  }

  /* Play button */
  header.site-header .header-play-btn,
  header.site-header .btn-3d.play-latest,
  #woofie-hdr .hdr-play,
  #play-latest {
    flex-shrink: 0;
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  /* Show burger in narrow landscape — JUSTIFIED RIGHT */
  header.site-header #menu-toggle,
  #woofie-hdr #menu-toggle {
    display: flex !important;
    flex-shrink: 0;
    margin-left: 8px !important;
    z-index: 10001 !important;
  }
}

/* ========================== PORTRAIT ========================== */
@media (orientation: portrait) {
  header.site-header .header-inner,
  #woofie-hdr .hdr-inner {
    flex-direction: row;
    padding: 8px 12px;
  }

  /* Hide nav by default */
  header.site-header nav,
  #woofie-hdr nav {
    display: none !important;
  }

  /* Show drawer when menu is open — dropdown below header */
  body.menu-open header.site-header nav,
  body.menu-open #woofie-hdr nav {
    display: block !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: #fff !important;
    padding: 12px 16px !important;
    border-radius: 0 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    z-index: 9999 !important;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
  }

  body.menu-open header.site-header nav ul,
  body.menu-open #woofie-hdr nav ul {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    align-items: flex-start !important;
  }

  /* Drawer links: black, bold, left-aligned */
  header.site-header nav a,
  #woofie-hdr nav a {
    color: #111 !important;
    font-weight: 700 !important;
    text-align: left !important;
  }

  /* Play button */
  header.site-header .header-play-btn,
  header.site-header .btn-3d.play-latest,
  #woofie-hdr .hdr-play,
  #play-latest {
    flex-shrink: 0;
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  /* Show burger in portrait */
  header.site-header #menu-toggle,
  #woofie-hdr #menu-toggle {
    display: flex !important;
    flex-shrink: 0;
    margin-left: 8px !important;
    z-index: 10001 !important;
  }
}

/* ========================== SMALL PHONES ========================== */
@media (max-width: 420px) {
  header.site-header .brand img,
  header.site-header .custom-logo,
  header.site-header .custom-logo-link img {
    height: 96px;
  }

  header.site-header .header-play-btn,
  #play-latest {
    padding: 7px 10px;
    font-size: 11px;
  }

  header.site-header #menu-toggle,
  #woofie-hdr #menu-toggle {
    width: 36px;
    height: 36px;
  }

  header.site-header #menu-toggle span,
  #woofie-hdr #menu-toggle span {
    width: 24px;
    height: 2.5px;
  }
}

/* ========================== TYPOGRAPHY — CENTERED TITLES ========================== */
.page-title,
.entry-title,
.hero-title,
.entry-content h1,
.entry-content h2,
.wp-block-heading {
  font-family: var(--wof-title-font);
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1.1;
  color: #111;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.page-title {
  font-size: clamp(36px, 5vw, 56px);
  margin: 0 0 12px;
}

.entry-title {
  font-size: clamp(36px, 5vw, 56px);
  margin: 0 0 12px !important;
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.hero-title {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
  margin-top: 0;
  padding-top: 6px;
}

.entry-content h2 {
  font-size: clamp(28px, 3.8vw, 40px);
  margin: 6px 0 12px;
}

/* ========================== GAMES PAGE ========================== */
.games-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px;
}

.page-title {
  text-align: center;
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 32px;
  color: #111;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: stretch;
}

.game-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border-radius: 24px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 2px solid #f0f0f0;
}

.game-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border-color: #ff5a5f;
}

.game-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  height: 100%;
  padding: 24px 20px;
}

.game-icon {
  width: 100%;
  max-width: 200px;
  margin: 0 auto 20px;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}

.game-card:hover .game-icon {
  transform: scale(1.08);
}

.game-title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 900;
  color: #111;
  line-height: 1.3;
}

.game-desc {
  margin: 0 0 20px;
  font-size: 15px;
  color: #555;
  flex-grow: 1;
  line-height: 1.5;
}

.btn-row {
  margin-top: auto;
  display: flex;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border-radius: 999px;
  padding: 12px 24px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 15px;
}

.btn-play {
  background: linear-gradient(180deg, #ff6b72 0%, #e63946 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(230, 57, 70, 0.3);
}

.btn-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(230, 57, 70, 0.4);
}

.btn-play:active {
  transform: translateY(0);
}

.btn-play::after {
  content: " ▶";
  font-weight: 900;
  margin-left: 4px;
}

/* ========================== GAMES PAGE — TABLET ========================== */
@media (max-width: 900px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .game-card {
    border-radius: 20px;
  }

  .game-card-body {
    padding: 20px 16px;
  }

  .game-icon {
    max-width: 180px;
    margin-bottom: 16px;
  }

  .game-title {
    font-size: 20px;
  }

  .game-desc {
    font-size: 14px;
    margin-bottom: 16px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* ========================== GAMES PAGE — MOBILE ========================== */
@media (max-width: 600px) {
  .games-container {
    padding: 20px 12px;
  }

  .page-title {
    font-size: 36px;
    margin-bottom: 24px;
  }

  .games-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .game-card {
    border-radius: 18px;
  }

  .game-card:hover {
    transform: translateY(-8px) scale(1.01);
  }

  .game-card-body {
    padding: 16px 12px;
  }

  .game-icon {
    max-width: 160px;
    margin-bottom: 12px;
  }

  .game-title {
    font-size: 18px;
  }

  .game-desc {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .btn {
    padding: 9px 18px;
    font-size: 13px;
  }
}