/* Homepage section order */
body.page_index {
    display: flex;
    flex-direction: column;
}

body.page_index > header.main-header {
    order: 1;
}

body.page_index > aside {
    display: contents;
}

body.page_index > aside .additional-home-content {
    display: contents;
}

/* 1. Intro */
body.page_index > aside .stel-home-intro-section {
    order: 2;
}

/* 2. Announcements */
body.page_index > main#immersion_content_main {
    order: 3;
    width: 100%;
}

/* 3. Calls for Papers */
body.page_index > aside .stel-cfp-section {
    order: 4;
}

/* 4. Previous Special Issues */
body.page_index > aside .stel-issues-grid-section {
    order: 5;
}

body.page_index > footer.main-footer {
    order: 6;
}

body.page_index > #loginModal {
    order: 7;
}

/* Width wrapper */
.stel-page-width {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

@media (min-width: 576px) {
    .stel-page-width {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .stel-page-width {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .stel-page-width {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .stel-page-width {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .stel-page-width {
        max-width: 1320px;
    }
}

/* Intro + LinkedIn section */
.stel-home-intro-section {
    width: 100%;
    padding: 2.5rem 0 2rem;
}

.stel-intro-with-sidebar {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.stel-intro-main {
    flex: 1 1 auto;
    min-width: 0;
}

.stel-intro-main p {
    font: inherit;
    color: inherit;
    line-height: inherit;
    margin: 0 0 1em 0;
}

/* Ensure consistent body text across sections */
.stel-cfp-content p,
.stel-issues-grid-section p {
    font: inherit;
    color: inherit;
    line-height: inherit;
    margin: 0 0 1em 0;
}

.stel-intro-sidebar {
    flex: 0 0 320px;
    max-width: 320px;
    width: 100%;
    padding-top: 0.5rem;
}

.stel-intro-sidebar iframe {
    display: block;
    width: 100%;
    height: 460px;
    border: 0;
}

.stel-intro-with-sidebar {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.stel-intro-main {
    padding-top: 2rem;
}

/* Announcements */
.announcements.section_dark {
    margin: 0;
}

/* Shared heading styling */
.stel-issues-grid-section .stel-special-issues-heading,
.stel-cfp-section .stel-special-issues-heading {
    font-family: 'Spectral', serif !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.025em !important;
    margin: 3.5rem 0 1.5rem 0 !important;
    color: #000 !important;
}

/* Calls for papers */
.stel-cfp-section {
    width: 100%;
    padding: 3rem 0;
    background: #ffffff;
}

.stel-cfp-panel {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.stel-cfp-image {
    flex: 0 0 300px;
    max-width: 300px;
    width: 100%;
}

.stel-cfp-image img {
    display: block;
    width: 100%;
    height: auto;
}

.stel-cfp-content {
    flex: 1 1 auto;
    min-width: 0;
}

.stel-cfp-title {
    font-family: 'Spectral', serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 0.75rem 0;
}

.stel-cfp-editors {
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.stel-cfp-button {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.65rem 1.2rem;
    background: #1F5F73;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.2s ease;
}

.stel-cfp-button:hover {
    background: #174c5c;
}

/* Special issues */
.stel-issues-grid-section {
    width: 100%;
    padding: 3rem 0;
    margin-top: 2.5rem;
    background: #f7f9fa;
}

.stel-issues-grid-intro {
    margin-bottom: 2rem;
}

/* Grid */
.stel-issues-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.stel-issue-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ffffff;
    border: 1px solid #d7e0e5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-decoration: none !important;
}

.stel-issue-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.stel-issue-card-title {
    padding: 1rem;
    font-size: 0.98rem;
    font-weight: 600;
    text-align: center;
}

/* Responsive */
@media (max-width: 991px) {
    .stel-intro-with-sidebar {
        display: block;
    }

    .stel-intro-sidebar {
        margin-top: 1.5rem;
        max-width: 100%;
    }

    .stel-issues-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stel-cfp-panel {
        flex-direction: column;
    }
}

@media (max-width: 575px) {
    .stel-issues-grid {
        grid-template-columns: 1fr;
    }
}