/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #f0f0f0; /* Light text for dark body background */
  background-color: #0d0d0d; /* Inherited from shared.css */
  padding-top: 120px; /* Adjust for fixed header */
}

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

.page-blog__section-title {
  font-size: 32px;
  color: #FFCC00; /* Gold accent color */
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Hero Banner Section */
.page-blog__hero-banner {
  background: linear-gradient(90deg, #003366, #1a4f8a);
  padding: 80px 0;
  text-align: center;
  color: #ffffff;
  margin-bottom: 60px;
}

.page-blog__hero-title {
  font-size: 48px;
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.2;
  color: #FFCC00; /* Gold for main title */
}

.page-blog__hero-description {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 30px auto;
  line-height: 1.8;
}

.page-blog__hero-button {
  display: inline-block;
  background-color: #FFCC00;
  color: #003366;
  padding: 15px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: none;
}

.page-blog__hero-button:hover {
  background-color: #e6b800;
  transform: translateY(-3px);
}

/* Featured Articles Section */
.page-blog__featured-articles {
  padding: 60px 0;
  background-color: #1a1a1a;
}

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

.page-blog__article-card {
  background-color: #2a2a2a;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #003366;
}

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

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

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

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

.page-blog__article-title {
  font-size: 22px;
  color: #FFCC00;
  margin-bottom: 10px;
  font-weight: 700;
  line-height: 1.4;
}

.page-blog__article-excerpt {
  font-size: 16px;
  color: #cccccc;
  margin-bottom: 15px;
  line-height: 1.6;
}

.page-blog__read-more {
  color: #FFCC00;
  font-weight: 600;
  text-decoration: underline;
  font-size: 15px;
}

/* Latest Articles Section */
.page-blog__latest-articles {
  padding: 60px 0;
  background-color: #0d0d0d;
}

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

.page-blog__list-item {
  background-color: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #003366;
}

.page-blog__list-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.page-blog__list-item-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.page-blog__list-item-image {
  width: 200px;
  height: 150px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.page-blog__list-item-content {
  padding: 20px;
  flex-grow: 1;
}

.page-blog__list-item-title {
  font-size: 20px;
  color: #FFCC00;
  margin-bottom: 8px;
  font-weight: 600;
  line-height: 1.3;
}

.page-blog__list-item-excerpt {
  font-size: 15px;
  color: #cccccc;
  margin-bottom: 10px;
  line-height: 1.5;
}

.page-blog__list-item-date {
  font-size: 13px;
  color: #888888;
}

.page-blog__pagination {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  gap: 10px;
}

.page-blog__pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #003366;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.page-blog__pagination-link:hover {
  background-color: #FFCC00;
  color: #003366;
}

.page-blog__pagination-link--active {
  background-color: #FFCC00;
  color: #003366;
}

/* Categories Section */
.page-blog__categories {
  padding: 60px 0;
  background-color: #1a1a1a;
}

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

.page-blog__category-card {
  background-color: #2a2a2a;
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background-color 0.3s ease;
  border: 1px solid #003366;
  text-decoration: none;
  color: inherit;
}

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

.page-blog__category-title {
  font-size: 22px;
  color: #FFCC00;
  margin-bottom: 10px;
  font-weight: 700;
}

.page-blog__category-description {
  font-size: 15px;
  color: #cccccc;
  line-height: 1.5;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
  background-color: #003366; /* Dark section background */
  color: #ffffff; /* White text for dark background */
}

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

/* FAQ container style */
.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

/* FAQ default state - answer hidden */
.page-blog__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 15px;
  opacity: 0;
  color: #cccccc;
}

/* FAQ expanded state - 🚨 Use!important and sufficiently large max-height */
.page-blog__faq-item.active .page-blog__faq-answer {
  max-height: 2000px !important; /* 🚨 Use!important ensure priority, value large enough to accommodate any content */
  padding: 20px 15px !important;
  opacity: 1;
  background: #0a427c; /* Slightly lighter blue for answer background */
  border-radius: 0 0 5px 5px;
}

/* Question style */
.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #004488;
  border: 1px solid #003366;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-blog__faq-question:hover {
  background: #0055aa;
  border-color: #004488;
}

