/* ========================================
   CLEAN COSMETIC ENHANCEMENTS
   (No validator warnings - pure CSS3+)
   ======================================== */

/* ------------------------------
   GLOBAL IMPROVEMENTS
   ------------------------------ */
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

/* Optional: Limit maximum width on very large screens for better readability */
.page-content {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Simple fade-in for page content - using opacity + transition */
main, .container {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Subtle border radius on cards */
.card, .obj_article_summary, .issue-summary {
    border-radius: 20px !important;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.card:hover, .obj_article_summary:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.12);
}

/* ------------------------------
   HEADER - Clean sticky header
   ------------------------------ */
.main-header {
    background: #ffffff !important;
    /* position: sticky;
    top: 0; */
    z-index: 1030;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

/* Logo refinement */
.navbar-brand img,
.navbar-logo img {
    max-height: 65px;
}

/* ------------------------------
   NAVIGATION - Modern & spacious
   ------------------------------ */
.navbar-nav .nav-link {
    font-weight: 550;
    position: relative;
    margin: 0 0.15rem;
    border-radius: 50px;
    transition: all 0.25s ease;
}

/* Underline animation on hover (clean, no background color change) */
.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 3px;
    background: #981b1f;
    border-radius: 3px;
    transition: width 0.25s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 70%;
}

.navbar-nav .nav-link:hover {
    background: transparent !important;
    color: #981b1f !important;
    transform: translateY(-1px);
}

/* ------------------------------
   DROPDOWNS - Clean and elevated
   ------------------------------ */
.dropdown-menu {
    border-radius: 16px !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    padding: 0.6rem 0 !important;
    margin-top: 0.6rem !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1) !important;
}

.dropdown-item {
    padding: 0.65rem 1.6rem !important;
    font-weight: 480;
    color: #1e2a3e !important;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #f8f3f3 !important;
    color: #981b1f !important;
    border-left-color: #981b1f;
    padding-left: 1.9rem !important;
}

/* ------------------------------
   "MAKE A SUBMISSION" BUTTON
   ------------------------------ */
.nav-item.nmi_type_submissions .nav-link,
.navbar-nav .nav-item:last-child .nav-link {
    background: transparent !important;
    border: 2px solid #981b1f !important;
    color: #981b1f !important;
    font-weight: 700 !important;
    transition: all 0.25s ease;
}

.nav-item.nmi_type_submissions .nav-link:hover,
.navbar-nav .nav-item:last-child .nav-link:hover {
    background: #981b1f !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(152, 27, 31, 0.25) !important;
}

.nav-item.nmi_type_submissions .nav-link:hover::after,
.navbar-nav .nav-item:last-child .nav-link:hover::after {
    width: 0;
}

/* ------------------------------
   USER BADGE & DROPDOWN
   ------------------------------ */
.badge-light {
    background: rgba(152, 27, 31, 0.1) !important;
    color: #981b1f !important;
    font-weight: 600;
    border-radius: 40px;
    padding: 0.2rem 0.7rem;
    font-size: 0.75rem;
}

.nav-item.nmi_type_user_dashboard .nav-link {
    background: rgba(152, 27, 31, 0.08) !important;
    color: #981b1f !important;
    border-radius: 60px;
    font-weight: 600;
    transition: all 0.25s ease;
}

.nav-item.nmi_type_user_dashboard .nav-link:hover {
    background: rgba(152, 27, 31, 0.15) !important;
    transform: translateY(-1px);
}

/* User dropdown menu - stable positioning */
.nav-item.nmi_type_user_dashboard .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    margin-top: 0.5rem !important;
}

/* ------------------------------
   HOMEPAGE ISSUE SECTION
   ------------------------------ */
.container-homepage-issue .row .col-lg-9 {
    max-width: 91.666% !important;
    flex: 0 0 91.666% !important;
}

