/* Base styles for the blog page */
.page-blog {
    font-family: Arial, sans-serif;
    color: #333333; /* Default text color for light background */
    line-height: 1.6;
    background-color: #ffffff; /* Assuming body background is light */
}

.page-blog__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* General button styles */
.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 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-color: #26A9E0;
    color: #FFFFFF;
    border: 2px solid #26A9E0;
}

.page-blog__btn-primary:hover {
    background-color: #1a7fb3;
    border-color: #1a7fb3;
}

.page-blog__btn-secondary {
    background-color: #FFFFFF;
    color: #26A9E0;
    border: 2px solid #26A9E0;
}

.page-blog__btn-secondary:hover {
    background-color: #e0f2f7;
    color: #26A9E0;
    border-color: #26A9E0;
}

/* Hero Carousel Section */
.page-blog__hero-carousel-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-top: 10px; /* Small top padding, relying on body for header offset */
    background-color: #f0f8ff;
}

.page-blog__hero-slider {
    position: relative;
    width: 100%;
    height: 675px; /* Fixed height for desktop */
}

.page-blog__hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.7s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.page-blog__hero-slide.is-active {
    opacity: 1;
}

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

.page-blog__hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for text readability */
    border-radius: 8px;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.page-blog__hero-title,
.page-blog__hero-subtitle {
    font-weight: bold;
    color: #FFFFFF;
    margin-bottom: 10px;
    line-height: 1.2;
    letter-spacing: -0.5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    font-size: clamp(2.2rem, 3.5vw, 3.2rem); /* Using clamp for H1 font size */
}

.page-blog__hero-description {
    font-size: 1.1rem;
    color: #f0f0f0;
    margin-bottom: 20px;
    max-width: 90%;
}

.page-blog__hero-button {
    margin-top: 10px;
}

.page-blog__hero-slider-prev,
.page-blog__hero-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: #FFFFFF;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 3;
    font-size: 1.5rem;
    border-radius: 5px;
    user-select: none;
}

.page-blog__hero-slider-prev {
    left: 10px;
}

.page-blog__hero-slider-next {
    right: 10px;
}

.page-blog__hero-slider-prev:hover,
.page-blog__hero-slider-next:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Guide Box Section */
.page-blog__guide-box {
    padding: 40px 0;
    background-color: #F0F8FF; /* Light blueish background */
    text-align: center;
}

.page-blog__guide-title {
    font-size: 2.2rem;
    color: #26A9E0;
    margin-bottom: 30px;
    font-weight: bold;
}

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

