/**
 * Global page surfaces — white backgrounds, no decorative card chrome.
 * Form controls, buttons, and nav dropdowns keep their borders.
 */

/* Protect overview card from global surface resets */
.overview-card {
    border: 1px solid rgba(0, 91, 154, 0.12) !important;
    box-shadow: 0 8px 28px rgba(0, 61, 107, 0.08) !important;
    background: #ffffff !important;
    border-radius: 16px !important;
}

body:has(.sa-page) {
    background: #f4f7fc !important;
}

.main-content,
.article-main,
.archive-main,
.participation-main,
.search-main,
.reserve-main,
.guidelines-main,
.about-main,
.login-main,
.register-main {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

/* Content cards / panels */
.section,
.article-card,
.article-card:hover,
.sidebar-box,
.archive-issue-card,
.archive-issue-card:hover,
.participation-card,
.search-card,
.search-result,
.search-result-item,
.search-empty,
.search-pagination,
.filter-sidebar,
.archive-toolbar,
.results-header,
.article-content,
.article-sidebar .sidebar-box,
.article-footer-section,
.methodology-box,
.cite-menu,
.related-item,
.supp-item,
.author-bio,
.reserve-note,
.about-box,
.contact-form-panel,
.contact-info-card,
.issue-toc-section,
.pagination,
.page-numbers,
.volume-item,
.keyword-tag {
    border: none !important;
    box-shadow: none !important;
}

.article-card:hover {
    transform: none;
    background-color: #ffffff !important;
}

.archive-issue-card:hover {
    transform: none;
}

/* Footer — force equal 3 columns (overrides stale cached grids) */
.footer .footer-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 28px !important;
    align-items: stretch !important;
    box-sizing: border-box !important;
    grid-template-columns: none !important;
}

.footer .footer-grid > .footer-col,
.footer .footer-grid > .footer-about,
.footer .footer-grid > .footer-links,
.footer .footer-grid > .footer-saee {
    flex: 1 1 0 !important;
    width: 33.333% !important;
    max-width: 33.333% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.footer .footer-saee {
    background: rgba(255, 255, 255, 0.14) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    border-radius: 14px !important;
    padding: 24px 22px !important;
    text-align: center !important;
}

.footer .footer-saee-title {
    text-align: center !important;
}

.footer .footer-saee-contact {
    align-items: center !important;
}

.footer .footer-saee .social-links {
    justify-content: center !important;
}

/* Force releases card title size (override cached CSS) */
.releases-list .release-card .release-card-title,
.releases-main a.release-card-title {
    font-size: 12px !important;
    line-height: 1.5 !important;
}

/* Issue page spacing (loads last) */
main.main-content.issue-main {
    padding-top: 0 !important;
    padding-bottom: 40px !important;
}

.page-header.issue-page-header {
    padding: 16px 0 12px !important;
}

.issue-main .issue-editorial-section.section {
    margin-top: 0 !important;
    margin-bottom: 16px !important;
    padding-top: 14px !important;
}

/* Issue articles: 2 per row, image beside text */
.articles-grid--issue {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px !important;
}

.articles-grid--issue .article-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 0 !important;
    overflow: hidden;
    border: 1px solid #e8edf3 !important;
    border-radius: 12px !important;
    background: #fff !important;
    min-height: 160px;
}

.articles-grid--issue .article-thumbnail {
    flex: 0 0 140px !important;
    width: 140px !important;
    height: auto !important;
    min-height: 160px;
    align-self: stretch;
}

.articles-grid--issue .article-thumbnail a {
    display: block;
    height: 100%;
}

.articles-grid--issue .article-thumbnail img {
    width: 140px !important;
    height: 100% !important;
    min-height: 160px;
    object-fit: cover !important;
    display: block;
}

.articles-grid--issue .article-card:hover .article-thumbnail img {
    transform: none;
}

.articles-grid--issue .article-category {
    font-size: 10px;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
}

.articles-grid--issue .article-content {
    flex: 1 !important;
    min-width: 0;
    padding: 14px 16px !important;
    display: flex;
    flex-direction: column;
    text-align: right !important;
    align-items: flex-start !important;
}

.articles-grid--issue .article-title {
    font-size: 15px !important;
    text-align: right !important;
    margin-bottom: 8px !important;
    -webkit-line-clamp: 2;
}

.articles-grid--issue .article-authors {
    text-align: right !important;
    justify-content: flex-start !important;
    width: 100%;
}

.articles-grid--issue .article-abstract {
    text-align: right !important;
    font-size: 13px !important;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.articles-grid--issue .article-footer {
    margin-top: auto;
    width: 100%;
    justify-content: flex-start !important;
}

@media (max-width: 900px) {
    .articles-grid--issue {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 576px) {
    .articles-grid--issue .article-card {
        flex-direction: column !important;
    }

    .articles-grid--issue .article-thumbnail,
    .articles-grid--issue .article-thumbnail img {
        width: 100% !important;
        height: 160px !important;
        min-height: 160px;
    }
}

.footer .footer-saee-contact a {
    color: rgba(255, 255, 255, 0.85) !important;
    justify-content: center !important;
}

.footer .footer-saee-contact a i,
.footer .footer-saee-contact i {
    color: #C9A34E !important;
}

.footer .footer-bottom {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    text-align: center !important;
}

.footer .footer-bottom .footer-copy {
    text-align: center !important;
    width: 100% !important;
    margin: 0 auto !important;
}

@media (max-width: 768px) {
    .footer .footer-grid {
        flex-wrap: wrap !important;
        flex-direction: column !important;
    }

    .footer .footer-grid > .footer-col,
    .footer .footer-grid > .footer-about,
    .footer .footer-grid > .footer-links,
    .footer .footer-grid > .footer-saee {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 auto !important;
    }
}
