/* style/blog.css */

/* Base styles for page-blog */
.page-blog {
  font-family: 'Arial', sans-serif;
  color: #ffffff; /* Default text color for dark body background */
  line-height: 1.6;
  background-color: transparent; /* Body background from shared.css */
}

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

.page-blog__dark-bg {
  background-color: #0a0a0a;
  color: #ffffff;
}

.page-blog__light-bg {
  background-color: #1a1a1a; /* Slightly lighter dark for contrast */
  color: #ffffff;
}

.page-blog__section-title {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #26A9E0;
  line-height: 1.2;
}

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

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.3s ease;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

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

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

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

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

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit height for hero image */
  overflow: hidden;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.7); /* Slightly dim the image for text readability */
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  text-align: center;
  padding: 30px 20px;
  margin-top: -150px; /* Overlap slightly for visual flow */
  background: rgba(0, 0, 0, 0.6); /* Semi-transparent dark background for text */
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.page-blog__hero-title {
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 20px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.page-blog__hero-description {
  font-size: 19px;
  color: #f0f0f0;
  margin-bottom: 30px;
}

.page-blog__hero-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 80px 0;
}

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

.page-blog__post-card {
  background-color: #1e1e1e;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.page-blog__post-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

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

.page-blog__post-content {
  padding: 20px;
}

.page-blog__post-title {
  font-size: 22px;
  font-weight: 700;
  color: #26A9E0;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__post-excerpt {
  font-size: 16px;
  color: #cccccc;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-blog__post-date {
  font-size: 14px;
  color: #888888;
}

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

/* Categories Section */
.page-blog__categories {
  padding: 80px 0;
}

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

.page-blog__category-card {
  background-color: #1e1e1e;
  border-radius: 10px;
  text-align: center;
  padding: 20px;
  text-decoration: none;
  color: #ffffff;
  transition: transform 0.3s ease, background-color 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  background-color: #2a2a2a;
}

.page-blog__category-image {
  width: 100%;
  height: 150px; /* Fixed height for category images */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  display: block;
}

.page-blog__category-title {
  font-size: 18px;
  font-weight: 600;
  color: #26A9E0;
}

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  text-align: center;
}

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

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
}

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

.page-blog__faq-item {
  background-color: #1e1e1e;
  margin-bottom: 15px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-blog__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 18px;
  font-weight: 600;
  color: #26A9E0;
  cursor: pointer;
  list-style: none;
  transition: background-color 0.3s ease;
}

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

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

.page-blog__faq-qtext {
  flex-grow: 1;
}

.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin-left: 15px;
}

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 16px;
  color: #cccccc;
}

/* About Us Summary Section */
.page-blog__about-us-summary {
  padding: 80px 0;
  text-align: center;
}

.page-blog__view-more-button-container {
  margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    margin-top: -100px;
    padding: 25px 15px;
  }

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

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

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding: 40px 0;
    padding-top: 10px !important; /* body handles header offset */
  }

  .page-blog__hero-content {
    margin-top: -80px;
    padding: 20px 15px;
  }

  .page-blog__hero-title {
    font-size: clamp(28px, 6vw, 40px);
  }

  .page-blog__hero-description {
    font-size: 17px;
  }

  .page-blog__hero-cta-buttons,
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog__btn-login,
  .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__hero-cta-buttons,
  .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;
    flex-wrap: wrap !important;
    gap: 10px;
    overflow: hidden !important;
  }

  .page-blog__section-title {
    font-size: clamp(24px, 5vw, 36px);
  }

  .page-blog__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-blog__posts-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

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

  .page-blog__post-title {
    font-size: 20px;
  }

  .page-blog__post-excerpt {
    font-size: 15px;
  }

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

  .page-blog__category-image {
    height: 100px;
  }

  .page-blog__category-title {
    font-size: 16px;
  }

  .page-blog__faq-item summary {
    padding: 15px 20px;
    font-size: 16px;
  }

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

  /* Mobile image specific rules */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__latest-posts,
  .page-blog__categories,
  .page-blog__cta-section,
  .page-blog__faq-section,
  .page-blog__about-us-summary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Prevent horizontal scroll */
  }

  .page-blog__hero-image-wrapper {
    max-height: 400px;
  }
}

@media (max-width: 480px) {
  .page-blog__hero-content {
    margin-top: -60px;
  }

  .page-blog__hero-title {
    font-size: clamp(24px, 7vw, 36px);
  }

  .page-blog__hero-description {
    font-size: 15px;
  }

  .page-blog__posts-grid {
    gap: 20px;
  }

  .page-blog__categories-grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-blog__category-image {
    height: 80px;
  }

  .page-blog__category-title {
    font-size: 15px;
  }
}