/* Base styles for the blog page */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #FFF5E1; /* Text Main */
    background: #B71C1C; /* Background */
}

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

/* Hero Section */
.page-blog__hero-section {
    padding-top: 10px; /* Small top padding, relying on shared.css for body padding-top */
    margin-bottom: 40px;
    background: #B71C1C; /* Background */
    display: flex;
    flex-direction: column; /* Ensure image is above text */
    align-items: center;
    text-align: center;
}

.page-blog__hero-image {
    width: 100%;
    max-width: 1920px; /* Ensure it doesn't stretch too wide */
    overflow: hidden;
    margin-bottom: 20px;
}

.page-blog__hero-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Default for desktop */
}

.page-blog__hero-content {
    max-width: 900px;
    padding: 0 20px;
}

.page-blog__hero-title {
    font-size: 3.2em; /* Using em for relative sizing */
    font-weight: bold;
    color: #FFF5E1; /* Text Main */
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.page-blog__hero-description {
    font-size: 1.2em;
    color: #FFF5E1; /* Text Main */
    margin-bottom: 30px;
    opacity: 0.9;
}

.page-blog__hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    max-width: 100%; /* Ensure buttons are responsive */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Custom Button Color */
    color: #7A0E0E; /* Deep Red for contrast */
    border: none;
    box-shadow: 0 4px 15px rgba(255, 216, 106, 0.4);
}

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

.page-blog__btn-secondary {
    background: transparent;
    color: #FFD86A; /* Gold */
    border: 2px solid #FFD86A; /* Gold */
    box-shadow: 0 4px 15px rgba(255, 216, 106, 0.2);
}

.page-blog__btn-secondary:hover {
    background: rgba(255, 216, 106, 0.1);
    color: #FFF5E1; /* Text Main */
    border-color: #FFF5E1; /* Text Main */
    box-shadow: 0 6px 20px rgba(255, 216, 106, 0.4);
    transform: translateY(-2px);
}

