/*= Base / Tokens =*/
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary-color: #13C9EA;

  --bg-color: #ffffff;
  --text-color: #333333;
  --card-bg: rgba(233, 233, 233, 0.671);
  --border-color: 1px solid rgba(255,255,255,0.12);
  --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

[data-theme="dark"] {
  --bg-color: #011f25;
  --text-color: #ffffff;
  --card-bg: rgba(255,255,255,0.03);
  --border-color: #404040;
  --shadow: 0 2px 10px rgba(0,0,0,0.3);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/*= Navigation =*/
nav {
  background-color: var(--bg-color);
  padding: 1rem 0;
  box-shadow: var(--shadow);
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
}

.nav-container { display: flex; justify-content: space-between; align-items: center; }

.logo {
  display: flex; align-items: center; gap: 0.2rem;
  font-size: 1.5rem; font-weight: bold;
  color: var(--text-color); text-decoration: none;
}
.logo-icon { width: 40px; height: 40px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.logo-icon img { width: 100%; height: 100%; object-fit: cover; }

.nav-links { display: flex; list-style: none; gap: 3rem; align-items: center; }
.nav-links a { color: var(--text-color); text-decoration: none; font-weight: 500; transition: color 0.3s ease; }
.nav-links a:hover { color: var(--primary-color); }

.nav-actions { display: flex; align-items: center; gap: 1rem; }

.theme-toggle img { width: 40px; height: 40px; cursor: pointer; }
.theme-toggle {
  background: none; border: none; cursor: pointer;
  padding: 0.5rem; border-radius: 50%; transition: background-color 0.3s ease;
}
.theme-toggle:hover { background-color: var(--card-bg); }

.apply-btn {
  background-color: var(--primary-color);
  color: #fff;
  padding: 1rem 2.5rem;
  border: none; border-radius: 8px;
  font-weight: 650; cursor: pointer; text-decoration: none;
  display: inline-block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.apply-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(13,78,0,0.3); }

/*= Hero =*/
.hero {
  margin-top: 80px;
  padding: 6rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
}
.hero-icon {
  width: 80px; height: 80px; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 2rem;
}
.hero h1 { font-size: 3.5rem; margin-bottom: 1rem; font-weight: 700; }
.hero h1 .highlight { color: var(--primary-color); }
.hero p { font-size: 1.25rem; max-width: 600px; margin: 0 auto 2rem; }
.hero-arrow {
  font-size: 1.5rem; color: var(--primary-color);
  margin-top: 2rem; animation: bounce 2s infinite; cursor: pointer; transition: transform 0.3s ease;
}
.hero-arrow:hover { transform: scale(1.2); }
@keyframes bounce {
  0%,20%,50%,80%,100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/*= Sections =*/
section { padding: 50px 0; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 1rem; font-weight: 700; }
.section-subtitle { text-align: center; font-size: 1.1rem; max-width: 600px; margin: 0 auto 3rem; }
.highlight { color: var(--primary-color); }

/* ===== Previous Events Slider  ===== */
.prev-events { --gap: 18px; --radius: 16px; --per-view: 1; }
.prev-events .pe-header { text-align:center; margin-bottom: 1rem; }
.prev-events .pe-header h2 { margin: 0 0 .25rem; }

@media (min-width: 640px){ .prev-events { --per-view: 2; } }
@media (min-width: 1024px){ .prev-events { --per-view: 3; } }

.pe-slider{
  position: relative;
  overflow: hidden;
  max-width: 1200px;
  margin: 0 auto;
}

/* Track = horizontal row of cards */
.pe-track{
  display: grid;
  grid-auto-flow: column;
  /* each card gets a responsive width:
     (container - gaps) / per-view */
  grid-auto-columns: calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
  gap: var(--gap);
  padding: .5rem;
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}
.pe-track::-webkit-scrollbar { height: 8px; }
.pe-track::-webkit-scrollbar-thumb { border-radius: 8px; }

.pe-link{
  text-decoration: none;
  color: inherit;
  display: block;
  scroll-snap-align: start;
  transition: transform .25s ease, box-shadow .25s ease;
}
.pe-link:hover .pe-card,
.pe-link:focus .pe-card{
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.pe-card{
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr; /* media then body */
  cursor: pointer;
}

/* Media area — consistent height across images */
.pe-media{
  aspect-ratio: 16 / 9;
  background: #0b1b20;
}
.pe-media img{
  width: 100%;
  height: 100%;
  object-fit: cover; /* keeps mixed sizes tidy */
  display: block;
}

.pe-body{ padding: .9rem; }
.pe-body h3{ margin: 0 0 .25rem; font-size: 1rem; }
.pe-body p{ margin: 0; opacity: .85; }

/* Arrows (your HTML uses .slider__btn) */
.slider__btn{
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 999px; border: 0;
  background: rgba(0,0,0,.35); color: #fff; font-size: 22px; line-height: 1;
  display: grid; place-items: center; cursor: pointer;
}
.slider__btn:hover{ background: rgba(0,0,0,.55); }
.slider__btn[disabled]{ opacity: .45; cursor: not-allowed; }
.slider__btn--prev{ left: -8px; }
.slider__btn--next{ right: -8px; }

/* Dots */
.slider__dots{
  display: flex; gap: 8px; justify-content: center;
  margin-top: 12px;
}
.slider__dots button{
  width: 8px; height: 8px; border-radius: 999px; border: 0;
  background: rgba(255,255,255,.35); cursor: pointer;
}
.slider__dots button.is-active{ background: rgba(255,255,255,.95); }


/*= Events (Upcoming + Previous) =*/
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.event-card {
  overflow: hidden;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(2px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.event-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

.event-card h3 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--text-color); }
.event-card p { margin-bottom: 1.5rem; }

.event-details { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.9rem; }
.event-detail { display: flex; align-items: center; gap: 0.5rem; }

.book-btn {
  background-color: var(--primary-color); color: #fff;
  align-self: flex-end; padding: 1rem 1.5rem;
  border: none; border-radius: 8px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Event timeline */
.event-timeline {
  display: flex; justify-content: space-between; flex-wrap: wrap;
  margin-top: 1.5rem; border-top: 1px solid var(--border-color); padding-top: 1.5rem;
}
.timeline-step { flex: 1 1 80px; text-align: center; margin-bottom: 1rem; }
.step-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin-bottom: 0.5rem;
  background-color: var(--primary-color); color: #fff; font-size: 1.2rem;
  border-radius: 50%; box-shadow: var(--shadow);
}
.timeline-step p { font-size: 0.85rem; color: var(--text-color); margin: 0; }

/*= Previous Events Grid =*/


.PrevEvents-card {
  overflow: hidden;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 10px;
  text-align: center;
  margin-top: 3rem;
  cursor: pointer;
  backdrop-filter: blur(2px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.PrevEvents-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
[data-theme="dark"] .PrevEvents-card { color: #ffffff; }

.event-image { border-radius: 12px; overflow: hidden; }
.event-image img { display: block; width: 100%; height: auto; max-width: 100%; }

.event-image:has(.slider) { aspect-ratio: auto; }
.event-image:has(.slider) img { height: auto; object-fit: contain; }

.event-image--slider { aspect-ratio: auto; }
.event-image--slider img { height: auto; object-fit: contain; }

.slider {
  width: 100%;
  margin: 0;
  position: relative;
  color: var(--text-color);
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.slider__viewport {
  overflow: hidden;
  width: 100%;
  height: auto;
}

.slider__track {
  display: flex;
  transition: transform 0.5s ease;
}

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

.slide img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  background: var(--card-bg);
}

.slide figcaption{
  position: absolute; left: 12px; right: 12px; bottom: 60px;
  padding: 10px 14px; font-size: 0.95rem; color: #fff;
  background: rgba(0,0,0,0.45);
  border-radius: 12px; backdrop-filter: blur(6px);
}

.slider.slider--16x9 .slider__viewport{
  aspect-ratio: 16 / 9;
  height: auto;
  width: 100%;
  overflow: hidden;
}

.slider.slider--16x9 .slider__track{
  display: flex;
  height: 100%;
  transition: transform .5s ease;
}

.slider.slider--16x9 .slide{
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
}

.slider.slider--16x9 .slide img{
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block;
}

.slider.slider--16x9 .slider__btn{
  top: 50%;
  transform: translateY(-50%);
}


/* Controls */
.slider__btn{
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: none; border-radius: 999px;
  background: rgba(0,0,0,0.35); color: #fff; cursor: pointer;
  font-size: 28px; line-height: 1;
  display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.slider__btn:hover{ outline: 2px solid rgba(19,201,234,0.35); }
.slider__btn--prev{ left: 10px; }
.slider__btn--next{ right: 10px; }

/* Dots */
.slider__dots{
  display: flex; gap: 8px; justify-content: center; margin-top: 10px;
}
.slider__dots button{
  width: 10px; height: 10px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.5); opacity: .8; cursor: pointer;
}
.slider__dots button[aria-selected="true"]{
  opacity: 1; background: var(--primary-color);
  width: 22px; border-radius: 999px; transition: width .25s ease;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  .slider__track{ transition: none; }
}

/*= EVENT BODY =*/

.event-body { padding: 16px; }
.event-content a { color: var(--primary-color); text-decoration: none; }

.event-meta { opacity: 0.8; margin: 4px 0 8px; }
.event-summary { margin: 0 0 12px; }

.event-resources h4 { margin: 12px 0 4px; }
.event-resources ul { margin: 8px 0 0; padding-left: 18px; }
.event-resources li { margin: 4px 0; }

/* Team section */
.team-section { margin-top: 1.5rem; }
.team-section details{
  margin-bottom: 1.5rem; border: 1px solid var(--border-color);
  border-radius: 8px; padding: 1rem 1.5rem; background-color: var(--card-bg);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.team-section h4 { color: var(--primary-color); margin-bottom: 0.5rem; }
.team-section ul { list-style: none; padding: 0; margin: 0; }
.team-section li {
  display: flex; align-items: center; gap: 0.6rem;
  margin: 0.4rem 0; font-size: 1rem; line-height: 1.4;
}
.team-section li::before {
  content: "";
  display: inline-block; width: 1.2rem; margin-right: 0.4rem;
}

.icon-list {
  list-style: none;
  margin: 0.4rem 0; padding-left: 1rem;
  border-left: 3px solid var(--primary-color);
}
.icon-list li {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 0.35rem 0; font-size: 1rem; line-height: 1.5;
}
.icon-list .icon { flex: 0 0 1.8em; text-align: center; font-size: 1.1em; filter: brightness(1.1); }

.learn-more-btn {
  display: inline-block; margin-top: 1.5rem;
  background-color: var(--primary-color); color: #fff !important;
  padding: 0.8rem 1.5rem; border-radius: 8px; text-decoration: none; font-weight: 600;
  transition: background-color 0.3s ease;
}
.learn-more-btn:hover { background-color: #0aaed1; }

/*= About =*/
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem; margin-top: 3rem;
}
.about-card { background-color: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 2rem; }
.about-card-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.about-icon {
  width: 48px; height: 48px; background-color: var(--primary-color); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.2rem;
}

/*= Curriculum =*/
.curriculum-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem; margin-top: 3rem;
}
.curriculum-card {
  background-color: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px; padding: 2rem;
  transition: border-color 0.3s ease;
}
.curriculum-card:hover { border-color: var(--primary-color); }
.curriculum-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.curriculum-icon {
  width: 48px; height: 48px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.2rem; background-color: var(--primary-color);
}
.curriculum-topics { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.topic-tag { background-color: var(--primary-color); color: #fff; padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.8rem; font-weight: 500; }
.topic-explanations { margin-top: 1.5rem; padding-left: 1.5rem; }
.topic-explanations li { margin-bottom: 0.5rem; }

/*= Community =*/
.community-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 3rem;
  text-align: center;
  margin-top: 3rem;
}
.community-icon {
  width: 80px; height: 80px; background-color: var(--primary-color); border-radius: 16px;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; color: #fff; font-size: 2rem;
}

/*= Feedback =*/
.feedback-form {
  max-width: 600px; margin: 2rem auto 0;
  display: flex; flex-direction: column; gap: 1rem;
}
.feedback-form input, .feedback-form textarea {
  padding: 0.75rem; border: 1px solid var(--border-color);
  border-radius: 8px; background-color: var(--card-bg); color: var(--text-color);
}
.feedback-form button { align-self: flex-start; }

/*= Quick Access / Resources =*/
.quick-access {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem; margin-top: 3rem; text-decoration: none;
}
.quick-access-item {
  background-color: var(--card-bg); color: #000;
  border: 1px solid var(--border-color); border-radius: 12px; padding: 2rem; text-align: center; text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer;
}
[data-theme="dark"] .quick-access-item { color: #fffbfb !important; }
.quick-access-item:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

/*= Footer = */
.site-footer {
  background-color: var(--bg-color);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0; text-align: center; margin-top: 4rem;
}

/*= Responsive = */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero h1 { font-size: 2.5rem; }
  .section-title { font-size: 2rem; }
  .events-grid, .about-grid, .curriculum-grid, .resources-grid { grid-template-columns: 1fr; }
}


