:root {
    --main-color: #113B7A;
    --aux-color: #1D5FD1;
    --main-color-rgb: 17, 59, 122; /* For rgba usage */
    --aux-color-rgb: 29, 95, 209; /* For rgba usage */

    --card-bg: #10233F;
    --text-main: #F3F8FF;
    --text-secondary: #AFC4E8;
    --border-color: #244D84;
    --glow-color: #4FA8FF;
    --gold-color: #F2C14E;
    --divider-color: #1B3357;
    --deep-navy: #08162B;
    --deep-navy-rgb: 8, 22, 43;
}

/* --- Base Styles --- */
.page-blog {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-main); /* Deep Navy body background, so use light text */
    background-color: var(--deep-navy); /* From shared.css */
}

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

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

.page-blog__section-title--light {
    color: var(--gold-color); /* Use gold for light titles on dark background */
}

/* --- Buttons --- */
.page-blog__cta-button,
.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    max-width: 100%; /* For responsiveness */
    box-sizing: border-box; /* For responsiveness */
    white-space: normal; /* For responsiveness */
    word-wrap: break-word; /* For responsiveness */
}

.page-blog__cta-button,
.page-blog__btn-primary {
    background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__cta-button:hover,
.page-blog__btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__btn-secondary {
    background: #ffffff;
    color: var(--main-color); /* #113B7A */
    border: 2px solid var(--main-color); /* #113B7A */
}

.page-blog__btn-secondary:hover {
    background: var(--main-color); /* #113B7A */
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* --- Hero Section --- */
.page-blog__hero-section {
    position: relative;
    overflow: hidden;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    padding-bottom: 60px;
    display: flex;
    flex-direction: column; /* Ensure image is above content */
    align-items: center;
    background-color: var(--deep-navy);
}

.page-blog__hero-image {
    width: 100%;
    max-height: 500px; /* Limit height on desktop */
    overflow: hidden;
    margin-bottom: 40px;
}

.page-blog__hero-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Cover for desktop, contain for mobile */
    object-position: center;
}

.page-blog__hero-content {
    text-align: center;
    max-width: 900px;
    padding: 0 15px;
    color: var(--text-main);
}

.page-blog__main-title {
    font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size */
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--gold-color); /* Using Gold for H1 */
}

.page-blog__description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

/* --- Articles Section --- */
.page-blog__articles-section {
    padding: 60px 0;
    background-color: var(--deep-navy);
}

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

.page-blog__article-card {
    background-color: var(--card-bg); /* #10233F */
    border: 1px solid var(--border-color); /* #244D84 */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

.page-blog__article-title {
    font-size: 1.4em;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--text-main);
    line-height: 1.4;
}

.page-blog__article-meta {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.page-blog__article-summary {
    font-size: 1em;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.page-blog__read-more {
    display: inline-block;
    font-size: 0.95em;
    font-weight: 600;
    color: var(--aux-color); /* #1D5FD1 */
    text-decoration: none;
    border-bottom: 1px solid var(--aux-color);
    padding-bottom: 2px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.page-blog__read-more:hover {
    color: #ffffff;
    border-color: #ffffff;
}

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

.page-blog__view-all-button {
    margin-top: 20px;
}

/* --- CTA Section --- */
.page-blog__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--deep-navy); /* Already dark */
}

.page-blog__description--light {
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 40px auto;
    font-size: 1.1em;
}

.page-blog__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    width: 100%;
    max-width: 600px; /* Limit width for button group */
    margin: 0 auto;
    box-sizing: border-box;
    overflow: hidden;
}

/* --- FAQ Section --- */
.page-blog__faq-section {
    padding: 60px 0;
    background-color: var(--deep-navy);
}

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

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color); /* #244D84 */
  overflow: hidden;
  background: var(--card-bg); /* #10233F */
}
details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: var(--text-main);
}
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(var(--main-color-rgb), 0.1); /* Slight hover effect */
}
.page-blog__faq-qtext {
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-main);
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--aux-color); /* #1D5FD1 */
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 20px 20px;
  background: rgba(var(--deep-navy-rgb), 0.5); /* Slightly lighter dark background for answer */
  border-radius: 0 0 8px 8px;
  color: var(--text-secondary);
}
.page-blog__faq-answer p {
    margin-top: 0;
    margin-bottom: 0;
}

/* --- Responsive Styles (Desktop First, then Mobile) --- */

/* @media (max-width: 1024px) - Tablet */
@media (max-width: 1024px) {
    .page-blog__main-title {
        font-size: clamp(2.2em, 4.5vw, 3em);
    }
    .page-blog__articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }
    .page-blog__section-title {
        font-size: 2.2em;
    }
}

/* @media (max-width: 849px) - Specific for Hero Image contain */
@media (max-width: 849px) {
    .page-blog__hero-image img {
        object-fit: contain !important; /* Prevent cropping on smaller screens */
        aspect-ratio: unset !important; /* Allow natural aspect ratio */
        height: auto !important; /* Ensure image scales correctly */
        max-height: 300px; /* Limit max height for contain */
    }
}

/* @media (max-width: 768px) - Mobile */
@media (max-width: 768px) {
    /* --- General Images & Containers --- */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-blog__hero-section,
    .page-blog__articles-section,
    .page-blog__cta-section,
    .page-blog__faq-section,
    .page-blog__article-card,
    .page-blog__cta-buttons,
    .page-blog__faq-item,
    .page-blog__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-blog__hero-section {
        padding-top: 10px; /* Small top padding for mobile */
        padding-bottom: 40px;
    }

    /* --- Hero Section --- */
    .page-blog__hero-image {
        margin-bottom: 30px;
        max-height: 250px;
    }
    .page-blog__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em); /* Adjust for smaller screens */
        margin-bottom: 15px;
    }
    .page-blog__description {
        font-size: 1em;
        margin-bottom: 25px;
    }
    .page-blog__cta-button {
        padding: 12px 20px;
        font-size: 1em;
    }

    /* --- Articles Section --- */
    .page-blog__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-blog__articles-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
        margin-bottom: 30px;
        overflow-x: hidden; /* Prevent horizontal scroll */
    }
    .page-blog__article-image {
        height: 180px; /* Adjust height for mobile cards */
    }
    .page-blog__article-title {
        font-size: 1.2em;
    }
    .page-blog__article-content {
        padding: 15px;
    }

    /* --- CTA Section --- */
    .page-blog__cta-section {
        padding: 50px 0;
    }
    .page-blog__cta-buttons {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 15px;
        max-width: 100%;
    }
    .page-blog__cta-buttons .page-blog__btn-primary,
    .page-blog__cta-buttons .page-blog__btn-secondary {
        width: 100% !important; /* Ensure buttons take full width */
        padding-left: 15px;
        padding-right: 15px;
    }

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