/* =========================================
   1. JOURNAL TITLE FONT SIZES
   ========================================= */
/* Desktop (Base) - Bigger */
.journal-hero-banner .jh-title-link {
    font-size: 3.2rem !important;
}

/* Tablet (Under 992px) - Small */
@media (max-width: 991px) {
    .journal-hero-banner .jh-title-link {
        font-size: 2.2rem !important;
    }
}

/* Mobile (Under 768px) - Smaller */
@media (max-width: 767px) {
    .journal-hero-banner .jh-title-link {
        font-size: 1.8rem !important;
    }
}

/* =========================================
   1.5 HERO BANNER LAYOUT (Left/Right Split)
   ========================================= */
/* Make the info container take up the remaining space */
.journal-hero-banner .jh-info {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    width: 100% !important;
    gap: 20px !important;
}

/* Base style for the right-side elements */
.journal-hero-banner .jh-info-right .badge-issn {
    font-size: 14px !important;
    opacity: 0.8 !important;
    margin-bottom: 5px !important;
}

/* Style the individual metric lines */
.journal-hero-banner .jh-metrics-line {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 30px !important;
}

/* DESKTOP & TABLET: Split Left and Right */
@media (min-width: 768px) {
    .journal-hero-banner .jh-info {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important; /* Keeps them vertically aligned */
    }
    
    .journal-hero-banner .jh-info-left {
        flex: 1 !important;
    }

    .journal-hero-banner .jh-info-right {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-end !important; /* Aligns the two lines to the right */
        gap: 15px !important;
    }
    
    /* Ensure the metric lines sit nicely together on the right */
    .journal-hero-banner .jh-metrics-line {
        justify-content: flex-end !important;
        margin-top: 0 !important;
    }
}

/* MOBILE: Center everything to keep it clean */
@media (max-width: 767px) {
    .journal-hero-banner .jh-info {
        flex-direction: column !important;
        align-items: center !important;
    }

    .journal-hero-banner .jh-info-right {
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
    }
    
    .journal-hero-banner .jh-metrics-line {
        justify-content: center !important;
        gap: 15px !important;
    }
}

/* =========================================
   METRICS BUTTON DESIGN (Right-Aligned)
   ========================================= */

/* Strip default button styling and force text to the right */
.journal-hero-banner .metric-button {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    color: #ffffff !important;
    text-align: right !important; /* Aligns text right */
    cursor: pointer !important;
    font-family: inherit !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important; /* Forces the number and label completely flush right */
}

.journal-hero-banner .metric-button:focus {
    outline: none !important;
}

/* Big number value */
.journal-hero-banner .metric-button .val.u-display-block {
    display: block !important;
    font-size: 28px !important; 
    font-weight: 700 !important;
    line-height: 1.1 !important;
    color: rgb(255, 255, 255) !important;
}

/* Smaller label text */
.journal-hero-banner .metric-button .lbl {
    display: block !important;
    font-size: 13px !important; 
    font-weight: 400 !important;
    text-transform: none !important; 
    color: rgb(255, 255, 255) !important;
    opacity: 1 !important; 
    margin-top: 2px !important;
}

/* Remove hover backgrounds */
.journal-hero-banner .metric-button:hover {
    background-color: transparent !important;
    opacity: 0.9 !important;
}

/* =========================================
   2. DESKTOP NAVIGATION (992px and up)
   ========================================= */
@media (min-width: 992px) {
    .journal-action-nav .jan-container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    /* Put main menu on the left, let it grow */
    .journal-action-nav .jan-primary-menu {
        order: 1 !important;
        flex-grow: 1 !important;
        display: block !important;
    }

    /* Put the new buttons wrapper on the right */
    .journal-action-nav .jan-mobile-top {
        order: 2 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
    }

    /* Hide the hamburger icon on desktop */
    .journal-action-nav .mobile-menu-toggle {
        display: none !important;
    }
}

/* =========================================
   2.5 TABLET LANDSCAPE FIX (992px to 1250px)
   ========================================= */
