/* =========================================
SECTION: BLOG DETAILS PAGE STYLES
DESCRIPTION: Individual blog article rendering, dynamic sidebar, sharing, and related rows
========================================= */

:root {
  --primary: #0091ff;
  --primary-light: rgba(0, 145, 255, 0.08);
  --secondary: #ff006e;
  --secondary-light: rgba(255, 0, 110, 0.08);
  --text-dark: #1a1a1a;
  --text-light: #64748b;
  --bg-light: #f8fafc;
  --border: #e2e8f0;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 16px -4px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 24px -6px rgba(0, 0, 0, 0.1);
  --white: #ffffff;
}

/* -------------------------------------------------- */
/* 1. BREADCRUMBS                                     */
/* -------------------------------------------------- */
.blog-breadcrumb-wrapper {
  padding: 0.85rem 0;
  margin-top: 1rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  row-gap: 0.5rem;
  list-style: none;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--text-light);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

.breadcrumbs a {
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.2s;
  font-weight: 500;
}

.breadcrumbs a:hover {
  opacity: 0.75;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.4rem;
  color: var(--text-light);
  opacity: 0.6;
}

.breadcrumbs li.active {
  color: var(--text-dark);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

/* -------------------------------------------------- */
/* 2. HERO / HEADER SECTION                           */
/* -------------------------------------------------- */
.blog-hero-section {
  max-width: 1400px;
  margin: 1rem auto 0;
}

.blog-header-wrapper {
  margin-bottom: 1.5rem;
}

.blog-meta-top {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.blog-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-category-badge svg,
.blog-category-badge i svg {
  width: 14px;
  height: 14px;
}

.blog-date-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.meta-divider {
  width: 4px;
  height: 4px;
  background: var(--text-light);
  border-radius: 50%;
  opacity: 0.5;
}

.blog-main-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.25;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.blog-intro-excerpt {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.6;
  font-weight: 400;
  border-left: 3px solid var(--secondary);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.blog-featured-image-wrapper {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 2.5rem;
  aspect-ratio: 21 / 9;
  height: auto;
  min-height: 320px;
  position: relative;
}

.blog-featured-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* -------------------------------------------------- */
/* 3. LAYOUT CONTAINER                                */
/* -------------------------------------------------- */
.blog-layout-wrapper {
  max-width: 1400px;
  margin: 0 auto 4rem;
}

/* -------------------------------------------------- */
/* 4. LEFT COLUMN - ARTICLE CONTENT                   */
/* -------------------------------------------------- */
.blog-content-article {
  background: var(--white);
}

.blog-content-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155; /* Slate-700 for maximum readability */
  margin-bottom: 3rem;
  font-family: "Inter", -apple-system, sans-serif;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.blog-content-body p {
  margin-bottom: 1.5rem;
}

.blog-content-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 2.25rem 0 1rem;
  letter-spacing: -0.3px;
  line-height: 1.3;
  display: block;
  position: relative;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.blog-content-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 1.75rem 0 0.8rem;
  line-height: 1.3;
}

.blog-content-body blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, rgba(0, 145, 255, 0.03) 0%, rgba(255, 0, 110, 0.03) 100%);
  border-left: 4px solid var(--primary);
  border-radius: 0 12px 12px 0;
  position: relative;
}

.blog-content-body blockquote p {
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.blog-content-body blockquote cite {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 600;
  font-style: normal;
  display: block;
}

.blog-content-body blockquote::before {
  content: "“";
  position: absolute;
  top: -10px;
  left: 10px;
  font-size: 4rem;
  color: var(--primary);
  opacity: 0.15;
  font-family: serif;
}

.blog-content-body ul, .blog-content-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.blog-content-body li {
  margin-bottom: 0.6rem;
}

.blog-content-body li strong {
  color: var(--text-dark);
}

.blog-content-body img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}

/* Share Buttons Area */
.blog-share-wrapper {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.blog-tags-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.blog-tag-item {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  background: var(--bg-light);
  color: var(--text-light);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.blog-tag-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.share-buttons-wrapper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.share-buttons-wrapper span {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
}

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.share-btn svg,
.share-btn i svg {
  width: 15px;
  height: 15px;
}

.share-btn:hover {
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.share-btn.facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
}

.share-btn.twitter:hover {
  background: #000000;
  border-color: #000000;
}

.share-btn.linkedin:hover {
  background: #0a66c2;
  border-color: #0a66c2;
}

.share-btn.copylink:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.share-btn .tooltip-text {
  visibility: hidden;
  width: 100px;
  background-color: var(--text-dark);
  color: var(--white);
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  z-index: 10;
  bottom: 125%;
  left: 50%;
  margin-left: -50px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.72rem;
  font-weight: 600;
}

.share-btn:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Previous / Next Article Navigation */
.article-nav-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.nav-article-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav-article-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.nav-article-card.prev-card {
  align-items: flex-start;
  text-align: left;
}

.nav-article-card.next-card {
  align-items: flex-end;
  text-align: right;
}

.nav-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-label svg,
.nav-label i svg {
  width: 12px;
  height: 12px;
}

.nav-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.35;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Related Blogs Row */
.related-blogs-section {
  border-top: 1px solid var(--border);
  padding-top: 3rem;
}

.related-section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  letter-spacing: -0.3px;
}

.related-blogs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.related-blog-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
}

.related-blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 145, 255, 0.2);
}

.related-card-img {
  height: 160px;
  overflow: hidden;
}

