/* style/blog.css */
/* Body background color is #0D0E12 (dark), so text color should be #FFF3E6 (light) by default */

.page-blog {
  color: #FFF3E6; /* Text Main */
  background-color: #0D0E12; /* Background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 0;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 0 20px;
}

.page-blog__title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #FFF3E6; /* Text Main */
  margin-bottom: 20px;
  max-width: 100%;
}

.page-blog__description {
  font-size: 1.1em;
  color: #FFF3E6; /* Text Main */
  margin-bottom: 30px;
}

.page-blog__cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%); /* Button color */
  color: #ffffff; /* White text for contrast */
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
  min-width: 200px;
  min-height: 50px;
}

.page-blog__cta-button:hover {
  background: linear-gradient(180deg, #D96800 0%, #FFA53A 100%);
}

.page-blog__section-title {
  font-size: 2.2em;
  color: #FFF3E6; /* Text Main */
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-blog__section-title--light {
  color: #FFF3E6; /* Text Main */
}

.page-blog__featured-posts-section,
.page-blog__all-posts-section,
.page-blog__categories-section,
.page-blog__subscribe-section {
  padding: 60px 0;
}

.page-blog__featured-posts-section {
  background-color: #0D0E12; /* Background */
}

.page-blog__post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-blog__post-card {
  background-color: #17191F; /* Card BG */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #A84F0C; /* Border */
}

.page-blog__post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-blog__post-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.page-blog__post-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

.page-blog__post-content {
  padding: 20px;
}

.page-blog__post-title {
  font-size: 1.4em;
  color: #FFF3E6; /* Text Main */
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__post-meta {
  font-size: 0.9em;
  color: #FFA53A; /* Auxiliary color */
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 1em;
  color: #FFF3E6; /* Text Main */
  margin-bottom: 15px;
}

.page-blog__read-more-btn {
  display: inline-block;
  color: #FFA53A; /* Auxiliary color */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-blog__read-more-btn:hover {
  color: #FF8C1A; /* Main color */
}

.page-blog__post-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-blog__post-item {
  background-color: #17191F; /* Card BG */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #A84F0C; /* Border */
}

.page-blog__post-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-blog__pagination {
  display: flex;
  justify-content: center;
  margin-top: 50px;
  gap: 10px;
}

.page-blog__page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: #17191F; /* Card BG */
  color: #FFF3E6; /* Text Main */
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: 1px solid #A84F0C; /* Border */
}

.page-blog__page-link:hover,
.page-blog__page-link--active {
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%); /* Button color */
  color: #ffffff;
  border-color: transparent;
}

.page-blog__categories-section {
  background-color: #0D0E12; /* Background */
}

.page-blog__category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.page-blog__category-item {
  background-color: #17191F; /* Card BG */
  border-radius: 8px;
  border: 1px solid #A84F0C; /* Border */
  transition: background-color 0.3s ease;
}

.page-blog__category-item:hover {
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%); /* Button color */
}

.page-blog__category-item:hover .page-blog__category-link {
  color: #ffffff;
}

.page-blog__category-link {
  display: block;
  padding: 12px 25px;
  text-decoration: none;
  color: #FFF3E6; /* Text Main */
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-blog__subscribe-section {
  background-color: #17191F; /* Card BG */
  text-align: center;
  padding: 80px 0;
  border-top: 1px solid #A84F0C; /* Border */
}

.page-blog__subscribe-description {
  font-size: 1.1em;
  color: #FFF3E6; /* Text Main */
  max-width: 800px;
  margin: 20px auto 40px auto;
}

.page-blog__subscribe-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 500px;
  margin: 0 auto;
}

.page-blog__form-group {
  width: 100%;
}

.page-blog__form-input {
  width: 100%;
  padding: 15px 20px;
  border: 1px solid #A84F0C; /* Border */
  border-radius: 8px;
  background-color: #0D0E12; /* Background */
  color: #FFF3E6; /* Text Main */
  font-size: 1em;
  box-sizing: border-box;
}

.page-blog__form-input::placeholder {
  color: rgba(255, 243, 230, 0.7); /* Lighter version of Text Main */
}

.page-blog__submit-btn {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%); /* Button color */
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  min-width: 200px;
  min-height: 50px;
}

.page-blog__submit-btn:hover {
  background: linear-gradient(180deg, #D96800 0%, #FFA53A 100%);
}

/* Responsive styles */
@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-blog__hero-section {
    padding: 40px 0;
    padding-top: 10px !important;
  }

  .page-blog__hero-content {
    padding: 0 15px;
  }

  .page-blog__title {
    font-size: 2em;
  }

  .page-blog__description {
    font-size: 1em;
  }

  .page-blog__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

  .page-blog__featured-posts-section,
  .page-blog__all-posts-section,
  .page-blog__categories-section,
  .page-blog__subscribe-section {
    padding: 40px 0;
  }

  .page-blog__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-blog__post-grid,
  .page-blog__post-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__post-image {
    height: 200px;
    min-width: 200px !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__post-card,
  .page-blog__post-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__post-title {
    font-size: 1.2em;
  }

  .page-blog__category-list {
    flex-direction: column;
    align-items: center;
  }

  .page-blog__category-item {
    width: 100%;
    max-width: 300px;
  }

  .page-blog__subscribe-description {
    font-size: 1em;
  }

  .page-blog__subscribe-form {
    padding: 0 15px;
  }

  .page-blog__form-input,
  .page-blog__submit-btn {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__hero-image-wrapper {
    max-height: 300px;
  }
  .page-blog__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Ensure all images within .page-blog are responsive */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
}