/* style/blog.css */

:root {
  --primary-color: #C61F1F;
  --secondary-color: #E53030;
  --text-main-color: #FFF1E8;
  --background-color: #140C0C;
  --card-bg-color: #2A1212;
  --gold-color: #F3C54D;
  --deep-red-color: #7E0D0D;
  --border-color: #6A1E1E;
  --button-gradient: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
}

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

.page-blog__section {
  padding: 60px 0;
  margin-bottom: 20px;
}

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

.page-blog__section-title {
  font-size: 3em;
  color: var(--gold-color);
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

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

.page-blog__card {
  background-color: var(--card-bg-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  color: var(--text-main-color);
}

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

.page-blog__hero-image {
  width: 100%;
  height: 600px;
  object-fit: cover; /* Desktop: cover to fill space */
  display: block;
}

.page-blog__hero-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5); /* Dark overlay for text readability */
}

.page-blog__main-title {
  font-size: 3.5em;
  color: var(--gold-color);
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.2;
  max-width: 900px;
}

.page-blog__hero-description {
  font-size: 1.3em;
  color: var(--text-main-color);
  margin-bottom: 30px;
  max-width: 800px;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  max-width: 100%; /* Ensure buttons don't overflow */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: var(--button-gradient);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 176, 74, 0.4);
}

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

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

/* Latest Articles Section */
.page-blog__latest-articles {
  background-color: var(--background-color);
}

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

.page-blog__article-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.page-blog__card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

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

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

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

.page-blog__card-title a:hover {
  color: var(--button-gradient);
}

.page-blog__card-meta {
  font-size: 0.9em;
  color: #aaa;
  margin-bottom: 15px;
}

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

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

.page-blog__read-more:hover {
  color: var(--button-gradient);
}

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

/* Categories Section */
.page-blog__categories-section {
  background-color: var(--deep-red-color);
}

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

.page-blog__category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-decoration: none;
  color: var(--text-main-color);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.page-blog__category-item:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.1);
}

.page-blog__category-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 15px;
}

.page-blog__category-name {
  font-size: 1.2em;
  font-weight: bold;
}

/* FAQ Section */
.page-blog__faq-section {
  background-color: var(--background-color);
}

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

.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  overflow: hidden;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.2em;
  font-weight: bold;
  color: var(--gold-color);
  cursor: pointer;
  background-color: var(--card-bg-color);
  border-bottom: 1px solid var(--border-color);
  list-style: none;
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: var(--gold-color);
  margin-left: 15px;
}

.page-blog__faq-answer {
  padding: 20px;
  background-color: rgba(42, 18, 18, 0.8); /* Slightly lighter card background for answer */
  color: var(--text-main-color);
  font-size: 1em;
}

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

.page-blog__faq-item[open] .page-blog__faq-question {
  border-bottom: none;
}

/* Bottom CTA Section */
.page-blog__cta-bottom-section {
  background-color: var(--deep-red-color);
  text-align: center;
}

.page-blog__cta-bottom-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Responsive Styles */

/* Tablet/Mobile (max-width: 1024px) */
@media (max-width: 1024px) {
  .page-blog__section-title {
    font-size: 2.5em;
  }

  .page-blog__hero-content {
    padding: 15px;
  }

  .page-blog__main-title {
    font-size: 3em;
  }

  .page-blog__hero-description {
    font-size: 1.1em;
  }

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

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

  .page-blog__category-icon {
    width: 60px;
    height: 60px;
  }

  .page-blog__category-name {
    font-size: 1.1em;
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-blog__container {
    padding: 0 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__section {
    padding: 30px 0;
  }

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

  .page-blog__section-description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  /* Hero Section Mobile */
  .page-blog__hero-section {
    padding-top: 10px !important; /* Small top padding, body handles header offset */
  }

  .page-blog__hero-image {
    height: 300px; /* Adjust height for mobile */
    object-fit: contain; /* Mobile: contain to prevent cropping important parts */
    aspect-ratio: unset; /* Remove fixed aspect ratio */
    max-height: none;
  }

  .page-blog__hero-content {
    padding: 15px;
    position: relative; /* Make content flow below image on mobile */
    background: none; /* No dark overlay, text is below image */
    height: auto;
    justify-content: flex-start;
    top: auto;
    left: auto;
    transform: none;
  }
  
  .page-blog__hero-section > .page-blog__hero-image {
    order: 1;
  }

  .page-blog__hero-section > .page-blog__hero-content {
    order: 2;
    padding-top: 20px;
  }

  .page-blog__main-title {
    font-size: 2em;
    margin-bottom: 10px;
  }

  .page-blog__hero-description {
    font-size: 0.9em;
    margin-bottom: 20px;
  }

  /* Buttons Mobile */
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 10px;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 15px;
    box-sizing: border-box;
  }

  .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;
  }

  /* Article Grid Mobile */
  .page-blog__article-grid {
    grid-template-columns: 1fr;
  }

  .page-blog__article-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

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

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

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

  /* Categories Grid Mobile */
  .page-blog__category-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
  }

  .page-blog__category-item {
    padding: 15px;
  }

  .page-blog__category-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
  }

  .page-blog__category-name {
    font-size: 1em;
  }

  /* FAQ Section Mobile */
  .page-blog__faq-question {
    font-size: 1.1em;
    padding: 15px;
  }

  .page-blog__faq-answer {
    padding: 15px;
    font-size: 0.95em;
  }

  /* General Image Responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
  }

  .page-blog__section,
  .page-blog__card,
  .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}