/* ==========================================================================
   Single Post - Gallery Styles
   ========================================================================== */

/* ==========================================================================
   CLS FIX: Reserve space for dynamic content
   ========================================================================== */

/* Prevent layout shift on images - use width/height attributes */
.single-header-image img,
.gallery-item img,
.coloring-gallery-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  /* Browser will calculate aspect-ratio from width/height attributes */
}

/* Reserve space for content containers */
.single-content-flow {
  min-height: 200px;
  contain: layout style;
}

.single-header-image {
  min-height: 300px;
  contain: layout;
  overflow: hidden;
}

.single-header-image--bottom {
  min-height: 400px;
}

/* Image skeleton placeholder while loading */
.single-header-image img:not([src]),
.gallery-item img:not([src]) {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
}

/* Default aspect ratio removed to support portrait coloring pages */
.single-header-image img {
  /* aspect-ratio: 4 / 3; removed to fix small image in large frame issue */
  width: 100%;
  height: auto;
}

/* Gallery grid fixed dimensions - square thumbnails */
.coloring-gallery {
  min-height: 400px;
}

.gallery-item {
  contain: layout;
}

.gallery-item img,
.coloring-gallery-item img {
  aspect-ratio: 1 / 1;
}


/* ==========================================================================
   Breadcrumb Navigation
   ========================================================================== */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  font-size: 0.875rem;
}

.breadcrumb-inner {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumb a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: #D97757;
}

.breadcrumb .sep {
  color: #ccc;
  margin: 0 8px;
}

.breadcrumb .current {
  color: #333;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .breadcrumb {
    padding: 12px 16px;
    font-size: 0.8rem;
  }
  
  .breadcrumb .sep {
    margin: 0 6px;
  }
}

/* Post Header */
.single-header {
  text-align: center;
  padding: var(--space-2xl) 0 var(--space-xl);
  max-width: 800px;
  margin: 0 auto;
}

.single-title {
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--color-contrast);
  margin: 0 0 var(--space-md);
  line-height: 1.2;
}

.single-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-lg);
  font-size: 0.9rem;
  color: var(--color-contrast-light);
}

.single-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.single-meta-item .meta-icon {
  opacity: 0.6;
}

/* Author Meta */
.single-meta-author {
  gap: 8px;
}

