/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #F3F8FF; /* Text Main */
  background-color: transparent; /* Body background is handled by shared.css var(--deep-navy) */
}

.page-blog__article-wrap {
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

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

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 600px;
  overflow: hidden;
  position: relative;
  z-index: 0;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.6);
  transition: filter 0.3s ease;
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin-top: 30px;
  padding: 0 20px;
}

.page-blog__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 700;
  color: #F3F8FF; /* Text Main */
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-blog__hero-description {
  font-size: 1.1rem;
  color: #AFC4E8; /* Text Secondary */
  margin-bottom: 30px;
}

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

/* General Section Styles */
.page-blog__section {
  padding: 60px 0;
}

.page-blog__section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #F3F8FF; /* Text Main */
  text-align: center;
  margin-bottom: 20px;
}

.page-blog__section-description {
  font-size: 1.1rem;
  color: #AFC4E8; /* Text Secondary */
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px auto;
}

/* Article Card Grid */
.page-blog__articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.page-blog__article-card {
  background-color: #10233F; /* Card BG */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards in a row have same height */
  display: flex;
  flex-direction: column;
}

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

.page-blog__article-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

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

.page-blog__article-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #F3F8FF; /* Text Main */
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__article-meta {
  font-size: 0.9rem;
  color: #AFC4E8; /* Text Secondary */
  margin-bottom: 15px;
}

.page-blog__article-excerpt {
  font-size: 1rem;
  color: #AFC4E8; /* Text Secondary */
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  display: inline-block;
  color: #1D5FD1; /* Auxiliary color */
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: #2B73F6;
}

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

/* Categories Section */
.page-blog__categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.page-blog__category-card {
  background-color: #10233F; /* Card BG */
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  text-decoration: none;
  color: #F3F8FF;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-blog__category-card:hover {
  background-color: rgba(16, 35, 63, 0.8);
  transform: translateY(-5px);
}

.page-blog__category-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #F3F8FF; /* Text Main */
  margin-bottom: 10px;
}

.page-blog__category-desc {
  font-size: 0.95rem;
  color: #AFC4E8; /* Text Secondary */
}

/* Promo CTA Section */
.page-blog__promo-cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #113B7A, #08162B);
  text-align: center;
}

.page-blog__promo-box {
  background-color: rgba(16, 35, 63, 0.8); /* Card BG with transparency */
  padding: 50px;
  border-radius: 15px;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-blog__promo-cta-section .page-blog__section-title {
  color: #F3F8FF;
  margin-bottom: 25px;
}

.page-blog__promo-cta-section .page-blog__section-description {
  color: #AFC4E8;
  margin-bottom: 40px;
}

/* About Blog Section */
.page-blog__about-blog-section {
  padding-bottom: 80px;
}

.page-blog__about-blog-section .page-blog__section-title {
  margin-bottom: 40px;
}

.page-blog__sub-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1D5FD1; /* Auxiliary color */
  margin-top: 40px;
  margin-bottom: 15px;
}

.page-blog__text-block {
  font-size: 1rem;
  color: #AFC4E8; /* Text Secondary */
  margin-bottom: 20px;
  line-height: 1.7;
}

.page-blog__list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 20px;
}

.page-blog__list-item {
  font-size: 1rem;
  color: #AFC4E8; /* Text Secondary */
  margin-bottom: 10px;
  position: relative;
  padding-left: 25px;
}

.page-blog__list-item::before {
  content: '✔';
  color: #F2C14E; /* Gold */
  position: absolute;
  left: 0;
  top: 0;
  font-weight: bold;
}

/* Buttons */
.page-blog__btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  color: #F3F8FF; /* Text Main */
  border: none;
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #1144A6 0%, #2B73F6 100%);
  box-shadow: 0 0 15px rgba(79, 168, 255, 0.6);
}

.page-blog__btn-secondary {
  background: #10233F; /* Card BG */
  color: #F3F8FF; /* Text Main */
  border: 1px solid #244D84; /* Border */
}

.page-blog__btn-secondary:hover {
  background-color: #1B3357; /* Divider */
  border-color: #4FA8FF; /* Glow */
}

.page-blog__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__article-wrap {
    padding: 0 30px;
  }

  .page-blog__main-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }

  .page-blog__section-title {
    font-size: 2rem;
  }

  .page-blog__article-image {
    height: 220px;
  }

  .page-blog__article-title {
    font-size: 1.3rem;
  }

  .page-blog__promo-box {
    padding: 40px;
  }
}

@media (max-width: 768px) {
  /* 1. Top section title + CTA */
  .page-blog__hero-section {
    padding-top: 10px !important; /* Small top padding, body handles --header-offset */
    padding-bottom: 30px;
  }

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

  .page-blog__main-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
    margin-bottom: 10px;
  }

  .page-blog__hero-description {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .page-blog__hero-cta-buttons {
    flex-direction: column;
    gap: 10px;
    padding: 0 15px;
  }

  /* 2. Single column text container */
  .page-blog__article-wrap {
    padding: 0 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  .page-blog__section-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
  }

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

  .page-blog__promo-box {
    padding: 30px;
  }

  /* 3. General images and figure */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

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

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

  /* All containers with images */
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__article-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Article card specific padding adjustment */
  .page-blog__articles-grid {
    padding: 0;
    gap: 20px;
  }

  .page-blog__article-card {
    padding: 0;
  }

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

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

  .page-blog__category-card {
    padding: 25px;
  }

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

  /* 4. Buttons and button containers */
  .page-blog__btn,
  .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;
  }

  .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;
    flex-direction: column;
  }

  /* 5. Registration tutorial & FAQ (not applicable for blog, but general content blocks) */
  .page-blog__sub-title {
    font-size: 1.5rem;
    margin-top: 30px;
  }

  .page-blog__text-block {
    font-size: 0.95rem;
  }

  .page-blog__list-item {
    font-size: 0.95rem;
  }
}