/* style/index.css */

/* Base styles for the page content */
.page-index {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background: var(--background, #FFFFFF);
}

/* Ensure images are responsive and not tiny */
.page-index img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 8px;
}

/* Section titles */
.page-index__section-title {
    font-size: 36px;
    font-weight: bold;
    color: #017439; /* Brand primary color */
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
}

.page-index__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #017439;
    border-radius: 2px;
}

/* CTA Buttons - General Styling */
.page-index__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    cursor: pointer;
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
}

.page-index__cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.page-index__btn-primary {
    background: #C30808; /* Specific color for Register/Login */
    color: #FFFF00; /* Specific font color for Register/Login */
}

.page-index__btn-primary:hover {
    background: #a30606; /* Darker shade on hover */
}

.page-index__btn-secondary {
    background: #ffffff;
    color: #017439; /* Brand primary color */
    border: 2px solid #017439;
}

.page-index__btn-secondary:hover {
    background: #f0f0f0;
    color: #00562e;
}

/* -------------------------------------------------------------------------- */
/* Video Section */
/* -------------------------------------------------------------------------- */
.page-index__video-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    background: linear-gradient(to bottom, #017439, #00562e); /* Gradient for visual appeal */
}

.page-index__video-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Ensure no overflow */
}

.page-index__video-link {
    display: block;
    text-decoration: none;
    position: relative;
    width: 100%;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

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

.page-index__video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.page-index__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
    object-fit: cover;
    pointer-events: none; /* Prevent video controls from interfering with click event */
}

.page-index__video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.page-index__video-link:hover .page-index__video-overlay {
    opacity: 1;
}

.page-index__video-click-hint {
    color: #ffffff;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
    padding: 12px 25px;
    background: rgba(195, 8, 8, 0.8); /* Register/Login button color with transparency */
    border-radius: 30px;
    white-space: nowrap;
    text-transform: uppercase;
}

.page-index__video-cta {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
}

