/* ==========================================================================
   ColoringX WordPress Theme - Main Stylesheet
   ========================================================================== */

/* CSS Variables for easy customization */
:root {
  /* Vibrant & Playful Palette */
  --primary-pink: #d6006e;
  /* Deep Pink */
  --secondary-pink: #ffe4f0;
  /* Light Pink */
  --dark-pink: #9d0052;
  /* Darker Pink */
  --accent-purple: #8b5cf6;
  /* Playful Purple */
  --accent-blue: #0ea5e9;
  /* Sky Blue */
  --bg-pink: #fff0f6;
  /* Lavender Blush */

  --text-dark: #111827;
  /* Darker Gray */
  --white: #ffffff;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;

  --border: #f3f4f6;
  --container: 1280px;
  /* Wider container */

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --radius: 16px;
  /* Rounder corners */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

* {
  box-sizing: border-box;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  /* Playful system font stack */
  margin: 0;
  padding: 0;
  color: var(--text-dark);
  background-color: var(--white);
  line-height: 1.6;
}

a {
  color: var(--primary-pink);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--dark-pink);
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--text-dark);
  font-weight: 700;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
}

/* ==========================================================================
   Layout & Container
   ========================================================================== */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
}

.site-main {
  min-height: 60vh;
}

.site-content {
  display: flex;
  gap: 2rem;
}

.primary {
  flex: 1;
}

.secondary {
  width: 300px;
}

@media (max-width: 768px) {
  .site-content {
    flex-direction: column;
  }

  .secondary {
    width: 100%;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.35rem;
  }
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(236, 72, 153, 0.15);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  min-height: 64px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.header-search {
  display: none;
  background: var(--secondary-pink);
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.header-search.active,
.header-search.active[hidden] {
  display: block;
}

.header-search form {
  display: flex;
  gap: 0.5rem;
  max-width: 500px;
  margin: 0 auto;
}

.header-search input[type="search"] {
  flex: 1;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.95rem;
}

.header-search button {
  padding: 0.5rem 1rem;
  background: var(--primary-pink);
  color: var(--white);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.header-search button:hover {
  background: #ec4899;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--primary-pink);
  font-weight: 700;
  font-size: 1.15rem;
}

.brand-emoji {
  font-size: 1.5rem;
}

.brand-title {
  margin: 0;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: center;
}

.menu {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.menu li {
  position: relative;
}

.menu a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

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

.menu li.menu-item-has-children>a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  min-width: 200px;
  z-index: 999;
}

.menu li.menu-item-has-children:hover>.sub-menu {
  display: block;
}

.menu .sub-menu li {
  display: block;
}

.menu .sub-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-dark);
}

.menu .sub-menu a:hover {
  background: var(--secondary-pink);
  color: var(--primary-pink);
}

.menu {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: center;
}

.menu a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.menu a:hover,
.menu a:focus {
  color: var(--primary-pink);
}

.menu-item.current-menu-item>a {
  color: var(--primary-pink);
}

.search-toggle {
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  transition: var(--transition);
  min-width: 44px;
  min-height: 44px;
}

.search-toggle:hover {
  background-color: var(--secondary-pink);
  border-radius: 6px;
}

.search-icon {
  width: 20px;
  height: 20px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 1.5rem;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.nav-toggle:hover {
  background-color: var(--bg-pink);
  border-radius: 6px;
}

.hamburger {
  display: inline-block;
  width: 24px;
  height: 24px;
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--text-dark);
  left: 0;
  transition: var(--transition);
}

.hamburger::before {
  top: 6px;
}

.hamburger::after {
  bottom: 6px;
}

.nav-toggle-checkbox {
  display: none;
}

.nav-toggle.open .hamburger::before,
.nav-toggle-checkbox:checked ~ .header-actions .nav-toggle .hamburger::before {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.open .hamburger::after,
.nav-toggle-checkbox:checked ~ .header-actions .nav-toggle .hamburger::after {
  transform: translateY(-8px) rotate(-45deg);
}

/* Search Input */
.search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.search-form input[type="search"] {
  flex: 1;
  padding: 0.5rem 0.75rem 0.5rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: var(--transition);
}

.search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--primary-pink);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

.search-form .search-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--gray-400);
  font-size: 1rem;
}