.single-meta-author img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.single-meta-author a {
  color: var(--color-contrast);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.single-meta-author a:hover {
  color: var(--color-accent-1, #D97757);
}

/* Last Updated - Full width on new line */
.single-meta-updated {
  flex-basis: 100%;
  justify-content: center;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 0.85rem;
  color: #888;
}

/* ==========================================================================
   Share Buttons
   ========================================================================== */
.share-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.share-label {
  font-size: 0.85rem;
  color: var(--color-contrast-light, #888);
  font-weight: 500;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  position: relative;
  /* Add shadow for better contrast on light backgrounds */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.share-btn svg {
  transition: transform 0.2s ease;
}

.share-btn:hover svg {
  transform: scale(1.1);
}

/* Facebook */
.share-facebook {
  background: #1877f2 !important;
  color: #fff !important;
}

.share-facebook svg {
  fill: #fff !important;
  color: #fff !important;
}

.share-facebook:hover {
  background: #0d65d9 !important;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.4);
  color: #fff !important;
}

/* Pinterest */
.share-pinterest {
  background: #e60023 !important;
  color: #fff !important;
}

.share-pinterest svg {
  fill: #fff !important;
  color: #fff !important;
}

.share-pinterest:hover {
  background: #c50020 !important;
  box-shadow: 0 4px 12px rgba(230, 0, 35, 0.4);
  color: #fff !important;
}

/* X (Twitter) */
.share-twitter {
  background: #000 !important;
  color: #fff !important;
}

.share-twitter svg {
  fill: #fff !important;
  color: #fff !important;
}

.share-twitter:hover {
  background: #333 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  color: #fff !important;
}

/* Copy Link - Improved contrast */
.share-copy {
  background: #6366f1 !important;
  color: #fff !important;
}

.share-copy svg {
  fill: #fff !important;
  color: #fff !important;
  stroke: #fff !important;
}

.share-copy:hover {
  background: #4f46e5 !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  color: #fff !important;
}

.share-copy.copied {
  background: #10b981 !important;
  color: #fff !important;
}

/* Copy Tooltip */
.copy-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: #333;
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
}

.copy-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #333;
}

.share-copy.copied .copy-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

/* Responsive */
@media (max-width: 768px) {
  .share-buttons {
    justify-content: center;
  }
}

/* ==========================================================================
   Post Bio / Description
   ========================================================================== */
.post-bio {
  margin-top: 50px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  border-left: 3px solid var(--color-accent-1, #D97757);
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-contrast-light, #555);
}

.post-bio p {
  margin: 0;
}

.post-bio p + p {
  margin-top: 10px;
}

/* Layout variations */
.single-header--left .post-bio,
.single-header--right .post-bio {
  margin-top: 16px;
  padding: 12px 16px;
  font-size: 0.9rem;
}

/* Bottom layout - full width bio */
.single-header .post-bio {
  text-align: left;
}

@media (max-width: 768px) {
  .post-bio {
    margin-top: 16px;
    padding: 14px 16px;
    font-size: 0.9rem;
    text-align: left;
  }
}

/* ==========================================================================
   Featured Image Layouts
   ========================================================================== */

/* Container for header content (title + meta) */
.single-header-content {
  flex: 1;
  min-width: 0;
}

/* Featured Image Base Styles */
.single-header-image {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  background: var(--color-accent-light);
  padding: 30px; /* Add controlled padding */
  display: flex; /* Centers image if it's smaller */
  align-items: center;
  justify-content: center;
}

.single-header-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform var(--transition-slow);
}

.single-header-image:hover img {
  transform: scale(1.02);
}

/* Layout: Bottom (default) */
.single-header-image--bottom {
  max-width: 800px; /* Increased from 500px */
  margin: var(--space-xl) auto 0;
}

/* Layout: Left - Two column layout */
.single-header--left {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2xl);
  text-align: left;
  max-width: 1000px;
}

.single-header--left .single-header-image {
  flex: 0 0 300px;
  max-width: 300px;
}

.single-header--left .single-header-content {
  padding-top: var(--space-md);
}

.single-header--left .single-meta {
  justify-content: flex-start;
}

/* Layout: Right - Two column layout (reversed) */
.single-header--right {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-2xl);
  text-align: left;
  max-width: 1000px;
}

.single-header--right .single-header-image {
  flex: 0 0 300px;
  max-width: 300px;
  order: 2;
}

.single-header--right .single-header-content {
  order: 1;
  padding-top: var(--space-md);
}

.single-header--right .single-meta {
  justify-content: flex-start;
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
  .single-header--left,
  .single-header--right {
    flex-direction: column;
    text-align: center;
    gap: var(--space-lg);
  }

  .single-header--left .single-header-image,
  .single-header--right .single-header-image {
    flex: none;
    max-width: 280px;
    margin: 0 auto;
    order: 1;
  }

  .single-header--left .single-header-content,
  .single-header--right .single-header-content {
    order: 2;
  }

  .single-header--left .single-meta,
  .single-header--right .single-meta {
    justify-content: center;
  }

  .single-header-image--bottom {
    max-width: 280px;
  }
}

/* ==========================================================================
   Tool Cards (Promotional)
   ========================================================================== */
.tool-card {
  grid-column: span 2;
  background: linear-gradient(135deg, #fefefe 0%, #f8f9fa 100%);
  border: 2px solid #D97757;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.tool-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Hide icon - no longer used */
.tool-icon {
  display: none !important;
}

.tool-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: #2C2C2C;
  text-align: center;
}

.tool-card-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Single image: center and larger */
.tool-card-images.single-image {
  display: flex;
  justify-content: center;
  align-items: center;
  grid-template-columns: 1fr;
}

.tool-card-images.single-image img {
  max-width: 100%;
  width: 100%;
  aspect-ratio: auto;
  max-height: 300px;
  object-fit: contain;
}

.tool-card-images img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  aspect-ratio: 4/3;
  background: #f0f0f0;
  transition: transform 0.3s ease;
}

.tool-card-images img:hover {
  transform: scale(1.02);
}