.page-index__play-now-button {
    display: inline-block;
    padding: 18px 50px;
    background: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    text-decoration: none;
    border-radius: 50px; /* More rounded for CTA */
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.page-index__play-now-button:hover {
    background: #a30606;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.page-index__play-now-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* -------------------------------------------------------------------------- */
/* Hero Section (H1 + CTA) */
/* -------------------------------------------------------------------------- */
.page-index__hero-section {
    padding: 80px 20px;
    text-align: center;
    color: #ffffff; /* Light text for dark background */
}

.page-index__dark-section {
    background: #017439; /* Primary brand color */
}

.page-index__hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.page-index__main-title {
    font-size: 48px;
    margin-bottom: 25px;
    line-height: 1.2;
    color: #FFFF00; /* Eye-catching color for H1 */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-index__hero-description {
    font-size: 20px;
    margin-bottom: 40px;
    color: #f0f0f0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-index__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

/* -------------------------------------------------------------------------- */
/* FAQ Section */
/* -------------------------------------------------------------------------- */
.page-index__faq-section {
    padding: 80px 20px;
    background: #f8f8f8; /* Light background for contrast */
}

.page-index__faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.page-index__faq-list {
    margin-top: 40px;
}

.page-index__faq-item {
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.page-index__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
    z-index: 2;
}

.page-index__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-index__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: #333333;
    pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-index__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #017439; /* Brand primary color */
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transform: rotate(0deg);
}

.page-index__faq-item.active .page-index__faq-toggle {
    color: #C30808; /* Highlight color when active */
    transform: rotate(45deg); /* Plus to X rotation */
}

.page-index__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 25px;
    opacity: 0;
    background: #ffffff;
    border-top: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 0 0 10px 10px;
    position: relative;
    top: -1px;
    z-index: 1;
}

.page-index__faq-item.active .page-index__faq-answer {
    max-height: 2000px !important; /* Sufficiently large */
    padding: 20px 25px !important;
    opacity: 1;
}

.page-index__faq-answer p {
    margin: 0;
    font-size: 16px;
    color: #555555;
}

/* -------------------------------------------------------------------------- */
/* Brand Introduction Section */
/* -------------------------------------------------------------------------- */
.page-index__brand-section {
    padding: 80px 20px;
    color: #ffffff;
    background: #017439; /* Primary brand color */
}

.page-index__brand-container {
    max-width: 1200px;
    margin: 0 auto;
}

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

.page-index__brand-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.page-index__brand-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.page-index__brand-item-title {
    font-size: 24px;
    font-weight: bold;
    color: #FFFF00; /* Highlight color */
    margin-bottom: 15px;
}

.page-index__brand-item p {
    font-size: 16px;
    color: #f0f0f0;
    flex-grow: 1;
}

/* -------------------------------------------------------------------------- */
/* Blog List Section */
/* -------------------------------------------------------------------------- */
.page-index__blog-section {
    padding: 80px 20px;
    background: #f8f8f8; /* Light background */
}

.page-index__blog-container {
    max-width: 1200px;
    margin: 0 auto;
}

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

.page-index__blog-item {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.page-index__blog-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

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

.page-index__blog-image {
    width: 100%;
    height: 220px; /* Fixed height for consistent card appearance */
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    margin-bottom: 15px;
}

.page-index__blog-item-title {
    font-size: 20px;
    font-weight: bold;
    color: #017439; /* Brand primary color */
    padding: 0 20px;
    margin-bottom: 10px;
}

.page-index__blog-item-excerpt {
    font-size: 15px;
    color: #555555;
    padding: 0 20px;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-index__blog-item-date {
    font-size: 14px;
    color: #888888;
    padding: 0 20px 20px;
    display: block;
    text-align: right;
}

.page-index__view-all-button-container {
    margin-top: 50px;
}


/* -------------------------------------------------------------------------- */
/* Responsive Design */
/* -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .page-index__main-title {
        font-size: 40px;
    }
    .page-index__hero-description {
        font-size: 18px;
    }
    .page-index__section-title {
        font-size: 32px;
    }
    .page-index__play-now-button {
        padding: 15px 40px;
        font-size: 20px;
    }
}

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

    /* General padding for mobile sections */
    .page-index__video-section,
    .page-index__hero-section,
    .page-index__faq-section,
    .page-index__brand-section,
    .page-index__blog-section {
        padding: 40px 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important; /* Prevent horizontal scroll */
    }

    /* Fixed header offset for mobile */
    .page-index__video-section {
        padding-top: var(--header-offset, 120px) !important;
    }

    /* Images responsiveness */
    .page-index img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* Video responsiveness */
    .page-index video,
    .page-index__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-index__video-container,
    .page-index__video-wrapper,
    .page-index__video-link {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        border-radius: 8px;
    }

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

    .page-index__cta-button,
    .page-index__play-now-button {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 25px !important;
        font-size: 16px !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        border-radius: 40px;
    }
    
    .page-index__play-now-button {
        font-size: 18px !important;
        padding: 15px 30px !important;
    }

    .page-index__video-click-hint {
        font-size: 16px;
        padding: 10px 20px;
    }

    .page-index__main-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .page-index__hero-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .page-index__section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    /* FAQ Mobile */
    .page-index__faq-question {
        padding: 15px 20px;
    }
    .page-index__faq-question h3 {
        font-size: 16px;
    }
    .page-index__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
    }
    .page-index__faq-answer {
        padding: 0 20px;
    }
    .page-index__faq-item.active .page-index__faq-answer {
        padding: 15px 20px !important;
    }
    .page-index__faq-answer p {
        font-size: 15px;
    }

    /* Brand Mobile */
    .page-index__brand-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-index__brand-item {
        padding: 25px;
        border-radius: 10px;
    }
    .page-index__brand-item-title {
        font-size: 20px;
    }
    .page-index__brand-item p {
        font-size: 15px;
    }

    /* Blog Mobile */
    .page-index__blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-index__blog-image {
        height: 180px;
        border-radius: 10px 10px 0 0;
    }
    .page-index__blog-item-title {
        font-size: 18px;
        padding: 0 15px;
    }
    .page-index__blog-item-excerpt {
        font-size: 14px;
        padding: 0 15px;
    }
    .page-index__blog-item-date {
        font-size: 13px;
        padding: 0 15px 15px;
    }
}