/* ===================================================
   GLASS CARDS – Dark Glassmorphism Design System
   FinXsystems Insights / Blog Page
   =================================================== */

/* ===== INSIGHTS SECTION ===== */
.insights-section {
  position: relative;
  padding: 100px 0;
  background: radial-gradient(circle at top, #343a40, #2a2a2a);
  overflow: hidden;
}

/* Ambient glow spots */
.insights-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background:
    radial-gradient(ellipse 600px 400px at 20% 30%, rgba(90,90,90,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 80% 70%, rgba(100,100,100,0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* Subtle animated grid */
.insights-section::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

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

/* ===== INTRO ===== */
.blog-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}
.blog-intro h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  margin-bottom: 16px;
  color: #fff;
}
.blog-intro p {
  color: rgba(255,255,255,0.55);
  font-size: 1.1rem;
  line-height: 1.7;
}

/* ===== FILTER TABS ===== */
.blog-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.blog-filter-btn {
  padding: 10px 24px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  backdrop-filter: blur(6px);
}
.blog-filter-btn:hover {
  border-color: rgba(255,255,255,0.3);
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.blog-filter-btn.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 0 20px rgba(255,255,255,0.05);
}
.blog-filter-btn:active {
  transform: scale(0.95);
}

/* ===== BENTO GRID LAYOUT ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 24px;
  will-change: transform;
}

/* Bento card sizes */
.cards-grid > .glass-card { height: auto; }
.cards-grid > .bento-wide   { grid-column: span 2; }
.cards-grid > .bento-tall   { grid-row: span 2; }
.cards-grid > .bento-large  { grid-column: span 2; grid-row: span 2; }

/* Stack card content for tall cards */
.bento-tall .blog-card-img  { height: 55%; }
.bento-tall .blog-card-body { flex: 1; }

/* Wide cards go horizontal */
.bento-wide {
  flex-direction: row !important;
}
.bento-wide .blog-card-img {
  width: 45%;
  height: auto;
  min-height: 100%;
}
.bento-wide .blog-card-body {
  width: 55%;
  padding: 20px 24px;
}

/* ===== GLASSMORPHISM CARD ===== */
.glass-card {
  position: relative;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.5s ease,
    box-shadow 0.5s ease,
    opacity 0.6s ease;
  opacity: 0;
  transform: translateY(50px);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  will-change: transform;
}

/* ===== SCROLL REVEAL ===== */
.glass-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== HOVER PREMIUM EFFECT ===== */
.glass-card:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: 0 30px 80px rgba(255, 255, 255, 0.06);
}

/* ===== GLOW BORDER EFFECT ===== */
.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(120deg, rgba(255,255,255,0.2), transparent, rgba(255,255,255,0.1));
  -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 0.4s ease;
  pointer-events: none;
  z-index: 5;
}

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

/* ===== FEATURED CARD ===== */
.featured-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  margin-bottom: 60px;
  flex-direction: row;
}
.featured-card .blog-featured-img {
  min-height: 360px;
  position: relative;
  overflow: hidden;
  background: #1a1a1a;
}
.featured-card .blog-featured-img img {
  width: 100%; height: 100%; object-fit: cover;
  position: absolute; top: 0; left: 0;
  transition: transform 0.7s cubic-bezier(.25,.46,.45,.94), filter 0.5s;
  filter: brightness(0.85) saturate(0.9);
}
.featured-card:hover .blog-featured-img img {
  transform: scale(1.08);
  filter: brightness(1) saturate(1);
}
.featured-card .blog-featured-img::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(13,13,13,0.5), transparent);
  z-index: 1;
  pointer-events: none;
}
.blog-featured-badge {
  position: absolute;
  top: 24px; left: 24px; z-index: 3;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  color: #fff;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid rgba(255,255,255,0.15);
}
.blog-featured-content {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.blog-featured-content .blog-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}
.blog-featured-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.3;
}
.blog-featured-content > p {
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  margin-bottom: 24px;
}

/* ===== CARD INTERNALS ===== */
.blog-card-img {
  height: 220px;
  position: relative;
  overflow: hidden;
  background: #1a1a1a;
}
.blog-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s cubic-bezier(.25,.46,.45,.94), filter 0.5s;
  filter: brightness(0.8) saturate(0.85);
}
.glass-card:hover .blog-card-img img {
  transform: scale(1.12);
  filter: brightness(1) saturate(1.05);
}
.blog-card-img::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(13,13,13,0.7), transparent);
  z-index: 1;
  pointer-events: none;
}
.blog-card-category {
  position: absolute;
  top: 16px; left: 16px; z-index: 4;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  color: #fff;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid rgba(255,255,255,0.12);
}
.blog-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}
.blog-card-body .blog-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.blog-meta span {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}
.blog-card-body h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.4;
}
.blog-card-body p {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

/* ===== READ MORE LINK ===== */
.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: gap 0.3s, color 0.3s;
}
.blog-read-more:hover {
  gap: 14px;
  color: #fff;
}
/* Stretch link over entire card so full card is clickable */
.blog-read-more::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 10;
}
.blog-card-body .blog-read-more {
  font-size: 0.85rem;
  margin-top: auto;
}

/* ===== NEWSLETTER CTA ===== */
.blog-newsletter {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(135deg, #2a2a2a, #1e1e1e);
  color: #fff;
  position: relative;
}
.blog-newsletter::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 200px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}
.blog-newsletter h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  margin-bottom: 12px;
}
.blog-newsletter p {
  opacity: 0.5;
  margin-bottom: 32px;
  font-size: 1rem;
}
.blog-newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}
.blog-newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50px;
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s;
  backdrop-filter: blur(6px);
}
.blog-newsletter-form input::placeholder {
  color: rgba(255,255,255,0.35);
}
.blog-newsletter-form input:focus {
  border-color: rgba(255,255,255,0.3);
}
.blog-newsletter-form button {
  padding: 14px 32px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  backdrop-filter: blur(6px);
}
.blog-newsletter-form button:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.3);
  box-shadow: 0 0 30px rgba(255,255,255,0.05);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }
  .cards-grid > .bento-wide { grid-column: span 2; }
  .cards-grid > .bento-large { grid-column: span 2; grid-row: span 2; }
}

@media (max-width: 640px) {
  .cards-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .cards-grid > .bento-wide,
  .cards-grid > .bento-tall,
  .cards-grid > .bento-large {
    grid-column: span 1;
    grid-row: span 1;
  }
  .bento-wide { flex-direction: column !important; }
  .bento-wide .blog-card-img { width: 100%; height: 200px; min-height: auto; }
  .bento-wide .blog-card-body { width: 100%; }
  .bento-tall .blog-card-img { height: 220px; }
  .featured-card {
    grid-template-columns: 1fr;
  }
  .blog-intro h2 {
    font-size: 2rem;
  }
  .blog-newsletter-form {
    flex-direction: column;
  }
}
