/* style/blog.css */

/* Custom Colors */
:root {
    --thomo38-primary: #11A84E;
    --thomo38-secondary: #22C768;
    --thomo38-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --thomo38-card-bg: #11271B;
    --thomo38-background: #08160F;
    --thomo38-text-main: #F2FFF6;
    --thomo38-text-secondary: #A7D9B8;
    --thomo38-border: #2E7A4E;
    --thomo38-glow: #57E38D;
    --thomo38-gold: #F2C14E;
    --thomo38-divider: #1E3A2A;
    --thomo38-deep-green: #0A4B2C;
}

/* Base styles for the blog page, contrasting with body background (assumed dark from custom colors) */
.page-blog {
    font-family: 'Arial', sans-serif;
    color: var(--thomo38-text-main); /* Light text for dark background */
    background-color: var(--thomo38-background); /* Deep dark green background */
    line-height: 1.6;
    font-size: 16px;
}

.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, text below */
    align-items: center;
    padding: 60px 0;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--thomo38-deep-green); /* Ensure background for contrast */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 1200px; /* Constrain image width */
    margin-bottom: 30px; /* Space between image and text */
}

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

.page-blog__hero-content {
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
}

.page-blog__main-title {
    font-size: clamp(2.2rem, 4vw, 3rem); /* Clamp for responsive H1 */
    color: var(--thomo38-gold); /* Gold for main title */
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(242, 193, 78, 0.5);
}

.page-blog__hero-description {
    font-size: 1.15rem;
    color: var(--thomo38-text-secondary); /* Secondary text color */
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* CTA Buttons */
.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    box-sizing: border-box; /* Crucial for button responsiveness */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    text-align: center;
}

.page-blog__btn-primary {
    background: var(--thomo38-button-gradient);
    color: var(--thomo38-text-main); /* White-ish text */
    border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3), 0 0 20px var(--thomo38-glow);
}

.page-blog__btn-secondary {
    background: transparent;
    color: var(--thomo38-primary); /* Primary green text */
    border: 2px solid var(--thomo38-primary);
}

.page-blog__btn-secondary:hover {
    background: rgba(var(--thomo38-primary), 0.1);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* General Section Styles */
.page-blog__section {
    padding: 60px 0;
    background-color: var(--thomo38-background); /* Consistent dark background */
    border-bottom: 1px solid var(--thomo38-divider);
}

.page-blog__section:last-of-type {
    border-bottom: none;
}

.page-blog__section-title {
    font-size: 2.5rem;
    color: var(--thomo38-gold); /* Gold for section titles */
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.3;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(242, 193, 78, 0.3);
}

.page-blog__text-block {
    font-size: 1.1rem;
    color: var(--thomo38-text-secondary);
    margin-bottom: 20px;
    text-align: justify;
}

/* Featured Categories Grid */
.page-blog__category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-blog__category-card {
    background-color: var(--thomo38-card-bg); /* Darker card background */
    border: 1px solid var(--thomo38-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards are same height */
}

.page-blog__category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.5), 0 0 15px var(--thomo38-glow);
}

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

.page-blog__card-title {
    font-size: 1.4rem;
    color: var(--thomo38-text-main); /* Light text for card title */
    margin: 20px 20px 10px;
    line-height: 1.4;
    font-weight: 600;
}

.page-blog__card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__card-title a:hover {
    color: var(--thomo38-primary); /* Primary green on hover */
}

.page-blog__card-description {
    font-size: 0.95rem;
    color: var(--thomo38-text-secondary);
    padding: 0 20px;
    margin-bottom: 20px;
    flex-grow: 1; /* Push read more link to bottom */
}

.page-blog__read-more-link {
    display: inline-block;
    color: var(--thomo38-secondary); /* Secondary green for link */
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px 20px;
    transition: color 0.3s ease;
}

.page-blog__read-more-link:hover {
    color: var(--thomo38-gold); /* Gold on hover */
    text-decoration: underline;
}

/* Benefits List */
.page-blog__benefits-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
}

.page-blog__list-item {
    background-color: var(--thomo38-card-bg); /* Darker card background */
    border: 1px solid var(--thomo38-border);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 12px var(--thomo38-glow);
}

.page-blog__list-title {
    font-size: 1.6rem;
    color: var(--thomo38-primary); /* Primary green for list titles */
    margin-bottom: 15px;
    font-weight: 600;
}

.page-blog__list-description {
    font-size: 1rem;
    color: var(--thomo38-text-secondary);
}

/* FAQ Section */
.page-blog__faq-list {
    margin-top: 40px;
}

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

.page-blog__faq-item[open] {
    background-color: var(--thomo38-deep-green); /* Slightly darker when open */
    border-color: var(--thomo38-primary);
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--thomo38-text-main);
    cursor: pointer;
    background-color: var(--thomo38-card-bg);
    transition: background-color 0.3s ease, color 0.3s ease;
    list-style: none; /* Remove default marker */
}

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

.page-blog__faq-question:hover {
    background-color: var(--thomo38-deep-green);
    color: var(--thomo38-primary);
}

.page-blog__faq-toggle {
    font-size: 1.8rem;
    line-height: 1;
    margin-left: 15px;
    color: var(--thomo38-primary);
    transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(45deg); /* Rotate plus to cross */
    color: var(--thomo38-gold);
}

.page-blog__faq-answer {
    padding: 0 25px 20px;
    font-size: 1rem;
    color: var(--thomo38-text-secondary);
    max-height: 0; /* Hidden by default for details tag (browser handles) */
    overflow: hidden; /* Ensure content is hidden */
    transition: max-height 0.3s ease-out; /* For JS fallback if not using details */
}

/* For browsers that don't animate details, or if using JS fallback */
.page-blog__faq-item[open] .page-blog__faq-answer {
    max-height: 500px; /* Adjust as needed for content, this is a fallback */
}

/* Final CTA Section */
.page-blog__cta-final {
    text-align: center;
    padding-bottom: 80px;
}

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

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

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

    .page-blog__container {
        padding: 0 15px !important; /* Adjust container padding for mobile */
    }

    .page-blog__hero-section {
        padding: 40px 0;
        padding-top: 10px !important; /* body handles --header-offset, this is small visual top padding */
    }

    .page-blog__hero-content {
        padding: 0 15px;
    }

    .page-blog__main-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        margin-bottom: 15px;
    }

    .page-blog__hero-description {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    .page-blog__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 15px !important; /* Add padding to button container */
        overflow: hidden !important;
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 20px;
        font-size: 1rem;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

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

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

    .page-blog__text-block {
        font-size: 1rem;
    }

    .page-blog__category-grid {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px;
    }

    .page-blog__card-image {
        height: 180px; /* Adjust height for mobile */
    }

    .page-blog__card-title {
        font-size: 1.25rem;
        margin: 15px 15px 8px;
    }

    .page-blog__card-description {
        font-size: 0.9rem;
        padding: 0 15px;
    }

    .page-blog__read-more-link {
        padding: 8px 15px 15px;
    }

    .page-blog__list-item {
        padding: 20px;
        margin-bottom: 15px;
    }

    .page-blog__list-title {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

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

    .page-blog__faq-toggle {
        font-size: 1.5rem;
    }

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

    /* Images responsiveness for mobile */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-blog__hero-image-wrapper,
    .page-blog__category-card,
    .page-blog__list-item,
    .page-blog__faq-item,
    .page-blog__container,
    .page-blog__section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important; /* Prevent horizontal scroll */
    }

    .page-blog__section:not(.page-blog__hero-section) .page-blog__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}