/* ==========================================================================
   Tutor Finder — Main Stylesheet
   Design: Inspired by Starling Bank — deep purple, cyan accents, clean type
   ========================================================================== */

/* ---------- CSS Variables ---------- */
:root {
    --tf-primary: #2D1B69;
    --tf-primary-light: #3D2B7A;
    --tf-primary-dark: #1E1050;
    --tf-accent: #50FFEB;
    --tf-accent-hover: #3DE0CF;
    --tf-accent-text: #1E1050;
    --tf-white: #ffffff;
    --tf-off-white: #f9fafb;
    --tf-warm-bg: #faf8f5;
    --tf-text: #1f2937;
    --tf-text-light: #6b7280;
    --tf-text-lighter: #9ca3af;
    --tf-border: #e5e7eb;
    --tf-border-light: #f3f4f6;
    --tf-success: #10b981;
    --tf-success-bg: #d1fae5;
    --tf-warning: #f59e0b;
    --tf-warning-bg: #fef3c7;
    --tf-danger: #ef4444;
    --tf-danger-bg: #fee2e2;
    --tf-radius: 12px;
    --tf-radius-sm: 8px;
    --tf-radius-lg: 20px;
    --tf-radius-pill: 100px;
    --tf-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --tf-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --tf-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.04);
    --tf-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --tf-transition: 0.2s ease;
}

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

body {
    margin: 0;
    font-family: var(--tf-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--tf-text);
    background: var(--tf-white);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:hover {
    color: var(--tf-primary-light);
}

/* ---------- Container ---------- */
.tf-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Header ---------- */
.tf-header {
    background: var(--tf-white);
    border-bottom: 1px solid var(--tf-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.tf-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 24px;
}

.tf-header__site-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--tf-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.tf-header__nav {
    flex: 1;
}

.tf-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
}

.tf-nav-list li a {
    display: block;
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--tf-text);
    border-radius: var(--tf-radius-sm);
    transition: all var(--tf-transition);
}

.tf-nav-list li a:hover {
    background: var(--tf-off-white);
    color: var(--tf-primary);
}

.tf-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Mobile menu toggle */
.tf-header__menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.tf-hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--tf-text);
    position: relative;
}

.tf-hamburger::before,
.tf-hamburger::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: var(--tf-text);
    position: absolute;
    left: 0;
}

.tf-hamburger::before { top: -7px; }
.tf-hamburger::after { top: 7px; }

/* ---------- Buttons ---------- */
.tf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--tf-font);
    font-weight: 600;
    font-size: 15px;
    border: none;
    border-radius: var(--tf-radius-sm);
    cursor: pointer;
    transition: all var(--tf-transition);
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.tf-btn--sm {
    padding: 10px 20px;
    font-size: 14px;
}

.tf-btn--lg {
    padding: 14px 28px;
    font-size: 16px;
}

.tf-btn--primary {
    background: var(--tf-accent);
    color: var(--tf-accent-text);
}

.tf-btn--primary:hover {
    background: var(--tf-accent-hover);
    color: var(--tf-accent-text);
    transform: translateY(-1px);
    box-shadow: var(--tf-shadow-md);
}

.tf-btn--outline {
    background: transparent;
    color: var(--tf-primary);
    border: 2px solid var(--tf-primary);
    padding: 8px 18px;
}

.tf-btn--outline:hover {
    background: var(--tf-primary);
    color: var(--tf-white);
}

/* ---------- Hero Section ---------- */
.tf-hero {
    background: var(--tf-primary);
    padding: 100px 0 120px;
    position: relative;
    overflow: hidden;
}

.tf-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(80, 255, 235, 0.06);
}

.tf-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(80, 255, 235, 0.04);
}

.tf-hero__content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.tf-hero__badge {
    display: inline-block;
    background: rgba(80, 255, 235, 0.15);
    color: var(--tf-accent);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: var(--tf-radius-pill);
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tf-hero__title {
    font-size: 52px;
    font-weight: 800;
    color: var(--tf-white);
    line-height: 1.15;
    margin: 0 0 20px;
    letter-spacing: -1px;
}

.tf-hero__highlight {
    color: var(--tf-accent);
    display: block;
}

.tf-hero__subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    margin: 0 0 40px;
    max-width: 600px;
}

