/* ==========================================================================
   BLOG PAGE STYLES - Infinity Power India
   Matches exact reference design from blog page.png
   ========================================================================== */

/* Hero Section */
.blog-hero {
  position: relative;
  background: #031833 url('assets/blog-hero.jpg') center center / cover no-repeat;
  color: #ffffff;
  padding: 64px 0 72px;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 22, 51, 0.85) 0%, rgba(2, 14, 34, 0.93) 100%);
  z-index: 1;
}

.blog-hero .container {
  position: relative;
  z-index: 2;
}

.blog-hero-badge {
  display: inline-block;
  border: 1px solid #ed2626;
  color: #ff4d4d;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 16px;
  background: rgba(237, 38, 38, 0.08);
}

.blog-hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(38px, 4.5vw, 52px);
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0 0 12px;
  color: #ffffff;
}

.blog-hero p {
  font-size: 15px;
  color: #cbd5e1;
  margin: 0 0 22px;
  max-width: 580px;
  line-height: 1.6;
}

.blog-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
}

.blog-breadcrumbs a {
  color: #ffffff;
  transition: color 0.2s ease;
}

.blog-breadcrumbs a:hover {
  color: #ff4d4d;
}

.blog-breadcrumbs .sep {
  color: #ed2626;
  font-weight: 700;
}

.blog-breadcrumbs .current {
  color: #ed2626;
}


/* Main Blog Layout */
.blog-section {
  padding: 56px 0 84px;
  background: #ffffff;
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 38px;
  align-items: start;
}


/* Header Row (Title & Sort) */
.blog-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  gap: 20px;
}

.blog-header-title h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #0b1d3c;
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}

.blog-header-title p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
  line-height: 1.55;
  max-width: 560px;
}

.blog-sort-select {
  padding: 9px 36px 9px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%3C334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
}

.blog-sort-select:focus {
  border-color: #ed2626;
}


/* Blog Posts Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Individual Blog Card */
.blog-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.09);
  border-color: #cbd5e1;
}

.blog-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.blog-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
  padding: 6px;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-img-wrap img {
  transform: scale(1.06);
}

/* Date Badge on Image */
.blog-date-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(11, 29, 60, 0.88);
  backdrop-filter: blur(4px);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 2;
}

.blog-date-badge .day {
  display: block;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
}

.blog-date-badge .month-year {
  display: block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #94a3b8;
  margin-top: 2px;
}

/* Card Content */
.blog-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-cat {
  font-size: 11px;
  font-weight: 700;
  color: #ed2626;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: block;
}

.blog-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #0b1d3c;
  line-height: 1.35;
  margin: 0 0 10px;
}

.blog-card-title a {
  color: inherit;
  transition: color 0.2s ease;
}

.blog-card-title a:hover {
  color: #ed2626;
}

.blog-card-excerpt {
  font-size: 13px;
  color: #64748b;
  line-height: 1.55;
  margin: 0 0 18px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta Footer */
.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  color: #64748b;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-item svg {
  flex-shrink: 0;
  color: #94a3b8;
}


/* Pagination */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 42px;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s ease;
  text-decoration: none;
}

.page-link:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #ed2626;
}

.page-link.active {
  background: #0b1d3c;
  color: #ffffff;
  border-color: #0b1d3c;
}

.page-dots {
  color: #94a3b8;
  font-weight: 700;
  padding: 0 4px;
}

.page-link--next {
  min-width: auto;
  padding: 0 16px;
  gap: 6px;
}


/* Sidebar Widgets */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.widget {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.02);
}

.widget-title {
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #0b1d3c;
  margin: 0 0 18px;
  position: relative;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 36px;
  height: 2px;
  background: #ed2626;
}

/* Search Widget */
.widget-search-form {
  display: flex;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.widget-search-form:focus-within {
  border-color: #0b1d3c;
}

.widget-search-input {
  flex: 1;
  border: 0;
  padding: 11px 14px;
  font-size: 13px;
  color: #0b1d3c;
  outline: none;
}

.widget-search-input::placeholder {
  color: #94a3b8;
}

.widget-search-btn {
  width: 44px;
  border: 0;
  background: #0b1d3c;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.widget-search-btn:hover {
  background: #ed2626;
}

/* Categories Widget */
.widget-cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget-cat-list li {
  margin-bottom: 6px;
}

.widget-cat-list li:last-child {
  margin-bottom: 0;
}

.widget-cat-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.widget-cat-list a:hover {
  background: #f8fafc;
  color: #ed2626;
}

.cat-count {
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

/* Recent Posts Widget */
.recent-posts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.recent-post-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.recent-post-img {
  width: 65px;
  height: 60px;
  border-radius: 6px;
  object-fit: contain;
  background: #ffffff;
  padding: 2px;
  flex-shrink: 0;
}

.recent-post-info {
  flex: 1;
}

.recent-post-title {
  font-size: 13px;
  font-weight: 700;
  color: #0b1d3c;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.recent-post-title:hover {
  color: #ed2626;
}

.recent-post-date {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
  display: block;
}

/* Popular Tags Widget */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-btn {
  padding: 6px 14px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  transition: all 0.2s ease;
  text-decoration: none;
}

.tag-btn:hover {
  background: #0b1d3c;
  color: #ffffff;
  border-color: #0b1d3c;
}

/* Newsletter Widget */
.widget-newsletter {
  background: linear-gradient(145deg, #07162c, #0a1f3d);
  border-radius: 12px;
  padding: 28px 22px;
  color: #ffffff;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.newsletter-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  margin-bottom: 14px;
}

.widget-newsletter h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px;
}

.widget-newsletter p {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 0 18px;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.newsletter-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease;
}

.newsletter-input::placeholder {
  color: #64748b;
}

.newsletter-input:focus {
  border-color: #ed2626;
}

.newsletter-btn {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  border: 0;
  background: #ed2626;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.newsletter-btn:hover {
  background: #c91e24;
}


/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1100px) {
  .blog-layout {
    grid-template-columns: 1fr 290px;
    gap: 28px;
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    margin-top: 20px;
  }

  .blog-header-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-hero h1 {
    font-size: 32px;
  }
}
