/* ========== BLOG PAGE STYLES - PREMIUM REFINEMENT ========== */

:root {
  --primary: #f59e0b;
  --primary-dark: #d97706;
  --secondary: #0f172a;
  --accent: #3b82f6;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== GLOBAL FIXES ===== */
body {
  padding-top: 80px;
  background-color: var(--bg-light);
  color: var(--text-main);
  font-family: 'Montserrat', sans-serif;
  margin: 0;
}

/* ===== BLOG HERO SECTION ===== */
.blog-page-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: clamp(3rem, 8vw, 6rem) 1.5rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.blog-page-header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.05) 0%, transparent 70%);
  z-index: 1;
}

.blog-header-container {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.blog-header-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(245, 158, 11, 0.1);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.5rem 1.5rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(245, 158, 11, 0.2);
  letter-spacing: 2px;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.blog-page-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--white);
  margin-bottom: 1.2rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1px;
}

.blog-header-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255, 255, 255, 0.7);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== BLOG CONTAINER & GRID ===== */
.blog-container {
  max-width: 1240px;
  margin: -4rem auto 4rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 10;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

/* Featured Card (Pillar Article) */
.blog-card.featured {
  grid-column: 1 / -1;
  background: var(--white);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  display: block; /* Ensure it behaves well */
}

.blog-card.featured .blog-card-badge {
  background: var(--primary);
  color: var(--secondary);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.4rem 1.2rem;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

.blog-card.featured h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 1.5rem;
  line-height: 1.2;
  font-weight: 800;
}

.blog-card.featured h2 a {
  color: var(--secondary);
  text-decoration: none;
  transition: var(--transition);
}

.blog-card.featured h2 a:hover {
  color: var(--primary);
}

.blog-card.featured .blog-card-excerpt {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
  max-width: 800px;
}

.blog-card.featured .blog-card-meta {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.blog-card.featured .blog-card-meta i {
  color: var(--primary);
  margin-right: 0.5rem;
}

.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--secondary);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.1rem;
  transition: var(--transition);
}

.blog-card-link i {
  transition: transform 0.3s;
}

.blog-card-link:hover {
  color: var(--primary);
}

.blog-card-link:hover i {
  transform: translateX(5px);
}

/* Regular Blog Card */
.blog-card:not(.featured) {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card:not(.featured):hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.blog-card-image {
  height: 240px;
  position: relative;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.1);
}

.blog-card-content {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-category {
  display: inline-block;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.blog-card h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  line-height: 1.4;
  font-weight: 700;
}

.blog-card h2 a {
  color: var(--secondary);
  text-decoration: none;
  transition: var(--transition);
}

.blog-card h2 a:hover {
  color: var(--primary);
}

.blog-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.read-more {
  color: var(--secondary);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  transition: var(--transition);
}

.read-more i {
  font-size: 0.8rem;
  transition: transform 0.3s;
}

.read-more:hover {
  color: var(--primary);
}

.read-more:hover i {
  transform: translateX(4px);
}

/* ===== CONSULTATION BANNER ===== */
.blog-consult-banner {
  background: linear-gradient(135deg, var(--secondary) 0%, #1e293b 100%);
  border-radius: 32px;
  padding: 4rem 2rem;
  margin-top: 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.consult-banner-content {
  position: relative;
  z-index: 2;
}

.consult-banner-content h2 {
  color: var(--white);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
  font-weight: 800;
}

.consult-banner-content p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.consult-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: var(--primary);
  color: var(--secondary);
  font-size: 1.1rem;
  font-weight: 800;
  padding: 1.2rem 3rem;
  border-radius: 100px;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
}

.consult-banner-btn:hover {
  transform: translateY(-5px);
  background: var(--white);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* ===== BOTTOM CTA ===== */
.blog-cta {
  text-align: center;
  margin-top: 4rem;
  padding: 2.5rem;
  background: rgba(245, 158, 11, 0.05);
  border-radius: 24px;
  border: 1px dashed rgba(245, 158, 11, 0.3);
}

/* ===== FOOTER REFINEMENT ===== */
footer {
  background: var(--secondary);
  color: rgba(255, 255, 255, 0.6);
  padding: 5rem 1.5rem 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.footer-content h3 {
  color: var(--white);
  margin-bottom: 1.5rem;
}

.footer-content a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.footer-bottom {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

/* ===== NAVBAR FIX ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 1000;
  background: var(--white);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 1.5rem;
}

/* =========================================================
   GLOBAL OVERFLOW & WRAP FIX FOR MOBILE (ADDED VIA SCRIPT)
   ========================================================= */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    position: relative;
  }
  
  /* Fix breadcrumb & meta overflowing */
  .blog-page .hero-breadcrumb,
  .blog-page .hero-meta {
    flex-wrap: wrap !important;
    justify-content: center !important;
  }
  
  /* Prevent long text/URLs from breaking layout */
  article, .article-content, p, h1, h2, h3, h4, h5, h6, a {
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
  }
  
  /* Ensure images never exceed container width */
  article img, article figure, .article-image img, .case-image img {
    max-width: 100% !important;
    height: auto !important;
  }
}
.footer-content h3 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.footer-content p, .footer-bottom p, .footer-small {
  font-weight: 400;
}

.footer-content a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 400;
}


