/*-----------------------------------*\
  #BLOG SYSTEM STYLES - PSYCHOTHERAPY NOW
\*-----------------------------------*/

:root {
  --blog-primary: hsl(186, 100%, 19%);
  --blog-primary-light: hsl(186, 72%, 24%);
  --blog-accent: hsl(182, 100%, 35%);
  --blog-accent-soft: hsla(182, 100%, 35%, 0.1);
  --blog-text-dark: hsl(222, 44%, 12%);
  --blog-text-muted: hsl(236, 14%, 42%);
  --blog-bg-light: hsl(187, 25%, 97%);
  --blog-card-bg: hsl(0, 0%, 100%);
  --blog-border: hsl(200, 20%, 90%);
  --blog-border-hover: hsl(182, 60%, 75%);
  --blog-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --blog-shadow-md: 0 10px 30px rgba(10, 45, 55, 0.08);
  --blog-shadow-lg: 0 20px 40px rgba(10, 45, 55, 0.12);
  --blog-radius: 12px;
}

/* Base tweaks for blog pages */
.blog-page, .blog-post-page {
  background-color: #fafbfc;
  color: var(--blog-text-dark);
  font-family: var(--ff-rubik);
}

/* =========================================
   HEADER STYLES (MATCHING SITE PAGES)
   ========================================= */
.blog-post-page .header {
  background-color: white !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
  position: fixed !important;
}

@media (min-width: 1200px) {
  .blog-post-page .header .navbar-list .navbar-link {
    color: var(--rich-black-fogra-29) !important;
  }
}

.blog-post-page main {
  margin-top: 100px;
}




/* --- HERO SECTION --- */
.blog-hero {
  background: linear-gradient(135deg, hsl(186, 100%, 15%) 0%, hsl(186, 70%, 22%) 60%, hsl(182, 80%, 26%) 100%);
  color: #ffffff;
  padding: 140px 0 60px;
  position: relative;
  overflow: hidden;
}