.page-blog__guide-card {
    flex: 0 0 calc(20% - 16px); /* 5 cards per row, accounting for gap */
    max-width: calc(20% - 16px);
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 8px;
    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__guide-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-blog__guide-card img {
    width: 100%;
    height: 350px; /* Fixed height for vertical cards */
    object-fit: cover;
    display: block;
    aspect-ratio: 250/350; /* Fixed aspect ratio */
}

/* Specific positioning for guide cards (as per homepage template, adapted for blog) */
.page-blog__guide-card--pos-1 { padding-top: 50px; }
.page-blog__guide-card--pos-2 { padding-top: 25px; }
.page-blog__guide-card--pos-3 { padding-top: 0px; }
.page-blog__guide-card--pos-4 { padding-top: 25px; }
.page-blog__guide-card--pos-5 { padding-top: 50px; }

/* Blog Content Section */
.page-blog__content-section {
    padding: 60px 0;
    background-color: #FFFFFF;
}

.page-blog__section-title {
    font-size: 2.5rem;
    color: #26A9E0;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-blog__section-description {
    font-size: 1.1rem;
    color: #555555;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

.page-blog__blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns for desktop */
    gap: 30px;
}

.page-blog__blog-card {
    background-color: #F8F8F8;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-blog__blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.page-blog__blog-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.page-blog__blog-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-blog__blog-card-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #26A9E0;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-blog__blog-card-meta {
    font-size: 0.9rem;
    color: #888888;
    margin-bottom: 15px;
}

.page-blog__blog-card-excerpt {
    font-size: 1rem;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-blog__blog-card-readmore {
    align-self: flex-start;
    padding: 8px 18px;
    font-size: 0.9rem;
}

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

/* General Info Section */
.page-blog__info-section {
    padding: 60px 0;
    background-color: #F0F8FF;
}

.page-blog__info-title {
    font-size: 2.5rem;
    color: #26A9E0;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-blog__info-paragraph {
    font-size: 1.1rem;
    color: #333333;
    margin-bottom: 20px;
    text-align: justify;
}

.page-blog__sub-title {
    font-size: 1.8rem;
    color: #26A9E0;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-blog__sub-paragraph {
    font-size: 1rem;
    color: #333333;
    margin-bottom: 15px;
    text-align: justify;
}

.page-blog__list {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 20px;
    color: #333333;
}

.page-blog__list-item {
    font-size: 1rem;
    margin-bottom: 8px;
}

.page-blog__figure {
    margin: 30px 0;
    text-align: center;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.page-blog__figure-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.page-blog__figure-caption {
    font-size: 0.9rem;
    color: #777777;
    margin-top: 10px;
}

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

/* FAQ Section */
.page-blog__faq-section {
    padding: 60px 0;
    background-color: #FFFFFF;
}

.page-blog__faq-main-title {
    font-size: 2.5rem;
    color: #26A9E0;
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

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

.page-blog__faq-item {
    background-color: #F8F8F8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-blog__faq-item[open] {
    background-color: #e0f2f7;
    border-color: #26A9E0;
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #333333;
    cursor: pointer;
    user-select: none;
    list-style: none; /* Remove default marker */
}

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

.page-blog__faq-toggle {
    font-size: 1.5rem;
    color: #26A9E0;
    transition: transform 0.3s ease;
}

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

.page-blog__faq-answer {
    padding: 0 25px 18px 25px;
    font-size: 1rem;
    color: #555555;
}

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

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

    /* Hero Carousel Section */
    .page-blog__hero-carousel-section {
        padding-top: 10px !important; /* Keep small padding */
    }

    .page-blog__hero-slider {
        height: 400px; /* Adjust height for mobile */
    }

    .page-blog__hero-content {
        padding: 15px;
        max-width: 90%;
    }

    .page-blog__hero-title,
    .page-blog__hero-subtitle {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }

    .page-blog__hero-description {
        font-size: 0.95rem;
    }

    .page-blog__hero-slider-prev,
    .page-blog__hero-slider-next {
        padding: 8px 12px;
        font-size: 1.2rem;
    }

    /* Guide Box Section */
    .page-blog__guide-box {
        padding: 30px 0;
    }

    .page-blog__guide-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }

    .page-blog__guide-grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr); /* Use grid for more control */
        gap: 15px;
    }

    .page-blog__guide-card {
        padding-top: 0 !important; /* Reset specific padding for mobile */
        grid-column: span 3; /* Two cards per row for first two, then three cards per row for next three */
        max-width: 100%; /* Override flex-basis calc */
    }

    /* Specific mobile layout for guide cards: 2-3-2 or similar, 2 on first row, 3 on second, etc. */
    .page-blog__guide-card--pos-1, .page-blog__guide-card--pos-2 {
        grid-column: span 3;
    }
    .page-blog__guide-card--pos-3, .page-blog__guide-card--pos-4, .page-blog__guide-card--pos-5 {
        grid-column: span 2;
    }

    .page-blog__guide-card img {
        height: 250px; /* Adjust height for mobile */
    }

    /* Blog Content Section */
    .page-blog__content-section {
        padding: 40px 0;
    }

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

    .page-blog__section-description {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .page-blog__blog-grid {
        grid-template-columns: 1fr; /* Single column for mobile */
        gap: 20px;
    }

    .page-blog__blog-card-image {
        height: 180px;
    }

    .page-blog__blog-card-title {
        font-size: 1.2rem;
    }

    .page-blog__blog-card-excerpt {
        font-size: 0.95rem;
    }

    .page-blog__view-all-posts {
        margin-top: 30px;
    }

    /* General Info Section */
    .page-blog__info-section {
        padding: 40px 0;
    }

    .page-blog__info-title {
        font-size: 2rem;
    }

    .page-blog__info-paragraph,
    .page-blog__sub-paragraph,
    .page-blog__list-item {
        font-size: 0.95rem;
    }

    .page-blog__sub-title {
        font-size: 1.5rem;
    }

    .page-blog__cta-group {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px; /* Add padding to prevent overflow */
    }

    /* FAQ Section */
    .page-blog__faq-section {
        padding: 40px 0;
    }

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

    .page-blog__faq-question {
        padding: 15px 20px;
        font-size: 1.1rem;
    }

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

    /* General image and button rules for mobile */
    .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,
    .page-blog__blog-card,
    .page-blog__guide-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-blog__cta-button,
    .page-blog__btn-primary,
    .page-blog__btn-secondary,
    .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,
    .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;
      flex-direction: column !important;
    }
}

/* Tablet Responsive Styles */
@media (max-width: 1024px) and (min-width: 769px) {
    .page-blog__container {
        padding: 0 25px;
    }

    .page-blog__hero-slider {
        height: 500px;
    }

    .page-blog__hero-title,
    .page-blog__hero-subtitle {
        font-size: clamp(2rem, 4vw, 2.8rem);
    }

    .page-blog__guide-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cards per row */
        gap: 25px;
    }

    .page-blog__guide-card {
        flex: 0 0 calc(50% - 12.5px);
        max-width: calc(50% - 12.5px);
        padding-top: 0 !important; /* Reset specific padding for tablet */
    }

    .page-blog__blog-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for tablet */
        gap: 25px;
    }

    .page-blog__section-title,
    .page-blog__info-title,
    .page-blog__faq-main-title {
        font-size: 2.2rem;
    }

    .page-blog__sub-title {
        font-size: 1.6rem;
    }

    .page-blog__hero-content {
        max-width: 700px;
    }
}