/* style/blog.css */

/* Base styles and variables */
:root {
    --bigwin-primary: #F2C14E;
    --bigwin-secondary: #FFD36B;
    --bigwin-button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
    --bigwin-card-bg: #111111;
    --bigwin-background: #0A0A0A;
    --bigwin-text-main: #FFF6D6;
    --bigwin-border: #3A2A12;
    --bigwin-glow: #FFD36B;
    --header-offset: 120px; /* Default for desktop, adjusted by shared.css media queries */
}

.page-blog {
    font-family: Arial, sans-serif;
    color: var(--bigwin-text-main); /* Ensure light text on dark body background */
    background-color: var(--bigwin-background);
}

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

.page-blog__section {
    padding: 60px 0;
}

.page-blog__section-title {
    font-size: 2.5em;
    color: var(--bigwin-primary);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    line-height: 1.2;
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bigwin-primary), var(--bigwin-secondary));
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit height of image wrapper */
    overflow: hidden;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center; /* Center the image within its wrapper */
}

.page-blog__hero-content {
    padding: 40px 20px;
    z-index: 1;
    position: relative;
    width: 100%; /* Ensure content block takes full width */
}

.page-blog__main-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size for H1 */
    color: var(--bigwin-text-main);
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-blog__hero-description {
    font-size: 1.2em;
    color: var(--bigwin-text-main);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%;
}

.page-blog__btn-primary {
    background: var(--bigwin-button-gradient);
    color: #ffffff; /* White text for contrast */
    border: none;
    margin: 0 10px;
}

.page-blog__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 211, 107, 0.4);
}

.page-blog__btn-secondary {
    background: transparent;
    color: var(--bigwin-primary);
    border: 2px solid var(--bigwin-primary);
    margin: 0 10px;
}

.page-blog__btn-secondary:hover {
    background: var(--bigwin-primary);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(242, 193, 78, 0.4);
}

/* Latest Posts Section */
.page-blog__latest-posts {
    background-color: var(--bigwin-background);
}

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

.page-blog__post-card {
    background-color: var(--bigwin-card-bg);
    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;
    color: var(--bigwin-text-main);
    border: 1px solid var(--bigwin-border);
}

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

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

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

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

.page-blog__post-title {
    font-size: 1.5em;
    margin-bottom: 10px;
    line-height: 1.3;
    font-weight: bold;
}

.page-blog__post-title a {
    color: var(--bigwin-primary);
    text-decoration: none;
}

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

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

.page-blog__post-excerpt {
    font-size: 1em;
    line-height: 1.6;
    color: var(--bigwin-text-main);
    margin-bottom: 20px;
    flex-grow: 1;
}

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

/* CTA Section */
.page-blog__cta-section {
    background: var(--bigwin-card-bg);
    text-align: center;
    padding: 80px 0;
    border-top: 1px solid var(--bigwin-border);
    border-bottom: 1px solid var(--bigwin-border);
}

.page-blog__cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.page-blog__cta-text {
    max-width: 800px;
}

.page-blog__cta-text .page-blog__section-title {
    color: var(--bigwin-primary);
}

.page-blog__cta-description {
    font-size: 1.1em;
    color: var(--bigwin-text-main);
    line-height: 1.6;
    margin-top: 15px;
}

.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
    overflow: hidden;
}

/* Categories Section */
.page-blog__categories-section {
    background-color: var(--bigwin-background);
}

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

.page-blog__category-card {
    background-color: var(--bigwin-card-bg);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: var(--bigwin-text-main);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--bigwin-border);
}

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

.page-blog__category-icon {
    width: 30px;
    height: 30px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 5px rgba(255, 211, 107, 0.5)); /* Subtle glow for icons */
}

.page-blog__category-title {
    font-size: 1.3em;
    color: var(--bigwin-primary);
    margin-bottom: 10px;
}

.page-blog__category-description {
    font-size: 0.95em;
    line-height: 1.5;
    color: var(--bigwin-text-main);
}

/* FAQ Section */
.page-blog__faq-section {
    background-color: var(--bigwin-background);
}

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

.page-blog__faq-item {
    background-color: var(--bigwin-card-bg);
    border: 1px solid var(--bigwin-border);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    color: var(--bigwin-primary);
    background-color: var(--bigwin-card-bg);
    transition: background-color 0.3s ease;
}

.page-blog__faq-question:hover {
    background-color: #1a1a1a; /* Slightly darker on hover */
}

.page-blog__faq-question h3 {
    margin: 0;
    color: var(--bigwin-primary);
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
    color: var(--bigwin-secondary);
}

.page-blog__faq-item.active .page-blog__faq-toggle {
    transform: rotate(45deg); /* Plus to Minus visual effect */
}

.page-blog__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px; /* Adjust padding to match question */
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--bigwin-text-main);
    background-color: #1a1a1a; /* Slightly different background for answer */
}

.page-blog__faq-item.active .page-blog__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show all content */
    padding: 20px 25px; /* Restore padding when active */
}

.page-blog__faq-answer p {
    margin: 0;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-blog__section-title {
        font-size: 2em;
    }
    .page-blog__main-title {
        font-size: clamp(1.8em, 5vw, 3em);
    }
}

@media (max-width: 768px) {
    .page-blog__hero-section {
        padding-top: var(--header-offset, 100px) !important; /* Mobile header offset */
    }
    .page-blog__section {
        padding: 40px 0;
    }
    .page-blog__section-title {
        font-size: 1.8em;
    }
    .page-blog__main-title {
        font-size: clamp(1.5em, 6vw, 2.5em);
    }
    .page-blog__hero-description {
        font-size: 1em;
    }

    .page-blog__post-grid {
        grid-template-columns: 1fr;
    }

    .page-blog__post-card {
        margin-left: 15px;
        margin-right: 15px;
    }

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

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        width: 100% !important;
        margin: 0; /* Remove horizontal margins for full width */
        padding: 12px 20px;
        font-size: 1em;
    }

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

    .page-blog__category-card {
        padding: 20px;
        margin-left: 15px;
        margin-right: 15px;
    }

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

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

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

    /* Mobile image responsiveness */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__hero-section,
    .page-blog__post-card,
    .page-blog__category-card,
    .page-blog__cta-section,
    .page-blog__faq-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Padding handled by specific elements or containers */
    }
    .page-blog__cta-content, .page-blog__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

@media (max-width: 480px) {
    .page-blog__section-title {
        font-size: 1.5em;
    }
    .page-blog__main-title {
        font-size: clamp(1.3em, 7vw, 2em);
    }
    .page-blog__hero-description {
        font-size: 0.9em;
    }
    .page-blog__post-title {
        font-size: 1.2em;
    }
    .page-blog__category-title {
        font-size: 1.1em;
    }
}