/* style/blog.css */

/* Custom Color Variables */
:root {
    --ho88-primary: #11A84E;
    --ho88-secondary: #22C768;
    --ho88-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --ho88-card-bg: #11271B;
    --ho88-background: #08160F;
    --ho88-text-main: #F2FFF6;
    --ho88-text-secondary: #A7D9B8;
    --ho88-border: #2E7A4E;
    --ho88-glow: #57E38D;
    --ho88-gold: #F2C14E;
    --ho88-divider: #1E3A2A;
    --ho88-deep-green: #0A4B2C;
}

.page-blog {
    background-color: var(--ho88-background);
    color: var(--ho88-text-main);
    font-family: Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll for the main content */
}

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 0 60px; /* Small top padding, larger bottom padding */
    overflow: hidden; /* Ensure no image overflow */
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    max-height: 675px; /* Limit height for hero image */
    object-fit: cover;
    display: block;
    margin-bottom: 20px; /* Space between image and content */
    border-radius: 10px;
}

.page-blog__hero-content {
    position: relative; /* Ensure content is above the image if needed, but we use top-down flow */
    z-index: 1;
    max-width: 800px;
    padding: 20px;
}

.page-blog__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size for H1 */
    font-weight: 700;
    color: var(--ho88-gold); /* Using gold for main title for prominence */
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.page-blog__description {
    font-size: 1.15rem;
    color: var(--ho88-text-secondary);
    margin-bottom: 30px;
}

.page-blog__section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--ho88-gold);
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.3;
}

.page-blog__text-block {
    font-size: 1.05rem;
    color: var(--ho88-text-main);
    margin-bottom: 20px;
    text-align: justify;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog__btn-text {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text breaking */
}

.page-blog__btn-primary {
    background: var(--ho88-button-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__btn-secondary {
    background-color: transparent;
    color: var(--ho88-gold);
    border: 2px solid var(--ho88-gold);
    margin-left: 20px;
}

.page-blog__btn-secondary:hover {
    background-color: var(--ho88-gold);
    color: var(--ho88-background);
    transform: translateY(-2px);
}

.page-blog__btn-text {
    color: var(--ho88-secondary);
    background: none;
    border: none;
    padding: 0;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: underline;
}

.page-blog__btn-text:hover {
    color: var(--ho88-gold);
}

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

/* Video Section */
.page-blog__intro-video-section {
    padding: 60px 0;
    background-color: var(--ho88-card-bg); /* Use a slightly different background for contrast */
    text-align: center;
}

.page-blog__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 0 auto 20px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-blog__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    cursor: pointer; /* Indicate clickable video */
}

.page-blog__video-description {
    font-size: 1rem;
    color: var(--ho88-text-secondary);
    margin-top: 20px;
}

/* Categories Section */
.page-blog__categories-section {
    padding: 60px 0;
}

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

.page-blog__card {
    background-color: var(--ho88-card-bg);
    color: var(--ho88-text-main);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    margin-bottom: 20px;
    display: block;
}

.page-blog__card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ho88-gold);
    margin-bottom: 10px;
    padding: 0 20px;
}

.page-blog__card-text {
    font-size: 0.95rem;
    color: var(--ho88-text-secondary);
    padding: 0 20px;
    margin-bottom: 20px;
    flex-grow: 1; /* Ensure text block pushes button to bottom */
}

/* Featured Posts Section */
.page-blog__featured-posts-section {
    padding: 60px 0;
}

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

.page-blog__post-card {
    background-color: var(--ho88-card-bg);
    color: var(--ho88-text-main);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

.page-blog__post-title a {
    color: var(--ho88-gold);
    text-decoration: none;
}

.page-blog__post-title a:hover {
    color: var(--ho88-secondary);
}

.page-blog__post-meta {
    font-size: 0.85rem;
    color: var(--ho88-text-secondary);
    margin-bottom: 15px;
}

.page-blog__post-excerpt {
    font-size: 0.95rem;
    color: var(--ho88-text-main);
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-blog__cta-read-more {
  text-align: center;
  margin-top: 40px;
}

/* Benefits Section */
.page-blog__benefits-section {
    padding: 60px 0;
    text-align: center;
}

.page-blog__benefits-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-blog__benefits-list li {
    font-size: 1.1rem;
    color: var(--ho88-text-main);
    margin-bottom: 15px;
    position: relative;
    padding-left: 30px;
    text-align: left;
    max-width: 600px;
}

.page-blog__benefits-list li::before {
    content: '✅'; /* Checkmark icon */
    position: absolute;
    left: 0;
    color: var(--ho88-secondary);
    font-size: 1.2rem;
    line-height: 1;
}

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

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

.page-blog__faq-item {
    background-color: var(--ho88-card-bg);
    border: 1px solid var(--ho88-border);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ho88-gold);
    cursor: pointer;
    background-color: var(--ho88-deep-green); /* Slightly darker background for question */
    transition: background-color 0.3s ease;
}

.page-blog__faq-question:hover {
    background-color: var(--ho88-primary);
    color: #ffffff;
}

.page-blog__faq-toggle {
    font-size: 1.8rem;
    line-height: 1;
    color: var(--ho88-gold);
    transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(45deg); /* Rotate for 'x' effect */
    color: #ffffff;
}

.page-blog__faq-answer {
    padding: 15px 25px 20px;
    font-size: 1rem;
    color: var(--ho88-text-secondary);
    line-height: 1.7;
    background-color: var(--ho88-card-bg); /* Answer background */
}

/* Custom styles for <details> element */
.page-blog__faq-item summary {
    list-style: none; /* Remove default marker */
}

.page-blog__faq-item summary::-webkit-details-marker {
    display: none; /* Hide marker for Webkit browsers */
}

/* CTA Section */
.page-blog__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--ho88-deep-green);
    border-top: 1px solid var(--ho88-border);
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-blog__hero-image {
        max-height: 500px;
    }
    .page-blog__main-title {
        font-size: clamp(2rem, 6vw, 3rem);
    }
    .page-blog__section-title {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }
    .page-blog__category-grid,
    .page-blog__post-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
    }
}

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

    .page-blog__container {
        padding: 0 15px !important; /* Mobile padding */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

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

    .page-blog__hero-image {
        max-height: 350px;
    }

    .page-blog__main-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        margin-bottom: 15px;
    }

    .page-blog__description {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    .page-blog__section-title {
        font-size: clamp(1.6rem, 7vw, 2rem);
        margin-bottom: 30px;
    }

    /* Images responsive */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        object-fit: cover !important; /* Ensure images fill space without distortion */
    }
    
    .page-blog__card-image,
    .page-blog__post-image {
        height: 180px !important; /* Adjust card image height for mobile */
    }

    /* Video responsive */
    .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 !important;
        padding-right: 15px !important;
        overflow: hidden !important;
    }

    .page-blog__intro-video-section {
        padding-top: 10px !important; /* Small top padding */
        padding-bottom: 40px !important;
    }

    /* Buttons responsive */
    .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 !important;
        padding-right: 15px !important;
        margin-left: 0 !important; /* Remove margin-left for secondary button */
        margin-bottom: 15px; /* Add vertical spacing between stacked buttons */
    }

    .page-blog__cta-buttons {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 10px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        overflow: hidden !important;
    }

    .page-blog__card,
    .page-blog__post-card {
        padding-bottom: 15px;
    }
    
    .page-blog__card-title {
        font-size: 1.3rem;
    }
    
    .page-blog__card-text,
    .page-blog__post-excerpt {
        font-size: 0.9rem;
    }

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

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

    .page-blog__benefits-list li {
        font-size: 1rem;
        padding-left: 25px;
    }
}