.tool-description {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

.tool-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: #D97757;
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.2s ease;
  align-self: flex-start;
}

.tool-cta:hover {
  filter: brightness(1.1);
  transform: translateX(4px);
}

/* Responsive Tool Cards */
@media (max-width: 1024px) {
  .tool-card {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .tool-card {
    grid-column: span 1;
    padding: 20px;
  }
  
  .tool-name {
    font-size: 1.1rem;
  }
  
  .tool-card-images {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

/* ==========================================================================
   Gallery Grid
   ========================================================================== */
.coloring-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  padding: var(--space-xl) 0;
}

/* Fix for sidebar layout - reduce to 3 columns to prevent button squashing */
.has-sidebar .coloring-gallery {
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}


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

@media (max-width: 768px) {
  .coloring-gallery {
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-md);
  }
}

@media (max-width: 480px) {
  .coloring-gallery {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Gallery Item
   ========================================================================== */
.gallery-item {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  overflow: visible; 
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
}


.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

/* Image Container */
.gallery-image {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--color-accent-light);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; /* Round top corners */
  /* No aspect-ratio - let image keep its natural ratio */
}

.gallery-image img {
  display: block;
  width: 100%;
  height: auto; /* Natural height based on aspect ratio */
  object-fit: contain; /* Show full image, no cropping */
  transition: transform var(--transition-slow);
}

.gallery-item:hover .gallery-image img {
  transform: scale(1.03);
}

/* Download Badge */
.download-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}

.download-badge .badge-icon {
  font-size: 0.9em;
}

/* Download count update animation */
.download-badge .badge-value.updated {
  animation: count-update 0.5s ease;
}

@keyframes count-update {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
    color: var(--color-accent);
  }
  100% {
    transform: scale(1);
  }
}

/* Image Title - Ensure equal height for boxes */
.gallery-item-title {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  text-align: center;
  background: #fff;
  border-bottom: 1px solid var(--color-accent-light);
  flex: 1; /* Grow to fill space */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px; /* Fixed minimum height to keep boxes aligned */
  line-height: 1.4;
  word-break: break-word;
}


/* ==========================================================================
   Action Buttons - Modern Design
   ========================================================================== */
.coloring-action-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping if space is too tight */
  gap: 6px;
  padding: 10px;
  background: linear-gradient(to bottom, #f8f9fa, #ffffff);
  border-top: 1px solid var(--color-accent-light);
  width: 100%;
}


.coloring-action-buttons .btn {
  flex: 1;
  min-width: 0; /* Allow shrinking */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  overflow: hidden; /* Prevent text overflow */
}


.coloring-action-buttons .btn .btn-icon {
  font-size: 1.1em;
  line-height: 1;
}

/* Color Button - Primary Gradient */
.coloring-action-buttons .btn-color {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.coloring-action-buttons .btn-color:hover {
  background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

/* Override plugin CSS that hides .coloring-popup-trigger by default */
/* Force consistent styling with PDF and Image buttons */
.coloring-action-buttons .btn-color.coloring-popup-trigger,
.gallery-item .btn-color.coloring-popup-trigger,
.coloring-action-buttons .coloring-popup-trigger {
  /* Reset plugin styles */
  opacity: 1 !important;
  visibility: visible !important;
  position: static !important;
  pointer-events: auto !important;

  /* Force consistent size and shape */
  width: auto !important;
  flex: 1 !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;

  /* Force rectangular shape like other buttons */
  border-radius: 8px !important;

  /* Force consistent padding and layout */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 8px 6px !important;

  /* Force gradient background */
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  /* Force consistent text styling */
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  color: white !important;

  /* Force box shadow */
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4) !important;
  border: none !important;
}


.coloring-action-buttons .btn-color.coloring-popup-trigger:hover,
.coloring-action-buttons .coloring-popup-trigger:hover {
  background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5) !important;
}

/* PDF Button - Orange Gradient */
.coloring-action-buttons .btn-pdf {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
}

