/* assets/styles.css
   Theme: CSUN red mapped to Bootstrap primary
   Clean hero (theme-aware), responsive sections, lightweight polish
*/

/* ===== Globals & theme ===== */
:root {
  --mobile-navbar-h: 56px;
  /* default Bootstrap navbar height on mobile */
  scroll-behavior: smooth;

  /* CSUN red */
  --csun-red: #CE1126;
  --csun-red-rgb: 206, 17, 44;

  /* Map Bootstrap primary to CSUN red */
  --bs-primary: var(--csun-red);
  --bs-primary-rgb: var(--csun-red-rgb);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
}

/* ===== Buttons (primary = CSUN red) ===== */
.btn-primary {
  --bs-btn-bg: var(--csun-red);
  --bs-btn-border-color: var(--csun-red);
  --bs-btn-hover-bg: #b90f24;
  --bs-btn-hover-border-color: #b90f24;
  --bs-btn-focus-shadow-rgb: var(--csun-red-rgb);
  --bs-btn-active-bg: #a50e1f;
  --bs-btn-active-border-color: #a50e1f;
}

.btn-outline-primary {
  --bs-btn-color: var(--csun-red);
  --bs-btn-border-color: var(--csun-red);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--csun-red);
  --bs-btn-hover-border-color: var(--csun-red);
  --bs-btn-focus-shadow-rgb: var(--csun-red-rgb);
  --bs-btn-active-bg: #a50e1f;
  --bs-btn-active-border-color: #a50e1f;
}

/* Secondary CTA variant kept for other sections if needed over dark assets */
.btn-outline-light {
  --bs-btn-color: #fff;
  --bs-btn-border-color: rgba(255, 255, 255, .85);
  --bs-btn-hover-color: #000;
  --bs-btn-hover-bg: #fff;
  --bs-btn-hover-border-color: #fff;
  --bs-btn-focus-shadow-rgb: 255, 255, 255;
}

/* Subtle lift for all buttons */
.btn {
  transition: transform .12s ease, box-shadow .12s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
}

/* ===== Anchor offsets (sticky navbar) & hero min-height ===== */
#home,
.hero-section {
  min-height: 50vh;
  /* smaller hero size */
  position: relative;
}

@media (max-width: 991.98px) {

  #home,
  .hero-section {
    min-height: auto;
    /* let content + padding control size */
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  /* Keep in-page anchors visible beneath the sticky navbar */
  header[id],
  section[id] {
    scroll-margin-top: calc(var(--mobile-navbar-h) + 8px);
  }
}

/* ======================================================================= */
/*                                HERO (THEME-AWARE)                       */
/* ======================================================================= */
/* Background image (use relative path) + overlay for readability */
.hero-section {
  border-bottom: 4px solid var(--csun-red);
  position: relative;
  padding-top: clamp(2rem, 6vh, 4rem);
  padding-bottom: clamp(2rem, 6vh, 4rem);
  background-color: #fff;
  /* fallback if image fails */

}

header.hero-section {
  background: url("./images/hero.jpeg") center/cover no-repeat;
}

/* Soft overlay that adapts to light/dark for better text contrast */
.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  /* light: subtle white veil; dark: subtle black veil */
  background: linear-gradient(to right,
      color-mix(in oklab, var(--bs-body-bg) 85%, transparent),
      color-mix(in oklab, var(--bs-body-bg) 60%, transparent));
  pointer-events: none;
}

/* Ensure the content sits above the overlay */
.hero-section>.container {
  position: relative;
  z-index: 1;
}

/* Headline now theme-aware (no forced text-dark class needed) */
.hero-section .display-5 {
  font-size: clamp(1.8rem, 3.4vw + .6rem, 2.45rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--bs-body-color);
  margin-bottom: .75rem;
  text-shadow: none;
}

/* Keep your existing hero-img sizing; remove hard bg so the logo floats cleanly */
.hero-img {
  width: clamp(340px, 26vw, 320px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: transparent !important;
  margin-inline: auto;
  border-radius: 1rem;
}

.hero--center>.container {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  /* ensures full screen centering */
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.hero--center .row {
  width: 100%;
  justify-content: center;
}

.hero--center .col-12 {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (max-width: 991.98px) {
  .hero-img {
    width: clamp(112px, 34vw, 172px);
    place-items: center;

  }
}

/* ======================================================================= */
/*                             EVENTS SECTION                               */
/* ======================================================================= */

#events .section-intro {
  max-width: 68ch;
}

.event-card {
  /* DARK-MODE: keep brand but blend into background for better contrast */
  border-left: 4px solid color-mix(in oklab, var(--csun-red) 85%, var(--bs-body-bg));
  transition: box-shadow .15s ease, transform .15s ease;
}

.event-card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
  transform: translateY(-1px);
}

.event-card .card-title {
  letter-spacing: -0.01em;
}

/* ======================================================================= */
/*                             PROJECTS SECTION                             */
/* ======================================================================= */

.project-thumb {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  /* DARK-MODE: neutral shimmer that adapts to body color */
  background: linear-gradient(135deg,
      color-mix(in oklab, var(--bs-body-color) 8%, transparent),
      color-mix(in oklab, var(--bs-body-color) 3%, transparent));
}

.placeholder-wave {
  animation: shimmer 1.2s linear infinite;
  background: linear-gradient(90deg,
      color-mix(in oklab, var(--bs-body-color) 8%, transparent) 25%,
      color-mix(in oklab, var(--bs-body-color) 14%, transparent) 37%,
      color-mix(in oklab, var(--bs-body-color) 8%, transparent) 63%);
  background-size: 400% 100%;
}

@keyframes shimmer {
  0% {
    background-position: 100% 0
  }

  100% {
    background-position: -100% 0
  }
}

/* ======================================================================= */
/*                             OFFICERS SECTION                             */
/* ======================================================================= */

.officer-card {
  transition: box-shadow .15s ease, transform .15s ease;
}

.officer-card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, .10);
  transform: translateY(-1px);
}

