/* =====================================================================
   pages.css  -  SHARED COMPONENTS + PAGE SECTIONS
   Responsibility: every reusable component of the design system
   (buttons, navbar, footer, cards, badges, modal, toast, forms...)
   and the sections of individual pages (homepage for now).

   These rules are written MOBILE-FIRST: this is the small-screen layout.
   Larger screens are handled in responsive.css.
   ===================================================================== */


/* =====================================================================
   A. BUTTONS
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition),
    border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: none;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--color-blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-blue-dark);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: var(--color-white);
  color: var(--color-navy);
  border-color: var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-blue);
  color: var(--color-blue);
}

.btn-ghost {
  background: transparent;
  color: var(--color-navy);
}

.btn-ghost:hover {
  background: var(--color-blue-soft);
  color: var(--color-blue);
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
}

.btn-danger:hover {
  background: #991B1B;
  color: #fff;
}

.btn-sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.9rem 1.6rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}


/* =====================================================================
   B. NAVBAR (injected by main.js into #site-header)
   Mobile: the menu is a dropdown panel opened by the hamburger button.
   ===================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-md);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--color-navy);
  text-decoration: none;
}

.brand:hover {
  color: var(--color-navy);
}

.brand img {
  width: 36px;
  height: 36px;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* Hamburger button: three bars that turn into an X when open */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 11px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - var(--header-height));
  padding: 1rem 1rem 1.5rem;
  overflow-y: auto;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
}

.nav-menu.is-open {
  display: block;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  list-style: none;
}

.nav-link {
  position: relative;
  display: block;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-weight: 500;
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition);
}

.nav-link:hover {
  background: var(--color-blue-soft);
  color: var(--color-blue);
}

.nav-link.active {
  background: var(--color-blue-soft);
  color: var(--color-blue);
  font-weight: 600;
}

.nav-auth {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.nav-profile {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-pill);
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
}

.nav-profile:hover,
.nav-profile.active {
  background: var(--color-blue-soft);
  color: var(--color-blue);
}

/* Avatar: a circle with the student's initials (no photos needed) */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-navy);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.78rem;
}


.noscript-note {
  padding-block: 1rem;
  color: var(--color-danger);
  font-weight: 600;
}


/* =====================================================================
   C. FOOTER (injected by main.js into #site-footer)
   ===================================================================== */
.site-footer {
  padding-top: var(--space-5);
  background: var(--color-navy);
  color: #CBD5E1;
}

.site-footer :focus-visible {
  outline-color: var(--color-sky);
}

.footer-grid {
  display: grid;
  gap: var(--space-4);
}

.footer-brand .brand,
.footer-brand .brand:hover {
  color: #fff;
}

.footer-brand .brand img {
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);   /* keeps the navy logo visible on the navy footer */
}

.footer-about {
  margin-top: 1rem;
  font-size: 0.9375rem;
}

.footer-title {
  margin-bottom: 0.9rem;
  color: #fff;
  font-size: 1rem;
}

.footer-list {
  display: grid;
  gap: 0.55rem;
  list-style: none;
  font-size: 0.9375rem;
}

.footer-list a {
  color: #CBD5E1;
  text-decoration: none;
}

.footer-list a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-list li {
  display: flex;
  gap: 0.6rem;
}

.footer-list i {
  width: 1rem;
  margin-top: 0.3rem;
  color: var(--color-sky);
  text-align: center;
}

.social-links {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
  list-style: none;
}

.social-links a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  transition: background-color var(--transition), transform var(--transition);
}

.social-links a:hover {
  background: var(--color-blue);
  color: #fff;
  transform: translateY(-2px);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: var(--space-4);
  padding-block: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.875rem;
}

.demo-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #FDE68A;
}


/* =====================================================================
   D. BADGES, CARDS AND CARD PARTS
   ===================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-start;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  background: var(--color-blue-soft);
  color: var(--color-blue-dark);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.5;
}

.badge-success {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.badge-warning {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.badge-danger {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.badge-navy {
  background: var(--color-navy);
  color: #fff;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.card:hover {
  border-color: #CBD5E1;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* "Stretched link": the title link covers the whole card, so a card
   has ONE link for keyboard and screen-reader users. */
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card-title {
  font-size: 1.0625rem;
  line-height: 1.35;
}

