/* Spider web effect styles */
#web-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

.web-line {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  /* You can adjust these styles according to your needs */
  width: 1px; 
  height: 0;
}


/* Define color variables and global styles */
:root {
  --primary: #FF6B6B; /* A more vibrant primary color */
  --primary-dark: #E64949;
  --bg-light: #FDF6E3; /* A softer background color */
  --text-dark: #333;
  --text-muted: #7F7F7F;
  --border: #D8D8D8;
  --radius: 12px; /* Larger rounded corners */
}

/* Global body styles */
body {
  padding: 2rem 1rem;
  font: 18px/1.7 "Playfair Display", serif; /* Change the font */
  color: var(--text-muted);
  background-color: #fff;
}

/* Wrapper styles for centering content */
.wrapper {
  max-width: 1000px;
  width: 90%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem; /* Increase the spacing between elements */
}

/* Header styles */
header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 a {
  color: var(--text-dark);
  font-size: 2.2rem;
  transition: color 0.3s ease;
}

header h1 a:hover {
  color: var(--primary-dark);
}

header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0.5rem 0 1.5rem;
}

/* Navigation styles */
nav.header-pages {
  margin: 1rem 0;
}

nav.header-pages a {
  display: inline-block;
  margin: 0 0.8rem;
  padding: 0.3rem 0.6rem;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

nav.header-pages a:hover {
  color: var(--primary-dark);
  transform: translateY(-2px);
}

/* Hero section styles */
.hero-section {
  text-align: center;
  padding: 3rem 0;
  margin-bottom: 2rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--text-dark);
  max-width: 700px;
  margin: 1rem auto;
}

.cta-button {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(to bottom, var(--primary), var(--primary-dark)); /* Gradient background */
  color: white;
  border-radius: var(--radius);
  transition: transform 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Shadow effect */
}

.cta-button:hover {
  background: linear-gradient(to bottom, var(--primary-dark), var(--primary)); /* Reverse the gradient on hover */
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); /* Enhance the shadow on hover */
  animation: bounce 1s;
}

/* Section title styles */
.section-title {
  color: var(--text-dark);
  font-size: 1.8rem;
  margin: 2rem 0 1.5rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}

/* Recent posts styles */
.recent-posts {
  display: grid;
  gap: 1.5rem;
}

.post-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
  animation: fadeIn 0.5s ease-out; /* Add animation */
}

.post-card:hover {
  transform: translateY(-5px);
  animation: scale 0.3s ease;
}

.post-card h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.post-card h2 a {
  color: var(--text-dark);
  transition: color 0.3s ease;
}

.post-card h2 a:hover {
  color: var(--primary-dark);
}

.post-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.5rem 0;
}

.post-meta span {
  margin-right: 1rem;
}

/* Post container styles */
.post-container {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.post-content-wrapper {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.post-toc {
  background: var(--bg-light);
  padding: 1rem;
  border-radius: var(--radius);
  position: sticky;
  top: 2rem;
}

.post-toc h4 {
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.post-toc ul {
  list-style: none;
  padding-left: 1rem;
}

.post-toc a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.post-toc a:hover {
  color: var(--primary-dark);
}

/* Pagination styles */
.pagination {
  text-align: center;
  padding: 2rem;
  font-size: 1.1rem;
}

.pagination a {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
  margin: 0 0.5rem;
}

.pagination a:hover {
  background: var(--bg-light);
  border-color: var(--primary-dark);
}

/* Image styles */
img {
  border-radius: var(--radius);
  border: 2px solid var(--border);
  transition: transform 0.3s ease;
}

img:hover {
  transform: scale(1.03);
}

/* Media query for responsive design */
@media (max-width: 768px) {
  .wrapper {
    width: 95%;
  }

  .post-content-wrapper {
    grid-template-columns: 1fr;
  }

  .post-toc {
    position: static;
  }

  nav.header-pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
}

/* Fade in and out animation */
@keyframes fadeInOut {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.hero-section h1 {
  animation: fadeInOut 5s infinite;
}

/* Spin animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

header img.logo {
  animation: spin 10s linear infinite;
}

/* Scale animation */
@keyframes scale {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Slide in animation */
@keyframes slideIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.sidebar {
  animation: slideIn 0.5s ease;
}

/* Bounce animation */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-30px);
  }
  60% {
    transform: translateY(-15px);
  }
}