/* blog.css - Styles for XYZBlog */

/* ===== VARIABLES ===== */
:root {
  --primary-color: #ce2128; /* Red */
  --primary-dark: #b01d23;
  --primary-light: #e74c3c;
  --secondary-color: #6cbd46; /* Green */
  --secondary-dark: #5da33a;
  --secondary-light: #85d361;
  --light: #f8f9fa;
  --dark: #343a40;
  --white: #ffffff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-heading: 'Georgia', 'Times New Roman', serif;
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s ease;
  --border-radius: 5px;
  --container-width: 1140px;
}

/* ===== BASE STYLES ===== */
.blog-header, .blog-detail {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--gray-800);
}

/* ===== BLOG HEADER ===== */
.blog-header {
  background-color: var(--gray-100);
  padding: 5rem 0 2.5rem; /* Increased padding as requested */
  margin-bottom: 2rem;
  position: relative;
}

.blog-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
}

.blog-header-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

.blog-header h1 {
  margin-bottom: 1rem;
  color: var(--gray-900);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.2;
}

.breadcrumb {
  justify-content: center;
  background: transparent;
  padding: 0;
  margin-bottom: 0;
}

.breadcrumb-item a {
  color: var(--gray-600);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb-item a:hover {
  color: var(--primary-color);
}

.breadcrumb-item.active {
  color: var(--gray-700);
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--gray-500);
}

/* ===== BLOG DETAIL SECTION ===== */
.blog-detail {
  padding: 2rem 0;
}

.blog-post-detail {
  background-color: var(--white);
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.blog-post-detail:hover {
  box-shadow: var(--shadow-hover);
}

.blog-detail-image {
  margin-bottom: 1.5rem;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.blog-detail-image img {
  transition: var(--transition);
}

.blog-detail-image:hover img {
  transform: scale(1.02);
}

.blog-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.post-meta-item {
  color: var(--gray-600);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
}

.post-meta-item i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

.blog-post-content {
  margin-bottom: 2rem;
  line-height: 1.8;
}

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

.blog-post-content h2,
.blog-post-content h3,
.blog-post-content h4 {
  font-family: var(--font-heading);
  margin: 2rem 0 1rem;
  color: var(--gray-900);
}

.blog-post-content h2 {
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gray-200);
}

.blog-post-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--gray-700);
}

.blog-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  margin: 1.5rem 0;
}

.blog-post-footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 2rem;
}

.post-tags span,
.post-share span {
  font-weight: 600;
  margin-right: 0.75rem;
  color: var(--gray-700);
}

.tag {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background-color: var(--gray-100);
  color: var(--gray-700);
  border-radius: 3px;
  margin-right: 0.5rem;
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition);
}

.tag:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

.post-share {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: var(--gray-100);
  color: var(--gray-700);
  border-radius: 50%;
  margin-left: 0.75rem;
  text-decoration: none;
  transition: var(--transition);
}

.social-icon:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
}

/* ===== AUTHOR BIO ===== */
.blog-author {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  background-color: var(--gray-100);
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
}

.author-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 1.5rem;
  flex-shrink: 0;
  border: 3px solid var(--white);
  box-shadow: var(--shadow);
}

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

.author-info h5 {
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.author-info p {
  margin-bottom: 0;
  color: var(--gray-600);
}

/* ===== RELATED POSTS ===== */
.related-posts {
  margin-top: 3rem;
}

.related-posts h3 {
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-900);
  font-family: var(--font-heading);
  position: relative;
}

.related-posts h3::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--primary-color);
}

.blog-card {
  border: none;
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.blog-image {
  position: relative;
  overflow: hidden;
}

.blog-image img {
  height: 180px;
  object-fit: cover;
  transition: var(--transition);
}

.blog-card:hover .blog-image img {
  transform: scale(1.05);
}

.card-body {
  padding: 1.25rem;
}

.blog-title {
  margin-top: 0.5rem;
  font-size: 1.1rem;
  line-height: 1.4;
}

.blog-title a {
  color: var(--gray-900);
  text-decoration: none;
  transition: var(--transition);
}

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

.blog-meta {
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--gray-600);
}

.blog-meta span {
  margin-right: 1rem;
}

.blog-meta i {
  margin-right: 0.4rem;
  color: var(--primary-color);
}

/* ===== SIDEBAR ===== */
.blog-sidebar {
  margin-bottom: 2rem;
}

.sidebar-block {
  background-color: var(--white);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.sidebar-block:hover {
  box-shadow: var(--shadow-hover);
}

.sidebar-block h4 {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-200);
  font-size: 1.25rem;
  color: var(--gray-900);
  font-family: var(--font-heading);
  position: relative;
}

.sidebar-block h4::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--secondary-color);
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--gray-200);
  transition: var(--transition);
}

.sidebar-list li:last-child {
  border-bottom: none;
}

.sidebar-list li:hover {
  padding-left: 0.5rem;
}

.sidebar-list li a {
  color: var(--gray-700);
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
}

.sidebar-list li a::before {
  content: '•';
  color: var(--secondary-color);
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

.sidebar-list li a:hover,
.sidebar-list li.active a {
  color: var(--primary-color);
}

.featured-post {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
  transition: var(--transition);
}

.featured-post:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.featured-post:hover {
  transform: translateX(5px);
}

.featured-post-content {
  padding-left: 0.75rem;
}

.featured-post-content h6 {
  margin-bottom: 0.4rem;
  line-height: 1.4;
  font-size: 0.95rem;
}

.featured-post-content h6 a {
  color: var(--gray-800);
  text-decoration: none;
  transition: var(--transition);
}

.featured-post-content h6 a:hover {
  color: var(--primary-color);
}

.post-date {
  font-size: 0.8rem;
  color: var(--gray-600);
}

/* ===== NEWSLETTER FORM ===== */
.newsletter-form p {
  color: var(--gray-600);
  margin-bottom: 1rem;
}

.newsletter-form .input-group {
  margin-top: 1rem;
}

.newsletter-form .form-control {
  border: 1px solid var(--gray-300);
  border-right: none;
}

.newsletter-form .form-control:focus {
  box-shadow: none;
  border-color: var(--primary-color);
}

.newsletter-form .btn {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transition: var(--transition);
}

.newsletter-form .btn:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 992px) {
  .blog-header h1 {
    font-size: 2rem;
  }
  
  .blog-post-meta {
    gap: 1rem;
  }
  
  .post-meta-item {
    font-size: 0.85rem;
  }
  
  .blog-post-footer .row > div {
    margin-bottom: 1rem;
  }
  
  .post-share {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .blog-header {
    padding: 3.5rem 0 2rem;
  }
  
  .blog-header h1 {
    font-size: 1.75rem;
  }
  
  .blog-post-detail {
    padding: 1.5rem;
  }
  
  .blog-post-meta {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .blog-author {
    flex-direction: column;
    text-align: center;
  }
  
  .author-img {
    margin-right: 0;
    margin-bottom: 1rem;
  }
  
  .sidebar-block {
    padding: 1.25rem;
  }
}

@media (max-width: 576px) {
  .blog-header {
    padding: 3rem 0 1.5rem;
  }
  
  .blog-header h1 {
    font-size: 1.5rem;
  }
  
  .breadcrumb {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 0.5rem;
  }
  
  .blog-post-detail {
    padding: 1.25rem;
  }
  
  .social-icon {
    width: 32px;
    height: 32px;
    margin-left: 0.5rem;
  }
}