/* style/blog.css */

/* Base styles for the page */
.page-blog {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Default text color for light background */
  background-color: #ffffff; /* Default body background */
  line-height: 1.6;
}

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 60px;
  text-align: center;
  background-color: #017439;
  color: #ffffff;
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  max-height: 500px;
  overflow: hidden;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.7); /* Slightly dim image for text readability */
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 20px auto 0;
  padding: 0 20px;
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive H1 font size */
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
  color: #ffffff;
}

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

/* General Buttons */
.page-blog__cta-button {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow long words to break */
  max-width: 100%;
  box-sizing: border-box;
}

.page-blog__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  border: 2px solid #C30808;
}

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

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

.page-blog__btn-secondary:hover {
  background-color: #005a2e;
  border-color: #005a2e;
}

.page-blog__btn-outline {
  display: inline-block;
  padding: 8px 15px;
  border: 1px solid #017439;
  color: #017439;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.9em;
  transition: all 0.3s ease;
  margin-top: auto; /* For card link alignment */
}

.page-blog__btn-outline:hover {
  background-color: #017439;
  color: #ffffff;
}

/* Latest Articles Section */
.page-blog__latest-articles {
  padding: 60px 0;
  background-color: #ffffff; /* Light background */
  color: #333333;
}

.page-blog__section-title {
  font-size: 2.2em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #017439;
}

.page-blog__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: #555555;
}

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

.page-blog__card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards stretch for grid alignment */
  display: flex;
  flex-direction: column;
}

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

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

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

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

.page-blog__card-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
  color: #017439;
}

.page-blog__card-excerpt {
  font-size: 0.95em;
  color: #555555;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-blog__card-date {
  font-size: 0.85em;
  color: #888888;
  margin-bottom: 15px;
}

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

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

.page-blog__categories-section .page-blog__section-title,
.page-blog__categories-section .page-blog__section-description {
  color: #ffffff;
}

.page-blog__category-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

.page-blog__category-item {
  display: inline-block;
  padding: 10px 20px;
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.page-blog__category-item:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

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

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

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1em;
  font-weight: 600;
  color: #017439;
  cursor: pointer;
  list-style: none; /* Remove default marker */
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  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: 0 25px 20px;
  font-size: 1em;
  color: #555555;
}

/* CTA Bottom Section */
.page-blog__cta-bottom {
  padding: 60px 0;
  background-color: #017439;
  color: #ffffff;
  text-align: center;
}

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

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* --- Responsive Styles --- */

