/* style/blog.css */

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

.page-blog__container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

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

/* Hero Section */
.page-blog__hero-section {
  padding-top: 10px; /* Small top margin, assuming body handles --header-offset */
  padding-bottom: 60px;
  background: linear-gradient(180deg, #17191F 0%, #0D0E12 100%); /* Card BG to Background gradient */
}

.page-blog__hero-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  padding-top: 40px;
  padding-bottom: 40px;
}

.page-blog__hero-content {
  flex: 1 1 50%;
  min-width: 300px;
  text-align: left;
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive H1, no fixed large size */
  color: #FFB04D; /* Glow */
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: bold;
}

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

.page-blog__cta-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%; /* Ensure container takes full width */
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  text-align: center;
  max-width: 100%; /* Button responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%); /* Button gradient */
  color: #FFF3E6; /* Text Main */
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #FFB04D 0%, #FF8C1A 100%); /* Glow to Main color */
  box-shadow: 0 4px 15px rgba(255, 140, 26, 0.4);
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: #FF8C1A; /* Main color */
  border: 2px solid #A84F0C; /* Border color */
}

.page-blog__btn-secondary:hover {
  background-color: #A84F0C; /* Border color */
  color: #FFF3E6; /* Text Main */
}

.page-blog__hero-image {
  flex: 1 1 40%;
  min-width: 300px;
  text-align: center;
}

.page-blog__hero-side-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Latest Posts Section */
.page-blog__latest-posts-section {
  padding: 60px 0;
  background-color: #0D0E12; /* Background */
}

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

.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;
  display: flex;
  flex-direction: column;
}

.page-blog__post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(255, 140, 26, 0.3); /* Main color shadow */
}

.page-blog__post-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-blog__post-image-wrapper {
  width: 100%;
  height: 220px; /* Fixed height for consistency */
  overflow: hidden;
}

.page-blog__post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.page-blog__post-card:hover .page-blog__post-image {
  transform: scale(1.05);
}

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

.page-blog__post-title {
  font-size: 1.5em;
  color: #FFB04D; /* Glow */
  margin-bottom: 10px;
  line-height: 1.3;
}

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

.page-blog__post-excerpt {
  font-size: 1em;
  color: #FFF3E6; /* Text Main */
  flex-grow: 1;
}

.page-blog__view-all-button-wrapper {
  text-align: center;
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Categories Section */
.page-blog__categories-section {
  padding: 60px 0;
  background-color: #17191F; /* Card BG */
}

.page-blog__category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.page-blog__category-card {
  background-color: #0D0E12; /* Background */
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border: 1px solid #17191F; /* Card BG */
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(255, 140, 26, 0.25); /* Main color shadow */
  border-color: #FF8C1A; /* Main color */
}

.page-blog__category-title {
  font-size: 1.8em;
  color: #FFB04D; /* Glow */
  margin-bottom: 10px;
}

.page-blog__category-description {
  font-size: 1em;
  color: #FFF3E6; /* Text Main */
}

/* Bottom CTA Section */
.page-blog__cta-bottom-section {
  padding: 80px 0;
  background: linear-gradient(180deg, #0D0E12 0%, #17191F 100%); /* Background to Card BG gradient */
  text-align: center;
}

.page-blog__cta-bottom-content {
  max-width: 800px;
}

.page-blog__cta-bottom-title {
  font-size: clamp(1.8em, 3.5vw, 3em);
  color: #FF8C1A; /* Main color */
  margin-bottom: 20px;
  font-weight: bold;
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-container {
    flex-direction: column;
    text-align: center;
  }

  .page-blog__hero-content {
    text-align: center;
  }

  .page-blog__main-title {
    font-size: 3em;
  }

  .page-blog__cta-buttons {
    justify-content: center;
  }

  .page-blog__section-title {
    font-size: 2em;
  }

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

  .page-blog__category-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  /* HERO Section */
  .page-blog__hero-section {
    padding-top: 10px !important; /* Ensure small top padding */
    padding-bottom: 40px;
  }

  .page-blog__hero-container {
    padding-top: 20px;
    padding-bottom: 20px;
    gap: 20px;
  }

  .page-blog__main-title {
    font-size: 2.2em;
  }

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

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 10px;
    padding-left: 15px;
    padding-right: 15px;
  }

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

  /* Latest Posts Section */
  .page-blog__latest-posts-section {
    padding: 40px 0;
  }

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

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

  .page-blog__post-image-wrapper {
    height: 180px;
  }

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

  .page-blog__post-meta {
    font-size: 0.85em;
  }

  .page-blog__post-excerpt {
    font-size: 0.95em;
  }

  .page-blog__view-all-button-wrapper {
    flex-direction: column;
    gap: 10px;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Categories Section */
  .page-blog__categories-section {
    padding: 40px 0;
  }

  .page-blog__category-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .page-blog__category-card {
    padding: 20px;
  }

  .page-blog__category-title {
    font-size: 1.5em;
  }

  .page-blog__category-description {
    font-size: 0.95em;
  }

  /* Bottom CTA Section */
  .page-blog__cta-bottom-section {
    padding: 60px 0;
  }

  .page-blog__cta-bottom-title {
    font-size: 2em;
  }

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

  /* General image responsiveness for all content images */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* All containers for images or buttons must have these properties */
  .page-blog__container,
  .page-blog__post-card,
  .page-blog__category-card,
  .page-blog__cta-buttons,
  .page-blog__view-all-button-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}