@media (min-width: 992px) and (max-width: 1320px) {
    /* Stack the container but preserve the theme's horizontal alignment */
    .journal-action-nav .jan-container {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding-top: 10px !important;
        padding-bottom: 15px !important;
        /* Removed left/right padding override so it aligns with your main content */
    }

    /* Keep main navigation strictly on one line */
    .journal-action-nav .jan-primary-menu {
        width: 100% !important;
        order: 1 !important;
    }
    .journal-action-nav #navigationPrimary {
        display: flex !important;
        flex-wrap: nowrap !important; /* Prevents 2 lines */
        gap: 15px !important; 
    }
    .journal-action-nav #navigationPrimary > li > a {
        font-size: 14px !important; /* Shrunk slightly to ensure all fit */
        white-space: nowrap !important;
        padding: 10px 0 !important;
    }

    /* Move CTAs cleanly to the second line */
    .journal-action-nav .jan-mobile-top {
        width: 100% !important;
        order: 2 !important;
        justify-content: flex-start !important; /* Align left to match menu */
        margin-top: 5px !important;
    }
}

/* =========================================
   3. MOBILE & TABLET PORTRAIT (Under 992px)
   ========================================= */
@media (max-width: 991px) {
    .journal-action-nav .jan-container {
        display: flex !important;
        flex-direction: column !important;
        padding-bottom: 0px !important;
    }

    .journal-action-nav .jan-mobile-top {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important; 
        align-items: center !important;
        width: 100% !important;
    }

    /* 1. Bulletproof Hamburger Button */
    .journal-action-nav .mobile-menu-toggle {
        display: block !important;
        /* Pushes the button to the left, and everything else to the right */
        margin: 0 auto 0 0 !important; 
        
        /* Draw the black hamburger lines using pure CSS */
        background-color: #f8f9fa !important;
        background-image: linear-gradient(to bottom, #000 0%, #000 20%, transparent 20%, transparent 40%, #000 40%, #000 60%, transparent 60%, transparent 80%, #000 80%, #000 100%) !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        background-size: 20px 14px !important; /* Size of the icon */
        
        border: 1px solid #ccc !important;
        border-radius: 4px !important;
        width: 44px !important;
        height: 38px !important;
        flex-shrink: 0 !important; /* Prevents button from squishing */
    }

    /* Hide the broken FontAwesome icon */
    .journal-action-nav .mobile-menu-toggle .fa-bars {
        display: none !important; 
    }

    /* 2. CTAs strictly on the right */
    .journal-action-nav .jan-ctas {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important; 
        align-items: center !important;
        gap: 5px !important;
    }

    .journal-action-nav .jan-ctas .btn-cta {
        white-space: nowrap !important; 
        padding: 6px 8px !important;
        font-size: 14px !important; 
        text-align: center !important;
    }

    .journal-action-nav .jan-ctas .fa-external-link {
        display: none !important;
    }

    /* 3. Dropdown Menu Layout (Fixed JS floating and overlap) */
    .journal-action-nav .jan-primary-menu {
        width: 100% !important;
    }
    .journal-action-nav #primaryMobileNav {
        width: 100% !important;
        margin-top: 5px !important; 
    }

    /* Force the parent lists to expand so they never overlap the next item */
    .journal-action-nav #navigationPrimary,
    .journal-action-nav #navigationPrimary > li {
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        display: block !important;
    }

    /* Neutralize Bootstrap's JavaScript (Popper.js) inline positioning */
    .journal-action-nav #navigationPrimary .dropdown-menu {
        position: static !important; 
        float: none !important;
        width: 100% !important;
        margin: 0 !important; 
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important; 
        background-color: #f8f9fa !important; 
        transform: none !important; /* Kills JS transform */
        inset: auto !important; /* Kills JS positioning */
        top: auto !important;
        left: auto !important;
        will-change: unset !important;
    }

    /* Center text vertically */
    .journal-action-nav #navigationPrimary .nav-link,
    .journal-action-nav #navigationPrimary .dropdown-item {
        display: block !important;
        margin: 0 !important;
        padding: 12px 15px !important;
        line-height: 24px !important; 
        border: none !important;
        border-bottom: 1px solid #eaeaea !important;
        border-radius: 0 !important;
    }

    /* Indent sub-menu items */
    .journal-action-nav #navigationPrimary .dropdown-item {
        padding-left: 30px !important; 
        white-space: normal !important;
    }
}

