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

:root {
  --primary: #1a5276;
  --primary-light: #2980b9;
  --secondary: #27ae60;
  --secondary-light: #2ecc71;
  --accent: #f39c12;
  --bg: #f8f9fa;
  --bg-white: #ffffff;
  --text: #2c3e50;
  --text-light: #6c757d;
  --border: #dee2e6;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
  --radius: 8px;
  --max-width: 1200px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary-light);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* ===== Navigation ===== */
.navbar {
  background: var(--primary);
  color: #fff;
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo:hover {
  text-decoration: none;
}

.nav-logo .logo-icon {
  font-size: 1.5rem;
}

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

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* ===== Mobile Nav ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--primary);
    padding: 1rem;
    gap: 0;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem 1rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  text-align: center;
  padding: 4rem 1.5rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

.hero .tagline {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero .hero-mission {
  font-size: 1rem;
  opacity: 0.85;
  max-width: 650px;
  margin: 0 auto 1.5rem;
  line-height: 1.5;
}

.hero .cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}

.hero .cta-btn:hover {
  background: #e67e22;
  transform: translateY(-2px);
  text-decoration: none;
}

@media (max-width: 600px) {
  .hero {
    padding: 3rem 1rem;
  }
  .hero h1 {
    font-size: 1.75rem;
  }
  .hero .tagline {
    font-size: 1rem;
  }
}

