/* ============================================================
   GATEWAY ART GALLERY — main.css
   Mobile-first, single-column, matches existing site design
   ============================================================ */

/* ── TOKENS ────────────────────────────────────────────────── */
:root {
  --teal:        #00b2b2;
  --teal-light:  #00cccc;
  --green:       #8ccc30;
  --green-light: #a0d553;
  --orange:      #f87e00;
  --red:         #f53e7a;
  --pink:        #FF69B4;
  --black:       #272727;
  --white:       #ffffff;
  --gray-bg:     #f5f5f5;
  --gray-border: #dddddd;
  --gray-text:   #666666;

  --btn-bg:       color-mix(in srgb, var(--teal) 70%, white);
  --btn-hover:    color-mix(in srgb, var(--green) 70%, white);
  --btn-text:     var(--white);
  --btn-radius:   4px;

  --max-content:  800px;
  --max-wide:     1200px;
  --font-main:    'Roboto', sans-serif;
  --font-display: 'Raleway', sans-serif;
}

/* ── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; }
body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  color: var(--black);
  background: var(--gray-bg);
  max-width: 100vw;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; transition: color .2s; }
a:hover { color: var(--green-light); text-decoration: underline; }
h1, h2, h3, h4 { color: var(--teal); text-align: center; font-family: var(--font-display); font-weight: 500; line-height: 1.25; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: .75rem; }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); margin-bottom: .6rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); margin-bottom: .5rem; }
p { margin-bottom: .75rem; }
hr { border: none; border-top: 1px solid var(--gray-border); margin: 2rem 0; }

html, body {
  overflow-x: hidden;
  overflow-y: auto;
}

/* ── LAYOUT WRAPPERS ───────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 16px;
}
.wrap-wide {
  width: 100%;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 16px;
}
.section { padding: 2rem 0; }
.section-dark {
  background: #212121;
  color: var(--white);
  padding: 2.5rem 0;
}
.section-dark h1, .section-dark h2, .section-dark h3 {
  color: var(--green);
}
.section-gray { background: var(--gray-bg); padding: 2rem 0; }

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn,
button,
input[type="submit"],
input[type="button"] {
  display: inline-block;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: var(--btn-radius);
  padding: .6em 1.4em;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background .2s, opacity .2s;
}
.btn:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--btn-hover);
  color: var(--btn-text);
  text-decoration: none;
}
.btn-block { display: block; width: 100%; margin: 1rem auto; max-width: 280px; }
.btn-outline {
  background: transparent;
  border: 2px solid var(--teal);
  color: var(--teal);
}
.btn-outline:hover { background: var(--teal); color: var(--white); }
.btn-sold {
  background: #f0f0f0 !important;
  color: #999 !important;
  border-color: #ddd !important;
  cursor: not-allowed;
}

/* ── TOP NAV BAR ───────────────────────────────────────────── */
.nav-primary {
  background: #000;
  position: fixed;
  top: 0px;
  left: 0;
  width: 100%;
  z-index: 9000;
}
.nav-primary .wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 0 16px;
}
.nav-primary ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 auto;
}
.nav-primary a {
  display: block;
  padding: 10px 14px;
  color: #99dd3a;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s;
}
.nav-primary a:hover,
.nav-primary a.active { color: #fff; }
.nav-primary .nav-cart { font-size: 1.3rem; padding: 8px 12px; }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--green);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 10px;
}
@media (max-width: 1024px) {
  .nav-toggle { display: flex; color: #fff; z-index: 2; position: static !important; margin: 0 auto; }
  .nav-toggle-label { display: inline-block !important; }
  .nav-primary > div { justify-content: center; }
  .nav-primary .nav-menu { display: none; flex-direction: column; width: 100%; position: absolute; top: 44px; left: 0; background: #000; }
  .nav-primary .nav-menu.open { display: flex; }
  .nav-primary .wrap { flex-wrap: wrap; min-height: 44px; position: relative; }
  .nav-primary a { padding: 12px 16px; border-top: 1px solid #1a1a1a; }
  .nav-mobile-only { display: block !important; }
  #navLogo { display: none !important; }
  .dropdown-arrow { font-size: .65rem; margin-left: 4px; display: inline-block; transition: transform .2s; }
  .has-dropdown.open .dropdown-arrow { transform: rotate(180deg); }
}
@media (min-width: 1025px) {
  .dropdown-arrow { display: none; }
}

/* ── SITE HEADER ───────────────────────────────────────────── */
.site-header {
  background: var(--white);
  padding: 10px 0 5px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.site-header .wrap {
  display: flex;
  align-items: left;
  justify-content: left;
  flex-direction: column;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 8px;
}
.site-header .logo img { max-height: 80px; width: auto; }

@media (max-width: 600px) {
  header.site-header img[alt="Gateway Art Gallery"] { max-height: 50px !important; }
  header.site-header p { display: none; }
}

.site-header .header-ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
}
.site-header .header-ctas a {
  color: var(--teal);
  font-weight: 500;
  font-size: .95rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color .2s;
}
.site-header .header-ctas a:hover { border-color: var(--teal); text-decoration: none; }
.site-header .cart-icon { font-size: 1.5rem; position: relative; }
@media (max-width: 600px) {
  .site-header .wrap { justify-content: center; }
  .site-header .header-ctas { display: none; }
}

/* ── HAPPENING CAROUSEL ────────────────────────────────────── */
.happening-section { padding: 1.5rem 0 3rem; }
.happening-carousel-wrap { max-width: var(--max-content); margin: 0 auto; padding: 0 16px; }
.happening-card { position: relative; }
.happening-card-media { position: relative; border-radius: 8px; overflow: hidden; }
.happening-card-media .card-header-bar {
  background: var(--teal);
  color: var(--white);
  padding: 8px 14px;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.happening-card-media img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.happening-card .card-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--black);
  text-align: left;
  margin: .35em .5em 0;
}
.happening-card .card-datetime {
  font-size: .95rem;
  color: var(--black);
  margin: 0 .5em .5em;
  text-align: left;
}

/* Swiper dots overrides */
.alnf-happening-carousel .swiper-pagination {
  position: relative;
  margin-top: 8px;
  text-align: center;
}
.alnf-happening-carousel .swiper-pagination-bullet {
  width: 8px; height: 8px;
  background: rgba(0,0,0,.25);
  opacity: 1;
  margin: 0 10px !important;
}
.alnf-happening-carousel .swiper-pagination-bullet-active {
  width: 0; height: 0;
  background: none;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 12px solid var(--green);
  border-radius: 0;
  transform: translateY(-1px);
}

.alnf-happening-carousel .swiper-button-next,
.alnf-happening-carousel .swiper-button-prev {
    color: #fff;
}

/* ── BADGE FRAMEWORK ───────────────────────────────────────── */
.badge-stack {
  position: absolute;
  left: 2%; bottom: 3%;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.badge {
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .4px;
  line-height: 1;
  white-space: nowrap;
  border: 2px solid transparent;
}
.badge-teal    { background: var(--teal); }
.badge-orange  { background: var(--orange); border-color: var(--orange); }
.badge-red     { background: var(--red); border-color: var(--red); }
.badge-green   { background: var(--green); border-color: var(--green); }
.badge-pink    { background: var(--pink); border-color: var(--pink); }
.badge-soldout { background: var(--pink); border-color: var(--pink); }
.badge-seats   { background: var(--white); color: var(--red); border-color: var(--red); }
.badge-cancelled {
  position: absolute !important;
  top: 50% !important; left: 50% !important;
  transform: translate(-50%, -50%) rotate(-3deg);
  background: var(--red) !important;
  font-size: 1.2rem !important;
  padding: 10px 22px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.3);
}
/* Watermark */
.card-media-wrap::after {
  content: "";
  position: absolute;
  bottom: 12px; right: 12px;
  width: 30px; height: 30px;
  background: url('/assets/img/favicon.png') center/contain no-repeat;
  opacity: .75;
  pointer-events: none;
}

/* ── NEWS FEED ─────────────────────────────────────────────── */
.news-section { background: var(--white); padding: 2rem 0; }
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 1rem;
}
.news-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  border-radius: 6px;
  overflow: hidden;
}
.news-card .thumb {
  max-height: 200px;
  overflow: hidden;
}
.news-card .thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.news-card .card-title-link {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--teal);
  text-align: center;
  padding: 10px 10px 4px;
  text-decoration: none;
  display: block;
  line-height: 1.3;
}
.news-card .card-title-link:hover { color: var(--teal-light); text-decoration: none; }
.news-card .excerpt {
  font-size: .95rem;
  color: var(--black);
  padding: 4px 10px;
  flex-grow: 1;
}
.news-card .read-more {
  display: block;
  text-align: center;
  color: var(--green);
  font-size: 1rem;
  padding: 4px 10px 12px;
}
.news-card .read-more:hover { color: var(--green-light); text-decoration: underline; }
.load-more-wrap { text-align: center; margin-top: 1.5rem; }
@media (max-width: 768px) {
  .news-grid { display: block; }
  .news-card { margin-bottom: 1.5rem; }
}