/* =========================================
   JOURNAL SUMMARY BACKGROUND
   ========================================= */
.page_index_journal .journal_summary {
    background-color: #f8f9fa !important;
    border-radius: 8px !important;        
    border: 0px solid #e9ecef !important; 
    margin-top: 0px !important;
    margin-bottom: 0px !important;
    
    /* Ensure the box respects Bootstrap's default container constraints */
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 1920px !important; /* Forces alignment with standard Bootstrap desktop containers */
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Desktop padding: Use percentages to naturally align with the grid */
@media (min-width: 992px) {
    .page_index_journal .journal_summary {
        padding: 30px 12% !important; 
    }
}

/* Tablet padding */
@media (min-width: 768px) and (max-width: 991px) {
    .page_index_journal .journal_summary {
        padding: 30px 2% !important; 
    }
}

/* Mobile padding */
@media (max-width: 767px) {
    .page_index_journal .journal_summary {
        padding: 20px 15px !important;
    }
}

.section-divider {
	border: 0;
	border-top: 1px solid #ddd;
	margin: 20px 0 20px 0;
	width: 100%;
}

/* =========================================
   EDITORIAL TEAM: GRID CARDS
   ========================================= */

/* 1. Grid Layout Container */
.editor-flashcard-grid {
    display: grid !important;
    /* Automatically creates responsive columns. Min width is 280px per card */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 30px !important;
    margin-top: 40px !important;
    margin-bottom: 60px !important;
}

/* 2. Individual Card Styling */
.editor-flashcard {
    background: #ffffff !important;
    border: 1px solid #e9ecef !important;
    border-radius: 12px !important;
    padding: 25px 20px !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

/* Hover effect */
.editor-flashcard:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 12px 20px rgba(0,0,0,0.08) !important;
}

/* 3. Profile Picture */
.editor-flashcard .profile-pic {
    width: 120px !important;
    height: 120px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    margin-bottom: 15px !important;
    border: 3px solid #f8f9fa !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

/* 4. Typography inside the card */
.editor-flashcard .name {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #222 !important;
    margin-bottom: 5px !important;
    line-height: 1.2 !important;
}

.editor-flashcard .role {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #146826 !important; /* Matches your theme's green button color */
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 12px !important;
}

.editor-flashcard .affiliation {
    font-size: 0.9rem !important;
    color: #555 !important;
    margin-bottom: 12px !important;
    line-height: 1.4 !important;
}

.editor-flashcard .expertise {
    font-size: 0.85rem !important;
    color: #666 !important;
    font-style: italic !important;
    margin-bottom: 20px !important;
    flex-grow: 1 !important; /* This pushes the identifiers neatly to the bottom of the card */
}

/* 5. Identifiers (ORCID, Scopus, Scholar links) */
.editor-flashcard .identifiers {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    border-top: 1px solid #eee !important;
    padding-top: 15px !important;
}

.editor-flashcard .identifiers a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-size: 0.85rem !important;
    color: #0056b3 !important;
    text-decoration: none !important; /* Ensures no underline */
    border-bottom: none !important;   /* Strips theme defaults */
    box-shadow: none !important;      /* Strips theme defaults */
    transition: color 0.2s !important;
}

.editor-flashcard .identifiers a:hover {
    color: #003d82 !important;
    text-decoration: none !important; /* Removed the underline on hover */
    border-bottom: none !important;
}

/* Ensures the tiny icons don't stretch */
.editor-flashcard .identifiers img {
    width: 16px !important;
    height: 16px !important;
    object-fit: contain !important;
    box-shadow: none !important;
    border: none !important;
}

/* =========================================
   EDITORIAL TEAM: FULL WIDTH ALIGNMENT
   ========================================= */
/* Override the restrictive narrow container on custom pages */
.page.navigation-item-content .container-narrow {
    max-width: 1920px !important; /* Matches standard Bootstrap desktop width */
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Match the exact padding grid used by your header and footer */
@media (min-width: 992px) {
    .page.navigation-item-content .container-narrow {
        padding-left: 12% !important;
        padding-right: 12% !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .page.navigation-item-content .container-narrow {
        padding-left: 2% !important;
        padding-right: 2% !important;
    }
}

@media (max-width: 767px) {
    .page.navigation-item-content .container-narrow {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}