/* Bulletproof way to hide the OJS/PKP logo in the footer */
.pkp_brand_footer,
a[href*="aboutThisPublishingSystem"],
img[src*="ojs_brand.png"],
div[role="contentinfo"] div[role="complementary"] {
    display: none !important;
}

/* Style sidebar block titles: normal text and new background */
.pkp_structure_sidebar .pkp_block .title,
.pkp_structure_sidebar .pkp_block h2 {
    text-transform: none !important; /* Changes ALL CAPS back to normal */
    background-color: #e2e8f0 !important; /* Soft slate-gray background */
    color: #004B87 !important; /* Dark blue text */
    padding: 10px 15px !important;
    margin-bottom: 15px !important;
    border-radius: 4px;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-left: 5px solid #004B87 !important; /* Dark green accent line */
    display: block; /* Ensures the background covers the full width */
}

/* PDF Buttons (Flat, outlined, professional) */
.obj_galley_link {
    background-color: #ffffff !important;
    color: #004B87 !important; /* Elsevier PDF orange/red */
    border: 1px solid #004B87 !important;
    padding: 6px 14px !important;
    margin-top: 20px !important;
    border-radius: 3px !important; /* Slight rounding, not a full pill */
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: none !important;
}

.obj_galley_link:hover {
    background-color: #004B87 !important;
    color: #ffffff !important;
}

/* =========================================================
   CUSTOM 3-COLUMN FOOTER FOR DEFAULT THEME
   ========================================================= */
.trophos-3-column {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding: 30px 0;
    text-align: left;
    border-top: 1px solid #dcdcdc;
    margin-top: 10px;
    font-size: 0.95rem;
}

.trophos-footer-col h4 {
    color: #004d80 !important; 
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: none;
}

.trophos-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.trophos-footer-col li {
    margin-bottom: 10px;
}

/* Make it stack on mobile phones */
@media (max-width: 768px) {
    .trophos-3-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* =========================================================
       CURRENT ISSUE MOBILE FIX (Text Wrapping Thumbnail)
       ========================================================= */
    /* 4. Shrink the cover image and float it to the left */
    .current_issue .cover {
        float: left !important;
        width: 110px !important; /* Perfect thumbnail size for mobile */
        margin-right: 15px !important; /* Adds breathing room between image and text */
        margin-bottom: 10px !important; /* Allows text to wrap neatly underneath */
        margin-top: 5px !important;
    }

    /* Ensure the image scales down to fit the new small container */
    .current_issue .cover img {
        width: 100% !important;
        height: auto !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important; /* Slight shadow for a premium look */
    }

    /* 5. Clear the float so it doesn't break any layout below the Current Issue */
    .current_issue::after {
        content: "" !important;
        display: table !important;
        clear: both !important;
    }
}

/* Increase size and change color for the Swiper slider highlight titles */
.swiper-slide .swiper-slide-content .swiper-slide-title,
.swiper-slide .swiper-slide-content .swiper-slide-title a {
    padding-top: 20px !important;
    font-size: 1.5rem !important; 
    line-height: 1.3 !important; 
    color: #004B87 !important; /* Sets the title color to the specific blue */
}

/* Optional: Add a hover effect so it slightly changes color when someone hovers over the title */
.swiper-slide .swiper-slide-content .swiper-slide-title a:hover {
    color: #00335e !important; /* A slightly darker shade of blue for hover */
}

/* =======================================================
   SWIPER SLIDER - THUMBNAIL SPANS ALONGSIDE ALL TEXT
   ======================================================= */

/* 1. Title Color & Hover */
.swiper-slide .swiper-slide-content .swiper-slide-title,
.swiper-slide .swiper-slide-content .swiper-slide-title a {
    color: #004B87 !important; 
}
.swiper-slide .swiper-slide-content .swiper-slide-title a:hover {
    color: #00335e !important; 
}

