/* style/blog.css */

/* Base styles for page-blog */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: var(--black-color); /* Inherited from shared.css, assuming dark */
}

/* Ensure main content areas are readable against dark body background */
.page-blog__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-blog__dark-bg {
  background-color: #26A9E0;
  color: #ffffff;
}

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  text-align: center;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 1920px;
  margin-bottom: 30px; /* Space between image and text */
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px;
}

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

.page-blog__hero-title {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
}

.page-blog__hero-description {
  font-size: 1.15rem;
  margin-bottom: 30px;
  color: #f0f0f0;
}

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

/* General Section Styling */
.page-blog__section-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 40px;
  text-align: center;
  color: inherit;
}

.page-blog__text-block {
  font-size: 1.05rem;
  margin-bottom: 20px;
  line-height: 1.7;
  color: inherit;
}

.page-blog__intro-section, .page-blog__expert-advice, .page-blog__cta-bottom {
  padding: 80px 0;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background-color: #EA7C07; /* Login color */
  color: #ffffff;
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
  background-color: #d16b00;
  transform: translateY(-2px);
}

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

.page-blog__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #1e87b7;
  transform: translateY(-2px);
}

.page-blog__btn-text {
  display: inline-block;
  color: #26A9E0;
  text-decoration: none;
  font-weight: 600;
  margin-top: 10px;
}

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

/* Topic Grid */
.page-blog__topics-section {
  padding: 80px 0;
}

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

.page-blog__topic-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-blog__topic-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 20px;
}

.page-blog__topic-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-blog__topic-description {
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Featured Articles */
.page-blog__featured-articles {
  padding: 80px 0;
}

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

.page-blog__article-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

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

.page-blog__article-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__article-title a {
  color: #26A9E0;
  text-decoration: none;
}

.page-blog__article-title a:hover {
  text-decoration: underline;
}

.page-blog__article-meta {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 15px;
}

.page-blog__article-excerpt {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__view-all-button {
  text-align: center;
  margin-top: 40px;
}

/* Expert Advice */
.page-blog__expert-advice {
  padding: 80px 0;
}

.page-blog__advice-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.page-blog__advice-content a {
  color: #ffffff;
  text-decoration: underline;
}

.page-blog__advice-content a:hover {
  color: #f0f0f0;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
}

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

.page-blog__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-item[open] {
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #26A9E0;
  cursor: pointer;
  background-color: #f8f8f8;
  border-bottom: 1px solid #e0e0e0;
  list-style: none; /* For details/summary */
}

.page-blog__faq-question::-webkit-details-marker {
  display: none;
}

.page-blog__faq-qtext {
  flex-grow: 1;
  text-align: left;
}

.page-blog__faq-toggle {
  font-size: 1.5rem;
  font-weight: 700;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg);
}

.page-blog__faq-answer {
  padding: 20px 25px;
  font-size: 1rem;
  color: #555;
  text-align: left;
}

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

/* Bottom CTA */
.page-blog__cta-bottom {
  padding: 80px 0;
  text-align: center;
}

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

.page-blog__cta-bottom .page-blog__text-block {
  color: #f0f0f0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__cta-bottom .page-blog__cta-buttons {
  margin-top: 40px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }
  .page-blog__section-title {
    font-size: clamp(1.8rem, 4.5vw, 2.5rem);
  }
  .page-blog__topic-grid, .page-blog__article-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

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

  .page-blog__hero-section {
    padding: 40px 15px;
  }

  .page-blog__hero-image-wrapper {
    margin-bottom: 20px;
  }

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

  .page-blog__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-blog__btn-primary, .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 0.95rem;
  }

  .page-blog__intro-section, .page-blog__expert-advice, .page-blog__cta-bottom, .page-blog__topics-section, .page-blog__featured-articles, .page-blog__faq-section {
    padding: 40px 0;
  }

  .page-blog__container {
    padding: 0 15px;
  }

  .page-blog__section-title {
    margin-bottom: 30px;
  }

  .page-blog__topic-card, .page-blog__article-card, .page-blog__faq-item {
    padding: 15px;
  }

  .page-blog__article-image {
    height: 180px;
  }

  .page-blog__article-content {
    padding: 15px;
  }

  .page-blog__article-title {
    font-size: 1.15rem;
  }

  .page-blog__faq-question {
    padding: 15px 20px;
    font-size: 1rem;
  }

  .page-blog__faq-answer {
    padding: 15px 20px;
  }

  /* Mobile image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-image-wrapper,
  .page-blog__topic-card,
  .page-blog__article-card,
  .page-blog__faq-item,
  .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: 0;
    padding-right: 0;
  }

  .page-blog__hero-section,
  .page-blog__intro-section,
  .page-blog__topics-section,
  .page-blog__featured-articles,
  .page-blog__expert-advice,
  .page-blog__faq-section,
  .page-blog__cta-bottom {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-blog__hero-cta-buttons {
    flex-wrap: wrap !important;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .page-blog__hero-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }
  .page-blog__section-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }
  .page-blog__hero-description {
    font-size: 1rem;
  }
  .page-blog__topic-card, .page-blog__article-card {
    padding: 15px;
  }
  .page-blog__article-title {
    font-size: 1.05rem;
  }
  .page-blog__faq-question {
    font-size: 0.95rem;
  }
}