@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+TC:wght@300;400;500;700;900&display=swap');

/* Design Tokens & Variables */
:root {
  --primary: #0f172a;       /* Slate 900 */
  --primary-light: #1e293b; /* Slate 800 */
  --accent: #d97706;        /* Amber 600 */
  --accent-hover: #b45309;  /* Amber 700 */
  --accent-light: #fef3c7;  /* Amber 100 */
  --bg: #f8fafc;            /* Slate 50 */
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-sub: #475569;      /* Slate 600 */
  --text-light: #94a3b8;    /* Slate 400 */
  --border: #e2e8f0;        /* Slate 200 */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 70px;
}

/* Reset Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-margin-top: calc(var(--header-height) + 20px);
}

body {
  font-family: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-height);
}

.nowrap {
  white-space: nowrap;
}

/* Typography & Layout Helpers */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 80px 0;
}

.section-title-wrapper {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  background-color: var(--accent-light);
  border-radius: 9999px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

h2 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}

p.section-desc {
  font-size: 1.125rem;
  color: var(--text-sub);
  max-width: 600px;
  margin: 12px auto 0 auto;
}

/* Header & Glassmorphism Navbar */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

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

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
}

.logo-link img {
  height: 36px;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 24px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-sub);
  font-weight: 500;
  font-size: 15px;
  transition: var(--transition);
  padding: 8px 12px;
  border-radius: 6px;
}

.nav-link:hover {
  color: var(--accent);
  background-color: rgba(217, 119, 6, 0.08);
}

/* Hero Section */
.hero {
  background: radial-gradient(circle at 80% 20%, rgba(254, 243, 199, 0.4) 0%, rgba(255, 255, 255, 0) 60%),
              radial-gradient(circle at 10% 80%, rgba(226, 232, 240, 0.4) 0%, rgba(255, 255, 255, 0) 70%),
              var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-logo-container {
  margin-bottom: 24px;
}

.hero-logo {
  height: clamp(200px, 30vw, 260px);
  width: auto;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.08));
  animation: float 6s ease-in-out infinite;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #f1f5f9;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.hero-badge span {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #10b981;
}

.hero h1 {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--primary);
  letter-spacing: -1px;
  max-width: 850px;
  margin: 0 auto 24px auto;
}

.hero h1 span {
  color: var(--accent);
}

.hero p.lead {
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  color: var(--text-sub);
  max-width: 650px;
  margin: 0 auto 40px auto;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  color: white;
  background-color: var(--accent);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.5);
}

.btn-secondary {
  color: var(--primary);
  background-color: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: #f8fafc;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* About Section & Grid Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 20px;
}

.feature-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s ease;
}

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

.feature-card:hover::before {
  transform: scaleY(1);
}

.feature-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background-color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.feature-icon-wrapper svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.feature-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-sub);
  font-size: 16px;
  line-height: 1.7;
  text-align: justify;
}

/* Collapsible FAQs */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  background-color: var(--surface);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.faq-header {
  padding: 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  user-select: none;
}

.faq-icon {
  width: 20px;
  height: 20px;
  position: relative;
  flex-shrink: 0;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background-color: var(--text-sub);
  transition: var(--transition);
}

.faq-icon::before {
  top: 9px;
  left: 2px;
  width: 16px;
  height: 2px;
}

.faq-icon::after {
  top: 2px;
  left: 9px;
  width: 2px;
  height: 16px;
}

.faq-item.open {
  border-color: var(--accent);
}

.faq-item.open .faq-icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

.faq-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.open .faq-body {
  grid-template-rows: 1fr;
}

.faq-content {
  overflow: hidden;
}

.faq-content-inner {
  padding: 0 24px 24px 24px;
  color: var(--text-sub);
  font-size: 16px;
  line-height: 1.7;
}

/* Video Section */
.video-section {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.video-container {
  max-width: 900px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
}

.video-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Teacher Profiles Section */
.tutor-section {
  background-color: var(--bg);
}

.tutor-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

.tutor-label {
  font-weight: 600;
  font-size: 16px;
  color: var(--text-sub);
}

.filter-select-wrapper {
  position: relative;
  width: 100%;
  max-width: 300px;
}

select#imageSelect {
  width: 100%;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  appearance: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

select#imageSelect:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.filter-select-wrapper::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-sub);
  border-bottom: 2px solid var(--text-sub);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.image-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  min-height: 200px;
}

/* Teacher cards layout */
.tutor-card {
  background-color: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.tutor-card.hidden {
  display: none !important;
}

.tutor-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent);
}

.tutor-card.hiding {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
}

.tutor-image-wrapper {
  position: relative;
  width: 100%;
  height: 300px;
  background-color: #f1f5f9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tutor-card img.img_intro {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.5s ease;
  object-fit: cover;
  object-position: top center;
}

.image-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.75), transparent);
  opacity: 0;
  transition: var(--transition);
}

.tutor-image-wrapper:hover .image-overlay {
  opacity: 1;
}

.tutor-card:hover img.img_intro {
  transform: scale(1.05);
}

.tutor-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tutor-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.tutor-major {
  font-size: 14px;
  color: var(--text-sub);
  margin: 0;
}

.tutor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0;
}

.tutor-tags .tag {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  transition: var(--transition);
}

.tutor-tags .tag.tag-active {
  box-shadow: 0 0 0 2px currentColor;
  transform: scale(1.06);
}

.tutor-tags .tag.tag-dim {
  opacity: 0.35;
}

.tutor-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.highlight-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-hover);
  border: 1px solid var(--accent-light);
  background: transparent;
  padding: 3px 10px;
  border-radius: var(--radius, 8px);
}

.tutor-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-sub);
  margin: 4px 0 0;
}

/* Filter select highlight when a subject is active */
.filter-select-wrapper.active-filter select#imageSelect {
  border-color: var(--active-color, var(--accent));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--active-color, var(--accent)) 20%, transparent);
}

/* Lightbox for full tutor poster */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}

/* Call to Action (CTA) Section */
.cta-section {
  background-color: var(--primary);
  color: white;
  text-align: center;
  padding: 100px 0;
  position: relative;
}

.cta-section h2 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.cta-section p {
  color: var(--text-light);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 40px auto;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn-cta-primary {
  background-color: var(--accent);
  color: white;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
}

.btn-cta-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-cta-secondary {
  background-color: #25d366; /* LINE green */
  color: white;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
}

.btn-cta-secondary:hover {
  background-color: #20ba59;
  transform: translateY(-2px);
}

/* Social & Footer */
.social-section {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 60px 0;
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 24px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-sub);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background-color: rgba(217, 119, 6, 0.05);
  transform: translateY(-2px);
}

footer {
  background-color: var(--primary);
  color: var(--text-light);
  text-align: center;
  padding: 30px 24px;
  font-size: 14px;
  border-top: 1px solid var(--primary-light);
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* Responsive Styles */
@media (max-width: 768px) {
  body {
    padding-top: var(--header-height);
  }

  section {
    padding: 60px 0;
  }

  .nav-menu {
    display: none; /* simple mobile nav: fallback to links in footer/sections or hidden for simplicity */
  }

  .hero-logo {
    height: 120px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .cta-section h2 {
    font-size: 2rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
    padding: 0 20px;
  }
  
  .btn {
    width: 100%;
  }

  .social-links {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  .social-link {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}