/* ============================================================
   Layatire — global stylesheet
   ============================================================ */

:root {
  --navy: #1a3a6e;
  --navy-dark: #12294d;
  --teal: #2bb5b5;
  --teal-light: #4ecdc4;
  --text: #222;
  --muted: #666;
  --bg-soft: #f5faff;
  --bg-soft-2: #e8f4f8;
  --white: #ffffff;
  --border: #ddd;
  --danger: #b00;
  --danger-bg: #fdecea;
  --danger-text: #611a15;
  --success-bg: #e6f4ea;
  --success-text: #0b6e4f;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-pill: 999px;
}

/* ---------- Reset / base ---------- */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, system-ui, "Segoe UI", sans-serif;
  color: var(--text);
  line-height: 1.5;
}

h1 { color: var(--navy); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(26, 58, 110, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 8px 20px rgba(26, 58, 110, 0.35);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border: 2px solid var(--navy);
}

/* Smaller action buttons (used on tutor cards, sessions list) */
.btn-small {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

.btn-confirm { background: var(--success-text); color: var(--white); }
.btn-cancel  { background: var(--danger);        color: var(--white); }

/* ---------- Flash messages ---------- */

.flash {
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.flash.error   { background: var(--danger-bg);  color: var(--danger-text); }
.flash.success { background: var(--success-bg); color: var(--success-text); }

/* ---------- Cards ---------- */

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  background: #fafafa;
}

/* ---------- Forms ---------- */

label {
  display: block;
  margin-top: 1rem;
  font-weight: 600;
}

input, select, textarea {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: var(--radius-sm);
  box-sizing: border-box;
}

.hint   { color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; }
.errors { color: var(--danger); font-size: 0.9rem; margin-top: 0.25rem; }

button[type="submit"] {
  margin-top: 1.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  cursor: pointer;
}

button[type="submit"]:hover { background: var(--navy-dark); }

/* ---------- Layout ---------- */

.page {
  max-width: 720px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.page-narrow { max-width: 520px; }

.back {
  display: inline-block;
  margin-top: 2rem;
  color: var(--navy);
  text-decoration: none;
}

/* ---------- Home page hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-soft) 0%, var(--bg-soft-2) 100%);
  padding: 2rem;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(43, 181, 181, 0.08), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(26, 58, 110, 0.06), transparent 40%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  text-align: center;
}

.hero-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  display: block;
  object-fit: contain;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.hero .tagline {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: var(--teal);
  font-weight: 600;
  margin: 0 0 2rem;
}

.hero p.sub {
  font-size: 1rem;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 2rem;
}

.cta-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Floating squares animation ---------- */

.floating-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.shape {
  position: absolute;
  background: var(--teal);
  border-radius: var(--radius-sm);
  opacity: 0;
  animation: float-up linear infinite;
}

.shape:nth-child(1) { width: 24px; height: 24px; left: 10%; bottom: -40px; animation-duration: 18s; animation-delay: 0s; }
.shape:nth-child(2) { width: 16px; height: 16px; left: 22%; bottom: -40px; animation-duration: 22s; animation-delay: 3s; background: var(--teal-light); }
.shape:nth-child(3) { width: 32px; height: 32px; left: 38%; bottom: -60px; animation-duration: 26s; animation-delay: 6s; }
.shape:nth-child(4) { width: 12px; height: 12px; left: 55%; bottom: -40px; animation-duration: 20s; animation-delay: 2s; background: var(--teal-light); }
.shape:nth-child(5) { width: 20px; height: 20px; left: 68%; bottom: -40px; animation-duration: 24s; animation-delay: 5s; }
.shape:nth-child(6) { width: 28px; height: 28px; left: 80%; bottom: -60px; animation-duration: 28s; animation-delay: 1s; background: var(--teal-light); }
.shape:nth-child(7) { width: 14px; height: 14px; left: 90%; bottom: -40px; animation-duration: 21s; animation-delay: 4s; }
.shape:nth-child(8) { width: 18px; height: 18px; left: 48%; bottom: -40px; animation-duration: 25s; animation-delay: 7s; background: var(--teal-light); }

@keyframes float-up {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.85; }
  90%  { opacity: 0.85; }
  100% { transform: translateY(-110vh) rotate(180deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .shape { animation: none; opacity: 0.4; }
}

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid #eee;
  margin-top: 3rem;
}

.site-footer a {
  color: var(--muted);
  margin: 0 0.5rem;
  text-decoration: none;
}

.site-footer a:hover { color: var(--navy); }

/* ---------- Tutor grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.2rem 0;
}

.empty {
  color: #777;
  margin-top: 1.5rem;
}

.card h2 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  color: var(--navy);
}

/* ---------- Session status badges ---------- */

.status {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status.requested { background: #fff3cd; color: #7a5b00; }
.status.confirmed { background: var(--success-bg); color: var(--success-text); }
.status.cancelled { background: var(--danger-bg); color: var(--danger-text); }
.status.completed { background: #d1ecf1; color: #0c5460; }

/* ---------- Session list + actions ---------- */

.list { margin-top: 1.5rem; }

.actions { margin-top: 0.75rem; }

button.btn {
  margin-top: 0;
  padding: 0.4rem 0.9rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  cursor: pointer;
}

/* ---------- Long-form pages (privacy, terms, safeguarding) ---------- */

.page h2 {
  color: var(--navy);
  margin-top: 2rem;
  font-size: 1.15rem;
}

.page ul {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
}

.page ul li {
  margin-bottom: 0.4rem;
}

.page a:not(.btn) {
  color: var(--navy);
}

.page p {
  margin: 0.75rem 0;
}

/* ---------- Cookie consent banner ---------- */

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 560px;
  margin: 0 auto;
  padding: 0.9rem 1.2rem;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 9999;
}

.cookie-banner p {
  margin: 0;
  flex: 1;
  font-size: 0.9rem;
}

.cookie-banner a {
  color: var(--teal-light);
}

.cookie-banner button {
  padding: 0.5rem 1rem;
  background: var(--teal);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.cookie-banner button:hover {
  background: var(--teal-light);
}

.cookie-banner[hidden] {
  display: none;
}

/* ---------- Tutor badges ---------- */

.badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-right: 0.4rem;
}

.badge-new    { background: #e8e8e8;     color: #555; }
.badge-rising { background: var(--teal); color: white; }
.badge-top    { background: var(--navy); color: white; }

/* ---------- Sessions page sections ---------- */

.section-title {
  font-size: 1.1rem;
  color: var(--navy);
  margin: 2rem 0 0.5rem;
  border-bottom: 2px solid var(--teal);
  padding-bottom: 0.25rem;
  display: inline-block;
}

.card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  color: var(--navy);
}

.card.past {
  background: #f5f5f5;
  opacity: 0.92;
}