/* ==========================================================================
   DEVIFY SOLUTION - BLOG & KNOWLEDGE HUB STYLESHEET
   Blueprint: Dark Futuristic Blueprint Theme (#050814, #0066ff, #00d2ff, #38bdf8)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. HERO SECTION & SEARCH/FILTER BAR
   -------------------------------------------------------------------------- */
.blog-hero-section {
  position: relative;
  background-color: #050814;
  background-image: 
    radial-gradient(circle at 80% 20%, rgba(0, 102, 255, 0.35) 0%, rgba(5, 8, 20, 0.95) 60%),
    radial-gradient(circle at 15% 50%, rgba(0, 210, 255, 0.15) 0%, transparent 50%);
  color: #ffffff;
  padding: 4rem 0 3.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.blog-hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

.blog-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  margin-bottom: 1.25rem;
}

.blog-hero-badge-dot {
  width: 8px;
  height: 8px;
  background: #38bdf8;
  border-radius: 50%;
  box-shadow: 0 0 8px #38bdf8;
  animation: blogPulse 2s infinite ease-in-out;
}

@keyframes blogPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.blog-hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #ffffff;
}

@media (min-width: 768px) {
  .blog-hero-title {
    font-size: 3.25rem;
  }
}

.blog-hero-desc {
  font-size: 1.1rem;
  color: #94a3b8;
  max-width: 740px;
  line-height: 1.6;
  margin-bottom: 2.25rem;
}

/* Search & Filter Controls */
.blog-controls-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 992px) {
  .blog-controls-wrap {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.blog-search-box {
  position: relative;
  min-width: 280px;
  max-width: 360px;
  width: 100%;
}

.blog-search-box input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.75rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.25s ease;
}

.blog-search-box input:focus {
  border-color: #0066ff;
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.25);
  background: rgba(15, 23, 42, 0.95);
}

.blog-search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

.blog-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.blog-cat-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 0.55rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.blog-cat-tab:hover {
  background: rgba(0, 102, 255, 0.15);
  color: #ffffff;
  border-color: rgba(0, 102, 255, 0.4);
}

.blog-cat-tab.active {
  background: #0066ff;
  color: #ffffff;
  border-color: #0066ff;
  box-shadow: 0 4px 14px rgba(0, 102, 255, 0.4);
}

/* --------------------------------------------------------------------------
   2. MAIN BLOG CONTENT WRAPPER
   -------------------------------------------------------------------------- */
.blog-main-section {
  background: #040711;
  padding: 3.5rem 0 5rem;
  min-height: 60vh;
}

.blog-content-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --------------------------------------------------------------------------
   3. FEATURED SPOTLIGHT ARTICLE (HERO CARD)
   -------------------------------------------------------------------------- */
.blog-featured-card {
  display: grid;
  grid-template-columns: 1fr;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(9, 14, 30, 0.9) 100%);
  border: 1px solid rgba(0, 102, 255, 0.3);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 3.5rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 992px) {
  .blog-featured-card {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.blog-featured-card:hover {
  transform: translateY(-4px);
  border-color: #38bdf8;
  box-shadow: 0 18px 45px rgba(0, 102, 255, 0.25);
}

.blog-featured-img-wrap {
  position: relative;
  min-height: 280px;
  overflow: hidden;
}

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

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

.blog-featured-badge {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background: linear-gradient(135deg, #0066ff, #00d2ff);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.blog-featured-content {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.blog-meta-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: #94a3b8;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.blog-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.blog-author-avatar-sm {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0066ff;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.blog-featured-title {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.3;
  color: #ffffff;
  margin-bottom: 1rem;
  transition: color 0.2s ease;
}

.blog-featured-title:hover {
  color: #38bdf8;
}

.blog-featured-excerpt {
  font-size: 0.98rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.blog-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
}

.blog-tag-pill {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  color: #38bdf8;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.btn-read-guide {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #0066ff;
  color: #ffffff;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  width: fit-content;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 102, 255, 0.35);
}

.btn-read-guide:hover {
  background: #0052cc;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 102, 255, 0.5);
}

/* --------------------------------------------------------------------------
   4. ARTICLES GRID & CARDS
   -------------------------------------------------------------------------- */
.blog-grid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.blog-grid-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.blog-grid-count {
  font-size: 0.85rem;
  background: rgba(0, 102, 255, 0.2);
  color: #38bdf8;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(0, 102, 255, 0.4);
}

.blog-articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 640px) {
  .blog-articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blog-articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.blog-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 102, 255, 0.45);
  box-shadow: 0 12px 30px rgba(0, 102, 255, 0.18);
}

.blog-card-thumb-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #0f172a;
}

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

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

