/* style/blog.css */

/* Variables */
:root {
    --primary-color: #FF8C1A;
    --secondary-color: #FFA53A;
    --card-bg: #17191F;
    --site-bg: #0D0E12; /* This is from custom palette */
    --text-main: #FFF3E6;
    --border-color: #A84F0C;
    --glow-color: #FFB04D;
    --deep-orange: #D96800;
    --header-offset: 0px; /* Will be set by shared.css body padding-top */
}

/* Ensure content is visible against dark body background */
.page-blog {
    color: var(--text-main); /* Light text for dark background */
    background-color: var(--site-bg);
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding-top: 10px; /* Small top padding, body handles header offset */
}

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

.page-blog__section-title {
    font-size: clamp(28px, 4vw, 38px);
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255, 140, 26, 0.5);
    line-height: 1.2;
}

.page-blog__section-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
    font-size: 18px;
    color: var(--text-main);
}

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

.page-blog__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%; /* Ensure it takes full width for max-width to work */
}

.page-blog__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

.page-blog__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--border-color);
    box-shadow: 0 0 15px rgba(255, 140, 26, 0.7);
}

.page-blog__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-blog__hero-content h1 {
    font-size: clamp(32px, 5vw, 48px);
    color: var(--text-main);
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(255, 140, 26, 0.8);
}

.page-blog__hero-description {
    font-size: clamp(16px, 2.5vw, 20px);
    color: #f0f0f0;
    max-width: 900px;
    margin: 0 auto 30px auto;
}

.page-blog__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--deep-orange) 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 140, 26, 0.4);
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__cta-button:hover {
    background: linear-gradient(180deg, var(--deep-orange) 0%, var(--secondary-color) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 140, 26, 0.6);
}

/* Intro Section */
.page-blog__intro-section {
    padding: 60px 0;
    background-color: var(--site-bg);
}

/* Articles Section */
.page-blog__articles-section {
    padding: 60px 0;
    background-color: var(--card-bg);
}

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

.page-blog__article-card {
    background-color: var(--site-bg);
    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;
    border: 1px solid var(--border-color);
}

.page-blog__article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(255, 140, 26, 0.3);
}

.page-blog__article-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

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

.page-blog__article-title {
    font-size: 22px;
    margin-bottom: 10px;
    line-height: 1.3;
}

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

.page-blog__article-title a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.page-blog__article-meta {
    font-size: 14px;
    color: #999;
    margin-bottom: 15px;
}

.page-blog__article-summary {
    font-size: 16px;
    color: #ccc;
    margin-bottom: 20px;
}

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

.page-blog__read-more:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

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

.page-blog__view-all-button {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 17px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__view-all-button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 26, 0.4);
}


/* Categories Section */
.page-blog__categories-section {
    padding: 60px 0;
    background-color: var(--site-bg);
}

.page-blog__categories-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.page-blog__category-item {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--card-bg);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    box-sizing: border-box;
    white-space: nowrap; /* Prevent breaking for category names */
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-blog__category-item:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(255, 140, 26, 0.4);
    transform: translateY(-2px);
}

/* Why Choose Us Section (Features) */
.page-blog__why-choose-us-section {
    padding: 60px 0;
    background-color: var(--card-bg);
}

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

.page-blog__feature-card {
    background-color: var(--site-bg);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(255, 140, 26, 0.3);
}

.page-blog__feature-title {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: bold;
}

.page-blog__feature-description {
    font-size: 16px;
    color: #ccc;
}

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

.page-blog__cta-section .page-blog__section-description {
    margin-bottom: 40px;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--deep-orange) 100%);
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(255, 140, 26, 0.4);
}

.page-blog__btn-primary:hover {
    background: linear-gradient(180deg, var(--deep-orange) 0%, var(--secondary-color) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 140, 26, 0.6);
}

.page-blog__btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(255, 140, 26, 0.2);
}

.page-blog__btn-secondary:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 140, 26, 0.4);
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 60px 0;
    background-color: var(--card-bg);
}

