/* ============================================
   Felling Male Voice Choir - Shared Styles
   ============================================ */

:root {
  --color-bg: #0f1419;
  --color-bg-elevated: #1a2229;
  --color-header: #0a0e11;
  --color-accent: #4a7c3f;
  --color-accent-hover: #5d9a4f;
  --color-text: #e8eaed;
  --color-text-muted: #9aa0a6;
  --color-border: #2d363d;
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --header-height: 72px;
  --container-max: 1200px;
  --radius: 8px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent-hover);
}

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-header);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

.logo span {
  color: var(--color-accent);
}

/* Navigation */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
}

.main-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--color-text-muted);
  font-weight: 500;
  border-radius: var(--radius);
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--color-text);
  background: rgba(74, 124, 63, 0.15);
  color: var(--color-accent);
}

/* ========== Hero ========== */
.hero {
  background: linear-gradient(180deg, var(--color-bg-elevated) 0%, var(--color-bg) 100%);
  padding: 4rem 1.5rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--color-text);
}

.hero .tagline {
  margin: 0;
  font-size: 1rem;
  color: var(--color-accent);
  font-weight: 600;
}

.hero .subtitle {
  margin: 1rem 0 0;
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 42ch;
  margin-left: auto;
  margin-right: auto;
}

/* ========== Main content ========== */
main {
  flex: 1;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  width: 100%;
}

.page-title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-text);
}

.section-title {
  margin: 2.5rem 0 1rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-text);
}

/* ========== Cards grid ========== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow);
}

.card-image {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
  background: var(--color-border);
}

.card-body {
  padding: 1.25rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.card a {
  display: inline-block;
  margin-top: 0.75rem;
  font-weight: 600;
}

/* ========== Buttons ========== */
.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
  font-family: inherit;
}

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

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}

.btn-outline:hover {
  background: rgba(74, 124, 63, 0.15);
}

/* ========== Footer ========== */
.site-footer {
  background: var(--color-header);
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 1.5rem 2rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: var(--color-text-muted);
}

.footer-links a:hover {
  color: var(--color-accent);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-bg-elevated);
  border-radius: 50%;
  color: var(--color-text-muted);
  transition: color var(--transition), background var(--transition);
}

.social-links a:hover {
  color: var(--color-accent);
  background: rgba(74, 124, 63, 0.2);
}

.copyright {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ========== Profile cards (About) ========== */
.profile-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.profile-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
}

.profile-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--color-border);
}

.profile-card .profile-body {
  padding: 1.25rem;
}

.profile-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  color: var(--color-text);
}

.profile-card .role {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-accent);
  font-weight: 600;
}

.profile-card p {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.profile-card .profile-desc {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Clickable name to open full bio */
.profile-name-btn {
  display: inline;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 0.2em;
  transition: color 0.2s ease;
}

.profile-name-btn:hover {
  color: var(--color-accent);
}

/* Profile bio modal (full write-up from fmvc.org/about) */
.profile-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.profile-modal.is-open {
  display: flex;
}

.profile-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.profile-modal-content {
  position: relative;
  max-width: 36rem;
  max-height: 85vh;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  padding: 2rem 2rem 2.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.profile-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.profile-modal-close:hover {
  background: var(--color-accent-hover);
}

.profile-modal-title {
  margin: 0 2.5rem 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
}

.profile-modal-role {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.95rem;
  color: var(--color-accent);
  font-weight: 600;
}

.profile-modal-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.profile-modal-body p {
  margin: 0 0 0.75rem;
}

.profile-modal-body p:last-child {
  margin-bottom: 0;
}

/* ========== Gallery masonry ========== */
.gallery-grid {
  column-count: 1;
  column-gap: 1rem;
  margin: 2rem 0;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.gallery-item:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow);
}

.gallery-item img {
  width: 100%;
  display: block;
  vertical-align: middle;
}

.gallery-credit {
  margin-top: 2rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-align: center;
}

@media (min-width: 480px) {
  .gallery-grid {
    column-count: 2;
  }
}

@media (min-width: 768px) {
  .gallery-grid {
    column-count: 3;
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    column-count: 4;
  }
}

/* ========== Lightbox ========== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-content {
  max-width: 95vw;
  max-height: 90vh;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: var(--color-accent);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: background var(--transition);
}

.lightbox-close:hover {
  background: var(--color-accent-hover);
}

/* ========== Video cards (thumbnail links to YouTube – no embed, avoids Error 153) ========== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.video-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.video-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.video-card-link:hover {
  border-color: var(--color-accent);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.video-card-link .video-caption {
  color: var(--color-text);
}

.video-card-link:hover .video-caption {
  color: var(--color-accent);
}

.video-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--color-border);
  overflow: hidden;
}

.video-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 3rem;
  transition: background 0.2s ease, font-size 0.2s ease;
}

.video-card-link:hover .video-play-icon {
  background: rgba(74, 124, 63, 0.6);
  font-size: 3.5rem;
}

.video-card .video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

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

.video-card .video-caption {
  padding: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

/* ========== Contact form ========== */
.contact-form {
  max-width: 560px;
  margin: 2rem 0;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* ========== Content blocks ========== */
.content-block p {
  margin: 0 0 1rem;
  color: var(--color-text-muted);
}

.content-block p:last-child {
  margin-bottom: 0;
}

.event-list,
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.event-list li,
.news-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}

.event-list li:last-child,
.news-list li:last-child {
  border-bottom: none;
}

.event-list h3,
.news-list h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  color: var(--color-text);
}

.event-list .meta,
.news-list .meta {
  font-size: 0.9rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.news-list li p {
  margin: 0 0 0.75rem;
  color: var(--color-text-muted);
}

.news-list li p:last-child {
  margin-bottom: 0;
}

/* ========== Mobile nav ========== */
@media (max-width: 767px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-header);
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-nav.is-open {
    max-height: 80vh;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
  }

  .main-nav a {
    padding: 0.75rem;
  }

  .header-inner {
    position: relative;
  }
}