.blog-card-category-pill {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  background: rgba(6, 11, 24, 0.85);
  color: #38bdf8;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

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

.blog-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  color: #ffffff;
  margin-bottom: 0.85rem;
  transition: color 0.2s ease;
}

.blog-card-title:hover {
  color: #38bdf8;
  cursor: pointer;
}

.blog-card-excerpt {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

.blog-card-read-link {
  color: #38bdf8;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: gap 0.2s ease, color 0.2s ease;
}

.blog-card-read-link:hover {
  color: #ffffff;
  gap: 0.6rem;
}

/* Empty search state */
.blog-empty-state {
  display: none;
  text-align: center;
  padding: 4rem 1.5rem;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
}

.blog-empty-state.show {
  display: block;
}

.blog-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #64748b;
}

.blog-empty-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.blog-empty-desc {
  font-size: 0.95rem;
  color: #94a3b8;
  margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   5. INTERACTIVE ARTICLE READER MODAL
   -------------------------------------------------------------------------- */
.blog-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 17, 0.85);
  backdrop-filter: blur(14px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.blog-modal-backdrop.active {
  display: flex;
  opacity: 1;
}

.blog-modal-container {
  background: #090e1f;
  border: 1px solid rgba(0, 102, 255, 0.35);
  border-radius: 20px;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  position: relative;
  color: #e2e8f0;
  transform: scale(0.96);
  transition: transform 0.3s ease;
}

.blog-modal-backdrop.active .blog-modal-container {
  transform: scale(1);
}

.blog-modal-close-btn {
  position: sticky;
  top: 1.25rem;
  right: 1.25rem;
  float: right;
  z-index: 20;
  width: 40px;
  height: 40px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 1.25rem 1.25rem -2.5rem 0;
}

.blog-modal-close-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
  transform: rotate(90deg);
}

.blog-modal-header {
  padding: 2.5rem 2.5rem 1.5rem;
}

.blog-modal-cat-pill {
  display: inline-block;
  background: rgba(0, 102, 255, 0.2);
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.blog-modal-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .blog-modal-title {
    font-size: 2.25rem;
  }
}

.blog-modal-author-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1.5rem;
}

.blog-modal-author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0066ff, #00d2ff);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.blog-modal-author-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.blog-modal-author-role {
  font-size: 0.8rem;
  color: #94a3b8;
}

.blog-modal-banner-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-modal-body {
  padding: 0 2.5rem 2.5rem;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #cbd5e1;
}

.blog-modal-body h3 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 2rem;
  margin-bottom: 0.85rem;
  border-left: 4px solid #0066ff;
  padding-left: 0.75rem;
}

.blog-modal-body h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #38bdf8;
  margin-top: 1.5rem;
  margin-bottom: 0.65rem;
}

.blog-modal-body p {
  margin-bottom: 1.25rem;
}

.blog-modal-body ul, .blog-modal-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.blog-modal-body li {
  margin-bottom: 0.5rem;
}

.blog-modal-highlight-box {
  background: rgba(0, 102, 255, 0.1);
  border: 1px solid rgba(0, 102, 255, 0.35);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  color: #e2e8f0;
}

.blog-modal-highlight-box strong {
  color: #38bdf8;
}

.blog-table-responsive {
  overflow-x: auto;
  margin: 1.75rem 0;
}

.blog-comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}

.blog-comparison-table th, .blog-comparison-table td {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-comparison-table th {
  background: rgba(15, 23, 42, 0.9);
  color: #38bdf8;
  font-weight: 700;
}

.blog-comparison-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.blog-modal-cta-box {
  margin-top: 2.5rem;
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.25) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid #0066ff;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
}

.blog-modal-cta-box h4 {
  font-size: 1.35rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
  border: none;
  padding: 0;
}

.blog-modal-cta-box p {
  font-size: 0.95rem;
  color: #94a3b8;
  margin-bottom: 1.25rem;
}

/* --------------------------------------------------------------------------
   6. HOMEPAGE "FROM OUR BLOG" SECTION STYLING (INDEX.HTML INTEGRATION)
   -------------------------------------------------------------------------- */
.home-blog-section {
  background: #060a17;
  padding: 5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.home-blog-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .home-blog-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.home-blog-header .section-eyebrow {
  color: #38bdf8;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.home-blog-header .section-title {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 800;
}

.home-blog-view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.home-blog-view-all-btn:hover {
  color: #ffffff;
  gap: 0.75rem;
}
