@import url('https://fonts.googleapis.com/css2?family=Electrolize&display=swap');

:root {
    --color-primary: #0D4157;
    --color-accent: #CC4716;
    --color-light: #F9F9F1;
    --max-width: 800px;
    --hero-height: 150px;
    --logo-size: 140px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Electrolize', sans-serif;
    color: var(--color-primary);
    background-color: #fff;
    margin: 0;
    text-align: center;
}

main,
header,
footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 12px;
}

header {
    position: relative;
}

#hero {
    position: relative;
    width: 100%;
    height: var(--hero-height);
    overflow: visible;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0 0 8px 8px;
}

#logo {
    position: absolute;
    left: 50%;
    bottom: calc(var(--logo-size) / -2);
    transform: translateX(-50%);
    width: var(--logo-size);
    height: var(--logo-size);
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid white;
    background: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 10;
    display: block;
}

#logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

nav {
    margin-top: calc(var(--logo-size) / 2 + 20px);
    margin-bottom: 12px;
    background-color: var(--color-primary);
    border-radius: 10px;
    padding: 6px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 0;
    margin: 0;
}

nav li {
    margin: 0;
}

nav a {
    color: var(--color-light);
    text-decoration: none;
    padding: 8px 16px;
    display: block;
    border-radius: 7px;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

nav a:hover,
nav a:focus {
    background-color: var(--color-accent);
    outline: none;
}

nav a.sign-in {
    background-color: var(--color-accent);
    color: var(--color-light);
    font-weight: bold;
}

nav a.sign-in:hover {
    background-color: #a8390f;
}

h1 {
    color: var(--color-accent);
    font-size: 1.4rem;
    margin-bottom: 12px;
}

h2 {
    color: var(--color-accent);
    font-size: 1.3rem;
    margin-bottom: 12px;
}

p {
    line-height: 1.7;
    font-size: 0.95rem;
}

main {
    margin-top: 24px;
}

#intro-text {
    margin: 24px 0 32px;
    padding: 0 4px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ABOUT PAGE */
.about,
.team,
.contact {
    margin: 32px 0 40px;
    padding: 0 8px;
    text-align: center;
}

.about p,
.team p,
.contact p {
    max-width: 700px;
    margin: 0 auto 16px;
    line-height: 1.7;
    font-size: 0.95rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    justify-items: center;
    align-items: center;
    margin-top: 24px;
}

.team-grid img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    border: 3px solid var(--color-primary);
    display: block;
    background: #f3f3f3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* keep old class too in case another page still uses it */
.team-images {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}

.team-images img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    display: block;
    border: 3px solid var(--color-primary);
}

/* ACTIVITIES PAGE */
.activities-section {
    justify-items: center;
    margin: 24px 0 40px;
    padding: 0 4px;
    text-align: left;
}

.activities-section h2 {
    color: var(--color-accent);
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-family: 'Electrolize', sans-serif;
    text-align: center;
}

.activities-header {
    position: relative;
    width: 100%;
    text-align: left;
    margin-bottom: 16px;
    padding: 12px 0;
    height: 48px;
}

.activities-header h1 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
}

.filter-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--color-primary);
    color: var(--color-light);
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.filter-btn:hover {
    background-color: var(--color-accent);
}

.quick-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.quick-nav-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    background: #fff;
    color: var(--color-primary);
    text-decoration: none;
    padding: 16px 24px;
    border-radius: 12px;
    border: 1px solid #d0dce8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    font-family: 'Electrolize', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    min-width: 180px;
    transition: box-shadow 0.2s, transform 0.15s;
}

.quick-nav-btn .nav-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.quick-nav-btn .nav-label {
.filter-wrapper {
    position: absolute;
    left: 0;
}

.filter-btn {
    position: relative;
    z-index: 3;
}

/* Dropdown panel */
.filter-panel {
    position: absolute;
    top: 110%; /* just below button */
    left: 0;

    background: #fff;
    border: 1px solid #d0dce8;
    border-radius: 10px;
    padding: 12px;
    margin-top: 6px;

    box-shadow: 0 8px 20px rgba(0,0,0,0.12);

    display: flex;
    flex-direction: column;
    gap: 3px;

    min-width: 200px;
    z-index: 2;

    animation: fadeDown 0.2s ease;
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Hidden state */
.quick-nav-btn .nav-label span {
    font-size: 0.8rem;
    font-weight: 400;
    color: #5a7a99;
}

.quick-nav-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.13);
    transform: translateY(-2px);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.going-count {
    font-size: 0.68rem;
    font-weight: 700;
    color: #2e7d32;
    text-align: center;
    min-height: 1rem;
    width: 100%;
    word-break: break-word;
}

.activity-card {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    background: #fff;
    border: 1px solid #d0dce8;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
    text-align: left;
}

.activity-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.13);
    transform: translateY(-2px);
}