/* 2. Global Layout Setup */
.swiper-slide {
    display: grid !important;
    grid-template-columns: 1fr auto !important; 
    gap: 10px 25px !important; 
    padding: 20px 30px !important; 
    box-sizing: border-box !important;
    align-items: start !important; 
}

.swiper-slide .swiper-slide-content {
    display: contents !important; 
}

/* 3. Title Placement (Row 1, Left Column ONLY) */
.swiper-slide .swiper-slide-content .swiper-slide-title {
    grid-column: 1 !important; 
    grid-row: 1 !important; 
    margin: 0 !important;
    text-align: left !important;
    font-size: 1.6rem !important; 
    line-height: 1.2 !important;
}

/* 4. Thumbnail Placement (Right Column, Spanning all Rows) */
.swiper-slide > :not(.swiper-slide-content) {
    grid-column: 2 !important; 
    grid-row: 1 / 4 !important; 
    margin-top: 30px !important; /* Pushes the thumbnail down 30px */
    display: flex !important;
    justify-content: flex-end !important; 
}

/* Thumbnail specific sizing */
.swiper-slide img {
    width: 150px !important; 
    height: auto !important; 
    object-fit: cover !important; 
    border-radius: 4px;
    margin: 0 !important;
}

/* 5. Summary Text Placement (Row 2, Left Column ONLY) */
.swiper-slide .swiper-slide-content > *:not(.swiper-slide-title):not(a):not(.cmp_button):not(.read-more) {
    grid-column: 1 !important; 
    grid-row: 2 !important;
    margin: 0 !important;
    text-align: left !important;
}

/* Removes invisible gap caused by OJS paragraph tags */
.swiper-slide .swiper-slide-content p {
    margin-bottom: 0 !important;
}

/* 6. Read More Button (Row 3, Left Column ONLY) */
.swiper-slide .swiper-slide-content > a,
.swiper-slide .swiper-slide-content .cmp_button,
.swiper-slide .swiper-slide-content .read-more {
    grid-column: 1 !important; 
    grid-row: 3 !important; 
    justify-self: start !important; 
    width: max-content !important;  
    display: inline-block !important;
    margin-top: 5px !important; 
    margin-bottom: 0 !important; 
}

/* 7. Mobile Adjustments */
@media (max-width: 768px) {
    .swiper-slide {
        padding: 15px !important; 
        gap: 10px 15px !important; 
    }
    
    .swiper-slide .swiper-slide-content .swiper-slide-title {
        font-size: 1.4rem !important; 
    }
    
    /* Push thumbnail down slightly less on small screens */
    .swiper-slide > :not(.swiper-slide-content) {
        margin-top: 20px !important; /* Pushes the thumbnail down 20px on mobile */
    }
    
    .swiper-slide img {
        width: 100px !important; 
    }
}

/* OJS Editorial Board Responsive Layout */
.editor-directory {
  display: flex;
  flex-direction: column;
  gap: 25px;
  font-family: sans-serif;
}

.editor-card {
  display: flex;
  flex-direction: row;
  gap: 20px;
  padding-bottom: 25px;
  border-bottom: 1px solid #eeeeee;
  align-items: flex-start;
}

.editor-photo {
  flex: 0 0 125px !important;
  width: 125px !important;
  max-width: 125px !important;
}

/* Force override OJS default image stretching */
.editor-directory .editor-photo img {
  width: 125px !important;
  height: 125px !important;
  max-width: 125px !important;
  min-width: 125px !important;
  object-fit: cover !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
  margin: 0 !important;
  display: block !important;
}

.editor-info {
  flex: 1 1 auto;
}

.editor-info h3 {
  margin: 0 0 5px 0 !important;
  font-size: 1.15em !important;
  color: #333333 !important;
}

.editor-role {
  margin: 0 0 8px 0 !important;
  font-weight: bold !important;
  font-size: 0.9em !important;
  color: #555555 !important;
}