/* ── Mobile Menu Drawer & Overlay ── */
#nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
#nav-overlay.open { display: block; }

#nav-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 9999;
  width: 300px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(236, 72, 153, 0.15);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -10px 0 30px rgba(0,0,0,0.1);
}
#nav-drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  border-bottom: 1px solid rgba(236, 72, 153, 0.15);
}

.drawer-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-dark);
}

#close-drawer-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
#close-drawer-btn:hover { background: rgba(236, 72, 153, 0.1); }

.drawer-content {
  padding: 1rem;
}

.mobile-nav .menu {
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav .menu a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  transition: var(--transition);
}

.mobile-nav .menu a:hover {
  background: rgba(236, 72, 153, 0.08);
  color: var(--primary-pink);
}

/* Mobile Menu */
@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
  
  .nav-toggle {
    display: flex;
  }

  .nav-wrap {
    gap: 0.5rem;
    padding: 0.5rem 0;
    flex-wrap: nowrap;
    position: relative;
  }

  .site-branding {
    flex-shrink: 0;
  }


  .menu li {
    width: 100%;
    padding: 0;
    border-bottom: 1px solid var(--border);
    position: relative;
  }

  .menu li:last-child {
    border-bottom: none;
  }

  .menu a {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }

  .menu li.menu-item-has-children>a {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .menu .sub-menu {
    display: none;
    position: static;
    background: var(--secondary-pink);
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }

  .menu li.menu-item-has-children.active>.sub-menu {
    display: flex;
    flex-direction: column;
  }

  .menu .sub-menu li {
    border: none;
    padding: 0;
  }

  .menu .sub-menu a {
    padding-left: 2rem;
    background: var(--secondary-pink);
  }

  .header-actions {
    order: 2;
    margin-left: auto;
  }

  .nav-toggle {
    display: block;
    flex-shrink: 0;
    min-width: 44px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    position: relative;
    z-index: 9999;
  }

  .nav-toggle * {
    pointer-events: none;
  }

  .search-toggle {
    flex-shrink: 0;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .search-toggle svg,
  .search-toggle svg * {
    pointer-events: none;
  }

  .header-search {
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    display: none;
    background: var(--white);
    border-top: 1px solid var(--border);
  }

  .header-search.active,
  .header-search.active[hidden] {
    display: block;
  }


  .header-search form {
    display: flex;
    /* Force flex */
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    max-width: none;
  }

  .header-search button {
    width: auto;
    padding: 0.5rem 1.25rem;
  }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  padding: 2.5rem 0; /* Massively reduced from 6rem to push grid above the fold */
  text-align: center;
  /* Fun, vibrant gradient */
  background: linear-gradient(135deg, #fff0f6 0%, #ffe4f0 100%);
  position: relative;
  overflow: hidden;
}

/* Optional: Add a pattern overlay if possible, or just keep it clean */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(var(--primary-pink) 2px, transparent 2px), radial-gradient(var(--accent-purple) 2px, transparent 2px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  opacity: 0.15;
  pointer-events: none;
}

.hero-inner {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3rem; /* Slightly smaller to fit compact layout */
  margin: 0 0 0.5rem; /* Tighter bottom margin */
  color: var(--text-dark);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-title .hero-sub {
  display: block;
  color: var(--primary-pink);
  margin-top: 0.5rem;
  font-size: 2rem;
  font-weight: 600;
}

.hero-desc {
  color: var(--gray-600);
  margin: 0 auto 1.5rem; /* Tighter margins */
  font-size: 1.15rem;
  max-width: 600px;
}

.hero-search {
  max-width: 720px;
  margin: 0.5rem auto 1rem; /* Tighter bottom margin */
}

.hero-search .search-form {
  position: relative;
  display: flex;
  background: #fff;
  border-radius: 9999px;
  padding: 0.5rem;
  box-shadow: 0 10px 25px rgba(236, 72, 153, 0.15); /* Premium shadow */
  transition: box-shadow 0.3s ease;
}

.hero-search .search-form:focus-within {
  box-shadow: 0 15px 35px rgba(236, 72, 153, 0.25);
}

.hero-search input[type="search"] {
  flex-grow: 1;
  border: none;
  background: transparent;
  padding: 0.5rem 1.5rem 0.5rem 3.5rem; /* Room for absolute SVG icon */
  height: 56px;
  font-size: 1.1rem;
  color: var(--text-dark);
  outline: none;
}

.hero-search .search-icon {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.hero-search .search-submit {
  position: relative;
  right: 0;
  top: 0;
  transform: none;
  padding: 0 2.5rem;
  background-color: var(--primary-pink);
  color: var(--white);
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s ease;
  height: 56px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.hero-search .search-submit:hover {
  background-color: var(--dark-pink);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

/* Popular Tags */
.popular-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.popular-tags-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.popular-tags .tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--border);
  margin: 0.25rem;
  text-decoration: none;
  color: var(--text-dark);
  font-size: 0.9rem;
  transition: var(--transition);
}

.popular-tags .tag:hover {
  background-color: var(--primary-pink);
  color: var(--white);
  border-color: var(--primary-pink);
}

@media (max-width: 768px) {
  .hero {
    padding: 2rem 0;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .hero-search input[type="search"] {
    height: 48px;
    font-size: 0.95rem;
  }

  .hero-search .search-submit {
    height: 48px;
    padding: 0 1.5rem;
  }

  .popular-tags {
    gap: 0.5rem;
  }

  .popular-tags .tag {
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
    min-height: 48px;
  }
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding: 3rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--gray-500);
  margin: 0;
}

.bg-secondary {
  background-color: var(--bg-pink);
}

/* ==========================================================================
   Grid Layouts
   ========================================================================== */

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-1 {
  grid-template-columns: 1fr;
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid,
  .grid-4,
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  /* grid-2 stays 2 columns until 480px */
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .grid,
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-8px);
  /* More pronounced lift */
}

.card-media {
  height: 280px;
  /* Taller images! */
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  overflow: hidden;
  position: relative;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Ensures image fills the area without whitespace */
  object-position: center top;
  transition: transform 0.5s ease;
}

.card:hover .card-media img {
  transform: scale(1.05);
  /* Zoom effect */
}

.card-media .emoji {
  font-size: 4rem;
  transition: var(--transition);
}

.card:hover .card-media .emoji {
  transform: scale(1.2) rotate(10deg);
  /* Playful rotation */
}

.card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--text-dark);
}

.card-desc {
  color: var(--gray-500);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.card-footer {
  padding: 0 1.5rem 1.5rem;
  margin-top: auto;
  /* Push to bottom */
}



/* Post Card */
.post-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-card:hover {
  box-shadow: var(--shadow-hover);
}

.post-card-media {
  aspect-ratio: 4 / 5;
  /* Taller images */
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Ensures image fills the area without whitespace */
  object-position: center top;
  /* Focus on top part usually face/main subject */
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover .post-card-media img {
  transform: scale(1.1);
}

.post-card-media .emoji {
  font-size: 3rem;
  color: var(--gray-400);
}

.post-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-card-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--secondary-pink);
  color: var(--dark-pink);
  font-weight: 600;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.post-categories {
  display: block;
  margin-bottom: 0.5rem;
}

.post-category {
  display: inline-block;
  color: var(--dark-pink);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-title a {
  color: var(--text-dark);
}

.post-card-title a:hover {
  color: var(--primary-pink);
}

.post-card-footer {
  padding: 0 1rem 1rem;
  margin-top: auto;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
  text-align: center;
}

.btn:focus {
  outline: 2px solid var(--primary-pink);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary-pink);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--dark-pink);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--primary-pink);
  border-color: var(--primary-pink);
}

