/* style/blog.css */

/* Custom Colors */
:root {
    --page-blog-primary: #2F6BFF;
    --page-blog-secondary: #6FA3FF;
    --page-blog-btn-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
    --page-blog-card-bg: #FFFFFF;
    --page-blog-background: #F4F7FB;
    --page-blog-text-main: #1F2D3D;
    --page-blog-text-black: #000000;
    --page-blog-border: #D6E2FF;
    --page-blog-glow: #A5C4FF;
}

/* Base styles for page-blog scoped to main */
.page-blog {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--page-blog-text-main); /* Default text color for light background */
    background-color: var(--page-blog-background); /* Default light background */
}

/* Container for consistent content width */
.page-blog__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image on top, content below */
    align-items: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--page-blog-primary); /* Dark background for hero */
    color: #ffffff; /* White text for dark hero background */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin-bottom: 30px; /* Space between image and content */
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 1;
}

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

.page-blog__hero-description {
    font-size: 1.1em;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* CTA Buttons */
.page-blog__cta-buttons {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 15px;
    justify-content: center;
    width: 100%; /* Ensure container takes full width */
    max-width: 100%;
    box-sizing: border-box;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons adapt to container */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-blog__btn-primary {
    background: var(--page-blog-btn-gradient);
    color: #ffffff;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

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

.page-blog__btn-secondary:hover {
    background: var(--page-blog-primary);
    color: #ffffff;
    border-color: var(--page-blog-primary);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Section Titles */
.page-blog__section-title {
    font-size: 2.2em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--page-blog-text-black);
}

.page-blog__section-title--white {
    color: #ffffff;
}

/* Latest Posts Section */
.page-blog__latest-posts {
    padding: 80px 0;
    background-color: var(--page-blog-background);
}

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

.page-blog__post-card {
    background-color: var(--page-blog-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.page-blog__post-thumbnail {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.page-blog__post-thumbnail img {
    width: 100%;
    height: 225px; /* Fixed height for thumbnails */
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.page-blog__post-card:hover .page-blog__post-thumbnail 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.4em;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-blog__post-title a {
    color: var(--page-blog-text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
    color: var(--page-blog-primary);
}

.page-blog__post-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

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

.page-blog__read-more {
    display: inline-block;
    color: var(--page-blog-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-blog__read-more:hover {
    text-decoration: underline;
    color: #004085; /* Darker blue on hover */
}

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

/* Categories Section */
.page-blog__categories {
    padding: 80px 0;
    background-color: var(--page-blog-primary); /* Dark background */
}

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

.page-blog__category-card {
    background-color: var(--page-blog-card-bg);
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    padding: 30px 20px;
    text-decoration: none;
    color: var(--page-blog-text-main);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.page-blog__category-card img {
     /* Display size, requested image will be larger */
    
    object-fit: contain;
    margin-bottom: 15px;
    display: block; /* Ensure it behaves as a block element */
}

.page-blog__category-title {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--page-blog-text-main);
}

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

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

.page-blog__faq-item {
    background-color: var(--page-blog-card-bg);
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15em;
    font-weight: 600;
    color: var(--page-blog-text-main);
    cursor: pointer;
    background-color: #ffffff;
    border-bottom: 1px solid var(--page-blog-border);
    transition: background-color 0.3s ease;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.page-blog__faq-question:hover {
    background-color: #f9f9f9;
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    font-weight: 300;
    color: var(--page-blog-primary);
    margin-left: 15px;
    transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(45deg); /* Rotate '+' to 'x' or '-' */
}

.page-blog__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: #555;
    line-height: 1.7;
}

/* Hide default details arrow */
.page-blog__faq-item summary {
    list-style: none;
}
.page-blog__faq-item summary::-webkit-details-marker {
    display: none;
}

/* CTA Section at bottom */
.page-blog__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--page-blog-primary);
    color: #ffffff;
}

.page-blog__cta-description {
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto 40px;
    opacity: 0.9;
}


/* Responsive Styles */
@media (max-width: 992px) {
    .page-blog__hero-section {
        padding: 40px 15px;
        padding-top: 10px;
    }
    .page-blog__hero-image-wrapper {
        margin-bottom: 20px;
    }
    .page-blog__main-title {
        font-size: clamp(1.8em, 5vw, 2.8em);
    }
    .page-blog__section-title {
        font-size: 1.8em;
    }
    .page-blog__post-grid,
    .page-blog__category-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .page-blog__latest-posts,
    .page-blog__categories,
    .page-blog__faq-section,
    .page-blog__cta-section {
        padding: 60px 0;
    }
}

@media (max-width: 768px) {
    /* General mobile padding for content sections */
    .page-blog__container {
        padding: 0 15px;
    }

    /* Images */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__hero-image-wrapper,
    .page-blog__post-thumbnail {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
        overflow: hidden !important;
    }
    .page-blog__post-thumbnail img {
        height: auto !important;
        min-height: 200px; /* Ensure min size for content images */
    }
    .page-blog__category-card img {
        
        
        min-
        min-
    }

    /* Videos - No videos in this page, but including the general rule */
    .page-blog video,
    .page-blog__video {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    .page-blog__video-section,
    .page-blog__video-container,
    .page-blog__video-wrapper {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      overflow: hidden !important;
    }
    .page-blog__video-section {
        padding-top: 10px !important;
    }

    /* Buttons */
    .page-blog__cta-button,
    .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 !important;
        padding-right: 15px !important;
    }
    .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 !important;
        padding-right: 15px !important;
        flex-direction: column !important;
        gap: 15px !important;
        overflow: hidden !important;
    }

    .page-blog__main-title {
        font-size: 2em;
    }
    .page-blog__section-title {
        font-size: 1.6em;
    }
    .page-blog__post-content {
        padding: 20px;
    }
    .page-blog__faq-question {
        padding: 18px 20px;
        font-size: 1.05em;
    }
    .page-blog__faq-answer {
        padding: 0 20px 15px;
    }
}

@media (max-width: 480px) {
    .page-blog__main-title {
        font-size: 1.8em;
    }
    .page-blog__section-title {
        font-size: 1.4em;
    }
    .page-blog__post-grid,
    .page-blog__category-grid {
        grid-template-columns: 1fr;
    }
    .page-blog__hero-section {
        padding: 30px 10px;
        padding-top: 10px;
    }
    .page-blog__latest-posts,
    .page-blog__categories,
    .page-blog__faq-section,
    .page-blog__cta-section {
        padding: 40px 0;
    }
}

/* Color Contrast Enforcement */
/* Hero section uses primary color as background, so text is white */
.page-blog__hero-section,
.page-blog__dark-section {
    background-color: var(--page-blog-primary);
    color: #ffffff;
}
.page-blog__dark-section .page-blog__section-title {
    color: #ffffff;
}

/* Light background sections use main text color */
.page-blog__latest-posts,
.page-blog__faq-section,
.page-blog__light-bg {
    background-color: var(--page-blog-background);
    color: var(--page-blog-text-main);
}
.page-blog__latest-posts .page-blog__section-title,
.page-blog__faq-section .page-blog__section-title {
    color: var(--page-blog-text-black);
}

/* Card backgrounds are white, so text is dark */
.page-blog__post-card,
.page-blog__category-card,
.page-blog__faq-item {
    background-color: var(--page-blog-card-bg);
    color: var(--page-blog-text-main);
}
.page-blog__post-title a {
    color: var(--page-blog-text-main);
}
.page-blog__post-title a:hover {
    color: var(--page-blog-primary);
}
.page-blog__category-title {
    color: var(--page-blog-text-main);
}

/* Buttons already defined with good contrast */

/* No image filters */
.page-blog img {
    filter: none !important;
}