/* ============================================================
   JEFFERSON ARC – W5GAD  |  style.css
   ============================================================ */

/* ------------------------------------------------------------
   CSS Custom Properties
   ------------------------------------------------------------ */
:root {
  --red:        #f53d3d;
  --black:      #111111;
  --white:      #ffffff;
  --gray-light: #f4f4f4;
  --gray-mid:   #e0e0e0;
  --gray-text:  #444444;

  --font-body:  'Inter', sans-serif;

  --max-width:  1080px;
  --nav-height: 80px;

  --transition: 0.2s ease;
}

/* ------------------------------------------------------------
   Reset & Base
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--black);
  background: var(--white);
}

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

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

ul {
  list-style: none;
}

/* ------------------------------------------------------------
   Typography
   ------------------------------------------------------------ */

/* H1/H2 use the heavier weight that mirrors "Inter deprecated" display usage */
h1, h2 {
  font-family: var(--font-body);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

p {
  margin-bottom: 1em;
  color: var(--gray-text);
}
p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------
   Announcement Bar
   ------------------------------------------------------------ */
#announcement-bar {
  background: var(--red);
  color: var(--white);
  text-align: center;
  padding: 10px 48px;
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  line-height: 1.4;
}

#announcement-bar a {
  color: var(--white);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#announcement-bar.hidden {
  display: none;
}

#bar-close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  opacity: 0.85;
}
#bar-close:hover { opacity: 1; }

/* ------------------------------------------------------------
   Site Header & Navigation
   ------------------------------------------------------------ */
#site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-mid);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.site-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 16px 0 4px;
  text-align: center;
}

/* Desktop nav */
#main-nav {
  width: 100%;
}

#nav-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 10px 0 12px;
}

#nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition);
}

#nav-links a:hover {
  border-color: var(--black);
}

#nav-links a.active {
  border-bottom: 2px solid var(--black);
}

/* Hamburger (mobile only) */
#nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0 12px;
  font-size: 1.5rem;
  line-height: 1;
  align-self: center;
}

/* Mobile nav overlay */
#mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 80px;
  gap: 0;
}

#mobile-menu.open {
  display: flex;
}

#mobile-menu-close {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--black);
}

#mobile-menu a {
  font-size: 1.15rem;
  font-weight: 500;
  padding: 18px 0;
  width: 100%;
  text-align: center;
  border-bottom: 1px solid var(--gray-mid);
  text-decoration: none;
  color: var(--black);
}

#mobile-menu a.active {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ------------------------------------------------------------
   Page Wrapper
   ------------------------------------------------------------ */
.page-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 0px;
}

/* Full-bleed sections (no max-width constraint) */
.full-bleed {
  width: 100%;
}

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-block;
  padding: 16px 24px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity var(--transition);
}

.btn:hover { opacity: 0.85; }

.btn-black {
  background: var(--black);
  color: var(--white);
}

.btn-block {
  display: block;
  width: 100%;
}

/* Button grid (2-up, 3-up) */
.btn-grid {
  display: grid;
  gap: 4px;
  margin-top: 24px;
}

.btn-grid-2 { grid-template-columns: 1fr 1fr; }
.btn-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.btn-grid-4 { grid-template-columns: 1fr 1fr; }

/* ------------------------------------------------------------
   Page Hero / Intro
   ------------------------------------------------------------ */
.page-hero {
  text-align: center;
  padding: 40px 24px 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-hero h1 {
  margin-bottom: 12px;
}

.page-hero p {
  font-size: 1rem;
  color: var(--gray-text);
  max-width: 600px;
  margin: 0 auto;
}

/* ------------------------------------------------------------
   Two-Column Content Grid (image + text)
   ------------------------------------------------------------ */
.content-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 48px;
}

.content-split img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

/* ------------------------------------------------------------
   Card Grid (education page: 2-up sections)
   ------------------------------------------------------------ */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.card-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  margin-bottom: 16px;
}

.card-grid h3 {
  margin-bottom: 10px;
}

/* ------------------------------------------------------------
   Photo Carousel
   ------------------------------------------------------------ */
