/* Rotary Club de Neuchâtel — brand tokens & public site base. See docs/09-branding.md. */
:root {
    --rcn-blue: #0c3c7c;       /* Royal Blue */
    --rcn-gold: #f7a81b;       /* Gold */
    --rcn-blue-ink: #0a2f61;   /* darker hover/active */
    --rcn-surface: #ffffff;
    --rcn-surface-alt: #f5f7fa;
    --rcn-text: #1a1a1a;
    --rcn-font: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

body {
    margin: 0;
    font-family: var(--rcn-font);
    color: var(--rcn-text);
    background: var(--rcn-surface);
}

.rcn-site { display: flex; flex-direction: column; min-height: 100vh; }

.rcn-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; padding: 0.75rem 1.5rem;
    border-bottom: 3px solid var(--rcn-gold);
    background: var(--rcn-surface);
}

.rcn-brand { display: flex; align-items: center; text-decoration: none; }
.rcn-logo { height: 44px; width: auto; display: block; }

.rcn-header-right { display: flex; align-items: center; gap: 1.5rem; }
.rcn-nav { display: flex; gap: 1.25rem; }
.rcn-nav a { color: var(--rcn-blue); text-decoration: none; font-weight: 600; }
.rcn-nav a:hover { color: var(--rcn-gold); }

/* Discreet account control on the right of the header */
.rcn-account { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; }
.rcn-account-name { color: var(--rcn-blue); font-weight: 600; text-decoration: none; }
.rcn-account-name:hover { color: var(--rcn-gold); }
.rcn-account-link { color: var(--rcn-text-muted, #6b7280); text-decoration: none; }
.rcn-account-link:hover { color: var(--rcn-gold); }

.rcn-main { flex: 1 1 auto; }

.rcn-hero {
    background: var(--rcn-blue);
    color: #fff;
    padding: 4rem 1.5rem;
    text-align: center;
}
.rcn-hero h1 { margin: 0 0 0.5rem; font-size: 2.4rem; }
.rcn-hero p { margin: 0; opacity: 0.9; }

#blazor-error-ui {
    background: #fff3cd;
    color: #1a1a1a;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.75rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
#blazor-error-ui a { color: var(--rcn-blue); font-weight: 600; }

.rcn-page { max-width: 880px; margin: 0 auto; padding: 2.5rem 1.5rem; }
.rcn-page h1 { color: var(--rcn-blue); margin-top: 0; }
.rcn-muted { color: #888; font-size: 0.95rem; }

.rcn-footer {
    padding: 1.25rem 1.5rem;
    background: var(--rcn-surface-alt);
    color: #555;
    font-size: 0.9rem;
    border-top: 1px solid #e3e8ef;
}

/* --- Photo galleries (docs/07-photo-library.md) --- */

/* Album tiles on /galleries */
.rcn-album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}
.rcn-album-tile {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    overflow: hidden;
    background: var(--rcn-surface);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.rcn-album-tile:hover {
    box-shadow: 0 6px 18px rgba(12, 60, 124, 0.15);
    transform: translateY(-2px);
}
.rcn-album-cover {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    background: var(--rcn-surface-alt);
}
.rcn-album-cover--empty {
    background: repeating-linear-gradient(45deg, #eef2f7, #eef2f7 12px, #e3e8ef 12px, #e3e8ef 24px);
}
.rcn-album-meta { padding: 0.75rem 0.9rem; display: flex; flex-direction: column; gap: 0.15rem; }
.rcn-album-title { color: var(--rcn-blue); font-weight: 700; }
.rcn-album-date { color: #888; font-size: 0.85rem; }

/* Album header: subtitle + Markdown description */
.rcn-album-subtitle {
    font-size: 1.2rem;
    color: var(--rcn-blue-ink);
    margin: -0.25rem 0 0.5rem;
    font-weight: 600;
}
.rcn-album-description {
    margin: 0.75rem 0 0.5rem;
    line-height: 1.6;
}
.rcn-album-description > :first-child { margin-top: 0; }
.rcn-album-description > :last-child { margin-bottom: 0; }
.rcn-album-description h1,
.rcn-album-description h2,
.rcn-album-description h3 { color: var(--rcn-blue); }
.rcn-album-description a { color: var(--rcn-blue); }
.rcn-album-description img { max-width: 100%; height: auto; }

/* Thumbnail grid inside an album */
.rcn-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.rcn-gallery-item {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 6px;
    background: var(--rcn-surface-alt);
}
.rcn-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}
.rcn-gallery-item:hover img { transform: scale(1.04); }
.rcn-gallery-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 0.35rem 0.5rem;
    font-size: 0.78rem;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
    opacity: 0;
    transition: opacity 0.15s ease;
}
.rcn-gallery-item:hover .rcn-gallery-caption { opacity: 1; }

/* Events list */
.rcn-event-list { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 1.5rem; }
.rcn-event-card {
    border: 1px solid #e3e8ef;
    border-left: 4px solid var(--rcn-gold);
    border-radius: 8px;
    padding: 1.1rem 1.25rem;
    background: var(--rcn-surface);
}
.rcn-event-card--past { border-left-color: #cbd3dd; opacity: 0.72; }
.rcn-event-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.rcn-event-title { color: var(--rcn-blue); margin: 0; font-size: 1.35rem; }
.rcn-event-subtitle { color: var(--rcn-blue-ink); font-weight: 600; margin: 0.15rem 0 0; }
.rcn-event-date { margin: 0.25rem 0 0; }
.rcn-event-description { margin: 0.6rem 0 0; line-height: 1.6; }
.rcn-event-description > :first-child { margin-top: 0; }
.rcn-event-description > :last-child { margin-bottom: 0; }
.rcn-event-description h1, .rcn-event-description h2, .rcn-event-description h3 { color: var(--rcn-blue); }
.rcn-event-description a { color: var(--rcn-blue); }
.rcn-event-description img { max-width: 100%; height: auto; }
.rcn-event-cta { display: flex; align-items: center; gap: 1rem; margin-top: 0.9rem; flex-wrap: wrap; }

.rcn-event-badge {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
    padding: 0.2rem 0.6rem; border-radius: 999px; white-space: nowrap;
}
.rcn-event-badge--open { background: #e6f4ea; color: #1d7a3a; }
.rcn-event-badge--soon { background: #fff3cd; color: #8a6d1b; }
.rcn-event-badge--closed { background: #eef0f3; color: #6b7280; }

.rcn-btn {
    display: inline-block; background: var(--rcn-blue); color: #fff; text-decoration: none;
    font-weight: 600; padding: 0.5rem 1.1rem; border-radius: 6px;
}
.rcn-btn:hover { background: var(--rcn-blue-ink); }