.btn-outline:hover {
  background: var(--primary-pink);
  color: var(--white);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: #f8fafc; /* Sleek light gray/blue tint */
  color: #334155;
  padding: 4rem 0 2rem;
  margin-top: 0;
  border-top: 1px solid #e2e8f0; /* Softer border instead of harsh pink line */
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  padding: 0 0 3rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e2e8f0;
}

.footer-col {
  flex: 1;
}

.footer-col.footer-brand {
  flex: 1.2;
}

.site-branding-footer {
  margin-bottom: 1rem;
}

.footer-brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: var(--transition);
}

.footer-brand-emoji {
  font-size: 1.5rem;
}

.footer-brand-title {
  display: inline;
  color: #ec4899; /* Vibrant Pink Logo */
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.site-desc {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  margin-top: 0.5rem;
}

.footer-col h4 {
  color: var(--text-dark);
  margin-bottom: 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  color: var(--gray-600);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--primary-pink);
  padding-left: 0.25rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  font-size: 1.3rem;
}

.social-links .social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--gray-100);
  border-radius: 8px;
  text-decoration: none;
  transition: var(--transition);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
}

/* Brand colors on hover */
.social-links .social-icon--facebook:hover  { background: #1877F2; color: #fff; border-color: #1877F2; }
.social-links .social-icon--pinterest:hover { background: #E60023; color: #fff; border-color: #E60023; }
.social-links .social-icon--instagram:hover { background: #E1306C; color: #fff; border-color: #E1306C; }
.social-links .social-icon--reddit:hover    { background: #FF4500; color: #fff; border-color: #FF4500; }

.social-links .social-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.social-links .social-icon svg {
  width: 22px;
  height: 22px;
}

.footer-col .tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-col .tag-cloud .tag {
  background: rgba(236, 72, 153, 0.15);
  color: var(--primary-pink);
  padding: 0.3rem 0.75rem;
  border: 1px solid rgba(236, 72, 153, 0.4);
  border-radius: 999px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}

.footer-col .tag-cloud .tag:hover {
  background: var(--primary-pink);
  color: var(--white);
  border-color: var(--primary-pink);
}

.footer-bottom {
  padding-top: 1.5rem;
  text-align: center;
  color: var(--gray-400);
  font-size: 0.9rem;
  line-height: 1.6;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .site-footer {
    padding: 2rem 0 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ==========================================================================
   Sidebar & Widgets
   ========================================================================== */

.sidebar {
  width: 300px;
}

.widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.widget-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-pink);
}

.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget ul li {
  margin-bottom: 0.5rem;
}

.widget ul li a {
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition);
}

.widget ul li a:hover {
  color: var(--primary-pink);
  padding-left: 0.25rem;
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
  }
}

/* ==========================================================================
   Posts & Content
   ========================================================================== */

.post {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  padding: 2rem;
}

.post-header {
  margin-bottom: 1.5rem;
}

.post-meta {
  color: var(--gray-500);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.post-meta a {
  color: var(--primary-pink);
}

.post-title {
  font-size: 2rem;
  margin: 0.5rem 0 1rem;
}

.post-excerpt {
  color: var(--gray-500);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.post-content {
  margin-bottom: 1.5rem;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1rem 0;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   Search & 404
   ========================================================================== */

.no-results {
  text-align: center;
  padding: 3rem 0;
}

.no-results h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.error-404 {
  text-align: center;
  padding: 3rem 0;
}

.error-404 .page-content {
  max-width: 600px;
  margin: 0 auto;
}

.error-404 .error-title {
  font-size: 6rem;
  font-weight: 700;
  color: var(--primary-pink);
  margin-bottom: 1rem;
}

/* ==========================================================================
   About Section
   ========================================================================== */

.seo-section {
  padding: 2rem 0;
  color: var(--gray-500);
  line-height: 1.8;
}

.seo-section strong {
  color: var(--text-dark);
  font-weight: 600;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
  list-style: none;
  padding: 0;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition);
}

.pagination a:hover {
  background: var(--primary-pink);
  color: var(--white);
  border-color: var(--primary-pink);
}

.pagination .current {
  background: var(--primary-pink);
  color: var(--white);
  border-color: var(--primary-pink);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  .container {
    padding: 0 0.75rem;
  }

  .post {
    padding: 1rem;
  }

  .post-title {
    font-size: 1.5rem;
  }

  .error-404 .error-title {
    font-size: 4rem;
  }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: #21759b;
  display: block;
  font-size: 14px;
  font-size: 0.875rem;
  font-weight: bold;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* Focus visible for better keyboard navigation */
:focus-visible {
  outline: 2px solid var(--primary-pink);
  outline-offset: 2px;
}

/* Single Post Thumbnail */
.post-thumbnail {
  margin-bottom: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--gray-50);
}

.post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  max-height: 800px;
  margin: 0 auto;
}

/* ==========================================================================
   Single Post Redesign (Glassmorphism + Mobile Optimized)
   ========================================================================== */

.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(236, 72, 153, 0.15);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(236, 72, 153, 0.08);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.post-header.glass-card {
  padding: 2rem;
  text-align: center;
}

.editors-note-card {
  background: #fff;
  border-left: 4px solid var(--primary-pink);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  margin-bottom: 2rem;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--gray-600);
}

/* Coloring Pages Grid (Desktop Masonry) */
.coloring-pages-grid {
  column-count: 3;
  column-gap: 24px;
  margin-top: 30px;
  margin-bottom: 40px;
}

.coloring-page-item {
  break-inside: avoid;
  margin-bottom: 24px;
}

.coloring-page-item.glass-card {
  padding: 1.5rem;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.coloring-page-item.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(236, 72, 153, 0.15);
}

.coloring-img-wrapper {
  background: #f8fafc;
  border-radius: 8px; /* subtle 8px border-radius instead of 12px */
  overflow: hidden;
  margin-bottom: 1.5rem; /* More space before the massive button */
  border: 1px solid var(--border);
}

.coloring-img-styled {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.coloring-page-item.glass-card:hover .coloring-img-styled {
  transform: scale(1.03);
}

/* Hidden titles for minimalist look, but kept for screen readers */
.coloring-page-title {
  display: none;
}

/* Massive Fat Button */
.coloring-item-content {
  margin-top: auto;
  width: 100%;
}

.fat-btn-pdf {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 16px 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981, #059669); /* High-conversion Success Green */
  color: white;
  font-weight: 800;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 0 #047857, 0 15px 20px rgba(16, 185, 129, 0.4); /* 3D tactile button shadow */
  transition: all 0.2s ease;
  text-decoration: none;
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { box-shadow: 0 8px 0 #047857, 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 8px 0 #047857, 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 8px 0 #047857, 0 0 0 0 rgba(16, 185, 129, 0); }
}

.fat-btn-pdf:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(4px); /* Physically presses down */
  box-shadow: 0 4px 0 #064e3b, 0 8px 15px rgba(16, 185, 129, 0.4);
  color: white;
  text-decoration: none;
}
.fat-btn-pdf:active {
  transform: translateY(8px);
  box-shadow: 0 0 0 #064e3b, 0 4px 10px rgba(16, 185, 129, 0.4);
}

.fat-btn-pdf svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* Responsive Grids */
@media (max-width: 992px) {
  .coloring-pages-grid {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  /* Fix Homepage White Space - typically caused by huge section padding */
  .section {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important; /* Reduces massive whitespace */
  }
}

@media (max-width: 480px) {
  /* Edge-to-Edge Experience */
  .coloring-pages-grid {
    column-count: 1;
    padding: 0;
  }
  
  .coloring-page-item {
    margin-bottom: 40px;
  }
  
  /* Strip away glass card padding to make images edge-to-edge on mobile */
  .coloring-page-item.glass-card {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
  }
  
  .coloring-img-wrapper {
    border-radius: 0; /* Pure edge-to-edge */
    border-left: none;
    border-right: none;
  }
  
  .post-header.glass-card {
    padding: 1.5rem 1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  /* Make button stretch full width but with slight padding so it's tap friendly */
  .coloring-item-content {
    padding: 0 16px;
  }
}

/* Breadcrumbs */
.breadcrumbs {
	font-size: 0.85rem;
	margin-bottom: 20px;
	color: #666;
}

.breadcrumbs a {
	color: #ec4899;
	text-decoration: none;
}

.breadcrumbs a:hover {
	text-decoration: underline;
}

.breadcrumbs .sep {
	margin: 0 5px;
	color: #ccc;
}

.breadcrumbs .current {
	color: #999;
	font-weight: 500;
}
/* ==========================================================================
   Comments Section Styling
   ========================================================================== */

.comments-area {
    background: #fff;
    padding: 2.5rem;
    border-radius: var(--radius);
    margin-top: 3rem;
    box-shadow: 0 10px 30px -10px rgba(214, 0, 110, 0.1);
    border: 1px solid var(--border);
}

.comment-reply-title {
    font-size: 1.8rem;
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

#comment {
    width: 100%;
    border-radius: 12px;
    padding: 1.25rem;
    border: 2px solid var(--gray-200);
    background: var(--gray-50);
    font-size: 1rem;
    color: var(--text-dark);
    transition: var(--transition);
    min-height: 150px;
    outline: none;
    resize: vertical;
}

#comment:focus {
    border-color: var(--primary-pink);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(214, 0, 110, 0.08);
}

.submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--dark-pink) 100%);
    color: #fff;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 20px -5px rgba(214, 0, 110, 0.3);
    width: auto;
}

.submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(214, 0, 110, 0.4);
    filter: brightness(1.1);
}

