/* ============================================
   BLOG PAGES STYLES (BLOGS LIST + BLOG POSTS)
   Kept separate from global style.css for cleaner structure.
   ============================================ */

/* ===== Progress bar (blog post pages) ===== */
.reading-progress {
  position: fixed;
  left: 0;
  right: 0;
  top: 72px; /* just below navbar */
  height: 3px;
  background: rgba(0, 212, 255, 0.08);
  z-index: 1100;
  backdrop-filter: blur(10px);
}

.reading-progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 1));
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.35);
  transition: width 0.12s linear;
}

@media (max-width: 968px) {
  .reading-progress {
    top: 70px;
  }
}

/* ===== Blogs Hero Section ===== */
.blogs-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 0 70px;
  overflow: hidden;
}

.blogs-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 820px;
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.blogs-hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 1.1rem;
}

.blogs-hero-description {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.8);
  max-width: 620px;
  margin: 0 auto;
}

/* ===== Blogs Listing Section ===== */
.blogs-listing {
  background: var(--secondary-black);
  padding: 70px 0;
}

.blogs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2.25rem;
}

.blog-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(0, 212, 255, 0.1);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  transform-style: preserve-3d;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-10px) rotateX(1deg);
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 25px 50px rgba(0, 212, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}

.blog-card-image {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.08);
}

.blog-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.blog-card:hover .blog-card-overlay {
  opacity: 1;
}

.blog-card-date {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 212, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  text-align: center;
  z-index: 2;
}

.date-day {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sky-blue);
  line-height: 1;
}

.date-month {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.2rem;
}

.blog-card-content {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card-meta {
  display: flex;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.blog-category {
  padding: 0.38rem 0.95rem;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 999px;
  color: var(--sky-blue);
  font-size: 0.85rem;
  font-weight: 600;
}

.blog-read-time {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
}

.blog-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.45rem;
  font-weight: 600;
  margin-bottom: 0.9rem;
  line-height: 1.25;
}

.blog-card-title a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-card:hover .blog-card-title a {
  color: var(--sky-blue);
}

.blog-card-excerpt {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.1rem;
  line-height: 1.65;
}

.blog-card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 0.75rem;
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--sky-blue);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.blog-read-more svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-read-more {
  transform: translateX(5px);
}

.blog-card:hover .blog-read-more svg {
  transform: translateX(3px);
}

/* ===== Blog Post Page Styles ===== */
.blog-post-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 0 60px;
  overflow: hidden;
}

.blog-post-header {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

.back-to-blogs {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--sky-blue);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
}

.back-to-blogs svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.back-to-blogs:hover {
  transform: translateX(-5px);
}

.back-to-blogs:hover svg {
  transform: translateX(-3px);
}

.blog-post-meta {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
}

.blog-post-category,
.blog-post-date,
.blog-post-read-time {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.blog-post-category {
  padding: 0.4rem 1rem;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 999px;
  color: var(--sky-blue);
  font-weight: 600;
}

.blog-post-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 3.35rem);
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: 1.05rem;
  color: var(--white);
}

.blog-post-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.65;
  max-width: 720px;
  margin: 0 auto;
}

.blog-post-content {
  background: var(--secondary-black);
  padding: 60px 0;
  min-height: 50vh;
}

.blog-post-body {
  max-width: 900px;
  margin: 0 auto;
}

/* ===== Vertical rhythm (reduced ~50%) ===== */
.blog-section {
  margin-bottom: 1.25rem; /* was 2.5rem */
}

.blog-section h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  padding-bottom: 0.5rem;
  color: var(--white);
  border-bottom: 2px solid rgba(0, 212, 255, 0.2);
}

.blog-section h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0.75rem 0 0.4rem;
  color: var(--sky-blue);
}

.blog-section h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0.6rem 0 0.35rem;
  color: var(--white);
}

.blog-section p {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.75;
  margin-bottom: 0.65rem; /* was 1.2rem */
  font-size: 1.03rem;
}

.blog-list {
  list-style: none;
  margin: 0.65rem 0;
  padding-left: 0;
}

.blog-list li {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
  padding-left: 2rem;
  position: relative;
  margin-bottom: 0.35rem;
  font-size: 1.02rem;
}

.blog-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--sky-blue);
  font-weight: 700;
}

.blog-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 0.85rem 0;
}

.blog-feature-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(0, 212, 255, 0.1);
  border-radius: 15px;
  padding: 1.25rem;
  transition: all 0.3s ease;
}

.blog-feature-card:hover {
  border-color: rgba(0, 212, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-4px);
}

.blog-feature-card ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.blog-feature-card ul li {
  color: rgba(255, 255, 255, 0.72);
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.35rem;
}

.blog-feature-card ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--sky-blue);
}

.blog-code-block {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 12px;
  padding: 1.25rem;
  margin: 0.85rem 0;
  overflow-x: auto;
}

.blog-code-block code {
  color: var(--sky-blue);
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  display: block;
}

.blog-code-block pre {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.blog-code-block pre code {
  color: rgba(255, 255, 255, 0.9);
}

.blog-comparison-table {
  overflow-x: auto;
  margin: 0.85rem 0;
}

.blog-comparison-table table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  overflow: hidden;
}

.blog-comparison-table thead {
  background: rgba(0, 212, 255, 0.1);
}

.blog-comparison-table th {
  padding: 0.9rem;
  text-align: left;
  color: var(--sky-blue);
  font-weight: 600;
  border-bottom: 2px solid rgba(0, 212, 255, 0.3);
}

.blog-comparison-table td {
  padding: 0.9rem;
  color: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.blog-comparison-table tr:hover {
  background: rgba(0, 212, 255, 0.05);
}

.blog-comparison-table tr:last-child td {
  border-bottom: none;
}

.blog-post-footer {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 212, 255, 0.2);
  text-align: center;
}

.blog-post-footer .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.8rem 1.8rem;
  font-size: 0.95rem;
  white-space: nowrap;
}

.blog-post-footer .btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.blog-post-footer .btn span {
  display: inline-block;
}

/* ===== No Blogs Message ===== */
.no-blogs-message {
  text-align: center;
  padding: 3rem 1.5rem;
  color: rgba(255, 255, 255, 0.7);
}

.no-blogs-message p {
  font-size: 1.1rem;
}

/* ===== Responsive Blog Styles ===== */
@media (max-width: 968px) {
  .blogs-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .blogs-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .blog-post-title {
    font-size: 2rem;
  }

  .blog-section h2 {
    font-size: 1.5rem;
  }

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

  .blog-comparison-table {
    font-size: 0.9rem;
  }

  .blog-post-meta {
    flex-direction: column;
    gap: 0.6rem;
  }
}

@media (max-width: 480px) {
  .blog-card-content {
    padding: 1.4rem;
  }

  .blog-card-title {
    font-size: 1.25rem;
  }

  .blog-card-excerpt {
    font-size: 0.95rem;
  }
}
