/* Login page */
.login-page-main {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 3rem;
  background: var(--color-surface-tint);
}
.login-card {
  background: #fff;
  border-radius: 12px;
  padding: 2.5rem 2rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 4px 24px rgba(0, 139, 163, 0.12);
  border: 1px solid var(--color-surface-tint-2);
  text-align: center;
}
.login-card h1 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--color-primary);
  font-size: 1.75rem;
  font-weight: 700;
}
.login-card > p:first-of-type {
  color: var(--color-text-muted);
  margin: 0 0 1.5rem;
  line-height: 1.55;
  font-size: 0.98rem;
}
.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: #4285f4;
  color: #fff;
  border: none;
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  font-weight: 500;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.btn-google:hover {
  background: #3367d6;
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.35);
}
.login-card-foot {
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
}
.login-card-foot a {
  color: var(--color-link);
  text-decoration: none;
  font-weight: 500;
}
.login-card-foot a:hover {
  text-decoration: underline;
}
.login-status-msg {
  margin: 1rem 0 0;
  min-height: 1.25em;
  font-size: 0.9rem;
  color: #b91c1c;
}

.nav-login-link {
  display: inline-flex;
  align-items: center;
  background: var(--color-primary);
  color: #fff !important;
  text-decoration: none;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  transition: background 0.15s ease;
}
.nav-login-link:hover {
  background: var(--color-primary-hover);
  color: #fff !important;
}

/* StudiM8 brand — cyan-blue (#008BA3); logo asset: Logo.jpeg */
:root {
  --color-primary: #008ba3;
  --color-primary-hover: #007a91;
  --color-primary-mid: #00a3bf;
  --color-primary-light: #5fd4e8;
  --color-surface-tint: #e5f7fb;
  --color-surface-tint-2: #b8eaf3;
  --color-accent: #d97706;
  --color-accent-bright: #fbbf24;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-link: #006d82;
  --color-hero-text: #0a3d4a;
}

.tutor-img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0, 139, 163, 0.14);
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.team-cards {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.team-cards .tutor-profile {
  flex: 1 1 270px;
  min-width: 270px;
  max-width: 320px;
  margin-bottom: 0;
}
@media (max-width: 1000px) {
  .team-cards {
    flex-direction: column;
    align-items: center;
    gap: 18px;
  }
  .team-cards .tutor-profile {
    max-width: 95%;
    min-width: 220px;
  }
}
/* Booking Form Styles (One-on-One Page) */
.booking-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}
.booking-header {
  background: var(--color-surface-tint);
  color: var(--color-text);
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 30px;
}
.booking-header h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--color-primary);
}
.booking-form {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.06);
  margin-bottom: 30px;
}
.form-section {
  margin-bottom: 25px;
}
.form-section h3 {
  color: var(--color-primary);
  margin-bottom: 15px;
  border-bottom: 2px solid var(--color-primary-mid);
  padding-bottom: 8px;
  font-size: 1.1rem;
}
.form-group {
  margin-bottom: 15px;
}
.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #555;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--color-surface-tint-2);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
  background: #f8fafd;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary-mid);
}
.subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}
.subject-option {
  display: flex;
  align-items: center;
  padding: 12px;
  border: 2px solid var(--color-surface-tint-2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  background: #fff;
}
.subject-option:hover {
  border-color: var(--color-primary-mid);
  background: #f8f9fa;
}
.subject-option.selected {
  border-color: var(--color-primary-mid);
  background: #e3f7fd;
}
.subject-option input {
  margin-right: 10px;
  width: auto;
}
.grade-selector {
  display: flex;
  gap: 15px;
  align-items: center;
}
.grade-selector select {
  flex: 1;
}
.tutor-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.tutor-card {
  border: 2px solid var(--color-surface-tint-2);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  background: #fff;
}
.tutor-card:hover {
  border-color: var(--color-primary-mid);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(46,196,241,0.08);
}
.tutor-card.selected {
  border-color: #4CAF50;
  background: #f1f8e9;
}
.tutor-card.selected::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 10px;
  background: #4CAF50;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}
.tutor-name {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 5px;
}
.tutor-subjects {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 5px;
}
.tutor-grades {
  color: #888;
  font-size: 0.8rem;
}
.booking-summary {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}
.booking-summary h4 {
  margin-bottom: 10px;
  color: var(--color-primary-mid);
}
.booking-scheduling-notice {
  margin: 12px 0 4px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #78350f;
  font-size: 0.95rem;
}
.booking-scheduling-notice strong {
  color: #92400e;
}
.summary-item {
  margin-bottom: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #eee;
}
.summary-item:last-child {
  border-bottom: none;
}
.summary-label {
  font-weight: bold;
  color: #555;
}
.book-btn {
  background: linear-gradient(135deg, var(--color-primary-mid) 0%, #005a6b 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s;
}
.book-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 139, 163, 0.18);
}
.book-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}
.status-message {
  padding: 15px;
  border-radius: 8px;
  margin-top: 20px;
  display: none;
}
.status-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.status-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}
.no-tutors {
  text-align: center;
  padding: 40px;
  color: #666;
  background: #f8f9fa;
  border-radius: 8px;
}
@media (max-width: 768px) {
  .booking-container {
    padding: 10px;
  }
  .booking-header {
    padding: 30px 20px;
  }
  .booking-header h1 {
    font-size: 2rem;
  }
  .booking-form {
    padding: 20px;
  }
}
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #fff;
  color: #222222;
  line-height: 1.6;
  /* Notched phones / tablets */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* About & Team Page Styling */