.editor-affiliation, .editor-expertise {
  margin: 0 0 12px 0 !important;
  color: #666666 !important;
  font-size: 0.85em !important;
  line-height: 1.5 !important;
}

.editor-badges {
  margin: 0 !important;
  font-size: 0.8em !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 15px !important;
}

.editor-badges a {
  text-decoration: none !important;
  color: #000 !important;
  display: inline-flex !important;
  align-items: center !important;
}

.editor-badges img {
  margin-right: 5px !important;
  width: 14px !important;
  height: 14px !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* Mobile View: Stack image on top of text */
@media (max-width: 650px) {
  .editor-card {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }
  .editor-badges {
    justify-content: center !important;
  }
}

/* 1. Hide the issue description */
.obj_issue_summary .description {
    display: none !important;
}

/* 2. Convert the archive list to a grid */
.issues_archive {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* 3. Style the individual items */
.issues_archive > li {
    margin-bottom: 0 !important;
}

.obj_issue_summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%; /* Ensures all grid items align nicely */
}

/* 4. Ensure the cover image looks good with a fixed height */
.obj_issue_summary .cover {
    display: block;
    margin-bottom: 12px;
    width: 100%;
}

.obj_issue_summary .cover img {
    width: 100%;
    height: 280px; /* Standardized height */
    object-fit: cover; 
    object-position: top; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Soft shadow */
    border-radius: 6px; /* Smooth corners */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth hover transition */
}

/* 5. Add a beautiful hover effect to the covers */
.obj_issue_summary .cover:hover img {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* 6. Adjust title and series text */
.obj_issue_summary h2 {
    font-size: 1.1rem;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.obj_issue_summary .series {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Journal Speed Metrics (2x2 Mobile Grid & 4x1 Desktop Grid with Superscript Tooltips) */

/* ==========================================
   JOURNAL METRICS STYLES
   ========================================== */

/* Bulletproof spacing override */
.pkp_structure_main .page_index_journal .homepage_about {
    margin-bottom: 0 !important; 
    padding-bottom: 0 !important;
}

.pkp_structure_main .page_index_journal .homepage_about p:last-child {
    margin-bottom: 0 !important; 
    padding-bottom: 0 !important;
}

/* Layout: 2x2 grid on mobile, 4 columns on desktop */
.metrics_wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1.5rem;
    align-items: start;
}

@media (min-width: 768px) {
    .metrics_wrapper {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Number styling */
.metric_number {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0056b3;
    line-height: 1.2;
}

/* Tooltip Container - Updated for Superscript */
.metric_tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
    margin-left: 4px; /* Tighter spacing for superscript */
    vertical-align: super; /* Forces it to sit high like a superscript */
    outline: none;
}

/* Smaller "i" icon for the superscript */
.metric_tooltip .info_icon {
    display: inline-block;
    width: 14px; 
    height: 14px;
    border-radius: 50%;
    background-color: #0056b3;
    color: #ffffff;
    text-align: center;
    font-size: 10px;
    line-height: 14px;
    font-weight: bold;
    font-style: italic;
    font-family: serif;
}

.metric_tooltip .tooltip_text {
    visibility: hidden;
    width: 220px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 10px 14px;
    position: absolute;
    z-index: 100;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    font-size: 0.85rem;
    line-height: 1.4;
    font-weight: normal;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.2);
    pointer-events: none;
}

.metric_tooltip .tooltip_text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* Mobile Tooltip Overflow Fix */
@media (max-width: 767px) {
    .metric_item:nth-child(even) .metric_tooltip .tooltip_text {
        left: auto;
        right: -20px;
        transform: none;
    }
    .metric_item:nth-child(even) .metric_tooltip .tooltip_text::after {
        left: auto;
        right: 24px;
    }
}

.metric_tooltip:hover .tooltip_text,
.metric_tooltip:focus .tooltip_text {
    visibility: visible;
    opacity: 1;
}	