/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
    background-color: #0A0A0A; /* Custom background color */
    color: #FFF6D6; /* Custom text main color for dark background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

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

.page-blog__section-title {
    font-size: 2.5em;
    color: #F2C14E; /* Main brand color for titles */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    line-height: 1.2;
}

.page-blog__description-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
    font-size: 1.1em;
    color: #FFF6D6;
}

/* Hero Section */
.page-blog__hero-section {
    background: linear-gradient(135deg, #F2C14E, #FFD36B); /* Brand gradient */
    padding-top: var(--header-offset, 120px); /* Fixed header offset for desktop */
    padding-bottom: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    text-align: center;
}

.page-blog__hero-content-wrapper {
    display: flex;
    flex-direction: column; /* Ensure text is above image for hero */
    align-items: center;
    max-width: 1200px;
    width: 100%;
    padding: 0 20px;
}

.page-blog__hero-text {
    margin-bottom: 40px; /* Space between text and image */
}

.page-blog__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size for H1 */
    color: #0A0A0A; /* Dark text for light gradient background */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__description {
    font-size: 1.2em;
    color: #333333; /* Darker text for readability on light background */
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 800px; /* Constrain hero image width */
    margin-top: 40px; /* Space below text, above image */
}

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

/* 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;
    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%, #DDA11D 100%); /* Custom button gradient */
    color: #0A0A0A; /* Dark text for light button */
    border: none;
}

.page-blog__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(242, 193, 78, 0.4);
}

.page-blog__btn-secondary {
    background-color: transparent;
    color: #F2C14E; /* Main brand color for secondary button text */
    border: 2px solid #F2C14E; /* Border with main brand color */
}

.page-blog__btn-secondary:hover {
    background-color: #F2C14E;
    color: #0A0A0A; /* Dark text on hover */
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(242, 193, 78, 0.2);
}

/* Latest Articles Section */
.page-blog__latest-articles-section {
    padding: 80px 0;
}

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

.page-blog__article-card {
    background-color: #111111; /* Card BG custom color */
    border: 1px solid #3A2A12; /* Custom border color */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    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 8px 25px rgba(0, 0, 0, 0.4);
}

.page-blog__article-image-wrapper {
    width: 100%;
    height: 225px; /* Fixed height for consistent card images */
    overflow: hidden;
}

.page-blog__article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.page-blog__article-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    line-height: 1.3;
    flex-grow: 1; /* Allow title to take up available space */
}

.page-blog__article-title a {
    color: #FFD36B; /* Auxiliary brand color for linked titles */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
    color: #F2C14E; /* Main brand color on hover */
}

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

.page-blog__article-excerpt {
    font-size: 1em;
    color: #FFF6D6; /* Main text color */
    margin-bottom: 20px;
    flex-grow: 1; /* Allow excerpt to take up available space */
}

.page-blog__read-more-btn {
    display: inline-block;
    color: #F2C14E; /* Main brand color */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    margin-top: auto; /* Push to bottom of content */
}

.page-blog__read-more-btn:hover {
    text-decoration: underline;
    color: #FFD36B; /* Auxiliary brand color on hover */
}

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

/* CTA Section */
.page-blog__cta-section {
    background: #0A0A0A; /* Main background color */
    padding: 80px 0;
    text-align: center;
}

.page-blog__cta-section .page-blog__section-title {
    color: #F2C14E; /* Main brand color for title */
}

.page-blog__cta-description {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: #FFF6D6; /* Main text color */
}

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

/* Categories Section */
.page-blog__categories-section {
    padding: 80px 0;
    background-color: #0A0A0A; /* Main background color */
}

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

.page-blog__category-item {
    background-color: #111111; /* Card BG custom color */
    border: 1px solid #3A2A12; /* Custom border color */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__category-link {
    display: block;
    text-decoration: none;
    color: #FFF6D6; /* Main text color */
    text-align: center;
    padding: 20px;
}

.page-blog__category-image {
    width: 100%;
    max-width: 300px; /* Ensure images are not too wide */
    height: 200px; /* Fixed height for category images */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__category-name {
    font-size: 1.3em;
    font-weight: bold;
    color: #FFD36B; /* Auxiliary brand color */
    transition: color 0.3s ease;
}

.page-blog__category-link:hover .page-blog__category-name {
    color: #F2C14E; /* Main brand color on hover */
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 80px 0;
    background-color: #0A0A0A; /* Main background color */
}

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

.page-blog__faq-item {
    background-color: #111111; /* Card BG custom color */
    border: 1px solid #3A2A12; /* Custom border color */
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-size: 1.15em;
    font-weight: bold;
    color: #F2C14E; /* Main brand color for questions */
    transition: background-color 0.3s ease;
}

.page-blog__faq-question:hover {
    background-color: rgba(242, 193, 78, 0.1); /* Light hover effect */
}

.page-blog__faq-item.active .page-blog__faq-question {
    background-color: rgba(242, 193, 78, 0.2); /* Active question background */
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
    color: #FFD36B; /* Auxiliary brand color for toggle icon */
}

.page-blog__faq-item.active .page-blog__faq-toggle {
    transform: rotate(45deg); /* Rotate to form an 'x' or '-' */
}

.page-blog__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px; /* Initial padding for collapsed state */
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #FFF6D6; /* Main text color for answers */
    font-size: 1em;
}

.page-blog__faq-item.active .page-blog__faq-answer {
    max-height: 1000px !important; /* Ensure content expands fully */
    padding: 15px 25px 25px 25px; /* Padding for expanded state */
}

.page-blog__faq-answer p {
    margin-bottom: 0;
}

/* About Section */
.page-blog__about-section {
    padding: 80px 0;
    background-color: #0A0A0A; /* Main background color */
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-blog__section-title {
        font-size: 2em;
    }
    .page-blog__main-title {
        font-size: clamp(2rem, 4.5vw, 3rem);
    }
    .page-blog__hero-text {
        margin-bottom: 30px;
    }
    .page-blog__hero-image-wrapper {
        margin-top: 30px;
    }
}

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

    /* Hero Section */
    .page-blog__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header offset */
        padding-bottom: 60px;
    }
    .page-blog__main-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }
    .page-blog__description {
        font-size: 1em;
    }
    .page-blog__hero-cta {
        flex-direction: column;
        gap: 15px;
    }

    /* Images */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-blog__article-image-wrapper {
        height: auto; /* Allow height to adjust for mobile */
    }
    .page-blog__category-image {
        height: auto;
    }

    /* Containers for images and buttons */
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__article-card,
    .page-blog__category-item,
    .page-blog__faq-item,
    .page-blog__about-section .page-blog__container,
    .page-blog__cta-section .page-blog__container,
    .page-blog__latest-articles-section .page-blog__container,
    .page-blog__categories-section .page-blog__container,
    .page-blog__faq-section .page-blog__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Buttons */
    .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: 12px 20px !important;
    }
    .page-blog__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }

    /* Sections padding */
    .page-blog__latest-articles-section,
    .page-blog__cta-section,
    .page-blog__categories-section,
    .page-blog__faq-section,
    .page-blog__about-section {
        padding: 60px 0;
    }
    .page-blog__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-blog__description-text {
        margin-bottom: 40px;
    }
    .page-blog__article-content {
        padding: 20px;
    }
    .page-blog__article-title {
        font-size: 1.2em;
    }
    .page-blog__faq-question {
        font-size: 1em;
        padding: 15px 20px;
    }
    .page-blog__faq-answer {
        padding: 10px 20px 20px 20px;
    }
}