/* Blog Styles - Professional center-aligned responsive design */

/* Section Title Styling - matching careers, about, and training pages */
.section-title {
  color: var(--primary, #0A84C7);
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
  text-transform: uppercase;
}

/* White text for titles on blue backgrounds */
.blog-hero .section-title {
  color: white;
  text-transform: uppercase;
}

/* Utility */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Hero */
.blog-hero {
  padding: 4rem 0 2.25rem;
  background: linear-gradient(135deg, var(--primary, #171582) 0%, #0f123f 100%);
  color: #fff;
}

.blog-page-title {
  font-weight: 700;
  font-size: 2.4rem;
  margin: 0 0 .6rem;
  line-height: 1.1;
}

.blog-hero .lead {
  margin: 0;
  font-size: 1.05rem;
  opacity: .9;
}

/* Grid for list */
.post-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(3, 1fr); /* Exactly 3 columns on desktop */
}

/* Responsive grid adjustments */
@media (max-width: 991.98px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on tablet */
    gap: 1.5rem;
  }
}

@media (max-width: 575.98px) {
  .post-grid {
    grid-template-columns: 1fr; /* 1 column on mobile */
    gap: 1rem;
  }
}

/* Card */
.post-card {
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 16px;
  display: flex;
  flex-direction: column; /* allow body to grow and footer to stick bottom */
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.04);
  transition: transform .25s ease, box-shadow .25s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,.10);
}

.post-card-image-wrap img,
.post-card-placeholder {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.post-card-placeholder {
  background: #f3f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  color: #666;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.post-card-body {
  padding: 1rem 1.1rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  flex: 1 1 auto; /* grow to fill available height */
}

.post-card-title {
  font-size: 1.05rem;
  margin: 0;
  line-height: 1.25;
  font-weight: 600;
  display: -webkit-box; /* enable line clamp */
  line-clamp: 2; /* standard property for compatibility */
  -webkit-line-clamp: 2; /* clamp to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-title a {
  color: #111;
  text-decoration: none;
}

.post-card-title a:hover {
  color: var(--primary, #171582);
}

.post-card-excerpt {
  margin: 0;
  font-size: .85rem;
  color: #555;
  line-height: 1.45;
  display: -webkit-box; /* enable line clamp */
  line-clamp: 2; /* standard property for compatibility */
  -webkit-line-clamp: 2; /* clamp to 2 lines for consistency */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  font-size: .63rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #6a6f77;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .15rem;
}

.post-card-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 600;
}

