/* style/blog.css */

/* Variables (if needed, but using direct hex values from prompt) */
:root {
    --page-blog-primary-color: #F2C14E;
    --page-blog-secondary-color: #FFD36B;
    --page-blog-button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
    --page-blog-card-bg: #111111;
    --page-blog-background: #0A0A0A;
    --page-blog-text-main: #FFF6D6;
    --page-blog-border-color: #3A2A12;
    --page-blog-glow-color: #FFD36B;
}

.page-blog {
    background-color: var(--page-blog-background); /* #0A0A0A */
    color: var(--page-blog-text-main); /* #FFF6D6 */
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* 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 as body handles --header-offset */
    overflow: hidden;
    min-height: 500px; /* Ensure sufficient height */
}

.page-blog__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.page-blog__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5); /* Darken image slightly for text readability, not color change */
    display: block;
}

.page-blog__hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay for text readability */
    border-radius: 10px;
}

.page-blog__hero-title {
    color: var(--page-blog-text-main); /* #FFF6D6 */
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: 1px;
    max-width: 100%; /* Prevents overflow */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    /* No fixed font-size for H1, relying on responsive scaling */
}

.page-blog__hero-description {
    color: var(--page-blog-text-main); /* #FFF6D6 */
    font-size: 1.1em;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.page-blog__hero-cta-button {
    display: inline-block;
    background: var(--page-blog-button-gradient); /* linear-gradient */
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__hero-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* General Container and Titles */
.page-blog__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

.page-blog__section-title {
    color: var(--page-blog-primary-color); /* #F2C14E */
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Latest Articles Section */
.page-blog__latest-articles {
    background-color: var(--page-blog-background); /* #0A0A0A */
    padding: 60px 0;
}

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

.page-blog__article-card {
    background-color: var(--page-blog-card-bg); /* #111111 */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--page-blog-border-color); /* #3A2A12 */
}

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

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

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

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

.page-blog__article-title {
    color: var(--page-blog-text-main); /* #FFF6D6 */
    font-size: 1.4em;
    margin-bottom: 10px;
    line-height: 1.3;
    font-weight: bold;
}

.page-blog__article-title:hover {
    color: var(--page-blog-primary-color); /* #F2C14E */
}

.page-blog__article-excerpt {
    color: rgba(255, 255, 255, 0.8); /* Lighter text for readability */
    font-size: 0.95em;
    margin-bottom: 15px;
}

.page-blog__article-date {
    color: var(--page-blog-primary-color); /* #F2C14E */
    font-size: 0.85em;
    display: block;
    margin-bottom: 15px;
}

.page-blog__read-more {
    color: var(--page-blog-secondary-color); /* #FFD36B */
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: color 0.3s ease;
}

.page-blog__read-more:hover {
    color: var(--page-blog-primary-color); /* #F2C14E */
    text-decoration: underline;
}

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

.page-blog__view-all-button {
    display: inline-block;
    background: var(--page-blog-button-gradient); /* linear-gradient */
    color: #ffffff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-blog__view-all-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Categories Section */
.page-blog__categories {
    background-color: var(--page-blog-background); /* #0A0A0A */
    padding: 60px 0;
    border-top: 1px solid var(--page-blog-border-color); /* #3A2A12 */
}

.page-blog__category-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.page-blog__category-item {
    background-color: var(--page-blog-card-bg); /* #111111 */
    color: var(--page-blog-text-main); /* #FFF6D6 */
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    border: 1px solid var(--page-blog-border-color); /* #3A2A12 */
}

.page-blog__category-item:hover {
    background-color: var(--page-blog-primary-color); /* #F2C14E */
    color: #ffffff;
    transform: translateY(-3px);
}

/* Call to Action Section */
.page-blog__cta-section {
    background-color: var(--page-blog-primary-color); /* #F2C14E */
    padding: 80px 20px;
    text-align: center;
    color: #ffffff; /* White text on primary color background */
    border-top: 1px solid var(--page-blog-border-color); /* #3A2A12 */
}

.page-blog__cta-title {
    color: #ffffff;
    font-size: 2.8em;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.page-blog__cta-description {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 40px auto;
    line-height: 1.7;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none; /* Resetting default button border */
}

.page-blog__btn-primary {
    background: var(--page-blog-button-gradient); /* linear-gradient */
    color: #ffffff;
}

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

.page-blog__btn-secondary {
    background: #ffffff;
    color: var(--page-blog-primary-color); /* #F2C14E */
    border: 2px solid var(--page-blog-primary-color); /* #F2C14E */
}

.page-blog__btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.9);
}

/* FAQ Section */
.page-blog__faq-section {
    background-color: var(--page-blog-background); /* #0A0A0A */
    padding: 60px 0;
    border-top: 1px solid var(--page-blog-border-color); /* #3A2A12 */
}

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

.page-blog__faq-item {
    background-color: var(--page-blog-card-bg); /* #111111 */
    border: 1px solid var(--page-blog-border-color); /* #3A2A12 */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.page-blog__faq-item.active {
    background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter when active */
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    color: var(--page-blog-text-main); /* #FFF6D6 */
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.page-blog__faq-question:hover {
    color: var(--page-blog-primary-color); /* #F2C14E */
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
    color: var(--page-blog-primary-color); /* #F2C14E */
}

.page-blog__faq-item.active .page-blog__faq-toggle {
    transform: rotate(45deg);
    color: var(--page-blog-secondary-color); /* #FFD36B */
}

.page-blog__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    color: rgba(255, 255, 255, 0.7); /* Lighter text for answer */
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.page-blog__faq-item.active .page-blog__faq-answer {
    max-height: 1000px !important; /* Critical for expansion */
    padding: 15px 25px 25px 25px;
}

.page-blog__faq-answer p {
    margin-bottom: 0; /* Remove default paragraph margin */
    color: inherit;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-blog__hero-title {
        font-size: 2.5em;
    }
    .page-blog__section-title {
        font-size: 2em;
    }
    .page-blog__cta-title {
        font-size: 2.2em;
    }
    .page-blog__article-image {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .page-blog {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-blog__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* Small top padding for mobile */
        min-height: 400px;
    }

    .page-blog__hero-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }

    .page-blog__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-blog__hero-cta-button {
        padding: 12px 25px;
        font-size: 1em;
    }

    .page-blog__container {
        padding: 30px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-blog__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .page-blog__article-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-blog__article-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-blog__article-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

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

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

    .page-blog__category-list {
        flex-direction: column;
        align-items: center;
    }

    .page-blog__category-item {
        width: 100%;
        text-align: center;
        max-width: 300px; /* Optional: limit width for single column items */
    }

    .page-blog__cta-section {
        padding: 60px 15px;
    }

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

    .page-blog__cta-description {
        font-size: 1em;
        margin-bottom: 30px;
    }

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

    .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; /* Ensure padding inside button */
        padding-right: 15px;
    }

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

    .page-blog__faq-answer {
        padding: 0 20px;
    }
    .page-blog__faq-item.active .page-blog__faq-answer {
        padding: 10px 20px 20px 20px;
    }

    /* All images must be responsive */
    .page-blog img {
      max-width: 100% !important;
      height: auto !important;
      display: block;
    }
}

@media (max-width: 480px) {
    .page-blog__hero-title {
        font-size: 1.5em;
    }
    .page-blog__section-title {
        font-size: 1.5em;
    }
    .page-blog__cta-title {
        font-size: 1.5em;
    }
}