/* ================================================
   BLOGS PAGE — KULDEVI FORGE & FITTINGS
   ================================================ */

/* ── BLOGS HERO WITH PARALLAX & DARK NAVY OVERLAY ── */
.blogs-hero {
  padding: clamp(100px, 15vw, 180px) clamp(16px, 5vw, 48px) clamp(80px, 10vw, 120px);
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(400px, 65vh, 600px);
}

/* Background photo with parallax */
.blogs-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url('assets/blogs-hero.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Standard CSS parallax */
  will-change: transform;
}

/* Dark gradient overlay for text legibility */
.blogs-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to bottom,
    rgba(2, 8, 20, 0.82) 0%,
    rgba(2, 8, 20, 0.6) 50%,
    rgba(2, 8, 20, 0.88) 100%
  );
}

/* Clean text overlay content */
.blogs-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.blogs-hero-content h1 {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 900;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-soft) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  line-height: 1.15;
}

.blogs-hero-content p {
  color: var(--text-secondary);
  font-size: clamp(14px, 2.5vw, 18px);
  line-height: 1.7;
  max-width: 620px;
  margin: 0 auto;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .blogs-hero {
    padding: clamp(100px, 12vw, 140px) 16px clamp(60px, 8vw, 80px);
    min-height: clamp(350px, 50vh, 500px);
  }
  .blogs-hero-bg {
    background-attachment: scroll; /* Disable fixed parallax on touch devices for performance */
  }
}

/* ── BLOG GRID ── */
.blogs-page {
  max-width: 1200px;
  margin: 0 auto;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}
.blog-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  opacity: 0;
  transition: opacity 0.4s;
}
.blog-card:hover {
  border-color: var(--line-accent);
  transform: translateY(-6px);
  box-shadow: 0 0 40px rgba(37, 99, 235, 0.1);
}
.blog-card:hover::before { opacity: 1; }

.blog-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-subtle);
  color: var(--accent-soft);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.blog-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}
.blog-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}
.blog-read {
  font-size: 13px;
  color: var(--accent-soft);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.3s;
}
.blog-card:hover .blog-read { gap: 8px; }

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  place-items: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}
.modal-content {
  width: min(600px, 90vw);
  padding: 36px;
  border: 1px solid var(--line-accent);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  position: relative;
  box-shadow: 0 0 80px rgba(37, 99, 235, 0.15);
}
.close-btn {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 28px;
  cursor: pointer;
  transition: color 0.3s;
}
.close-btn:hover { color: var(--accent-soft); }
.modal-cat {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--accent-subtle);
  color: var(--accent-soft);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.modal-content h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 16px;
}
.modal-body p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}