/* Styles for Blog List Page - Adapted from reference */

.blog-list-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Breadcrumbs - Assuming styles come from core/main.css or a shared breadcrumb CSS */
/* These are now direct children of .blog-list-page */
.blog-list-page > .breadcrumbs { /* Make selector more specific if needed */
  margin-top: 24px; /* Add some top margin if it's the first element */
  margin-bottom: 24px; 
  /* padding: 16px 0; From reference, but might be handled by core breadcrumb style */
}
/* .breadcrumbs, .breadcrumb-list, .breadcrumb-item, etc. */

/* Page Header */
/* This is now a direct child of .blog-list-page */
.blog-list-page > .page-header { 
  background: white;
  border-radius: 12px;
  border: 1px solid rgb(233, 236, 239);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 40px;
  margin-bottom: 40px;
  text-align: center;
}

.blog-list-page .page-title {
  font-size: 36px;
  font-weight: 700;
  color: rgb(33, 37, 41);
  margin: 0 0 16px;
}

.blog-list-page .page-subtitle {
  font-size: 18px;
  color: rgb(73, 80, 87);
  margin: 0 0 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Search and Filter */
.blog-list-page .blog-controls {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.blog-list-page .search-box {
  position: relative;
  min-width: 300px;
}

.blog-list-page .search-input {
  width: 100%;
  padding: 12px 16px 12px 40px;
  border: 1px solid rgb(206, 212, 218);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: white;
  transition: all 0.2s;
}

.blog-list-page .search-input:focus {
  outline: none;
  border-color: rgb(0, 80, 115); /* Using theme color from reference */
  box-shadow: 0 0 0 3px rgba(0, 80, 115, 0.1);
}

.blog-list-page .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgb(108, 117, 125);
  font-size: 16px;
}

/* Filter dropdowns are commented out in template, but styles are here if re-enabled */
.blog-list-page .filter-dropdown {
  padding: 12px 16px;
  border: 1px solid rgb(206, 212, 218);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}

.blog-list-page .filter-dropdown:focus {
  outline: none;
  border-color: rgb(0, 80, 115);
  box-shadow: 0 0 0 3px rgba(0, 80, 115, 0.1);
}

/* Main Content Layout */
/* This is now a direct child of .blog-list-page */
.blog-list-page > .main-content {
  display: grid;
  grid-template-columns: 1fr 300px; /* Main content and sidebar */
  gap: 40px;
  margin-bottom: 60px;
}

/* .blog-main is inside .main-content, so its selector doesn't need to change relative to .main-content */
.blog-list-page .blog-main { 
  /* This is the <main> element within .main-content */
}

/* Section Title (used for "Recent Posts") */
.blog-list-page .section-title {
  font-size: 24px;
  font-weight: 600;
  color: rgb(33, 37, 41);
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Blog Posts Grid */
.blog-list-page .blog-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

/* Individual Post Card Styling */
.blog-list-page .post-card {
  background: white;
  border-radius: 12px;
  border: 1px solid rgb(233, 236, 239);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s;
  height: fit-content; /* Or a fixed height if desired */
  display: flex;
  flex-direction: column;
}

.blog-list-page .post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.blog-list-page .post-image-link {
  display: block;
}

.blog-list-page .post-image {
  width: 100%;
  height: 160px; /* Or aspect-ratio */
  background: linear-gradient(135deg, rgb(0, 80, 115), rgb(0, 100, 140)); /* Theme color */
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 32px;
  overflow: hidden; /* if using img tag inside */
}
.blog-list-page .post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-list-page .post-image-emoji { /* For placeholder */
  font-size: 48px;
  font-weight: bold;
}


.blog-list-page .post-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Allows footer to stick to bottom */
}

.blog-list-page .post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap; /* Allow categories to wrap */
  gap: 8px 12px; /* row-gap column-gap */
  margin-bottom: 12px;
  font-size: 12px;
  color: rgb(108, 117, 125);
}

.blog-list-page .post-category {
  background: rgb(0, 80, 115); /* Theme color */
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.blog-list-page .post-title {
  font-size: 18px; /* Adjusted from 16px in reference for better hierarchy */
  font-weight: 600;
  color: rgb(33, 37, 41);
  margin: 0 0 8px;
  line-height: 1.3;
}

.blog-list-page .post-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-list-page .post-title a:hover {
  color: rgb(0, 80, 115); /* Theme color */
}

.blog-list-page .post-excerpt {
  color: rgb(73, 80, 87);
  font-size: 14px; /* Adjusted from 13px */
  margin: 0 0 12px;
  line-height: 1.5; /* Adjusted from 1.4 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1; /* Pushes footer down */
}

.blog-list-page .post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgb(248, 249, 250);
  margin-top: auto; /* Pushes footer to bottom of card content */
  font-size: 12px;
  color: rgb(108, 117, 125);
}

