/* style/blog.css */

/* BEM Naming: page-blog__element-name */
/* Colors: #26A9E0 (primary), #FFFFFF (secondary), #EA7C07 (login/promo), #000000, #0d0d0d (body background) */

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

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: #0d0d0d; /* Matching body background for consistency */
  color: #ffffff;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 30px;
}

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

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

.page-blog__main-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: #26A9E0; /* Brand color for main title */
}

.page-blog__hero-description {
  font-size: 1.1em;
  margin-bottom: 30px;
}

/* General Section Styling */
.page-blog__content-section {
  padding: 60px 0;
}

.page-blog__light-bg {
  background-color: #ffffff;
  color: #333333; /* Dark text for light background */
}

.page-blog__dark-bg {
  background-color: #0d0d0d;
  color: #ffffff; /* Light text for dark background */
}

.page-blog__section-title {
  font-size: 2.2em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: #26A9E0; /* Brand color for section titles */
}

.page-blog__light-bg .page-blog__section-title {
  color: #26A9E0; /* Brand color on light background */
}

.page-blog__dark-bg .page-blog__section-title {
  color: #26A9E0; /* Brand color on dark background */
}

.page-blog__sub-title {
  font-size: 1.8em;
  font-weight: bold;
  margin-top: 40px;
  margin-bottom: 20px;
  color: #26A9E0; /* Brand color for sub-titles */
}

.page-blog__text-block {
  font-size: 1em;
  margin-bottom: 20px;
}

.page-blog__image-full-width {
  width: 100%;
  height: auto;
  display: block;
  margin: 30px 0;
  border-radius: 8px;
  object-fit: cover;
}

/* Buttons */
.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-blog__cta-buttons--center {
  justify-content: center;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  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;
  box-sizing: border-box;
  text-align: center;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text breaking */
}

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

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

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

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

/* Special Login Button Color */
.page-blog__btn-login {
  background-color: #EA7C07;
  color: #ffffff;
  border: 2px solid #EA7C07;
}

.page-blog__btn-login:hover {
  background-color: #e06c00;
  border-color: #e06c00;
}

/* Lists */
.page-blog__ordered-list,
.page-blog__unordered-list {
  margin-bottom: 20px;
  padding-left: 25px;
}

.page-blog__ordered-list li,
.page-blog__unordered-list li {
  margin-bottom: 10px;
  font-size: 1em;
}

/* Game Grid */
.page-blog__game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
  margin-bottom: 40px;
}

.page-blog__game-card {
  background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark background */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  padding-bottom: 20px;
  color: #ffffff;
}

.page-blog__light-bg .page-blog__game-card {
  background-color: #f8f8f8;
  color: #333333;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.page-blog__card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  margin-bottom: 15px;
}

.page-blog__card-title {
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 10px;
  color: #26A9E0; /* Brand color for card titles */
}

.page-blog__card-text {
  font-size: 0.95em;
  padding: 0 15px;
  margin-bottom: 15px;
}

.page-blog__card-link {
  display: inline-block;
  background-color: #26A9E0;
  color: #ffffff;
  padding: 8px 15px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9em;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.page-blog__card-link:hover {
  background-color: #1e87c0;
}

/* Blog List Section */
.page-blog__blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

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

.page-blog__blog-card .page-blog__card-image {
  height: 220px;
  object-fit: cover;
}

.page-blog__blog-card .page-blog__card-title {
  font-size: 1.4em;
  padding: 15px 20px 5px;
  text-align: left;
  color: #26A9E0;
}

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

.page-blog__blog-card .page-blog__card-title a:hover {
  text-decoration: underline;
}

.page-blog__blog-card .page-blog__card-meta {
  font-size: 0.85em;
  color: #777;
  padding: 0 20px;
  margin-bottom: 10px;
}

.page-blog__blog-card .page-blog__card-text {
  font-size: 0.95em;
  padding: 0 20px 15px;
  flex-grow: 1;
}

.page-blog__blog-card .page-blog__card-link {
  align-self: flex-start;
  margin: 0 20px 20px;
}

/* FAQ Section */
.page-blog__faq-list {
  margin-top: 40px;
}

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-weight: bold;
  font-size: 1.1em;
  cursor: pointer;
  background-color: #eaf6fc; /* Lighter brand color for question background */
  color: #26A9E0;
  transition: background-color 0.3s ease;
}

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

.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: 15px 25px;
  font-size: 1em;
  background-color: #ffffff;
  border-top: 1px solid #e0e0e0;
}

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

/* Details element native styling reset */
.page-blog__faq-item summary {
  list-style: none;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: 2.5em;
  }
  .page-blog__section-title {
    font-size: 2em;
  }
  .page-blog__sub-title {
    font-size: 1.6em;
  }
  .page-blog__game-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  .page-blog__blog-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,
  .page-blog__content-section,
  .page-blog__cta-section {
    padding: 40px 0;
  }

  .page-blog__hero-image-wrapper,
  .page-blog__hero-image,
  .page-blog__image-full-width,
  .page-blog__card-image,
  .page-blog__blog-card .page-blog__card-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__content-section,
  .page-blog__cta-section,
  .page-blog__game-grid,
  .page-blog__blog-grid,
  .page-blog__faq-list,
  .page-blog__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }

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

  .page-blog__main-title {
    font-size: 2em;
  }
  .page-blog__section-title {
    font-size: 1.8em;
  }
  .page-blog__sub-title {
    font-size: 1.4em;
  }

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

  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog__btn-login,
  .page-blog__card-link {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 15px !important; /* Adjust padding for smaller screens */
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__game-grid,
  .page-blog__blog-grid {
    grid-template-columns: 1fr;
  }

  .page-blog__game-card,
  .page-blog__blog-card {
    margin-bottom: 20px;
  }

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

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

/* Content area image CSS size lower limit check */
/* Any img under .page-blog must not have a display size smaller than 200px */
.page-blog img:not(.page-blog__hero-image) {
  min-width: 200px;
  min-height: 200px;
}

/* Override for images that are clearly not content images, if any */
/* This rule is for general content images, not for shared header/footer icons */
/* For example, if there were a small decorative icon within page-blog__element, this would prevent it from being too small */
/* However, per requirements, small icons are generally forbidden */