.coloring-action-buttons .btn-pdf:hover {
  background: linear-gradient(135deg, #e085e8 0%, #e04d61 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

/* Image Button - Teal Gradient */
.coloring-action-buttons .btn-image {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(79, 172, 254, 0.3);
}

.coloring-action-buttons .btn-image:hover {
  background: linear-gradient(135deg, #45a3f5 0%, #00dce6 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

/* Button States */
.coloring-action-buttons .btn:active {
  transform: translateY(0) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.coloring-action-buttons .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ==========================================================================
   Download Dropdown
   ========================================================================== */
.download-dropdown {
  position: relative;
}

/* Download Button - Green Gradient - Match Color button styling */
.coloring-action-buttons .btn-download {
  width: 100%;
  flex: 1;
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(17, 153, 142, 0.4);
  position: relative;
  /* Force same styling as Color button */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 8px 6px !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  border: none !important;
}


.coloring-action-buttons .btn-download:hover {
  background: linear-gradient(135deg, #0e8a7f 0%, #32d970 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(17, 153, 142, 0.5);
}

/* Download Dropdown Arrow - Scoped to avoid header conflict */
.download-dropdown .dropdown-arrow {
  font-size: 0.6em;
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.download-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

/* Download Dropdown Menu - Opens UPWARD (scoped to .download-dropdown only) */
.download-dropdown .dropdown-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 4px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 9999;
  overflow: hidden;
}

.download-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dropdown Items - Modern Design (scoped to download dropdown) */
.download-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #444;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  position: relative;
  overflow: hidden;
}

/* Hover effect with slide-in background */
.download-dropdown .dropdown-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(
    90deg,
    rgba(17, 153, 142, 0.1) 0%,
    transparent 100%
  );
  transition: width 0.3s ease;
}

.download-dropdown .dropdown-item:hover::before {
  width: 100%;
}

.download-dropdown .dropdown-item:hover {
  color: #11998e;
  padding-left: 20px;
}

.download-dropdown .dropdown-item:not(:last-child) {
  border-bottom: 1px solid #f0f0f0;
}

/* Format Icons with Colors */
.download-dropdown .dropdown-item .format-icon {
  font-size: 1.3em;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.download-dropdown .dropdown-item:hover .format-icon {
  transform: scale(1.1);
}

/* PDF - Red theme */
.download-dropdown .dropdown-item[data-format="pdf"] .format-icon {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
  color: white;
  font-size: 0.9em;
}

/* PNG - Purple theme */
.download-dropdown .dropdown-item[data-format="png"] .format-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 0.9em;
}

/* JPG - Orange theme */
.download-dropdown .dropdown-item[data-format="jpg"] .format-icon {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  font-size: 0.9em;
}

/* WEBP - Teal theme */
.download-dropdown .dropdown-item[data-format="webp"] .format-icon {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  font-size: 0.9em;
}

/* Format label styling */
.download-dropdown .dropdown-item span:last-child {
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Mobile: Adjust layout */
@media (max-width: 480px) {
  .coloring-action-buttons {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px;
  }

  .coloring-action-buttons .btn {
    padding: 12px 16px;
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   Post Content Area
   ========================================================================== */
.single-content-flow {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.single-content-flow > * {
  margin-bottom: var(--space-xl);
}

.single-content-flow > *:last-child {
  margin-bottom: 0;
}

/* Text content blocks within flow */
.single-content-block {
  /* max-width: 800px; */
  margin-left: auto;
  margin-right: auto;
  padding: var(--space-lg);
  background: var(--color-accent-light);
  border-radius: var(--radius-lg);
}

.single-content-block p {
  margin: 0 0 var(--space-md);
  color: var(--color-contrast-light);
  line-height: 1.7;
}

.single-content-block p:last-child {
  margin-bottom: 0;
}

.single-content-block h2,
.single-content-block h3,
.single-content-block h4 {
  margin: 0 0 var(--space-md);
  color: var(--color-contrast);
  font-weight: 500;
}

.single-content-block ul,
.single-content-block ol {
  margin: 0 0 var(--space-md);
  padding-left: var(--space-lg);
  color: var(--color-contrast-light);
}

.single-content-block a {
  color: var(--color-accent);
  text-decoration: underline;
}

.single-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.single-description {
  max-width: 800px;
  margin: 0 auto var(--space-2xl);
  padding: var(--space-xl);
  background: var(--color-accent-light);
  border-radius: var(--radius-lg);
}

.single-description h3 {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-contrast);
  margin: 0 0 var(--space-md);
}

.single-description p {
  margin: 0;
  color: var(--color-contrast-light);
  line-height: 1.7;
}

/* ==========================================================================
   Related Posts
   ========================================================================== */
.related-posts {
  padding: var(--space-2xl) 0;
  margin-top: var(--space-2xl);
  border-top: 1px solid var(--color-accent-light);
}

.related-posts-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-contrast);
  margin: 0 0 var(--space-xl);
}

/* ==========================================================================
   Print Info Section
   ========================================================================== */
.print-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  max-width: 800px;
  margin: 0 auto var(--space-2xl);
  padding: var(--space-xl);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.print-info-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.print-info-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.print-info-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent-muted);
  margin-bottom: 4px;
}

.print-info-value {
  font-size: 1rem;
  color: var(--color-contrast);
}

/* ==========================================================================
   Post Navigation
   ========================================================================== */
.single-navigation {
  display: flex;
  justify-content: space-between;
  gap: var(--space-lg);
  max-width: 800px;
  margin: var(--space-2xl) auto;
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-accent-light);
}

.single-navigation .nav-previous,
.single-navigation .nav-next {
  flex: 1;
}

.single-navigation .nav-next {
  text-align: right;
}

.single-navigation a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.9rem;
  color: var(--color-contrast);
  text-decoration: none;
  background: var(--color-base);
  border: 1px solid var(--color-accent-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}

.single-navigation a:hover {
  background: var(--color-accent-light);
  border-color: var(--color-accent-muted);
}

/* No images message */
.no-images {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--color-contrast-light);
  font-size: 1.1rem;
}

/* ==========================================================================
   PDF Loading Overlay
   ========================================================================== */
.pdf-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.pdf-loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.pdf-loading-spinner {
  text-align: center;
  color: white;
}

.pdf-loading-spinner .spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  margin: 0 auto var(--space-md);
  animation: pdf-spin 1s linear infinite;
}

