:root {
    --page-index-bg: #140C0C;
    --page-index-card-bg: #2A1212;
    --page-index-text-main: #FFF1E8;
    --page-index-border: #6A1E1E;
    --page-index-gold: #F3C54D;
    --page-index-deep-red: #7E0D0D;
    --page-index-btn-gradient: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
    --page-index-primary-color: #C61F1F; /* Main color */
    --page-index-secondary-color: #E53030; /* Auxiliary color */
}

.page-index {
    background-color: var(--page-index-bg);
    color: var(--page-index-text-main);
    padding-left: 15px; /* Minimum padding for mobile */
    padding-right: 15px; /* Minimum padding for mobile */
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.page-index__hero-link {
    display: block;
    text-decoration: none;
    margin-top: 10px; /* Small top margin for first section */
}

.page-index__hero-banner {
    width: 100%;
    margin: 0;
    overflow: hidden;
}

.page-index__hero-banner img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 5; /* 1920x600 ratio */
    object-fit: cover;
    object-position: center;
    filter: none; /* Ensure no filter is applied */
}

.page-index__section-title-area {
    text-align: center;
    padding: 40px 0 30px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-index__section-title-line {
    width: 100%;
    max-width: 150px; /* Shorter lines for decoration */
    height: 2px;
    background-color: var(--page-index-border);
    margin: 10px auto;
}

.page-index__main-title {
    font-weight: bold;
    color: var(--page-index-gold);
    margin: 20px 0 10px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    padding: 0 10px; /* Small padding to prevent text touching edges on small screens */
    font-size: clamp(1.6rem, 4.5vw, 2.5rem); /* Adjusted clamp for H1 */
    max-width: 90%;
}

.page-index__intro-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 800px;
    padding: 0 15px;
}

.page-index__category-gateway-section {
    max-width: 1200px;
    margin: 30px auto 60px;
    padding: 0 15px;
}

.page-index__category-gateway {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, 1fr); /* Mobile default: 3 rows x 2 columns */
}

.page-index__category-card {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: transform .2s ease-in-out, box-shadow .2s ease-in-out;
    background-color: var(--page-index-card-bg);
}

.page-index__category-card:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.page-index__category-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    filter: none; /* Ensure no grayscale or other filters */
    transition: transform .2s ease;
    min-width: 200px; /* Enforce minimum size */
    min-height: 200px; /* Enforce minimum size */
}

.page-index__article-body {
    max-width: 800px;
    margin: 0 auto 80px;
    padding: 0 15px;
    line-height: 1.7;
    font-size: 1.05rem;
}

.page-index__blockquote {
    border-left: 4px solid var(--page-index-gold);
    padding-left: 20px;
    margin: 40px 0;
    font-style: italic;
    color: var(--page-index-text-main);
    background-color: var(--page-index-card-bg);
    padding: 20px;
    border-radius: 8px;
}

.page-index__blockquote a {
    color: var(--page-index-gold);
    text-decoration: none;
    font-weight: bold;
}

.page-index__blockquote a:hover {
    text-decoration: underline;
}

.page-index__article-heading {
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    color: var(--page-index-gold);
    margin: 50px 0 25px;
    font-weight: bold;
    line-height: 1.3;
}

.page-index__article-subheading {
    font-size: clamp(1.1rem, 2.8vw, 1.5rem);
    color: var(--page-index-primary-color);
    margin: 30px 0 15px;
    font-weight: 600;
}

.page-index__article-body p {
    margin-bottom: 1.2em;
}

.page-index__article-body ul {
    list-style: disc inside;
    margin-bottom: 1.5em;
    padding-left: 20px;
}

.page-index__article-body ul li {
    margin-bottom: 0.5em;
}

.page-index__article-body strong {
    color: var(--page-index-gold);
}

.page-index__article-figure {
    margin: 40px 0;
    text-align: center;
}

.page-index__article-figure img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    filter: none; /* Ensure no filter is applied */
    min-width: 200px; /* Enforce minimum size */
    min-height: 200px; /* Enforce minimum size */
}

.page-index__article-figure figcaption {
    font-size: 0.9rem;
    color: var(--page-index-text-main);
    margin-top: 10px;
    font-style: italic;
}

/* Links within article body */
.page-index__article-body a {
    color: var(--page-index-gold);
    text-decoration: none;
    font-weight: 500;
}

.page-index__article-body a:hover {
    text-decoration: underline;
}

.page-index__btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--page-index-text-main);
    background: var(--page-index-btn-gradient);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
}

.page-index__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-index__btn--register {
    margin-top: 40px;
    text-align: center;
    display: block;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive adjustments */
@media (min-width: 850px) {
    .page-index__category-gateway {
        grid-template-columns: repeat(6, 1fr); /* PC: one row of 6 */
    }
    .page-index__section-title-line {
        position: absolute;
        width: calc(50% - 250px); /* Adjust line length based on assumed title width */
        top: 60px; /* Align with title */
    }
    .page-index__section-title-line:first-of-type {
        left: 0;
    }
    .page-index__section-title-line:last-of-type {
        right: 0;
    }
    .page-index__section-title-area {
        padding-top: 60px;
        padding-bottom: 40px;
    }
    .page-index__main-title {
        max-width: 800px; /* Allow wider title on desktop */
    }
}

@media (max-width: 768px) {
    .page-index img {
        max-width: 100%;
        height: auto;
    }
    .page-index__main-title {
        font-size: clamp(1.6rem, 6vw, 2.5rem); /* Adjust clamp for smaller screens */
        padding: 0 10px;
    }
    .page-index__intro-text {
        padding: 0 10px;
    }
    .page-index__category-gateway-section {
        padding: 0 10px;
    }
    .page-index__article-body {
        padding: 0 10px;
    }
    .page-index__section-title-line {
        max-width: 100px; /* Shorter lines for mobile */
    }
}

@media (max-width: 549px) {
    .page-index__main-title {
        font-size: clamp(1.4rem, 7vw, 2rem); /* Further adjustment for very small screens */
    }
    .page-index__article-body ul {
        padding-left: 15px; /* Adjust list padding for smaller screens */
    }
}

/* Enforce minimum size for all content area images */
.page-index img:not(.shared-header img, .shared-footer img) {
    min-width: 200px;
    min-height: 200px;
}
.page-index__article-figure img {
    width: auto; /* Allow image to size itself within max-width */
}