/* style/blog.css */

/* Variáveis de Cores */
:root {
    --color-primary: #C91F17;
    --color-secondary: #E53935;
    --color-card-bg: #D32F2F;
    --color-background: #B71C1C;
    --color-text-main: #FFF5E1;
    --color-border: #F2B544;
    --color-glow: #FFCC66;
    --color-gold: #F4D34D;
    --color-deep-red: #7A0E0E;
    --button-gradient: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);
    --text-dark: #333333;
    --text-light: #ffffff;
}

/* Base styles for the blog page */
.page-blog {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default for light backgrounds, will be overridden for dark sections */
    background-color: #f8f8f8; /* A default light background, assuming shared.css sets body background */
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image on top, content below */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 20px 60px 20px; /* Small top padding, more bottom padding */
    overflow: hidden;
    background-color: var(--color-primary); /* Fallback */
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    max-height: 500px; /* Limit height to prevent image from being too tall */
}

.page-blog__hero-content {
    max-width: 900px;
    margin-top: 40px; /* Space between image and content */
    color: var(--color-text-main); /* Light text for dark background */
}

.page-blog__hero-title {
    font-size: 3.5em;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--color-text-main);
    letter-spacing: 1px;
}

.page-blog__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--color-text-main);
}

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

/* General 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;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__btn-primary {
    background: var(--button-gradient);
    color: var(--text-light); /* White text on gold gradient */
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-blog__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

.page-blog__btn-secondary {
    background: transparent;
    color: var(--color-gold); /* Gold text */
    border: 2px solid var(--color-gold); /* Gold border */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.page-blog__btn-secondary:hover {
    background: rgba(244, 211, 77, 0.1); /* Light gold background on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

.page-blog__section-title {
    font-size: 2.8em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.3;
}

.page-blog__section-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__sub-title {
    font-size: 1.8em;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-blog__content-area p {
    margin-bottom: 15px;
    font-size: 1.05em;
}

.page-blog__content-area strong {
    color: var(--color-gold);
}

.page-blog__content-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 30px 0;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Latest Posts Section */
.page-blog__latest-posts {
    padding: 80px 0;
    background-color: #ffffff; /* Light background */
    color: var(--text-dark);
}

.page-blog__latest-posts .page-blog__section-title,
.page-blog__latest-posts .page-blog__section-description {
    color: var(--text-dark);
}

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

.page-blog__post-card {
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%; /* Ensure cards have equal height */
    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-link-wrapper {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.page-blog__post-content {
    padding: 20px;
    flex-grow: 1; /* Allow content to grow and fill space */
    display: flex;
    flex-direction: column;
}

.page-blog__post-date {
    font-size: 0.9em;
    color: #666666;
    margin-bottom: 10px;
}

.page-blog__post-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-primary);
    line-height: 1.3;
}

.page-blog__post-title:hover {
    text-decoration: underline;
}

.page-blog__post-summary {
    font-size: 1em;
    color: #555555;
    margin-bottom: 15px;
    flex-grow: 1; /* Allow summary to take up available space */
}

.page-blog__read-more {
    display: inline-block;
    color: var(--color-primary);
    font-weight: bold;
    text-decoration: none;
    margin-top: auto; /* Push to bottom */
}

.page-blog__read-more:hover {
    text-decoration: underline;
}

.page-blog__all-posts-cta {
    text-align: center;
    margin-top: 60px;
}

/* Dark Background Sections */
.page-blog__dark-bg {
    background-color: var(--color-background); /* Deep Red */
    color: var(--color-text-main); /* Light text */
    padding: 80px 0;
}

.page-blog__dark-bg .page-blog__section-title,
.page-blog__dark-bg .page-blog__section-description,
.page-blog__dark-bg .page-blog__sub-title {
    color: var(--color-text-main);
}

/* Light Background Sections */
.page-blog__light-bg {
    background-color: #ffffff; /* White background */
    color: var(--text-dark); /* Dark text */
    padding: 80px 0;
}

.page-blog__light-bg .page-blog__section-title,
.page-blog__light-bg .page-blog__section-description,
.page-blog__light-bg .page-blog__sub-title {
    color: var(--text-dark);
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 80px 0;
    background-color: #f8f8f8; /* Slightly off-white */
    color: var(--text-dark);
}

.page-blog__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__faq-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-blog__faq-item[open] {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    border-color: var(--color-primary);
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    background-color: #fefefe;
    list-style: none; /* Remove default summary marker */
}

.page-blog__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker for webkit browsers */
}

.page-blog__faq-qtext {
    flex-grow: 1;
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    margin-left: 15px;
    color: var(--color-gold);
}

.page-blog__faq-answer {
    padding: 0 20px 20px 20px;
    font-size: 1em;
    color: #555555;
}

/* Call to Action Section */
.page-blog__cta-section {
    text-align: center;
    padding: 80px 0;
    background-color: var(--color-deep-red); /* Darker red */
    color: var(--color-text-main);
    position: relative;
    overflow: hidden;
}

.page-blog__cta-section .page-blog__section-title,
.page-blog__cta-section .page-blog__cta-description {
    color: var(--color-text-main);
    position: relative;
    z-index: 2;
}

.page-blog__cta-description {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 40px auto;
    position: relative;
    z-index: 2;
}

.page-blog__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
}

.page-blog__cta-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15; /* Subtle background image */
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-blog__hero-title {
        font-size: 2.8em;
    }

    .page-blog__section-title {
        font-size: 2.2em;
    }

    .page-blog__sub-title {
        font-size: 1.6em;
    }

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

@media (max-width: 768px) {
    .page-blog__hero-section {
        padding: 10px 15px 40px 15px;
    }

    .page-blog__hero-title {
        font-size: 2.2em;
        margin-top: 20px;
    }

    .page-blog__hero-description {
        font-size: 1em;
    }

    .page-blog__hero-cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 300px; /* Constrain buttons on mobile */
        margin: 0 auto;
    }

    .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: 12px 20px;
        font-size: 1em;
    }

    .page-blog__section-title {
        font-size: 1.8em;
    }

    .page-blog__section-description {
        font-size: 0.95em;
    }

    .page-blog__sub-title {
        font-size: 1.4em;
    }

    .page-blog__content-area p {
        font-size: 0.95em;
    }

    .page-blog__latest-posts,
    .page-blog__dark-bg,
    .page-blog__light-bg,
    .page-blog__faq-section,
    .page-blog__cta-section {
        padding: 40px 0;
    }

    .page-blog__container {
        padding: 0 15px;
    }

    .page-blog__post-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }

    .page-blog__post-image {
        height: 180px; /* Adjust card image height */
    }

    .page-blog__post-title {
        font-size: 1.2em;
    }

    .page-blog__faq-question {
        font-size: 1em;
        padding: 15px;
    }

    .page-blog__faq-toggle {
        font-size: 1.2em;
    }

    .page-blog__faq-answer {
        padding: 0 15px 15px 15px;
        font-size: 0.95em;
    }

    /* Images responsive */
    .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 {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-blog__video-section {
        padding-top: 10px !important;
    }

    .page-blog__cta-buttons {
      flex-direction: column;
      gap: 10px;
    }
}

/* Ensure content area images do not get smaller than 200px if selected by general img rule */
.page-blog__content-area img,
.page-blog__post-card img {
    min-width: 200px;
    min-height: 200px;
}

/* No CSS filter on images */
.page-blog img {
    filter: none !important;
}