/* Base styles for Prelumo tutoring marketplace */

/* Import Inter font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* CSS variables for theme colors.  The default theme is light (Aurora). */
:root {
  /* Light theme */
  --bg: #FFFFFF;
  --surface: #F8FAFC;
  --surface-2: #EEF2F6;
  --text: #0F172A;
  --muted: #64748B;
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --accent: #0EA5E9;
  --success: #059669;
  --warning: #D97706;
  --danger: #DC2626;
  --border: #E2E8F0;
  --star: #F59E0B;
  --tier-gold: #F4B400;
  --tier-indigo: #4F46E5;
}

/* Dark theme overrides (Nebula) */
[data-theme="nebula"] {
  --bg: #0B0C10;
  --surface: #12131A;
  --surface-2: #171923;
  --text: #E8EAF2;
  --muted: #A7AEC0;
  --primary: #8B5CF6;
  --primary-hover: #7C3AED;
  --accent: #22D3EE;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --border: #262A36;
  --star: #F59E0B;
  --tier-gold: #F4C95D;
  --tier-indigo: #6366F1;
}

/* Global resets */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

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

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0; z-index: 100;
}
header .nav-links a { margin-left: 1rem; font-weight: 500; }
header .currency-select {
  margin-left: 1rem;
  padding: .3rem .6rem;
  border: 1px solid var(--border);
  border-radius: .5rem;
  background-color: var(--surface-2);
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
  text-align: center;
}
.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.btn-primary { background-color: var(--primary); color: #fff; border: none; }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-secondary { background-color: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background-color: var(--surface); }

/* Sections */
section { padding: 2rem 1rem; }

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 60vh;
  background-size: cover;
  background-position: center;
  position: relative;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(rgba(0,0,0,.3), rgba(0,0,0,.6));
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.feature-card {
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0,0,0,.05);
  transition: transform .3s ease, box-shadow .3s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,.1);
}
.feature-card h3 { margin: 1rem 0 .5rem; font-size: 1.25rem; }
.feature-card p { color: var(--muted); font-size: .9rem; }

/* Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.card {
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: 1rem;
  box-shadow: 0 4px 8px rgba(0,0,0,.03);
  display: flex; flex-direction: column;
}
.card-header { display: flex; align-items: center; margin-bottom: .75rem; }
.card-header img.avatar {
  width: 56px; height: 56px; border-radius: 50%; margin-right: .75rem;
  border: 3px solid var(--tier-indicator, var(--muted));
}
.card-header .name { font-weight: 600; font-size: 1.1rem; }

.badge {
  display: inline-block; padding: .1rem .5rem; border-radius: 9999px;
  font-size: .75rem; font-weight: 500; margin-left: .5rem;
  background-color: var(--surface); border: 1px solid var(--border);
}
.badge.tier1 { background-color: var(--surface); color: var(--muted); }
.badge.tier2 { background-color: var(--tier-indigo); color: #fff; }
.badge.tier3 { background-color: var(--tier-gold); color: #000; }

.rating { display: flex; align-items: center; font-size: .9rem; margin-bottom: .5rem; }
.rating .stars { color: var(--star); margin-right: .25rem; }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.tag {
  background-color: var(--surface);
  border: 1px solid var(--border);
  padding: .1rem .4rem; border-radius: .4rem; font-size: .7rem; color: var(--muted);
}

.card-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }

.availability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: .4rem; margin-top: .75rem;
}
.slot { padding: .25rem; text-align: center; border-radius: .25rem; background-color: var(--surface); border: 1px solid var(--border); font-size: .8rem; }
.slot.available { background-color: var(--success); color: #fff; }
.slot.full { background-color: var(--danger); color: #fff; }

/* Forms */
form {
  max-width: 400px; margin: 2rem auto;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: .75rem; padding: 2rem;
}
form h2 { margin-bottom: 1rem; text-align: center; }
form .form-group { margin-bottom: 1rem; }
form label { display: block; margin-bottom: .25rem; font-weight: 500; }
form input[type="text"], form input[type="email"], form input[type="password"], form select {
  width: 100%; padding: .5rem; border-radius: .5rem; border: 1px solid var(--border);
  background-color: var(--surface); color: var(--text);
}
form .error { color: var(--danger); font-size: .8rem; margin-top: .25rem; }