/* Section titles and descriptions */
.page-blog__section-title {
    font-size: 2.5em;
    color: #FFD86A; /* Gold */
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.page-blog__section-description {
    font-size: 1.1em;
    color: #FFF5E1; /* Text Main */
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

/* Latest Articles Section */
.page-blog__latest-articles {
    padding: 60px 0;
    background: #B71C1C; /* Background */
    border-bottom: 1px solid rgba(255, 216, 106, 0.1);
    overflow-x: hidden; /* Prevent horizontal scroll on mobile */
}

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

.page-blog__article-card {
    background: #D32F2F; /* Card BG */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-blog__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

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

.page-blog__article-thumbnail {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    border-bottom: 2px solid #F2B544; /* Border */
}

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

.page-blog__article-title {
    font-size: 1.4em;
    color: #FFD86A; /* Gold */
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-blog__article-excerpt {
    font-size: 0.95em;
    color: #FFF5E1; /* Text Main */
    margin-bottom: 15px;
    flex-grow: 1;
    opacity: 0.85;
}

.page-blog__article-date {
    font-size: 0.85em;
    color: #F2B544; /* Border */
    opacity: 0.7;
    display: block;
    margin-top: auto; /* Push to bottom */
}

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

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

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

.page-blog__content-wrapper {
    display: flex;
    gap: 40px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.page-blog__text-block {
    flex: 1;
    font-size: 1.1em;
    line-height: 1.7;
}

.page-blog__text-block p {
    margin-bottom: 20px;
}

.page-blog__image-block {
    flex: 1;
    min-width: 300px; /* Minimum width for image block */
    max-width: 50%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-blog__image-full {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 60px 0;
    background: #B71C1C; /* Background */
}

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

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

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #F2B544; /* Border */
  overflow: hidden;
  background: #D32F2F; /* Card BG */
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
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: #FFF5E1; /* Text Main */
  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: rgba(255, 216, 106, 0.1);
}
.page-blog__faq-qtext {
  flex: 1;
  font-size: 1em; /* Adjusted to fit within summary font size */
  line-height: 1.5;
  text-align: left;
  color: #FFF5E1; /* Text Main */
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #FFD86A; /* Gold */
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 25px 20px;
  background: #D32F2F; /* Card BG */
  border-top: 1px solid rgba(255, 216, 106, 0.1);
  color: #FFF5E1; /* Text Main */
  border-radius: 0 0 8px 8px;
}
.page-blog__faq-answer p {
    margin: 0;
    padding: 0;
    font-size: 0.95em;
    opacity: 0.85;
}


/* CTA Section */
.page-blog__cta-section {
    padding: 60px 0;
    background: linear-gradient(90deg, #C91F17 0%, #E53935 100%); /* Using brand colors for a bold CTA */
    text-align: center;
    color: #FFF5E1; /* Text Main */
    box-shadow: inset 0 5px 15px rgba(0,0,0,0.3);
}

.page-blog__cta-title {
    font-size: 2.8em;
    color: #FFD86A; /* Gold */
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.page-blog__cta-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.page-blog__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%; /* Required for button responsiveness */
    max-width: 100%; /* Required for button responsiveness */
    box-sizing: border-box;
    overflow: hidden;
}

/* Universal image responsiveness */
.page-blog img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Responsive Styles --- */

/* Tablet and smaller screens */
@media (max-width: 1024px) {
    .page-blog__hero-title {
        font-size: 2.8em;
    }
    .page-blog__hero-description {
        font-size: 1.1em;
    }
    .page-blog__section-title {
        font-size: 2.2em;
    }
    .page-blog__section-description {
        font-size: 1em;
    }
    .page-blog__about-blog .page-blog__content-wrapper {
        flex-direction: column;
        text-align: center;
    }
    .page-blog__image-block {
        max-width: 80%;
        margin-top: 30px;
    }
}

/* Mobile phones */
@media (max-width: 768px) {
    /* Hero Section */
    .page-blog__hero-section {
        padding-top: 10px; /* Small top padding for mobile */
        margin-bottom: 30px;
    }
    .page-blog__hero-image img {
        object-fit: contain !important; /* Mobile: prevent cropping, show full image */
        aspect-ratio: unset !important; /* Mobile: unset aspect ratio */
    }
    .page-blog__hero-title {
        font-size: clamp(2em, 8vw, 2.5em); /* Responsive font size for H1 */
        padding: 0 15px;
    }
    .page-blog__hero-description {
        font-size: 1em;
        padding: 0 15px;
    }
    .page-blog__hero-cta {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }

    /* General containers and images */
    .page-blog__container {
        padding: 15px;
    }
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__content-wrapper,
    .page-blog__cta-buttons,
    .page-blog__latest-articles,
    .page-blog__about-blog,
    .page-blog__faq-section,
    .page-blog__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Section titles and descriptions */
    .page-blog__section-title {
        font-size: clamp(1.8em, 7vw, 2em);
        padding: 0 15px;
    }
    .page-blog__section-description {
        font-size: 0.95em;
        padding: 0 15px;
        margin-bottom: 30px;
    }

    /* Latest Articles Section */
    .page-blog__latest-articles {
        padding: 40px 0;
    }
    .page-blog__articles-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }
    .page-blog__article-thumbnail {
        height: 180px; /* Slightly smaller height for mobile cards */
    }
    .page-blog__article-title {
        font-size: 1.2em;
    }
    .page-blog__article-excerpt {
        font-size: 0.9em;
    }
    .page-blog__view-all-cta {
        margin-top: 30px;
    }

    /* About Blog Section */
    .page-blog__about-blog {
        padding: 40px 0;
    }
    .page-blog__content-wrapper {
        flex-direction: column; /* Stack vertically */
        gap: 20px;
    }
    .page-blog__text-block {
        font-size: 1em;
        padding: 0 15px;
    }
    .page-blog__image-block {
        max-width: 100%;
        min-width: unset;
        margin-top: 20px;
        /* Padding handled by .page-blog__content-wrapper */
    }

    /* FAQ Section */
    .page-blog__faq-section {
        padding: 40px 0;
    }
    details.page-blog__faq-item {
        margin-bottom: 10px;
    }
    details.page-blog__faq-item summary.page-blog__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }
    .page-blog__faq-qtext {
        font-size: 0.95em;
    }
    .page-blog__faq-toggle {
        font-size: 20px;
        width: 24px;
        margin-left: 10px;
    }
    details.page-blog__faq-item .page-blog__faq-answer {
        padding: 0 20px 15px;
    }
    .page-blog__faq-answer p {
        font-size: 0.9em;
    }

    /* CTA Section */
    .page-blog__cta-section {
        padding: 40px 0;
    }
    .page-blog__cta-title {
        font-size: clamp(2em, 8vw, 2.5em);
        padding: 0 15px;
    }
    .page-blog__cta-description {
        font-size: 1em;
        padding: 0 15px;
        margin-bottom: 30px;
    }
    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }

    /* Buttons mobile specific */
    .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;
    }
}