/* SWAG Collab – theme from logo: magenta, lime green, purple-blue, subtle gradients */

/* ---- Design tokens (logo palette) ---- */
:root {
    /* Logo colors: magenta (SWAG), lime (Collab), purple-blue (DNA/subtitle) */
    --bg: #fff;
    --bg-subtle: linear-gradient(180deg, #fdf2f9 0%, #f5f0fa 50%, #f0f9f4 100%);
    --bg-subtle-flat: #f8f4f9;
    --bg-card: #fff;
    --text: #2d1b3d;
    --text-muted: #5a4a6a;
    --border: #e8e0ef;
    --border-focus: #c41d6e;
    --accent: #c41d6e;
    --accent-hover: #a01859;
    --accent-secondary: #84bd00;
    --accent-tertiary: #6a5acd;
    --accent-light: #fce4ec;
    --accent-gradient: linear-gradient(135deg, #c41d6e 0%, #9c2a7a 50%, #6a5acd 100%);
    --accent-gradient-soft: linear-gradient(135deg, rgba(196, 29, 110, 0.08) 0%, rgba(106, 90, 205, 0.08) 100%);
    --link: #c41d6e;
    --link-hover: #a01859;
    --success: #84bd00;
    --error: #b91c1c;

    /* Typography */
    --font-sans: 'Source Sans 3', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --text-xs: 0.8125rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    /* Layout */
    --content-max: 960px;
    --radius-sm: 4px;
    --radius: 6px;
    --radius-lg: 8px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text);
    background: var(--bg);
    background-image: var(--bg-subtle);
    background-attachment: fixed;
    background-size: 100% 100%;
}
@media (prefers-reduced-motion: reduce) {
    body { background-attachment: scroll; }
}

/* ---- Skip link (a11y) ---- */
.skip-link {
    position: absolute;
    top: -100px;
    left: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    z-index: 100;
    border-radius: 0 0 var(--radius-sm) 0;
    font-weight: 500;
}
.skip-link:focus {
    top: 0;
}

/* ---- Header ---- */
.site-header {
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.utility-bar {
    background: linear-gradient(90deg, rgba(196, 29, 110, 0.06) 0%, rgba(132, 189, 0, 0.04) 50%, rgba(106, 90, 205, 0.06) 100%);
    font-size: var(--text-sm);
}

.utility-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: var(--space-2) var(--space-4);
    text-align: right;
}

.utility-inner a {
    color: var(--link);
    text-decoration: none;
    font-weight: 500;
}
.utility-inner a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.main-nav-wrap {
    padding: 6px var(--space-4);
}

.nav-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.logo img {
    height: 104px;
    width: auto;
    max-width: 520px;
    object-fit: contain;
    display: block;
}
.logo:hover img {
    opacity: 0.9;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-5);
}

.main-nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--text-base);
}
.main-nav a:hover {
    color: var(--accent);
}

/* ---- Main content ---- */
.main-content {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: var(--space-8) var(--space-4) var(--space-12);
    min-height: 50vh;
}

.main-content h1 {
    margin-top: 0;
    font-size: var(--text-3xl);
    font-weight: 700;
    line-height: var(--leading-tight);
    letter-spacing: -0.02em;
}

.main-content h2 {
    font-size: var(--text-2xl);
    font-weight: 600;
    margin-top: var(--space-8);
    margin-bottom: var(--space-3);
    line-height: var(--leading-snug);
}

.main-content h3 {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-top: var(--space-6);
    margin-bottom: var(--space-2);
}

.main-content p {
    margin: 0 0 var(--space-4);
}
.main-content p:last-child {
    margin-bottom: 0;
}

.main-content a {
    color: var(--link);
    text-decoration: none;
}
.main-content a:hover {
    text-decoration: underline;
    color: var(--link-hover);
}

/* ---- Home hero ---- */
.hero {
    margin-bottom: var(--space-8);
    padding: var(--space-6) var(--space-4);
    background: var(--accent-gradient-soft);
    border-radius: var(--radius-lg);
}

.hero h1 {
    margin-bottom: var(--space-2);
}

.hero-tagline {
    font-size: var(--text-lg);
    color: var(--text-muted);
    line-height: var(--leading-relaxed);
    max-width: 42ch;
}