/* Dashboard */
.profile { display: flex; align-items: center; gap: 1rem; }
.profile img { width: 80px; height: 80px; border-radius: 50%; border: 3px solid var(--border); object-fit: cover; }

/* Theme toggle */
.theme-toggle {
  cursor: pointer; display: flex; align-items: center; margin-left: 1rem;
  background-color: var(--surface-2); padding: .3rem .6rem; border-radius: .5rem; font-size: .8rem; border: 1px solid var(--border);
}
.theme-toggle svg { margin-right: .3rem; }

/* Footer */
footer {
  padding: 2rem 1rem; background-color: var(--surface);
  border-top: 1px solid var(--border); text-align: center; font-size: .9rem;
}
.footer-links a { margin: 0 .5rem; color: var(--muted); }
.footer-links a:hover { color: var(--primary); }

/* ---------- Utilities to remove inline styles ---------- */

/* Layout helpers */
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.flex { display: flex; } .inline-flex { display: inline-flex; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.grid { display: grid; }
.gap-8 { gap: 8px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }

/* Spacing */
.mt-8{margin-top:8px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}.mt-32{margin-top:32px}
.mb-8{margin-bottom:8px}.mb-16{margin-bottom:16px}.mb-24{margin-bottom:24px}.mb-32{margin-bottom:32px}
.py-16{padding-top:16px;padding-bottom:16px}.py-24{padding-top:24px;padding-bottom:24px}.py-40{padding-top:40px;padding-bottom:40px}
.px-16{padding-left:16px;padding-right:16px}

/* Visual */
.rounded { border-radius: 12px; } .shadow { box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.text-center { text-align: center; } .muted { color: var(--muted); }
.bg-surface { background-color: var(--surface); }
.bg-surface2 { background-color: var(--surface-2); }
.hero-cover { background-size: cover; background-position: center; }

/* Theme-specific hero backgrounds (replace paths if your filenames differ) */
.hero-aurora { background-image: url('img/e4559a3d-f76e-4221-b685-da23f9c36cc4.png'); }
[data-theme="nebula"] .hero-aurora { background-image: url('img/5d7bc7aa-c770-4b99-8b83-15a1ee20d920.png'); }

/* Accessibility helpers */
.hidden { display: none !important; }
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
/* ---- Utilities referenced by the pages/JS ---- */

/* allow flex rows to wrap (used in filters) */
.wrap { flex-wrap: wrap; }

/* list with no bullets (used on company tutors list) */
.list-none { list-style: none; padding: 0; margin: 0; }

/* zero bottom margin (used on company page heading) */
.mb-0 { margin-bottom: 0; }

/* chip style for company badge next to tutor (used by script.js) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  color: var(--text);
}
.chip-logo { width: 24px; height: 24px; border-radius: 4px; }

/* Responsive */
@media (min-width: 768px) {
  .hero { flex-direction: row; text-align: left; padding: 4rem 2rem; }
  .hero-content { max-width: 50%; }
}
/* --- small utilities used by search/tutor pages --- */
.wrap { flex-wrap: wrap; }

.flex-1 { flex: 1 1 auto; }
.minw-200 { min-width: 200px; }

.col-a { flex: 1 1 280px; max-width: 320px; }
.col-b { flex: 2 1 400px; }
.col-main { flex: 3 1 400px; }
.col-side { flex: 2 1 280px; }

.w-full { width: 100%; }
.border-5 { border: 5px solid var(--border); }


/* Profile page */
.profile-wrapper { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.profile-photo { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; border: 5px solid var(--border); }
.profile-details { flex: 1 1 300px; }
.profile-section { margin-top: 24px; }
.profile-section h2 { margin-bottom: 8px; }
.profile-section ul { padding-left: 20px; }

/* Profile table for tutor pricing */
.profile-table {
  width: 100%;
  border-collapse: collapse;
}
.profile-table th,
.profile-table td {
  border: 1px solid var(--border);
  padding: 8px;
  text-align: left;
}
.profile-table th {
  background-color: var(--surface-2);
}