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

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #1a2a2a;
    background: #fff;
}

img {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ── Hero background ── */
.hero-bg {
    background: linear-gradient(to right, rgba(18, 43, 69, 0.85) 0%, rgba(18, 43, 69, 0.55) 50%, rgba(18, 43, 69, 0.20) 100%),
    url('../images/hero_img.png') center/cover no-repeat;
}

/* ── Join cards backgrounds ── */
.join-benevole {
    background: linear-gradient(135deg, rgba(18, 43, 69, 0.88), rgba(18, 43, 69, 0.45)),
    url('https://images.unsplash.com/photo-1526676037777-05a232554f77?w=700&q=70') center/cover;
}

.join-adherent {
    background: linear-gradient(135deg, rgba(42, 85, 128, 0.90), rgba(42, 85, 128, 0.50)),
    url('https://images.unsplash.com/photo-1593764592116-bfb2a97c642a?w=700&q=70') center/cover;
}

/* ── Scroll reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .5s ease, transform .5s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

.delay-1 { transition-delay: .08s; }
.delay-2 { transition-delay: .16s; }
.delay-3 { transition-delay: .24s; }

/* ── Dropdown ── */
.has-dd:hover .dropdown,
.has-dd:focus-within .dropdown,
.has-dd.open .dropdown {
    display: block;
}

/* Invisible bridge between the trigger and the dropdown so the hover
   zone stays continuous — fixes sub-items vanishing when the cursor
   crosses the gap. */
.has-dd::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 0.5rem;
    pointer-events: none;
}
.has-dd:hover::after,
.has-dd:focus-within::after,
.has-dd.open::after {
    pointer-events: auto;
}
.has-dd .dropdown {
    margin-top: 0 !important;
}

/* ── Section heading with decorative lines ── */
.section-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.section-head::before,
.section-head::after {
    content: '';
    flex: 1;
    max-width: 80px;
    height: 2px;
    background: #1b3a5c;
    border-radius: 2px;
    opacity: 0.3;
}

/* ── Focus visible for keyboard nav ── */
:focus-visible {
    outline: 2px solid #1b3a5c;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .delay-1, .delay-2, .delay-3 {
        transition-delay: 0s;
    }
    html {
        scroll-behavior: auto;
    }
}