.avatar {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  background: var(--avatar-bg, #ddd);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6);
  display: grid;
  place-items: center;
}

@media (min-width: 768px) {
  .avatar {
    width: 84px;
    height: 84px;
  }
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar .avatar-fallback {
  font-weight: 700;
  color: rgba(255, 255, 255, .95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  letter-spacing: .02em;
  font-size: 1.1rem;
}

.avatar:not(.no-img) .avatar-fallback {
  display: none;
}

.avatar.no-img .avatar-img {
  display: none;
}

/* Officers history accordion */
.officers-year summary {
  cursor: pointer;
  list-style: none;
}

.officers-year summary::-webkit-details-marker {
  display: none;
}

.officers-year summary::after {
  content: "▸";
  margin-left: .5rem;
  transition: transform .2s ease;
  display: inline-block;
}

.officers-year[open] summary::after {
  transform: rotate(90deg);
}

/* ======================================================================= */
/*                                JOIN SECTION                              */
/* ======================================================================= */

.btn-discord {
  --btn: #5865F2;
  --btn-hover: #4752C4;
  color: #fff;
  background: var(--btn);
  border-color: var(--btn);
}

.btn-discord:hover,
.btn-discord:focus-visible {
  background: var(--btn-hover);
  border-color: var(--btn-hover);
  color: #fff;
}

/* DARK-MODE: neutralize QR frame using Bootstrap tokens */
.join-card .qr-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
}

.join-card .qr-wrap img {
  display: block;
  width: 220px;
  height: 220px;
  object-fit: contain;
}

/* ======================================================================= */
/*                                ABOUT SECTION                             */
/* ======================================================================= */

.section-intro {
  max-width: 68ch;
}

/* Bulleted list with brand dots */
.about-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: .5rem;
}

.about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .5rem;
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--csun-red);
  box-shadow: 0 0 0 3px rgba(206, 17, 44, .15);
}

/* Track cards - THEME-AWARE */
.about-tracks .track-card {
  border: 1px solid var(--bs-border-color);
  border-left: 4px solid var(--csun-red);
  border-radius: 14px;
  padding: .9rem .9rem .8rem;
  background: var(--bs-body-bg);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.about-tracks .track-card:hover,
.about-tracks .track-card:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .08);
  border-left-color: #b90f24;
}

/* Collage grid */
.about-collage {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  grid-template-rows: 1fr 1fr;
  gap: .8rem;
}

/* THEME-AWARE image frames */
.about-img {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  isolation: isolate;
  min-height: 180px;
  background:
    radial-gradient(80% 80% at 50% 40%, color-mix(in oklab, var(--bs-body-bg) 30%, #fff), transparent),
    linear-gradient(135deg,
      color-mix(in oklab, var(--bs-body-color) 8%, transparent),
      color-mix(in oklab, var(--bs-body-color) 2%, transparent));
  outline: 1px solid var(--bs-border-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .10);
}

.about-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.0);
  transition: transform .5s ease;
}

.about-img:hover img {
  transform: scale(1.03);
}

.about-img--a {
  grid-column: 1/2;
  grid-row: 1/3;
  aspect-ratio: 4/5;
}

.about-img--b {
  grid-column: 2/3;
  grid-row: 1/2;
  aspect-ratio: 4/3;
}

.about-img--c {
  grid-column: 2/3;
  grid-row: 2/3;
  aspect-ratio: 4/3;
}

@media (prefers-reduced-motion: reduce) {

  .about-img img,
  .about-tracks .track-card {
    transition: none;
  }
}

/* KPIs - THEME-AWARE */
.about-kpis .kpi {
  border: 1px dashed var(--bs-border-color);
  border-radius: 12px;
  padding: .9rem .9rem .8rem;
  background: var(--bs-body-bg);
}

.kpi-num {
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: clamp(1.15rem, 1.25vw + 1rem, 1.6rem);
}

.kpi-label {
  font-size: .95rem;
}

/* Additional dark polish for About (kept minimal) */
@media (prefers-color-scheme: dark) {
  .about-img {
    box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
  }
}

/* About: compact mobile layout */
@media (max-width: 767.98px) {
  .about-collage {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: .6rem;
  }

  .about-img--a,
  .about-img--b,
  .about-img--c {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
    min-height: 180px;
  }

  .about-img--a {
    order: 1;
  }

  .about-img--b {
    order: 2;
  }

  .about-img--c {
    order: 3;
  }

  .about-tracks .track-card,
  .about-kpis .kpi {
    padding: .8rem .85rem;
  }

  .kpi-num {
    font-size: clamp(1rem, 2.2vw + .9rem, 1.35rem);
  }
}

/* ======================================================================= */
/*                               MISC / NAV                                */
/* ======================================================================= */

/* Roomier dropdown items (touch friendly) */
.dropdown-menu .dropdown-item {
  padding: .55rem 1rem;
}