/* Blog styling that matches the main website's dream theme */

/* Use the same CSS variables as home.css */
:root {
  --primary-color: #5c318c;
  --secondary-color: #8e44ad;
  --text-color: #333;
  --light-text: #fff;
  --dark-bg: #1a1a2e;
  --transition-speed: 0.3s;
}

/* Blog pages use the same dream container */
.blog-dream-container {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: linear-gradient(135deg, var(--dark-bg) 0%, #2c2c54 100%);
  color: var(--light-text);
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* Night sky background for blog pages */
.blog-night-sky {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}

/* Simplified animations for blog pages */
.blog-moon {
  position: absolute;
  width: 120px;
  height: 120px;
  top: 10%;
  right: 10%;
  z-index: 1;
  opacity: 0.7;
  animation: blogGlow 15s infinite alternate ease-in-out;
}

.blog-star {
  position: absolute;
  width: 30px;
  height: 30px;
  z-index: 1;
  opacity: 0.6;
  animation: blogTwinkle 10s infinite alternate ease-in-out;
}

.blog-star-1 { top: 5%; left: 15%; animation-delay: 0s; }
.blog-star-2 { top: 15%; left: 85%; animation-delay: 2s; }
.blog-star-3 { top: 25%; left: 70%; animation-delay: 4s; }

/* Main blog content wrapper */
.blog-content-wrapper {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(3px);
  border-radius: 15px;
  margin-top: 80px;
  margin-bottom: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Blog header */
.blog-header {
  text-align: center;
  margin-bottom: 50px;
  padding: 40px 20px;
}

.blog-header h1 {
  font-size: 3rem;
  margin-bottom: 15px;
  color: var(--light-text);
  text-shadow: 0 0 10px rgba(138, 43, 226, 0.7);
}

.blog-subtitle {
  font-size: 1.3rem;
  opacity: 0.9;
  color: var(--light-text);
  margin-bottom: 0;
}

/* Search and filters */
.blog-filters {
  margin-bottom: 40px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.search-form {
  margin-bottom: 30px;
  text-align: center;
}

.search-input-group {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  gap: 0;
}

.search-input {
  flex: 1;
  padding: 15px 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px 0 0 25px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--light-text);
  backdrop-filter: blur(10px);
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
  outline: none;
  border-color: var(--secondary-color);
  background: rgba(255, 255, 255, 0.15);
}

.search-button {
  padding: 15px 25px;
  background: var(--primary-color);
  color: white;
  border: 2px solid var(--primary-color);
  border-radius: 0 25px 25px 0;
  cursor: pointer;
  font-size: 16px;
  transition: all var(--transition-speed);
}

.search-button:hover {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
}

/* Popular tags */
.popular-tags {
  text-align: center;
}

.popular-tags h3 {
  color: var(--light-text);
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.tag-link {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  text-decoration: none;
  color: var(--light-text);
  font-size: 14px;
  transition: all var(--transition-speed);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.tag-link:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

/* Featured posts section */
.featured-posts {
  margin-bottom: 50px;
}

.featured-posts h2 {
  color: var(--light-text);
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 30px;
  text-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.featured-post {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all var(--transition-speed);
}

.featured-post:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.featured-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.featured-content {
  padding: 25px;
}

.featured-content h3 a {
  color: var(--light-text);
  text-decoration: none;
  font-size: 1.3rem;
  line-height: 1.3;
}

.featured-excerpt {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin: 15px 0;
}

/* Blog posts grid */
.blog-posts h2 {
  color: var(--light-text);
  font-size: 2rem;
  margin-bottom: 30px;
  text-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
}

.posts-grid {
  display: grid;
  gap: 30px;
}

.blog-post-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: grid;
  grid-template-columns: 200px 1fr;
  transition: all var(--transition-speed);
}

.blog-post-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.post-image img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.post-content {
  padding: 20px;
}

.post-title a {
  color: var(--light-text);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
}

.post-title a:hover {
  color: #fff;
  text-shadow: 0 0 5px rgba(138, 43, 226, 0.7);
}

.post-excerpt {
  color: rgba(255, 255, 255, 0.8);
  margin: 10px 0 15px 0;
  line-height: 1.5;
}

.post-meta {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 15px;
}

.post-meta span {
  margin-right: 15px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-tag {
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all var(--transition-speed);
}

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

/* Sidebar */
.blog-sidebar {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  height: fit-content;
}

.sidebar-section {
  margin-bottom: 30px;
}

.sidebar-section h3 {
  color: var(--light-text);
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.recent-posts-list {
  list-style: none;
  padding: 0;
}

.recent-posts-list li {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.recent-posts-list a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--transition-speed);
}

.recent-posts-list a:hover {
  color: white;
}

.recent-posts-list small {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.sidebar-app-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.sidebar-store-badge {
  width: 140px;
  height: auto;
  transition: all var(--transition-speed);
}

.sidebar-store-badge:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* No posts message */
.no-posts {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.8);
}

.no-posts h3 {
  color: var(--light-text);
  margin-bottom: 15px;
}

/* Blog post detail page */
.blog-post-detail {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 40px;
}

.post-hero-image {
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.post-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-title-section {
  padding: 40px;
  padding-bottom: 20px;
}

.post-detail-title {
  font-size: 2.5rem;
  color: var(--light-text);
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
}

.post-detail-content {
  padding: 0 40px 40px 40px;
  line-height: 1.8;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
}

.post-detail-content h2, 
.post-detail-content h3, 
.post-detail-content h4 {
  margin-top: 30px;
  margin-bottom: 15px;
  color: var(--light-text);
  text-shadow: 0 0 5px rgba(138, 43, 226, 0.5);
}

.post-detail-content p {
  margin-bottom: 20px;
}

.post-detail-content ul, 
.post-detail-content ol {
  margin-bottom: 20px;
  padding-left: 25px;
}

.post-detail-content li {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.9);
}

/* Custom link styling for blog content */
.post-detail-content a {
  color: #a78bfa;  /* Light purple that fits the dream theme */
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
  font-weight: 500;
  border-bottom: 1px dotted rgba(167, 139, 250, 0.4);
  padding-bottom: 1px;
}

.post-detail-content a:hover {
  color: #c4b5fd;  /* Lighter purple on hover */
  text-shadow: 0 0 8px rgba(167, 139, 250, 0.6);
  border-bottom-color: rgba(196, 181, 253, 0.8);
}

/* External link indicator */
.post-detail-content a[href^="http"]:not([href*="droomverklaring"]):after {
  content: " ↗";
  font-size: 0.8em;
  vertical-align: super;
  opacity: 0.7;
  margin-left: 2px;
}

/* Strong and emphasis styling within content */
.post-detail-content strong {
  color: var(--light-text);
  font-weight: 600;
  text-shadow: 0 0 3px rgba(138, 43, 226, 0.3);
}

.post-detail-content em {
  color: rgba(255, 255, 255, 0.95);
  font-style: italic;
}

/* Code blocks styling */
.post-detail-content pre {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
  overflow-x: auto;
}

.post-detail-content code {
  background: rgba(167, 139, 250, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

/* Blockquote styling */
.post-detail-content blockquote {
  border-left: 4px solid #a78bfa;
  background: rgba(167, 139, 250, 0.05);
  padding: 15px 20px;
  margin: 20px 0;
  font-style: italic;
  border-radius: 0 8px 8px 0;
}

/* Social sharing */
.post-sharing {
  padding: 30px 40px;
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.post-sharing h4 {
  margin-bottom: 15px;
  color: var(--light-text);
}

.sharing-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.share-button {
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-speed);
  border: 1px solid transparent;
}

.share-button.twitter {
  background: #1da1f2;
  color: white;
}

.share-button.facebook {
  background: #4267b2;
  color: white;
}

.share-button.linkedin {
  background: #0077b5;
  color: white;
}

.share-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Related posts */
.related-posts {
  margin-bottom: 40px;
}

.related-posts h3 {
  font-size: 1.8rem;
  color: var(--light-text);
  margin-bottom: 25px;
  text-align: center;
  text-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.related-post {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all var(--transition-speed);
}

.related-post:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.15);
}

.related-post-image {
  height: 180px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.related-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-post:hover .related-post-image img {
  transform: scale(1.05);
}

.related-post-image .placeholder-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
}

.related-post-image .placeholder-image span {
  font-size: 3rem;
  opacity: 0.6;
}

.related-post-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.related-post-content h4 {
  margin: 0;
  line-height: 1.3;
}

.related-post-content h4 a {
  color: var(--light-text);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.related-post-content h4 a:hover {
  color: #a78bfa;
}

.related-post-excerpt {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.related-post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.related-post-meta .reading-time {
  display: flex;
  align-items: center;
  gap: 5px;
}

.related-post-meta .post-date {
  font-style: italic;
}

/* Navigation */
.post-navigation {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: start;
}

.nav-button {
  padding: 15px 30px;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: all var(--transition-speed);
  white-space: nowrap;
  border: 1px solid var(--primary-color);
}

.nav-button:hover {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: translateX(-3px);
}

.app-promotion {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.app-promotion h4 {
  color: var(--light-text);
  margin-bottom: 10px;
}

.app-promotion p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 20px;
}

.app-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.store-badge {
  height: 50px;
  width: auto;
  transition: all var(--transition-speed);
}

.store-badge:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* Animations */
@keyframes blogGlow {
  0% {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
    transform: scale(1);
  }
  100% {
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.7));
    transform: scale(1.05);
  }
}

@keyframes blogTwinkle {
  0% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .blog-content-wrapper {
    margin-top: 20px;
    padding: 20px 15px;
  }
  
  .blog-header h1 {
    font-size: 2.5rem;
  }
  
  .blog-sidebar {
    margin-top: 40px;
  }
  
  .featured-grid {
    grid-template-columns: 1fr;
  }
  
  .blog-post-card {
    grid-template-columns: 1fr;
  }
  
  .post-title-section,
  .post-detail-content,
  .post-sharing {
    padding: 20px;
  }
  
  .related-posts-grid {
    grid-template-columns: 1fr;
  }
  
  .post-navigation {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .app-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .sharing-buttons {
    justify-content: center;
  }
  
  .search-input-group {
    flex-direction: column;
    gap: 10px;
  }
  
  .search-input,
  .search-button {
    border-radius: 25px;
  }
}

@media (max-width: 480px) {
  .blog-header h1 {
    font-size: 2rem;
  }
  
  .blog-subtitle {
    font-size: 1.1rem;
  }
  
  .blog-filters {
    padding: 20px;
  }
  
  .post-detail-title {
    font-size: 2rem;
  }
  
  .tags-list {
    gap: 10px;
  }
  
  .tag-link {
    padding: 8px 15px;
    font-size: 13px;
  }
}

/* Fixed Footer for Blog Pages */
.blog-fixed-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  padding: 12px 20px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 15px;
}

.footer-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-title {
  color: var(--light-text);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
}

.footer-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  line-height: 1.2;
}

.footer-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.footer-app-link {
  display: block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.footer-app-link:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.footer-store-badge {
  height: 32px;
  width: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Add bottom padding to blog content to account for fixed footer */
body:has(.blog-fixed-footer) .blog-dream-container {
  padding-bottom: 80px; /* Space for fixed footer */
}

/* Mobile responsive footer */
@media (max-width: 768px) {
  .blog-fixed-footer {
    padding: 8px 15px;
  }
  
  .footer-content {
    gap: 10px;
  }
  
  .footer-title {
    font-size: 13px;
  }
  
  .footer-subtitle {
    font-size: 11px;
  }
  
  .footer-buttons {
    gap: 8px;
  }
  
  .footer-store-badge {
    height: 28px;
  }
  
  body:has(.blog-fixed-footer) .blog-dream-container {
    padding-bottom: 65px; /* Smaller space for mobile */
  }
}

@media (max-width: 480px) {
  .blog-fixed-footer {
    padding: 6px 12px;
  }
  
  .footer-content {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 8px;
  }
  
  .footer-text {
    order: 2;
    width: 100%;
    margin-top: 4px;
  }
  
  .footer-buttons {
    order: 1;
    gap: 6px;
  }
  
  .footer-title {
    font-size: 12px;
  }
  
  .footer-subtitle {
    font-size: 10px;
  }
  
  .footer-store-badge {
    height: 24px;
  }
  
  body:has(.blog-fixed-footer) .blog-dream-container {
    padding-bottom: 70px; /* Account for wrapped layout */
  }
}