/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main); /* Using custom color */
  background-color: var(--deep-navy); /* Body background */
}

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

.page-blog__section-title {
  font-size: 2.5em;
  color: var(--gold); /* Using custom color */
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
}

/* Hero Section */
.page-blog__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 20px 60px; /* Small top padding, not --header-offset */
  text-align: center;
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--divider);
}

.page-blog__hero-content {
  max-width: 800px;
  margin-bottom: 30px;
}

.page-blog__main-title {
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-size: clamp(2.2em, 4vw, 3.5em);
}

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

.page-blog__cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%); /* Custom button color */
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 900px;
}

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

/* Latest Posts Section */
.page-blog__latest-posts {
  background-color: var(--deep-navy);
  border-bottom: 1px solid var(--divider);
}

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

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

.page-blog__post-card:hover {
  transform: translateY(-5px);
}

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

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

.page-blog__post-title {
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
  color: var(--text-main);
}

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

.page-blog__post-title a:hover {
  color: var(--gold);
}

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

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

.page-blog__read-more-button {
  display: inline-block;
  padding: 10px 20px;
  background: var(--glow);
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.95em;
  font-weight: 500;
  align-self: flex-start;
  transition: background-color 0.3s ease;
}

.page-blog__read-more-button:hover {
  background: #3a8ee0;
}

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

.page-blog__view-all-button {
  display: inline-block;
  padding: 12px 25px;
  background: var(--gold);
  color: var(--deep-navy);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1em;
  transition: background-color 0.3s ease;
}

.page-blog__view-all-button:hover {
  background: #e0b43f;
}

/* Categories Section */
.page-blog__categories {
  background-color: var(--deep-navy);
  border-bottom: 1px solid var(--divider);
}

.page-blog__category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.page-blog__category-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

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

.page-blog__category-icon {
  width: 100%;
  max-width: 120px;
  height: auto;
  margin-bottom: 15px;
  border-radius: 8px;
}

.page-blog__category-title {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

/* FAQ Section */
.page-blog__faq-section {
  background-color: var(--deep-navy);
  padding-bottom: 60px;
}

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

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg);
}

details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: var(--text-main);
}

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

details.page-blog__faq-item summary.page-blog__faq-question:hover {
  background: rgba(var(--text-main-rgb), 0.05);
}

.page-blog__faq-qtext {
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-main);
}

.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--gold);
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 20px 20px;
  background: rgba(var(--deep-navy-rgb), 0.5); /* Slightly lighter background for answer */
  border-radius: 0 0 8px 8px;
  color: var(--text-secondary);
}

.page-blog__faq-answer p {
  margin: 0;
  color: var(--text-secondary);
}

/* CTA Section */
.page-blog__cta-section {
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%); /* Using brand colors for gradient */
  text-align: center;
  padding: 60px 20px;
  border-top: 1px solid var(--divider);
}

.page-blog__cta-section .page-blog__section-title {
  color: #fff;
  margin-bottom: 25px;
}

.page-blog__cta-description {
  font-size: 1.2em;
  color: #f0f8ff;
  max-width: 800px;
  margin: 0 auto 40px;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure responsiveness */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: var(--button-gradient); /* Custom button color */
  color: #fff;
  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: #fff;
  color: var(--primary-color); /* Using main brand color */
  border: 2px solid var(--primary-color);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

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

/* Global image responsiveness for content area */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive styles */
@media (max-width: 1023px) {
  /* No game trial specific overrides for blog page as it's not the homepage */
}

@media (min-width: 1024px) {
  .page-blog__hero-section {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 40px 60px;
  }
  .page-blog__hero-content {
    margin-right: 40px;
    margin-bottom: 0;
  }
  .page-blog__main-title {
    font-size: 3.5em;
  }
  .page-blog__hero-image-wrapper {
    width: 50%;
    max-width: 700px;
  }
  .page-blog__section-title {
    font-size: 3em;
  }
  .page-blog__post-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .page-blog__category-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 768px) {
  .page-blog__section {
    padding: 30px 15px;
  }
  .page-blog__section-title {
    font-size: 2em;
    margin-bottom: 30px;
  }

  /* Hero Section */
  .page-blog__hero-section {
    padding: 10px 15px 40px;
  }
  .page-blog__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em);
  }
  .page-blog__description {
    font-size: 1em;
  }
  .page-blog__cta-button {
    padding: 12px 25px;
    font-size: 1em;
  }

  /* Latest Posts */
  .page-blog__post-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-blog__post-card {
    flex-direction: column;
  }
  .page-blog__post-image {
    height: 180px;
  }
  .page-blog__post-title {
    font-size: 1.2em;
  }
  .page-blog__post-excerpt {
    font-size: 0.95em;
  }
  .page-blog__read-more-button {
    padding: 8px 15px;
    font-size: 0.9em;
  }
  .page-blog__view-all-button {
    padding: 10px 20px;
    font-size: 1em;
  }

  /* Categories */
  .page-blog__category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  .page-blog__category-card {
    padding: 15px;
  }
  .page-blog__category-icon {
    max-width: 80px;
    margin-bottom: 10px;
  }
  .page-blog__category-title {
    font-size: 1em;
  }

  /* FAQ */
  details.page-blog__faq-item summary.page-blog__faq-question {
    padding: 15px;
  }
  .page-blog__faq-qtext {
    font-size: 1em;
  }
  .page-blog__faq-toggle {
    font-size: 20px;
    width: 24px;
  }
  details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 15px 15px;
  }

  /* CTA Section */
  .page-blog__cta-section {
    padding: 40px 15px;
  }
  .page-blog__cta-section .page-blog__section-title {
    font-size: 1.8em;
  }
  .page-blog__cta-description {
    font-size: 1em;
  }
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important; /* Force full width on mobile */
    max-width: 100% !important;
    padding: 12px 15px;
    font-size: 1em;
  }
  
  /* Mobile image adaptation */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-blog__section,
  .page-blog__post-card,
  .page-blog__category-card,
  .page-blog__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Additional mobile specific styles to prevent overflow */
  .page-blog__post-grid, .page-blog__category-grid {
    overflow-x: hidden;
  }
  .page-blog__post-card, .page-blog__category-card {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Custom colors from requirements */
:root {
  --primary-color: #113B7A;
  --secondary-color: #1D5FD1;
  --button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  --card-bg: #10233F;
  --text-main: #F3F8FF;
  --text-secondary: #AFC4E8;
  --border-color: #244D84;
  --glow: #4FA8FF;
  --gold: #F2C14E;
  --divider: #1B3357;
  --deep-navy: #08162B;
  /* RGB values for transparent effects */
  --text-main-rgb: 243, 248, 255;
  --deep-navy-rgb: 8, 22, 43;
}

/* Ensure body padding for fixed header is handled by shared.css */
/* The first section of the page should have a small top padding */
.page-blog__hero-section {
  padding-top: 10px; /* Small top padding, not --header-offset */
}

/* Color contrast enforcement */
/* Default text color for dark body background */
.page-blog {
  color: var(--text-main); /* Light text on dark background */
}

/* Specific elements with custom backgrounds */
.page-blog__card, .page-blog__faq-item {
  background: var(--card-bg); /* Dark background */
  color: var(--text-main); /* Light text */
}

.page-blog__card h3, .page-blog__faq-qtext {
  color: var(--text-main);
}

.page-blog__card p, .page-blog__post-meta, .page-blog__post-excerpt, .page-blog__faq-answer p {
  color: var(--text-secondary);
}

/* Buttons already have specific colors, ensuring contrast */