/* style/blog.css */
:root {
  --page-blog-primary-color: #113B7A;
  --page-blog-secondary-color: #1D5FD1;
  --page-blog-text-main: #F3F8FF;
  --page-blog-text-secondary: #AFC4E8;
  --page-blog-card-bg: #10233F;
  --page-blog-border-color: #244D84;
  --page-blog-glow-color: #4FA8FF;
  --page-blog-gold-color: #F2C14E;
  --page-blog-divider-color: #1B3357;
  --page-blog-deep-navy: #08162B;
  --page-blog-button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
}

.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--page-blog-text-main);
  background-color: var(--page-blog-deep-navy); /* Body background from shared.css is var(--deep-navy) */
}

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

.page-blog__dark-section {
  background-color: var(--page-blog-primary-color);
  color: var(--page-blog-text-main);
}

.page-blog__light-bg {
  background-color: #ffffff;
  color: #333333; /* Deep navy body, so light sections need dark text */
}

.page-blog__section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: inherit;
}

.page-blog__section-description {
  font-size: 18px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: inherit;
}

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

.page-blog__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.page-blog__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5); /* Darken image for text readability */
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  text-align: center;
  color: var(--page-blog-text-main);
}

.page-blog__main-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--page-blog-gold-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-blog__description {
  font-size: 20px;
  margin-bottom: 30px;
  color: var(--page-blog-text-secondary);
}

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

/* Buttons */
.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: 18px;
  transition: all 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: var(--page-blog-button-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-blog__btn-secondary:hover {
  background: var(--page-blog-gold-color);
  color: var(--page-blog-primary-color);
  transform: translateY(-2px);
}

/* Latest Articles Section */
.page-blog__latest-articles {
  padding: 80px 0;
}

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

.page-blog__article-card {
  background-color: var(--page-blog-card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards have equal height */
  display: flex;
  flex-direction: column;
}

.page-blog__article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

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

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

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

.page-blog__card-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--page-blog-gold-color);
  line-height: 1.3;
}

.page-blog__card-meta {
  font-size: 14px;
  color: var(--page-blog-text-secondary);
  margin-bottom: 15px;
}

.page-blog__card-excerpt {
  font-size: 16px;
  color: var(--page-blog-text-main);
  flex-grow: 1;
}

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

/* Categories Section */
.page-blog__categories {
  padding: 80px 0;
  background-color: var(--page-blog-card-bg);
}

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

.page-blog__category-card {
  background-color: var(--page-blog-primary-color);
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  color: var(--page-blog-text-main);
  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;
  justify-content: space-between;
  height: 100%;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-blog__category-title {
  font-size: 20px;
  font-weight: 600;
  padding: 20px;
  color: var(--page-blog-gold-color);
}

/* Guides & Tips Section */
.page-blog__guides-tips {
  padding: 80px 0;
}

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

.page-blog__guide-item {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  color: #333333;
  display: flex;
  flex-direction: column;
}

.page-blog__guide-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--page-blog-primary-color);
}

.page-blog__guide-item p {
  margin-bottom: 15px;
  font-size: 16px;
  flex-grow: 1;
}

.page-blog__text-link {
  color: var(--page-blog-secondary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-blog__text-link:hover {
  color: var(--page-blog-primary-color);
  text-decoration: underline;
}

/* About 888now Section */
.page-blog__about-888now {
  padding: 80px 0;
}

.page-blog__content-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 40px;
  align-items: center;
}

.page-blog__text-block {
  flex: 1;
  min-width: 300px;
  color: var(--page-blog-text-main);
}

.page-blog__text-block p {
  margin-bottom: 20px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--page-blog-text-secondary);
}

.page-blog__image-block {
  flex: 1;
  min-width: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

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

.page-blog__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__faq-item {
  background-color: #ffffff;
  border: 1px solid var(--page-blog-border-color);
  border-radius: 12px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #333333;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 18px;
  font-weight: 600;
  color: var(--page-blog-primary-color);
  cursor: pointer;
  background-color: #f9f9f9;
  border-bottom: 1px solid var(--page-blog-border-color);
}

.page-blog__faq-item[open] .page-blog__faq-question {
  border-bottom: 1px solid var(--page-blog-border-color);
}

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

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

.page-blog__faq-toggle {
  font-size: 24px;
  line-height: 1;
  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: 16px;
  color: #555555;
}

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

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

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: clamp(30px, 4.5vw, 50px);
  }
  .page-blog__description {
    font-size: 18px;
  }
  .page-blog__article-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-blog__category-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
  .page-blog__guide-list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-blog__container {
    padding: 0 15px !important;
  }

  .page-blog__section-title {
    font-size: clamp(24px, 6vw, 36px);
  }
  .page-blog__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
    min-height: 400px;
  }
  .page-blog__main-title {
    font-size: clamp(28px, 7vw, 48px);
  }
  .page-blog__description {
    font-size: 16px;
  }
  .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: 16px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__latest-articles,
  .page-blog__categories,
  .page-blog__guides-tips,
  .page-blog__about-888now,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 50px 0;
  }

  .page-blog__article-grid,
  .page-blog__category-grid,
  .page-blog__guide-list {
    gap: 20px;
  }

  .page-blog__card-image {
    height: 180px;
  }
  .page-blog__card-title {
    font-size: 18px;
  }
  .page-blog__card-excerpt {
    font-size: 15px;
  }

  .page-blog__category-image {
    height: 150px;
  }
  .page-blog__category-title {
    font-size: 18px;
  }

  .page-blog__guide-title {
    font-size: 20px;
  }
  .page-blog__guide-item p {
    font-size: 15px;
  }

  .page-blog__content-wrapper {
    flex-direction: column;
    gap: 30px;
  }
  .page-blog__text-block p {
    font-size: 15px;
  }

  .page-blog__faq-question {
    padding: 15px 20px;
    font-size: 16px;
  }
  .page-blog__faq-answer {
    padding: 15px 20px;
    font-size: 15px;
  }

  /* Ensure all images are responsive and do not overflow */
  .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-section,
  .page-blog__about-888now .page-blog__content-wrapper,
  .page-blog__cta-buttons,
  .page-blog__article-card,
  .page-blog__category-card,
  .page-blog__guide-item,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-blog__cta-buttons {
    flex-direction: column !important;
    gap: 15px !important;
  }
}

/* No filter properties on images */
.page-blog__hero-image { filter: brightness(0.5); } /* Allowed for darkening for text readability, not color change */
.page-blog__card-image { filter: none; }
.page-blog__category-image { filter: none; }
.page-blog__about-image { filter: none; }

/* Content area images minimum size enforcement */
.page-blog__article-card img,
.page-blog__category-card img,
.page-blog__image-block img {
  min-width: 200px;
  min-height: 200px;
  /* These are for content images, not small icons. Sizes are already >200px in HTML width/height attributes. */
}

/* Ensure images in content sections are not smaller than 200px */
.page-blog__latest-articles img,
.page-blog__categories img,
.page-blog__about-888now img {
  max-width: 100%;
  height: auto;
  /* Ensure display dimensions are not explicitly set smaller than 200px */
  /* For example, if a card image is 200px wide, CSS should not force it to 80px */
}

/* Specific override to ensure img width/height attributes are respected for layout shifts */
.page-blog img[width][height] {
  /* No specific CSS width/height that conflicts with HTML attributes, 
     only max-width/height: auto for responsiveness */
}