/* Hero search */
.tf-hero__search {
    background: var(--tf-white);
    border-radius: var(--tf-radius-lg);
    padding: 8px;
    box-shadow: var(--tf-shadow-lg);
}

.tf-hero__search-fields {
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

.tf-hero__search-field {
    flex: 1;
    padding: 12px 16px;
}

.tf-hero__search-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--tf-text-light);
    margin-bottom: 6px;
}

.tf-hero__search-field select,
.tf-hero__search-field input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 15px;
    font-family: var(--tf-font);
    color: var(--tf-text);
    background: transparent;
    padding: 4px 0;
}

.tf-hero__search .tf-btn {
    border-radius: var(--tf-radius);
    padding: 18px 32px;
    flex-shrink: 0;
}

/* ---------- Features Section ---------- */
.tf-features {
    padding: 100px 0;
    background: var(--tf-white);
}

.tf-section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.tf-section-header h2 {
    font-size: 36px;
    font-weight: 800;
    color: var(--tf-primary);
    margin: 0 0 12px;
    letter-spacing: -0.5px;
}

.tf-section-header p {
    font-size: 17px;
    color: var(--tf-text-light);
    margin: 0;
    line-height: 1.6;
}

.tf-features__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.tf-feature-card {
    background: var(--tf-off-white);
    border-radius: var(--tf-radius);
    padding: 36px 28px;
    text-align: center;
    transition: all var(--tf-transition);
}

.tf-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--tf-shadow-md);
}

.tf-feature-card__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(45, 27, 105, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--tf-primary);
}

.tf-feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--tf-text);
}

.tf-feature-card p {
    font-size: 14px;
    color: var(--tf-text-light);
    margin: 0;
    line-height: 1.6;
}

/* ---------- Subjects Section ---------- */
.tf-subjects {
    padding: 100px 0;
    background: var(--tf-warm-bg);
}

.tf-subjects__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.tf-subject-card {
    background: var(--tf-white);
    border-radius: var(--tf-radius);
    padding: 48px 36px;
    text-align: center;
    box-shadow: var(--tf-shadow);
    transition: all var(--tf-transition);
}

.tf-subject-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--tf-shadow-lg);
}

.tf-subject-card__icon {
    font-size: 48px;
    color: var(--tf-primary);
    margin-bottom: 20px;
    line-height: 1;
}

.tf-subject-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--tf-text);
}

.tf-subject-card p {
    font-size: 15px;
    color: var(--tf-text-light);
    margin: 0 0 28px;
    line-height: 1.6;
}

/* ---------- CTA Section ---------- */
.tf-cta {
    padding: 100px 0;
    background: var(--tf-primary);
    text-align: center;
}

.tf-cta__content {
    max-width: 600px;
    margin: 0 auto;
}

.tf-cta__content h2 {
    font-size: 36px;
    font-weight: 800;
    color: var(--tf-white);
    margin: 0 0 16px;
    letter-spacing: -0.5px;
}

.tf-cta__content p {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 36px;
    line-height: 1.7;
}

/* ---------- Footer ---------- */
.tf-footer {
    background: var(--tf-primary-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 80px 0 0;
}

.tf-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 60px;
}

.tf-footer__logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--tf-white);
    margin: 0 0 12px;
}

.tf-footer__tagline {
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

.tf-footer__links h4,
.tf-footer__contact h4 {
    color: var(--tf-white);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 20px;
}

.tf-footer-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tf-footer-nav li {
    margin-bottom: 10px;
}

.tf-footer-nav a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    transition: color var(--tf-transition);
}

.tf-footer-nav a:hover {
    color: var(--tf-accent);
}

.tf-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 0;
    text-align: center;
    font-size: 14px;
}

/* ---------- Page Header ---------- */
.tf-page-header {
    text-align: center;
    padding: 60px 0 40px;
}

.tf-page-header h1 {
    font-size: 40px;
    font-weight: 800;
    color: var(--tf-primary);
    margin: 0 0 12px;
    letter-spacing: -0.5px;
}

.tf-page-header p {
    font-size: 17px;
    color: var(--tf-text-light);
    margin: 0;
}

/* ---------- Content Area ---------- */
.tf-content-area {
    padding-bottom: 80px;
}

