/* ==========================================================================
   PATHS Joint Master Theme
   "Forced Migration: Europe in a Global Context"

   To revert to the original forest-green palette, swap the active values
   with the commented "was:" values on each line.
   ========================================================================== */

:root {
    /* Active: ERUA brand palette (dark navy + mint green from ecos.erua-eui.eu) */
    --jm-primary: #2a4396;          /* was: #2c3e50 — ERUA brand blue (from Logo_ERUA_EU_flag_color.svg) */
    --jm-primary-light: #4a63c4;    /* was: #4a6080 */
    --jm-primary-dark: #1c2f70;     /* was: #1a2534 */
    --jm-secondary: #48f89b;        /* was: #62B6CB — ERUA --primary-color (mint green) */
    --jm-accent: #b8fdd8;           /* was: #BEE9E8 — light mint */
    --jm-accent-light: #e8fff3;     /* was: #e8f8f7 — near-white mint */
    --jm-cta-btn: #F26419;          /* was: #F26419 */
    --jm-cta-btn-hover: #d9530a;    /* was: #d9530a */
    --jm-bg-light: #f9fffb;         /* was: #f8fffe */
    --jm-bg-alt: #f0faf4;           /* was: #f0f7f6 */
}

/* ============================================================
   White navbar — coloured ERUA logo requires a light background
   ============================================================ */
