/* style/blog.css */

/* Custom Colors */
:root {
  --rr88-primary-color: #11A84E;
  --rr88-secondary-color: #22C768;
  --rr88-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --rr88-card-bg: #11271B;
  --rr88-background: #08160F;
  --rr88-text-main: #F2FFF6;
  --rr88-text-secondary: #A7D9B8;
  --rr88-border: #2E7A4E;
  --rr88-glow: #57E38D;
  --rr88-gold: #F2C14E;
  --rr88-divider: #1E3A2A;
  --rr88-deep-green: #0A4B2C;
}

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

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

/* Sections */
.page-blog__hero-section,
.page-blog__about-rr88,
.page-blog__promotions,
.page-blog__cta-bottom {
  padding: 60px 0;
  text-align: center;
}

.page-blog__latest-posts,
.page-blog__how-to-register,
.page-blog__faq-section {
  padding: 60px 0;
  text-align: center;
}

/* Background Colors */
.page-blog__dark-bg {
  background-color: var(--rr88-background);
  color: var(--rr88-text-main);
}

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

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

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

.page-blog__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3; /* Subtle overlay */
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  background: rgba(0, 0, 0, 0.4); /* Semi-transparent background for text readability */
  border-radius: 10px;
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.5em);
  font-weight: 700;
  color: var(--rr88-gold);
  margin-bottom: 15px;
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.page-blog__intro-description {
  font-size: 1.1em;
  color: var(--rr88-text-secondary);
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Titles & Descriptions */
.page-blog__section-title {
  font-size: 2.5em;
  color: var(--rr88-gold);
  margin-bottom: 15px;
  font-weight: 700;
}

.page-blog__sub-title {
  font-size: 1.8em;
  color: var(--rr88-primary-color);
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: 600;
}

.page-blog__section-description {
  font-size: 1.1em;
  color: var(--rr88-text-secondary);
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__text-block {
  font-size: 1em;
  color: var(--rr88-text-main);
  margin-bottom: 20px;
  text-align: left;
}

/* Buttons */
.page-blog__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
}

.page-blog__btn-primary {
  background: var(--rr88-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);
  opacity: 0.9;
}

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

.page-blog__btn-secondary:hover {
  background-color: var(--rr88-primary-color);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-blog__button-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

/* Blog Post Grid */
.page-blog__post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
  text-align: left;
}

.page-blog__post-card {
  background-color: var(--rr88-card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-blog__post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

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

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

.page-blog__card-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__card-title a {
  color: var(--rr88-text-main);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__card-title a:hover {
  color: var(--rr88-primary-color);
}

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

.page-blog__card-text {
  font-size: 1em;
  color: var(--rr88-text-secondary);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  display: inline-block;
  color: var(--rr88-primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: var(--rr88-gold);
}

.page-blog__view-all-wrapper {
  margin-top: 50px;
}

/* About rr88 Section */
.page-blog__about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  text-align: left;
}

.page-blog__about-content {
  padding-right: 20px;
}

.page-blog__about-image-wrapper {
  padding-left: 20px;
}

.page-blog__about-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.page-blog__feature-list {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.page-blog__feature-list li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
  font-size: 1em;
  color: var(--rr88-text-main);
}

.page-blog__list-icon {
  color: var(--rr88-primary-color);
  font-size: 1.2em;
  margin-right: 10px;
  line-height: 1.6;
  font-weight: bold;
}

/* How to Register Section */
.page-blog__registration-steps {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  text-align: left;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__registration-steps li {
  background-color: var(--rr88-card-bg);
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border-left: 5px solid var(--rr88-primary-color);
}

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

.page-blog__step-text {
  font-size: 1em;
  color: var(--rr88-text-secondary);
}

/* Promotions Section */
.page-blog__promotion-banner-wrapper {
  margin-top: 40px;
  margin-bottom: 40px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.page-blog__promotion-banner {
  width: 100%;
  height: auto;
  display: block;
}

/* FAQ Section */
.page-blog__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.page-blog__faq-item {
  background-color: var(--rr88-card-bg);
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.page-blog__faq-item summary {
  list-style: none;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: 600;
  color: var(--rr88-text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--rr88-divider);
  transition: background-color 0.3s ease;
}

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

.page-blog__faq-item summary:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.page-blog__faq-item[open] summary {
  background-color: rgba(255, 255, 255, 0.08);
  border-bottom-color: transparent;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
  color: var(--rr88-primary-color);
}

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

.page-blog__faq-answer {
  padding: 15px 25px 20px;
  font-size: 1em;
  color: var(--rr88-text-secondary);
  line-height: 1.6;
}

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

.page-blog__faq-answer a {
  color: var(--rr88-primary-color);
  text-decoration: none;
  font-weight: 600;
}

.page-blog__faq-answer a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__about-grid {
    grid-template-columns: 1fr;
  }

  .page-blog__about-content {
    padding-right: 0;
    text-align: center;
  }

  .page-blog__about-image-wrapper {
    padding-left: 0;
    order: -1; /* Image above text on smaller screens */
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section,
  .page-blog__latest-posts,
  .page-blog__about-rr88,
  .page-blog__how-to-register,
  .page-blog__promotions,
  .page-blog__faq-section,
  .page-blog__cta-bottom {
    padding: 40px 0;
  }

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

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

  .page-blog__sub-title {
    font-size: 1.5em;
  }

  .page-blog__intro-description,
  .page-blog__section-description {
    font-size: 1em;
  }

  .page-blog__post-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

  .page-blog__button-group {
    flex-direction: column;
    gap: 15px;
  }

  /* Mobile image, video, button, and container responsiveness */
  .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__cta-button,
  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog a[class*="button"],
  .page-blog a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper,
  .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: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

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

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

/* Specific contrast fixes for light background sections */
.page-blog__latest-posts .page-blog__section-title,
.page-blog__how-to-register .page-blog__section-title,
.page-blog__faq-section .page-blog__section-title {
  color: var(--rr88-primary-color); /* Ensure contrast on light background */
}

.page-blog__latest-posts .page-blog__section-description,
.page-blog__how-to-register .page-blog__section-description,
.page-blog__faq-section .page-blog__text-block,
.page-blog__how-to-register .page-blog__step-text {
  color: #555555; /* Darker text for better contrast on light background */
}

.page-blog__latest-posts .page-blog__card {
  background-color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-blog__latest-posts .page-blog__card-title a {
  color: #333333;
}

.page-blog__latest-posts .page-blog__card-meta,
.page-blog__latest-posts .page-blog__card-text {
  color: #666666;
}

.page-blog__faq-item summary {
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  color: #333333;
}

.page-blog__faq-item summary:hover {
  background-color: #f0f0f0;
}

.page-blog__faq-item[open] summary {
  background-color: #f5f5f5;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  color: var(--rr88-primary-color);
}

.page-blog__faq-answer {
  color: #666666;
}