.card-title a {
  color: var(--color-navy);
  text-decoration: none;
}

.card-title a:hover {
  color: var(--color-blue);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.15rem 1.25rem 1.25rem;
}

.card-text {
  display: -webkit-box;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 0.9375rem;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.875rem;
}

.meta-list {
  display: grid;
  gap: 0.4rem;
  list-style: none;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.meta-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.meta-list i {
  width: 1rem;
  margin-top: 0.22rem;
  color: var(--color-blue);
  text-align: center;
}

/* The colored picture area at the top of a card: gradient + icon.
   It is built in JavaScript (createCardVisual) so no image files are needed. */
.card-visual {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 132px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.95);
  font-size: 2.75rem;
}

.card-visual::before {
  content: "";
  position: absolute;
  top: -55px;
  right: -40px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
}

.card-visual::after {
  content: "";
  position: absolute;
  bottom: -60px;
  left: -30px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.card-visual i {
  position: relative;
  z-index: 1;
}

.card-visual-img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-corner {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 3;
}

.date-chip {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 3;
  padding: 0.35rem 0.7rem;
  border-radius: 10px;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  color: var(--color-navy);
  line-height: 1.1;
  text-align: center;
}

.date-chip-day {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
}

.date-chip-month {
  display: block;
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

/* Color "tones" used by card visuals and icon squares */
.tone-blue   { background: linear-gradient(135deg, #1D4ED8, #3B82F6); }
.tone-sky    { background: linear-gradient(135deg, #0369A1, #38BDF8); }
.tone-navy   { background: linear-gradient(135deg, #14213D, #2B4C8C); }
.tone-indigo { background: linear-gradient(135deg, #4338CA, #818CF8); }
.tone-teal   { background: linear-gradient(135deg, #0F766E, #2DD4BF); }
.tone-amber  { background: linear-gradient(135deg, #B45309, #F59E0B); }
.tone-rose   { background: linear-gradient(135deg, #BE123C, #FB7185); }
.tone-green  { background: linear-gradient(135deg, #15803D, #4ADE80); }


/* =====================================================================
   E. SECTION HEADER, GRIDS
   ===================================================================== */
.section-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: var(--space-4);
}

.section-header p {
  margin-top: 0.5rem;
  color: var(--color-muted);
}

.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}


/* =====================================================================
   F. FORMS AND FILTER BAR (shared; used from Phase 3 onward)
   ===================================================================== */
.form-group {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.form-group label {
  color: var(--color-navy);
  font-size: 0.9rem;
  font-weight: 600;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.input.is-invalid,
.select.is-invalid,
.textarea.is-invalid {
  border-color: var(--color-danger);
}

.form-hint {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.form-error {
  color: var(--color-danger);
  font-size: 0.85rem;
  font-weight: 500;
}

.filter-bar {
  display: grid;
  gap: 0.75rem;
  margin-bottom: var(--space-3);
  padding: 1rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}


/* =====================================================================
   G. EMPTY STATE
   ===================================================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: var(--space-5) 1rem;
  text-align: center;
}

.empty-state img {
  width: 180px;
}

.empty-state p {
  color: var(--color-muted);
}


/* =====================================================================
   H. MODAL, TOAST, BACK-TO-TOP (created by main.js)
   ===================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;           /* mobile: sheet slides up from the bottom */
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  animation: fade-in 0.2s ease;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--color-white);
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-lg);
  animation: pop-in 0.22s ease;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 0;
}

.modal-header h2 {
  font-size: 1.25rem;
}

.modal-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--color-muted);
  font-size: 1.1rem;
  cursor: pointer;
}

.modal-close:hover {
  background: var(--color-bg);
  color: var(--color-navy);
}

.modal-body {
  padding: 1rem 1.5rem;
}

.modal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0 1.5rem 1.5rem;
}

.toast-container {
  position: fixed;
  top: calc(var(--header-height) + 0.75rem);
  left: 1rem;
  right: 1rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  max-width: 420px;
  padding: 0.85rem 1.1rem;
  background: var(--color-navy);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: #fff;
  font-size: 0.9375rem;
  pointer-events: auto;
  animation: toast-in 0.25s ease, toast-out 0.3s ease 3.2s forwards;
}

.toast i {
  font-size: 1.1rem;
}

.toast-success i { color: #4ADE80; }
.toast-error i   { color: #FCA5A5; }
.toast-info i    { color: var(--color-sky); }

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: var(--color-blue);
  border: 0;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  color: #fff;
  font-size: 1.05rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition),
    visibility var(--transition), background-color var(--transition);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.back-to-top:hover {
  background: var(--color-blue-dark);
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(-8px); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}


/* =====================================================================
   I. PAGE HERO (banner at the top of inner pages; used from Phase 3)
   ===================================================================== */
.page-hero {
  padding-block: var(--space-5);
  background: var(--color-navy);
  color: #fff;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
}

.page-hero p {
  margin-top: 0.75rem;
  color: #CBD5E1;
}


/* =====================================================================
   J. HOMEPAGE SECTIONS (index.html)
   ===================================================================== */

/* ---- Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-4) var(--space-5);
}

/* faint dotted texture in the top-right corner */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(37, 99, 235, 0.18) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom left, #000, transparent 65%);
  mask-image: linear-gradient(to bottom left, #000, transparent 65%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  gap: var(--space-5);
  align-items: center;
}

.hero-copy h1 {
  max-width: 15ch;
}

.hero-subtitle {
  margin-top: 1.25rem;
  color: var(--color-muted);
  font-size: 1.125rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.search-bar {
  display: grid;
  gap: 0.25rem;
  margin-top: 2rem;
  padding: 0.5rem;
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-bar:focus-within {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.search-bar select,
.search-bar input {
  min-width: 0;
  padding: 0.8rem 0.9rem;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
}

.search-bar select {
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  font-weight: 500;
  cursor: pointer;
}

.search-bar select:focus,
.search-bar input:focus {
  outline: none;
}

.popular-searches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.chip {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-text);
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition);
}

.chip:hover {
  border-color: var(--color-blue);
  color: var(--color-blue);
}

.hero-visual {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin-inline: auto;
}

.hero-visual > img {
  width: 100%;
  height: auto;
  border-radius: 32px;
  box-shadow: var(--shadow-lg);
}

/* Small live cards on top of the illustration. They show real data
   (next event, newest important notice) filled in by home.js. */
.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 255px;
  padding: 0.8rem 1rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: var(--color-text);
  text-decoration: none;
  animation: rise 0.6s ease 0.35s both;
}

.float-card:hover {
  color: var(--color-text);
}

.float-card--event {
  left: 0.75rem;
  bottom: 1rem;
}

.float-card--notice {
  right: 0.75rem;
  top: 1rem;
  animation-delay: 0.5s;
}

.float-card-icon {
  display: grid;
  flex: 0 0 40px;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #fff;
}

.float-card small {
  display: block;
  color: var(--color-muted);
  font-size: 0.75rem;
  line-height: 1.3;
}

.float-card strong {
  display: block;
  color: var(--color-navy);
  font-size: 0.875rem;
  line-height: 1.3;
}

/* ---- Quick access ---- */
.quick-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}

.quick-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  text-decoration: none;
  transition: background-color var(--transition), border-color var(--transition),
    box-shadow var(--transition), transform var(--transition);
}

.quick-card:hover {
  background: var(--color-white);
  border-color: var(--color-blue);
  box-shadow: var(--shadow-md);
  color: var(--color-text);
  transform: translateY(-3px);
}

.quick-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 0.6rem;
  border-radius: 14px;
  color: #fff;
  font-size: 1.2rem;
}

.quick-card h3 {
  font-size: 1.05rem;
}

.quick-card p {
  color: var(--color-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ---- Announcements ---- */
.notice-list {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr);   /* minmax(0, ...) lets long text shrink instead of overflowing */
  list-style: none;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  height: 100%;
  padding: 1rem 1.15rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-border);
  border-radius: var(--radius-md);
  color: inherit;
  text-decoration: none;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.notice:hover {
  box-shadow: var(--shadow-md);
  color: inherit;
}

.notice--important {
  background: var(--color-blue-soft);
  border-left-color: var(--color-blue);
}

.notice-date {
  flex: 0 0 3.25rem;
  line-height: 1.1;
  text-align: center;
}

.notice-day {
  display: block;
  color: var(--color-navy);
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
}

.notice-month {
  display: block;
  color: var(--color-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.notice-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.notice-body h3 {
  margin-bottom: 0.3rem;
  font-size: 1.025rem;
}

.notice-body p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ---- Clubs ---- */
.club-card {
  gap: 0.7rem;
  padding: 1.4rem;
}

.club-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 0.3rem;
  border-radius: 16px;
  color: #fff;
  font-size: 1.35rem;
}

/* ---- Lost & found rows ---- */
.item-list {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr);
  list-style: none;
}

.item-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
  padding: 0.9rem 1.1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: box-shadow var(--transition), border-color var(--transition), background-color var(--transition);
}

.item-row:hover {
  background: var(--color-white);
  border-color: #CBD5E1;
  box-shadow: var(--shadow-md);
}

.item-row .badge {
  align-self: center;
}

.item-icon {
  display: grid;
  flex: 0 0 48px;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  color: #fff;
  font-size: 1.15rem;
}

.item-text {
  flex: 1;
  min-width: 0;
}

.item-text h3 {
  overflow: hidden;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-text h3 a {
  color: var(--color-navy);
  text-decoration: none;
}

.item-text p {
  overflow: hidden;
  color: var(--color-muted);
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Marketplace ---- */
.product-price {
  color: var(--color-navy);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
}

.product-price--free {
  color: var(--color-success);
}

/* ---- Statistics band ---- */
.stats {
  padding-block: var(--space-5);
  background: var(--color-navy);
  color: #fff;
}

.stats h2 {
  color: #fff;
}

.stats-grid {
  display: grid;
  gap: var(--space-4) 1rem;
  grid-template-columns: repeat(2, 1fr);
  margin-top: var(--space-4);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-icon {
  margin-bottom: 0.5rem;
  color: var(--color-sky);
  font-size: 1.4rem;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 7vw, 2.75rem);
  font-weight: 800;
  line-height: 1;
}

.stat-label {
  color: #CBD5E1;
}

.stats-note {
  margin-top: var(--space-4);
  color: #94A3B8;
  font-size: 0.85rem;
}

/* ---- Testimonials ---- */
.testimonial-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.testimonial {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.5rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.testimonial-icon {
  color: var(--color-sky);
  font-size: 1.4rem;
}

.testimonial-quote {
  color: var(--color-text);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
}

.testimonial-author strong {
  display: block;
  color: var(--color-navy);
  line-height: 1.3;
}

.testimonial-detail {
  display: block;
  color: var(--color-muted);
  font-size: 0.85rem;
}


/* =====================================================================
   K. LIST PAGES: clubs.html, events.html (and later pages)
   ===================================================================== */

/* Filter bar fields */
.filter-bar .form-group {
  margin-bottom: 0;
}

.filter-bar .btn {
  align-self: end;
}

.search-field {
  position: relative;
}

.search-field i {
  position: absolute;
  top: 50%;
  left: 0.9rem;
  color: var(--color-muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.search-field .input {
  padding-left: 2.5rem;
}

.results-info {
  margin-bottom: var(--space-2);
  color: var(--color-muted);
  font-size: 0.9rem;
}

/* Buttons at the bottom of a card (e.g. "View details" + "Join club") */
.card-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--color-border);
}

.card-actions .btn {
  flex: 1;
  padding-inline: 0.6rem;
  white-space: nowrap;
}

/* "View details" keeps its natural width; the main action gets the rest */
.card-actions .btn:first-child {
  flex: 0 0 auto;
}

/* Badge in the top-right corner of a card picture */
.visual-corner-right {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 3;
}

.card--past .card-visual {
  filter: grayscale(0.7);
}

.card--joined {
  border-color: var(--color-success);
}

/* Label / value rows inside modals */
.detail-list {
  display: grid;
  gap: 0.35rem 1rem;
  grid-template-columns: max-content 1fr;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.95rem;
}

.detail-list dt {
  color: var(--color-muted);
  font-weight: 500;
}

.detail-list dd {
  color: var(--color-text);
  font-weight: 500;
}

.modal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.empty-state h2 {
  font-size: 1.35rem;
}
