/* ===== Turo Mock - Mobile First ===== */
:root {
  --brand: #593cfb;
  --brand-dark: #4a32d4;
  --text: #121214;
  --text-secondary: #6b6b78;
  --bg: #ffffff;
  --bg-secondary: #f7f7f8;
  --border: #e5e5e7;
  --success: #00a650;
  --banner-start: #ff4d4d;
  --banner-end: #ff8080;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: var(--bg);
}

/* ===== Header ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 26px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -1px;
}

.header-actions {
  display: flex;
  gap: 4px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  border-radius: 50%;
}

.icon-btn:active {
  background: var(--bg-secondary);
}

.back-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  text-decoration: none;
}

/* ===== Mobile Menu ===== */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: var(--bg);
  z-index: 200;
  padding: 0;
  transition: right 0.3s ease;
  box-shadow: -4px 0 16px rgba(0,0,0,0.1);
}

.mobile-menu.open {
  right: 0;
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.mobile-menu .close-btn {
  font-size: 32px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
}

.mobile-menu nav a {
  padding: 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

/* ===== Hero with Search ===== */
.hero-search {
  position: relative;
  min-height: 200px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 20px 16px;
}

.hero-search {
  min-height: 34vh; /* This sets the new height */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center; /* This centers the search bar horizontally */
  position: relative;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border-radius: 100px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.search-bar .search-icon {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.search-placeholder {
  font-size: 16px;
  color: var(--text-secondary);
}

/* ===== Filter Tabs ===== */
.filter-tabs {
  display: flex;
  gap: 8px;
  padding: 8px 16px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  padding: 8px 20px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.tab.active {
  background: var(--text);
  color: white;
  border-color: var(--text);
}

.tab:active {
  opacity: 0.8;
}

/* ===== Section Header ===== */
.car-section {
  padding: 16px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 12px;
}

.section-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.section-header svg {
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* ===== Car Scroll ===== */
.car-scroll {
  display: flex;
  gap: 12px;
  padding: 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.car-scroll::-webkit-scrollbar {
  display: none;
}

.car-card-horizontal {
  flex-shrink: 0;
  width: 260px;
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
}

.car-img-wrap {
  width: 100%;
  height: 160px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-secondary);
}

.car-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.car-details {
  padding: 12px 0;
}

.car-details h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.car-location {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.car-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.stars {
  color: #ffb800;
  font-size: 13px;
  letter-spacing: -1px;
}

.rating-count {
  font-size: 13px;
  color: var(--text-secondary);
}

.car-price {
  font-size: 14px;
  color: var(--text);
}

.car-price strong {
  font-size: 16px;
  font-weight: 700;
}

/* ===== Popular Cars (grid variant for other pages) ===== */
.popular {
  padding: 32px 16px;
}

.popular h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
}

.car-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.car-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.car-img {
  height: 200px;
  overflow: hidden;
  position: relative;
  background: var(--bg-secondary);
}

.car-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.car-info {
  padding: 16px;
}

.car-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.car-meta {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.car-price {
  font-size: 16px;
  color: var(--text);
}

.car-price strong {
  font-size: 20px;
  color: var(--brand);
}

/* ===== Host CTA ===== */
.host-cta {
  padding: 40px 16px;
  background: var(--bg-secondary);
  text-align: center;
}

.cta-content h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.cta-content p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.cta-btn {
  display: inline-block;
  padding: 16px 32px;
  background: var(--brand);
  color: white;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.cta-btn.large {
  display: block;
  width: 100%;
}

.cta-btn:active {
  background: var(--brand-dark);
}

.cta-note {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 16px;
}

/* ===== Become Host Page V2 ===== */
.host-hero-v2 {
  position: relative;
}

.host-hero-v2 .hero-img {
  height: 240px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.host-hero-v2 .hero-text {
  padding: 24px 16px;
  text-align: center;
}

.host-hero-v2 .hero-text h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.2;
}

.host-hero-v2 .hero-text p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.host-hero-v2 .hero-text p strong {
  color: var(--text);
}

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

.cta-btn.white:active {
  background: var(--bg-secondary);
}

/* Stats Section */
.stats-section {
  padding: 40px 16px;
  background: var(--bg-secondary);
  text-align: center;
}

.stats-section h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.5;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Earnings Section */
.earnings-section {
  padding: 40px 16px;
  text-align: center;
}

.earnings-section h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.earnings-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
}

.earnings-card-v2 {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.earnings-number {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.earnings-label {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Testimonials */
.testimonials {
  padding: 40px 16px;
  background: var(--bg-secondary);
}

.testimonials h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
}

.testimonial-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.testimonial-card .quote {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 12px;
  font-style: italic;
}

.testimonial-card .author {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Getting Started */
.getting-started {
  padding: 40px 16px;
  text-align: center;
}

.getting-started h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
}

.steps-v2 {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 28px;
}

.step-v2 {
  display: flex;
  gap: 16px;
  text-align: left;
}

.step-num {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: var(--brand);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}

.step-content h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.step-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Protection */
.protection-section {
  padding: 40px 16px;
  background: var(--bg-secondary);
}

.protection-section h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
}

.protection-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.protection-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.protection-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Features Section */
.features-section {
  padding: 40px 16px;
  text-align: center;
}

.features-section h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
}

.features-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 28px;
}

.feature-item {
  text-align: center;
}

.feature-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.feature-item h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-item p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== Progress Bar ===== */
.progress-bar {
  height: 4px;
  background: var(--border);
  width: 100%;
}

.progress-fill {
  height: 100%;
  background: var(--brand);
  transition: width 0.3s ease;
}

.progress-text {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 8px 16px;
}

/* ===== Form Sections ===== */
.form-section {
  padding: 24px 16px;
}

.form-section h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.form-section .subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand);
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6b78' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

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

/* Phone input */
.phone-input {
  display: flex;
  gap: 8px;
}

.phone-input .country-code {
  width: auto;
  min-width: 100px;
  flex-shrink: 0;
}

.phone-input input {
  flex: 1;
}

/* Checkbox */
.checkbox-group {
  margin-bottom: 24px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-label input {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 2px;
  accent-color: var(--brand);
}

.checkbox-label a {
  color: var(--brand);
  text-decoration: none;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider span {
  padding: 0 16px;
}

/* Social Login */
.social-login {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  width: 100%;
}

.social-btn:active {
  background: var(--bg-secondary);
}

/* Photo Upload */
.photo-upload {
  width: 100%;
  height: 160px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s;
}

.photo-upload:active {
  border-color: var(--brand);
}

.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.photo-upload.small {
  height: 120px;
}

.photo-upload.small span {
  font-size: 13px;
}

/* Price Input */
.price-input {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  overflow: hidden;
}

.price-symbol {
  padding: 14px 12px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-secondary);
}

.price-input input {
  border: none;
  background: none;
  flex: 1;
}

/* Toggle Group */
.toggle-group {
  display: flex;
  gap: 12px;
}

.toggle-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  cursor: pointer;
  flex: 1;
  justify-content: center;
}

.toggle-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 16px;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  max-width: 360px;
  width: 100%;
  animation: modalSlide 0.3s ease;
}

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

.success-icon {
  font-size: 56px;
  margin-bottom: 16px;
}

.modal-content h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-content p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ===== Footer ===== */
.footer {
  padding: 24px 16px;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===== Login Page ===== */
.login-section {
  padding: 40px 16px;
  text-align: center;
}

.login-section h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 32px;
}

.login-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text);
}

.login-btn.email {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.login-btn.email:active {
  background: var(--brand-dark);
}

.login-btn.apple {
  background: black;
  color: white;
  border-color: black;
}

.login-btn.apple:active {
  opacity: 0.9;
}

.login-btn.google {
  background: white;
  color: var(--text);
}

.login-btn.google:active {
  background: var(--bg-secondary);
}

.signup-link {
  background: none;
  border: none;
  color: var(--brand);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 20px;
  text-decoration: underline;
}

.terms-text {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 24px;
  line-height: 1.5;
}

.terms-text a {
  color: var(--brand);
  text-decoration: none;
}

.email-form {
  text-align: left;
}

.email-form.hidden,
.login-options.hidden,
.signup-link.hidden,
.terms-text.hidden {
  display: none;
}

.back-link {
  background: none;
  border: none;
  color: var(--brand);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 16px;
  text-align: center;
  width: 100%;
  text-decoration: underline;
}

/* ===== Touch-friendly enhancements ===== */
@media (hover: none) {
  .cta-btn:active,
  .search-btn:active,
  .social-btn:active,
  .photo-upload:active,
  .tab:active {
    transform: scale(0.98);
    transition: transform 0.1s;
  }
}

/* Prevent zoom on iOS inputs */
input, select, textarea {
  font-size: 16px !important;
}
