/* ============================================================
   Home page — modern hero, quick-links, section header
   Bootstrap 4 compatible. Uses existing --elimys / --elimys-hover tokens
   defined in HomeStyles.css. Safe to load after HomeStyles.css.
   ============================================================ */

:root {
    --home-bg-soft: #F5F8FB;
    --home-surface: #ffffff;
    --home-border: #E5E7EB;
    --home-text: #111827;
    --home-muted: #6B7280;
    --home-elimys: var(--elimys, #3A648A);
    --home-elimys-hover: var(--elimys-hover, #1b2e3f);
    --home-radius-lg: 18px;
    --home-radius-md: 12px;
    --home-radius-sm: 8px;
    --home-shadow-sm: 0 1px 3px rgba(0,0,0,.06);
    --home-shadow-md: 0 8px 24px rgba(33, 55, 76, .08);
    --home-shadow-lg: 0 16px 40px rgba(33, 55, 76, .12);
}

/* ---------- Wrapper ---------- */
.home-wrap {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 .75rem;
}

/* ---------- Hero ---------- */
.home-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--home-radius-lg);
    padding: 2.25rem 1.5rem;
    margin: .5rem 0 1.75rem;
    background:
        radial-gradient(1200px 400px at 110% -10%, rgba(58,100,138,.18), transparent 60%),
        radial-gradient(900px 300px at -10% 120%, rgba(58,100,138,.12), transparent 55%),
        linear-gradient(135deg, #F5F8FB 0%, #ECF1F6 100%);
    border: 1px solid var(--home-border);
}

.home-hero::after {
    content: "";
    position: absolute;
    inset: auto -40px -40px auto;
    width: 220px;
    height: 220px;
    background: radial-gradient(closest-side, rgba(58,100,138,.18), transparent 70%);
    pointer-events: none;
}

.home-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .75rem;
    background: rgba(58,100,138,.10);
    color: var(--home-elimys);
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .02em;
    margin-bottom: .9rem;
}

.home-hero__title {
    font-size: clamp(1.6rem, 3.4vw, 2.5rem);
    line-height: 1.15;
    font-weight: 800;
    color: #21374C;
    margin: 0 0 .65rem;
    max-width: 32ch;
}

.home-hero__title .accent {
    background: linear-gradient(135deg, var(--home-elimys) 0%, #5b8bb3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.home-hero__subtitle {
    font-size: clamp(1rem, 1.6vw, 1.125rem);
    color: var(--home-muted);
    margin: 0 0 1.25rem;
    max-width: 60ch;
    line-height: 1.55;
}

.home-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.home-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .65rem 1.15rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}

.home-hero__cta--primary {
    background: var(--home-elimys);
    color: #fff;
    box-shadow: 0 6px 18px rgba(58,100,138,.28);
}
.home-hero__cta--primary:hover,
.home-hero__cta--primary:focus {
    background: var(--home-elimys-hover);
    color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
}

.home-hero__cta--ghost {
    background: #fff;
    color: var(--home-elimys);
    border-color: rgba(58,100,138,.35);
}
.home-hero__cta--ghost:hover,
.home-hero__cta--ghost:focus {
    background: var(--home-elimys);
    color: #fff;
    border-color: var(--home-elimys);
    text-decoration: none;
}

/* ---------- Quick links (category chips) ---------- */
.home-quicklinks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: .75rem;
    margin: 0 0 2rem;
}

.home-quicklink {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .85rem 1rem;
    background: var(--home-surface);
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius-md);
    color: var(--home-text);
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.home-quicklink:hover,
.home-quicklink:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--home-shadow-md);
    border-color: rgba(58,100,138,.45);
    color: var(--home-text);
    text-decoration: none;
}