@keyframes pdf-spin {
  to {
    transform: rotate(360deg);
  }
}

.pdf-loading-spinner p {
  font-size: 1rem;
  margin: 0;
}

/* ==========================================================================
   Sidebar Layout
   ========================================================================== */
.single-content-wrapper {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 30px;
}

.single-content-wrapper.has-sidebar {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 50px;
  align-items: start;
}

.single-main-content {
  min-width: 0;
  padding-bottom: 60px;
}

/* Premium Sidebar Styles */
.single-sidebar {
  position: sticky;
  top: 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 20px 0;
}

.sidebar-widget {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0,0,0,0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-widget:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.sidebar-widget .widget-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  color: #1A1A1A;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-widget .widget-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent-1, #D97757), #FF9F7C);
  border-radius: 2px;
}

/* Custom Search Widget Styling */
.sidebar-search-form .search-input-wrapper {
  display: flex;
  background: #F4F7F6;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.sidebar-search-form .search-input-wrapper:focus-within {
  border-color: var(--color-accent-1, #D97757);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(217, 119, 87, 0.1);
}

.sidebar-search-form .search-field {
  flex: 1;
  border: none;
  padding: 12px 16px;
  font-size: 1rem;
  background: transparent;
  outline: none;
  color: #333;
}

.sidebar-search-form .search-submit {
  background: var(--color-accent-1, #D97757);
  border: none;
  padding: 0 16px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.2s;
}

.sidebar-search-form .search-submit:hover {
  background: #C1674A;
}

/* Post List Styling */
.sidebar-post-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-post-item {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

.sidebar-post-item .post-thumb {
  width: 70px;
  height: 70px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}

.sidebar-post-item:hover .post-thumb {
  transform: scale(1.05);
}

.sidebar-post-item .post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f8f9fa;
}


.sidebar-post-item .post-info {
  flex: 1;
  min-width: 0;
}

.sidebar-post-item .post-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: #2D3436;
  margin-bottom: 4px;
  transition: color 0.2s;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sidebar-post-item:hover .post-title {
  color: var(--color-accent-1, #D97757);
}

.sidebar-post-item .post-meta {
  font-size: 0.75rem;
  color: #A0AEC0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sidebar-post-item .meta-icon {
  font-size: 0.8rem;
}

/* Responsive Sidebar */
@media (max-width: 1024px) {
  .single-content-wrapper.has-sidebar {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .single-sidebar {
    position: relative;
    top: 0;
    order: 2;
  }
}
/* Related Posts Slider Section */
.related-posts {
  margin-top: 80px;
  padding: 60px 0;
  border-top: 1px solid rgba(0,0,0,0.05);
  background: linear-gradient(to bottom, #fff, #fafafa);
}

.related-posts .container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 30px;
}

.related-posts .section-header {
  margin-bottom: 40px;
  text-align: center;
}

.related-posts .section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #1a1a1a;
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
}

.related-posts .section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 2px;
}

.related-posts-slider {
  padding: 20px 5px 50px !important;
  overflow: hidden;
}

.related-post-card {
  display: block;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  height: 100%;
  border: 1px solid rgba(0,0,0,0.02);
}

.related-post-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
  border-color: rgba(102, 126, 234, 0.2);
}

.related-post-card .post-thumb {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.related-post-card .post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}



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

.related-post-card .post-info {
  padding: 20px;
}

.related-post-card .post-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2d3436;
  margin: 0 0 10px 0;
  line-height: 1.4;
  height: 2.8em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s;
}