.carousel-wrapper {
  position: relative;
  overflow: hidden;
  background: var(--black);
}

/* Split layout: left=carousel, right=text */
.carousel-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  margin-bottom: 0;
}

.carousel-split .carousel-wrapper {
  /* fills left column */
}

.carousel-split .carousel-text {
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Full-width carousel (equipment page) */
.carousel-full .carousel-wrapper {
  height: 420px;
}

/* Carousel track */
.carousel-track {
  display: flex;
  transition: transform 0.45s ease;
  height: 100%;
}

.carousel-slide {
  min-width: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Carousel controls */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.carousel-btn:hover { background: var(--white); }
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

/* Dots */
.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition);
}
.carousel-dot.active { background: var(--white); }

/* Split carousel: set explicit heights */
.carousel-split .carousel-wrapper {
  min-height: 420px;
}

/* ------------------------------------------------------------
   Home Page – Navigation Tiles
   ------------------------------------------------------------ */
.nav-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 32px 0;
}

/* Center tile (large featured image) */
.nav-tiles .tile-center {
  grid-row: 1 / 3;
  grid-column: 2 / 3; /* center column of 3-col on desktop */
}

.nav-tile {
  position: relative;
  overflow: hidden;
  min-height: 200px;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.nav-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.nav-tile:hover img {
  transform: scale(1.04);
}

.nav-tile-label {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 12px 14px;
  background: rgba(0,0,0,0.55);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.3;
}

/* Red corner accent on nav tiles */
.nav-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--red);
  z-index: 2;
}
.nav-tile::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 8px;
  height: 8px;
  background: var(--red);
  z-index: 2;
}

/* Desktop home: 3-column tile layout */
.nav-tiles-desktop {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 6px;
  margin: 32px 0;
}

.nav-tiles-desktop .col-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-tiles-desktop .tile-center {
  min-height: 420px;
}

.nav-tiles-desktop .col-side .nav-tile {
  flex: 1;
  min-height: 200px;
}

/* ------------------------------------------------------------
   Home Hero Text Block
   ------------------------------------------------------------ */
.home-intro {
  text-align: center;
  padding: 0px 24px;
  max-width: 680px;
  margin: 0 auto;
}

.home-intro h1 {
  margin-bottom: 16px;
}

/* ------------------------------------------------------------
   Accordion
   ------------------------------------------------------------ */
.accordion {
  border-top: 1px solid var(--gray-mid);
  margin: 16px 0;
}

.accordion-item {
  border-bottom: 1px solid var(--gray-mid);
}

.accordion-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  padding: 16px 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--black);
  cursor: pointer;
  text-align: left;
}

.accordion-icon {
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1;
  flex-shrink: 0;
  transition: transform var(--transition);
  color: var(--black);
  min-width: 20px;
  text-align: center;
}

.accordion-item.open .accordion-icon {
  transform: rotate(45deg);
}

.accordion-body {
  display: none;
  padding: 0 0 16px 32px;
  color: var(--gray-text);
  font-size: 0.95rem;
  line-height: 1.65;
}

.accordion-item.open .accordion-body {
  display: block;
}

/* ------------------------------------------------------------
   Membership CTA Section
   ------------------------------------------------------------ */
.membership-cta {
  background: var(--gray-light);
  text-align: center;
  padding: 10px 24px;
  margin-top: 0px;
}

.membership-cta h2 {
  max-width: 700px;
  margin: 0 auto 28px;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
}

.membership-cta .btn {
  min-width: 200px;
}

.membership-cta .cta-sub {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--gray-text);
}

.membership-cta .cta-sub a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ------------------------------------------------------------
   What's Happening Page
   ------------------------------------------------------------ */
.calendar-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 40px;
}

.calendar-embed-wrapper {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--gray-mid);
}

.calendar-embed-wrapper iframe {
  display: block;
  width: 100%;
  min-width: 500px;
  height: 500px;
  border: none;
}

.calendar-mobile-link {
  display: none;
  text-align: center;
  padding: 24px;
  background: var(--gray-light);
  margin-bottom: 32px;
}

