/* =========================
   DESIGN TOKENS
========================= */

:root {
  --bg: #0f0f14;
  --bg-gradient: radial-gradient(circle at top, #1b1b2a, #0f0f14);
  --card: #1a1a24;

  --text: #f4f4f6;
  --muted: #b6b6c6;

  --accent: #ff6ec7;
  --accent2: #6ee7ff;

  --radius: 14px;
  --max-width: 1100px;
}

/* =========================
   RESET / BASE
========================= */

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-gradient);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

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

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

/* =========================
   LAYOUT
========================= */

main {
  padding: 1rem;
}

section {
  margin: 3rem 0;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* =========================
   TYPOGRAPHY
========================= */

h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

h3 {
  margin-bottom: 0.5rem;
}

p {
  color: var(--muted);
}

/* gradient text */
.gradient {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =========================
   HEADER / NAV (MOBILE FIRST)
========================= */

.site-header {
  padding: 1rem;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* hamburger */
.menu-toggle {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text);
}

/* nav hidden on mobile */
.nav {
  display: none;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.nav.open {
  display: flex;
}

/* =========================
   HERO
========================= */

.hero {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero p {
  max-width: 500px;
}

/* =========================
   BUTTONS
========================= */

.buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  padding: 0.9rem 1.3rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: #000;
  font-weight: 600;
  text-align: center;
  min-height: 44px;
}

.btn.secondary {
  background: transparent;
  border: 1px solid #333;
  color: var(--text);
}

/* =========================
   CARDS
========================= */

.card {
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* =========================
   GRID SYSTEM
========================= */

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* =========================
   BOARD MEMBERS
========================= */

.member img {
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}

/* =========================
   FAQ (DETAILS)
========================= */

details {
  cursor: pointer;
}

/* =========================
   FORMS
========================= */

input {
  width: 100%;
  padding: 0.7rem;
  border-radius: var(--radius);
  border: none;
  margin-bottom: 0.5rem;
}

/* =========================
   FOOTER
========================= */

footer {
  margin-top: 4rem;
  padding: 2rem 1rem;
  border-top: 1px solid #222;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* =========================
   TABLET BREAKPOINT
========================= */

@media (min-width: 600px) {

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .buttons {
    flex-direction: row;
  }
}

/* =========================
   DESKTOP BREAKPOINT
========================= */

@media (min-width: 768px) {

  h1 {
    font-size: 3rem;
  }

  main {
    padding: 2rem;
  }

  .hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
  }

  .menu-toggle {
    display: none;
  }

  .nav {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
  }

  .carousel img {
    height: 400px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* =========================
   LARGE DESKTOP
========================= */

@media (min-width: 1024px) {

  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.parking-map {
  width: 100%;
  border-radius: var(--radius);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.social-icon {
  width: 28px;
  height: 28px;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.social-links a:hover .social-icon {
  transform: scale(1.1);
  filter: brightness(0) saturate(100%) invert(70%);
  filter: drop-shadow(0 0 6px var(--accent));
}

.site-logo {
  height: 40px;         /* mobile-first default */
  width: auto;
}

@media (min-width: 768px) {
  .site-logo {
    height: 60px;
  }
}

.logo-link {
  display: inline-block;
}

.mailchimp-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* tablet+ layout */
@media (min-width: 600px) {
  .mailchimp-form {
    flex-wrap: wrap;
    flex-direction: row;
  }

  .mailchimp-form input {
    flex: 1 1 30%;
    min-width: 140px;
  }

  .mailchimp-form input[name="EMAIL"] {
    flex: 2 1 40%;
  }

  .mailchimp-form button {
    flex: 1 1 100%;
  }
}

.form-message {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

.form-message.success {
  color: #4ade80; /* green */
  animation: fadeIn 0.3s ease;
}

.form-message.error {
  color: #f87171; /* red */
}

.form-message.success {
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.board-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.board-member {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* image */
.member-photo {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  aspect-ratio: 1 / 1;
  max-width: 300px;
  margin: 0 auto;
}

/* text */
.member-info h2 {
  margin-bottom: 0.25rem;
}

.member-role {
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.member-info p {
  font-size: 0.95rem;
}

/* =========================
   DESKTOP LAYOUT
========================= */

@media (min-width: 768px) {
  .board-member {
    flex-direction: row;
    align-items: center;
  }

  .member-photo {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
  }

  .member-info {
    flex: 1;
  }
}

.board-member:hover {
  transform: translateY(-2px);
  transition: transform 0.2s ease;
}

.member-photo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* credit text */
.photo-credit {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.25rem;
  text-align: center;
  opacity: 0.5;
}

@media (min-width: 768px) {
  .member-photo-wrapper {
    align-items: flex-start;
  }

  .photo-credit {
    text-align: left;
  }
}

.board-member {
  display: grid;
  gap: 0.75rem;
}

/* Assign areas */
.member-info h2 {
  grid-area: name;
}

.member-role {
  grid-area: role;
}

.member-photo-wrapper {
  grid-area: photo;
}

.member-bio {
  grid-area: bio;
}

/* Mobile layout */
.board-member {
  grid-template-areas:
    "name"
    "role"
    "photo"
    "bio";
}

@media (min-width: 768px) {
  .board-member {
    grid-template-columns: 200px 1fr;
    grid-template-areas:
      "photo name"
      "photo role"
      "photo bio";
    align-items: center;
  }
}

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

/* each FAQ card */
.faq-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* summary (question row) */
.faq-item summary {
  list-style: none;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* remove default arrow */
.faq-item summary::-webkit-details-marker {
  display: none;
}

/* icon */
.faq-icon {
  transition: transform 0.2s ease;
}

/* rotate icon when open */
.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

/* answer text */
.faq-item p, .faq-item li, .faq-item ul {
  margin-top: 0.75rem;
  color: var(--muted);
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
}

.faq-links {
  margin-top: 0.5rem;
  padding-left: 1.2rem;
}

.faq-links li {
  margin-bottom: 0.3rem;
}

.faq-links a {
  color: var(--accent2);
  text-decoration: underline;
}

.faq-links a:hover {
  opacity: 0.8;
}

.carousel {
  overflow: hidden;
  border-radius: var(--radius);
}

.carousel-track {
  display: flex;
  transition: transform 0.6s ease;
  height: 100%;
}

.carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
  object-position: center top;

}

.carousel {
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 16 / 9; /* consistent cropping */
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* text */
.event-date {
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.event-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event-image {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
}

@media (min-width: 768px) {
  .event-card {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 👈 equal space */
    gap: 1.5rem;
    align-items: start;
  }

  .event-image {
    width: 100%;
    height: auto;
    max-height: 700px; /* 👈 prevents absurdly tall flyers */
    object-fit: contain;
  }

  .event-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.event-card {
  display: grid;
  gap: 1rem;
}

/* assign areas */
.event-image {
  grid-area: image;
}

.event-info {
  grid-area: info;
}

/* 📱 Mobile layout (info first, image after) */
.event-card {
  grid-template-areas:
    "info"
    "image";
}

@media (min-width: 768px) {
  .event-card {
    grid-template-columns: 1.2fr 0.8fr;
    grid-template-areas: "image info";
    align-items: start;
  }
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.lightbox.hidden {
  display: none;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: var(--radius);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
}

/* gallery grid */
.event-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* images */
.gallery-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius);
  cursor: zoom-in;
}

/* desktop */
@media (min-width: 768px) {
  .event-gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-image {
    height: 140px;
  }
}

.event-card {
  display: grid;
  gap: 1rem;
}

/* default: text only (full width) */
.event-card {
  grid-template-areas:
    "info";
}

/* when image exists */
.event-card.has-image {
  grid-template-areas:
    "image"
    "info";
}

@media (min-width: 768px) {
  .event-card.has-image {
    grid-template-columns: 1.0fr 1.0fr;
    grid-template-areas: "image info";
  }

  .event-image {
    align-self: center;
  }

  .event-info {
    align-self: start;
  }
}
}
