/* Load the Inter font (must stay at the very top of this file) */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

/* MCLP: homepage hero with banner image behind the title */

/* Hero container: the uploaded Homepage Image as a light banner.
   The image is kept to the right (where the orange circle is), and a soft
   cream fade on the left keeps the dark text readable on smaller screens. */
body.pkp_page_index>header+div.relative.overflow-hidden.bg-slate-900 {
    background:
        linear-gradient(90deg, rgba(218, 206, 193, 0.92) 0%, rgba(218, 206, 193, 0.6) 40%, rgba(218, 206, 193, 0) 65%),
        url("/public/journals/1/homepageImage_en.jpg") right center / cover no-repeat,
        #dacec1 !important;
}

/* Remove Material Theme decorative gradient image */
body.pkp_page_index>header+div.relative.overflow-hidden.bg-slate-900>img {
    display: none !important;
}

/* Journal title: dark, since the banner is light */
body.pkp_page_index>header+div.relative.overflow-hidden.bg-slate-900 p.text-white {
    color: #1a1410 !important;
}

/* Journal subtitle */
body.pkp_page_index>header+div.relative.overflow-hidden.bg-slate-900 .text-slate-400 {
    color: #4a3f36 !important;
}

/* "Send article" button: logo orange with white text */
body.pkp_page_index>header+div.relative.overflow-hidden.bg-slate-900 a[role="button"] {
    background: #ff551f !important;
    color: #ffffff !important;
}
body.pkp_page_index>header+div.relative.overflow-hidden.bg-slate-900 a[role="button"]:hover {
    background: #e84a16 !important;
}

/* "Archives" button: dark, to match the title */
body.pkp_page_index>header+div.relative.overflow-hidden.bg-slate-900 a.bg-slate-800 {
    background: #1a1410 !important;
    color: #ffffff !important;
}

/* Hide the Homepage Image where the theme normally shows it (above "About the Journal"),
   since it is now used as the hero background */
.page_index_journal .homepage_image {
    display: none !important;
}

/* ===== Larger text across the site =====
   Change these two numbers to make everything bigger or smaller.
   (Theme default: body text 1rem = 16px) */
:root {
    --mclp-text: 1.1875rem;      /* paragraph text, about 19px */
    --mclp-heading-scale: 1.15;  /* extra boost for headings inside pages */
}

/* Paragraph text in all page content (headings inside scale with it) */
main .prose {
    font-size: var(--mclp-text) !important;
    line-height: 1.75 !important;
}

/* Headings inside page content */
main .prose h1 { font-size: calc(2.25em * var(--mclp-heading-scale)) !important; }
main .prose h2 { font-size: calc(1.5em * var(--mclp-heading-scale)) !important; }
main .prose h3 { font-size: calc(1.25em * var(--mclp-heading-scale)) !important; }
main .prose h4 { font-size: calc(1.05em * var(--mclp-heading-scale)) !important; }

/* Sidebar links (Information, For Readers, ...) */
main ~ div a {
    font-size: 1.0625rem;
}

/* Homepage hero: use the full width instead of the theme's two-column layout
   (the right column is empty), so the title and subtitle don't wrap early */
@media (min-width: 1024px) {
    body.pkp_page_index>header+div.relative.overflow-hidden.bg-slate-900 .grid {
        grid-template-columns: 1fr !important;
    }
    body.pkp_page_index>header+div.relative.overflow-hidden.bg-slate-900 .grid > div:nth-child(2) {
        display: none !important;
    }
}

/* When the title or subtitle does have to wrap (smaller screens), balance the lines evenly */
body.pkp_page_index>header+div.relative.overflow-hidden.bg-slate-900 p.text-5xl,
body.pkp_page_index>header+div.relative.overflow-hidden.bg-slate-900 .text-2xl p {
    text-wrap: balance;
}