.tf-article__title {
    font-size: 36px;
    font-weight: 800;
    color: var(--tf-primary);
    margin: 40px 0 20px;
}

.tf-article__content {
    font-size: 16px;
    line-height: 1.8;
    max-width: 720px;
}

/* ---------- Forms ---------- */
.tf-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--tf-text);
    margin-bottom: 6px;
}

.tf-required {
    color: var(--tf-danger);
}

.tf-input,
.tf-select,
.tf-textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--tf-font);
    font-size: 15px;
    color: var(--tf-text);
    background: var(--tf-white);
    border: 1.5px solid var(--tf-border);
    border-radius: var(--tf-radius-sm);
    transition: border-color var(--tf-transition), box-shadow var(--tf-transition);
    outline: none;
}

.tf-input:focus,
.tf-select:focus,
.tf-textarea:focus {
    border-color: var(--tf-primary);
    box-shadow: 0 0 0 3px rgba(45, 27, 105, 0.1);
}

.tf-textarea {
    resize: vertical;
    min-height: 100px;
}

.tf-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.tf-form-group {
    margin-bottom: 24px;
}

.tf-form-row {
    display: flex;
    gap: 24px;
}

.tf-form-row--2col > * {
    flex: 1;
}

.tf-form-actions {
    margin-top: 32px;
}

.tf-form-actions--between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Input prefix (£ symbol) */
.tf-input-prefix {
    position: relative;
}

.tf-input-prefix__symbol {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tf-text-light);
    font-weight: 600;
    font-size: 15px;
}

.tf-input-prefix .tf-input {
    padding-left: 36px;
}

/* Checkboxes */
.tf-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.tf-checkbox,
.tf-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    padding: 10px 16px;
    border: 1.5px solid var(--tf-border);
    border-radius: var(--tf-radius-sm);
    transition: all var(--tf-transition);
}

.tf-checkbox:hover,
.tf-radio:hover {
    border-color: var(--tf-primary);
}

.tf-checkbox input,
.tf-radio input {
    display: none;
}

.tf-checkbox__mark,
.tf-radio__mark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--tf-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--tf-transition);
}

.tf-radio__mark {
    border-radius: 50%;
}

.tf-checkbox input:checked ~ .tf-checkbox__mark,
.tf-radio input:checked ~ .tf-radio__mark {
    background: var(--tf-primary);
    border-color: var(--tf-primary);
}

.tf-checkbox input:checked ~ .tf-checkbox__mark::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid var(--tf-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.tf-radio input:checked ~ .tf-radio__mark::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tf-white);
}

.tf-checkbox input:checked + .tf-checkbox__mark,
.tf-radio input:checked + .tf-radio__mark {
    background: var(--tf-primary);
    border-color: var(--tf-primary);
}

/* Radio group */
.tf-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* File upload */
.tf-file-upload {
    position: relative;
}

.tf-file-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.tf-file-upload__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px;
    border: 2px dashed var(--tf-border);
    border-radius: var(--tf-radius-sm);
    text-align: center;
    color: var(--tf-text-light);
    font-size: 13px;
    transition: all var(--tf-transition);
}

.tf-file-upload:hover .tf-file-upload__placeholder {
    border-color: var(--tf-primary);
    color: var(--tf-primary);
}

.tf-file-upload__preview {
    margin-top: 12px;
    display: none;
}

.tf-file-upload__preview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--tf-radius-sm);
    border: 2px solid var(--tf-border);
}

/* ---------- Step Form ---------- */
.tf-registration {
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: 60px;
}

.tf-steps {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 48px;
    position: relative;
}

.tf-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 25%;
    right: 25%;
    height: 2px;
    background: var(--tf-border);
    z-index: 0;
}

.tf-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.tf-step__number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--tf-off-white);
    border: 2px solid var(--tf-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: var(--tf-text-light);
    transition: all var(--tf-transition);
}

.tf-step--active .tf-step__number {
    background: var(--tf-primary);
    border-color: var(--tf-primary);
    color: var(--tf-white);
}

.tf-step--completed .tf-step__number {
    background: var(--tf-success);
    border-color: var(--tf-success);
    color: var(--tf-white);
}

.tf-step__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--tf-text-light);
}