.related-post-card:hover .post-title {
  color: #667eea;
}

.related-post-card .post-meta {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: #a0aec0;
  font-weight: 500;
}

.related-posts-slider .related-slider-pagination {
  bottom: 0 !important;
}

.related-posts-slider .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: #cbd5e0;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.related-posts-slider .swiper-pagination-bullet-active {
  width: 30px;
  border-radius: 5px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  opacity: 1;
}

/* Navigation Arrows */
.related-posts-slider .related-slider-prev,
.related-posts-slider .related-slider-next {
  width: 50px;
  height: 50px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  color: #667eea;
  transition: all 0.3s ease;
}

.related-posts-slider .related-slider-prev:hover,
.related-posts-slider .related-slider-next:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.related-posts-slider .related-slider-prev::after,
.related-posts-slider .related-slider-next::after {
  font-size: 1.2rem;
  font-weight: 700;
}

.related-posts-slider .related-slider-prev {
  left: 10px;
}

.related-posts-slider .related-slider-next {
  right: 10px;
}

/* Hide arrows on mobile - use swipe instead */
@media (max-width: 768px) {
  .related-posts-slider .related-slider-prev,
  .related-posts-slider .related-slider-next {
    display: none;
  }
}

@media (max-width: 768px) {
  .related-posts {
    margin-top: 40px;
    padding: 40px 15px;
  }
  
  .related-posts .section-title {
    font-size: 1.8rem;
  }
}

/* ==========================================================================
   Mobile Sidebar - Hidden by default on mobile
   ========================================================================== */