.container-homepage-issue {
    background: white;
    border-radius: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    padding: 2.5rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.homepage-issue-current {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem !important;
    color: #981b1f;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.homepage-issue-identifier {
    font-size: 2.8rem !important;
    font-weight: 800;
    background: linear-gradient(135deg, #981b1f, #7a1518);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.25rem;
}

.homepage-issue-published {
    color: #7f8c8d;
    font-size: 1rem;
    border-bottom: 2px solid #981b1f20;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.issue-toc-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

/* Safer underline that works everywhere (replaces border-image) */
.issue-toc-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(95deg, #981b1f, #7a1518);
    border-radius: 3px;
}

.article-summary {
    background: #ffffff;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
    border: 1px solid #eef2f6;
}

.article-summary:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(152, 27, 31, 0.3);
}

.article-summary-authors {
    font-size: 0.85rem;
    color: #981b1f;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.article-summary-pages {
    font-size: 0.8rem;
    color: #95a5a6;
    font-weight: 500;
}

.article-summary-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.article-summary-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-summary-title a:hover {
    color: #981b1f;
}

/* PDF Button - Brick red */
.article-summary-galleys .btn-primary {
    background: #981b1f !important;
    color: #ffffff !important;
    border: none;
    border-radius: 40px;
    padding: 0.35rem 1.2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.article-summary-galleys .btn-primary:hover {
    background: #7a1518 !important;
    color: #ffffff !important;
    transform: scale(1.05);
    box-shadow: 0 8px 18px rgba(152, 27, 31, 0.4);
}

/* View All Issues button */
.text-center .btn {
    background: transparent;
    border: 2px solid #981b1f;
    color: #981b1f;
    border-radius: 50px;
    padding: 0.6rem 2rem;
    font-weight: 700;
    margin-top: 2rem;
    transition: all 0.3s ease;
}

.text-center .btn:hover {
    background: linear-gradient(135deg, #981b1f, #7a1518);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(152, 27, 31, 0.3);
}

/* ------------------------------
   ANIMATIONS
   ------------------------------ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ------------------------------
   RESPONSIVE TWEAKS
   ------------------------------ */
@media (max-width: 768px) {
    .container-homepage-issue {
        padding: 1.5rem;
        border-radius: 24px;
    }
    
    .homepage-issue-identifier {
        font-size: 1.8rem !important;
    }
    
    .article-summary {
        padding: 1rem;
    }
    
    .article-summary-title {
        font-size: 1rem;
    }
}

/* ------------------------------
   MODAL STYLES
   ------------------------------ */
.modal-content {
    background: #ffffff;
    border: none;
    border-radius: 32px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.modal .btn-primary {
    background: linear-gradient(135deg, #981b1f, #7a1518);
    border: none;
    border-radius: 40px;
    padding: 0.6rem 1.5rem;
}

/* ------------------------------
   SCROLLBAR - Fixed to match brick red theme
   ------------------------------ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #981b1f, #7a1518);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7a1518, #5a0f12);
}

/* Firefox scrollbar support */
* {
    scrollbar-width: thin;
    scrollbar-color: #981b1f #f1f1f1;
}

/* ------------------------------
   ARCHIVES PAGE
   ------------------------------ */

/* Main container */
.page-archives {
    padding: 2rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Page Header */
.page-archives-header {
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.page-archives-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a2a3a;
    display: inline-block;
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 0;
}

.page-archives-header h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #981b1f, #7a1518);
    border-radius: 4px;
}

/* Issue Cards Grid */
.page-archives .row {
    margin-bottom: 2rem;
}

/* Issue Card - Modern styling */
.issue-summary {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #eef2f6;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.issue-summary:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px -12px rgba(152, 27, 31, 0.15);
    border-color: rgba(152, 27, 31, 0.2);
}

/* Cover Image */
.issue-summary-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.issue-summary:hover .issue-summary-cover {
    transform: scale(1.02);
}

/* Card Body */
.issue-summary .card-body {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Issue Title/Series */
.issue-summary-series {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.issue-summary-series a {
    color: #1a2a3a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.issue-summary-series a:hover {
    color: #981b1f;
}

/* Issue Date */
.issue-summary-date {
    color: #7f8c8d;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Issue Summary Title (volume info) */
.issue-summary-title {
    color: #981b1f;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 0;
}

/* Card Text container */
.issue-summary .card-text {
    margin-top: auto;
}

/* Grid spacing - ensures cards look good in all screen sizes */
.page-archives .col-md-3 {
    margin-bottom: 1.5rem;
}

/* Make empty columns invisible but preserve grid */
.page-archives .col-md-3:empty {
    display: none;
}

/* ------------------------------
   RESPONSIVE DESIGN
   ------------------------------ */

/* Tablet */
@media (max-width: 991px) {
    .page-archives-header h1 {
        font-size: 2rem;
    }
    
    .issue-summary-series {
        font-size: 1rem;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .page-archives {
        padding: 1rem;
    }
    
    .page-archives-header {
        margin-bottom: 2rem;
    }
    
    .page-archives-header h1 {
        font-size: 1.75rem;
    }
    
    .page-archives-header h1::after {
        width: 60px;
        height: 3px;
    }
    
    .issue-summary {
        border-radius: 16px;
    }
    
    .issue-summary .card-body {
        padding: 1rem;
    }
    
    .issue-summary-series {
        font-size: 0.95rem;
    }
    
    .page-archives .col-md-3 {
        margin-bottom: 1rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .issue-summary-series {
        font-size: 0.9rem;
    }
    
    .issue-summary-date {
        font-size: 0.7rem;
    }
}

/* ------------------------------
   ANIMATION - Subtle fade-in for cards
   ------------------------------ */
.issue-summary {
    animation: fadeInUp 0.4s ease-out;
    animation-fill-mode: both;
}

/* Staggered animation for cards */
.page-archives .row:nth-child(1) .issue-summary { animation-delay: 0.05s; }
.page-archives .row:nth-child(2) .issue-summary { animation-delay: 0.1s; }
.page-archives .row:nth-child(3) .issue-summary { animation-delay: 0.15s; }
.page-archives .row:nth-child(4) .issue-summary { animation-delay: 0.2s; }
.page-archives .row:nth-child(5) .issue-summary { animation-delay: 0.25s; }
.page-archives .row:nth-child(6) .issue-summary { animation-delay: 0.3s; }
.page-archives .row:nth-child(7) .issue-summary { animation-delay: 0.35s; }

/* ------------------------------
   EMPTY STATE HANDLING
   ------------------------------ */
/* Hide empty columns that OJS sometimes generates */
.page-archives .col-md-3:empty,
.page-archives .col-lg-2:empty {
    display: none;
}

/* Ensure rows with only empty columns don't create extra spacing */
.page-archives .row:has(.col-md-3:only-child:empty) {
    display: none;
}

/* ------------------------------
   EDITORIAL POLICIES PAGE
   ------------------------------ */
/* Make Editorial Policies page full width */
.page-custom .row.justify-content-md-center .col-md-8 {
    max-width: 100%;
    flex: 0 0 100%;
}

/* Main container */
.page-custom {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Page Header */
.page-custom .page-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.page-custom .page-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1a2a3a;
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 0;
    letter-spacing: -0.5px;
}

.page-custom .page-header h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #981b1f, #7a1518);
    border-radius: 4px;
}

/* Content area */
.page-custom .page-content {
    background: #ffffff;
    border-radius: 28px;
    padding: 2.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid #eef2f6;
}

/* Typography improvements */
.page-custom .page-content p {
    color: #334155;
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 1.25rem;
}

/* Headings within content */
.page-custom .page-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a2a3a;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(152, 27, 31, 0.2);
}

.page-custom .page-content h3:first-of-type {
    margin-top: 0;
}

/* Subheadings (h4 if any) */
.page-custom .page-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

/* Lists */
.page-custom .page-content ul,
.page-custom .page-content ol {
    color: #334155;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.page-custom .page-content li {
    margin-bottom: 0.5rem;
}

.page-custom .page-content ul li::marker {
    color: #981b1f;
}

.page-custom .page-content ol li::marker {
    color: #981b1f;
    font-weight: 600;
}

/* Nested lists */
.page-custom .page-content ul ul,
.page-custom .page-content ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Blockquotes (for fee information etc.) */
.page-custom .page-content blockquote {
    background: linear-gradient(135deg, #fef6f6, #ffffff);
    border-left: 4px solid #981b1f;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 16px;
    font-style: normal;
    box-shadow: 0 2px 8px rgba(152, 27, 31, 0.05);
}

.page-custom .page-content blockquote p {
    margin-bottom: 0.5rem;
}

.page-custom .page-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Links */
.page-custom .page-content a {
    color: #981b1f;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px dotted transparent;
}

.page-custom .page-content a:hover {
    color: #7a1518;
    border-bottom-color: #981b1f;
}

/* Small text (update date) */
.page-custom .page-content p em small,
.page-custom .page-content small {
    color: #7f8c8d;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 1rem;
}

/* Section dividers (for each policy section) */
.page-custom .page-content div[id] {
    scroll-margin-top: 20px;
}

/* Numbered list styling (ICMJE criteria) */
.page-custom .page-content ol:not([class]) {
    list-style-type: none;
    counter-reset: custom-counter;
    padding-left: 0;
}

.page-custom .page-content ol:not([class]) li {
    counter-increment: custom-counter;
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 2rem;
}

.page-custom .page-content ol:not([class]) li::before {
    content: counter(custom-counter) ".";
    position: absolute;
    left: 0;
    color: #981b1f;
    font-weight: 700;
}

/* Special styling for the fee block */
.page-custom .page-content #fees blockquote {
    background: linear-gradient(135deg, #981b1f08, #ffffff);
    border-left-width: 4px;
}

/* Competing interests and funding sections */
.page-custom .page-content #interests ul,
.page-custom .page-content #interests ol {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    margin: 1rem 0;
}

/* License agreement section (numbered with nested lists) */
.page-custom .page-content #license ol {
    background: #f8fafc;
    padding: 1.5rem 2rem;
    border-radius: 20px;
    list-style-type: none;
    counter-reset: license-counter;
}

.page-custom .page-content #license ol li {
    counter-increment: license-counter;
    margin-bottom: 1rem;
    position: relative;
    padding-left: 2rem;
}

.page-custom .page-content #license ol li::before {
    content: counter(license-counter) ".";
    position: absolute;
    left: 0;
    color: #981b1f;
    font-weight: 700;
}

.page-custom .page-content #license ol ul {
    background: transparent;
    padding: 0.5rem 0 0.5rem 1.5rem;
    margin: 0.5rem 0 0 0;
    border-radius: 0;
}

/* Horizontal rule separators */
.page-custom .page-content hr {
    margin: 2rem 0;
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #981b1f30, transparent);
}

/* ------------------------------
   RESPONSIVE DESIGN
   ------------------------------ */

/* Tablet */
@media (max-width: 991px) {
    .page-custom .page-header h1 {
        font-size: 1.8rem;
    }
    
    .page-custom .page-content {
        padding: 1.8rem;
        border-radius: 24px;
    }
    
    .page-custom .page-content h3 {
        font-size: 1.35rem;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .page-custom {
        padding: 1rem;
    }
    
    .page-custom .page-header {
        margin-bottom: 1.5rem;
    }
    
    .page-custom .page-header h1 {
        font-size: 1.5rem;
    }
    
    .page-custom .page-header h1::after {
        width: 60px;
        height: 3px;
    }
    
    .page-custom .page-content {
        padding: 1.25rem;
        border-radius: 20px;
    }
    
    .page-custom .page-content p,
    .page-custom .page-content li {
        font-size: 0.95rem;
        line-height: 1.65;
    }
    
    .page-custom .page-content h3 {
        font-size: 1.25rem;
        margin-top: 1.5rem;
    }
    
    .page-custom .page-content blockquote {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .page-custom .page-content #license ol {
        padding: 1rem;
    }
    
    .page-custom .page-content #license ol li {
        padding-left: 1.5rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .page-custom .page-content {
        padding: 1rem;
        border-radius: 16px;
    }
    
    .page-custom .page-header h1 {
        font-size: 1.3rem;
    }
    
    .page-custom .page-content h3 {
        font-size: 1.15rem;
    }
    
    .page-custom .page-content blockquote {
        padding: 0.875rem;
    }
}

/* Responsive improvements for all content pages */
@media (max-width: 768px) {
    .page-content {
        padding: 1.25rem !important;
    }
    
    .page-content h2 {
        font-size: 1.3rem !important;
    }
    
    .page-content h3 {
        font-size: 1.15rem !important;
    }
    
    .page-content p,
    .page-content li {
        font-size: 0.9rem !important;
    }
    
    /* Make nested lists more readable on mobile */
    .page-content ol ol,
    .page-content ul ul {
        padding-left: 1rem !important;
    }
    
    /* Top menu links (if present) */
    #topMenu li {
        margin-bottom: 0.5rem;
    }
    
    #topMenu a {
        font-size: 0.85rem;
    }
}

/* ------------------------------
   PRINT STYLES (for saving/printing policies)
   ------------------------------ */
@media print {
    .page-custom {
        padding: 0;
    }
    
    .page-custom .page-content {
        box-shadow: none;
        border: 1px solid #ddd;
        padding: 1rem;
    }
    
    .page-custom .page-content a {
        color: #000;
        text-decoration: underline;
    }
    
    .page-custom .page-header h1::after {
        background: #000;
    }
}

/* Make Author Guidelines page full width */
.page-submissions .row.justify-content-md-center .col-md-8 {
    max-width: 100%;
    flex: 0 0 100%;
}

/* Make About the Journal page full width */
.page-about .row.justify-content-md-center .col-md-8 {
    max-width: 100%;
    flex: 0 0 100%;
}

/* ------------------------------
   FOOTER STYLING
   ------------------------------ */
footer, .pkp_structure_footer, .site-footer {
    background: #f8f9fc;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 2.5rem 0 1.5rem;
    margin-top: 3rem;
}

footer a, .pkp_structure_footer a {
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px dotted transparent;
}

footer a:hover, .pkp_structure_footer a:hover {
    border-bottom-color: #981b1f;
    color: #981b1f !important;
}

/* ------------------------------
   SIDEBAR - Modern card styling
   ------------------------------ */
.sidebar, .pkp_block, .block {
    background: white;
    border-radius: 20px;
    padding: 1.2rem 1.5rem !important;
    margin-bottom: 1.8rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.sidebar:hover, .pkp_block:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: rgba(152, 27, 31, 0.2);
}

.sidebar h3, .pkp_block h3, .block h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #981b1f;
    display: inline-block;
}

/* ------------------------------
   RIGHT SIDEBAR SPECIFIC
   ------------------------------ */
.col-right .sidebar, 
.right-sidebar .sidebar,
aside .sidebar {
    background: #ffffff;
    border-radius: 24px;
    padding: 1.5rem !important;
    margin-bottom: 2rem;
}

/* ------------------------------
   FORMS & INPUTS
   ------------------------------ */
input, select, textarea, .form-control {
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    padding: 0.7rem 1rem !important;
    transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus, .form-control:focus {
    border-color: #981b1f !important;
    box-shadow: 0 0 0 3px rgba(152, 27, 31, 0.1) !important;
    outline: none;
}

button, .btn {
    border-radius: 40px !important;
    padding: 0.6rem 1.4rem !important;
    font-weight: 600 !important;
    transition: all 0.25s ease !important;
}

.btn-primary {
    background: #981b1f !important;
    border: none !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(152, 27, 31, 0.3);
}

/* ------------------------------
   RESPONSIVE DESIGN
   ------------------------------ */
@media (max-width: 991.98px) {
    .navbar-nav .nav-link::after {
        display: none;
    }
    
    .sidebar, .col-right .sidebar {
        border-radius: 16px;
        margin-bottom: 1.2rem;
    }
    
    .main-header {
        position: relative;
    }
}

/* ========================================
   COMPLETE FOOTER CSS - brick red accent line
   ======================================== */

/* Main Footer Container */
.site-footer {
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
    margin-top: 4rem;
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #981b1f, #c62828, #981b1f);
}

/* Sidebar Section (Partner Logos) */
.site-footer-sidebar {
    background: rgba(15, 23, 42, 0.6);
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Footer partner logos - Horizontal flow on ALL screens */
.site-footer-sidebar .row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center;
    align-items: flex-start;      /* Align items at top */
    gap: 1.5rem 2rem;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem;
}

.site-footer-sidebar .row > * {
    flex-direction: row !important;
}

/* Each logo block - CRITICAL: prevents full width on mobile */
.site-footer-sidebar .pkp_block {
    background: transparent;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
    border-radius: 8px;
    width: auto !important;        /* Override any forced width */
    max-width: none !important;    /* Remove max-width limits */
    flex: 0 0 auto !important;     /* Never grow, never shrink to full width */
    display: block !important;     /* Keep as block but flex handles layout */
}

/* Logo images */
.site-footer-sidebar .pkp_block img {
    max-height: 45px;
    width: auto;
    opacity: 0.8;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;                /* Center image inside block */
}

/* Text labels under logos (if any) */
.site-footer-sidebar .pkp_block .content p,
.site-footer-sidebar .pkp_block .content {
    text-align: center;
    margin: 0;
}

.site-footer-sidebar .pkp_block:hover img {
    opacity: 1;
    transform: scale(1.05);
}

/* Mobile: STILL horizontal flow, just smaller gaps */
@media (max-width: 768px) {
    .site-footer-sidebar .row {
        gap: 1rem 1.25rem;
        justify-content: center;
    }
    
    .site-footer-sidebar .pkp_block {
        width: auto !important;
        max-width: none !important;
        flex: 0 0 auto !important;
    }
    
    .site-footer-sidebar .pkp_block img {
        max-height: 35px;
    }
}

@media (max-width: 480px) {
    .site-footer-sidebar .row {
        gap: 0.75rem 1rem;
    }
    
    .site-footer-sidebar .pkp_block img {
        max-height: 30px;
    }
}

/* Top Row - Three columns */
.footer-top-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;  /* Centers the group of boxes */
    gap: 2rem;                /* Space between boxes */
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Each box - content left-aligned, flexible width */
.footer-box.journal-info,
.footer-box.credits-info {
    flex: 0 1 auto;           /* Don't grow, shrink if needed */
    min-width: 220px;         /* Minimum width before wrapping */
    text-align: left;         /* Content inside stays left-aligned */
}

.ojs-branding-wrapper {
    flex: 1;
    min-width: 120px;
    text-align: right;
}

.footer-box-title {
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.footer-box-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;                  /* Left-aligned underline */
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #c62828, #981b1f);
    border-radius: 2px;
}


.journal-info p, .credits-info p {
    color: #cbd5e1;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.journal-info strong, .credits-info strong {
    color: #ffffff;
    font-weight: 600;
    min-width: 65px;
    display: inline-block;
}

.journal-info a {
    color: #ef9a9a;
    text-decoration: none;
}

.journal-info a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.custom-ojs-brand {
    max-height: 35px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.custom-ojs-brand:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* Bottom Row - License Info */
.footer-bottom-row {
    width: 100%;
}

.license-info {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.license-text {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 0;
    text-align: center;
}

.license-text a {
    color: #ef9a9a;
    text-decoration: none;
}

.license-text a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Hide duplicate OJS logo */
.site-footer-content .col-md-2,
.site-footer-content .col-md-2.align-self-center.text-right,
.col-md-2.align-self-center.text-right,
.site-footer-content .col-md-2 .footer-brand-image,
.footer-brand-image {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .site-footer-sidebar {
        padding: 1rem 0.5rem;
    }
    
    .site-footer-sidebar .row {
        gap: 0.5rem 0.75rem;
    }
    
    .site-footer-sidebar .pkp_block img {
        max-height: 35px;
    }
    
    .site-footer-content {
        padding: 1.5rem;
    }
    
    .footer-top-row {
        flex-direction: column;
        align-items: center;   /* Centers each box horizontally when stacked */
        gap: 1.5rem;
    }
    
    .footer-box.journal-info,
    .footer-box.credits-info {
        width: 100%;
        max-width: 320px;      /* Optional: limits width on mobile */
        text-align: left;      /* Keep left-aligned */
    }
    
    .footer-box-title::after {
        left: 0;               /* Underline stays left on mobile */
    }
    
    .license-text {
        font-size: 0.75rem;
    }
    
    .ojs-branding-wrapper {
        text-align: center;
    }
    
    .site-footer-content .col-md-2,
    .footer-brand-image {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .site-footer-sidebar .pkp_block img {
        max-height: 30px;
    }
}

.site-footer-sidebar .pkp_block:hover {
    filter: drop-shadow(0 0 6px rgba(198, 40, 40, 0.3));
}

.site-footer a {
    transition: all 0.2s ease;
}