.jm-navbar {
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
}
.jm-navbar.scrolled {
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
}
/* Coloured logo: remove the white-invert filter from jm-base.css */
.jm-navbar .jm-brand-logo {
    filter: none;
    height: 34px;
}
/* Programme name text: dark navy */
.jm-navbar .jm-brand-text,
.jm-navbar .jm-brand-name-link {
    color: var(--jm-primary) !important;
    text-decoration: none;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 1rem;
}
/* Nav links: dark navy */
.jm-navbar .nav-link {
    color: var(--jm-primary) !important;
    opacity: 0.88;
}
.jm-navbar .nav-link:hover,
.jm-navbar .nav-link.active {
    color: var(--jm-primary-dark) !important;
    background: rgba(42, 67, 150, 0.07);
    opacity: 1;
}
/* Hamburger toggler: dark icon on white background */
.jm-navbar .navbar-toggler {
    border-color: rgba(42, 67, 150, 0.35);
}
.jm-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(42,67,150,0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* === Draft placeholder indicators (yellow) ===
   Use for: content the DRAFT notes as TBD or unconfirmed */
.jm-placeholder {
    display: inline;
    background: #fff3cd;
    border: 1px dashed #ffc107;
    color: #664d03;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 0.85em;
    font-style: italic;
}
.jm-placeholder-block {
    background: #fffdf0;
    border: 2px dashed #ffc107;
    border-radius: 8px;
    color: #664d03;
    padding: 12px 16px;
    font-style: italic;
    margin: 8px 0;
}

/* === Handbook-sourced info (light blue) ===
   Use for: facts from the Student Handbook not present in the DRAFT */
.jm-handbook {
    display: inline;
    background: #cce5ff;
    border: 1px solid #b8daff;
    color: #004085;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 0.85em;
}
.jm-handbook-block {
    background: #f0f7ff;
    border: 1px solid #b8daff;
    border-top: 4px solid #4f9fde;
    border-radius: 0 0 8px 8px;
    color: #004085;
    padding: 12px 16px;
    margin: 8px 0;
    font-size: 0.9em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* === SWPS programme-page sourced info (light green) ===
   Use for: facts from english.swps.pl/35072 not in DRAFT or Handbook */
.jm-swps {
    display: inline;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 0.85em;
}
.jm-swps-block {
    position: relative;
    background: #f0faf2;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    color: #155724;
    padding: 12px 16px;
    margin: 20px 0 8px;
    font-size: 0.9em;
}
.jm-swps-block::before {
    content: 'SOURCE: swps.pl';
    position: absolute;
    top: -11px;
    left: 12px;
    background: #28a745;
    color: #fff;
    font-size: 0.68em;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    font-style: normal;
}

/* ============================================================
   PATHS: Curriculum accordion — prevent browser scroll-anchor jump
   When accordion items expand, the browser tries to compensate
   for the height change by adjusting scroll position, causing a
   visible jump. overflow-anchor: none disables that behaviour.
   ============================================================ */
.jm-curriculum-accordion {
    overflow-anchor: none;
}

/* Back-to-top: two-class selector beats Bootstrap .btn specificity unconditionally */
.btn.jm-btn-top {
    padding: 0;
}

/* ============================================================
   PATHS: Application Steps — 7-step layout override
   Base .jm-steps is a flex timeline designed for ≤5 items.
   Override to a 2-col grid that handles 7 items cleanly.
   ============================================================ */
.jm-steps {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 2rem;
    justify-content: unset;
}
.jm-step {
    text-align: left;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    background: var(--jm-bg-light, #f8fffe);
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.06);
    max-width: none;
    flex: none;
}
.jm-step-number {
    flex-shrink: 0;
    margin: 0;
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
}
.jm-step h5 {
    margin-bottom: 0.2rem;
}
.jm-step:not(:last-child)::after {
    display: none;
}
@media (max-width: 767px) {
    .jm-steps {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   PATHS: Faculty grid cards
   Replaces testimonial card layout for the Faculty section.
   ============================================================ */
.jm-faculty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
}
.jm-faculty-card {
    cursor: pointer;
    background: var(--jm-white, #fff);
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.07);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 1.25rem 1rem;
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
}
.jm-faculty-readmore {
    font-size: 0.7rem;
    color: var(--jm-primary, #1B4965);
    font-weight: 700;
    margin-top: 0.4rem;
    letter-spacing: 0.02em;
    opacity: 0.7;
}
.jm-faculty-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(27,73,101,0.12);
}
.jm-faculty-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--jm-accent-light, #e8f8f7);
    border: 3px solid var(--jm-secondary, #62B6CB);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--jm-primary, #1B4965);
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin: 0 auto 0.75rem;
}
.jm-faculty-name {
    font-weight: 700;
    color: var(--jm-text-dark, #1a2332);
    font-size: 0.88rem;
    margin-bottom: 0.2rem;
    line-height: 1.3;
}
.jm-faculty-origin {
    font-size: 0.76rem;
    color: var(--jm-primary-light, #5FA8D3);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.jm-faculty-bio {
    font-size: 0.78rem;
    color: var(--jm-text-muted, #6c757d);
    line-height: 1.5;
}
.jm-faculty-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* ============================================================
   PATHS: Curriculum path-diagram stacked layout (Option C)
   ============================================================ */
.jm-path-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.jm-path-stack-item {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.07);
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.jm-path-stack-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    flex-wrap: wrap;
}
.jm-path-stack-unis {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.85;
    margin-left: auto;
}
.jm-path-color-border   { background: #2a4396; }
.jm-path-color-children { background: #B03A2E; }
.jm-path-color-politics { background: #1E8449; }
.jm-path-stack-body {
    background: #fff;
    padding: 1.25rem;
    text-align: center;
}
.jm-path-stack-body img {
    max-width: 100%;
    height: auto;
}
@media (max-width: 575px) {
    .jm-path-stack-unis {
        margin-left: 0;
        width: 100%;
    }
}

/* Increase scroll-padding-top to clear both the fixed navbar and the sticky quick-strip */
html {
    scroll-padding-top: calc(var(--jm-nav-height) + 60px);
}

/* Hero stats: 2×2 grid on very small screens instead of 4 full-width rows */
@media (max-width: 480px) {
    .jm-hero-stat {
        flex: 1 1 calc(50% - 0.75rem);
    }
}

/* PATHS has 6 key facts — force symmetric 3-column layout on desktop only */
@media (min-width: 768px) {
    .jm-facts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