@media (max-width: 768px) {
  /* Hide sidebar by default on mobile */
  .single-sidebar,
  .sidebar {
    display: none !important;
  }
  
  /* Full width content when sidebar hidden */
  .single-content-wrapper,
  .single-content-wrapper.has-sidebar {
    grid-template-columns: 1fr !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  /* Main content full width */
  .single-main-content,
  .coloring-single-main,
  .single-content-flow,
  .single-header {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 15px !important;
    margin: 0 auto !important;
  }
  
  /* Breadcrumb full width */
  .breadcrumb {
    max-width: 100% !important;
    padding: 12px 15px !important;
  }
  
  /* Content blocks full width */
  .single-content-block,
  .post-bio,
  .content-block {
    margin: 0 0 20px 0 !important;
    padding: 15px !important;
    border-radius: 8px;
  }
  
  /* Title smaller */
  .single-title,
  .entry-title {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
  }
  
  /* Meta info wrap */
  .single-meta {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  /* Share buttons smaller */
  .share-buttons a {
    width: 32px;
    height: 32px;
  }
  
  /* Adjust gallery grid - 2 columns */
  .coloring-gallery {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
    padding: 0 !important;
  }
  
  /* Gallery items full width in container */
  .gallery-item,
  .coloring-gallery-item {
    margin: 0 !important;
  }
  
  /* Download buttons stack */
  .download-buttons {
    flex-direction: column;
    gap: 10px;
    padding: 0 15px;
  }
  
  .download-buttons .btn-download,
  .download-buttons .btn-download-img {
    width: 100%;
  }
  
  /* Featured image full width */
  .single-header-image,
  .single-header-image--bottom {
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
  }
  
  .single-header-image img {
    width: 100%;
    height: auto;
  }
  
  /* Optional: Show sidebar at bottom */
  body.mobile-show-sidebar .single-sidebar,
  body.mobile-show-sidebar .sidebar {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 40px;
    padding: 0 15px;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  /* Single column gallery */
  .coloring-gallery {
    grid-template-columns: 1fr !important;
  }
  
  /* Header layout vertical */
  .single-header-left,
  .single-header-right,
  .single-header-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .single-header-image {
    max-width: 100%;
    margin: 0 auto 20px;
  }
  
  /* Even smaller title */
  .single-title,
  .entry-title {
    font-size: 1.3rem !important;
  }
  
  /* Meta stays in ONE ROW - just smaller text */
  .single-meta {
    flex-direction: row !important;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px 15px;
    font-size: 0.8rem;
  }
  
  .single-meta span {
    white-space: nowrap;
  }
}


/* ==========================================================================
   Floating Category Navigation - Sticky LEFT Side
   ========================================================================== */
.floating-category-nav {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  font-family: inherit;
}

/* Toggle Button - Icon only */
.floating-nav-toggle {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 0 12px 12px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 4px 0 15px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}

.floating-nav-toggle:hover {
  width: 52px;
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.floating-nav-toggle .toggle-icon {
  font-size: 1.3rem;
  line-height: 1;
}

/* Hide toggle text */
.floating-nav-toggle .toggle-text {
  display: none;
}

/* Content Panel */
.floating-nav-content {
  position: absolute;
  left: -320px;
  top: 50%;
  transform: translateY(-50%);
  width: 280px;
  max-height: 70vh;
  background: #ffffff;
  border-radius: 0 12px 12px 0;
  box-shadow: 8px 0 30px rgba(0,0,0,0.15);
  overflow: hidden;
  transition: left 0.3s ease;
}

.floating-category-nav.expanded .floating-nav-content {
  left: 0;
}

/* HIDE toggle button when expanded */
.floating-category-nav.expanded .floating-nav-toggle {
  opacity: 0;
  pointer-events: none;
  left: 0;
}

/* Close button in header */
.floating-nav-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: white;
  transition: all 0.2s ease;
}

.floating-nav-close:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-50%) scale(1.1);
}


/* Header */
.floating-nav-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 50px 15px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.floating-nav-header .nav-icon {
  font-size: 1.3rem;
}

.floating-nav-header .nav-title {
  flex: 1;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Category List */
.floating-nav-list {
  list-style: none;
  margin: 0;
  padding: 10px 0;
  max-height: calc(70vh - 120px);
  overflow-y: auto;
}

.floating-nav-list::-webkit-scrollbar {
  width: 5px;
}

.floating-nav-list::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.floating-nav-list::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}

.floating-nav-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.floating-nav-item a:hover {
  background: #f5f5f5;
  border-left-color: #667eea;
  color: #667eea;
}

.floating-nav-item.active a {
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.1), transparent);
  border-left-color: #667eea;
  color: #667eea;
  font-weight: 600;
}

.floating-nav-item .cat-emoji {
  font-size: 1.1rem;
  min-width: 24px;
  text-align: center;
}

.floating-nav-item .cat-name {
  flex: 1;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-nav-item .cat-count {
  font-size: 0.75rem;
  color: #999;
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 10px;
}

.floating-nav-item.active .cat-count {
  background: #667eea;
  color: white;
}

/* View All Link */
.floating-nav-all {
  display: block;
  padding: 12px 20px;
  background: #f8f9fa;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #667eea;
  text-decoration: none;
  border-top: 1px solid #eee;
  transition: all 0.2s ease;
}

.floating-nav-all:hover {
  background: #667eea;
  color: white;
}

/* Hide on tablet and mobile */
@media (max-width: 1200px) {
  .floating-category-nav {
    display: none !important;
  }
}