/* ===== Sections ===== */
.section {
  padding: 3rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.section-title {
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.section-subtitle {
  color: var(--text-light);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

/* ===== Stats Bar ===== */
.stats-bar {
  background: var(--bg-white);
  border-top: 3px solid var(--secondary);
  padding: 2rem 1.5rem;
}

.stats-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.stat-item .stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-item .stat-label {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ===== Cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.card-icon.scioly {
  background: rgba(41, 128, 185, 0.15);
  color: var(--primary-light);
}

.card-icon.tmsca {
  background: rgba(39, 174, 96, 0.15);
  color: var(--secondary);
}

.card-icon.event {
  background: rgba(243, 156, 18, 0.15);
  color: var(--accent);
}

.card h3 {
  font-size: 1.15rem;
  color: var(--text);
}

.card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-blue {
  background: rgba(41, 128, 185, 0.12);
  color: var(--primary-light);
}

.badge-green {
  background: rgba(39, 174, 96, 0.12);
  color: var(--secondary);
}

.badge-orange {
  background: rgba(243, 156, 18, 0.12);
  color: #d68910;
}

.badge-red {
  background: rgba(231, 76, 60, 0.12);
  color: #c0392b;
}

/* ===== Course Cards ===== */
.course-details {
  border-top: 1px solid var(--border);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.course-details span {
  display: block;
  margin-bottom: 0.25rem;
}

/* ===== Volunteer Cards ===== */
.volunteer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.volunteer-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
}

.volunteer-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.volunteer-avatar {
  width: 120px;
  height: 120px;
  min-width: 120px;
  min-height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 auto 1rem;
  overflow: hidden;
  border: 3px solid var(--border);
}

.volunteer-avatar img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.volunteer-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.volunteer-card .volunteer-info {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.volunteer-card .volunteer-bio {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.volunteer-card .volunteer-achievements {
  font-size: 0.85rem;
  color: var(--secondary);
  font-weight: 600;
}

/* ===== Events ===== */
.events-section-label {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.event-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  transition: box-shadow 0.2s;
}

.event-card:hover {
  box-shadow: var(--shadow-hover);
}

.event-date-box {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  text-align: center;
  min-width: 70px;
  flex-shrink: 0;
}

.event-date-box .month {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.event-date-box .day {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
}

.event-date-box .year {
  font-size: 0.75rem;
  opacity: 0.8;
}

.event-details h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.event-details p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 500px) {
  .event-card {
    flex-direction: column;
    gap: 1rem;
  }
}

/* ===== Accolades Table ===== */
.accolades-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.accolades-table th,
.accolades-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.accolades-table th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

.accolades-table tr:last-child td {
  border-bottom: none;
}

.accolades-table tr:hover td {
  background: rgba(41, 128, 185, 0.04);
}

@media (max-width: 600px) {
  .accolades-table {
    font-size: 0.85rem;
  }
  .accolades-table th,
  .accolades-table td {
    padding: 0.5rem 0.75rem;
  }
}

/* ===== Mission Section ===== */
.mission {
  background: var(--bg-white);
  border-left: 4px solid var(--secondary);
  padding: 2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1rem;
}

.mission p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}

/* ===== Featured Event ===== */
.featured-event {
  background: linear-gradient(135deg, rgba(26, 82, 118, 0.05), rgba(39, 174, 96, 0.05));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.featured-event h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

/* ===== Page Header ===== */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-header p {
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Footer ===== */
.footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.8);
  padding: 2rem 1.5rem;
  margin-top: auto;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer h4 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.footer p,
.footer a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .footer-container {
    flex-direction: column;
  }
}

/* ===== Utility ===== */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }

/* ===== Floating Banner (Scrolling Marquee) ===== */
.floating-banner {
  background: linear-gradient(90deg, #e74c3c, #c0392b, #e74c3c);
  background-size: 200% 100%;
  animation: banner-glow 3s ease infinite;
  color: #fff;
  padding: 0.6rem 0;
  position: relative;
  z-index: 1001;
  box-shadow: 0 2px 12px rgba(231, 76, 60, 0.4);
  overflow: hidden;
}

@keyframes banner-glow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.banner-content {
  display: flex;
  align-items: center;
  position: relative;
}

.banner-scroll {
  display: flex;
  white-space: nowrap;
  animation: scroll-left 20s linear infinite;
  flex: 1;
  overflow: hidden;
}

.banner-text {
  font-size: 0.95rem;
  font-weight: 500;
  padding-right: 2rem;
  flex-shrink: 0;
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.banner-close {
  background: rgba(0, 0, 0, 0.2);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  line-height: 1;
}

.banner-close:hover {
  background: rgba(0, 0, 0, 0.4);
}

.floating-banner.hidden {
  display: none;
}

@media (max-width: 600px) {
  .banner-text {
    font-size: 0.8rem;
  }
}

/* ===== Compact Events List ===== */
.section-compact {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.events-compact {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.event-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.event-row:last-child {
  border-bottom: none;
}

.event-row.highlight-row {
  background: rgba(243, 156, 18, 0.08);
}

.event-row-date {
  font-weight: 700;
  color: var(--primary);
  min-width: 55px;
  font-size: 0.9rem;
}

.event-row-name {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text);
}

@media (max-width: 500px) {
  .event-row {
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
  }
}

/* ===== Compact FAQ (Collapsible) ===== */
.faq-compact {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-item-compact {
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.faq-item-compact:last-child {
  border-bottom: none;
}

.faq-item-compact summary {
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item-compact summary::-webkit-details-marker {
  display: none;
}

.faq-item-compact summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-light);
  transition: transform 0.2s;
}

.faq-item-compact[open] summary::after {
  content: "−";
}

.faq-item-compact p {
  padding: 0 1.25rem 0.75rem;
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* ===== Count-up Animation ===== */
.stat-number {
  transition: all 0.3s ease;
}

/* ===== Social Proof Bar ===== */
.social-proof {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 1.5rem;
  text-align: center;
}

.social-proof p {
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 1rem;
  opacity: 0.9;
}

.social-proof strong {
  color: var(--accent);
}

/* ===== Results Page ===== */
.results-list {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 2rem;
}

.results-names {
  columns: 2;
  column-gap: 2rem;
  list-style-position: inside;
  padding: 0;
}

.results-names li {
  padding: 0.4rem 0;
  font-size: 0.95rem;
  color: var(--text);
  break-inside: avoid;
}

.results-names li::marker {
  color: var(--primary-light);
  font-weight: 600;
}

@media (max-width: 600px) {
  .results-names {
    columns: 1;
  }
  .results-list {
    padding: 1rem 1.25rem;
  }
}

/* ===== Class Sign-Ups ===== */
.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--primary-light);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-danger {
  background: #c0392b;
  color: #fff;
}

.signup-form {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1rem 0;
  max-width: 480px;
}

.signup-form label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.signup-form input,
.signup-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-label input {
  width: auto !important;
}

.class-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.class-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.class-card:hover {
  box-shadow: var(--shadow-hover);
}

.class-card.cancelled {
  opacity: 0.6;
}

.class-card .class-meta {
  color: var(--text-light);
  font-size: 0.9rem;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal-content {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.roster-list {
  list-style: none;
  margin: 0.5rem 0 1rem;
}

.roster-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}

.roster-list .remove-btn {
  background: none;
  border: none;
  color: #c0392b;
  cursor: pointer;
  font-size: 0.85rem;
}

.zoom-box {
  background: var(--bg);
  border-left: 4px solid var(--secondary);
  padding: 1rem;
  border-radius: var(--radius);
  margin: 1rem 0;
}

.audit-log-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.audit-log-table th,
.audit-log-table td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