/* Common image responsive styles */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Placeholder for game/partners sections if they were present */
.page-blog__row-games, .page-blog__row-sport, .page-blog__row-coop {
  display: none; /* Not relevant for a blog page */
}
.page-blog__slider-wrapper, .page-blog__slider-track, .page-blog__game-slide {
  display: none; /* Not relevant for a blog page */
}
.page-blog__banners-top-wrapper, .page-blog__banner-item img {
  display: none; /* Not relevant for a blog page */
}
.page-blog__blog-masonry { /* Blog grid on desktop */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  align-items: stretch;
}
.page-blog__blog-card-link { /* Ensure cards stretch */
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Mobile specific styles */
@media (max-width: 768px) {
  /* HERO Section */
  .page-blog__hero-section {
    padding-top: 10px; /* As per requirement, small top padding */
    padding-bottom: 40px;
  }

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

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

  /* General content sections */
  .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

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

  /* Blog Grid */
  .page-blog__blog-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

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

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

  .page-blog__card-excerpt {
    font-size: 0.9em;
  }

  /* Categories */
  .page-blog__category-list {
    gap: 10px;
  }

  .page-blog__category-item {
    padding: 8px 15px;
    font-size: 0.9em;
  }

  /* FAQ */
  .page-blog__faq-question {
    padding: 15px 20px;
    font-size: 1em;
  }

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

  /* CTA Bottom */
  .page-blog__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  /* Universal image responsive styles for mobile */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  /* Mandatory mobile styles for elements that might not exist but are required to be present */
  .page-blog__home-content {
    height: auto !important;
    overflow-y: visible !important;
    padding: 15px !important;
  }
  .page-blog__home-content h2 {
    font-size: 1.5em !important;
  }
  .page-blog__slider-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 10px !important;
    padding-bottom: 10px; /* Space for scrollbar */
  }
  .page-blog__game-slide {
    flex: 0 0 160px !important;
    max-width: 160px !important;
    scroll-snap-align: start;
  }
  .page-blog__banners-top-wrapper {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  .page-blog__banner-item img {
    
    
  }
  .page-blog__blog-masonry {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .page-blog__blog-slider-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 15px !important;
    padding-bottom: 10px;
  }
  .page-blog__blog-slide {
    flex: 0 0 80% !important; /* Make slides take up more width */
    max-width: 80% !important;
    scroll-snap-align: start;
  }
  .page-blog__blog-card-link {
    height: auto !important;
  }
}

/* Color contrast rules - default light background */
.page-blog__dark-section {
  background-color: #017439;
  color: #ffffff;
}

.page-blog__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-blog p, .page-blog li, .page-blog__card-excerpt {
  color: #555555;
}

.page-blog__card-title {
  color: #017439;
}

.page-blog__btn-primary {
  background-color: #C30808;
  color: #FFFF00;
}

.page-blog__btn-secondary {
  background-color: #017439;
  color: #ffffff;
}

/* Mandatory CSS for homepage modules (even if not explicitly used on blog, as per prompt) */
.page-blog__hero-section { padding-top: 10px; } /* Already defined above */
.page-blog__home-content { border: 1px solid #FBB00D; border-radius: 10px; height: 650px; overflow-y: auto; padding: 30px; }
.page-blog__home-content h2 { font-size: 2em; margin-bottom: 20px; color: #017439; }
.page-blog__row-games, .page-blog__row-sport, .page-blog__row-coop { background-color: #1A202C; padding: 40px 20px; max-width: 1330px; margin: 0 auto; }
.page-blog__games-title, .page-blog__sport-title, .page-blog__coop-title { color: #fff; text-align: center; font-size: 2em; margin-bottom: 30px; }
.page-blog__slider-wrapper { overflow: hidden; position: relative; }
.page-blog__slider-track { display: flex; flex-wrap: nowrap; gap: 16px; transition: transform 0.5s ease-in-out; }
.page-blog__game-slide { flex: 0 0 200px; max-width: 200px; text-align: center; }
.page-blog__game-slide img { width: 100%;  object-fit: cover; border-radius: 8px; margin-bottom: 10px; }
.page-blog__game-slide h3 { font-size: 1.1em; color: #fff; margin-bottom: 5px; }
.page-blog__game-slide a { color: #fff; text-decoration: none; }
.page-blog__game-slide a:hover { text-decoration: underline; }
.page-blog__banners-top-wrapper { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; max-width: 900px; margin: 0 auto; padding: 20px 0; }
.page-blog__banner-item img {   object-fit: contain; margin: 0 auto; display: block; }
.page-blog__blog-masonry { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.page-blog__blog-card-link { display: flex; flex-direction: column; height: 100%; }
.page-blog__btn-outline { margin-top: auto; }
.page-blog__blog-slider-track { display: flex; flex-wrap: nowrap; gap: 20px; overflow-x: auto; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
.page-blog__blog-slide { flex: 0 0 calc(33.333% - 14px); max-width: calc(33.333% - 14px); }

@media (max-width: 1024px) {
  .page-blog__container {
    padding: 20px;
  }
  .page-blog__blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-blog__banners-top-wrapper {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .page-blog__blog-slide {
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
  }
}

@media (max-width: 768px) {
  /* All mobile styles from above are already included and prioritized */
  /* Ensure no duplication and !important for critical overrides */
  .page-blog__home-content { 
    height: auto !important; 
    overflow-y: visible !important; 
    padding: 15px !important; 
  }
  .page-blog__home-content h2 { 
    font-size: 1.5em !important; 
  }
  .page-blog__slider-track { 
    display: flex !important; 
    flex-wrap: nowrap !important; 
    overflow-x: auto !important; 
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 10px !important;
    padding-bottom: 10px; /* Space for scrollbar */
  }
  .page-blog__game-slide { 
    flex: 0 0 160px !important; 
    max-width: 160px !important; 
    scroll-snap-align: start;
  }
  .page-blog__banners-top-wrapper { 
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important; 
    gap: 10px !important; 
  }
  .page-blog__banner-item img { 
     
     
  }
  .page-blog__blog-masonry { 
    grid-template-columns: 1fr !important; 
    gap: 20px !important; 
  }
  .page-blog__blog-slider-track { 
    display: flex !important; 
    flex-wrap: nowrap !important; 
    overflow-x: auto !important; 
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 15px !important;
    padding-bottom: 10px;
  }
  .page-blog__blog-slide { 
    flex: 0 0 80% !important; 
    max-width: 80% !important; 
    scroll-snap-align: start;
  }
  .page-blog__blog-card-link {
    height: auto !important;
  }
}