.about-container {
  width: 100%;
  margin: 0;
  padding: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
}
.about-container h1 {
  color: var(--color-primary);
  font-size: 2.3rem;
  margin: 40px 0 10px 0;
  text-align: center;
}
.about-container h2 {
  color: #222;
  font-size: 1.5rem;
  margin: 40px 0 25px 0;
  text-align: center;
}
.tutor-profile {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 139, 163, 0.08);
  padding: 28px 22px 18px 22px;
  margin-bottom: 28px;
  border-left: 6px solid var(--color-primary);
  transition: box-shadow 0.2s;
}
.tutor-profile:hover {
  box-shadow: 0 6px 18px rgba(0, 139, 163, 0.14);
}
.tutor-profile h3 {
  margin-top: 0;
  color: var(--color-primary-mid);
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.tutor-profile p {
  margin-bottom: 10px;
  color: #333;
}
.tutor-profile ul {
  margin: 0 0 0 18px;
  padding: 0;
  color: var(--color-primary-mid);
}
.tutor-profile li {
  margin-bottom: 3px;
  font-size: 1rem;
}
.about-container strong {
  color: #222;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 4px;
}

/* Minimalist Navigation */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  background: #fff;
  border-bottom: 1px solid var(--color-surface-tint-2);
  padding: max(0.75rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  box-shadow: none;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.navbar-logo-link {
  display: flex;
  align-items: center;
  line-height: 0;
  flex-shrink: 0;
}

.site-logo {
  height: 46px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
}

.navbar-logo-text {
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--color-primary);
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.navbar-logo {
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--color-primary-mid);
  letter-spacing: -0.5px;
}

.navbar-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem 1.5rem;
  margin: 0;
  padding: 0;
  max-width: 100%;
}

@media (min-width: 769px) {
  .navbar-links {
    gap: 2rem 2.5rem;
  }
}


.navbar-links li a {
  color: #888888;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.navbar-links li a:hover {
  color: var(--color-primary-mid);
}

/* Clean Hero Section */
.hero {
  background: var(--color-surface-tint);
  color: var(--color-hero-text);
  padding: 5rem 2rem 4rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--color-surface-tint-2);
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-primary);
  letter-spacing: -1px;
}

.hero p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  color: var(--color-hero-text);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}


.cta-btn {
  background: var(--color-primary);
  color: #fff;
  padding: 0.875rem 2rem;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease;
  box-shadow: none;
}

.cta-btn:hover {
  background: var(--color-text);
  color: var(--color-accent-bright);
}

/* Simple Services Section */
.services {
  padding: 4rem 2rem;
  background: #fff;
  text-align: center;
}

.services h2 {
  margin-bottom: 3rem;
  font-weight: 600;
  font-size: 2rem;
  color: var(--color-primary-mid);
}

.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  justify-content: center;
}

.service-card {
  background: #fff;
  border: 1px solid var(--color-surface-tint-2);
  border-radius: 8px;
  padding: 2.5rem 2rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: border 0.15s ease;
  overflow: hidden;
}

/* Hero image on services.html cards (matches padding above) */
.service-card-media {
  width: calc(100% + 4rem);
  margin: -2.5rem -2rem 1.25rem -2rem;
  aspect-ratio: 16 / 10;
  background: #f1f5f9;
  overflow: hidden;
}
.service-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* In-person: keep faces in frame; same box size as other service cards */
.service-card-media--in-person img {
  object-position: center 36%;
}

.service-card:hover {
  border-color: var(--color-primary-mid);
}

.service-card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--color-primary-mid);
  font-weight: 600;
  font-size: 1.25rem;
}

.service-card p {
  color: #888888;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}


.service-card a {
  margin-top: auto;
  color: var(--color-primary-mid);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--color-primary-mid);
  padding-bottom: 2px;
  transition: color 0.15s ease, border-bottom 0.15s ease;
}

.service-card a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* Clean About Section */
.about {
  padding: 4rem 2rem;
  background: #fafafa;
  text-align: center;
  border-bottom: 1px solid #e5e5e5;
}

.about h2 {
  margin-bottom: 2rem;
  font-weight: 600;
  font-size: 1.75rem;
  color: #1a1a1a;
}