/* ── ARTIST OF THE DAY ─────────────────────────────────────── */
.artist-day-section {
  background: #212121;
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
}
.artist-day-section h2 { color: var(--green); font-size: clamp(1.6rem, 4vw, 2.2rem); }
.artist-day-wrap { max-width: 600px; margin: 0 auto; padding: 0 16px;}
.artist-day-photo {
  max-width: 350px;
  margin: 1rem auto;
  border-radius: 8px;
  overflow: hidden;
  border: 3px solid #333;
}
.artist-day-photo img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.artist-day-name {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--green);
  margin: .75rem 0 .5rem;
}
.artist-day-excerpt { font-size: 1rem; color: #ddd; line-height: 1.7; text-align:left;}
.artist-day-toggle {
  display: inline-block;
  color: var(--green);
  margin-top: 1rem;
  cursor: pointer;
  font-weight: 500;
  background: none;
  border: none;
  font-size: 1rem;
  font-family: inherit;
}
.artist-day-toggle:hover { text-decoration: underline; color: var(--green); }
.artist-day-full { display: none; margin-top: 1rem; color: #ddd; text-align: left; }
.artist-day-full.open { display: block; }

/* ── CLASS CARDS ───────────────────────────────────────────── */
.classes-section { padding: 2rem 0; }
.class-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 1rem;
}
.class-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s;
}
.class-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.class-card-image-wrap {
  position: relative;
  overflow: hidden;
}
.class-card-image-wrap .teal-bar {
  background: var(--teal);
  color: var(--white);
  padding: 7px 12px;
  font-size: .95rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.class-card-image-wrap .teal-bar .instructor {
  font-size: .8rem;
  font-weight: 400;
  text-align: right;
  opacity: .9;
}
.class-card-image-wrap img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.class-card-body { padding: 10px 12px 14px; flex: 1; display: flex; flex-direction: column; }
.class-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--black);
  text-align: left;
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px;
}
.class-info-btn {
  background: var(--white) !important; color: var(--teal-light);  border: 1 px; 
  font-size: 1rem; cursor: pointer; flex-shrink: 0;
  padding: 0; line-height: 1;
}
.class-info-btn:hover { color: var(--teal); }
.class-instructor { font-size: .82rem; color: #888; margin-bottom: 4px; }
.class-date { font-size: .82rem; color: #555; margin-bottom: 4px; }
.class-price { font-size: 1.05rem; font-weight: 700; color: var(--black); margin-bottom: 8px; }
.class-register-btn {
  display: block;
  width: 100%;
  padding: .55rem 0;
  background: var(--teal-light);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background .2s;
  margin: 0;
}
.class-register-btn:hover { background: var(--teal); color: var(--white); }
.class-multi-dates { font-size: .72rem; color: #888; text-align: center; margin-top: 4px; font-style: italic; }
.class-event-badge {
  position: absolute; bottom: 8px; left: 8px; z-index: 2;
  background: var(--white); color: var(--teal);
  font-size: .7rem; font-weight: 600; padding: 3px 8px;
  border-radius: 6px; text-transform: uppercase;
  pointer-events: none;
}

/* Filter bar */
.class-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  background: #e8e8e8;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.class-filters label { font-size: .85rem; color: #555; white-space: nowrap; }
.filter-select {
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: var(--white);
  font-size: .85rem;
  cursor: pointer;
}
.filter-reset {
  padding: 5px 12px;
  background: var(--teal);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  margin: 0;
}
.filter-sort {
  padding: 5px 10px;
  background: var(--white);
  color: var(--teal);
  border: 1.5px solid var(--teal);
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  margin: 0;
}

/* ── TAB BUTTONS ───────────────────────────────────────────── */
.tab-btn {
  padding: 6px 18px;
  border: 1.5px solid #1a1a1a;
  border-radius: 6px;
  background: var(--white);
  color: #1a1a1a;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.tab-btn.active {
  background: #1a1a1a;
  color: var(--white);
}
.tab-btn:hover:not(.active) {
  background: #f0f0f0;
  color: #1a1a1a;
}

@media (max-width: 768px) {
  .class-grid { grid-template-columns: 1fr; }
  .class-filters { gap: 4px; }
  .filter-select { font-size: .78rem; max-width: 90px; padding: 3px 5px; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .class-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── COMMUNITY MOMENT ──────────────────────────────────────── */
.community-moment-section { background: var(--white); padding: 2rem 0; }
.community-moment {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 16px 20px;
  border-left: 6px solid var(--green);
  border-radius: 6px;
  background: var(--white);
}
.moment-label {
  font-size: 1.1rem;
  color: var(--green);
  font-weight: 500;
  margin-bottom: 6px;
}
.moment-text {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--black);
  line-height: 1.5;
  margin-bottom: 6px;
}
.moment-credit {
  font-size: 1rem;
  color: var(--black);
  margin-left: -4px;
}

/* ── OFF THE WALLS SLIDER ──────────────────────────────────── */
.off-walls-section { background: var(--gray-bg); padding: 2.5rem 0; }
.off-walls-section h2 { color: var(--teal); }
.off-walls-section .subtitle { text-align: center; color: #555; margin-bottom: 1.25rem; }

/* TMG slider reused here */
.tmg-slider-wrapper { position: relative; height: 520px; }
.tmg-slider {
  position: relative; width: 100%;
  height: 520px; overflow: hidden;
}
.tmg-slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 1.8s ease;
  display: flex; align-items: center; justify-content: center; height: 100%;
}
.tmg-slide.active { opacity: 1; z-index: 2; }
.tmg-frame {
  height: 100%; box-sizing: border-box; padding: 14px;
  display: flex; position: relative;
}
.tmg-frame-brown { background: #5a3e2b; }
.tmg-frame-black { background: #000; }
.tmg-frame-white { background: var(--white); }
.tmg-mat {
  flex: 1; padding: 20px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; position: relative;
  box-shadow: inset 0 2px 3px rgba(0,0,0,.18), inset 0 -1px 2px rgba(0,0,0,.06);
}
.tmg-mat img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tmg-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; height: 35%;
  background: linear-gradient(to top, rgba(0,0,0,.8), rgba(0,0,0,.35), transparent);
  color: var(--white); opacity: 1;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  padding: 28px 36px 32px 40px; text-align: left;
  pointer-events: none;
}
.tmg-title { font-size: 1rem; font-weight: 600; }
.tmg-caption { font-size: .85rem; opacity: .85; }
.tmg-prev, .tmg-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 30; background: rgba(200,200,200,.22) !important;
  border: none; color: var(--white) !important;
  font-size: 1.8rem; width: 40px; height: 40px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
}
.tmg-prev { left: -50px; }
.tmg-next { right: -50px; }
.tmg-prev:hover, .tmg-next:hover {
  background: rgba(200,200,200,.4) !important;
  color: #000 !important;
}
@media (max-width: 768px) {
  .tmg-slider, .tmg-slider-wrapper { height: 340px !important; }
  .tmg-prev { left: 4px; }
  .tmg-next { right: 4px; }
}

/* ── ARTIST DIRECTORY ──────────────────────────────────────── */
.artist-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 1rem;
}
.artist-card { text-align: center; }
.artist-card img {
  width: 100%; aspect-ratio: 4/3;
  object-fit: cover; object-position: center;
  border-radius: 4px; margin-bottom: 8px;
}
.artist-card .name { font-size: 1rem; color: var(--teal); font-weight: 500; margin-bottom: 4px; }
.artist-card .bio-excerpt { font-size: .88rem; color: var(--black); margin-bottom: 6px; }
.artist-card .read-more { font-size: .9rem; color: var(--green); }
@media (max-width: 1024px) { .artist-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .artist-grid { grid-template-columns: 1fr; } }

/* ── ARTIST BIO PAGE ───────────────────────────────────────── */
.artist-bio-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
}
.artist-bio-layout img {
  width: 100%; border-radius: 6px;
  border: 1px solid var(--gray-border);
}
@media (max-width: 700px) {
  .artist-bio-layout { grid-template-columns: 1fr; }
  .artist-bio-layout img { max-width: 320px; margin: 0 auto; }
}

/* Artist shop grid (same as class grid) */
.artist-shop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 1rem;
}
.shop-item-card {
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  display: flex; flex-direction: column;
}
.shop-item-card img {
  width: 100%; aspect-ratio: 1/1;
  object-fit: cover;
}
.shop-item-body { padding: 8px 10px 12px; flex: 1; display: flex; flex-direction: column; }
.shop-item-title { font-size: .95rem; font-weight: 500; color: var(--black); text-align: left; margin-bottom: 4px; }
.shop-item-price { font-size: 1rem; font-weight: 700; color: var(--black); margin-bottom: 8px; }
.shop-item-btn {
  display: block; width: 100%;
  padding: .45rem 0;
  background: var(--teal); color: var(--white);
  border: none; border-radius: 6px;
  font-size: .85rem; font-weight: 600;
  cursor: pointer; text-align: center;
  margin: 0;
}
.shop-item-btn:hover { background: var(--teal-light); color: var(--white); }
.shop-item-btn.sold { background: #f0f0f0 !important; color: #999 !important; cursor: not-allowed; }
@media (max-width: 768px) { .artist-shop-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── FOOTER ────────────────────────────────────────────────── */
.site-footer {
  background: var(--green);
  color: var(--white);
  padding: 2.5rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.site-footer h4 {
  color: var(--white);
  text-align: left;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .75rem;
}
.site-footer p, .site-footer address { font-size: .9rem; line-height: 1.7; font-style: normal; }
.site-footer a { color: var(--white); text-decoration: underline; }
.site-footer a:hover { color: rgba(255,255,255,.8); }
.footer-email-card {
  background: #333;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}
.footer-email-card p { font-size: .9rem; margin-bottom: 10px; }
.footer-email-card input[type="text"],
.footer-email-card input[type="email"] {
  width: 100%; padding: 10px; border: none; border-radius: 4px;
  margin-bottom: 8px; font-size: .95rem;
  background: var(--white); color: var(--black);
}
.footer-email-card .subscribe-btn {
  display: block; width: 100%;
  background: var(--teal); color: var(--white);
  border: none; border-radius: 4px;
  padding: 10px; font-size: .95rem; font-weight: 600; cursor: pointer;
  margin: 0;
}
.footer-social { display: flex; gap: 12px; justify-content: center; margin-top: 12px; }
.footer-social a { font-size: 1.5rem; text-decoration: none; }
.footer-join-btn {
  display: block; width: 100%;
  background: #f25b3d; color: var(--white);
  border: none; border-radius: 4px;
  padding: 12px; font-size: 1rem; font-weight: 700;
  text-align: center; text-decoration: none; margin-top: 8px;
}
.footer-join-btn:hover { background: #d94e32; color: var(--white); text-decoration: none; }
.footer-bottom {
  text-align: center; font-size: .75rem;
  border-top: 1px solid rgba(255,255,255,.2);
  margin-top: 1.5rem; padding-top: 1rem;
  color: rgba(255,255,255,.8);
}
.footer-bottom a { color: rgba(255,255,255,.8); }
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── LIBRARY ───────────────────────────────────────────────── */
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}
.library-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}
.library-card .book-cover {
  width: 100%; aspect-ratio: 2/3;
  margin-bottom: 10px; position: relative;
  background: #f2f2f2; border-radius: 4px; overflow: hidden;
}
.library-card .book-cover img { width: 100%; height: 100%; object-fit: cover; }
.library-card .book-title { font-size: .9rem; font-weight: 600; margin-bottom: 4px; }
.library-card .book-author { font-size: .8rem; font-weight: 700; color: #222; margin-bottom: 4px; }
.library-card .book-status-avail { color: green; font-weight: 700; font-size: .85rem; }
.library-card .book-status-out   { color: var(--red); font-weight: 700; font-size: .85rem; }
@media (max-width: 768px) {
  .library-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

/* ── CART BAR ──────────────────────────────────────────────── */
.cart-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #1a1a1a; color: var(--white);
  padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: 0 -2px 12px rgba(0,0,0,.25);
  transform: translateY(100%);
  transition: transform .3s ease;
  z-index: 9999;
}
.cart-bar.visible { transform: translateY(0); }
.cart-bar .cart-summary { font-size: .9rem; flex: 1; }
.cart-bar .cart-summary strong { display: block; font-size: 1rem; }
.cart-bar .cart-summary span { font-size: .8rem; opacity: .75; }
.cart-bar .cart-btns { display: flex; gap: 8px; flex-shrink: 0; }
.cart-bar .cart-clear {
  padding: 8px 14px; background: transparent;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 6px; color: var(--white);
  font-size: .85rem; cursor: pointer;
}
.cart-bar .cart-checkout {
  padding: 8px 18px; background: var(--white);
  color: #1a1a1a; border: none; border-radius: 6px;
  font-size: .9rem; font-weight: 700; cursor: pointer;
}

/* ── MEMBER PORTAL ─────────────────────────────────────────── */
.member-lookup {
  max-width: 420px;
  padding: 20px;
  border: 2px solid var(--green);
  border-radius: 6px;
  background: var(--white);
  margin: 1rem auto;
}
.member-lookup input {
  width: 100%; padding: 10px;
  border: 1px solid #666; border-radius: 6px;
  font-size: 14px; margin-bottom: 8px;
}
.member-lookup input:focus { outline: none; border-color: var(--green); }

/* ── ADMIN NOTICE / ALERTS ─────────────────────────────────── */
.notice {
  padding: 12px 16px; border-radius: 6px; margin-bottom: 1rem; font-size: .95rem;
}
.notice-success { background: #d4edda; color: #155724; border-left: 4px solid #28a745; }
.notice-error   { background: #f8d7da; color: #721c24; border-left: 4px solid var(--red); }
.notice-info    { background: #d1ecf1; color: #0c5460; border-left: 4px solid var(--teal); }
.notice-warn    { background: #fff3cd; color: #856404; border-left: 4px solid var(--orange); }

/* ── FORMS ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 4px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid #ccc; border-radius: 6px;
  font-family: inherit; font-size: .95rem;
  transition: border-color .2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--teal);
}
.form-group textarea { min-height: 120px; resize: vertical; }

/* ── MODAL ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--white); border-radius: 10px;
  padding: 1.5rem; max-width: 480px; width: 100%;
  position: relative; max-height: 90vh; overflow-y: auto;
}
.modal-close {
  position: absolute; top: 10px; right: 14px;
  background: none; border: none; font-size: 1.4rem;
  cursor: pointer; color: #888; padding: 0; line-height: 1;
}
.modal-title { font-size: 1.1rem; font-weight: 600; margin-bottom: .75rem; text-align: left; color: var(--black); }

/* ── PAGE TITLES ───────────────────────────────────────────── */
.page-title {
  text-align: center;
  margin: 2rem auto 2.5rem;
}
.page-title .title-small {
  font-family: Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 400;
  color: var(--black);
}
.page-title .title-accent {
  font-family: Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 600;
  color: var(--green);
  margin: 0 .1em;
  text-shadow: 0 1px 1px rgba(0,0,0,.15);
}

/* ── UTILITY ───────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-teal   { color: var(--teal); }
.text-green  { color: var(--green); }
.text-muted  { color: var(--gray-text); }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }

/* ── DROPDOWNS ─────────────────────────────────────────────── */
.nav-primary li { position: relative; }
.nav-primary .dropdown { display: none; }
.nav-primary li:hover > .dropdown { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; background: #111; min-width: 200px; z-index: 9999; border-top: 2px solid var(--teal); }
.nav-primary .dropdown a { padding: 10px 16px; border-top: 1px solid #222; font-size: .95rem; white-space: nowrap; }
.nav-primary .dropdown a:hover { background: #1a1a1a; color: #fff; }

.class-card-title span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.class-card-image-wrap .teal-bar {
  flex-wrap: nowrap;
  overflow: hidden;
}
.class-card-image-wrap .teal-bar span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}
.class-card-image-wrap .teal-bar .instructor {
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================================
   GAG IMAGE GRID
   ============================================================ */

.gag-grid {
  margin: 1.5rem 0;
}

/* Fixed column grid */
.gag-grid.gag-grid-fixed {
  display: grid;
  gap: 8px;
}
.gag-grid.gag-grid-fixed.gag-cols-2 { grid-template-columns: repeat(2, 1fr); }
.gag-grid.gag-grid-fixed.gag-cols-3 { grid-template-columns: repeat(3, 1fr); }
.gag-grid.gag-grid-fixed.gag-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 600px) {
  .gag-grid.gag-grid-fixed.gag-cols-3,
  .gag-grid.gag-grid-fixed.gag-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 380px) {
  .gag-grid.gag-grid-fixed { grid-template-columns: 1fr !important; }
}

.gag-grid.gag-grid-fixed .gag-grid-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 4px;
  transition: opacity .2s;
}
.gag-grid.gag-grid-fixed .gag-grid-item:hover img { opacity: .88; }

/* Masonry grid */
.gag-grid.gag-grid-masonry {
  columns: 3;
  column-gap: 8px;
}
.gag-grid.gag-grid-masonry.gag-cols-2 { columns: 2; }
.gag-grid.gag-grid-masonry.gag-cols-4 { columns: 4; }

@media (max-width: 600px) {
  .gag-grid.gag-grid-masonry.gag-cols-3,
  .gag-grid.gag-grid-masonry.gag-cols-4 { columns: 2; }
}

.gag-grid.gag-grid-masonry .gag-grid-item {
  break-inside: avoid;
  margin-bottom: 8px;
}
.gag-grid.gag-grid-masonry .gag-grid-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  transition: opacity .2s;
}
.gag-grid.gag-grid-masonry .gag-grid-item:hover img { opacity: .88; }

/* Caption */
.gag-grid-caption {
  font-size: .78rem;
  color: #666;
  padding: 4px 2px 2px;
  line-height: 1.3;
}

/* ── Page Tabs ───────────────────────────────────────────────────────────── */
.page-tabs-wrap { margin: 2rem 0; }

.page-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 1.5rem;
}

.page-tab-btn {
  padding: 9px 20px;
  border: none;
  background: none;
  font-size: .9rem;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color .15s;
}

.page-tab-btn:hover { color: #00b2b2; }
.page-tab-btn.active { color: #00b2b2; border-bottom-color: #00b2b2; }

.page-tab-panel { display: none; }
.page-tab-panel.active { display: block; }

/* Block spacing */
.tab-block { margin-bottom: 1.5rem; }
.tab-block-text { line-height: 1.7; color: #333; }
.tab-block-text h3 { font-size: 1.2rem; margin: 1.5rem 0 .5rem; }
.tab-block-text h4 { font-size: 1rem; margin: 1.25rem 0 .4rem; }
.tab-block-text ul { padding-left: 1.25rem; }
.tab-block-text p { margin: 0 0 1rem; }

@media (max-width: 600px) {
  .page-tab-btn { padding: 8px 12px; font-size: .82rem; }
}

@media (max-width: 1024px) {
  .nav-right-icons a[href="/login.php"],
  .nav-right-icons a[href="/signup.php"] { display: none; }
  .nav-icon-link { display: none; }
}

.editor-wrap button {
    background: #f5f5f5;
    color: #333;
    padding: 3px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: .8rem;
    cursor: pointer;
}
.editor-wrap button:hover {
    background: #00b2b2;
    color: #fff;
    border-color: #00b2b2;
}

/* ── PAGE HERO ───────────────────────────────────────────────── */
.page-hero { padding: .75rem 1rem .25rem !important; border-bottom: none !important; }
.page-hero h1 { font-size: 1.4rem !important; margin-bottom: .2rem !important; }
.page-hero p { font-size: .85rem !important; }


