/* Villa Park High School Music Club - Styles */

/* ========== CSS Variables ========== */
:root {
  --accent: #79BDE8;
  --bg: #0b0f13;
  --card: #0f1720;
  --muted: #9aa4ad;
  --text-light: #f5f5f5;
  --border-light: rgba(255, 255, 255, 0.1);
  --card-bg: rgba(255, 255, 255, 0.05);
}

/* ========== Base Styles ========== */
* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: var(--bg);
  color: var(--text-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6, p {
  margin-bottom: 0.75rem;
}

h5 {
  color: var(--text-light);
  text-decoration: underline;
  text-decoration-color: #4da3ff;
  text-decoration-thickness: 2px;
  margin-bottom: 0.75rem;
}

.text-muted {
  color: rgba(255, 255, 255, 0.7) !important;
}

small, .small {
  color: rgba(255, 255, 255, 0.8) !important;
}

.section-title h2 {
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #f3fbff;
}

/* ========== Links ========== */
a {
  color: #4da3ff;
  text-decoration: none;
  transition: color 0.2s, text-decoration 0.2s;
}

a:hover {
  color: #82c4ff;
  text-decoration: underline;
}

/* ========== Navbar ========== */
.navbar {
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.navbar .container {
  padding-top: 0.1rem;
  padding-bottom: 0.1rem;
}

.navbar .nav-link {
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
}

.logo-sm {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.navbar-brand .brand-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.navbar-brand .brand-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ========== Buttons ========== */
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: #5fb2d8;
  border-color: #5fb2d8;
}

.btn-instagram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.btn-instagram i {
  margin-right: 0.4rem;
}

/* ========== Layout ========== */
section {
  padding: 2rem 0;
}

.container {
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}

/* ========== Hero Section ========== */
.hero-section {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.hero-card img {
  max-height: 320px;
  width: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* Subtle floating animation */
@keyframes floaty {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

.hero-card {
  animation: floaty 6s ease-in-out infinite;
}

/* ========== Cards ========== */
.styled-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: auto;
  overflow-wrap: break-word;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border-light);
}

.member-card {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--card-bg);
  border-radius: 12px;
  height: auto;
  min-height: 200px;
  overflow-wrap: break-word;
  word-break: break-word;
  border: 1px solid var(--border-light);
  transition: padding 200ms ease;
  align-items: flex-start; /* Align items to top to prevent stretching */
}

.member-card p {
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-avatar {
  width: 90px;
  height: 90px;
  min-width: 90px; /* Prevent shrinking */
  min-height: 90px; /* Prevent shrinking */
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0; /* Prevent avatar from shrinking when text wraps */
}

/* ========== Gallery ========== */
#galleryCarousel img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  transform-origin: center center;
}

#galleryCarousel img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(121, 189, 232, 0.3);
}

#galleryCarousel a {
  display: block;
  overflow: hidden;
  border-radius: 8px;
}

/* ========== GLightbox Customization ========== */
/* Custom Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

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

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

.lightbox-img {
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.lightbox-prev,
.lightbox-next,
.lightbox-close {
  position: absolute;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close { top: -16px; right: -16px; font-size: 1.4rem; }
.lightbox-prev { left: -56px; top: 50%; transform: translateY(-50%); font-size: 1.2rem; }
.lightbox-next { right: -56px; top: 50%; transform: translateY(-50%); font-size: 1.2rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(121, 189, 232, 0.9);
  transform: translateY(-50%) scale(1.05);
}

.lightbox-close:hover {
  background: rgba(121, 189, 232, 0.9);
  transform: scale(1.05);
}

@media (max-width: 576px) {
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close { top: 8px; right: 8px; }
}

/* ========== Leadership Section ========== */
.leader-item {
  overflow: hidden;
  transition: max-height 450ms ease, opacity 350ms ease, margin 250ms ease;
  padding-top: 0.75rem;
}

.leader-collapsed {
  max-height: 0 !important;
  opacity: 0;
  margin-bottom: 0 !important;
  pointer-events: none;
  display: none;
}

.leader-visible {
  opacity: 1;
}

#memberGrid > .col-sm-6,
#memberGrid > .col-md-4,
#memberGrid > .col-lg-3 {
  margin-bottom: 0.75rem !important;
}

.view-more-link {
  background: transparent;
  border: none;
  padding: 0;
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
  color: rgba(255,255,255,0.85);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
}

.view-more-link:hover,
.view-more-link:focus {
  color: #ffffff;
  text-decoration-color: var(--accent);
  outline: none;
}

/* ========== Standards Section ========== */
#standardsListContainer {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border-light);
}

.list-group-item {
  color: var(--text-light);
}

/* ========== Footer ========== */
footer {
  color: var(--muted);
}

/* ========== FAQ Section ========== */
.faq-scrollable {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

.faq-scrollable::-webkit-scrollbar {
  width: 6px;
}

.faq-scrollable::-webkit-scrollbar-track {
  background: transparent;
}

.faq-scrollable::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

.faq-scrollable::-webkit-scrollbar-thumb:hover {
  background: #5fb2d8;
}

.faq-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.faq-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.faq-question {
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.faq-answer {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 0;
}

/* ========== Utilities ========== */
.icon-xxs {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

::placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* ========== Responsive Design ========== */

/* Mobile adjustments */
@media (max-width: 576px) {
  #galleryCarousel img {
    height: 160px;
  }
  
  section, .container {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .faq-scrollable {
    max-height: 250px;
  }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 991px) {
  #memberGrid .col-md-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* Desktop adjustments */
@media (min-width: 992px) {
  #memberGrid .col-lg-3 {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
  }
}

/* Hide view more button on desktop */
@media (min-width: 768px) {
  #viewMoreLeaders {
    display: none !important;
  }

  #memberGrid .leader-collapsed {
    max-height: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}