.related-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-card-content {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.related-card-meta {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.related-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.35;
  margin: 0;
}

/* -------------------------------------------------- */
/* 5. RIGHT COLUMN - STICKY SIDEBAR                   */
/* -------------------------------------------------- */
.blog-sidebar-column {
  position: relative;
}

.sticky-sidebar-wrapper {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  z-index: 10;
  transition: transform 0.1s linear;
}

.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.widget-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

/* Recent Posts Widget */
.widget-recent-posts {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.recent-post-item {
  display: flex;
  gap: 0.75rem;
  text-decoration: none;
  align-items: center;
}

.recent-post-thumb {
  width: 55px;
  height: 55px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.recent-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-post-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.recent-post-info h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  margin: 0 0 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-post-info span {
  font-size: 0.72rem;
  color: var(--text-light);
  font-weight: 500;
}

.recent-post-item:hover h4 {
  color: var(--primary);
}

/* Categories Widget */
.widget-categories-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.widget-categories-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 600;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}

.widget-categories-list li a:hover {
  color: var(--primary);
}

.category-count {
  padding: 0.15rem 0.5rem;
  border-radius: 50px;
  background: var(--bg-light);
  color: var(--text-light);
  font-size: 0.7rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.widget-categories-list li a:hover .category-count {
  background: var(--primary-light);
  color: var(--primary);
}

/* CTA Workspace Enquiry Card */
.sidebar-cta-card {
  background: linear-gradient(135deg, #0091ff 0%, #0052cc 100%);
  color: var(--white);
  border: none;
  border-radius: 16px;
  padding: 1.5rem 1.6rem;
  position: relative;
  overflow: hidden;
}

.sidebar-cta-card::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

.sidebar-cta-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.sidebar-cta-card p {
  font-size: 0.8rem;
  opacity: 0.9;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.sidebar-cta-card .phone-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--white);
  text-decoration: none;
  margin-bottom: 1.25rem;
}

.sidebar-cta-card .phone-link svg,
.sidebar-cta-card .phone-link i svg {
  width: 14px;
  height: 14px;
}

.sidebar-cta-card .btn-sidebar-cta {
  width: 100%;
  padding: 0.75rem;
  background: var(--white);
  color: var(--primary);
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sidebar-cta-card .btn-sidebar-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Recommended Listing Card (Direct from database integration) */
.sidebar-office-card {
  padding: 0;
  overflow: hidden;
}

.reco-card-tag {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.3rem 0.7rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  z-index: 2;
  letter-spacing: 0.3px;
}

.reco-card-image {
  height: 140px;
  position: relative;
  overflow: hidden;
}

.reco-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.sidebar-office-card:hover .reco-card-image img {
  transform: scale(1.05);
}

.reco-card-body {
  padding: 1.1rem 1.25rem;
}

.reco-card-body .reco-category {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 0.25rem;
}

.reco-card-body h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 0.25rem;
  line-height: 1.3;
}

.reco-card-body p {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.reco-card-body p svg,
.reco-card-body p i svg {
  width: 12px;
  height: 12px;
}

.reco-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.reco-price-row .reco-price {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-dark);
}

.reco-price-row .reco-details-btn {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.reco-price-row .reco-details-btn svg,
.reco-price-row .reco-details-btn i svg {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}

.reco-price-row .reco-details-btn:hover svg {
  transform: translateX(2px);
}

/* -------------------------------------------------- */
/* 6. ERROR / FALLBACK STATE                          */
/* -------------------------------------------------- */
.blog-error-wrapper {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
}

.error-content i,
.error-content svg {
  font-size: 3rem;
  color: var(--secondary);
  margin-bottom: 1.25rem;
  width: 50px;
  height: 50px;
}

.error-content h2 {
  font-size: 1.65rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.error-content p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* -------------------------------------------------- */
/* 7. RESPONSIVENESS AND COLLAPSIBILITY               */
/* -------------------------------------------------- */
@media (max-width: 1200px) {
  .blog-main-title {
    font-size: 2rem;
  }
}

@media (max-width: 1024px) {
  .sticky-sidebar-wrapper {
    position: relative;
    top: 0;
    margin-top: 2rem;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .blog-breadcrumb-wrapper {
    padding: 0.6rem 0;
  }

  .blog-hero-section {
    margin-top: 0.2rem;
  }

  .blog-layout-wrapper {
    margin-bottom: 2.5rem;
  }

  .blog-main-title {
    font-size: 1.6rem;
  }

  .blog-featured-image-wrapper {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 180px;
    margin-bottom: 1.5rem;
  }

  .blog-intro-excerpt {
    font-size: 0.95rem;
  }

  .blog-content-body {
    font-size: 0.95rem;
    margin-bottom: 2rem;
  }

  .blog-content-body h2 {
    font-size: 1.25rem;
    margin: 1.75rem 0 0.75rem;
  }

  .blog-content-body blockquote {
    padding: 1.1rem 1.4rem;
    margin: 1.5rem 0;
  }

  .blog-content-body blockquote p {
    font-size: 1rem;
  }

  .article-nav-wrapper {
    grid-template-columns: 1fr;
    gap: 0.9rem;
    margin-bottom: 2.5rem;
  }

  .nav-title {
    white-space: normal;
  }

  .related-blogs-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .blog-share-wrapper {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 0;
    margin-bottom: 2rem;
  }
}

@media (max-width: 576px) {
  .breadcrumbs li.active {
    white-space: normal;
    max-width: 100%;
    overflow: visible;
  }
}