.about .subjects {
  margin-top: 3rem;
}

.about .subjects h3 {
  margin-bottom: 1.5rem;
  font-weight: 600;
  color: #1a1a1a;
}

.about .subjects ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  justify-content: center;
}

.about .subjects li {
  background: #ffffff;
  padding: 1rem 1.5rem;
  border-radius: 6px;
  color: #1a1a1a;
  font-weight: 500;
  border: 1px solid #e5e5e5;
  transition: all 0.15s ease;
}

.about .subjects li:hover {
  border-color: #1a1a1a;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Minimal CTA Section */
.cta {
  background: #1a1a1a;
  color: #ffffff;
  text-align: center;
  padding: 4rem 2rem;
}

.cta h2 {
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 1.75rem;
}

/* Simple Footer */
.footer {
  background: #ffffff;
  color: #666666;
  text-align: center;
  padding: 2rem 0 1rem 0;
  font-size: 0.875rem;
  border-top: 1px solid #e5e5e5;
}

/* Address lookup (OpenStreetMap search on booking page) */
.address-lookup-wrap {
  position: relative;
}
.address-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 20;
  margin-top: 4px;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.address-suggestion-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid #eee;
  background: #fff;
  font-size: 0.88rem;
  line-height: 1.35;
  color: #333;
  cursor: pointer;
}
.address-suggestion-item:last-child {
  border-bottom: none;
}
.address-suggestion-item:hover,
.address-suggestion-item:focus {
  background: #e8f7fc;
  outline: none;
}
.address-status {
  margin-top: 8px;
  font-size: 0.9rem;
  min-height: 1.25em;
}
.address-status--ok {
  color: #1b5e20;
}
.address-status--warn {
  color: #b45309;
}
.address-status--err {
  color: #c62828;
}
.address-status--pending {
  color: #555;
}
.address-input-pending {
  border-color: #f59e0b !important;
}
.address-attribution {
  margin-top: 6px;
  color: #888;
  font-size: 0.8rem;
}
.address-attribution a {
  color: var(--color-link);
}
.address-manual-wrap {
  margin-top: 14px;
  padding: 12px 14px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}
.address-manual-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #444;
  cursor: pointer;
}
.address-manual-label input {
  margin-top: 3px;
  flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .site-logo {
    height: 38px;
    max-width: 160px;
  }
  .navbar-logo-text {
    font-size: 0.95rem;
  }
  .navbar {
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  }
  
  .navbar-links {
    gap: 0.75rem 1.25rem;
  }
  
  .hero {
    padding: 3rem 1rem 2rem 1rem;
  }
  
  .hero h1 {
    font-size: 2.25rem;
  }
  
  .service-cards {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .services, .about {
    padding: 3rem 1rem;
  }
}

/* Landscape: phones / small tablets held sideways — less vertical padding, fluid headings */
@media (max-width: 1024px) and (orientation: landscape) {
  .hero {
    padding: 2.5rem 1.5rem 2rem;
  }
  .hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
  }
}

@media (max-height: 480px) and (orientation: landscape) {
  .hero {
    padding: 1.25rem 1rem 1rem;
  }
  .hero h1 {
    font-size: clamp(1.4rem, 4.5vh, 2rem);
    margin-bottom: 0.5rem;
  }
  .hero p {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  .login-page-main {
    min-height: auto;
    padding: 1rem max(1rem, env(safe-area-inset-right)) 2rem max(1rem, env(safe-area-inset-left));
  }
  .navbar {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
}

/* Large phones in portrait: slightly tighter nav than desktop */
@media (max-width: 480px) {
  .navbar-links {
    gap: 0.5rem 1rem;
    justify-content: flex-start;
  }
}

/* Dashboard collapsibles — keep dense info (addresses, contact) tucked away */
.dash-details {
  margin-top: 12px;
  border: 1px solid var(--color-surface-tint-2);
  border-radius: 10px;
  background: #f8fafc;
  overflow: hidden;
}
.dash-details > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  font-weight: 600;
  color: var(--color-primary);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  user-select: none;
}
.dash-details > summary::-webkit-details-marker {
  display: none;
}
.dash-details > summary::after {
  content: "▸";
  font-size: 0.85rem;
  opacity: 0.7;
  transition: transform 0.15s ease;
}
.dash-details[open] > summary::after {
  transform: rotate(90deg);
}
.dash-details > summary:hover {
  background: var(--color-surface-tint);
}
.dash-details-body {
  padding: 0 14px 14px 14px;
  border-top: 1px solid #e2e8f0;
}
.tutor-dashboard .dash-details {
  border-color: #dbeafe;
  background: #fafbfc;
}
.tutor-dashboard .dash-details > summary {
  color: var(--color-primary);
}
.tutor-dashboard .dash-details > summary:hover {
  background: var(--color-surface-tint);
}
