.home-shell {
    background: #f6f7fb;
    color: #1f2937;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---------- Top nav ---------- */
.home-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.home-nav-inner {
    /* The page column is 1000px; this adds back the nav's own padding so the logo lines up with it. */
    max-width: calc(1000px + 2.5rem);
    margin: 0 auto;
    padding: .75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
}

.home-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    text-decoration: none;
    color: var(--rsa-purple-600);
    font-weight: 700;
    font-size: 1.05rem;
}
.home-brand img {
    height: 38px;
    width: auto;
    max-width: 108px;
    object-fit: contain;
}
.home-brand span {
    letter-spacing: -0.01em;
}

.home-nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
}
.home-nav-links li a {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
}
.home-nav-links li a:hover {
    color: var(--rsa-purple-600);
}
.home-nav-links li a.home-nav-cta {
    color: var(--rsa-purple-800);
    background: var(--rsa-yellow-500);
    font-weight: 700;
    padding: .45rem .95rem;
    border-radius: 999px;
    transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.home-nav-links li a.home-nav-cta:hover {
    background: var(--rsa-yellow-400);
    color: var(--rsa-purple-900);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .22);
}

/* Mobile burger */
.home-nav-toggle { display: none; }
.home-nav-burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: .5rem;
}
.home-nav-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--rsa-purple-600);
    border-radius: 2px;
}

@media (max-width: 720px) {
    .home-nav-burger { display: flex; }
    .home-nav-links {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        gap: 0;
        transition: max-height .25s ease;
    }
    .home-nav-links li { width: 100%; }
    .home-nav-links li a {
        display: block;
        padding: .65rem 0;
        border-bottom: 1px solid #f1f5f9;
    }
    .home-nav-links li a.home-nav-cta {
        margin: .5rem 0;
        text-align: center;
    }
    .home-nav-toggle:checked ~ .home-nav-links {
        max-height: 500px;
    }
    /* The closed menu is still a second (empty) row; a row gap above it left the bar taller below the logo than above. */
    .home-nav-inner { row-gap: 0; }
    /* The name gives way to the burger rather than pushing it onto a line of its own. */
    .home-brand { min-width: 0; max-width: calc(100% - 3.5rem); }
    .home-brand span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 420px) {
    .home-brand { font-size: .95rem; gap: .5rem; }
    .home-brand img { height: 32px; }
}

/* ---------- Hero ---------- */
.home-hero {
    position: relative;
    background:
        radial-gradient(ellipse 60% 50% at 85% 15%, rgba(244, 0, 100, .30) 0%, transparent 60%),
        radial-gradient(ellipse 50% 45% at 10% 90%, rgba(248, 184, 0, .18) 0%, transparent 55%),
        linear-gradient(150deg, rgba(21, 22, 66, .94) 0%, rgba(30, 32, 95, .92) 55%, rgba(46, 49, 146, .90) 100%),
        url('/img/hero.jpg') center center / cover no-repeat;
    color: #ffffff;
    padding: 5rem 1.25rem;
    text-align: center;
}

.home-hero-inner { max-width: 720px; margin: 0 auto; }

.home-logo {
    height: 110px;
    width: auto;
    background: #fff;
    padding: .75rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
}

.home-hero h1 {
    color: #ffffff;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 .5rem;
    font-size: 2.6rem;
    text-wrap: balance;
}

.home-hero .lead {
    color: rgba(255,255,255,.9);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0 0 1rem;
}

.home-tagline {
    color: #f8b800;
    font-style: italic;
    font-weight: 600;
    font-size: 1.2rem;
    margin: 0 0 1.5rem;
    opacity: .95;
    text-wrap: balance;
}

.home-hero-actions {
    display: flex;
    gap: .75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.home-hero-actions .btn-light {
    background: #f8b800;
    border-color: #f8b800;
    color: #1e205f;
    font-weight: 700;
}
.home-hero-actions .btn-light:hover {
    background: #fac52e;
    border-color: #fac52e;
    color: #151642;
}

/* A row of buttons inside a section (Join, the fundraiser banner). */
.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1.5rem;
}
.home-section-inner--center .home-actions { justify-content: center; }
/* A sub-heading after a row of buttons gets the same air as one after text. */
.home-actions + .home-subhead { margin-top: 2.5rem; }

/* On a phone the pairs stack at full width, rather than two ragged buttons of different lengths. */
@media (max-width: 480px) {
    .home-hero-actions .btn,
    .home-actions .btn { flex: 1 1 100%; }
}