details.page-blog__faq-item {
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: var(--site-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
details.page-blog__faq-item summary.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background-color 0.3s ease;
    color: var(--text-main);
    font-weight: bold;
    font-size: 18px;
}
details.page-blog__faq-item summary.page-blog__faq-question::-webkit-details-marker {
    display: none;
}
details.page-blog__faq-item summary.page-blog__faq-question:hover {
    background: rgba(255, 140, 26, 0.1);
}
.page-blog__faq-qtext {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    color: var(--text-main);
}
.page-blog__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    flex-shrink: 0;
    margin-left: 15px;
    width: 30px;
    text-align: center;
}
details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 25px 20px;
    background: var(--site-bg);
    border-radius: 0 0 10px 10px;
    color: #ccc;
    font-size: 16px;
}
.page-blog__faq-answer p {
    margin: 0;
}
.page-blog__faq-answer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}
.page-blog__faq-answer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-blog__hero-content h1 {
        font-size: clamp(30px, 4.5vw, 42px);
    }
    .page-blog__hero-description {
        font-size: clamp(15px, 2.2vw, 18px);
    }
    .page-blog__section-title {
        font-size: clamp(26px, 3.5vw, 34px);
    }
    .page-blog__section-description {
        font-size: 16px;
    }
    .page-blog__article-title {
        font-size: 20px;
    }
    .page-blog__feature-title {
        font-size: 22px;
    }
    details.page-blog__faq-item summary.page-blog__faq-question {
        padding: 16px 20px;
        font-size: 17px;
    }
    .page-blog__faq-qtext {
        font-size: 17px;
    }
    .page-blog__faq-toggle {
        font-size: 26px;
    }
    details.page-blog__faq-item .page-blog__faq-answer {
        padding: 0 20px 18px;
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .page-blog {
        font-size: 16px;
        line-height: 1.6;
        padding-top: 10px !important; /* body handles header offset */
    }
    .page-blog__container {
        padding: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Hero Section */
    .page-blog__hero-section {
        padding-top: 10px !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-blog__hero-image img {
        border-radius: 4px;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-blog__hero-content h1 {
        font-size: clamp(28px, 6vw, 38px);
        margin-bottom: 15px;
    }
    .page-blog__hero-description {
        font-size: clamp(15px, 3.5vw, 17px);
        margin-bottom: 20px;
    }
    .page-blog__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* Section titles and descriptions */
    .page-blog__section-title {
        font-size: clamp(24px, 5vw, 30px);
        margin-bottom: 30px;
    }
    .page-blog__section-description {
        font-size: 15px;
        margin-bottom: 40px;
    }

    /* Article Grid */
    .page-blog__article-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .page-blog__article-card {
        margin: 0 auto;
        max-width: 400px; /* Constrain single column width */
    }
    .page-blog__article-image {
        height: 180px;
    }
    .page-blog__article-title {
        font-size: 18px;
    }
    .page-blog__article-summary {
        font-size: 15px;
    }

    /* Categories */
    .page-blog__categories-list {
        gap: 10px;
    }
    .page-blog__category-item {
        padding: 8px 15px;
        font-size: 14px;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Features */
    .page-blog__features-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .page-blog__feature-title {
        font-size: 20px;
    }
    .page-blog__feature-description {
        font-size: 15px;
    }

    /* CTA Buttons */
    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 16px;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* FAQ */
    details.page-blog__faq-item summary.page-blog__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-blog__faq-qtext {
        font-size: 16px;
        width: calc(100% - 40px); /* Adjust for toggle icon */
    }
    .page-blog__faq-toggle {
        font-size: 24px;
        margin-left: 10px;
        width: 24px;
        height: 24px;
    }
    details.page-blog__faq-item .page-blog__faq-answer {
        padding: 0 15px 15px;
        font-size: 15px;
    }

    /* General image responsiveness */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
}

@media (max-width: 480px) {
    .page-blog__hero-content h1 {
        font-size: clamp(26px, 7vw, 34px);
    }
    .page-blog__hero-description {
        font-size: clamp(14px, 4vw, 16px);
    }
    .page-blog__cta-button {
        font-size: 15px;
        padding: 10px 25px;
    }
    .page-blog__section-title {
        font-size: clamp(22px, 6vw, 28px);
    }
    .page-blog__article-title {
        font-size: 17px;
    }
    .page-blog__feature-title {
        font-size: 19px;
    }
    details.page-blog__faq-item summary.page-blog__faq-question {
        font-size: 15px;
    }
    .page-blog__faq-qtext {
        font-size: 15px;
    }
    .page-blog__faq-toggle {
        font-size: 22px;
    }
    details.page-blog__faq-item .page-blog__faq-answer {
        font-size: 14px;
    }
}