/* ==========================================================================
   Tech Blog Section Styles
   Matches Figma dev mode specifications exactly.
   ========================================================================== */

.tech-blog-section {
  padding: 60px 0 80px 0;
  background-color: #FFFFFF;
  overflow: hidden;
}

/* --- Header Area --- */
.blog-header-area {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.blog-section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 38.45px;
  line-height: 48.73px;
  letter-spacing: -1.92px;
  color: #111827;
  margin: 0;
  display: flex;
  align-items: center;
}

.blog-section-title .gradient-text {
  background: linear-gradient(90deg, #FF007A 0%, #8A2BE2 50%, #0070FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Navigation Arrows --- */
.blog-nav-actions {
  display: flex;
  gap: 12px;
}

.blog-arrow-btn {
  width: 42.73px;
  height: 42.73px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.blog-prev {
  border: 1.07px solid #464646;
  background: transparent;
  color: #111827;
}

.blog-prev:hover {
  background: #f3f4f6;
}

.blog-next {
  border: none;
  background: linear-gradient(90deg, #FF007A 0%, #8A2BE2 50%, #0070FF 100%);
  color: #FFFFFF;
}

.blog-next:hover {
  opacity: 0.9;
  box-shadow: 0 4px 12px rgba(138, 43, 226, 0.3);
}

/* --- Slider/Grid Track --- */
.blog-slider-container {
  width: 100%;
  position: relative;
}

.blog-slider-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding: 10px 0 30px 0; 
}

.blog-slider-track::-webkit-scrollbar {
  display: none;
}

/* --- Blog Card Base Styles --- */
.xeero-blog-card {
  flex: 0 0 405.12px; 
  width: 405.12px;
  min-height: 612.57px;
  border-radius: 41.91px;
  background-color: #FFFFFF;
  border: 1.05px solid #F3F4F6;
  padding: 22px;
  display: flex;
  flex-direction: column;
  position: relative; 
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Pseudo-element for gradient border */
.xeero-blog-card::before {
  content: "";
  position: absolute;
  inset: -1.05px; 
  border-radius: 42.96px; 
  background: linear-gradient(135deg, #FF007A, #8A2BE2, #0070FF);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1.05px; 
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

/* ==============================================================
   SMART HOVER LOGIC (Card Borders)
   ============================================================== */

/* 1. Default State: Featured Card Active */
.xeero-blog-card.featured-blog-card {
  border-color: transparent;
}
.xeero-blog-card.featured-blog-card::before {
  opacity: 1;
}

/* 2. When container is hovered: Deactivate Featured Card (if NOT hovered) */
.blog-slider-track:hover .xeero-blog-card.featured-blog-card:not(:hover) {
  border-color: #F3F4F6;
}
.blog-slider-track:hover .xeero-blog-card.featured-blog-card:not(:hover)::before {
  opacity: 0;
}

/* 3. Hover State: ANY hovered card becomes active */
.xeero-blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
  border-color: transparent;
}
.xeero-blog-card:hover::before {
  opacity: 1;
}


/* --- Image & Thumbnail --- */
.blog-thumb-container {
  width: 100%;
  height: 225.7px;
  border-radius: 29.34px;
  overflow: hidden;
  position: relative;
  margin-bottom: 24px;
}

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

.xeero-blog-card:hover .blog-img {
  transform: scale(1.05);
}

/* --- Category Tag --- */
.blog-cat-tag {
  position: absolute;
  top: 15.72px;
  left: 15.72px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10.48px);
  -webkit-backdrop-filter: blur(10.48px);
  border-radius: 12.57px;
  padding: 6px 14px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 10.48px;
  line-height: 15.72px;
  letter-spacing: 1.05px;
  text-transform: uppercase;
  color: #111827;
  z-index: 2;
}

/* --- Content Body --- */
.blog-content-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.blog-date {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 12.57px;
  line-height: 16.76px;
  letter-spacing: 1.26px;
  color: #9CA3AF;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.blog-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 25.15px;
  line-height: 31.43px;
  color: #111827;
  margin: 0 0 16px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 94.5px; 
}

.blog-excerpt {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 400;
  font-size: 14.67px;
  line-height: 23.84px;
  color: #6B7280;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Footer & Button --- */
.blog-footer {
  margin-top: 24px;
  width: 100%;
}

.read-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 55.53px;
  border-radius: 18.86px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 14.67px;
  text-decoration: none;
  transition: all 0.3s ease;
}


/* ==============================================================
   SMART HOVER LOGIC (Buttons)
   ============================================================== */

/* Base style for all buttons (Make them act like Outline by default) */
.read-more-btn {
  background: #FFFFFF;
  border: 2.1px solid #F3F4F6;
  color: #4B5563;
}

/* 1. Default State: Featured Card Button Active */
.xeero-blog-card.featured-blog-card .read-more-btn {
  background: linear-gradient(90deg, #FF007A 0%, #8A2BE2 50%, #0070FF 100%);
  color: #FFFFFF;
  border-color: transparent;
}

/* 2. When container hovered: Deactivate Featured Card Button (if NOT hovered) */
.blog-slider-track:hover .xeero-blog-card.featured-blog-card:not(:hover) .read-more-btn {
  background: #FFFFFF; /* এখানে শুধু background লেখা হয়েছে গ্রেডিয়েন্ট মোছার জন্য */
  border: 2.1px solid #F3F4F6;
  color: #4B5563;
}

/* 3. Hover State: ANY hovered card button becomes active */
.xeero-blog-card:hover .read-more-btn {
  background: linear-gradient(90deg, #FF007A 0%, #8A2BE2 50%, #0070FF 100%);
  color: #FFFFFF;
  border-color: transparent;
  opacity: 0.95;
}


/* --- Responsive Adjustments (Mobile Version) --- */
@media (max-width: 1200px) {
  .xeero-blog-card {
    flex: 0 0 350px;
    width: 350px;
  }
}

@media (max-width: 768px) {
  /* Header & Arrows (এক লাইনে রাখার জন্য) */
  .blog-header-area {
    flex-direction: row; /* column এর বদলে row করা হলো */
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
  }
  
  .blog-section-title {
    font-size: 28px; 
    line-height: 34px;
  }
  
  .blog-nav-actions {
    align-self: center; /* flex-end সরিয়ে center করা হলো */
  }

  .blog-arrow-btn {
    width: 25.73px;
    height: 25.73px;
  }
  
  .blog-arrow-btn svg {
    width: 14px;
    height: 14px;
  }
  .blog-nav-actions {
    gap: 5px;
  }

  /* Card Resizing */
  .xeero-blog-card {
    flex: 0 0 291.59px;
    width: 291.59px;
    min-height: 383.05px;
    border-radius: 27.57px;
    padding: 16px; /* ফিগমা অনুযায়ী */
  }

  .xeero-blog-card::before {
    border-radius: 28.5px; /* বর্ডারের সাথে ব্যালেন্স করার জন্য */
  }

  /* Image Resizing */
  .blog-thumb-container {
    height: 164.35px;
    border-radius: 21.21px;
    margin-bottom: 16px;
  }

  .blog-cat-tag {
    top: 10px;
    left: 10px;
    font-size: 8px;
    padding: 4px 10px;
  }

  /* Typography Update */
  .blog-date {
    font-size: 11.66px;
    line-height: 17.5px;
    margin-bottom: 8px;
  }

  .blog-title {
    font-size: 14.84px;
    line-height: 20.41px;
    margin-bottom: 8px;
    /* মোবাইলে ২ লাইনের টাইটেল */
    -webkit-line-clamp: 2; 
    min-height: 40.82px; /* 20.41 * 2 */
  }

  .blog-excerpt {
    font-size: 10.6px;
    line-height: 18.95px;
    /* মোবাইলে ২ লাইনের ডেসক্রিপশন */
    -webkit-line-clamp: 2; 
  }

  /* Footer & Button Resizing */
  .blog-footer {
    margin-top: 16px;
  }

  .read-more-btn {
    height: 42px;
    border-radius: 14px;
    font-size: 12px;
  }
}