.home-quicklink__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .95rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--home-elimys) 0%, #5b8bb3 100%);
}
.home-quicklink__icon--danger   { background: linear-gradient(135deg, #ef4444, #f87171); }
.home-quicklink__icon--success  { background: linear-gradient(135deg, #10b981, #34d399); }
.home-quicklink__icon--info     { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.home-quicklink__icon--warning  { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.home-quicklink__icon--pink     { background: linear-gradient(135deg, #ec4899, #f472b6); }
.home-quicklink__icon--orange   { background: linear-gradient(135deg, #f97316, #fb923c); }
.home-quicklink__icon--secondary{ background: linear-gradient(135deg, #6b7280, #9ca3af); }

.home-quicklink__label {
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.2;
}

/* ---------- Section header ---------- */
.home-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: .25rem 0 1rem;
}

.home-section__title {
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    font-weight: 700;
    color: #21374C;
    margin: 0;
    white-space: nowrap;
}

.home-section__rule {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--home-border) 0%, transparent 100%);
}

.home-section__link {
    font-weight: 600;
    color: var(--home-elimys);
    text-decoration: none;
    white-space: nowrap;
}
.home-section__link:hover { color: var(--home-elimys-hover); text-decoration: none; }

/* ---------- Card polish (additive — does not override card markup) ---------- */
.institution-card {
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card-container:focus-within .institution-card {
    box-shadow: var(--home-shadow-md);
    border-color: rgba(58,100,138,.35);
}

/* ---------- Hero shortcuts ---------- */
.home-hero-shortcuts {
    margin-top: 1rem;
}

.home-hero-shortcut {
    display: flex;
    align-items: flex-start;
    width: 100%;
    min-width: 0;
    padding: .9rem .95rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--home-radius-md);
    color: var(--home-text);
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}

.home-hero-shortcut:hover,
.home-hero-shortcut:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(33, 55, 76, .12);
    border-color: #cbd5e1;
    color: var(--home-text);
    text-decoration: none;
}

.home-hero-shortcut--institutions:hover,
.home-hero-shortcut--institutions:focus-visible { background: #eff6ff; }

.home-hero-shortcut--courses:hover,
.home-hero-shortcut--courses:focus-visible { background: #ecfdf5; }

.home-hero-shortcut--intakes:hover,
.home-hero-shortcut--intakes:focus-visible { background: #fff7ed; }

.home-hero-shortcut__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .95rem;
    flex: 0 0 38px;
    margin-right: .65rem;
}

/* slightly more saturated icon anchors */
.home-hero-shortcut__icon--institutions { background: linear-gradient(135deg, #1d4ed8, #2563eb); }
.home-hero-shortcut__icon--courses { background: linear-gradient(135deg, #047857, #059669); }
.home-hero-shortcut__icon--intakes { background: linear-gradient(135deg, #c2410c, #ea580c); }

.home-hero-shortcut__content {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    overflow-wrap: break-word;
    word-break: normal;
}

.home-hero-shortcut__title {
    display: block;
    font-weight: 700;
    font-size: .95rem;
    line-height: 1.25;
    margin-bottom: .2rem;
    color: #21374C;
}

.home-hero-shortcut__subtitle {
    display: block;
    font-size: .86rem;
    line-height: 1.35;
    color: var(--home-muted);
}

.home-hero-shortcut__arrow {
    margin-left: .5rem;
    align-self: center;
    color: #64748b;
    font-size: 1.05rem;
    font-weight: 700;
    transition: transform .2s ease, color .2s ease;
}

.home-hero-shortcut:hover .home-hero-shortcut__arrow,
.home-hero-shortcut:focus-visible .home-hero-shortcut__arrow {
    color: #334155;
    transform: translateX(2px);
}

/* Mobile <= 575px */
@media (max-width: 575.98px) {
    .home-hero-shortcut {
        align-items: center;
    }

    .home-hero-shortcut__content {
        text-align: center;
    }

    .home-hero-shortcut__subtitle {
        font-size: .8rem;
    }
}

/* Small tablets / large phones: 576px-767px -> single column from col-12 */
@media (min-width: 576px) and (max-width: 767.98px) {
    .home-hero-shortcut__content {
        text-align: left;
    }
}

/* Tablets / iPads: 768px-991px -> col-md-6 gives 2 on first row, 1 on second */

/* Desktop >= 992px -> col-lg-4 gives 3 in one row */

/* motion accessibility */
@media (prefers-reduced-motion: reduce) {
    .home-hero-shortcut,
    .home-hero-shortcut__arrow {
        transition: none;
    }
}