@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

:root {
  --red: #C8102E;
  --red-dark: #9e0d24;
  --red-light: #e8354f;
  --white: #FAFAF8;
  --off-white: #F0EFE9;
  --black: #0D0D0D;
  --gray: #6B6B6B;
  --gray-light: #D4D3CC;
  --maple: #E8622A;
  --leaf: #2D6A2D;
  --leaf-light: #3d8a3d;
  --bg: #FAFAF8;
  --card-bg: #FFFFFF;
  --border: #E2E1DA;
  --shadow: 0 2px 12px rgba(0,0,0,0.07);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --radius: 6px;
  --radius-lg: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--black);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

/* ---- NAV ---- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--black);
  letter-spacing: -0.02em;
}

.nav-logo .maple-leaf {
  color: var(--red);
  font-size: 1.5rem;
  line-height: 1;
}

.nav-logo span.dot { color: var(--red); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--gray);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--black); background: var(--off-white); }
.nav-links a.active { color: var(--red); font-weight: 600; }

.nav-cta {
  background: var(--red) !important;
  color: var(--white) !important;
  border-radius: var(--radius) !important;
  padding: 8px 18px !important;
}
.nav-cta:hover { background: var(--red-dark) !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ---- HERO ---- */
.hero {
  background: var(--black);
  color: var(--white);
  position: relative;
  overflow: hidden;
  padding: 80px 2rem 90px;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 40px,
    rgba(255,255,255,0.5) 40px,
    rgba(255,255,255,0.5) 41px
  );
}

.hero-accent {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(200,16,46,0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(200,16,46,0.15);
  border: 1px solid rgba(200,16,46,0.3);
  color: #ff6b7a;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: normal;
  color: var(--red);
}

.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.65);
  max-width: 560px;
  margin-bottom: 36px;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--red);
  color: white;
}
.btn-primary:hover { background: var(--red-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(200,16,46,0.35); }

.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-secondary:hover { background: rgba(255,255,255,0.15); }

.btn-outline {
  background: transparent;
  color: var(--red);
  border: 2px solid var(--red);
}
.btn-outline:hover { background: var(--red); color: white; }

.btn-green {
  background: var(--leaf);
  color: white;
}
.btn-green:hover { background: var(--leaf-light); transform: translateY(-1px); }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 15px 32px; font-size: 1.05rem; }
.btn-full { width: 100%; justify-content: center; }

/* ---- STATS BAR ---- */
.stats-bar {
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
  padding: 20px 2rem;
}

.stats-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

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

.stat-item .num {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--red);
}

.stat-item .label {
  font-size: 0.8rem;
  color: var(--gray);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---- SECTIONS ---- */
section { padding: 72px 2rem; }

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--red);
  margin-bottom: 10px;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 14px;
}

.section-sub {
  font-size: 1rem;
  color: var(--gray);
  max-width: 500px;
  margin-bottom: 48px;
}

/* ---- CATEGORY CARDS ---- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.cat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-decoration: none;
  color: var(--black);
  transition: all 0.22s;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.cat-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}

.cat-card:hover { border-color: var(--red); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.cat-card:hover::before { transform: scaleX(1); }

.cat-icon {
  font-size: 2rem;
  line-height: 1;
}

.cat-card h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--black);
}

.cat-card p {
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.5;
}

.cat-count {
  font-size: 0.75rem;
  color: var(--red);
  font-weight: 600;
  margin-top: auto;
}

/* ---- LISTINGS ---- */
.listings-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

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

.filter-btn {
  padding: 7px 16px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
  color: var(--gray);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.listing-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.22s;
  cursor: pointer;
}

.listing-card:hover { border-color: #c8102e44; transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.listing-img {
  height: 160px;
  background: linear-gradient(135deg, var(--off-white), var(--gray-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}

.listing-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 100px;
}

.badge-offer { background: #e8f5e9; color: var(--leaf); }
.badge-request { background: #fff3e0; color: #e65100; }
.badge-rental { background: #e3f2fd; color: #1565c0; }
.badge-new { background: var(--red); color: white; }

.listing-body { padding: 18px; }

.listing-category {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.listing-body h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--black);
  line-height: 1.3;
}

.listing-body p {
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.listing-meta {
  font-size: 0.78rem;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 4px;
}

.listing-price {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--black);
}

/* ---- HOW IT WORKS ---- */
.how-bg { background: var(--off-white); }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  position: relative;
}

.step {
  text-align: center;
}

.step-num {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--red);
  color: white;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.875rem;
  color: var(--gray);
  line-height: 1.55;
}

/* ---- FORM ---- */
.post-form {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 6px;
}

.form-group label span { color: var(--red); }

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--black);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  appearance: none;
}

.form-control:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200,16,46,0.1);
}

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}

.form-tab {
  flex: 1;
  padding: 11px;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  background: white;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s;
  color: var(--gray);
}

.form-tab.active { background: var(--red); color: white; }

/* ---- SEARCH ---- */
.search-wrap {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 240px;
  position: relative;
}

.search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  font-size: 1rem;
}

.search-box input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  outline: none;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200,16,46,0.1);
}

/* ---- FOOTER ---- */
footer {
  background: var(--black);
  color: rgba(255,255,255,0.6);
  padding: 56px 2rem 32px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .nav-logo { color: white; margin-bottom: 14px; display: inline-flex; }

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 280px;
}

.footer-col h4 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul li a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
}

.footer-bottom a { color: rgba(255,255,255,0.4); text-decoration: none; }
.footer-bottom a:hover { color: white; }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--off-white);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.modal-close:hover { background: var(--border); }

.modal h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.modal p.sub { font-size: 0.875rem; color: var(--gray); margin-bottom: 24px; }

/* ---- TOAST ---- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--black);
  color: white;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-left: 4px solid #4caf50; }
.toast.error { border-left: 4px solid var(--red); }

/* ---- LOADING ---- */
.loading-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.skeleton {
  background: linear-gradient(90deg, var(--off-white) 25%, var(--border) 50%, var(--off-white) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer { to { background-position: -200% 0; } }

/* ---- PAGE HEADER ---- */
.page-header {
  background: var(--black);
  color: white;
  padding: 56px 2rem;
}

.page-header .section-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.page-header h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.page-header p { color: rgba(255,255,255,0.6); font-size: 1rem; }

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1.2rem; color: var(--black); margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; margin-bottom: 24px; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  nav { padding: 0 1.25rem; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: white;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    gap: 4px;
  }

  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 14px; }
  .hamburger { display: flex; }

  .hero { padding: 56px 1.25rem 64px; }

  section { padding: 48px 1.25rem; }

  .form-row { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr 1fr; }

  .post-form { padding: 24px; }

  .modal { padding: 24px; }

  .stats-inner { gap: 1.5rem; }

  .page-header { padding: 40px 1.25rem; }
  .page-header .section-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { justify-content: center; }
}
