/* ============================================
   Fifth M Blog Styles — blog.css
   Dark premium theme with red accents
   ============================================ */

/* ---------- Hero Section ---------- */
.bl-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 120px 24px 80px;
  background: var(--bg-primary);
}

/* Grid-line overlay */
.bl-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(230, 57, 70, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 57, 70, .06) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: bl-gridShift 20s linear infinite;
  pointer-events: none;
}

@keyframes bl-gridShift {
  0%   { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}

/* Floating particles container */
.bl-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.bl-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-red);
  opacity: 0;
  animation: bl-float 8s ease-in-out infinite;
}

.bl-particle:nth-child(1)  { left:  8%; top: 20%; animation-delay: 0s;   animation-duration: 7s;  }
.bl-particle:nth-child(2)  { left: 22%; top: 60%; animation-delay: 1.2s; animation-duration: 9s;  }
.bl-particle:nth-child(3)  { left: 40%; top: 35%; animation-delay: 2.4s; animation-duration: 6s;  }
.bl-particle:nth-child(4)  { left: 55%; top: 75%; animation-delay: 0.8s; animation-duration: 10s; }
.bl-particle:nth-child(5)  { left: 70%; top: 15%; animation-delay: 3s;   animation-duration: 8s;  }
.bl-particle:nth-child(6)  { left: 85%; top: 50%; animation-delay: 1.6s; animation-duration: 7.5s;}
.bl-particle:nth-child(7)  { left: 15%; top: 80%; animation-delay: 4s;   animation-duration: 9.5s;}
.bl-particle:nth-child(8)  { left: 48%; top: 10%; animation-delay: 2s;   animation-duration: 6.5s;}
.bl-particle:nth-child(9)  { left: 92%; top: 40%; animation-delay: 3.5s; animation-duration: 8.5s;}
.bl-particle:nth-child(10) { left: 33%; top: 90%; animation-delay: 0.5s; animation-duration: 11s; }

@keyframes bl-float {
  0%, 100% { opacity: 0; transform: translateY(0) scale(1); }
  20%      { opacity: .7; }
  50%      { opacity: .4; transform: translateY(-60px) scale(1.6); }
  80%      { opacity: .6; }
}

/* Gradient orbs */
.bl-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: .18;
}

.bl-orb--1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, var(--accent-red), transparent 70%);
  top: -10%;
  left: -8%;
  animation: bl-orbDrift1 14s ease-in-out infinite alternate;
}

.bl-orb--2 {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, #ff6b6b, transparent 70%);
  bottom: -12%;
  right: -6%;
  animation: bl-orbDrift2 18s ease-in-out infinite alternate;
}

.bl-orb--3 {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, #c0392b, transparent 70%);
  top: 30%;
  right: 20%;
  animation: bl-orbDrift3 12s ease-in-out infinite alternate;
}

@keyframes bl-orbDrift1 {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(60px, 40px); }
}
@keyframes bl-orbDrift2 {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(-50px, -30px); }
}
@keyframes bl-orbDrift3 {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(30px, -50px); }
}

/* Hero content */
.bl-hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.bl-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border: 1px solid rgba(230, 57, 70, .35);
  border-radius: 50px;
  font-family: var(--font-secondary);
  font-size: .78rem;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 28px;
  background: rgba(230, 57, 70, .06);
  backdrop-filter: blur(6px);
}

.bl-hero-badge span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-red);
  animation: bl-pulse 1.8s ease-in-out infinite;
}

@keyframes bl-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.7); }
}

.bl-hero-title {
  font-family: var(--font-primary);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 300;
  color: rgba(255,255,255,0.7);
  line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -1px;
}

.bl-hero-title em {
  font-weight: 700;
  font-style: italic;
  color: #e63946;
}

.bl-hero-sub {
  font-family: var(--font-secondary);
  font-size: 1.05rem;
  color: rgba(255, 255, 255, .55);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}

/* Animated line beneath hero */
.bl-hero-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
  animation: bl-lineGlow 4s ease-in-out infinite;
}

@keyframes bl-lineGlow {
  0%, 100% { opacity: .3; }
  50%      { opacity: .8; }
}

/* ---------- Blog Section ---------- */
.bl-section {
  padding: 80px 24px 100px;
  background: var(--bg-primary);
}

.bl-container {
  max-width: 1200px;
  margin: 0 auto;
}

