/* ===========================
   ROOT VARIABLES
   =========================== */
/* (These should be in style.css, but included here for reference) */
/* :root and .dark-mode variable definitions as provided */

/* ===========================
   HERO SECTION: logo right, text left, gradient background, FULL DARK MODE SUPPORT
   =========================== */
.homepage-hero {
  position: relative;
  min-height: 340px;
  width: 100%;
  max-width: 900px;
  margin: 2.5rem auto 2.5rem auto;   /* Add top margin to separate from top bar */
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 22px;
  box-shadow: 0 6px 32px rgba(30,136,229,0.13);
  overflow: hidden;
  padding: 2em 2.5em;
  background: linear-gradient(120deg, var(--box-bg) 50%, var(--choice-bg) 85%, #2196f3 100%);
}

.dark-mode .homepage-hero {
  background: linear-gradient(120deg, var(--box-bg) 40%, var(--choice-bg) 90%, #1976d2 100%);
  box-shadow: 0 6px 32px rgba(68,68,68,0.30);
}

/* Text area: left side */
.hero-text {
  flex: 1;
  text-align: left;
  z-index: 2;
}

/* Logo: right side, crisp and sized */
.hero-logo-foreground {
  width: 170px;
  height: auto;
  max-width: 38vw;
  margin-left: 2.5em;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(30,136,229,0.12);
  z-index: 2;
  background: none;
  object-fit: contain;
}

.homepage-title {
  font-size: 2.7rem;
  font-weight: bold;
  color: var(--link-color);
  margin-bottom: 0.5em;
  letter-spacing: 2px;
  text-shadow: 0 8px 24px rgba(30,136,229,0.10);
}
.dark-mode .homepage-title {
  color: var(--link-color);
  text-shadow: 0 8px 24px rgba(102,178,255,0.17), 0 2px 2px #222;
}

.homepage-subtitle {
  font-size: 1.2rem;
  color: var(--sidebar-text, #414a5a);
  margin-bottom: 0.7em;
  max-width: 540px;
  font-weight: 500;
  text-shadow: 0 2px 16px rgba(30,136,229,0.11), 0 1px 1px #fff;
}
.dark-mode .homepage-subtitle {
  color: var(--sidebar-text, #f0f0f0);
  text-shadow: 0 2px 16px rgba(102,178,255,0.22), 0 1px 1px #222;
}

/* Desktop styles remain unchanged above... */

@media (max-width: 700px) {
  .homepage-hero {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2em 1em 2.5em 1em;  /* More bottom padding */
    margin-top: 70px;
    margin-bottom: 1.3rem;
    width: 92vw;                 /* Slightly narrower */
    max-width: 410px;            /* Prevents it from getting too wide */
    min-height: 340px;
    box-sizing: border-box;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(120deg, var(--box-bg) 40%, var(--choice-bg) 85%, #2196f3 100%);
  }
  .hero-text {
    text-align: center;
    width: 100%;
    margin-bottom: 1.1em;
  }
  .hero-logo-foreground {
    display: block;
    margin: 0 auto 2em auto;     /* Big margin below logo */
    width: 36vw;
    max-width: 120px;
    min-width: 72px;
    object-fit: contain;
  }
  .homepage-title { font-size: 1.5rem; }
  .homepage-subtitle { font-size: 1rem; }
}
@media (max-width: 480px) {
  .homepage-hero {
    padding: 1.8em 0.6em 2.2em 0.6em;  /* More bottom padding */
    margin-top: 60px;
    margin-bottom: 1rem;
    border-radius: 10px;
    min-height: 280px;
    width: 97vw;
    max-width: 97vw;
    left: 50%;
    transform: translateX(-50%);
    position: relative;
  }
  .hero-logo-foreground {
    width: 48vw;
    max-width: 90px;
    min-width: 48px;
    margin: 0 auto 2em auto;      /* Big margin below logo */
    object-fit: contain;
  }
  .homepage-title { font-size: 1.1rem; }
  .homepage-subtitle { font-size: 0.93rem; }
}

/* ===========================
   SEARCH BAR & QUICK LINKS (dark mode supported)
   =========================== */
.homepage-search-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem auto 2rem auto;
  max-width: 500px;
  gap: 0.5rem;
}
.homepage-search-bar input {
  flex: 1;
  padding: 0.7em 1em;
  border-radius: 6px;
  border: 1px solid var(--box-border);
  font-size: 1rem;
  background: var(--bar-bg);
  color: var(--bar-text);
}
.homepage-search-bar button {
  padding: 0.7em 1.3em;
  border-radius: 6px;
  background: var(--link-color);
  color: white;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.homepage-search-bar button:hover {
  background: var(--link-hover);
}
.homepage-quick-links {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  color: var(--sidebar-text, #414a5a);
}

/* ===========================
   CLASS SELECTOR/CARDS (dark mode supported)
   =========================== */
.class-select-box {
  background: var(--box-bg);
  border-radius: 16px;
  padding: 2.2rem 1.2rem;
  max-width: 850px;
  margin: 0 auto 2rem auto;
  box-shadow: 0 4px 16px rgba(30,136,229,0.07);
}
.dark-mode .class-select-box {
  background: var(--box-bg);
  box-shadow: 0 4px 16px rgba(68,68,68,0.20);
}

.class-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2.2rem;
  justify-content: center;
  margin-top: 1.6rem;
}

.class-card {
  background: linear-gradient(130deg, var(--choice-bg) 70%, var(--box-bg) 100%);
  border-radius: 16px;
  padding: 2.1rem 2.3rem;
  width: 330px;
  min-height: 220px;
  box-shadow: 0 5px 28px rgba(30,136,229,0.15);
  text-align: center;
  transition: transform 0.21s, box-shadow 0.21s;
  border: 2.5px solid var(--link-color);
  position: relative;
  overflow: hidden;
}
.dark-mode .class-card {
  background: linear-gradient(130deg, var(--choice-bg) 70%, var(--box-bg) 100%);
  box-shadow: 0 5px 28px rgba(68,68,68,0.20);
  border-color: var(--link-color);
}

.class-card:hover {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 12px 32px rgba(30,136,229,0.19);
  border-color: var(--link-hover);
  background: linear-gradient(130deg, var(--link-hover) 70%, var(--box-bg) 100%);
}
.dark-mode .class-card:hover {
  box-shadow: 0 12px 32px rgba(68,68,68,0.30);
  border-color: var(--link-hover);
  background: linear-gradient(130deg, var(--link-hover) 70%, var(--box-bg) 100%);
}

.class-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.class-icon {
  margin-bottom: 0.8em;
}
.class-card .class-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.6em;
  color: var(--link-color);
  letter-spacing: 1.2px;
}
.dark-mode .class-card .class-title {
  color: var(--link-color);
}
.class-card .class-desc {
  font-size: 1.17rem;
  color: var(--sidebar-text, #414a5a);
  margin-bottom: 1.2em;
  font-weight: 500;
}
.dark-mode .class-card .class-desc {
  color: var(--sidebar-text, #f0f0f0);
}
.class-card .class-btn {
  display: inline-block;
  padding: 0.7em 1.5em;
  background: var(--link-color);
  color: white;
  border: none;
  border-radius: 7px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.17s;
  cursor: pointer;
  margin-top: 0.6em;
  font-size: 1.13rem;
  box-shadow: 0 1px 6px rgba(30,136,229,0.10);
}
.class-card .class-btn:hover {
  background: var(--link-hover);
}

/* ===========================
   ANNOUNCEMENTS (dark mode supported)
   =========================== */
.announcements-section {
  background: #fffbe7;
  border: 1px solid #ffe082;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(255, 215, 64, 0.06);
  max-width: 700px;
  margin: 2rem auto 2rem auto;
  padding: 1.2rem 1.5rem;
}
.dark-mode .announcements-section {
  background: #332d1a;
  border: 1px solid #c2a84a;
  box-shadow: 0 2px 8px rgba(194,168,74,0.10);
}

.announcements-title {
  font-weight: bold;
  color: #ffb300;
  font-size: 1.15rem;
  margin-bottom: 0.5em;
}
.dark-mode .announcements-title {
  color: #ffe082;
}
.announcements-list {
  list-style: disc inside;
  color: #795548;
  font-size: 1rem;
  margin-bottom: 0.4em;
}
.dark-mode .announcements-list {
  color: #e3c98a;
}
.announcements-placeholder {
  color: #795548; 
  font-size: 0.95rem;
}
.dark-mode .announcements-placeholder {
  color: #e3c98a;
}

/* ===========================
   TESTIMONIALS (dark mode supported)
   =========================== */
.testimonials-section {
  background: var(--box-bg);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(30,136,229,0.04);
  max-width: 700px;
  margin: 2rem auto 2rem auto;
  padding: 1.2rem 1.5rem;
  text-align: center;
}
.dark-mode .testimonials-section {
  background: var(--box-bg);
  box-shadow: 0 2px 8px rgba(68,68,68,0.12);
}

.testimonials-title {
  font-weight: bold;
  color: var(--link-color);
  font-size: 1.15rem;
  margin-bottom: 0.6em;
}
.dark-mode .testimonials-title {
  color: var(--link-color);
}
.testimonial-quote {
  font-style: italic;
  color: var(--sidebar-text, #414a5a);
  margin-bottom: 1.2em;
  font-size: 1.02rem;
}
.dark-mode .testimonial-quote {
  color: var(--sidebar-text, #f0f0f0);
}
.testimonial-author {
  font-weight: 600;
  color: var(--link-color);
  font-size: 1rem;
  margin-bottom: 0.2em;
}
.dark-mode .testimonial-author {
  color: var(--link-color);
}
.testimonials-placeholder {
  color: var(--sidebar-text, #414a5a); 
  font-size: 0.95rem;
}
.dark-mode .testimonials-placeholder {
  color: var(--sidebar-text, #f0f0f0);
}

/* ===========================
   MOBILE RESPONSIVENESS
   =========================== */
@media (max-width: 700px) {
  .homepage-hero {
    height: 220px;
    border-radius: 14px;
  }
  .homepage-title { font-size: 2.1rem; }
  .class-list { flex-direction: column; gap: 1.2rem; }
  .class-card { width: 98%; min-height: 160px; padding: 1.2rem 0.7rem; }
  .class-select-box { padding: 1.2rem 0.5rem; }
}

/* ===========================
   CTA & CONTAINER (dark mode supported)
   =========================== */
.homepage-cta {
  font-size: 1.1rem;
  margin: 2rem auto 0 auto;
  max-width: 600px;
  text-align: center;
  color: var(--sidebar-text, #414a5a);
}
.dark-mode .homepage-cta {
  color: var(--sidebar-text, #f0f0f0);
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 2rem;
}
