/* Blogs page specific styles */
:root {
  --blog-primary: #3a506b;
  --blog-secondary: #5bc0be;
  --blog-accent: #ffa500;
  --blog-dark: #1c2541;
  --blog-light: #eef0f2;
}

body {
  background-color: #0a0a0a;
}

/* Blog header styling */
.breadcrumb {
  margin-bottom: 1.5rem;
  color: #777;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #888;
  border-bottom: 1px dotted #555;
}

.breadcrumb a:hover {
  color: var(--blog-secondary);
  border-bottom-color: var(--blog-secondary);
}

h1 {
  font-size: 3.5rem;
  letter-spacing: -0.03em;
  background: linear-gradient(
    to right,
    var(--blog-secondary),
    var(--blog-accent)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

.blog-subtitle {
  font-size: 1.3rem;
  color: #888;
  font-style: italic;
  margin-bottom: 2rem;
}

/* Blog intro */
.blog-intro {
  border-left: 3px solid var(--blog-secondary);
  padding-left: 1.5rem;
  margin-bottom: 3rem;
  font-size: 1.2rem;
  color: #bbb;
  line-height: 1.7;
}

/* Timeline layout */
.blog-timeline {
  position: relative;
  padding-left: 2rem;
}

.blog-timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    var(--blog-secondary),
    var(--blog-accent)
  );
  border-radius: 3px;
}

.blog-post {
  position: relative;
  margin-bottom: 4rem;
  background-color: #111;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.blog-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.blog-post::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 1.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--blog-secondary);
  border: 2px solid #111;
  z-index: 1;
}

/* Post metadata */
.post-metadata {
  display: flex;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background-color: #0c0c0c;
  border-bottom: 1px solid #222;
  font-size: 0.9rem;
}

.post-date {
  color: #999;
  font-weight: 500;
}

.post-category {
  color: var(--blog-secondary);
  font-weight: bold;
}

/* Post content */
.post-content {
  padding: 1.5rem;
}

.post-content h2 {
  font-size: 1.8rem;
  margin-top: 0;
  margin-bottom: 1.2rem;
  color: #fff;
  border-bottom: none;
  padding-bottom: 0;
}

.post-image {
  margin: 1.5rem 0;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  position: relative;
  height: 300px; /* Fixed height for consistent sizing */
}

.post-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.1),
    rgba(0, 0, 0, 0.3)
  );
  pointer-events: none;
}

.post-image img {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.6s ease;
  object-fit: cover; /* Makes images cover the space without distortion */
  object-position: center; /* Centers the image */
}

.blog-post:hover .post-image img {
  transform: scale(1.03);
}

.post-content p {
  color: #bbb;
  line-height: 1.7;
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
}

/* Post lists */
.post-list {
  margin: 1.5rem 0;
  list-style-type: none;
}

.post-list li {
  margin-bottom: 0.8rem;
  padding-left: 1.5rem;
  position: relative;
  color: #aaa;
}

.post-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--blog-secondary);
}

/* Blockquotes */
blockquote {
  margin: 1.5rem 0;
  padding: 1.2rem 1.5rem;
  background-color: #161616;
  border-left: 4px solid var(--blog-accent);
  font-style: italic;
  color: #ccc;
  font-size: 1.15rem;
}

/* Tags */
.post-tags {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-tags span {
  padding: 0.4rem 0.8rem;
  background-color: #1a1a1a;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--blog-secondary);
  transition: all 0.3s ease;
  cursor: pointer;
}

.post-tags span:hover {
  background-color: #222;
  color: var(--blog-accent);
  transform: translateY(-2px);
}

.post-tags span.active-tag {
  background-color: var(--blog-secondary);
  color: #111;
  transform: translateY(-2px);
}

/* Footer styling */
footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #222;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

footer p {
  margin-bottom: 0;
  font-size: 1rem;
  color: #888;
}

.blog-nav a {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background-color: var(--blog-dark);
  color: #fff;
  border-radius: 4px;
  transition: all 0.3s ease;
  border: none;
  font-weight: 600;
}

.blog-nav a:hover {
  background-color: var(--blog-secondary);
  color: var(--blog-dark);
  transform: translateY(-2px);
}

/* Responsive styling */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  .blog-subtitle {
    font-size: 1.1rem;
  }

  .blog-timeline {
    padding-left: 1.5rem;
  }

  .blog-post::before {
    left: -1.5rem;
  }

  .post-metadata {
    flex-direction: column;
    gap: 0.5rem;
  }

  .post-content h2 {
    font-size: 1.6rem;
  }
}

/* Animation for timeline elements */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blog-post {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

.blog-post:nth-child(1) {
  animation-delay: 0.2s;
}
.blog-post:nth-child(2) {
  animation-delay: 0.4s;
}
.blog-post:nth-child(3) {
  animation-delay: 0.6s;
}
.blog-post:nth-child(4) {
  animation-delay: 0.8s;
}
.blog-post:nth-child(5) {
  animation-delay: 1s;
}

/* Blog filters */
.blog-filters {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #222;
}

.filter-label {
  color: #777;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.filter-btn {
  background-color: #191919;
  color: #aaa;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background-color: #222;
  color: var(--blog-secondary);
  border-color: #444;
}

.filter-btn.active {
  background-color: var(--blog-dark);
  color: var(--blog-secondary);
  border-color: var(--blog-secondary);
}
