/* style/blog.css */

/* Base styles and variables */
:root {
  --hh-bet-red: #C91F17;
  --hh-bet-dark-red: #E53935;
  --hh-bet-card-bg: #D32F2F;
  --hh-bet-bg: #B71C1C;
  --hh-bet-text-main: #FFF5E1;
  --hh-bet-border: #F2B544;
  --hh-bet-glow: #FFCC66;
  --hh-bet-gold: #F4D34D;
  --hh-bet-deep-red: #7A0E0E;
  --hh-bet-button-gradient: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);

  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #ffffff;
  --bg-dark: #222222; /* A generic dark background if body is dark */
}

/* Ensure body padding for fixed header is handled by shared.css */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default to dark text for light backgrounds */
  background-color: var(--bg-light); /* Default to light background */
}

/* Adjust text color based on section background for contrast */
.page-blog__dark-bg {
  background-color: var(--hh-bet-bg);
  color: var(--hh-bet-text-main);
}

.page-blog__light-bg {
  background-color: var(--bg-light);
  color: var(--text-dark);
}

.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0 60px 0; /* Small top padding, more bottom padding */
  text-align: center;
  overflow: hidden; /* To contain the image */
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  margin-bottom: 20px; /* Space between image and content */
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-blog__hero-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--hh-bet-text-main);
  margin-bottom: 15px;
  letter-spacing: -0.5px;
}

.page-blog__hero-description {
  font-size: 1.2rem;
  color: var(--hh-bet-text-main);
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__hero-cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: var(--hh-bet-button-gradient);
  color: var(--text-light);
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__hero-cta-button:hover {
  filter: brightness(1.1);
}

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

.page-blog__section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: inherit;
}

.page-blog__section-description {
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: inherit;
}

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

.page-blog__article-card, .page-blog__category-card, .page-blog__step-card, .page-blog__article-item, .page-blog__faq-item {
  background-color: var(--hh-bet-card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--hh-bet-text-main);
  border: 1px solid var(--hh-bet-border);
}

.page-blog__article-card:hover, .page-blog__category-card:hover, .page-blog__step-card:hover, .page-blog__article-item:hover, .page-blog__faq-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-blog__article-image, .page-blog__category-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

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

.page-blog__article-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--hh-bet-text-main);
}

.page-blog__article-excerpt {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-blog__read-more {
  display: inline-block;
  color: var(--hh-bet-gold);
  font-weight: bold;
  text-decoration: none;
  align-self: flex-start;
}

.page-blog__read-more:hover {
  text-decoration: underline;
}

.page-blog__button-group {
  text-align: center;
  margin-top: 20px;
}

.page-blog__cta-button {
  display: inline-block;
  padding: 12px 25px;
  background: var(--hh-bet-button-gradient);
  color: var(--text-light);
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-blog__cta-button:hover {
  filter: brightness(1.15);
}

.page-blog__btn-primary {
  background: var(--hh-bet-button-gradient);
  color: var(--text-light);
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
  filter: brightness(1.15);
}

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

.page-blog__category-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--hh-bet-text-main);
}

.page-blog__category-text {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
}

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

.page-blog__step-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--hh-bet-text-main);
}

.page-blog__step-text {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-blog__article-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.page-blog__article-item {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.page-blog__article-item-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--hh-bet-text-main);
}

.page-blog__article-item-title a {
  color: var(--hh-bet-text-main);
  text-decoration: none;
}

.page-blog__article-item-title a:hover {
  color: var(--hh-bet-gold);
  text-decoration: underline;
}

.page-blog__article-item-text {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 15px;
  flex-grow: 1;
}

/* FAQ Section */
.page-blog__faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.page-blog__faq-item {
  background-color: var(--hh-bet-card-bg);
  border: 1px solid var(--hh-bet-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  color: var(--hh-bet-text-main);
}

.page-blog__faq-item summary {
  list-style: none; /* Hide default marker */
  cursor: pointer;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--hh-bet-text-main);
  position: relative;
}

.page-blog__faq-item summary::-webkit-details-marker {
  display: none; /* Hide marker for Webkit browsers */
}

.page-blog__faq-qtext {
  flex-grow: 1;
  padding-right: 15px;
}

.page-blog__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.3s ease;
  color: var(--hh-bet-gold);
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg); /* Plus sign rotates to become an 'x' or similar */
}

.page-blog__faq-answer {
  padding: 0 20px 18px 20px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--hh-bet-text-main);
}

.page-blog__faq-answer p {
  margin-bottom: 0;
  color: var(--hh-bet-text-main);
}

/* Final CTA Section */
.page-blog__cta-final-section {
  padding: 60px 20px;
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-blog__hero-title {
    font-size: clamp(2.5rem, 4.5vw, 3rem);
  }
  .page-blog__section-title {
    font-size: clamp(2rem, 3.5vw, 2.5rem);
  }
}

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

  /* Ensure all images are responsive */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Ensure all containers are responsive */
  .page-blog__section,
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__recent-articles-section,
  .page-blog__categories-section,
  .page-blog__popular-articles-section,
  .page-blog__guide-section,
  .page-blog__faq-section,
  .page-blog__cta-final-section,
  .page-blog__article-card,
  .page-blog__category-card,
  .page-blog__step-card,
  .page-blog__article-item,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

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

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

  .page-blog__hero-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  .page-blog__hero-description {
    font-size: 1rem;
  }

  .page-blog__hero-cta-button,
  .page-blog__cta-button,
  .page-blog__btn-primary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 15px;
  }

  .page-blog__button-group {
    flex-wrap: wrap !important;
    gap: 10px;
    display: flex;
    flex-direction: column;
  }

  .page-blog__article-grid,
  .page-blog__category-grid,
  .page-blog__steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__article-image, .page-blog__category-image {
    height: 180px;
  }

  .page-blog__article-title, .page-blog__category-title, .page-blog__step-title {
    font-size: 1.2rem;
  }

  .page-blog__faq-item summary {
    font-size: 1rem;
    padding: 15px;
  }

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