.submit:active {
    transform: translateY(0);
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment-body {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.comment-metadata a {
    color: var(--gray-500);
    font-size: 0.85rem;
}

/* ==========================================================================
   Post Cards Title & UI Improvements
   ========================================================================== */

.post-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    /* min-height removed because flexbox handles alignment */
    margin: 1rem 0;
    font-size: 1.15rem;
    line-height: 1.4;
}

/* Ensure images in grid are always perfect squares or consistent ratio */
.post-card-image {
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: var(--gray-50);
    border-radius: 12px;
    padding: 1rem;
}

/* ==========================================================================
   Mobile Revenue Optimizations
   ========================================================================== */

/* Touch optimization for all interactive elements */
button,
a,
[role="button"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Post title size on mobile */
@media (max-width: 768px) {
  .post-title {
    font-size: 1.5rem;
  }

  .section {
    padding: 1.5rem 0;
  }

  /* Coloring page item buttons: larger tap area on mobile */
  .coloring-btn-group .coloring-download-btn {
    padding: 14px 20px;
    font-size: 15px;
  }
}

/* ==========================================================================
   Sticky Bottom Ad Bar — Mobile AdSense Revenue Booster
   Paste a 320x50 or 320x100 AdSense ad inside #sticky-ad-bar
   ========================================================================== */

#sticky-ad-bar {
  display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
  #sticky-ad-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border-top: 1px solid var(--gray-200);
    padding: 4px 0;
    min-height: 60px;
    max-height: 80px;
    overflow: hidden;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  }

  /* Push page content up so sticky ad doesn't cover content */
  body.has-sticky-ad {
    padding-bottom: 60px;
  }
}

/* ==========================================================================
   Print Styles (God Tier UX)
   ========================================================================== */
@media print {
    /* Hide everything that is not the main image */
    header, footer, .sidebar, .ads, .site-header, .site-footer, .post-header, .btn, .post-seo-intro, .post-footer, #sticky-ad-bar, .related-posts, .comments-area {
        display: none !important;
    }
    
    /* Ensure the body is clean */
    body, .site-content, .primary {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    /* Center the image */
    .coloring-gallery-item {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
    }
    .coloring-gallery-image {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }
}