.blog-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
                    radial-gradient(circle at 10% 80%, rgba(22, 160, 133, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.blog-hero-content {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.blog-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 16px;
  backdrop-filter: blur(4px);
}

.blog-hero-title {
  font-family: var(--ff-oswald);
  font-size: clamp(2.4rem, 4vw + 1rem, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  text-transform: uppercase;
  color: #ffffff;
}

.blog-hero-desc {
  font-size: clamp(1.05rem, 1.2vw + 0.2rem, 1.25rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
  max-width: 700px;
  margin: 0 auto;
  font-weight: 400;
}

/* --- FILTER & SEARCH TOOLBAR --- */
.blog-controls-section {
  padding: 40px 0 20px;
  background-color: transparent;
}

.blog-controls-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.blog-search-bar {
  position: relative;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

.blog-search-bar input {
  width: 100%;
  padding: 16px 50px 16px 52px;
  background: #ffffff;
  border: 1.5px solid var(--blog-border);
  border-radius: 50px;
  font-size: 1.12rem;
  font-family: var(--ff-rubik);
  color: var(--blog-text-dark);
  box-shadow: var(--blog-shadow-sm);
  transition: all 0.3s ease;
  outline: none;
}

.blog-search-bar input:focus {
  border-color: var(--blog-accent);
  box-shadow: 0 0 0 4px var(--blog-accent-soft), var(--blog-shadow-md);
}

.blog-search-bar .search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.35rem;
  color: var(--blog-text-muted);
  pointer-events: none;
}

.blog-search-bar .clear-search-btn {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--blog-text-muted);
  cursor: pointer;
  display: none;
  padding: 4px;
  border-radius: 50%;
  transition: color 0.2s;
}

.blog-search-bar .clear-search-btn:hover {
  color: var(--blog-text-dark);
}

/* Category Filter Tabs */
.blog-categories-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.category-tab-btn {
  background: #ffffff;
  border: 1.5px solid var(--blog-border);
  color: var(--blog-text-muted);
  padding: 11px 22px;
  border-radius: 50px;
  font-size: 1.05rem;
  font-family: var(--ff-rubik);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--blog-shadow-sm);
}

.category-tab-btn .cat-count {
  font-size: 0.82rem;
  padding: 2px 8px;
  background: #edf2f7;
  color: var(--blog-text-muted);
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.25s ease;
}

.category-tab-btn:hover {
  border-color: var(--blog-accent);
  color: var(--blog-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.category-tab-btn.active {
  background: var(--blog-primary);
  border-color: var(--blog-primary);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(10, 50, 60, 0.25);
  transform: translateY(-2px);
}

.category-tab-btn.active .cat-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* --- BLOG GRID --- */
.blog-grid-section {
  padding: 30px 0 90px;
}

.blog-grid-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.blog-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* Blog Card */
.article-card {
  background: var(--blog-card-bg);
  border-radius: var(--blog-radius);
  border: 1px solid var(--blog-border);
  box-shadow: var(--blog-shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--blog-shadow-md);
  border-color: var(--blog-border-hover);
}

.article-card-media {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
  background-color: #e2e8f0;
}

.article-card-media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.article-card:hover .article-card-media img {
  transform: scale(1.05);
}

.article-cat-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(10, 45, 55, 0.88);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.article-card-body {
  padding: 26px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-meta-header {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.94rem;
  color: var(--blog-text-muted);
  margin-bottom: 14px;
}

.article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-meta-item ion-icon {
  font-size: 1.05rem;
  color: var(--blog-accent);
}

.article-card-title {
  font-family: var(--ff-rubik);
  font-size: 1.38rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--blog-text-dark);
  margin-bottom: 14px;
  transition: color 0.2s ease;
}

.article-card:hover .article-card-title {
  color: var(--blog-primary);
}

.article-card-excerpt {
  font-size: 1.05rem;
  line-height: 1.68;
  color: #475569;
  margin-bottom: 22px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f0f3f6;
  padding-top: 18px;
  margin-top: auto;
}

.article-author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blog-accent-soft);
  color: var(--blog-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.92rem;
}

.author-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--blog-text-dark);
}

.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--blog-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.read-more-link ion-icon {
  font-size: 1.15rem;
  transition: transform 0.2s ease;
}

.article-card:hover .read-more-link {
  color: var(--blog-accent);
}

.article-card:hover .read-more-link ion-icon {
  transform: translateX(4px);
}

/* Empty State / Loading State */
.blog-state-wrapper {
  grid-column: 1 / -1;
  text-align: center;
  padding: 70px 20px;
  background: #ffffff;
  border-radius: var(--blog-radius);
  border: 1px solid var(--blog-border);
  box-shadow: var(--blog-shadow-sm);
}

.blog-state-wrapper ion-icon {
  font-size: 3.5rem;
  color: var(--blog-accent);
  margin-bottom: 16px;
}

.blog-state-wrapper h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--blog-text-dark);
}

.blog-state-wrapper p {
  color: var(--blog-text-muted);
  max-width: 450px;
  margin: 0 auto 20px;
  font-size: 1.05rem;
}

.reset-filter-btn {
  background: var(--blog-primary);
  color: #ffffff;
  border: none;
  padding: 12px 26px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.reset-filter-btn:hover {
  background: var(--blog-accent);
}

/* --- SINGLE ARTICLE PAGE STYLES --- */
.single-post-wrapper {
  padding: 40px 0 80px;
}

.single-post-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.post-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  color: var(--blog-text-muted);
  margin-bottom: 24px;
}

.post-breadcrumbs a {
  color: var(--blog-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.post-breadcrumbs a:hover {
  color: var(--blog-primary);
}

.post-header {
  margin-bottom: 30px;
}

.post-category-tag {
  display: inline-block;
  background: var(--blog-accent-soft);
  color: var(--blog-primary);
  font-size: 0.92rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 7px 16px;
  border-radius: 6px;
  margin-bottom: 18px;
}

.post-main-title {
  font-family: var(--ff-rubik);
  font-size: clamp(2.2rem, 3.5vw + 0.5rem, 3.15rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--blog-text-dark);
  margin-bottom: 22px;
}

.post-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--blog-border);
  border-bottom: 1px solid var(--blog-border);
  color: var(--blog-text-muted);
  font-size: 1rem;
}

.post-author-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.post-author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blog-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.15rem;
}

.post-author-details {
  display: flex;
  flex-direction: column;
}

.post-author-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blog-text-dark);
}

.post-author-role {
  font-size: 0.88rem;
  color: var(--blog-text-muted);
}

.post-meta-details {
  display: flex;
  align-items: center;
  gap: 18px;
}

.post-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.98rem;
}

.post-meta-pill ion-icon {
  color: var(--blog-accent);
  font-size: 1.1rem;
}