.tf-step--active .tf-step__label {
    color: var(--tf-primary);
}

.tf-form-step {
    display: none;
    border: none;
    padding: 0;
    margin: 0;
}

.tf-form-step--active {
    display: block;
}

.tf-form-step__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--tf-primary);
    margin-bottom: 32px;
    padding: 0;
}

/* Password strength */
.tf-password-strength {
    margin-top: -12px;
    margin-bottom: 24px;
}

.tf-password-strength__bar {
    height: 4px;
    background: var(--tf-border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.tf-password-strength__fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.tf-password-strength__label {
    font-size: 12px;
    color: var(--tf-text-light);
}

/* ---------- Notices ---------- */
.tf-notice {
    padding: 16px 20px;
    border-radius: var(--tf-radius-sm);
    margin-bottom: 24px;
    font-size: 15px;
}

.tf-notice--info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.tf-notice--success {
    background: var(--tf-success-bg);
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.tf-notice--error {
    background: var(--tf-danger-bg);
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* ---------- Search ---------- */
.tf-search {
    background: var(--tf-white);
    border-radius: var(--tf-radius);
    box-shadow: var(--tf-shadow-md);
    padding: 8px;
    margin-bottom: 40px;
}

.tf-search__fields {
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

.tf-search__field {
    flex: 1;
    padding: 12px 16px;
}

.tf-search__field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--tf-text-light);
    margin-bottom: 6px;
}

.tf-search__field .tf-input,
.tf-search__field .tf-select {
    border: none;
    padding: 8px 0;
    font-size: 15px;
}

.tf-search__field .tf-input:focus,
.tf-search__field .tf-select:focus {
    box-shadow: none;
}

.tf-search .tf-btn {
    border-radius: var(--tf-radius);
    padding: 18px 28px;
    flex-shrink: 0;
}

/* Results */
.tf-search-results__summary {
    font-size: 15px;
    color: var(--tf-text-light);
    margin-bottom: 24px;
    font-weight: 500;
}

.tf-search-results__summary strong {
    color: var(--tf-text);
}

/* Side-by-side layout: List + Map */
.tf-search-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    min-height: 700px;
}

.tf-search-layout__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 800px;
    overflow-y: auto;
    padding-right: 8px;
}

.tf-search-layout__list::-webkit-scrollbar {
    width: 6px;
}

.tf-search-layout__list::-webkit-scrollbar-track {
    background: var(--tf-off-white);
    border-radius: 3px;
}

.tf-search-layout__list::-webkit-scrollbar-thumb {
    background: var(--tf-border);
    border-radius: 3px;
}

.tf-search-layout__list::-webkit-scrollbar-thumb:hover {
    background: var(--tf-text-lighter);
}

.tf-search-layout__map {
    position: sticky;
    top: 96px;
    height: 700px;
}

.tf-search-layout__map .tf-map {
    height: 100%;
}

.tf-search-results__loading {
    text-align: center;
    padding: 60px 0;
    color: var(--tf-text-light);
}

.tf-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--tf-border);
    border-top-color: var(--tf-primary);
    border-radius: 50%;
    animation: tf-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes tf-spin {
    to { transform: rotate(360deg); }
}

.tf-search-results__empty {
    text-align: center;
    padding: 60px 0;
    color: var(--tf-text-light);
}

.tf-search-results__empty h3 {
    margin: 16px 0 8px;
    color: var(--tf-text);
}

.tf-map {
    width: 100%;
    height: 100%;
    border-radius: var(--tf-radius);
    overflow: hidden;
    box-shadow: var(--tf-shadow);
    min-height: 450px;
}

/* ---------- Tutor Card (horizontal for list view) ---------- */
.tf-tutor-card {
    background: var(--tf-white);
    border-radius: var(--tf-radius);
    box-shadow: var(--tf-shadow);
    transition: all var(--tf-transition);
    display: flex;
    flex-direction: row;
    border: 1.5px solid var(--tf-border);
    min-width: 0;
}

.tf-tutor-card:hover {
    border-color: var(--tf-primary);
    box-shadow: var(--tf-shadow-md);
}

.tf-tutor-card__photo {
    position: relative;
    width: 140px;
    min-height: 180px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--tf-off-white);
    border-radius: var(--tf-radius) 0 0 var(--tf-radius);
}

