/* style/blog.css */
:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --background-light: #ffffff;
    --background-dark: #26A9E0;
    --button-login: #EA7C07;
}

.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
}

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

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.page-blog__hero-image {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-blog__hero-content {
    padding: 40px 20px;
    max-width: 900px;
    width: 100%;
    box-sizing: border-box;
    background-color: var(--background-light);
    color: var(--text-dark);
    border-radius: 8px;
    margin-top: -80px; /* Overlap slightly for visual effect */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.page-blog__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-blog__intro-text {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--text-dark);
}

.page-blog__cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: 2px solid var(--primary-color);
}

.page-blog__btn-primary:hover {
    background-color: darken(var(--primary-color), 10%);
    border-color: darken(var(--primary-color), 10%);
}

.page-blog__btn-secondary {
    background-color: var(--background-light);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

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

.page-blog__introduction-section,
.page-blog__latest-posts-section,
.page-blog__news-updates-section,
.page-blog__faq-section {
    padding: 60px 0;
    background-color: var(--background-light);
    color: var(--text-dark);
}

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

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

.page-blog__section-title--white {
    color: var(--text-light);
}

.page-blog__section-description {
    font-size: 1.05rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 30px auto;
    color: var(--text-dark);
}

.page-blog__section-description--white {
    color: var(--text-light);
}

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

.page-blog__category-item a {
    display: block;
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--text-light);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.page-blog__category-item a:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

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

.page-blog__post-card,
.page-blog__news-card {
    background-color: var(--background-light);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

.page-blog__post-title,
.page-blog__news-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-blog__post-title a,
.page-blog__news-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__post-title a:hover,
.page-blog__news-title a:hover {
    color: var(--primary-color);
}

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

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

.page-blog__read-more-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.page-blog__read-more-btn:hover {
    background-color: darken(var(--primary-color), 10%);
}

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

.page-blog__guide-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.page-blog__guide-item a {
    display: block;
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--text-light);
    padding: 15px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.page-blog__guide-item a:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

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

.page-blog__faq-item {
    background-color: var(--background-light);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: var(--text-dark);
}

.page-blog__faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    color: var(--primary-color);
    background-color: #f9f9f9;
}

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

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.page-blog__faq-qtext {
    flex-grow: 1;
}

.page-blog__faq-toggle {
    font-size: 1.8rem;
    line-height: 1;
    margin-left: 15px;
    color: #666;
    transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(45deg);
}

.page-blog__faq-answer {
    padding: 15px 25px 25px;
    font-size: 1rem;
    color: #555;
    border-top: 1px solid #eee;
}

.page-blog__faq-answer p {
    margin-bottom: 10px;
}

.page-blog__faq-answer p:last-child {
    margin-bottom: 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .page-blog {
        font-size: 16px;
        line-height: 1.6;
    }

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

    .page-blog__hero-content {
        margin-top: -40px; /* Adjust overlap for mobile */
        padding: 25px 15px;
    }

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

    .page-blog__intro-text {
        font-size: 1rem;
    }

    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 10px;
        padding: 0 15px; /* Add padding to buttons container */
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 10px 15px;
        font-size: 1rem;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-blog__container {
        padding: 0 15px;
    }

    .page-blog__introduction-section,
    .page-blog__categories-section,
    .page-blog__latest-posts-section,
    .page-blog__guides-section,
    .page-blog__news-updates-section,
    .page-blog__faq-section,
    .page-blog__call-to-action-section {
        padding: 40px 0;
    }

    .page-blog__section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .page-blog__section-description {
        font-size: 1rem;
    }

    .page-blog__category-list,
    .page-blog__guide-list {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .page-blog__category-item a,
    .page-blog__guide-item a {
        width: 100%;
        max-width: 300px; /* Constrain width for better readability on small screens */
        text-align: center;
        font-size: 1rem;
        padding: 12px 15px;
    }

    .page-blog__post-grid,
    .page-blog__news-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-blog__post-image,
    .page-blog__news-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-blog__post-title,
    .page-blog__news-title {
        font-size: 1.2rem;
    }

    .page-blog__post-excerpt,
    .page-blog__news-excerpt {
        font-size: 0.95rem;
    }

    .page-blog__faq-item summary {
        font-size: 1rem;
        padding: 15px 20px;
    }

    .page-blog__faq-answer {
        font-size: 0.95rem;
        padding: 10px 20px 20px;
    }

    /* Ensure all images inside page-blog are responsive */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-blog__hero-image-wrapper,
    .page-blog__post-card,
    .page-blog__news-card,
    .page-blog__container,
    .page-blog__post-grid,
    .page-blog__news-grid,
    .page-blog__faq-list,
    .page-blog__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    /* Remove padding for elements that should stretch full width without internal padding */
    .page-blog__hero-section,
    .page-blog__introduction-section,
    .page-blog__categories-section,
    .page-blog__latest-posts-section,
    .page-blog__guides-section,
    .page-blog__news-updates-section,
    .page-blog__faq-section,
    .page-blog__call-to-action-section {
        padding-left: 0;
        padding-right: 0;
    }
    .page-blog__hero-content {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* Video responsiveness (if any, as per prompt example) */
.page-blog__video-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 */
}

.page-blog__video-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;
}

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

@media (max-width: 768px) {
  .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;
  }
}