/* ---- Home carousel (fixed-height strip under header) ---- */
.home-carousel {
    position: relative;
    margin-bottom: var(--space-8);
    max-width: var(--content-max);
    margin-left: auto;
    margin-right: auto;
    padding: 0 var(--space-4);
    overflow: hidden;
    height: 280px;
    box-sizing: border-box;
}

.home-carousel__track {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    transition: transform 0.35s ease;
    height: 280px;
    box-sizing: border-box;
}

.home-carousel__slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    height: 280px;
    max-height: 280px;
    box-sizing: border-box;
}

.home-carousel__link {
    display: block;
    position: relative;
    width: 100%;
    height: 280px;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-subtle-flat);
    box-sizing: border-box;
}

.home-carousel__link:hover .home-carousel__caption,
.home-carousel__link:focus .home-carousel__caption {
    background: linear-gradient(0deg, rgba(45, 27, 61, 0.85) 0%, transparent 100%);
}

.home-carousel .home-carousel__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 280px;
    max-height: 280px;
    object-fit: cover;
    object-position: center;
}

.home-carousel__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-4) var(--space-4) var(--space-3);
    background: linear-gradient(0deg, rgba(45, 27, 61, 0.75) 0%, transparent 100%);
    color: #fff;
    font-size: var(--text-lg);
    font-weight: 600;
    transition: background 0.2s ease;
}

.home-carousel__controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    padding: 0 var(--space-2);
}

.home-carousel__btn {
    pointer-events: auto;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: background 0.2s ease, transform 0.2s ease;
}
.home-carousel__btn:hover {
    background: #fff;
    transform: scale(1.05);
}
.home-carousel__btn:focus {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

.home-carousel__dots {
    display: flex;
    justify-content: center;
    gap: var(--space-2);
    margin: var(--space-3) 0 0;
    padding: 0;
    list-style: none;
}

.home-carousel__dot {
    width: 10px;
    height: 10px;
    border: none;
    border-radius: 50%;
    padding: 0;
    background: var(--border);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}
.home-carousel__dot:hover {
    background: var(--text-muted);
}
.home-carousel__dot--active {
    background: var(--accent);
    transform: scale(1.2);
}
.home-carousel__dot:focus {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .home-carousel,
    .home-carousel__track,
    .home-carousel__slide,
    .home-carousel__link {
        height: 200px;
        max-height: 200px;
    }
    .home-carousel .home-carousel__img {
        height: 200px;
        max-height: 200px;
    }
    .home-carousel__caption {
        font-size: var(--text-base);
    }
}

.mission-block {
    margin: var(--space-8) 0;
    padding: var(--space-6) 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.mission-block p {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--text);
    max-width: 65ch;
}

.member-cta-block {
    margin: var(--space-8) 0;
    padding: var(--space-6);
    background: linear-gradient(135deg, rgba(196, 29, 110, 0.06) 0%, rgba(106, 90, 205, 0.06) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.member-cta-block p {
    margin-top: 0;
    margin-bottom: var(--space-4);
}

.linkedin-feed-block {
    margin: var(--space-8) 0;
    padding: var(--space-6) 0;
    border-top: 1px solid var(--border);
}

.linkedin-feed-block h2 {
    margin-top: 0;
}

.linkedin-feed-list li {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border);
}

.linkedin-feed-list li:last-child {
    border-bottom: none;
}

/* ---- Buttons ---- */
.btn,
a.btn,
button.btn {
    display: inline-block;
    padding: var(--space-2) var(--space-5);
    background: var(--accent-gradient);
    color: #fff !important;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: var(--text-base);
    font-family: var(--font-sans);
    transition: filter 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(196, 29, 110, 0.3);
}
.btn:hover,
a.btn:hover,
button.btn:hover {
    filter: brightness(1.05);
    box-shadow: 0 4px 12px rgba(196, 29, 110, 0.35);
    color: #fff !important;
}

button.btn {
    border: none;
    cursor: pointer;
}

/* Any submit/primary button with dark or gradient background: white text */
button[type="submit"],
input[type="submit"] {
    color: #fff !important;
    background: var(--accent-gradient);
    border: none;
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius);
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
}
button[type="submit"]:hover,
input[type="submit"]:hover {
    color: #fff !important;
    filter: brightness(1.05);
}

/* ---- Cards (event list, news list, resource list) ---- */
.event-list,
.news-list,
.resource-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.event-list > li,
.news-list > li {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--border);
}
.event-list > li:last-child,
.news-list > li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.event-list > li h2,
.news-list > li h2 {
    margin-top: 0;
    margin-bottom: var(--space-2);
    font-size: var(--text-xl);
}
.event-list > li h2 a,
.news-list > li h2 a {
    color: var(--text);
}
.event-list > li h2 a:hover,
.news-list > li h2 a:hover {
    color: var(--accent);
}

