/* style/index.css */

/* --- General Page Styles --- */
.page-index {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: transparent; /* Body background is handled by shared.css */
    padding-bottom: 60px; /* Space above footer */
}

.page-index__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-index__dark-section {
    background-color: var(--primary-color, #017439); /* Brand primary color */
    color: #ffffff;
    padding: 80px 20px;
    text-align: center;
}

.page-index__light-bg {
    background-color: var(--secondary-color, #ffffff); /* Brand secondary color (white) */
    color: #333333; /* Dark text for light background */
    padding: 80px 20px;
}

.page-index h1,
.page-index h2,
.page-index h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.3;
}

.page-index h1 {
    font-size: 48px;
    color: #ffffff; /* Ensure H1 is white on dark background */
}

.page-index h2 {
    font-size: 36px;
    color: inherit; /* Inherit from section, will be white or dark */
}

.page-index h3 {
    font-size: 24px;
    color: inherit;
}

.page-index p {
    margin-bottom: 15px;
}

.page-index__cta-button {
    display: inline-block;
    padding: 15px 30px;
    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;
    margin: 10px;
}

/* Custom button colors */
.page-index__btn-register {
    background: #C30808; /* Custom Register color */
    color: #FFFF00; /* Custom Register text color */
}
.page-index__btn-register:hover {
    background: #a30606;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.page-index__btn-login {
    background: #C30808; /* Custom Login color */
    color: #FFFF00; /* Custom Login text color */
}
.page-index__btn-login:hover {
    background: #a30606;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* --- 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-color: #1a1a1a; /* Slightly lighter than body bg for subtle contrast */
    color: #ffffff;
}

.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;
}

.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;
}

.page-index__video-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 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: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-index__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    object-fit: cover;
    pointer-events: none; /* Prevent video controls from blocking click event on parent <a> */
}

.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: 8px;
    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 4px rgba(0, 0, 0, 0.6);
    padding: 12px 25px;
    background: rgba(1, 116, 57, 0.8); /* Using primary color */
    border-radius: 5px;
    white-space: nowrap;
}

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

.page-index__play-now-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary-color, #017439);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
}