.tf-tutor-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tf-tutor-card__dbs-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--tf-success);
    color: var(--tf-white);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: var(--tf-radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tf-tutor-card__body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: visible;
}

.tf-tutor-card__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

.tf-tutor-card__name {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--tf-text);
}

.tf-tutor-card__gender {
    font-size: 13px;
    color: var(--tf-text-light);
}

.tf-tutor-card__subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.tf-tutor-card__levels {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}

.tf-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--tf-radius-pill);
    white-space: nowrap;
}

.tf-pill--subject {
    background: rgba(45, 27, 105, 0.08);
    color: var(--tf-primary);
}

.tf-pill--level {
    background: var(--tf-off-white);
    color: var(--tf-text-light);
    border: 1px solid var(--tf-border);
}

.tf-tutor-card__rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}

.tf-star {
    color: var(--tf-border);
    font-size: 16px;
}

.tf-star--filled {
    color: var(--tf-warning);
}

.tf-rating-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--tf-text);
}

.tf-tutor-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--tf-border-light);
    margin-top: auto;
}

.tf-tutor-card__distance {
    font-size: 13px;
    color: var(--tf-text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.tf-tutor-card__rate {
    font-size: 18px;
    font-weight: 700;
    color: var(--tf-primary);
}

.tf-tutor-card__link {
    width: 100%;
    text-align: center;
}

/* ---------- Profile Page ---------- */
.tf-profile {
    padding: 48px 0 80px;
}

.tf-profile__grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 48px;
    align-items: start;
}

.tf-profile__sidebar {
    position: sticky;
    top: 96px;
}

.tf-profile__photo-wrapper {
    position: relative;
    margin-bottom: 24px;
}

.tf-profile__photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--tf-radius);
}

.tf-profile__photo-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: var(--tf-off-white);
    border-radius: var(--tf-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tf-text-lighter);
}

.tf-profile__dbs-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: var(--tf-success);
    color: var(--tf-white);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--tf-radius-pill);
}

.tf-profile__quick-info {
    background: var(--tf-off-white);
    border-radius: var(--tf-radius);
    padding: 24px;
}

.tf-profile__rate {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tf-border);
}

.tf-profile__rate-amount {
    font-size: 32px;
    font-weight: 800;
    color: var(--tf-primary);
    display: block;
}

.tf-profile__rate-label {
    font-size: 14px;
    color: var(--tf-text-light);
}

.tf-profile__rating {
    text-align: center;
}

.tf-profile__rating-text {
    display: block;
    font-size: 13px;
    color: var(--tf-text-light);
    margin-top: 6px;
}

/* Profile main content */
.tf-profile__name {
    font-size: 36px;
    font-weight: 800;
    color: var(--tf-primary);
    margin: 0 0 12px;
    letter-spacing: -0.5px;
}

.tf-profile__meta {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
}

.tf-profile__meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--tf-text-light);
}

.tf-profile__section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--tf-border-light);
}

.tf-profile__section:last-child {
    border-bottom: none;
}

.tf-profile__section h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--tf-text);
    margin: 0 0 16px;
}

.tf-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tf-profile__bio {
    font-size: 15px;
    line-height: 1.8;
    color: var(--tf-text);
}

.tf-profile__bio p {
    margin: 0 0 12px;
}

.tf-profile__contact-note {
    font-size: 14px;
    color: var(--tf-text-light);
    margin: 0 0 24px;
}

/* ---------- Reviews ---------- */
.tf-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.tf-review {
    background: var(--tf-off-white);
    border-radius: var(--tf-radius);
    padding: 24px;
}

.tf-review__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tf-review__author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tf-review__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--tf-primary);
    color: var(--tf-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.tf-review__name {
    display: block;
    font-size: 15px;
    color: var(--tf-text);
}

.tf-review__date {
    font-size: 13px;
    color: var(--tf-text-lighter);
}

.tf-review__stars {
    display: flex;
    gap: 2px;
}

.tf-review__body {
    font-size: 15px;
    line-height: 1.7;
    color: var(--tf-text);
}

.tf-review__body p {
    margin: 0;
}

.tf-reviews-empty {
    color: var(--tf-text-light);
    font-style: italic;
}

/* Review form */
.tf-review-form-wrapper {
    background: var(--tf-white);
    border: 1.5px solid var(--tf-border);
    border-radius: var(--tf-radius);
    padding: 28px;
    margin-top: 24px;
}

.tf-review-form-wrapper h4 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--tf-text);
}