.blog-list-page .post-author {
  /* Styles for author if needed */
}

.blog-list-page .post-readtime {
  /* Styles for read time if needed */
}

/* Pagination */
.blog-list-page .pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px 0;
}

.blog-list-page .pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px; /* Ensure consistent width */
  height: 40px;
  padding: 0 8px; /* Add some horizontal padding for numbers like "..." */
  border: 1px solid rgb(233, 236, 239);
  background: white;
  color: rgb(73, 80, 87);
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.blog-list-page .pagination-btn:hover {
  border-color: rgb(0, 80, 115);
  background: rgb(0, 80, 115);
  color: white;
}

.blog-list-page .pagination-btn.active {
  background: rgb(0, 80, 115);
  color: white;
  border-color: rgb(0, 80, 115);
}

.blog-list-page .pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.blog-list-page .pagination-btn.disabled:hover {
  border-color: rgb(233, 236, 239);
  background: white;
  color: rgb(73, 80, 87);
}

/* Sidebar - Assuming sidebar partials will use these classes or be adapted */
.blog-list-page .sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.blog-list-page .sidebar-widget {
  background: white;
  border-radius: 12px;
  border: 1px solid rgb(233, 236, 239);
  padding: 24px;
}

.blog-list-page .widget-title { /* Also used for .section-title in main content */
  font-size: 18px;
  font-weight: 600;
  color: rgb(33, 37, 41);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-list-page .widget-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-list-page .widget-content li {
  padding: 8px 0;
  border-bottom: 1px solid rgb(248, 249, 250);
}

.blog-list-page .widget-content li:last-child {
  border-bottom: none;
}

.blog-list-page .widget-content a {
  color: rgb(33, 37, 41);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  transition: color 0.2s;
}

.blog-list-page .widget-content a:hover {
  color: rgb(0, 80, 115); /* Theme color */
}

.blog-list-page .category-count { /* For category widget */
  color: rgb(108, 117, 125);
  font-size: 12px;
  margin-left: 8px;
}

/* Newsletter Signup (if used in sidebar) */
.blog-list-page .newsletter-signup {
  background: linear-gradient(135deg, rgb(0, 80, 115), rgb(0, 100, 140)); /* Theme color */
  color: white;
  padding: 24px;
  border-radius: 12px;
  text-align: center;
}

.blog-list-page .newsletter-signup h4 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
}

.blog-list-page .newsletter-signup p {
  margin: 0 0 16px;
  font-size: 14px;
  opacity: 0.9;
}

.blog-list-page .newsletter-form {
  display: flex;
  flex-direction: column; /* Stacked in reference */
  gap: 12px;
}

.blog-list-page .newsletter-input {
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

.blog-list-page .newsletter-button {
  background: white;
  color: rgb(0, 80, 115); /* Theme color */
  border: none;
  padding: 12px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.blog-list-page .newsletter-button:hover {
  background: rgb(248, 249, 250);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .blog-list-page .main-content {
    grid-template-columns: 1fr; /* Stack main and sidebar */
    gap: 30px;
  }

  .blog-list-page .sidebar {
    margin-top: 20px;
  }
}

@media (max-width: 768px) {
  .blog-list-page {
    padding: 0 16px; /* Adjusted padding for smaller screens */
  }

  .blog-list-page > .page-header { /* Adjusted selector */
    padding: 24px 20px;
  }

  .blog-list-page .page-title {
    font-size: 28px;
  }

  .blog-list-page .page-subtitle {
    font-size: 16px;
  }

  .blog-list-page .blog-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .blog-list-page .search-box {
    min-width: auto;
  }

  .blog-list-page .blog-posts {
    grid-template-columns: 1fr; /* Single column for posts */
  }
}

@media (max-width: 480px) {
  .blog-list-page .page-title {
    font-size: 24px;
  }

  .blog-list-page .post-content {
    padding: 16px;
  }
  
  .blog-list-page .post-title {
    font-size: 17px; 
  }
  .blog-list-page .post-excerpt {
    font-size: 13px;
  }

  /* Breadcrumb font size might be handled by core/main.css */
}