.calendar-mobile-link p {
  margin-bottom: 16px;
}

/* What's Happening: event list text */
.events-sidebar ul {
  list-style: disc;
  padding-left: 20px;
  margin: 12px 0 16px;
  color: var(--gray-text);
}

.events-sidebar ul li {
  margin-bottom: 8px;
}

/* ------------------------------------------------------------
   Our Club Page
   ------------------------------------------------------------ */
.club-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 40px;
}

/* The left side has the carousel; right side has paragraphs */
.club-info-grid .carousel-wrapper {
  min-height: 380px;
}

.photo-gallery-btn {
  margin-top: 0;
}

/* Membership sections side by side */
.membership-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin: 48px 0;
}

/* ------------------------------------------------------------
   Equipment Page
   ------------------------------------------------------------ */
.equipment-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 32px;
}

.donations-section {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--gray-mid);
}

.donations-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 16px;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
#site-footer {
  background: var(--black);
  color: var(--white);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
}

.footer-copy {
  opacity: 0.8;
}

.footer-social {
  display: flex;
  gap: 20px;
  align-items: center;
}

.footer-social a {
  color: var(--white);
  text-decoration: none;
  opacity: 0.8;
  font-size: 0.85rem;
  transition: opacity var(--transition);
}

.footer-social a:hover { opacity: 1; }

/* X (Twitter) separator dot */
.footer-social span {
  opacity: 0.4;
}

/* ------------------------------------------------------------
   Utility Classes
   ------------------------------------------------------------ */
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

.section-divider {
  border: none;
  border-top: 1px solid var(--gray-mid);
  margin: 48px 0;
}

/* Inline text links (underlined) */
.text-link {
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

/* Bold "HERE" style links */
.link-here {
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================================
   RESPONSIVE – Tablet  (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {

  /* Nav: hide links, show hamburger */
  #nav-links { display: none; }
  #nav-toggle { display: flex; }

  .site-title { padding-bottom: 0; }

  /* 2-col grids → 1-col */
  .content-split,
  .card-grid,
  .calendar-layout,
  .club-info-grid,
  .equipment-intro,
  .membership-split,
  .btn-grid-3 {
    grid-template-columns: 1fr;
  }

  /* Home nav tiles: 2 columns */
  .nav-tiles-desktop {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .nav-tiles-desktop .col-side {
    flex-direction: column;
  }

  .nav-tiles-desktop .tile-center {
    grid-column: 1 / -1;
    min-height: 280px;
    order: -1;
  }

  /* Carousel split → stacked */
  .carousel-split {
    grid-template-columns: 1fr;
  }

  .carousel-split .carousel-wrapper {
    min-height: 280px;
  }

  .carousel-full .carousel-wrapper {
    height: 280px;
  }

  /* Calendar: hide iframe, show link */
  .calendar-embed-wrapper { display: none; }
  .calendar-mobile-link { display: block; }
  .calendar-layout { grid-template-columns: 1fr; }

  .btn-grid-2,
  .btn-grid-4 {
    grid-template-columns: 1fr;
  }

  .membership-cta {
    padding: 40px 20px;
  }
}

/* ============================================================
   RESPONSIVE – Mobile  (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {

  #announcement-bar {
    font-size: 0.85rem;
    padding: 10px 40px;
  }

  .page-content {
    padding: 24px 16px 48px;
  }

  .page-hero {
    padding: 24px 16px 20px;
  }

  .nav-tiles-desktop {
    grid-template-columns: 1fr;
  }

  .nav-tiles-desktop .tile-center {
    min-height: 220px;
  }

  .nav-tiles-desktop .col-side {
    flex-direction: column;
  }

  .nav-tiles-desktop .col-side .nav-tile {
    min-height: 160px;
  }

  .card-grid img,
  .content-split img {
    height: 180px;
  }

  .carousel-split .carousel-wrapper {
    min-height: 220px;
  }

  .btn-grid-2,
  .btn-grid-3,
  .btn-grid-4 {
    grid-template-columns: 1fr;
  }

  #site-footer {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}