.activity-card img {
    width: 110px;
    height: 100%;
    min-height: 110px;
    object-fit: cover;
    display: block;
}

.card-body {
    padding: 0.75rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 0.2rem 0;
    font-family: 'Electrolize', sans-serif;
}

.card-time {
    font-size: 0.8rem;
    color: #5a7a99;
    margin: 0 0 0.4rem 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.card-time::before {
    content: "🕒";
}

.card-description {
    font-size: 0.88rem;
    color: #444;
    line-height: 1.5;
    margin: 0;
}

.card-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-left: 1px solid #e8eef4;
    width: 75px;
    flex-shrink: 0;
}

.btn-going,
.btn-notgoing {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
}

.btn-going {
    background: #e6f4ea;
    color: #2e7d32;
}

.btn-going:hover,
.btn-going.active {
    background: #2e7d32;
    color: #fff;
    transform: scale(1.12);
}

.btn-notgoing {
    background: #fdecea;
    color: #c62828;
}

.btn-notgoing:hover,
.btn-notgoing.active {
    background: #c62828;
    color: #fff;
    transform: scale(1.12);
}

.rsvp-status {
    font-size: 0.68rem;
    font-weight: 600;
    text-align: center;
    color: #888;
    min-height: 1rem;
    font-family: 'Electrolize', sans-serif;
    width: 100%;
    word-break: break-word;
}

/* WHEEL PAGE */
.wheel-page {
    margin: 32px 0 48px;
    padding: 0 4px;
}

.wheel-page h1 {
    color: var(--color-accent);
    margin-bottom: 10px;
}

.wheel-page p {
    margin-bottom: 20px;
}

.wheel-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 30px auto;
}

.pointer {
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 32px solid var(--color-accent);
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.wheel {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 8px solid var(--color-primary);
    position: relative;
    transition: transform 4s ease-out;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 95px;
    height: 95px;
    transform: translate(-50%, -50%);
    background: white;
    border: 6px solid var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.wheel-center span {
    font-size: 42px;
    font-weight: bold;
    color: var(--color-accent);
    line-height: 1;
}

.slice-label {
    position: absolute;
    left: 50%;
    top: 50%;
    transform-origin: 0 0;
    font-size: 0.72rem;
    font-weight: bold;
    color: white;
    white-space: nowrap;
    max-width: 110px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.35);
}

#spinBtn {
    font-family: 'Electrolize', sans-serif;
    background-color: var(--color-accent);
    color: var(--color-light);
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 12px;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

#spinBtn:hover {
    background-color: #a8390f;
    transform: translateY(-1px);
}

#spinBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background: white;
    color: var(--color-primary);
    width: 300px;
    max-width: 90%;
    padding: 24px 20px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.popup-content h2 {
    color: var(--color-accent);
    margin-bottom: 12px;
}

.popup-content p {
    margin-bottom: 16px;
}

.popup-content button {
    font-family: 'Electrolize', sans-serif;
    background-color: var(--color-primary);
    color: var(--color-light);
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    margin: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.popup-content button:hover {
    background-color: var(--color-accent);
}

.hidden {
    display: none;
}

footer {
    max-width: var(--max-width);
    margin: 40px auto 0;
    padding: 16px 12px;
    font-size: 0.8rem;
    color: #666;
}

form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    max-width: 400px;
    margin: 0 auto;
}



@media (min-width: 480px) {
    :root {
        --hero-height: 180px;
        --logo-size: 160px;
    }

    h1 {
        font-size: 1.6rem;
    }

    nav a {
        font-size: 1rem;
        padding: 8px 20px;
    }

    .activities-section h2 {
        font-size: 1.6rem;
    }

    .activity-card {
        grid-template-columns: 130px 1fr auto;
    }

    .activity-card img {
        width: 130px;
    }

    .wheel-wrapper {
        width: 380px;
        height: 380px;
    }

    .wheel {
        width: 360px;
        height: 360px;
    }

    .team-grid img,
    .team-images img {
        width: 130px;
        height: 130px;
    }
}

@media (min-width: 768px) {
    :root {
        --hero-height: 220px;
        --logo-size: 180px;
    }

    h1 {
        font-size: 1.9rem;
    }

    p {
        font-size: 1rem;
    }

    #intro-text {
        margin: 36px 0 48px;
    }

    .activities-section {
        margin: 36px 0 48px;
        padding: 0;
    }

    .activities-section h2 {
        font-size: 1.9rem;
    }

    .activity-card {
        grid-template-columns: 150px 1fr auto;
    }

    .activity-card img {
        width: 150px;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .wheel-wrapper {
        width: 420px;
        height: 420px;
    }

    .wheel {
        width: 400px;
        height: 400px;
    }

    .team-grid {
        gap: 24px;
    }

    .team-grid img,
    .team-images img {
        width: 140px;
        height: 140px;
    }
}