.page-blog__faq-question:active {
  background: #0066cc;
}

/* Question title style */
.page-blog__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click events */
  color: #ffffff;
}

/* Toggle icon */
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #FFCC00;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click events */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-blog__faq-item.active .page-blog__faq-toggle {
  color: #ffffff;
  transform: rotate(45deg); /* Rotate for 'x' effect */
}

/* Call to Action Section */
.page-blog__cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #003366, #FFCC00);
  color: #ffffff;
  text-align: center;
}

.page-blog__cta-section .page-blog__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.page-blog__cta-content {
  max-width: 800px;
}

.page-blog__cta-title {
  font-size: 38px;
  color: #ffffff;
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.3;
}

.page-blog__cta-description {
  font-size: 18px;
  margin-bottom: 30px;
  line-height: 1.7;
  color: #f0f0f0;
}

.page-blog__cta-button {
  display: inline-block;
  background-color: #003366;
  color: #FFCC00;
  padding: 15px 35px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: background-color 0.3s ease, transform 0.3s ease, color 0.3s ease;
  margin: 0 10px;
  border: 2px solid #FFCC00;
}

.page-blog__cta-button:hover {
  background-color: #FFCC00;
  color: #003366;
  transform: translateY(-3px);
}

.page-blog__cta-button--secondary {
  background-color: transparent;
  border: 2px solid #ffffff;
  color: #ffffff;
}

.page-blog__cta-button--secondary:hover {
  background-color: #ffffff;
  color: #003366;
}

.page-blog__cta-image-wrapper {
  width: 100%;
  max-width: 600px;
  margin-top: 30px;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__hero-title {
    font-size: 40px;
  }
  .page-blog__articles-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-blog__list-item-link {
    flex-direction: column;
    align-items: flex-start;
  }
  .page-blog__list-item-image {
    width: 100%;
    height: 200px;
    border-radius: 8px 8px 0 0;
  }
  .page-blog__list-item-content {
    padding-top: 15px;
  }
  .page-blog__cta-title {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .page-blog {
    padding-top: 100px; /* Adjust for mobile fixed header */
    font-size: 16px;
    line-height: 1.6;
  }
  .page-blog__container {
    padding: 0 15px;
  }
  .page-blog__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }
  .page-blog__hero-banner {
    padding: 60px 0;
  }
  .page-blog__hero-title {
    font-size: 32px;
  }
  .page-blog__hero-description {
    font-size: 16px;
  }
  .page-blog__hero-button {
    padding: 12px 25px;
    font-size: 16px;
  }
  .page-blog__featured-articles, .page-blog__latest-articles, .page-blog__categories, .page-blog__faq-section, .page-blog__cta-section {
    padding: 40px 0;
  }
  .page-blog__articles-grid {
    grid-template-columns: 1fr;
  }
  .page-blog__list-item-image {
    width: 100% !important;
    max-width: 100% !important;
    height: 180px !important;
  }
  .page-blog__list-item-content {
    padding: 15px;
  }
  .page-blog__list-item-title {
    font-size: 18px;
  }
  .page-blog__categories-grid {
    grid-template-columns: 1fr;
  }
  .page-blog__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  .page-blog__faq-question h3 {
    font-size: 16px;
    width: calc(100% - 40px);
  }
  .page-blog__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  .page-blog__faq-item.active .page-blog__faq-answer {
    padding: 15px !important;
  }
  .page-blog__cta-title {
    font-size: 28px;
  }
  .page-blog__cta-description {
    font-size: 16px;
  }
  .page-blog__cta-button {
    margin: 10px 0;
    width: 100%;
  }
  .page-blog__cta-section .page-blog__container {
    flex-direction: column;
  }
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .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;
  }
}

@media (max-width: 480px) {
  .page-blog__hero-title {
    font-size: 28px;
  }
  .page-blog__section-title {
    font-size: 24px;
  }
  .page-blog__article-title {
    font-size: 18px;
  }
  .page-blog__list-item-title {
    font-size: 16px;
  }
  .page-blog__cta-title {
    font-size: 24px;
  }
}