/* ================================================================
   NEW_OVERRIDES.CSS — Neutralize old CSS conflicts + responsive
   Loaded AFTER new_design.css, BEFORE dark.css
   ================================================================ */

/* ---------- RESET OLD CONFLICTS ---------- */
/* Neutralize siket_brand.css global green background */
body {
  background: #fff !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  color: #111827 !important;
  margin: 0 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Neutralize old .topbar (now using .site-header) */
.topbar {
  display: none !important;
}

/* Neutralize siket_brand main card wrapper — but let siket_brand.css handle the white card */
/* Auth pages keep the centered card layout */
body:not(.auth-page):not(.family-page):not(.tutor-workspace):not(.find-tutor-shell) main {
  max-width: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

/* Neutralize old footer */
.footer, .copyright {
  display: none !important;
}

/* Neutralize old .hero-market */
.hero-market {
  display: none !important;
}

/* Neutralize old .eyebrow */
.eyebrow {
  font-size: 12px !important;
  letter-spacing: 0.12em !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  color: #0d582f !important;
  margin: 0 0 10px !important;
}

/* Neutralize old .btn */
.btn {
  background: #0d582f !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 12px 24px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  cursor: pointer !important;
  text-decoration: none !important;
  display: inline-block !important;
  transition: background 0.15s, transform 0.15s !important;
  font-family: 'Inter', sans-serif !important;
}
.btn:hover {
  background: #0a4726 !important;
  transform: translateY(-1px) !important;
}

/* Neutralize old .section */
.section {
  max-width: 1100px !important;
  margin: 0 auto !important;
  padding: 80px 24px !important;
}

/* Neutralize old .form-card */
.form-card {
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 14px !important;
  padding: 32px !important;
}

/* ---------- BODY CLASS OVERRIDES ---------- */
/* Workspace pages (parent dashboard, tutor dashboard, find tutor) 
   need the old sidebar layout — only override on public pages */
body:not(.family-page):not(.tutor-workspace):not(.find-tutor-shell):not(.auth-page) main {
  max-width: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ---------- GLOBAL TYPOGRAPHY ---------- */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
p {
  line-height: 1.6;
  margin: 0;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  max-width: 100%;
  height: auto;
}

/* ---------- RESPONSIVE: LARGE DESKTOP (1200px+) ---------- */
@media (min-width: 1200px) {
  .header-inner {
    max-width: 1200px;
    padding: 0 32px;
  }
  .new-hero-inner {
    max-width: 860px;
  }
  .new-hero-search {
    max-width: 750px;
  }
  .features-grid {
    gap: 24px;
  }
  .feature-card {
    padding: 32px 28px;
  }
  .footer-inner {
    max-width: 1200px;
    gap: 48px;
  }
}

/* ---------- RESPONSIVE: TABLET (768px - 1024px) ---------- */
@media (max-width: 1024px) {
  .header-inner {
    gap: 20px;
  }
  .header-nav {
    margin-left: 20px;
  }
  .header-nav a {
    padding: 6px 12px;
    font-size: 13px;
  }
  .new-hero {
    padding: 60px 24px 70px;
  }
  .new-hero h1 {
    font-size: clamp(32px, 4.5vw, 48px);
  }
  .new-hero-search {
    max-width: 600px;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .new-roles-inner {
    gap: 20px;
  }
  .role-card {
    padding: 28px 24px;
  }
  .footer-inner {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 30px;
  }
  .footer-col:last-child {
    grid-column: 1 / -1;
  }
}

/* ---------- RESPONSIVE: MOBILE (max 768px) ---------- */
@media (max-width: 768px) {
  /* Header */
  .header-inner {
    padding: 0 16px;
    height: 56px;
    gap: 12px;
  }
  .header-logo-text {
    font-size: 17px;
  }
  .header-logo-img {
    width: 28px;
    height: 28px;
  }

  /* Hero */
  .new-hero {
    padding: 48px 16px 56px;
  }
  .new-hero h1 {
    font-size: clamp(28px, 6vw, 38px);
    letter-spacing: -1px;
  }
  .new-hero-sub {
    font-size: 15px;
    margin-bottom: 28px;
  }
  .new-hero-badge {
    font-size: 12px;
    padding: 5px 14px;
  }
  .new-hero-search {
    flex-direction: column;
    gap: 0;
    border-radius: 12px;
  }
  .search-divider {
    width: 100%;
    height: 1px;
    margin: 0;
  }
  .search-field {
    padding: 12px 16px;
  }
  .search-field label {
    font-size: 10px;
  }
  .search-field input {
    font-size: 14px;
  }
  .new-hero-btn {
    width: 100%;
    margin: 4px;
    border-radius: 8px;
  }
  .new-hero-trust {
    flex-direction: column;
    gap: 10px;
  }
  .trust-divider {
    display: none;
  }

  /* Sections */
  .new-subjects,
  .new-how,
  .new-why,
  .new-roles,
  .new-testimonial,
  .new-cta,
  .new-enquiry {
    padding: 56px 16px;
  }
  .new-subjects h2,
  .new-how h2,
  .new-why h2,
  .new-roles h2,
  .new-cta h2,
  .new-enquiry h2 {
    font-size: clamp(24px, 5vw, 32px);
    margin-bottom: 28px;
  }

  /* Subject pills */
  .subject-grid {
    gap: 8px;
  }
  .subject-pill {
    padding: 10px 14px;
    font-size: 13px;
    border-radius: 8px;
  }

  /* Steps */
  .steps-row {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  .new-step-arrow {
    transform: rotate(90deg);
    padding: 4px 0;
    font-size: 20px;
  }
  .new-step {
    max-width: 340px;
    padding: 16px;
  }
  .new-step-num {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  .new-step h3 {
    font-size: 16px;
  }
  .new-step p {
    font-size: 13px;
  }

  /* Features */
  .features-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
    gap: 14px;
  }
  .feature-card {
    padding: 22px 20px;
  }

  /* Roles */
  .new-roles-inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .role-card {
    padding: 28px 24px;
    border-radius: 14px;
  }
  .role-card h2 {
    font-size: 24px;
  }

  /* Testimonial */
  .new-testimonial blockquote {
    font-size: clamp(18px, 4vw, 24px);
    padding: 0 8px;
  }

  /* CTA */
  .new-cta-btns {
    flex-direction: column;
    align-items: center;
  }
  .new-cta-btn,
  .new-cta-btn-outline {
    width: 100%;
    max-width: 320px;
    text-align: center;
    padding: 14px 24px;
  }

  /* Footer */
  .site-footer {
    padding: 40px 16px 0;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 28px;
  }
  .footer-brand p {
    max-width: none;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 4px;
  }

  /* Form card */
  .form-card {
    padding: 24px 20px;
    border-radius: 12px;
  }
}

/* ---------- RESPONSIVE: SMALL MOBILE (max 480px) ---------- */
@media (max-width: 480px) {
  .header-inner {
    padding: 0 12px;
    height: 52px;
    gap: 8px;
  }
  .header-logo {
    font-size: 18px;
  }
  .header-logo-img {
    width: 26px;
    height: 26px;
  }
  .theme-toggle {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  .new-hero {
    padding: 36px 12px 44px;
  }
  .new-hero h1 {
    font-size: 26px;
    letter-spacing: -0.5px;
  }
  .new-hero-sub {
    font-size: 14px;
  }
  .new-hero-badge {
    font-size: 11px;
    padding: 4px 12px;
  }
  .search-field {
    padding: 10px 14px;
  }
  .new-subjects,
  .new-how,
  .new-why,
  .new-roles,
  .new-testimonial,
  .new-cta,
  .new-enquiry {
    padding: 40px 12px;
  }
  .new-subjects h2,
  .new-how h2,
  .new-why h2,
  .new-roles h2,
  .new-cta h2,
  .new-enquiry h2 {
    font-size: 22px;
  }
  .role-card {
    padding: 24px 20px;
  }
  .role-card h2 {
    font-size: 22px;
  }
  .footer-inner {
    gap: 24px;
  }
  .footer-col h4 {
    font-size: 12px;
  }
  .footer-col a {
    font-size: 13px;
  }
}

/* ---------- AUTH PAGES ---------- */
.auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0 0 18px;
}
.auth-error p {
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}
.auth-error p + p {
  margin-top: 6px;
}
[data-theme="dark"] .auth-error {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
}
[data-theme="dark"] .auth-error p {
  color: #fca5a5;
}
.auth-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0 0 18px;
}
.auth-success p {
  color: #14532d;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}
[data-theme="dark"] .auth-success {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(74, 222, 128, 0.35);
}
[data-theme="dark"] .auth-success p {
  color: #86efac;
}
[data-theme="dark"] .auth-main {
  background: var(--bg, #0f1412);
}
[data-theme="dark"] .auth-card-inner {
  background: var(--surface, #16201c);
  border-color: var(--border, #2b3b34);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .auth-card-inner h2 {
  color: var(--text, #e6eee9);
}
[data-theme="dark"] .auth-card-inner > p {
  color: var(--muted, #8fa29a) !important;
}
[data-theme="dark"] .auth-field label {
  color: var(--body, #c3d2cb);
}
[data-theme="dark"] .auth-field input,
[data-theme="dark"] .auth-field select,
[data-theme="dark"] .auth-field textarea {
  background: var(--bg, #0f1412);
  border-color: var(--border, #2b3b34);
  color: var(--text, #e6eee9);
}
[data-theme="dark"] .auth-field input::placeholder {
  color: var(--muted, #6b7d75);
}
[data-theme="dark"] .auth-field input:focus,
[data-theme="dark"] .auth-field select:focus,
[data-theme="dark"] .auth-field textarea:focus {
  border-color: var(--accent-dim, #58c481);
  box-shadow: 0 0 0 3px rgba(88, 196, 129, 0.15);
}
[data-theme="dark"] .auth-links p {
  color: var(--muted, #8fa29a);
}
[data-theme="dark"] .auth-links a {
  color: var(--accent-dim, #58c481);
}
.auth-main {
  min-height: calc(100vh - 124px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: #f9fafb;
}
.auth-card {
  width: 100%;
  max-width: 440px;
}
.auth-card-inner {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.auth-field {
  margin-bottom: 18px;
}
.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 6px;
}
.auth-field input,
.auth-field select,
.auth-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-size: 15px;
  color: #111827;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: 'Inter', sans-serif;
}
.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus {
  outline: none;
  border-color: #0d582f;
  box-shadow: 0 0 0 3px rgba(13,88,47,0.1);
}
.auth-submit {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  background: #0d582f;
  color: #fff;
  transition: background 0.15s;
  font-family: 'Inter', sans-serif;
}
.auth-submit:hover {
  background: #0a4726;
}
.auth-links {
  margin-top: 24px;
  text-align: center;
}
.auth-links p {
  font-size: 14px;
  color: #6b7280;
  margin: 6px 0;
}
.auth-links a {
  color: #0d582f;
  font-weight: 700;
  text-decoration: none;
}
.auth-links a:hover {
  text-decoration: underline;
}
@media (max-width: 480px) {
  .auth-card-inner {
    padding: 28px 20px;
    border-radius: 12px;
  }
  .auth-main {
    padding: 24px 16px;
  }
}

/* Neutralize old uptutor auth-page override */
body.auth-page .form-card {
  border-top: none !important;
  box-shadow: none !important;
  border-radius: 16px !important;
  padding: 40px 36px !important;
  max-width: 440px !important;
  margin: 0 auto !important;
}

/* ---------- FEEDBACK BUTTON ---------- */
.btn-feedback {
  background: #fff !important;
  color: #0d582f !important;
  border: 1.5px solid #d1d5db !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  padding: 8px 14px !important;
}
.btn-feedback:hover {
  border-color: #0d582f !important;
  background: #f0fdf4 !important;
}

/* ---------- PRINT STYLES ---------- */
@media print {
  .site-header, .site-footer, .theme-toggle, .header-burger, .header-mobile-nav {
    display: none !important;
  }
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .new-hero {
    background: #0d582f !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* Fix join page and all public pages — kill the siket_brand main card and green body */
body.join-page,
body.info-page,
body.account-page,
body.home,
body.auth-page {
  display: block !important;
  grid-template-columns: none !important;
  background: #fff !important;
}
body.join-page > .topbar,
body.join-page > footer,
body.info-page > .topbar,
body.info-page > footer,
body.account-page > .topbar,
body.account-page > footer,
body.home > .topbar,
body.home > footer,
body.auth-page > .topbar,
body.auth-page > footer {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  transform: none !important;
}
body.join-page > main,
body.info-page > main,
body.account-page > main,
body.home > main {
  display: block !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.new-how {
  max-width: 100% !important;
  margin: 0 !important;
}
.join-page .new-how-inner,
.join-page .breadcrumb {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ---------- MOBILE MENU (find-tutor-topbar) ---------- */
/* The burger menu is driven by js/main_menu.js (external so it passes CSP).
   Parent sign in / Tutor sign in (or Dashboard / Log out) plus the theme
   toggle stay visible in the header row, directly beside the burger. The
   dropdown (.open nav) only lists the three links: Find a tutor / How it
   works / Contact. */
@media (max-width: 650px) {
  .find-tutor-topbar {
    position: relative;
    padding: 0 14px;
    gap: 10px;
  }
  .find-tutor-topbar .find-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    font-size: 12px;
  }
  .find-tutor-topbar .find-actions > a:first-child {
    display: inline-flex;
  }
  .find-tutor-topbar .find-actions > a:not(.find-action-btn) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 8px 12px;
    border: 1.5px solid #0d4d39;
    border-radius: 999px;
    color: #0d4d39;
    background: transparent;
    text-decoration: none;
    line-height: 1;
  }
  .find-tutor-topbar .find-actions .find-action-btn {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 9px 13px;
    border-radius: 999px;
    line-height: 1;
  }
  .find-tutor-topbar .theme-toggle {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    font-size: 15px;
    border-radius: 50%;
  }
  .find-tutor-topbar .header-logout {
    font-size: 12px;
    padding: 6px 0;
    white-space: nowrap;
  }
  .find-tutor-topbar .header-burger {
    margin-left: 0;
  }
  /* Even while the menu is open, the actions never leave the header row */
  .find-tutor-topbar.open .find-actions {
    position: static !important;
    top: auto !important;
    flex-direction: row !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-top: 0 !important;
  }
}
/* Tiny screens: collapse the brand to its logo mark so the two sign-in pills,
   theme toggle and burger all fit on one row */
@media (max-width: 599px) {
  .find-tutor-topbar {
    padding: 0 12px;
    gap: 8px;
  }
  .find-tutor-topbar .find-brand {
    font-size: 0;
  }
  .find-tutor-topbar .find-actions {
    gap: 6px;
    font-size: 11px;
  }
  .find-tutor-topbar .find-actions > a:not(.find-action-btn) {
    padding: 7px 9px;
  }
  .find-tutor-topbar .find-actions .find-action-btn {
    padding: 8px 10px;
  }
  .find-tutor-topbar .theme-toggle {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }
  .find-tutor-topbar .header-burger {
    padding: 8px 2px;
  }
}

/* ---------- LOG OUT BUTTONS ---------- */
/* Marketing header (desktop + mobile menu): link-style button next to Dashboard */
.find-actions form {
  display: inline;
  margin: 0;
}
.header-logout {
  background: none;
  border: 0;
  padding: 6px 0;
  color: #103e35;
  font: 800 13px 'Inter', 'DM Sans', sans-serif;
  cursor: pointer;
}
.header-logout:hover {
  color: #0d7758;
}

/* Family (parent) sidebar: log out under the theme toggle */
.side-logout-form {
  margin: 8px 0 0;
}
.side-logout {
  display: block;
  width: 100%;
  padding: 11px 13px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #e6f1ec;
  font: 600 13px 'Inter', 'DM Sans', sans-serif;
  text-align: left;
  cursor: pointer;
}
.side-logout:hover {
  background: #256b5f;
  color: #fff;
}
@media (max-width: 950px) {
  .family-sidebar .side-logout-form {
    grid-column: 1 / -1;
  }
}

/* ---------- TUTOR HEADER FIT ---------- */
/* On narrower screens the tutor topbar has too many links (incl. Home) to
   show inline without crowding. Pages that have a burger + dropdown switch to
   the dropdown (which lists every section incl. Home) instead of a squeezed
   inline nav. Pages without a burger keep their inline nav. */
@media (max-width: 1100px) {
  .tutor-topbar:has(.tutor-burger) nav {
    display: none;
  }
  .tutor-topbar .tutor-burger {
    display: inline-flex;
  }
}
