/* ============================================================
   AFS Virtual Tutor Hub — Main Stylesheet
   Colors: Primary Blue #2C7DA0 | Accent Green #2A9D8F
   ============================================================ */

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

:root {
  --primary:    #2C7DA0;
  --primary-dk: #1e5f7a;
  --accent:     #2A9D8F;
  --accent-dk:  #1e7a6e;
  --gold:       #FFD700;
  --text:       #1a1a2e;
  --text-muted: #6b7280;
  --bg:         #ffffff;
  --bg-soft:    #f8fafc;
  --border:     #e2e8f0;
  --shadow:     0 2px 12px rgba(44,125,160,0.10);
  --radius:     10px;
  --radius-lg:  16px;
  --font:       'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dk); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Typography ── */
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem);   font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p  { color: var(--text-muted); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  border: none; transition: all .2s; text-decoration: none;
}
.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dk); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-accent    { background: var(--accent); color: #fff; }
.btn-accent:hover  { background: var(--accent-dk); color: #fff; transform: translateY(-1px); }
.btn-outline   { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-wa        { background: #25D366; color: #fff; }
.btn-wa:hover  { background: #1ebe5d; color: #fff; }
.btn-sm        { padding: 6px 14px; font-size: 0.85rem; }
.btn-block     { width: 100%; justify-content: center; }

/* ── Navbar ── */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: var(--bg); border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.navbar-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 64px;
}
.navbar-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.navbar-logo-icon {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 800;
}
.navbar-logo-text { font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.navbar-logo-text span { display: block; font-size: 0.7rem; font-weight: 400; color: var(--text-muted); }

.navbar-links { display: flex; align-items: center; gap: 4px; }
.navbar-links a {
  padding: 6px 10px; border-radius: 6px;
  font-size: 0.88rem; font-weight: 500; color: var(--text);
  transition: background .15s, color .15s;
}
.navbar-links a:hover, .navbar-links a.active { background: var(--bg-soft); color: var(--primary); }
.navbar-links .btn { margin-left: 8px; }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: all .3s; }

.mobile-menu {
  display: none; flex-direction: column;
  background: var(--bg); border-top: 1px solid var(--border);
  padding: 12px 24px 20px;
}
.mobile-menu a {
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 0.95rem; font-weight: 500; color: var(--text);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu.open { display: flex; }

/* ── Announcement Ticker ── */
.ticker-wrap {
  background: var(--primary); color: #fff;
  padding: 8px 0; overflow: hidden; position: relative;
}
.ticker-track {
  display: flex; gap: 80px; white-space: nowrap;
  animation: ticker 30s linear infinite;
}
.ticker-item { font-size: 0.85rem; font-weight: 500; }
.ticker-item::before { content: "📢 "; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Hero Section ── */
.hero {
  background: linear-gradient(135deg, #eaf4fb 0%, #e8f8f5 100%);
  padding: 80px 24px;
}
.hero-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.hero-badge {
  display: inline-block; background: var(--primary); color: #fff;
  font-size: 0.78rem; font-weight: 600; padding: 4px 12px;
  border-radius: 20px; margin-bottom: 16px;
}
.hero h1 { color: var(--text); margin-bottom: 16px; }
.hero h1 span { color: var(--primary); }
.hero p  { font-size: 1.05rem; margin-bottom: 28px; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: flex; gap: 24px; margin-top: 32px; }
.hero-stat strong { display: block; font-size: 1.5rem; color: var(--primary); font-weight: 700; }
.hero-stat span   { font-size: 0.8rem; color: var(--text-muted); }
.hero-img-wrap {
  display: flex; justify-content: center;
}
.hero-illus {
  width: 100%; max-width: 420px;
  background: var(--bg); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 24px;
  box-shadow: var(--shadow);
}
.hero-illus-title { font-size: 0.9rem; font-weight: 600; color: var(--primary); margin-bottom: 16px; }
.mini-teacher-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-radius: 8px; background: var(--bg-soft);
  border: 1px solid var(--border); margin-bottom: 10px;
}
.mini-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; flex-shrink: 0;
}
.mini-info strong { display: block; font-size: 0.88rem; }
.mini-info span   { font-size: 0.78rem; color: var(--text-muted); }
.stars { color: var(--gold); font-size: 0.8rem; }

/* ── Section Layout ── */
.section { padding: 72px 24px; }
.section-alt { background: var(--bg-soft); }
.container { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header p { max-width: 540px; margin: 12px auto 0; font-size: 1rem; }
.section-tag {
  display: inline-block; background: #e8f4fb; color: var(--primary);
  font-size: 0.78rem; font-weight: 600; padding: 4px 12px;
  border-radius: 20px; margin-bottom: 10px;
}

/* ── Teacher Cards ── */
.teachers-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px;
}
.teacher-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column; gap: 12px;
}
.teacher-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(44,125,160,0.15); }
.tc-top { display: flex; align-items: center; gap: 14px; }
.tc-avatar {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; flex-shrink: 0;
}
.tc-name { font-size: 1rem; font-weight: 700; color: var(--text); }
.tc-subject { font-size: 0.82rem; color: var(--text-muted); }
.tc-rating { font-size: 0.85rem; }
.tc-rating .stars { margin-right: 4px; }
.tc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  background: #e8f4fb; color: var(--primary);
  font-size: 0.75rem; font-weight: 500;
  padding: 3px 10px; border-radius: 20px;
}
.tag-green { background: #e8f8f5; color: var(--accent); }
.tc-actions { display: flex; gap: 8px; margin-top: auto; }
.tc-actions .btn { flex: 1; justify-content: center; }

/* ── Why AFS Section ── */
.why-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px;
}
.why-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 24px; text-align: center;
}
.why-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--bg-soft); margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
}
.why-card h3 { font-size: 1rem; margin-bottom: 8px; color: var(--text); }

