/* ============================================================
   SWIFT – NHS Research Project  |  shared.css
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Frutiger', Arial, sans-serif;
    background-color: #f0f4f5;
    color: #231f20;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #005EB8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: #003087;
}

/* ---------- NHS Header ---------- */
.nhs-header {
    background-color: #005EB8;
    padding: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.nhs-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 64px;
}

.nhs-header__logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.nhs-logo-box {
    background-color: #ffffff;
    color: #005EB8;
    font-weight: 700;
    font-size: 1.4rem;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 1px;
    line-height: 1;
}

.nhs-header__project-name {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ---------- Navigation ---------- */
.nhs-nav {
    background-color: #003087;
}

.nhs-nav__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 0;
}

.nhs-nav a {
    display: inline-block;
    color: #ffffff;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: background-color 0.2s, border-color 0.2s;
}

.nhs-nav a:hover,
.nhs-nav a.active {
    background-color: #002060;
    border-bottom-color: #41B6E6;
    color: #ffffff;
    text-decoration: none;
}

/* ---------- Main Content ---------- */
.nhs-main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 40px auto;
    padding: 0 24px;
}

/* ---------- Page Title ---------- */
.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #003087;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 1.05rem;
    color: #425563;
    margin-bottom: 32px;
    border-bottom: 3px solid #005EB8;
    padding-bottom: 16px;
}

/* ---------- Cards ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.card {
    background: #ffffff;
    border-radius: 6px;
    border-left: 5px solid #005EB8;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s, box-shadow 0.15s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.card--green  { border-left-color: #00A499; }
.card--purple { border-left-color: #AE2573; }
.card--orange { border-left-color: #ED8B00; }

.card__icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.card__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #003087;
    margin-bottom: 8px;
}

.card__text {
    font-size: 0.92rem;
    color: #425563;
    line-height: 1.6;
}

/* ---------- Hero Banner (Home) ---------- */
.hero {
    background: linear-gradient(135deg, #003087 0%, #005EB8 60%, #41B6E6 100%);
    border-radius: 8px;
    padding: 48px 40px;
    margin-bottom: 40px;
    color: #ffffff;
}

.hero__tag {
    display: inline-block;
    background-color: #41B6E6;
    color: #003087;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 18px;
}

.hero__title {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero__desc {
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 620px;
    opacity: 0.92;
    margin-bottom: 28px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s;
    cursor: pointer;
    border: none;
}

.btn--white {
    background-color: #ffffff;
    color: #003087;
}

.btn--white:hover {
    background-color: #e8edee;
    color: #003087;
    text-decoration: none;
}

.btn--blue {
    background-color: #003087;
    color: #ffffff;
    margin-top: 16px; /* adds space above the button */
}

.btn--blue:hover {
    background-color: #002266;
    color: #ffffff;
    text-decoration: none;
}


/* ---------- Chart Container ---------- */
.chart-container {
    background: #ffffff;
    border-radius: 6px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 32px;
}

.chart-container h2 {
    font-size: 1.25rem;
    color: #003087;
    margin-bottom: 4px;
}

.chart-container p {
    font-size: 0.9rem;
    color: #425563;
    margin-bottom: 20px;
}

/* ---------- Alert / Error ---------- */
.alert {
    padding: 16px 20px;
    border-radius: 4px;
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.alert--error {
    background-color: #fdf2f2;
    border-left: 5px solid #da291c;
    color: #8a1c1c;
}

/* ---------- Footer ---------- */
.nhs-footer {
    background-color: #231f20;
    color: #adb7bd;
    padding: 12px;
    text-align: center;
    font-size: 0.85rem;
    margin-top: auto;
}

.nhs-footer a {
    color: #41B6E6;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .nhs-header__inner {
        height: auto;
        padding: 12px 16px;
    }

    .hero {
        padding: 32px 20px;
    }

    .hero__title {
        font-size: 1.7rem;
    }

    .nhs-main {
        padding: 0 16px;
        margin: 24px auto;
    }

    .nhs-nav__inner {
        flex-wrap: wrap;
    }
}