/* style/blog.css */

:root {
  --page-blog-primary-color: #2F6BFF;
  --page-blog-secondary-color: #6FA3FF;
  --page-blog-text-main: #1F2D3D;
  --page-blog-text-dark: #000000;
  --page-blog-bg-light: #F4F7FB;
  --page-blog-bg-card: #FFFFFF;
  --page-blog-border-color: #D6E2FF;
  --page-blog-glow-color: #A5C4FF;
  --page-blog-button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
}

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

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

.page-blog__section-title {
  font-size: 2.5em;
  color: var(--page-blog-text-dark);
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
}

.page-blog__section-title--white {
  color: var(--page-blog-bg-card);
}

.page-blog__hero-section {
  background-color: var(--page-blog-bg-light);
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-blog__hero-section .page-blog__container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.page-blog__hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.page-blog__hero-title {
  font-size: clamp(2em, 4vw, 3.5em);
  color: var(--page-blog-primary-color);
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-blog__hero-description {
  font-size: 1.1em;
  color: var(--page-blog-text-main);
  margin-bottom: 30px;
  line-height: 1.6;
}

.page-blog__hero-image-wrapper {
  text-align: center;
}

.page-blog__hero-image {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.page-blog__btn-primary {
  background: var(--page-blog-button-gradient);
  color: var(--page-blog-bg-card);
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(47, 107, 255, 0.4);
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
  box-shadow: 0 6px 20px rgba(47, 107, 255, 0.6);
  transform: translateY(-2px);
}

.page-blog__btn-secondary {
  background-color: var(--page-blog-bg-card);
  color: var(--page-blog-primary-color);
  border: 2px solid var(--page-blog-primary-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-blog__btn-secondary:hover {
  background-color: var(--page-blog-primary-color);
  color: var(--page-blog-bg-card);
  box-shadow: 0 6px 20px rgba(47, 107, 255, 0.3);
  transform: translateY(-2px);
}

.page-blog__blog-list-section {
  padding: 60px 0;
  background-color: var(--page-blog-bg-light);
}

.page-blog__blog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

.page-blog__blog-card {
  background-color: var(--page-blog-bg-card);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

.page-blog__blog-card-content {
  padding: 20px;
}

.page-blog__blog-card-title {
  font-size: 1.3em;
  color: var(--page-blog-text-dark);
  margin-bottom: 10px;
  font-weight: 700;
  line-height: 1.4;
}

.page-blog__blog-card-excerpt {
  font-size: 0.95em;
  color: var(--page-blog-text-main);
  margin-bottom: 15px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Limit to 3 lines */
  -webkit-box-orient: vertical;
}

.page-blog__blog-card-date {
  font-size: 0.85em;
  color: #888;
  display: block;
  margin-bottom: 15px;
}

.page-blog__read-more {
  display: flex;
  align-items: center;
  color: var(--page-blog-primary-color);
  font-weight: 600;
}

.page-blog__icon-arrow-right {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.page-blog__blog-card:hover .page-blog__icon-arrow-right {
  transform: translateX(5px);
}

.page-blog__view-all-wrapper {
  text-align: center;
}

.page-blog__categories-section {
  background-color: var(--page-blog-primary-color);
  padding: 60px 0;
}

.page-blog__categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.page-blog__category-card {
  background-color: var(--page-blog-bg-card);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: var(--page-blog-text-dark);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-blog__category-icon {
  font-size: 2.5em;
  margin-bottom: 15px;
  display: block;
}

.page-blog__category-title {
  font-size: 1.1em;
  font-weight: 600;
}

.page-blog__about-section {
  padding: 80px 0;
  background-color: var(--page-blog-bg-light);
}

.page-blog__about-content {
  display: flex;
  align-items: center;
  gap: 40px;
}

.page-blog__about-text {
  flex: 1;
}

.page-blog__about-text p {
  margin-bottom: 20px;
  font-size: 1.05em;
  line-height: 1.7;
  color: var(--page-blog-text-main);
}

.page-blog__about-image-wrapper {
  flex: 1;
  text-align: center;
}

.page-blog__about-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-blog__cta-section {
  background-color: var(--page-blog-primary-color);
  padding: 80px 0;
  text-align: center;
}

.page-blog__cta-description {
  font-size: 1.2em;
  color: var(--page-blog-bg-card);
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

/* --- General Image & Button Responsive Styles --- */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-blog__section,
.page-blog__card,
.page-blog__container,
.page-blog__cta-buttons,
.page-blog__button-group,
.page-blog__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* --- Mobile Responsive Styles --- */
@media (max-width: 1024px) {
  .page-blog__blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-blog__categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-blog__about-content {
    flex-direction: column;
    text-align: center;
  }
  .page-blog__about-image-wrapper {
    order: -1;
  }
}

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

  .page-blog__container {
    padding: 15px;
  }

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

  /* Hero Section */
  .page-blog__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
  }
  .page-blog__hero-title {
    font-size: 2.2em;
  }
  .page-blog__hero-description {
    font-size: 1em;
  }
  .page-blog__hero-section .page-blog__container {
    gap: 20px;
  }

  /* Blog List Section */
  .page-blog__blog-list-section {
    padding: 40px 0;
  }
  .page-blog__blog-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-blog__blog-card-image {
    height: 180px;
  }
  .page-blog__blog-card-title {
    font-size: 1.2em;
  }
  .page-blog__blog-card-excerpt {
    font-size: 0.9em;
  }

  /* Categories Section */
  .page-blog__categories-section {
    padding: 40px 0;
  }
  .page-blog__categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  .page-blog__category-icon {
    font-size: 2em;
    margin-bottom: 10px;
  }
  .page-blog__category-title {
    font-size: 1em;
  }

  /* About Section */
  .page-blog__about-section {
    padding: 50px 0;
  }
  .page-blog__about-content {
    gap: 30px;
  }
  .page-blog__about-text p {
    font-size: 0.95em;
  }

  /* CTA Section */
  .page-blog__cta-section {
    padding: 50px 0;
  }
  .page-blog__cta-description {
    font-size: 1.1em;
    margin-bottom: 30px;
  }
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px !important;
    font-size: 0.95em;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* General Image & Button Mobile Adaptations */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .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;
  }
}