/* Blog specific styles for SHA224.com */

/* Blog container layout */
.blog-container {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 40px;
  padding: 40px 0;
}

@media (max-width: 992px) {
  .blog-container {
    grid-template-columns: 1fr;
  }
}

/* Featured posts section */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

.featured-post {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dark-mode .featured-post {
  background-color: #2c2c2c;
}

.featured-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.featured-post .post-thumbnail {
  height: 100%;
  overflow: hidden;
}

.featured-post .post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.featured-post:hover .post-thumbnail img {
  transform: scale(1.05);
}

.featured-post .post-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
}

.post-category {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 500;
  background-color: var(--secondary-color);
  color: white;
  border-radius: 20px;
  margin-bottom: 15px;
  align-self: flex-start;
}

.post-title {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.5rem;
  line-height: 1.3;
}

.post-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.dark-mode .post-title a {
  color: var(--secondary-color);
}

.post-title a:hover {
  color: var(--secondary-color);
}

.dark-mode .post-title a:hover {
  color: var(--light-text);
}

.post-meta {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 15px;
}

.dark-mode .post-meta {
  color: #aaa;
}

.post-date, .post-author {
  margin-right: 15px;
}

.post-excerpt {
  flex-grow: 1;
  margin-bottom: 20px;
  line-height: 1.6;
}

.read-more {
  align-self: flex-start;
  display: inline-block;
  padding: 8px 15px;
  background-color: var(--secondary-color);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.read-more:hover {
  background-color: #2980b9;
}

/* Recent posts grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.post-card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.dark-mode .post-card {
  background-color: #2c2c2c;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.post-card .post-thumbnail {
  height: 200px;
  overflow: hidden;
}

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

.post-card:hover .post-thumbnail img {
  transform: scale(1.05);
}

.post-card .post-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.post-card .post-title {
  font-size: 1.25rem;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 50px;
}

.pagination a, .pagination span {
  padding: 8px 15px;
  margin: 0 5px;
  border-radius: 4px;
  text-decoration: none;
}

.pagination a {
  background-color: var(--secondary-color);
  color: white;
  transition: background-color 0.3s ease;
}

.pagination a:hover {
  background-color: #2980b9;
}

.pagination .current-page {
  background-color: var(--primary-color);
  color: white;
}

.pagination .next-page {
  margin-left: 15px;
}

/* Blog sidebar */
.blog-sidebar {
  position: sticky;
  top: 30px;
  align-self: start;
}

.sidebar-section {
  background-color: #fff;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dark-mode .sidebar-section {
  background-color: #2c2c2c;
}

.sidebar-section h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.dark-mode .sidebar-section h3 {
  color: var(--secondary-color);
}

/* Search section */
.search-form {
  display: flex;
}

.search-form input {
  flex-grow: 1;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-right: none;
  border-radius: 4px 0 0 4px;
}

.dark-mode .search-form input {
  background-color: #333;
  color: var(--light-text);
  border-color: #444;
}

.search-form button {
  padding: 10px 15px;
  background-color: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search-form button:hover {
  background-color: #2980b9;
}

/* Categories section */
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list li {
  margin-bottom: 10px;
}

.category-list a {
  display: flex;
  justify-content: space-between;
  text-decoration: none;
  color: var(--dark-text);
  padding: 5px 0;
  transition: color 0.3s ease;
}

.dark-mode .category-list a {
  color: var(--light-text);
}

.category-list a:hover {
  color: var(--secondary-color);
}

.category-list span {
  color: #777;
  font-size: 0.85rem;
}

.dark-mode .category-list span {
  color: #aaa;
}

/* Popular posts section */
.popular-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.popular-list li {
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
}

.dark-mode .popular-list li {
  border-color: #444;
}

.popular-list li:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.popular-list a {
  text-decoration: none;
  color: var(--dark-text);
  transition: color 0.3s ease;
}

.dark-mode .popular-list a {
  color: var(--light-text);
}

.popular-list a:hover {
  color: var(--secondary-color);
}

.popular-post-title {
  font-weight: 500;
  margin-bottom: 5px;
}

.popular-post-meta {
  font-size: 0.8rem;
  color: #777;
}

.dark-mode .popular-post-meta {
  color: #aaa;
}

/* Subscribe section */
.subscribe-form {
  display: flex;
  flex-direction: column;
}

.subscribe-form input {
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  margin-bottom: 10px;
}

.dark-mode .subscribe-form input {
  background-color: #333;
  color: var(--light-text);
  border-color: #444;
}

.subscribe-form button {
  padding: 10px 15px;
  background-color: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.subscribe-form button:hover {
  background-color: #2980b9;
}

/* Tags section */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-block;
  padding: 5px 12px;
  background-color: #f1f1f1;
  color: var(--dark-text);
  border-radius: 20px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.dark-mode .tag {
  background-color: #333;
  color: var(--light-text);
}

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

/* Call to action section */
.cta-section {
  background-color: var(--primary-color);
  color: white;
  border-radius: 8px;
  padding: 40px;
  margin: 40px auto;
  text-align: center;
}

.cta-content h2 {
  color: white;
  margin-top: 0;
}

.cta-content p {
  margin-bottom: 25px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .featured-post {
    grid-template-columns: 1fr;
  }
  
  .featured-post .post-thumbnail {
    height: 200px;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
}