.page-index__play-now-button:hover {
    background: #005f2e; /* Darker shade of primary color */
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* --- Title Section --- */
.page-index__title-section {
    padding: 100px 20px;
    background: linear-gradient(135deg, var(--primary-color, #017439), #005f2e); /* Gradient for hero */
    color: #ffffff;
    text-align: center;
}

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

.page-index__main-title {
    font-size: 60px;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-index__title-description {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

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

/* --- About Section (Brand Intro) --- */
.page-index__about-section {
    padding: 80px 20px;
    background-color: var(--secondary-color, #ffffff);
    color: #333333;
}

.page-index__about-container {
    max-width: 1000px;
    margin: 0 auto;
}

.page-index__about-title {
    font-size: 38px;
    color: var(--primary-color, #017439);
    margin-bottom: 50px;
    text-align: center;
}

.page-index__about-intro {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 40px;
    text-align: justify;
}

.page-index__about-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.page-index__about-item {
    background-color: #f9f9f9;
    border-left: 5px solid var(--primary-color, #017439);
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-index__about-item-title {
    color: var(--primary-color, #017439);
    font-size: 22px;
    margin-bottom: 15px;
}

.page-index__about-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-index__about-features-list li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.page-index__about-features-list li::before {
    content: '✅';
    position: absolute;
    left: 0;
    color: var(--primary-color, #017439);
}

.page-index__about-image-wrapper {
    text-align: center;
    margin-top: 40px;
}

.page-index__about-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}


/* --- FAQ Section --- */
.page-index__faq-section {
    padding: 80px 20px;
    background-color: #1a1a1a; /* Dark background */
    color: #ffffff;
}

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

.page-index__faq-main-title {
    font-size: 38px;
    color: #ffffff;
    margin-bottom: 50px;
    text-align: center;
}

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

.page-index__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #282828; /* Slightly lighter dark background for items */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-index__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: #333333; /* Darker background for question */
    border: 1px solid #444444;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
    color: #ffffff;
}

.page-index__faq-question:hover {
    background: #444444;
    border-color: #555555;
}

.page-index__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none;
    color: #ffffff;
}

.page-index__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #999999;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.page-index__faq-item.active .page-index__faq-toggle {
    color: var(--primary-color, #017439);
    transform: rotate(45deg); /* Rotate to form an 'x' or use '-' */
}

.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;
    color: #e0e0e0;
}

.page-index__faq-item.active .page-index__faq-answer {
    max-height: 2000px !important; /* Sufficiently large */
    padding: 20px 25px !important;
    opacity: 1;
    background: #282828; /* Same as item background */
    border-radius: 0 0 8px 8px;
}

/* --- Blog Section --- */
.page-index__blog-section {
    padding: 80px 20px;
    background-color: var(--secondary-color, #ffffff);
    color: #333333;
}

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

.page-index__blog-title {
    font-size: 38px;
    color: var(--primary-color, #017439);
    margin-bottom: 50px;
    text-align: center;
}

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

.page-index__blog-item {
    background-color: #f9f9f9;
    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-index__blog-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-index__blog-link {
    text-decoration: none;
    color: inherit;
    display: block;
    padding-bottom: 20px;
}

.page-index__blog-item-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: 8px 8px 0 0;
}

.page-index__blog-item-title {
    font-size: 22px;
    color: var(--primary-color, #017439);
    margin: 0 20px 10px;
    line-height: 1.4;
}

.page-index__blog-item-excerpt {
    font-size: 16px;
    color: #555555;
    margin: 0 20px 15px;
    line-height: 1.6;
}

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

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
    .page-index__main-title {
        font-size: 50px;
    }
    .page-index__title-description {
        font-size: 18px;
    }
    .page-index h2 {
        font-size: 32px;
    }
    .page-index h3 {
        font-size: 20px;
    }
}

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

    .page-index__video-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .page-index__video-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
        overflow: hidden !important;
    }

    .page-index__video-link {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-index__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        border-radius: 4px;
        overflow: hidden !important;
    }

    .page-index__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        border-radius: 4px;
        object-fit: contain;
    }

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

    .page-index__video-cta {
        margin-top: 20px;
        padding-left: 15px;
        padding-right: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

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

    .page-index__title-section,
    .page-index__about-section,
    .page-index__faq-section,
    .page-index__blog-section {
        padding: 50px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .page-index__title-container,
    .page-index__about-container,
    .page-index__faq-container,
    .page-index__blog-container {
        padding: 0; /* Remove horizontal padding as section already has it */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-index__main-title {
        font-size: 36px;
        margin-bottom: 20px;
    }

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

    .page-index__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-index__cta-button {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 20px;
        font-size: 16px;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin: 0; /* Remove horizontal margin for full width */
    }

    .page-index h2 {
        font-size: 28px;
        margin-bottom: 30px;
    }
    .page-index h3 {
        font-size: 18px;
    }

    /* FAQ Mobile */
    .page-index__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-index__faq-question h3 {
        font-size: 16px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    .page-index__faq-toggle {
        margin-left: 10px;
        width: 28px;
        height: 28px;
        font-size: 24px;
    }
    .page-index__faq-answer {
        padding: 0 15px;
    }
    .page-index__faq-item.active .page-index__faq-answer {
        padding: 15px !important;
    }

    /* Blog Mobile */
    .page-index__blog-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-index__blog-item-image {
        height: 180px;
    }
    .page-index__blog-item-title {
        font-size: 18px;
        margin: 0 15px 8px;
    }
    .page-index__blog-item-excerpt {
        font-size: 15px;
        margin: 0 15px 12px;
    }
    .page-index__blog-item-date {
        margin: 0 15px;
    }

    /* General image responsiveness */
    .page-index img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    .page-index__about-image {
        max-width: 100% !important;
        height: auto !important;
    }
}

@media (max-width: 480px) {
    .page-index__main-title {
        font-size: 32px;
    }
    .page-index__title-description {
        font-size: 15px;
    }
    .page-index h2 {
        font-size: 24px;
    }
    .page-index__video-click-hint {
        font-size: 14px !important;
        padding: 8px 16px !important;
    }
    .page-index__play-now-button {
        font-size: 16px !important;
    }
    .page-index__faq-question h3 {
        font-size: 15px;
    }
}