.tf-star-selector {
    display: flex;
    gap: 8px;
}

.tf-star-select {
    font-size: 32px;
    color: var(--tf-border);
    cursor: pointer;
    transition: color var(--tf-transition), transform var(--tf-transition);
}

.tf-star-select:hover,
.tf-star-select.tf-star-select--active {
    color: var(--tf-warning);
    transform: scale(1.1);
}

/* Contact form message */
.tf-contact-form__message,
.tf-review-form__message {
    margin-top: 16px;
    font-size: 14px;
}

/* ---------- Map Info Window ---------- */
.tf-map-info {
    font-family: var(--tf-font);
    padding: 4px;
    min-width: 200px;
}

.tf-map-info__name {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--tf-text);
}

.tf-map-info__subject {
    font-size: 13px;
    color: var(--tf-text-light);
    margin: 0 0 6px;
}

.tf-map-info__rating {
    font-size: 14px;
    margin: 0 0 10px;
}

.tf-map-info__link {
    display: inline-block;
    background: var(--tf-accent);
    color: var(--tf-accent-text);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--tf-radius-sm);
    text-decoration: none;
}

/* ---------- Admin bar offset ---------- */
.admin-bar .tf-header {
    top: 32px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .tf-features__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tf-profile__grid {
        grid-template-columns: 250px 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .tf-header__menu-toggle {
        display: block;
    }

    .tf-header__nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--tf-white);
        border-bottom: 1px solid var(--tf-border);
        padding: 16px 24px;
        box-shadow: var(--tf-shadow-md);
    }

    .tf-header__nav.tf-header__nav--open {
        display: block;
    }

    .tf-nav-list {
        flex-direction: column;
        gap: 4px;
    }

    .tf-header__actions {
        display: none;
    }

    .tf-hero {
        padding: 60px 0 80px;
    }

    .tf-hero__title {
        font-size: 32px;
    }

    .tf-hero__subtitle {
        font-size: 16px;
    }

    .tf-hero__search-fields {
        flex-direction: column;
        gap: 0;
    }

    .tf-hero__search .tf-btn {
        width: 100%;
        margin: 8px;
    }

    .tf-search__fields {
        flex-direction: column;
        gap: 0;
    }

    .tf-search .tf-btn {
        width: calc(100% - 16px);
        margin: 8px;
    }

    .tf-features__grid {
        grid-template-columns: 1fr;
    }

    .tf-subjects__grid {
        grid-template-columns: 1fr;
    }

    .tf-form-row {
        flex-direction: column;
        gap: 0;
    }

    .tf-profile__grid {
        grid-template-columns: 1fr;
    }

    .tf-profile__sidebar {
        position: static;
        max-width: 300px;
        margin: 0 auto;
    }

    .tf-search-layout {
        grid-template-columns: 1fr;
    }

    .tf-search-layout__list {
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }

    .tf-search-layout__map {
        position: static;
        height: 350px;
        order: -1;
    }

    .tf-tutor-card {
        flex-direction: column;
    }

    .tf-tutor-card__photo {
        width: 100%;
        height: 180px;
        min-height: auto;
    }

    .tf-footer__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .tf-steps {
        gap: 20px;
    }

    .tf-steps::before {
        left: 15%;
        right: 15%;
    }

    .tf-step__label {
        font-size: 11px;
    }

    .tf-page-header h1 {
        font-size: 28px;
    }

    .tf-section-header h2 {
        font-size: 28px;
    }

    .tf-map {
        height: 300px;
    }

    .tf-profile__name {
        font-size: 28px;
    }

    .tf-profile__meta {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .tf-container {
        padding: 0 16px;
    }

    .tf-hero__title {
        font-size: 26px;
    }

    .tf-checkbox-group,
    .tf-radio-group {
        flex-direction: column;
    }

    .tf-review__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .tf-form-actions--between {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .tf-form-actions--between .tf-btn {
        width: 100%;
    }
}
