/*
Theme Name: woofipedia-clean
Text Domain: woofipedia-clean
Description: Custom Woofie theme styles. Header styles live in woofie-theme.css.
Version: 1.0.3
*/

/* REMOVED DUPLICATE FONT IMPORT - NOW LOADED VIA FUNCTIONS.PHP */

/* ========================== ROOT VARIABLES ========================== */
:root {
  --wof-blue: #3bb6ff;
  --wof-green: #7ED957;
  --wof-muted: #f5f5f5;
  --wof-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  --wof-shadow-strong: 0 12px 28px rgba(0, 0, 0, 0.16);
  --wof-title-font: 'Baloo 2', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ========================== TYPOGRAPHY ========================== */
.page-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;
}

/* Left-align video section title only */
#videos .box > h3 {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

/* ========================== BUTTONS & PILLS ========================== */
.btn-3d,
.play-latest {
  display: inline-block;
  padding: 0.55em 0.9em;
  line-height: 1;
  border-radius: 999px;
  background: #e11;
  color: #fff;
  font-weight: 700;
  font-family: var(--wof-title-font);
  text-decoration: none;
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.25);
  transition: opacity 0.2s;
}

.btn-3d:hover,
.play-latest:hover {
  opacity: 0.9;
  color: #fff;
}

/* ========================== BOOKS SECTION ========================== */
#books {
  padding: 24px 0 8px;
}

#books .wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

#books .title {
  display: inline-block;
  background: var(--wof-blue);
  color: #fff;
  font-weight: 900;
  border-radius: 999px;
  padding: 10px 20px;
  margin: 0 auto 18px;
  font-size: clamp(22px, 3.5vw, 34px);
}

#books .booksRow {
  display: flex;
  gap: clamp(18px, 4vw, 48px);
  align-items: stretch;
  flex-wrap: nowrap;
  justify-content: center;
  overflow: visible;
}

#books .card {
  flex: 1 1 0;
  min-width: 0;
  text-decoration: none;
}

#books .card img {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  /* Optimized loading attributes added in functions.php */
}

/* Hide 3rd book on narrow portrait screens */
@media (max-width: 480px) and (orientation: portrait) {
  #books .booksRow .card:nth-child(3) {
    display: none !important;
  }
}

/* ========================== VIDEOS SECTION ========================== */
#videos {
  background: transparent;
}

#videos .wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

#videos .box {
  background: linear-gradient(180deg, #fff, var(--wof-muted));
  color: #222;
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--wof-shadow-strong);
}

#videos .box > h3 {
  margin-top: 10px;
}

#videos .videoGrid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 16px 0;
}

@media (min-width: 1100px) {
  #videos .videoGrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #videos .videoGrid {
    grid-template-columns: 1fr;
  }
}

#videos iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  display: block;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 0 0 4px var(--wof-green), 0 10px 24px rgba(0, 0, 0, 0.12);
  background: transparent;
}

#videos .wp-block-embed,
#videos .wp-block-embed__wrapper,
#videos .responsive-video-wrapper,
#videos .jetpack-video-wrapper {
  padding: 0;
  margin: 0;
  background: transparent;
  box-shadow: none;
  border: 0;
}

#videos .channel-cta {
  display: block;
  width: fit-content;
  margin: 14px auto 6px;
  padding: 12px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #FFA23A, #FFD84A, #7ED957, #3DBBFF, #8E5CFF);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
  box-shadow: var(--wof-shadow-strong);
  transition: opacity 0.2s, transform 0.2s;
}

#videos .channel-cta:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

@media (orientation: landscape) {
  #videos .wrap {
    max-width: 1280px;
  }
}

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

.games-cms .wp-block-image img {
  width: 100%;
  height: auto;
  display: block;
  max-width: 560px;
  margin: 0 auto 12px;
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.games-cms h2,
.games-cms h3 {
  text-align: center;
  margin: 6px 0;
  font-weight: 700;
  color: #111;
}

.games-cms p {
  text-align: center;
  margin: 4px 0 12px;
}

.games-cms a {
  font-weight: 700;
}

/* Games Grid */
.games-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 16px;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  justify-items: center;
}

@media (max-width: 1000px) {
  .games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .games-grid {
    grid-template-columns: 1fr;
  }
}

.games-grid > a.game-card {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: var(--wof-shadow-strong);
  padding: 24px 20px 20px;
  width: 100%;
  max-width: 340px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.games-grid > a.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.22);
}

.games-grid > a.game-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  margin-bottom: 16px;
}

.games-grid .game-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  width: 100%;
}

.games-grid .game-title {
  font-family: var(--wof-title-font);
  font-weight: 800;
  font-size: 1.15rem;
  margin: 0 0 4px;
  text-align: center;
}

.games-grid .game-desc {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: #333;
}

.games-grid .btn-3d {
  margin-top: 8px;
}

.games-grid > p {
  margin: 0 !important;
}

.games-grid > p > a.game-card {
  display: flex !important;
}