/* style/blog.css */

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

/* General Page Styles */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--suncity-code-text-main); /* Default text color for dark background */
    background-color: var(--suncity-code-background);
}

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

.page-blog__section-title {
    font-size: 2.5em;
    color: var(--suncity-code-text-main);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.page-blog__text-block {
    margin-bottom: 20px;
    font-size: 1.1em;
    color: var(--suncity-code-text-secondary);
}

.page-blog a {
    color: var(--suncity-code-secondary);
    text-decoration: none;
}

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

.page-blog__keyword {
    color: var(--suncity-code-gold);
    font-weight: bold;
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    text-align: center;
    overflow: hidden;
    box-sizing: border-box;
}

.page-blog__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.6); /* Darken image for text readability */
}

.page-blog__hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    color: var(--suncity-code-text-main);
}

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

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

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

.page-blog__btn-primary {
    background: linear-gradient(180deg, var(--suncity-code-button-gradient-start) 0%, var(--suncity-code-button-gradient-end) 100%);
    color: #ffffff; /* White text for primary button */
    border: none;
}

.page-blog__btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.page-blog__btn-secondary {
    background-color: transparent;
    color: var(--suncity-code-button-gradient-start);
    border: 2px solid var(--suncity-code-button-gradient-start);
}

.page-blog__btn-secondary:hover {
    background-color: var(--suncity-code-button-gradient-start);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Introduction Section */
.page-blog__introduction-section {
    padding: 80px 0;
    background-color: var(--suncity-code-background);
    color: var(--suncity-code-text-secondary);
}

/* Latest Articles Section */
.page-blog__latest-articles {
    padding: 80px 0;
    background-color: var(--suncity-code-card-bg);
}

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

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

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

.page-blog__card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

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

.page-blog__card-content {
    padding: 20px;
}

.page-blog__article-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: var(--suncity-code-text-main);
    font-weight: bold;
}

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

.page-blog__article-excerpt {
    font-size: 1em;
    color: var(--suncity-code-text-secondary);
    margin-bottom: 15px;
    min-height: 72px; /* Ensure consistent height for excerpts */
}

.page-blog__read-more {
    color: var(--suncity-code-secondary);
    font-weight: bold;
    display: inline-block;
}

.page-blog__read-more:hover {
    text-decoration: underline;
}

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

/* Categories Section */
.page-blog__categories-section {
    padding: 80px 0;
    background-color: var(--suncity-code-background);
}

.page-blog__category-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.page-blog__category-item {
    display: inline-block;
    background-color: var(--suncity-code-deep-green);
    color: var(--suncity-code-text-main);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 1px solid var(--suncity-code-border);
}

.page-blog__category-item:hover {
    background-color: var(--suncity-code-secondary);
    color: #ffffff;
    text-decoration: none;
}

/* Featured Article Section */
.page-blog__featured-article {
    padding: 80px 0;
    background-color: var(--suncity-code-card-bg);
}

.page-blog__featured-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

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

.page-blog__featured-text {
    width: 50%;
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 80px 0;
    background-color: var(--suncity-code-background);
}

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

.page-blog__faq-item {
    background-color: var(--suncity-code-card-bg);
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid var(--suncity-code-border);
    overflow: hidden;
}

.page-blog__faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 20px;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--suncity-code-text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.page-blog__faq-item summary::-webkit-details-marker {
    display: none;
}

.page-blog__faq-item summary:hover {
    background-color: var(--suncity-code-deep-green);
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: var(--suncity-code-secondary);
}

.page-blog__faq-answer {
    padding: 0 20px 20px;
    font-size: 1.1em;
    color: var(--suncity-code-text-secondary);
}

/* Bottom CTA Section */
.page-blog__cta-section-bottom {
    padding: 80px 0;
    background-color: var(--suncity-code-card-bg);
    text-align: center;
}

.page-blog__cta-section-bottom .page-blog__section-title {
    color: var(--suncity-code-text-main);
}

.page-blog__cta-section-bottom .page-blog__text-block {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
    color: var(--suncity-code-text-secondary);
}

/* Copyright Section */
.page-blog__copyright-section {
    padding: 30px 0;
    text-align: center;
    background-color: var(--suncity-code-background);
    border-top: 1px solid var(--suncity-code-divider);
}

.page-blog__copyright-text {
    font-size: 0.9em;
    color: var(--suncity-code-text-secondary);
}

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

    .page-blog__hero-description {
        font-size: 1.1em;
    }

    .page-blog__featured-content {
        flex-direction: column;
        text-align: center;
    }

    .page-blog__featured-image,
    .page-blog__featured-text {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .page-blog__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .page-blog__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important;
    }

    .page-blog__main-title {
        font-size: clamp(2em, 8vw, 2.8em);
    }

    .page-blog__hero-description {
        font-size: 1em;
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
        margin-bottom: 15px; /* Add spacing if multiple buttons stack */
    }

    .page-blog__cta-buttons,
    .page-blog__button-group,
    .page-blog__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }

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

    .page-blog__article-image {
        height: 180px;
    }

    .page-blog__article-title {
        font-size: 1.2em;
    }

    .page-blog__article-excerpt {
        min-height: auto;
    }

    .page-blog__category-list {
        flex-direction: column;
        align-items: center;
    }

    .page-blog__category-item {
        width: 100%;
        text-align: center;
    }

    .page-blog__featured-content {
        gap: 20px;
    }

    .page-blog__faq-item summary,
    .page-blog__faq-answer {
        padding: 15px;
        font-size: 1em;
    }

    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-blog__section,
    .page-blog__card,
    .page-blog__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-blog video,
    .page-blog__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-blog__video-section,
    .page-blog__video-container,
    .page-blog__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    .page-blog__video-section {
        padding-top: 10px !important;
    }

    .page-blog__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}