.post-card-meta .meta-item i {
  color: var(--primary, #0A84C7);
  font-size: .8rem;
}

.post-card-meta .meta-sep {
  opacity: .6;
}

/* Post Card Footer */
.post-card-footer {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e6e8ee;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Read More Button */
.post-read-more {
  color: var(--primary, #0A84C7);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-read-more::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary, #0A84C7);
  transition: width 0.3s ease;
}

.post-read-more:hover {
  color: var(--primary-dark, #1E3A5F);
  transform: translateX(3px);
  text-decoration: none;
}

.post-read-more:hover::after {
  width: calc(100% - 1.5rem);
}

.post-read-more i {
  transition: transform 0.3s ease;
  font-size: 0.75rem;
}

.post-read-more:hover i {
  transform: translateX(3px);
}

/* Pagination */
.pagination-wrap {
  margin-top: 2.2rem;
  text-align: center;
}

.pagination {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  gap: .45rem;
}

.pagination li a {
  display: inline-block;
  min-width: 38px;
  padding: .55rem .75rem;
  border: 1px solid #d9dce3;
  border-radius: 8px;
  font-size: .75rem;
  text-decoration: none;
  color: #333;
  background: #fff;
  font-weight: 600;
  line-height: 1;
}

.pagination li.active a,
.pagination li a:hover {
  background: var(--primary, #171582);
  color: #fff;
  border-color: var(--primary, #171582);
}

/* Post Hero / Detail */
.post-hero {
  background: #fff;
  padding: 2rem 0 1rem;
}

.breadcrumb-nav {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  color: #6b7180;
  margin-bottom: .6rem;
}

.breadcrumb-nav a {
  text-decoration: none;
  color: #6b7180;
  font-weight: 600;
}

.breadcrumb-nav a:hover {
  color: var(--primary, #171582);
}

/* Post Header */
.post-header {
  padding: 2rem 0;
  max-width: 800px;
  margin: 0 auto;
}

.post-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
  line-height: 1.2;
  color: #1a1a1a;
}

.post-meta {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7180;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-weight: 500;
}

/* Post Image Container */
.post-image-container {
  margin: 3rem 0;
  text-align: center;
}

.post-thumbnail {
  display: inline-block;
  margin: 0;
  max-width: 100%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-thumbnail:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.15);
}

.post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
}

.post-thumbnail figcaption {
  margin-top: .75rem;
  font-style: italic;
  font-size: .85rem;
  color: #666;
}

/* Layout for body */
.post-layout {
  display: block;
}

.post-content-section {
  padding: 4rem 0 6rem;
  background: #fff;
}

.post-body {
  padding: 0;
}

.post-content {
  line-height: 1.8;
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 3rem;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  margin: 2.5rem 0 1.5rem;
  font-weight: 600;
  color: #1a1a1a;
  scroll-margin-top: 100px;
}

.post-content h2 {
  font-size: 1.75rem;
  border-bottom: 2px solid #f0f2f5;
  padding-bottom: 0.5rem;
}

.post-content h3 {
  font-size: 1.5rem;
  color: var(--primary, #171582);
}

.post-content h4 {
  font-size: 1.25rem;
}

.post-content p {
  margin-bottom: 1.5rem;
  text-align: justify;
}

.post-content a {
  color: var(--primary, #171582);
  text-decoration: none;
}

.post-content a:hover {
  text-decoration: underline;
}

.post-content ul,
.post-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.post-content li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.post-content blockquote {
  border-left: 4px solid var(--primary, #171582);
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: #f8f9fa;
  border-radius: 8px;
  font-style: italic;
  color: #555;
}

.post-content pre,
.post-content code {
  font-family: Menlo, Consolas, monospace;
  font-size: .8rem;
  background: #1e2331;
  color: #f8f8f2;
  padding: .6rem .8rem;
  border-radius: 8px;
  display: block;
  overflow: auto;
  margin: 1.4rem 0;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2rem auto;
  display: block;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* Share Bar */
.share-bar {
  margin: 3rem 0;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 16px;
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.share-label {
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #6b7180;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 0.5rem;
}

.share-label i {
  font-size: 1rem;
  color: var(--primary, #171582);
}

.share-link,
.copy-link-btn {
  background: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  text-decoration: none;
  color: #333;
  border: 2px solid #e9ecef;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.share-link:hover,
.copy-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  border-color: var(--primary, #171582);
  color: var(--primary, #171582);
}

/* Specific social media colors on hover */
.share-link-facebook:hover {
  background: #1877f2;
  color: #fff !important;
  border-color: #1877f2;
}

.share-link-whatsapp:hover {
  background: #25d366;
  color: #fff !important;
  border-color: #25d366;
}

.share-link-linkedin:hover {
  background: #0077b5;
  color: #fff !important;
  border-color: #0077b5;
}

.share-link-twitter:hover {
  background: #1da1f2;
  color: #fff !important;
  border-color: #1da1f2;
}

.copy-link-btn:hover {
  background: var(--primary, #171582);
  color: #fff !important;
}

.share-link i {
  font-size: 0.9rem;
}

.copy-link-btn.copied {
  background: #28a745;
  color: #fff;
  border-color: #28a745;
}

/* Author Box */
.author-box {
  margin: 3rem 0;
  padding: 2.5rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 20px;
  border: 1px solid #e9ecef;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  position: relative;
  text-align: center;
}

.author-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary, #171582), #6366f1);
  border-radius: 2px;
}

.author-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.author-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary, #171582), #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  margin: 0 auto 1rem;
}

.author-details {
  text-align: center;
}

.author-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.author-role {
  font-size: 0.95rem;
  color: var(--primary, #171582);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.author-bio {
  font-size: 0.95rem;
  color: #6b7180;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* Related Posts */
.related-posts {
  margin: 3rem 0;
  padding: 2.5rem;
  background: #f8f9fa;
  border-radius: 20px;
  border: 1px solid #e9ecef;
  text-align: center;
}

/* Removed .related-title - now using unified .section-title */

.related-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: 900px;
  margin: 0 auto;
}

.related-item {
  background: #fff;
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.related-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-color: var(--primary, #171582);
}

.related-item a {
  font-size: 1rem;
  text-decoration: none;
  color: #1a1a1a;
  font-weight: 600;
  line-height: 1.4;
  display: block;
  margin-bottom: 0.75rem;
}

.related-item a:hover {
  color: var(--primary, #171582);
}

.related-meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7180;
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Comments */
.comments-section {
  margin: 3rem 0;
  padding: 2.5rem;
  background: #f8f9fa;
  border-radius: 20px;
  border: 1px solid #e9ecef;
}

/* Removed .comments-title - now using unified .section-title */

.comment-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.comment-item {
  margin: 0;
  padding: 0;
}

.comment-body {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.comment-body:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.comment-meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  gap: 0.75rem;
  color: #6b7180;
  margin: 0 0 1rem;
  flex-wrap: wrap;
  font-weight: 600;
  align-items: center;
}

.comment-author {
  color: var(--primary, #171582);
  font-weight: 700;
}

.comment-content p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333;
}

.no-comments {
  margin: 0 0 2rem;
  font-size: 1rem;
  color: #6b7180;
  text-align: center;
  padding: 2rem;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e9ecef;
}

/* Comment Form */
.comment-form-wrap {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
  max-width: 800px;
  margin: 2rem auto 0;
}

.comment-form-title {
  margin: 0 0 2rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
}

.comment-form-row {
  margin-bottom: 1.5rem;
}

.comment-form-row input,
.comment-form-row textarea {
  width: 100%;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  background: #f8f9fa;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #333;
  transition: all 0.3s ease;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}

.comment-form-row textarea {
  min-height: 160px;
}

.comment-form-row input:focus,
.comment-form-row textarea:focus {
  outline: none;
  border-color: var(--primary, #171582);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(23, 21, 130, 0.1);
}

.comment-form-row .btn {
  background: var(--primary, #171582);
  color: #fff;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(23, 21, 130, 0.2);
  display: block;
  margin: 0 auto;
}

.comment-form-row .btn:hover {
  background: #0f123f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(23, 21, 130, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .blog-hero {
    padding: 3.2rem 0 1.8rem;
  }
  
  .blog-page-title {
    font-size: 2rem;
  }
  
  .post-card-image-wrap img,
  .post-card-placeholder {
    height: 160px;
  }
  
  .post-title {
    font-size: 2rem;
  }
  
  .post-hero {
    padding: 1.6rem 0 .5rem;
  }
  
  .post-content-section {
    padding: 3rem 0 4rem;
  }
  
  .post-content {
    font-size: 1rem;
    line-height: 1.7;
  }
  
  .post-content h2 {
    font-size: 1.5rem;
  }
  
  .post-content h3 {
    font-size: 1.3rem;
  }
  
  .post-content p {
    text-align: left;
  }
  
  .post-image-container {
    margin: 2rem 0;
  }
  
  .post-thumbnail {
    max-width: 100%;
  }
  
  .share-bar {
    justify-content: flex-start;
    padding: 1.5rem;
  }
  
  .author-box {
    padding: 2rem 1.5rem;
    margin: 2rem 0;
  }
  
  .author-avatar {
    width: 80px;
    height: 80px;
    font-size: 2rem;
  }
  
  .author-name {
    font-size: 1.3rem;
  }
  
  .author-role {
    font-size: 0.85rem;
  }
  
  .author-bio {
    font-size: 0.9rem;
  }
  
  .related-posts {
    padding: 2rem 1.5rem;
    margin: 2rem 0;
  }
  
  .related-title {
    font-size: 1.5rem;
  }
  
  .related-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .related-item {
    padding: 1.25rem;
  }
  
  .comment-form-wrap {
    padding: 2rem 1.5rem;
    margin: 1.5rem auto 0;
  }
  
  .comment-form-title {
    font-size: 1.3rem;
  }
  
  .comment-form-row input,
  .comment-form-row textarea {
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .post-title {
    font-size: 1.75rem;
  }
  
  .blog-page-title {
    font-size: 1.85rem;
  }
  
  .post-card {
    border-radius: 14px;
  }
  
  .related-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (min-width: 992px) {
  .post-thumbnail {
    max-width: 600px;
  }
}
