/* style/blog.css */

/* --- General Styling --- */
.page-blog {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #FFF5E1; /* Text Main */
    background-color: var(--body-bg-color); /* Inherit from shared.css */
}

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

.page-blog__section-title {
    font-size: 2.5em;
    font-weight: bold;
    color: #F4D34D; /* Gold */
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
    line-height: 1.2;
}

/* --- Hero Section --- */
.page-blog__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background: linear-gradient(180deg, #C91F17 0%, #E53935 100%); /* Brand colors for hero background */
    overflow: hidden; /* Ensure no image overflow */
}

.page-blog__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page-blog__hero-image {
    width: 100%;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
}

.page-blog__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
    border-radius: 12px;
}

.page-blog__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    color: #FFF5E1;
}

.page-blog__hero-content h1 {
    font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size */
    font-weight: 700;
    margin-bottom: 20px;
    color: #F4D34D; /* Gold */
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.page-blog__hero-content p {
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto 30px auto;
    color: #FFF5E1;
}

.page-blog__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button custom color */
    color: #7A0E0E; /* Deep Red for contrast on gold button */
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid #F2B544; /* Border custom color */
}

.page-blog__cta-button:hover {
    background: linear-gradient(180deg, #E6B800 0%, #FFD86A 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* --- Latest Posts Section --- */
.page-blog__latest-posts-section {
    padding: 60px 0;
    background-color: #B71C1C; /* Background custom color */
    color: #FFF5E1;
}

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

.page-blog__post-card {
    background-color: #D32F2F; /* Card BG custom color */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #7A0E0E; /* Deep Red border for contrast */
}

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

.page-blog__post-image-wrapper {
    width: 100%;
    height: 220px; /* Fixed height for image consistency */
    overflow: hidden;
}

.page-blog__post-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.page-blog__post-card:hover .page-blog__post-image-wrapper img {
    transform: scale(1.05);
}

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

.page-blog__post-title {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-blog__post-title a {
    color: #F4D34D; /* Gold */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
    color: #FFCC66; /* Glow */
}

.page-blog__post-meta {
    font-size: 0.9em;
    color: rgba(255, 245, 225, 0.7); /* Lighter Text Main */
    margin-bottom: 15px;
}

.page-blog__post-excerpt {
    font-size: 1em;
    color: #FFF5E1;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-blog__read-more-button {
    display: inline-block;
    padding: 10px 20px;
    background: #E53935; /* Auxiliary color */
    color: #FFF5E1;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.95em;
    font-weight: 500;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.page-blog__read-more-button:hover {
    background-color: #C91F17; /* Primary color */
}

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

.page-blog__view-all-button {
    display: inline-block;
    padding: 12px 30px;
    background: #F4D34D; /* Gold */
    color: #7A0E0E; /* Deep Red */
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid #F2B544; /* Border custom color */
}

.page-blog__view-all-button:hover {
    background: #FFCC66; /* Glow */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* --- About Blog Section --- */
.page-blog__about-blog-section {
    padding: 60px 0;
    background-color: #7A0E0E; /* Deep Red */
    color: #FFF5E1;
    text-align: center;
}

.page-blog__about-blog-section .page-blog__section-title {
    color: #F4D34D; /* Gold */
}

.page-blog__about-text {
    font-size: 1.1em;
    max-width: 900px;
    margin: 0 auto;
    color: #FFF5E1;
}

/* --- Call to Action Section --- */
.page-blog__cta-section {
    padding: 60px 0;
    text-align: center;
    background-color: #C91F17; /* Primary color */
    color: #FFF5E1;
}

.page-blog__cta-section.page-blog__light-bg {
    background-color: #B71C1C; /* Background custom color for light bg version */
}
.page-blog__cta-section.page-blog__dark-bg {
    background-color: #7A0E0E; /* Deep Red custom color for dark bg version */
}

.page-blog__cta-title {
    font-size: clamp(1.8em, 3.5vw, 2.8em);
    font-weight: bold;
    color: #F4D34D; /* Gold */
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-blog__cta-description {
    font-size: 1.1em;
    max-width: 700px;
    margin: 0 auto 30px auto;
    color: #FFF5E1;
}

.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Ensure buttons wrap on small screens */
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button custom color */
    color: #7A0E0E; /* Deep Red for contrast */
    border: 2px solid #F2B544; /* Border custom color */
}

.page-blog__btn-primary:hover {
    background: linear-gradient(180deg, #E6B800 0%, #FFD86A 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__btn-secondary {
    background: #E53935; /* Auxiliary color */
    color: #FFF5E1;
    border: 2px solid #C91F17; /* Primary color border */
}

.page-blog__btn-secondary:hover {
    background: #C91F17; /* Primary color */
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* --- FAQ Section --- */
.page-blog__faq-section {
    padding: 60px 0;
    background-color: #C91F17; /* Primary color */
    color: #FFF5E1;
}

.page-blog__faq-section.page-blog__dark-bg {
    background-color: #7A0E0E; /* Deep Red for dark bg version */
}
.page-blog__faq-section.page-blog__light-bg {
    background-color: #B71C1C; /* Background custom color for light bg version */
}

.page-blog__faq-section .page-blog__section-title {
    color: #F4D34D; /* Gold */
}

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

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid #E53935; /* Auxiliary color border */
  overflow: hidden;
  background: #D32F2F; /* Card BG custom color */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: #F4D34D; /* Gold */
  font-weight: 600;
  font-size: 1.1em;
}
details.page-blog__faq-item summary.page-blog__faq-question::-webkit-details-marker {
  display: none;
}
details.page-blog__faq-item summary.page-blog__faq-question:hover {
  background: #E53935; /* Auxiliary color on hover */
  color: #FFF5E1;
}
.page-blog__faq-qtext {
  flex: 1;
  line-height: 1.5;
  text-align: left;
}
.page-blog__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: #F4D34D; /* Gold */
  flex-shrink: 0;
  margin-left: 20px;
  width: 30px;
  text-align: center;
  transition: transform 0.3s ease, color 0.3s ease;
}
details.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(45deg);
    color: #FFF5E1;
}
details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 25px 25px;
  background: #B71C1C; /* Background custom color */
  border-radius: 0 0 10px 10px;
  color: #FFF5E1;
  font-size: 1em;
}
details.page-blog__faq-item .page-blog__faq-answer p {
    margin: 0;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-blog__section-title {
        font-size: 2em;
    }
    .page-blog__hero-content h1 {
        font-size: clamp(1.8em, 5vw, 3em);
    }
    .page-blog__hero-content p {
        font-size: 1em;
    }
    .page-blog__posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    .page-blog__post-image-wrapper {
        height: 180px;
    }
    .page-blog__post-title {
        font-size: 1.3em;
    }
    .page-blog__cta-title {
        font-size: clamp(1.6em, 4vw, 2.5em);
    }
}

@media (max-width: 768px) {
    .page-blog {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-blog__hero-section {
        padding-top: 10px !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-blog__hero-image img {
        border-radius: 8px;
    }
    .page-blog__cta-button {
        padding: 12px 30px;
        font-size: 1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-blog__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-blog__posts-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .page-blog__post-image-wrapper {
        height: 200px;
    }
    .page-blog__post-card {
        margin: 0 auto;
        max-width: 400px;
    }
    .page-blog__post-content {
        padding: 20px;
    }
    .page-blog__post-title {
        font-size: 1.2em;
    }
    .page-blog__post-excerpt {
        font-size: 0.95em;
    }
    .page-blog__read-more-button {
        padding: 8px 18px;
        font-size: 0.9em;
    }
    .page-blog__view-all-button {
        padding: 10px 25px;
        font-size: 1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-blog__cta-section {
        padding: 40px 15px;
    }
    .page-blog__cta-title {
        font-size: 1.6em;
    }
    .page-blog__cta-description {
        font-size: 1em;
    }
    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }
    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        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__faq-section {
        padding: 40px 15px;
    }
    details.page-blog__faq-item summary.page-blog__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }
    .page-blog__faq-toggle {
        font-size: 24px;
        width: 25px;
        margin-left: 15px;
    }
    details.page-blog__faq-item .page-blog__faq-answer {
        padding: 0 20px 20px;
    }

    /* Mobile image responsiveness */
    .page-blog img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
    }
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__hero-container,
    .page-blog__hero-image,
    .page-blog__hero-content,
    .page-blog__posts-grid,
    .page-blog__post-card,
    .page-blog__about-blog-section,
    .page-blog__faq-list {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
    }
    .page-blog__latest-posts-section,
    .page-blog__about-blog-section,
    .page-blog__cta-section,
    .page-blog__faq-section {
        padding-left: 0;
        padding-right: 0;
    }
}