/* style/blog.css */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-color: #EA7C07;
  --background-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --black-color: #000000; /* Assuming this is the body background from shared.css */
}

/* Base styles for the page, ensuring light text on dark body background */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Light text for visibility on assumed dark body background */
  background-color: transparent; /* Main content background will be set by sections */
}

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

.page-blog__section-title {
  font-size: clamp(2em, 2.5vw, 2.8em);
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: inherit; /* Inherit color from parent section */
  line-height: 1.2;
}

.page-blog__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  color: inherit; /* Inherit color from parent section */
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0 60px 0; /* Small top padding, more bottom padding */
  text-align: center;
  overflow: hidden;
  background-color: var(--black-color); /* Explicitly dark background for this section */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

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

.page-blog__hero-content {
  position: relative; /* Ensure content is above any potential background elements */
  z-index: 2;
  max-width: 900px;
  padding: 0 20px;
}

.page-blog__main-title {
  font-size: clamp(2.5em, 4vw, 3.5em);
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--secondary-color); /* White text on dark background */
  line-height: 1.2;
}

.page-blog__description {
  font-size: 1.15em;
  margin-bottom: 30px;
  color: var(--secondary-color); /* White text on dark background */
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-blog__btn-primary {
  background-color: var(--primary-color);
  color: var(--text-light);
  border: 2px solid var(--primary-color);
}

.page-blog__btn-primary:hover {
  background-color: darken(var(--primary-color), 10%);
  border-color: darken(var(--primary-color), 10%);
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-blog__btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--text-light);
}

/* Latest Articles Section */
.page-blog__latest-articles {
  padding: 80px 0;
  background-color: var(--background-color); /* White background for light text */
  color: var(--text-dark); /* Dark text on white background */
}

.page-blog__latest-articles .page-blog__section-title,
.page-blog__latest-articles .page-blog__section-description {
  color: var(--text-dark);
}

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

.page-blog__article-card {
  background-color: var(--secondary-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  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 8px 25px rgba(0, 0, 0, 0.15);
}

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

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

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

.page-blog__article-title {
  font-size: 1.4em;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary-color);
}

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

.page-blog__article-excerpt {
  font-size: 1em;
  color: var(--text-dark);
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-blog__read-more {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  align-self: flex-start;
}

.page-blog__read-more:hover {
  text-decoration: underline;
}

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

/* Categories Section */
.page-blog__categories {
  padding: 80px 0;
  background-color: var(--black-color);
  color: var(--text-light);
}

.page-blog__categories .page-blog__section-title,
.page-blog__categories .page-blog__section-description {
  color: var(--text-light);
}

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

.page-blog__category-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: var(--text-light);
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.page-blog__category-card:hover {
  background-color: var(--primary-color);
  transform: translateY(-5px);
}

.page-blog__category-title {
  font-size: 1.3em;
  font-weight: 700;
  margin-bottom: 10px;
  color: inherit;
}

.page-blog__category-desc {
  font-size: 0.95em;
  color: rgba(255, 255, 255, 0.8);
}

/* Featured Guides Section */
.page-blog__featured-guides {
  padding: 80px 0;
  background-color: var(--background-color);
  color: var(--text-dark);
}

.page-blog__featured-guides .page-blog__section-title,
.page-blog__featured-guides .page-blog__section-description {
  color: var(--text-dark);
}

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

.page-blog__guide-card {
  background-color: var(--secondary-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

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

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

.page-blog__guide-title {
  font-size: 1.5em;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.page-blog__guide-excerpt {
  font-size: 1em;
  color: var(--text-dark);
  margin-bottom: 15px;
  flex-grow: 1;
}

/* Why Choose Section */
.page-blog__why-choose {
  padding: 80px 0;
  background-color: var(--black-color);
  color: var(--text-light);
}

.page-blog__why-choose .page-blog__section-title,
.page-blog__why-choose .page-blog__section-description {
  color: var(--text-light);
}

.page-blog__advantages-list {
  list-style: none;
  padding: 0;
  margin: 0 auto 40px auto;
  max-width: 800px;
  font-size: 1.05em;
}

.page-blog__advantages-list li {
  background-color: rgba(255, 255, 255, 0.05);
  margin-bottom: 15px;
  padding: 15px 20px;
  border-radius: 8px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
}

.page-blog__advantages-list li strong {
  color: var(--primary-color);
  margin-right: 10px;
  flex-shrink: 0;
}

/* CTA Banner */
.page-blog__cta-banner {
  padding: 60px 0;
  text-align: center;
  background-color: var(--background-color);
  color: var(--text-dark);
}

.page-blog__cta-banner .page-blog__section-title,
.page-blog__cta-banner .page-blog__section-description {
  color: var(--text-dark);
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
  background-color: var(--black-color);
  color: var(--text-light);
}

.page-blog__faq-section .page-blog__section-title {
  color: var(--text-light);
}

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

.page-blog__faq-item {
  background-color: rgba(255, 255, 255, 0.08);
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
}

.page-blog__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.15em;
  font-weight: 600;
  color: var(--secondary-color);
  cursor: pointer;
  list-style: none; /* Hide default marker */
}

.page-blog__faq-item summary::-webkit-details-marker {
  display: none; /* Hide default marker for webkit */
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  font-weight: 300;
  color: var(--primary-color);
  margin-left: 15px;
}

.page-blog__faq-answer {
  padding: 0 20px 20px 20px;
  font-size: 1em;
  color: rgba(255, 255, 255, 0.8);
  text-align: left;
}

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

.page-blog__faq-answer a {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
  }

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

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

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

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

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__latest-articles,
  .page-blog__categories,
  .page-blog__featured-guides,
  .page-blog__why-choose,
  .page-blog__cta-banner,
  .page-blog__faq-section {
    padding: 40px 0;
  }

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

  .page-blog__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-blog__articles-grid,
  .page-blog__categories-grid,
  .page-blog__guides-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__article-card,
  .page-blog__category-card,
  .page-blog__guide-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box !important;
  }

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

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

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

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

  .page-blog__advantages-list li {
    font-size: 0.95em;
    padding: 12px 15px;
  }

  /* Image and Video specific mobile rules */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog video,
  .page-blog__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__hero-image-wrapper,
  .page-blog__article-card,
  .page-blog__category-card,
  .page-blog__guide-card,
  .page-blog__cta-buttons,
  .page-blog__articles-grid,
  .page-blog__categories-grid,
  .page-blog__guides-grid,
  .page-blog__faq-list,
  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-blog__video-section {
    padding-top: 10px !important;
  }
}