/* style/blog.css */
:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --background-light: #ffffff;
    --background-dark: #1a1a1a; /* Assuming var(--black-color) from shared.css is dark */
    --login-button-color: #EA7C07;
    --border-color: #e0e0e0;
}

.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-light); /* Default text color for dark body background */
    background-color: var(--background-dark); /* Inherited from body, ensuring contrast */
}

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

.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
}

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

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__hero-content {
    max-width: 800px;
    margin-top: 20px;
}

.page-blog__main-title {
    font-size: clamp(2.2em, 4vw, 3.2em);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-light);
}

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

.page-blog__btn-primary {
    display: inline-block;
    background-color: var(--login-button-color); /* Specific color for login/register type buttons */
    color: var(--text-light);
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__btn-primary:hover {
    background-color: darken(var(--login-button-color), 10%); /* Example darken, will compile to a specific color */
}

.page-blog__latest-posts {
    padding: 60px 0;
    background-color: var(--background-light);
    color: var(--text-dark);
}

.page-blog__section-title {
    font-size: 2.5em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-dark);
}

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

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

.page-blog__post-card {
    display: flex;
    flex-direction: column;
    background-color: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.3s ease;
    min-width: 200px;
    min-height: 200px;
}

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

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

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

.page-blog__post-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
    color: var(--text-dark);
}

.page-blog__post-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

.page-blog__post-excerpt {
    font-size: 1em;
    color: #555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-blog__read-more {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: bold;
}

.page-blog__arrow {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.page-blog__post-card:hover .page-blog__arrow {
    transform: translateX(5px);
}

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

.page-blog__btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-blog__categories-section {
    padding: 60px 0;
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
}

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

.page-blog__category-card {
    background-color: rgba(255, 255, 255, 0.15);
    padding: 30px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.page-blog__category-card:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.page-blog__category-title {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-light);
}

.page-blog__category-text {
    font-size: 1em;
    margin-bottom: 20px;
    color: var(--text-light);
}

.page-blog__btn-tertiary {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    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__btn-tertiary:hover {
    background-color: #e0e0e0;
}

.page-blog__guides-section {
    padding: 60px 0;
    background-color: var(--background-light);
    color: var(--text-dark);
}

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

.page-blog__guide-card {
    background-color: var(--secondary-color);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    min-width: 200px;
    min-height: 200px;
}

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

.page-blog__guide-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    min-width: 200px;
    min-height: 200px;
}

.page-blog__guide-title {
    font-size: 1.4em;
    font-weight: 600;
    margin: 20px 20px 10px;
    line-height: 1.3;
    color: var(--text-dark);
}

.page-blog__guide-text {
    font-size: 1em;
    color: #555;
    margin: 0 20px 20px;
    flex-grow: 1;
}

.page-blog__guide-card .page-blog__btn-primary {
    margin: 0 20px 20px;
    align-self: flex-start;
    padding: 10px 20px;
    font-size: 0.9em;
}

.page-blog__faq-section {
    padding: 60px 0;
    background-color: var(--background-dark); /* Ensure contrast with light text */
    color: var(--text-light);
}

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

.page-blog__faq-item {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: var(--text-light);
}

.page-blog__faq-item summary {
    list-style: none;
}

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

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
}

.page-blog__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    line-height: 1;
    margin-left: 15px;
}

.page-blog__faq-answer {
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.03);
    font-size: 1em;
    color: #ccc;
}

.page-blog__cta-section {
    padding: 60px 0;
    background-color: var(--background-light);
    color: var(--text-dark);
    text-align: center;
}

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

.page-blog__cta-buttons {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Ensure all content area images are responsive and not too small */
.page-blog img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .page-blog__container,
    .page-blog__hero-section,
    .page-blog__latest-posts,
    .page-blog__categories-section,
    .page-blog__guides-section,
    .page-blog__faq-section,
    .page-blog__cta-section {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-blog__hero-section {
        padding-top: 10px !important; /* Body handles header offset, small top padding for section */
    }

    .page-blog__main-title {
        font-size: 2em !important;
    }

    .page-blog__description,
    .page-blog__section-description {
        font-size: 1em !important;
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary,
    .page-blog__btn-tertiary,
    .page-blog a[class*="button"],
    .page-blog a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-blog__cta-buttons {
        flex-direction: column !important;
        gap: 15px !important;
    }

    .page-blog__post-grid,
    .page-blog__category-grid,
    .page-blog__guide-cards {
        grid-template-columns: 1fr !important;
    }

    .page-blog__post-image,
    .page-blog__guide-image {
        height: auto !important;
        min-height: 200px !important;
    }

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

    .page-blog__post-card,
    .page-blog__category-card,
    .page-blog__guide-card {
        min-width: unset !important; /* Allow cards to shrink */
    }

    .page-blog__section-title {
        font-size: 1.8em !important;
    }

    .page-blog__post-title,
    .page-blog__category-title,
    .page-blog__guide-title {
        font-size: 1.2em !important;
    }

    .page-blog__faq-question {
        font-size: 1em !important;
    }

    .page-blog__faq-toggle {
        font-size: 1.2em !important;
    }
}

/* Darken function for hover, manually calculated for example */
.page-blog__btn-primary:hover {
    background-color: #d16f00; /* Darkened from #EA7C07 */
}

/* Ensure content area images meet minimum size requirements */
.page-blog__post-image,
.page-blog__guide-image {
    min-width: 200px;
    min-height: 200px;
}

.page-blog__content-area img,
.page-blog p img,
.page-blog li img {
    min-width: 200px;
    min-height: 200px;
    width: auto; /* Allow natural width */
    max-width: 100%;
    height: auto;
}

/* Ensure no filter is used on images */
.page-blog img {
    filter: none;
}

/* Desktop specific video container width */
.page-blog__video-container {
    width: 100%; /* Ensure it spans full width within its max-width */
}