.page-index {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default dark text for light background */
    background-color: #ffffff; /* Assuming default body background is white */
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* --- Module 1: Full-width Main Banner --- */
.page-index__hero-section {
    padding-top: 10px; /* Small top padding, assuming body has padding-top from shared.css */
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

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

/* --- Module 2: Three Main Buttons Bar --- */
.page-index__access-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 1250px;
    margin: 0 auto;
    padding: 30px 12px;
    box-sizing: border-box;
}

.page-index__btn-access-link {
    background: #26A9E0; /* Primary brand color */
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    display: block;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-index__btn-access-link:hover {
    background: #1e87c2; /* Slightly darker shade */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* --- Module 3: Brand Main Title + Intro --- */
.page-index__brand-intro {
    max-width: 1250px;
    margin: 0 auto;
    padding: 20px 12px;
    box-sizing: border-box;
    text-align: center;
}

.page-index__main-title {
    font-size: clamp(2em, 4vw, 2.8em); /* Responsive H1 font size */
    color: #26A9E0; /* Brand color for title */
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.page-index__intro-text {
    font-size: 1.1em;
    color: #555555;
    max-width: 900px;
    margin: 0 auto;
    text-align: justify;
}

/* --- Module 4: Game Lobby Entry --- */
.page-index__category-lobby {
    max-width: 1250px;
    margin: 40px auto;
    padding: 20px 12px;
    box-sizing: border-box;
}

.page-index__section-title {
    font-size: clamp(1.8em, 3.5vw, 2.5em);
    color: #333333;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    font-weight: 600;
}

.page-index__section-title::before,
.page-index__section-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 60px;
    height: 2px;
    background: #26A9E0;
    transform: translateY(-50%);
}

.page-index__section-title::before {
    left: 0;
    margin-left: calc(50% - 150px - 60px); /* Adjust based on title width */
}

.page-index__section-title::after {
    right: 0;
    margin-right: calc(50% - 150px - 60px); /* Adjust based on title width */
}

.page-index__category-lobby__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-top: 30px;
}

.page-index__category-card,
.page-index__category-card-link {
    display: block;
    border: none;
    box-shadow: none;
    outline: none;
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    width: 100%; /* Ensure card takes full width of its grid cell */
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-index__category-card-link img {
    aspect-ratio: 1 / 1; /* Enforce square aspect ratio */
    width: 100%;
    height: auto;
    object-fit: contain; /* Ensure image fits within bounds without cropping */
    display: block;
    border: none;
    box-shadow: none;
    border-radius: 0;
    transition: transform 0.3s ease;
    min-width: 200px; /* Minimum size requirement */
    min-height: 200px; /* Minimum size requirement */
}

.page-index__category-card-link:hover img {
    transform: translateY(-5px);
}

/* --- Module 5: Member Info · Blog Card Slider --- */
.page-index__blog-slider-section {
    max-width: 1250px;
    margin: 40px auto;
    padding: 20px 12px;
    box-sizing: border-box;
    position: relative; /* For slider arrows */
}

.page-index__blog-slider-container {
    position: relative;
    overflow: hidden; /* Hide scrollbar but allow scrolling */
    padding: 20px 0;
}

.page-index__blog-slider-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    padding-bottom: 10px; /* Space for potential scrollbar */
}

.page-index__blog-slider-track::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari, Opera */
}

.page-index__post-item {
    flex: 0 0 calc(33.333% - 11px); /* 3 items per row on desktop */
    scroll-snap-align: start;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 280px; /* Ensure card is not too small */
}

.page-index__post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.page-index__post-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.page-index__post-image-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

.page-index__post-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-width: 200px; /* Minimum size requirement */
    min-height: 200px; /* Minimum size requirement */
}

.page-index__post-date {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #26A9E0;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: bold;
}

.page-index__post-item h5.page-index__post-title {
    font-size: 1.2em;
    color: #26A9E0; /* Brand color for blog titles */
    margin: 15px;
    line-height: 1.4;
    font-weight: 600;
}

.page-index__post-item p.page-index__post-excerpt {
    font-size: 0.95em;
    color: #666666;
    margin: 0 15px 15px;
}

.page-index__blog-slider-prev,
.page-index__blog-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border: none;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5em;
    z-index: 10;
    transition: background-color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.page-index__blog-slider-prev {
    left: 0;
    margin-left: 10px;
}

.page-index__blog-slider-next {
    right: 0;
    margin-right: 10px;
}

/* --- General Responsive Overrides --- */

/* Mobile: Banner */
@media (max-width: 849px) {
    .page-index__hero-image img {
        object-fit: contain !important;
        aspect-ratio: unset !important;
        max-height: none !important;
    }
}

/* Mobile: General for 768px and below */
@media (max-width: 768px) {
    .page-index {
        font-size: 16px;
        line-height: 1.6;
    }

    /* Module 2: Three Main Buttons Bar - Mobile */
    .page-index__access-links {
        grid-template-columns: 1fr; /* Single column */
        padding: 20px 15px;
        gap: 10px;
    }
    
    .page-index__btn-access-link {
        padding: 12px 15px;
        font-size: 1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* Module 3: Brand Main Title + Intro - Mobile */
    .page-index__brand-intro {
        padding: 15px;
    }

    .page-index__main-title {
        font-size: clamp(1.8em, 6vw, 2.2em);
    }

    .page-index__intro-text {
        font-size: 1em;
        text-align: left;
    }

    /* Module 4: Game Lobby Entry - Mobile */
    .page-index__category-lobby {
        margin: 30px auto;
        padding: 15px;
    }

    .page-index__section-title {
        font-size: clamp(1.5em, 5vw, 2em);
        margin-bottom: 20px;
    }
    
    .page-index__section-title::before,
    .page-index__section-title::after {
        width: 30px; /* Shorter lines for mobile */
        margin-left: calc(50% - 100px - 30px); /* Adjust for smaller title */
        margin-right: calc(50% - 100px - 30px);
    }

    .page-index__category-lobby__grid {
        grid-template-columns: repeat(2, 1fr); /* Two columns for mobile */
        gap: 10px;
    }

    /* Module 5: Member Info · Blog Card Slider - Mobile */
    .page-index__blog-slider-section {
        margin: 30px auto;
        padding: 15px;
    }

    .page-index__blog-slider-container {
        padding: 10px 0;
    }

    .page-index__post-item {
        flex: 0 0 85%; /* Show approx 1.2 items, one main item */
        min-width: unset; /* Allow flexibility */
    }
    
    .page-index__post-item h5.page-index__post-title {
        font-size: 1.1em;
        margin: 10px;
    }

    .page-index__post-item p.page-index__post-excerpt {
        font-size: 0.9em;
        margin: 0 10px 10px;
    }

    .page-index__blog-slider-prev,
    .page-index__blog-slider-next {
        padding: 8px 12px;
        font-size: 1.2em;
        width: 35px;
        height: 35px;
        margin-left: 5px;
        margin-right: 5px;
    }

    /* All images responsive */
    .page-index img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-index__section,
    .page-index__card,
    .page-index__container,
    .page-index__category-lobby,
    .page-index__blog-slider-section,
    .page-index__access-links,
    .page-index__brand-intro {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Ensure no text overflow in buttons */
    .page-index a[class*="button"],
    .page-index 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;
    }
    
    /* Button containers mobile adaptation */
    .page-index__cta-buttons,
    .page-index__button-group,
    .page-index__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;
    }
    
    .page-index__access-links {
        display: flex;
        flex-direction: column;
    }
}