/* Homepage hero: bigger title and subtitle on larger screens */
@media (min-width: 1024px) {
    body.pkp_page_index>header+div.relative.overflow-hidden.bg-slate-900 p.text-5xl {
        font-size: 3.75rem !important;
        line-height: 1.1 !important;
    }
    body.pkp_page_index>header+div.relative.overflow-hidden.bg-slate-900 .text-2xl {
        font-size: 1.75rem !important;
        line-height: 1.4 !important;
    }
}

/* ===== Accent colour: replace the theme's green with the logo orange =====
   --mclp-accent is the logo colour, used for icons.
   --mclp-accent-text is a slightly darker orange for link text, so links stay
   readable on white (the bright logo orange is too light for small text). */
:root {
    --mclp-accent: #ff551f;
    --mclp-accent-text: #d0400e;
    --mclp-accent-soft: #ffd5c4;
}

/* These rules work whichever colour is chosen in the Material theme settings
   (green, orange, ...), so they keep working if that setting changes. */

/* Icons (search, light/dark mode toggle, etc.) */
header svg[class*="fill-"] { fill: var(--mclp-accent) !important; }
header svg[class*="text-"] { color: var(--mclp-accent) !important; }

/* Links inside page text */
main .prose a { color: var(--mclp-accent-text) !important; }

/* Buttons, highlights and focus states that use the theme colour */
.bg-green-300, .bg-green-500, .bg-orange-300, .bg-orange-500,
.before\:bg-green-500::before, .before\:bg-orange-500::before { background-color: var(--mclp-accent) !important; }
.bg-green-50, .bg-orange-50 { background-color: #fff4ef !important; }
.hover\:bg-green-200:hover, .hover\:bg-orange-200:hover { background-color: var(--mclp-accent-soft) !important; }
.focus\:border-green-300:focus, .focus\:border-orange-300:focus { border-color: var(--mclp-accent) !important; }
.focus\:ring-green-200:focus, .focus\:ring-orange-200:focus { --tw-ring-color: var(--mclp-accent-soft) !important; }
.focus-visible\:outline-green-300\/50:focus-visible,
.focus-visible\:outline-orange-300\/50:focus-visible { outline-color: rgb(255 85 31 / 0.5) !important; }

/* ===== Headline font: Inter (clean sans-serif) instead of the theme's Cardo =====
   Body text keeps the font chosen in the theme settings.
   To use Inter for ALL text as well, add  html { font-family: var(--mclp-heading-font) !important; } */
:root {
    --mclp-heading-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1, h2, h3, h4, h5, h6,
.font-display,
header, header *,
main ~ div, main ~ div *,
a[role="button"], button,
body.pkp_page_index>header+div.relative.overflow-hidden.bg-slate-900 a,
body.pkp_page_index>header+div.relative.overflow-hidden.bg-slate-900 p.text-5xl,
body.pkp_page_index>header+div.relative.overflow-hidden.bg-slate-900 .text-2xl {
    font-family: var(--mclp-heading-font) !important;
}
/* Tighter letter spacing on the big homepage title, as in the preview */
body.pkp_page_index>header+div.relative.overflow-hidden.bg-slate-900 p.text-5xl {
    letter-spacing: -0.025em;
}

/* Don't cut the homepage subtitle off with "..." on phones */
body.pkp_page_index>header+div.relative.overflow-hidden.bg-slate-900 .line-clamp-3 {
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
    display: block !important;
    overflow: visible !important;
}
/* ===== Homepage: hide the "About the Journal" block =====
   Keep the theme option "Show the journal summary on the homepage" TICKED:
   it also supplies the subtitle in the hero banner above. This rule only
   hides the repeated summary below the hero, so announcements come first. */
.page_index_journal .homepage_about {
    display: none !important;
}

/* ===== Screen-reader-only text: hide visually =====
   OJS 3.5 adds hidden labels such as "Read more about <title>" for screen
   readers. The Material theme doesn't define this class, so the labels showed
   up as a second "Read more". This keeps them available to screen readers. */
.pkp_screen_reader {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