/* ---------- Sections ---------- */
.home-section {
    padding: 3.5rem 1.25rem;
    background: #f6f7fb;
    border-bottom: 1px solid #e5e7eb;
    scroll-margin-top: 76px;
}
.home-section-light { background: #ffffff; }

.home-section-inner {
    max-width: 1000px;
    margin: 0 auto;
}
/* A centred section (the fundraiser banner): its heading's underline centres with it. */
.home-section-inner--center { text-align: center; }
.home-section-inner--center h2::after { margin-left: auto; margin-right: auto; }

@media (max-width: 720px) {
    .home-section { scroll-margin-top: 64px; }
}

.home-section h2 {
    color: #2e3192;
    font-weight: 700;
    letter-spacing: -.015em;
    margin: 0 0 .5rem;
}
.home-section h2::after {
    content: '';
    display: block;
    width: 44px;
    height: 4px;
    border-radius: 4px;
    margin-top: .6rem;
    background: linear-gradient(90deg, #2e3192 0%, #f40064 100%);
}

.home-section p {
    color: #374151;
    line-height: 1.7;
}

.home-subhead {
    color: #2e3192;
    font-weight: 700;
    font-size: 1.15rem;
    margin-top: 1.5rem;
    margin-bottom: .5rem;
}

.home-list {
    color: #374151;
    line-height: 1.8;
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}
.home-list-tight { line-height: 1.55; margin-top: .25rem; }

/* ---------- Programme cards ---------- */
/* Four cards: one row of four on a wide screen, two by two below it — never three and a lone fourth. */
.home-cards {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}
@media (min-width: 576px) {
    .home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
    .home-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.home-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    position: relative;
    transition: transform .15s ease, box-shadow .15s ease;
}
.home-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(46, 49, 146, .12);
    border-color: #bcbddc;
}
.home-card-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f3f3f9;
    color: #2e3192;
    font-weight: 700;
    border-radius: 999px;
    padding: .15rem .65rem;
    font-size: .75rem;
    letter-spacing: .02em;
}
.home-card h3 {
    color: #2e3192;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 .5rem;
}
.home-card p {
    color: #4b5563;
    margin: 0;
    font-size: .95rem;
    line-height: 1.55;
}
/* A list in a card reads like the card's text, and leaves no margin under the card's last line. */
.home-card .home-list {
    color: #4b5563;
    font-size: .95rem;
    margin-bottom: 0;
}

/* ---------- Contact ---------- */
/* Five cards. Wide: three over two, each row filled (a six-column grid, 2+2+2 then 3+3), so the
   address is not left alone and the email has room to stay on one line. Two columns in between,
   the odd last card spanning the row; one on a phone. */
.home-contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin-top: 1.25rem;
}
@media (min-width: 576px) and (max-width: 991.98px) {
    .home-contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-contact-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 992px) {
    .home-contact-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .home-contact-card { grid-column: span 2; }
    .home-contact-card:nth-child(n+4) { grid-column: span 3; }
}
.home-contact-card { min-width: 0; }
.home-contact-card a {
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: .9rem;
}
.home-contact-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem 1.25rem;
}
.home-contact-label {
    color: #6b7280;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .25rem;
}
.home-contact-card a {
    color: #2e3192;
    font-weight: 600;
    text-decoration: none;
}
.home-contact-card a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.home-footer {
    margin-top: auto;
    padding: 1.25rem;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: .9rem;
}
.home-footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
}
.home-footer a {
    color: var(--rsa-purple-600);
    text-decoration: none;
}
.home-footer a:hover { text-decoration: underline; }
/* Tagline · © year club: pieces that wrap whole. On a phone, two lines and no dot. */
.home-footer-note {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: .4rem;
    row-gap: .15rem;
}
@media (max-width: 640px) {
    .home-footer-note { flex-direction: column; }
    .home-footer-sep { display: none; }
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 640px) {
    .home-hero { padding: 2.5rem 1rem; }
    .home-hero h1 { font-size: 1.9rem; }
    .home-hero .lead { font-size: 1rem; }
    .home-logo { height: 80px; }
    .home-section { padding: 2.25rem 1rem; }
}

/* ---------- Public content pages (PublicLayout: fundraisers etc.) ---------- */
.home-content {
    flex: 1;
    padding: 2.5rem 1.25rem 3.5rem;
}
.home-content-inner {
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .home-content { padding: 1.5rem 1rem 2.5rem; }
}