/* Featured Image */
.post-featured-image {
  margin: 34px 0 44px;
  border-radius: var(--blog-radius);
  overflow: hidden;
  box-shadow: var(--blog-shadow-md);
}

.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 500px;
}

/* Article Body Typography */
.post-article-content {
  font-size: 1.26rem;
  line-height: 1.9;
  color: #2d3748;
}

.post-article-content p {
  margin-bottom: 26px;
}

.post-article-content p.lead-paragraph {
  font-size: 1.36rem;
  line-height: 1.82;
  color: #1a202c;
  font-weight: 400;
  border-left: 4px solid var(--blog-accent);
  padding-left: 20px;
  margin-bottom: 32px;
}

.post-article-content h2 {
  font-family: var(--ff-rubik);
  font-size: 1.95rem;
  font-weight: 700;
  color: var(--blog-text-dark);
  margin: 48px 0 20px;
  line-height: 1.3;
}

.post-article-content h3 {
  font-family: var(--ff-rubik);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--blog-text-dark);
  margin: 36px 0 16px;
  line-height: 1.35;
}

.post-article-content ul, 
.post-article-content ol {
  margin: 22px 0 30px 26px;
}

.post-article-content li {
  list-style: disc;
  margin-bottom: 12px;
  line-height: 1.75;
  font-size: 1.22rem;
}

.post-article-content blockquote {
  margin: 38px 0;
  padding: 26px 32px;
  background: #f4fbfb;
  border-left: 4px solid var(--blog-primary);
  border-radius: 0 8px 8px 0;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--blog-primary);
  line-height: 1.65;
  font-style: italic;
}

.article-disclaimer-box {
  background: #fff8f0;
  border: 1.5px solid #fbd38d;
  border-radius: var(--blog-radius);
  padding: 26px 30px;
  margin: 48px 0 28px;
}

.article-disclaimer-box h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #c05621;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-disclaimer-box p {
  font-size: 1.08rem;
  line-height: 1.65;
  color: #744210;
  margin-bottom: 0;
}

/* Post Tags & Share Section */
.post-footer-section {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--blog-border);
}

.post-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.post-tag-item {
  background: #edf2f7;
  color: var(--blog-text-muted);
  font-size: 0.94rem;
  padding: 7px 16px;
  border-radius: 50px;
  font-weight: 500;
}

.post-share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: #ffffff;
  padding: 22px 26px;
  border-radius: var(--blog-radius);
  border: 1px solid var(--blog-border);
  box-shadow: var(--blog-shadow-sm);
}

.share-bar-title {
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--blog-text-dark);
}

.share-buttons-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f0f4f8;
  color: var(--blog-text-dark);
  font-size: 1.25rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.share-btn:hover {
  background: var(--blog-primary);
  color: #ffffff;
  transform: translateY(-2px);
}


/* Prev / Next Navigation */
.post-pagination-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}

.pagination-nav-card {
  background: #ffffff;
  border: 1px solid var(--blog-border);
  border-radius: var(--blog-radius);
  padding: 20px 24px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  box-shadow: var(--blog-shadow-sm);
}

.pagination-nav-card.next {
  text-align: right;
}

.pagination-nav-card:hover {
  border-color: var(--blog-accent);
  box-shadow: var(--blog-shadow-md);
  transform: translateY(-2px);
}

.nav-direction-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--blog-accent);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-nav-card.next .nav-direction-label {
  justify-content: flex-end;
}

.nav-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--blog-text-dark);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Related Articles Section */
.related-articles-section {
  padding: 70px 0 90px;
  background: #f8fafc;
  border-top: 1px solid var(--blog-border);
}

.related-section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px;
}

.related-section-header h2 {
  font-family: var(--ff-oswald);
  font-size: 2.2rem;
  color: var(--blog-text-dark);
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* Toast notification for copied link */
.share-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--blog-primary);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-toast.show {
  transform: translateY(0);
  opacity: 1;
}

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

@media (max-width: 768px) {
  .blog-hero {
    padding: 120px 0 50px;
  }
  .blog-cards-grid {
    grid-template-columns: 1fr;
  }
  .post-pagination-nav {
    grid-template-columns: 1fr;
  }
  .pagination-nav-card.next {
    text-align: left;
  }
  .pagination-nav-card.next .nav-direction-label {
    justify-content: flex-start;
  }
  .post-meta-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}
