/* style/blog.css */

/* Custom Color Variables */
:root {
    --color-primary: #11A84E; /* Main */
    --color-secondary: #22C768; /* Auxiliary */
    --color-button-gradient-start: #2AD16F;
    --color-button-gradient-end: #13994A;
    --color-card-bg: #11271B;
    --color-background: #08160F;
    --color-text-main: #F2FFF6;
    --color-text-secondary: #A7D9B8;
    --color-border: #2E7A4E;
    --color-glow: #57E38D;
    --color-gold: #F2C14E;
    --color-divider: #1E3A2A;
    --color-deep-green: #0A4B2C;
}

/* Base styles for the blog page */
.page-blog {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--color-text-main); /* Default text color for dark background */
    background-color: var(--color-background); /* Overall page background */
}

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    padding-top: 10px; /* Small top padding as per rule */
    background-color: var(--color-deep-green); /* Using a custom background color from palette */
    overflow: hidden;
}

.page-blog__hero-container {
    width: 100%;
    max-width: 1200px; /* Constrain content width */
    margin: 0 auto;
    display: flex;
    flex-direction: column; /* Image on top, content below */
    align-items: center;
    gap: 30px;
    box-sizing: border-box;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    object-fit: cover;
    max-width: 1200px; /* Ensure image fits container */
}

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

.page-blog__main-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Using clamp for responsive H1 */
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-main);
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(87, 227, 141, 0.5); /* Glow effect */
}

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

.page-blog__cta-buttons {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 15px;
    justify-content: center;
}

/* Section Titles */
.page-blog__section-title {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--color-gold); /* Using gold for section titles */
    text-align: center;
    margin-bottom: 40px;
    padding-top: 40px;
    text-shadow: 0 0 8px rgba(242, 193, 78, 0.4);
}

/* Blog Post Grid */
.page-blog__latest-posts {
    padding: 60px 0;
    background-color: var(--color-background);
}

.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(--color-card-bg); /* Card background */
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

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

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

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

.page-blog__card-title a {
    color: var(--color-text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__card-title a:hover {
    color: var(--color-secondary);
}

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

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

.page-blog__card-link {
    display: inline-block;
    background: linear-gradient(180deg, var(--color-button-gradient-start) 0%, var(--color-button-gradient-end) 100%);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.3s ease;
    text-align: center;
}

.page-blog__card-link:hover {
    background: linear-gradient(180deg, var(--color-button-gradient-end) 0%, var(--color-button-gradient-start) 100%);
    transform: translateY(-2px);
}

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

/* Popular Topics */
.page-blog__popular-topics {
    padding: 60px 0;
    background-color: var(--color-deep-green); /* Using a custom background color from palette */
}

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

.page-blog__topic-card {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    text-decoration: none;
    color: var(--color-text-main);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    display: block; /* Ensure the whole card is clickable */
}

.page-blog__topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-blog__topic-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-gold); /* Using gold for topic titles */
}

.page-blog__topic-description {
    font-size: 0.95em;
    color: var(--color-text-secondary);
}