.bl-section-header {
  text-align: center;
  margin-bottom: 56px;
}

.bl-section-label {
  font-family: var(--font-secondary);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent-red);
  margin-bottom: 12px;
}

.bl-section-title {
  font-family: var(--font-primary);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: #fff;
  letter-spacing: -.5px;
}

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

/* Blog Card */
.bl-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .06);
  transition: transform .4s cubic-bezier(.22, 1, .36, 1),
              box-shadow .4s ease,
              border-color .4s ease;
  position: relative;
}

.bl-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, rgba(230, 57, 70, .3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
  z-index: 1;
}

.bl-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(230, 57, 70, .1),
              0 8px 24px rgba(0, 0, 0, .4);
  border-color: rgba(230, 57, 70, .15);
}

.bl-card:hover::before {
  opacity: 1;
}

/* Card Thumbnail */
.bl-card-thumb {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.bl-card-thumb-bg {
  width: 100%;
  height: 100%;
  transition: transform .6s cubic-bezier(.22, 1, .36, 1);
}

.bl-card:hover .bl-card-thumb-bg {
  transform: scale(1.08);
}

/* Category-specific gradient thumbnails */
.bl-thumb-dm  { background: linear-gradient(135deg, #1a1a2e 0%, #e63946 50%, #0a0a0a 100%); }
.bl-thumb-bs  { background: linear-gradient(135deg, #0a0a0a 0%, #c0392b 40%, #2c0b0e 100%); }
.bl-thumb-wd  { background: linear-gradient(135deg, #161616 0%, #e63946 60%, #1a0a0c 100%); }
.bl-thumb-sw  { background: linear-gradient(135deg, #0d0d0d 0%, #ff6b6b 45%, #1a1a1a 100%); }
.bl-thumb-crm { background: linear-gradient(135deg, #1c0a0d 0%, #e63946 55%, #0a0a0a 100%); }
.bl-thumb-tt  { background: linear-gradient(135deg, #0a0a14 0%, #b71c1c 50%, #1a0a0e 100%); }

/* Overlay icon on thumbnail */
.bl-card-thumb-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  opacity: .15;
  transition: opacity .4s ease, transform .4s ease;
}

.bl-card:hover .bl-card-thumb-icon {
  opacity: .3;
  transform: scale(1.1);
}

/* Category Tag */
.bl-card-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 5px 14px;
  border-radius: 50px;
  font-family: var(--font-secondary);
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  backdrop-filter: blur(10px);
  background: rgba(10, 10, 10, .65);
  z-index: 2;
}

/* Category-specific border colors */
.bl-tag-dm  { color: #e63946; border: 1px solid rgba(230, 57, 70, .5); }
.bl-tag-bs  { color: #ff8a65; border: 1px solid rgba(255, 138, 101, .5); }
.bl-tag-wd  { color: #64b5f6; border: 1px solid rgba(100, 181, 246, .5); }
.bl-tag-sw  { color: #81c784; border: 1px solid rgba(129, 199, 132, .5); }
.bl-tag-crm { color: #ce93d8; border: 1px solid rgba(206, 147, 216, .5); }
.bl-tag-tt  { color: #ffd54f; border: 1px solid rgba(255, 213, 79, .5); }

/* Card Body */
.bl-card-body {
  padding: 24px;
}

.bl-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  font-family: var(--font-secondary);
  font-size: .76rem;
  color: rgba(255, 255, 255, .35);
}

.bl-card-meta svg {
  width: 13px;
  height: 13px;
  opacity: .5;
  vertical-align: -2px;
  margin-right: 4px;
}

.bl-card-title {
  font-family: var(--font-primary);
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 10px;
  transition: color .3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bl-card:hover .bl-card-title {
  color: var(--accent-red);
}

.bl-card-excerpt {
  font-family: var(--font-secondary);
  font-size: .88rem;
  color: rgba(255, 255, 255, .45);
  line-height: 1.65;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Footer */
.bl-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.bl-card-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bl-card-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-red), #ff6b6b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-primary);
  font-size: .65rem;
  font-weight: 700;
  color: #fff;
}

.bl-card-author-name {
  font-family: var(--font-secondary);
  font-size: .78rem;
  color: rgba(255, 255, 255, .5);
}

.bl-card-read {
  font-family: var(--font-secondary);
  font-size: .74rem;
  color: rgba(255, 255, 255, .3);
  display: flex;
  align-items: center;
  gap: 5px;
}

.bl-card-read svg {
  width: 14px;
  height: 14px;
  opacity: .45;
}

/* Read More Arrow */
.bl-card-arrow {
  position: absolute;
  bottom: 60px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(230, 57, 70, .1);
  border: 1px solid rgba(230, 57, 70, .2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateX(-10px);
  transition: all .4s cubic-bezier(.22, 1, .36, 1);
}

.bl-card-arrow svg {
  width: 16px;
  height: 16px;
  color: var(--accent-red);
}

.bl-card:hover .bl-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- Newsletter Section ---------- */
.bl-newsletter {
  padding: 80px 24px;
  background: var(--bg-primary);
}

.bl-newsletter-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  padding: 56px 48px;
  border-radius: 24px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, .06);
  position: relative;
  overflow: hidden;
}

.bl-newsletter-inner::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(230, 57, 70, .25), transparent 50%, rgba(230, 57, 70, .15));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Decorative orb inside newsletter */
.bl-newsletter-orb {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 57, 70, .12), transparent 70%);
  top: -60px;
  right: -40px;
  filter: blur(60px);
  pointer-events: none;
}

.bl-newsletter-icon {
  font-size: 2.4rem;
  margin-bottom: 20px;
  display: inline-block;
  animation: bl-bounce 2.5s ease-in-out infinite;
}

@keyframes bl-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.bl-newsletter-title {
  font-family: var(--font-primary);
  font-size: 1.6rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}

.bl-newsletter-sub {
  font-family: var(--font-secondary);
  font-size: .92rem;
  color: rgba(255, 255, 255, .45);
  margin-bottom: 32px;
  line-height: 1.6;
}

.bl-newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
  position: relative;
}

.bl-newsletter-input {
  flex: 1;
  padding: 14px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .04);
  color: #fff;
  font-family: var(--font-secondary);
  font-size: .9rem;
  outline: none;
  transition: border-color .3s ease, box-shadow .3s ease;
}

.bl-newsletter-input::placeholder {
  color: rgba(255, 255, 255, .3);
}

.bl-newsletter-input:focus {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, .12);
}

.bl-newsletter-btn {
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-red), #c0392b);
  color: #fff;
  font-family: var(--font-primary);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .3s ease, box-shadow .3s ease;
  white-space: nowrap;
}

.bl-newsletter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(230, 57, 70, .3);
}

/* ---------- Footer ---------- */
.bl-footer {
  padding: 40px 24px;
  background: var(--bg-primary);
  border-top: 1px solid rgba(255, 255, 255, .06);
  text-align: center;
}

.bl-footer-logo {
  font-family: var(--font-primary);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  transition: opacity .3s ease;
}

.bl-footer-logo:hover { opacity: .8; }

.bl-footer-logo em {
  font-style: normal;
  color: var(--accent-red);
}

.bl-footer-copy {
  font-family: var(--font-secondary);
  font-size: .78rem;
  color: rgba(255, 255, 255, .3);
}

/* ---------- Scroll Reveal ---------- */
.bl-reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .7s cubic-bezier(.22, 1, .36, 1),
              transform .7s cubic-bezier(.22, 1, .36, 1);
}

.bl-reveal.bl-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for cards */
.bl-card:nth-child(1) { transition-delay: .05s; }
.bl-card:nth-child(2) { transition-delay: .12s; }
.bl-card:nth-child(3) { transition-delay: .19s; }
.bl-card:nth-child(4) { transition-delay: .26s; }
.bl-card:nth-child(5) { transition-delay: .33s; }
.bl-card:nth-child(6) { transition-delay: .4s;  }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .bl-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 680px) {
  .bl-hero { min-height: 44vh; padding: 100px 20px 60px; }
  .bl-grid  { grid-template-columns: 1fr; gap: 20px; }
  .bl-newsletter-form { flex-direction: column; }
  .bl-newsletter-btn  { width: 100%; }
  .bl-newsletter-inner { padding: 40px 24px; }
  .bl-card-thumb { height: 170px; }
}

@media (max-width: 480px) {
  .bl-hero-title { font-size: 2rem; }
  .bl-section { padding: 60px 16px 80px; }
}
