/* Posts Page Styles */
main.container {
  padding: 6rem 1rem 4rem;
}

/* Posts Header */
.posts-header {
  text-align: center;
  margin-bottom: 3rem;
}

.posts-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.posts-header p {
  font-size: 1.125rem;
  color: var(--brand-darkgray);
  max-width: 700px;
  margin: 0 auto;
}

/* Categories Section */
.categories-section {
  margin-bottom: 3rem;
}

.categories-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.category-button {
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: var(--brand-lightgray);
  color: var(--brand-darkgray);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.category-button:hover {
  background-color: #e5e5e5;
}

.category-button.active {
  background-color: var(--brand-red);
  color: var(--brand-white);
}

/* Featured Post Section */
.featured-post {
  margin-bottom: 4rem;
}

.featured-post-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background-color: var(--brand-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
  .featured-post-card {
    grid-template-columns: 1fr 1fr;
  }
}

.featured-post-image {
  position: relative;
  height: 300px;
}

@media (min-width: 768px) {
  .featured-post-image {
    height: 100%;
  }
}

.featured-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.featured-badge {
  background-color: var(--brand-red);
  color: var(--brand-white);
}

.featured-post-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.post-date, 
.post-category {
  display: flex;
  align-items: center;
  color: var(--brand-darkgray);
  font-size: 0.875rem;
}

.post-date i,
.post-category i {
  margin-right: 0.5rem;
}

.featured-post-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.featured-post-content p {
  color: var(--brand-darkgray);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.read-more {
  display: inline-flex;
  align-items: center;
  color: var(--brand-red);
  font-weight: 500;
  transition: var(--transition);
}

.read-more i {
  margin-left: 0.5rem;
  transition: transform 0.2s ease;
}

.read-more:hover {
  color: var(--brand-red);
}

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

/* Posts Grid Section */
.posts-grid-section {
  margin-bottom: 4rem;
}

.posts-grid-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.post-card {
  background-color: var(--brand-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.post-card-image {
  position: relative;
  height: 200px;
}

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

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

.category-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--brand-black);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.post-card-content {
  padding: 1.5rem;
}

.post-card-meta {
  display: flex;
  justify-content: space-between;
  color: var(--brand-darkgray);
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

.post-card-date {
  display: flex;
  align-items: center;
}

.post-card-date i {
  font-size: 0.875rem;
  margin-right: 0.25rem;
}

.post-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  transition: var(--transition);
}

.post-card:hover .post-card-title {
  color: var(--brand-red);
}

.post-card-excerpt {
  color: var(--brand-darkgray);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.post-card .read-more {
  font-size: 0.875rem;
}

/* Load More Button */
.load-more-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.load-more-container button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
}

.load-more-container button i {
  transition: transform 0.3s ease;
}

.load-more-container button:hover i {
  transform: translateY(3px);
}

/* Newsletter Section */
.newsletter-section {
  margin-bottom: 2rem;
}

.newsletter-container {
  background-color: var(--brand-lightgray);
  border-radius: var(--border-radius);
  padding: 3rem 2rem;
  text-align: center;
}

.newsletter-content {
  max-width: 600px;
  margin: 0 auto;
}

.newsletter-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.newsletter-content p {
  color: var(--brand-darkgray);
  margin-bottom: 1.5rem;
}

.newsletter-form .form-group {
  display: flex;
  margin-bottom: 1rem;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  font-family: inherit;
}

.newsletter-form button {
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.form-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--brand-darkgray);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.toast {
  background-color: var(--brand-white);
  color: var(--brand-black);
  border-left: 4px solid var(--brand-red);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  padding: 1rem;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 300px;
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 3s forwards;
}

.toast-content {
  display: flex;
  align-items: center;
}

.toast-icon {
  margin-right: 0.75rem;
  color: var(--brand-red);
}

.toast-message {
  font-weight: 500;
}

.toast-close {
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.toast-close:hover {
  opacity: 1;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Article Styles */
.article-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  background-color: var(--brand-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
}

.article-header {
  margin-bottom: 2rem;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
  color: var(--brand-darkgray);
}

.article-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.article-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
}

.article-content {
  line-height: 1.8;
}

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

.article-content h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
}

.article-content h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 1.5rem 0 1rem;
}

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

.article-content li {
  margin-bottom: 0.5rem;
}

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

/* Related Articles */
.related-articles {
  margin-top: 4rem;
}

.related-articles h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .posts-header h1 {
    font-size: 2rem;
  }
  
  .featured-post-content h2 {
    font-size: 1.5rem;
  }
  
  .newsletter-form .form-group {
    flex-direction: column;
  }
  
  .newsletter-form input[type="email"] {
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
  }
  
  .newsletter-form button {
    border-radius: var(--border-radius);
    width: 100%;
  }

  .article-title {
    font-size: 1.75rem;
  }

  .article-image {
    height: 250px;
  }
}

@media (max-width: 480px) {
  .posts-header h1 {
    font-size: 1.75rem;
  }
  
  .category-button {
    font-size: 0.75rem;
    padding: 0.4rem 1rem;
  }
}
