/* style/blog.css */

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

.page-blog {
    /* Assuming body background is dark from shared.css (var(--background-color) which resolves to #08160F) */
    background-color: var(--background-main); /* Explicitly set for content area for consistency */
    color: var(--text-main); /* Light text for dark background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--background-main);
}

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

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    object-fit: cover;
}

.page-blog__hero-content {
    max-width: 800px;
    z-index: 1; /* Ensure content is above any potential background layers */
    color: var(--text-main);
}

.page-blog__main-title {
    font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size for H1 */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--gold-color); /* Use gold for prominence */
}

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

/* Section Titles & Descriptions */
.page-blog__section-title {
    font-size: clamp(1.8em, 3.5vw, 2.8em);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
    text-align: center;
    color: var(--gold-color);
}

.page-blog__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 40px auto;
    color: var(--text-secondary);
}

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

.page-blog__btn-primary {
    background: var(--button-gradient);
    color: var(--text-main); /* White-ish text for dark button */
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.page-blog__btn-secondary {
    background-color: var(--card-bg); /* Dark background from custom palette */
    color: var(--primary-color); /* Green text for contrast */
    border: 2px solid var(--primary-color);
    margin-left: 20px;
}

.page-blog__btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-main);
    transform: translateY(-2px);
}

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

/* Dark Section Background (for featured posts, latest updates, CTA) */
.page-blog__dark-section {
    background-color: var(--background-main); /* Deep dark green */
    color: var(--text-main); /* Light text */
    padding: 80px 0;
}

/* Light Section Background (for categories, FAQ) */
.page-blog__light-bg {
    background-color: #ffffff; /* Explicit white for light background */
    color: #333333; /* Dark text for contrast */
    padding: 80px 0;
}

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

.page-blog__post-card {
    background-color: var(--card-bg); /* Dark card background */
    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;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards are same height */
    color: var(--text-main); /* Light text */
}

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

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

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

.page-blog__post-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    color: var(--text-main); /* Light text for titles */
}

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

.page-blog__post-title a:hover {
    color: var(--primary-color); /* Hover effect for links */
}

.page-blog__post-meta {
    font-size: 0.9em;
    color: var(--text-secondary); /* Secondary text color */
    margin-bottom: 15px;
}

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

.page-blog__read-more {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-blog__read-more:hover {
    color: var(--gold-color);
    text-decoration: underline;
}

/* Category Grid */
.page-blog__category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
}

.page-blog__category-card {
    background-color: var(--card-bg); /* Dark card background */
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px; /* Ensure sufficient size for category cards */
}

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

.page-blog__category-icon {
    width: 80px; /* Smaller display size for icons, but actual image is 200x200 */
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 5px rgba(var(--primary-color), 0.5)); /* Subtle glow */
}