/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Text color for dark body background */
  background-color: transparent; /* Body background is handled by shared.css */
}

.page-blog__container {
  width: 100%; /* Ensure container takes full width for max-width to work */
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-blog__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: #26A9E0;
  line-height: 1.2;
}

.page-blog__section-title--cta {
  color: #ffffff;
}

.page-blog__description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-blog__description--cta {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-blog__btn-primary {
  background-color: #26A9E0;
  color: #ffffff;
  border: 2px solid #26A9E0;
}

.page-blog__btn-primary:hover {
  background-color: #1a88bb;
  border-color: #1a88bb;
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-blog__btn-secondary:hover {
  background-color: #26A9E0;
  color: #ffffff;
}

.page-blog__btn-link {
  background-color: transparent;
  color: #26A9E0;
  border: none;
  padding: 0;
  text-align: left;
  display: block;
  margin-top: 15px;
}

.page-blog__btn-link:hover {
  text-decoration: underline;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background-color: #0d0d0d; /* Slightly lighter than body bg for subtle contrast */
}

.page-blog__hero-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  margin-bottom: 30px;
}

.page-blog__hero-content {
  text-align: center;
  max-width: 900px;
  width: 100%;
}

.page-blog__main-title {
  font-weight: bold;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 20px;
  /* Using clamp for responsive font size without fixed large values */
  font-size: clamp(2.2em, 5vw, 3.5em);
}

.page-blog__hero-content .page-blog__description {
  margin-bottom: 30px;
  color: #f0f0f0;
}

/* Latest Articles Section */
.page-blog__latest-articles {
  padding: 60px 0;
  background-color: #1a1a1a; /* Darker background for this section */
}

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

.page-blog__article-card {
  background-color: #262626; /* Card background */
  border-radius: 8px;
  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__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-blog__article-image {
  width: 100%;
  height: 225px;
  object-fit: cover;
  display: block;
}

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

.page-blog__card-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 10px;
  color: #26A9E0;
  flex-grow: 1;
}

.page-blog__card-meta {
  font-size: 0.9em;
  color: #999999;
  margin-bottom: 15px;
}

.page-blog__card-excerpt {
  font-size: 1em;
  color: #cccccc;
  margin-bottom: 15px;
}

.page-blog__view-all {
  text-align: center;
}

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

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

.page-blog__category-card {
  background-color: #262626;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  background-color: #26A9E0;
}

.page-blog__category-card:hover .page-blog__category-title {
  color: #ffffff;
}

.page-blog__category-title {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 10px;
  color: #26A9E0;
}

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

/* In-depth Article Section */
.page-blog__in-depth-article {
  padding: 60px 0;
  background-color: #1a1a1a;
}

.page-blog__article-intro,
.page-blog__article-paragraph,
.page-blog__article-conclusion {
  font-size: 1.1em;
  margin-bottom: 20px;
  color: #f0f0f0;
}

.page-blog__article-subtitle {
  font-size: 1.8em;
  font-weight: bold;
  margin-top: 40px;
  margin-bottom: 20px;
  color: #26A9E0;
}

.page-blog__article-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 40px;
}

/* Why Choose Us Section */
.page-blog__why-choose-us {
  padding: 60px 0;
  background-color: #26A9E0; /* Brand color as background */
  color: #ffffff; /* White text for contrast */
}

.page-blog__why-choose-us .page-blog__section-title {
  color: #ffffff;
}

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

.page-blog__feature-item {
  background-color: rgba(0, 0, 0, 0.2); /* Semi-transparent background on brand color */
  border-radius: 8px;
  padding: 30px;
  text-align: center;
}

.page-blog__feature-title {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-blog__feature-description {
  font-size: 1em;
  color: #f0f0f0;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
  background-color: #0d0d0d;
}

.page-blog__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-blog__faq-item {
  background-color: #262626;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-blog__faq-item details > summary {
  list-style: none;
}

.page-blog__faq-item details > summary::-webkit-details-marker {
  display: none;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #26A9E0;
  cursor: pointer;
  background-color: #262626;
  border-bottom: 1px solid #333333;
}

.page-blog__faq-question:hover {
  background-color: #333333;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: #26A9E0;
  margin-left: 15px;
}

.page-blog__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  color: #cccccc;
  background-color: #1a1a1a;
}

.page-blog__faq-answer p {
  margin-bottom: 10px;
}

.page-blog__faq-answer a {
  color: #26A9E0;
  text-decoration: underline;
}

/* CTA Section */
.page-blog__cta-section {
  padding: 60px 0;
  background-color: #1a1a1a;
  text-align: center;
}

.page-blog__cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__section-title {
    font-size: 2em;
  }
  .page-blog__card-title {
    font-size: 1.2em;
  }
  .page-blog__article-image {
    height: 200px;
  }
}

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

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

  .page-blog__hero-section,
  .page-blog__latest-articles,
  .page-blog__categories-section,
  .page-blog__in-depth-article,
  .page-blog__why-choose-us,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 0;
  }

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

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

  .page-blog__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em);
  }

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

  .page-blog__article-grid,
  .page-blog__category-grid,
  .page-blog__feature-grid {
    grid-template-columns: 1fr;
  }

  .page-blog__article-image,
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__article-card,
  .page-blog__category-card,
  .page-blog__feature-item,
  .page-blog__faq-item {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: auto;
    margin-right: auto;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog__btn-link,
  .page-blog a[class*="button"],
  .page-blog a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px !important;
    overflow: hidden !important;
  }

  .page-blog__article-cta {
    flex-direction: column !important;
    gap: 15px !important;
  }
}

@media (max-width: 480px) {
  .page-blog__section-title {
    font-size: 1.5em;
  }
  .page-blog__card-title {
    font-size: 1.1em;
  }
  .page-blog__article-subtitle {
    font-size: 1.5em;
  }
}