/* style/blog.css */

/* Base styles for the blog page, ensuring proper header offset */
.page-blog {
    color: #333333; /* Dark text for light body background */
    background-color: #FFFFFF; /* Ensures consistency with body background */
}

.page-blog__hero-section {
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
    position: relative;
    overflow: hidden;
    text-align: center;
    color: #FFFFFF; /* White text on hero image */
    min-height: 550px; /* Ensures hero section has a decent height */
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-blog__hero-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-blog__hero-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.page-blog__hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 60px 20px;
    background: rgba(0, 0, 0, 0.6); /* Semi-transparent overlay for readability */
    border-radius: 10px;
    margin: 20px;
}

.page-blog__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #FFFFFF;
    font-weight: 700;
}

.page-blog__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    line-height: 1.6;
    color: #F0F0F0;
}

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

.page-blog__hero-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
}

.page-blog__hero-button--primary {
    background-color: #FCBC45; /* Login color for primary action */
    color: #000000;
    border: 2px solid #FCBC45;
}

.page-blog__hero-button--primary:hover {
    background-color: #E0A73A;
    transform: translateY(-2px);
}

.page-blog__hero-button--secondary {
    background-color: transparent;
    color: #FFFFFF;
    border: 2px solid #FFFFFF;
}

.page-blog__hero-button--secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

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

.page-blog__latest-articles-section, 
.page-blog__categories-section, 
.page-blog__in-depth-guides-section, 
.page-blog__why-helptowin-section, 
.page-blog__cta-section {
    padding: 80px 0;
}

.page-blog__section-title {
    font-size: 2.5em;
    color: #000000;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-blog__section-description {
    font-size: 1.1em;
    color: #555555;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    line-height: 1.6;
}

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

.page-blog__article-card {
    background-color: #F8F8F8;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-blog__article-image {
    width: 100%;
    height: 225px; /* Fixed height for consistent card appearance */
    object-fit: cover;
    display: block;
}

.page-blog__article-content {
    padding: 25px;
}

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

.page-blog__article-title a {
    color: #000000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
    color: #FCBC45;
}

.page-blog__article-excerpt {
    font-size: 0.95em;
    color: #666666;
    line-height: 1.5;
    margin-bottom: 20px;
}

.page-blog__article-read-more {
    display: inline-block;
    color: #FCBC45;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-blog__article-read-more:hover {
    color: #E0A73A;
    text-decoration: underline;
}

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

.page-blog__view-all-button {
  display: inline-block;
  background-color: #000000;
  color: #FFFFFF;
  padding: 15px 40px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.page-blog__view-all-button:hover {
  background-color: #333333;
  transform: translateY(-2px);
}

.page-blog__categories-section {
  background-color: #F5F5F5;
}

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

.page-blog__category-card {
    background-color: #FFFFFF;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.page-blog__category-title {
    font-size: 1.8em;
    color: #000000;
    margin-bottom: 15px;
    font-weight: 600;
}

.page-blog__category-description {
    font-size: 0.95em;
    color: #666666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.page-blog__category-link {
    display: inline-block;
    color: #FCBC45;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-blog__category-link:hover {
    color: #E0A73A;
    text-decoration: underline;
}

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

.page-blog__guide-card {
    background-color: #F8F8F8;
    border-left: 5px solid #FCBC45;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.page-blog__guide-card:hover {
    transform: translateY(-5px);
}

.page-blog__guide-title {
    font-size: 1.6em;
    color: #000000;
    margin-bottom: 15px;
    font-weight: 600;
}

.page-blog__guide-text {
    font-size: 1em;
    color: #555555;
    line-height: 1.6;
}

.page-blog__why-helptowin-section {
    background-color: #000000;
    color: #FFFFFF;
}

.page-blog__why-helptowin-section .page-blog__section-title,
.page-blog__why-helptowin-section .page-blog__section-description {
    color: #FFFFFF;
}

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

.page-blog__feature-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: background-color 0.3s ease;
}

.page-blog__feature-item:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.page-blog__feature-title {
    font-size: 1.8em;
    color: #FCBC45;
    margin-bottom: 15px;
    font-weight: 600;
}

.page-blog__feature-text {
    font-size: 1em;
    color: #E0E0E0;
    line-height: 1.6;
}

.page-blog__cta-section {
    background-color: #FCBC45;
    text-align: center;
    padding: 100px 0;
}

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

.page-blog__cta-title {
    font-size: 2.8em;
    color: #000000;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-blog__cta-description {
    font-size: 1.2em;
    color: #333333;
    line-height: 1.6;
    margin-bottom: 40px;
}

.page-blog__cta-button {
    display: inline-block;
    background-color: #000000;
    color: #FFFFFF;
    padding: 18px 45px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2em;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.page-blog__cta-button:hover {
    background-color: #333333;
    transform: translateY(-3px);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .page-blog__hero-title {
        font-size: 2.8em;
    }
    .page-blog__section-title {
        font-size: 2em;
    }
    .page-blog__cta-title {
        font-size: 2.2em;
    }
}

@media (max-width: 768px) {
    .page-blog__hero-section {
        padding-top: var(--header-offset, 120px);
        min-height: 450px; /* Adjust min-height for mobile hero */
    }
    .page-blog__hero-content {
        padding: 40px 15px;
        margin: 10px;
    }
    .page-blog__hero-title {
        font-size: 2.2em;
    }
    .page-blog__hero-description {
        font-size: 1em;
    }
    .page-blog__hero-actions {
        flex-direction: column;
        gap: 15px;
    }
    .page-blog__hero-button {
        width: 100%;
    }

    .page-blog__latest-articles-section, 
    .page-blog__categories-section, 
    .page-blog__in-depth-guides-section, 
    .page-blog__why-helptowin-section, 
    .page-blog__cta-section {
        padding: 60px 0;
    }
    .page-blog__section-title {
        font-size: 1.8em;
    }
    .page-blog__section-description {
        font-size: 0.9em;
        margin-bottom: 30px;
    }
    .page-blog__article-list,
    .page-blog__category-grid,
    .page-blog__guide-grid,
    .page-blog__features-grid {
        grid-template-columns: 1fr;
    }
    .page-blog__article-image {
        height: 200px; /* Adjusted height for mobile */
        min-width: 200px; /* Ensure images are not too small */
        min-height: 200px;
    }
    .page-blog__article-title {
        font-size: 1.3em;
    }
    .page-blog__category-title {
        font-size: 1.5em;
    }
    .page-blog__guide-title {
        font-size: 1.4em;
    }
    .page-blog__feature-title {
        font-size: 1.5em;
    }
    .page-blog__cta-title {
        font-size: 1.8em;
    }
    .page-blog__cta-description {
        font-size: 1em;
    }
    .page-blog__cta-button {
        padding: 15px 30px;
        font-size: 1.1em;
    }
    
    /* Enforce max-width for images in content area to prevent overflow */
    .page-blog img {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .page-blog__hero-title {
        font-size: 1.8em;
    }
    .page-blog__hero-content {
        padding: 30px 10px;
    }
    .page-blog__section-title {
        font-size: 1.5em;
    }
    .page-blog__cta-title {
        font-size: 1.6em;
    }
    .page-blog__view-all-button {
        padding: 12px 25px;
        font-size: 1em;
    }
}