/* ── Subject Ranking ── */
.subject-tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 32px; }
.subject-tab {
  padding: 7px 18px; border-radius: 20px; font-size: 0.88rem; font-weight: 600;
  border: 2px solid var(--border); background: var(--bg); color: var(--text-muted);
  cursor: pointer; transition: all .15s;
}
.subject-tab.active, .subject-tab:hover {
  border-color: var(--primary); background: var(--primary); color: #fff;
}

/* ── Forms ── */
.form-wrap {
  max-width: 520px; margin: 0 auto;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px;
  box-shadow: var(--shadow);
}
.form-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 6px; }
.form-sub   { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 0.95rem; color: var(--text); background: var(--bg);
  transition: border-color .15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44,125,160,0.12);
}
.form-group textarea { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checkbox-group { display: flex; align-items: flex-start; gap: 10px; margin-top: 8px; }
.checkbox-group input[type="checkbox"] { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--primary); }
.checkbox-group label { font-size: 0.85rem; color: var(--text-muted); }
.social-login { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.btn-google { background: #fff; color: #374151; border: 1.5px solid var(--border); }
.btn-google:hover { background: #f9fafb; }
.divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider span { font-size: 0.82rem; color: var(--text-muted); }

/* ── Footer ── */
.footer {
  background: #1a1a2e; color: #a0aec0;
  padding: 56px 24px 24px;
}
.footer-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid #2d3748;
}
.footer-brand p { font-size: 0.88rem; margin: 12px 0 20px; line-height: 1.7; }
.footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; }
.footer ul li { margin-bottom: 8px; }
.footer ul li a { color: #a0aec0; font-size: 0.88rem; transition: color .15s; }
.footer ul li a:hover { color: #fff; }
.footer-socials { display: flex; gap: 10px; }
.social-btn {
  width: 36px; height: 36px; border-radius: 8px;
  background: #2d3748; display: flex; align-items: center; justify-content: center;
  color: #a0aec0; font-size: 1rem; transition: background .15s, color .15s;
}
.social-btn:hover { background: var(--primary); color: #fff; }
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; font-size: 0.82rem;
}

/* ── Utility ── */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 600;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-info    { background: #e0f2fe; color: #075985; }
/* ── Profile Avatar Dropdown ── */
.nav-profile { position:relative; }
.nav-avatar {
  width:36px; height:36px; border-radius:50%;
  background:var(--primary); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size:0.85rem; font-weight:700; cursor:pointer;
  border:2px solid var(--border); transition:border-color .15s;
  flex-shrink:0;
}
.nav-avatar:hover { border-color:var(--primary); }
.nav-dropdown {
  position:absolute; top:calc(100% + 10px); right:0;
  background:#fff; border:1px solid var(--border);
  border-radius:var(--radius-lg); box-shadow:0 8px 24px rgba(0,0,0,0.12);
  min-width:200px; z-index:999; overflow:hidden;
  animation: slideDown 0.2s ease both;
  display:none;
}
.nav-dropdown.open { display:block; }
.nav-dropdown-header {
  padding:14px 16px; border-bottom:1px solid var(--border);
  background:var(--bg-soft);
}
.nav-dropdown-header strong { display:block; font-size:0.9rem; }
.nav-dropdown-header span { font-size:0.78rem; color:var(--text-muted); }
.nav-dropdown-item {
  display:flex; align-items:center; gap:10px;
  padding:10px 16px; font-size:0.88rem; color:var(--text);
  cursor:pointer; transition:background .12s; text-decoration:none;
}
.nav-dropdown-item:hover { background:var(--bg-soft); }
.nav-dropdown-item i { width:16px; color:var(--text-muted); }
.nav-dropdown-item.danger { color:#ef4444; }
.nav-dropdown-item.danger i { color:#ef4444; }
.nav-dropdown-divider { height:1px; background:var(--border); margin:4px 0; }

/* ── Notification Badge ── */
.notif-badge {
  position:absolute; top:-4px; right:-4px;
  background:#ef4444; color:#fff;
  border-radius:50%; width:18px; height:18px;
  font-size:10px; font-weight:700;
  display:flex; align-items:center; justify-content:center;
  border:2px solid #fff;
}
.nav-notif-wrap { position:relative; cursor:pointer; }

/* ── Back Button ── */
.back-btn {
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 16px; border-radius:8px;
  background:#fff; border:1px solid var(--border);
  color:var(--text); font-size:0.88rem; font-weight:500;
  cursor:pointer; transition:all .15s; text-decoration:none;
  margin:16px 24px 0;
}
.back-btn:hover { background:var(--bg-soft); color:var(--primary); border-color:var(--primary); }
.back-btn i { font-size:0.85rem; }