.event-meta,
.news-meta {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin: var(--space-1) 0;
}

.list-thumb {
    display: block;
    height: auto;
    border-radius: var(--radius);
    margin-bottom: var(--space-3);
    box-shadow: var(--shadow);
}
.list-thumb--sm {
    max-width: 80px;
    margin-bottom: 0;
    margin-right: var(--space-3);
    flex-shrink: 0;
}
.event-list .list-thumb,
.news-list .list-thumb {
    max-width: 200px;
}

.resource-list > li {
    margin-bottom: var(--space-4);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}
.resource-list > li:last-child {
    border-bottom: none;
}

/* ---- Article / event detail / about / contact ---- */
.event-description,
.article-body,
.about-body,
.contact-intro,
.privacy-body {
    line-height: var(--leading-relaxed);
}
.about-body p,
.contact-intro p,
.privacy-body p {
    margin-bottom: var(--space-4);
}
.event-description img,
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}
.event-description p,
.article-body p {
    margin-bottom: var(--space-4);
}
.event-description ul,
.article-body ul,
.privacy-body ul {
    margin: 0 0 var(--space-4);
    padding-left: 1.5em;
}
.event-description li,
.article-body li {
    margin-bottom: var(--space-1);
}

.main-content img.feature-image,
.main-content .feature-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.success {
    color: var(--success);
    font-weight: 600;
}

.errors {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-4);
    color: var(--error);
}

/* ---- Footer ---- */
.site-footer {
    margin-top: auto;
    padding: var(--space-8) var(--space-4);
    background: linear-gradient(180deg, #f5f0fa 0%, #ede8f4 100%);
    border-top: 1px solid var(--border);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.footer-inner {
    max-width: var(--content-max);
    margin: 0 auto;
}

.footer-inner p {
    margin: var(--space-2) 0;
}

.footer-org {
    font-weight: 600;
    color: var(--text);
    font-size: var(--text-base);
}

.footer-contact a {
    color: var(--link);
    text-decoration: none;
}
.footer-contact a:hover {
    text-decoration: underline;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin: var(--space-3) 0;
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}
.footer-links a:hover {
    color: var(--accent);
}

.footer-legal {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
    font-size: var(--text-xs);
}
.footer-legal a {
    color: var(--text-muted);
    text-decoration: none;
}
.footer-legal a:hover {
    color: var(--accent);
}

/* ---- Forms ---- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="datetime-local"],
textarea {
    width: 100%;
    max-width: 400px;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: var(--text-base);
    font-family: var(--font-sans);
    color: var(--text);
}
input:focus,
textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(196, 29, 110, 0.15);
}

label {
    display: block;
    margin-bottom: var(--space-1);
    font-weight: 500;
    font-size: var(--text-sm);
}

.form-group {
    margin-bottom: var(--space-4);
}

/* ---- Utility ---- */
.text-muted {
    color: var(--text-muted);
}

/* ---- Admin: tables ---- */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}
th {
    text-align: left;
    padding: var(--space-2) var(--space-3);
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    color: var(--text);
}
td {
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--border);
}
tr:hover td {
    background: var(--bg-subtle-flat);
}

/* ---- Mobile ---- */
@media (max-width: 640px) {
    .nav-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .main-nav {
        gap: var(--space-3);
    }
    .main-content h1 {
        font-size: var(--text-2xl);
    }
    .hero-tagline {
        font-size: var(--text-base);
    }
}
