/* 
  RevX - Premium Second-Hand 2-Wheelers
  Theme: Dark Automotive (Dark Slate + Racing Red)
*/

:root {
  /* Colors */
  --bg-dark: #0a0a0c;        /* Deep Slate/Black */
  --bg-surface: #141418;     /* Slightly lighter for cards */
  --bg-surface-glass: rgba(20, 20, 24, 0.7); /* Glassmorphism base */
  
  --accent-red: #ff3333;     /* Racing Red */
  --accent-red-hover: #ff4d4d;
  --accent-red-glow: rgba(255, 51, 51, 0.5);
  
  --text-main: #f0f0f5;      /* Off-white for readability */
  --text-muted: #8e8e9e;     /* Grey for secondary text */
  --border-color: rgba(255, 255, 255, 0.08);

  /* Typography */
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 5%;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul {
  list-style: none;
}

/* Typography Utility */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, #fff 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  outline: none;
}

.btn-primary {
  background-color: var(--accent-red);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-red-glow);
}

.btn-primary:hover {
  background-color: var(--accent-red-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-red-glow);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--text-main);
  background: rgba(255,255,255,0.05);
}

/* --- Components --- */

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  transition: all var(--transition-smooth);
}

.navbar.scrolled {
  padding: 15px 0;
  background-color: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.logo-red {
  color: var(--accent-red);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text-main);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  width: 28px;
  height: 2px;
  background-color: var(--text-main);
  transition: all var(--transition-fast);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-dark);
    flex-direction: column;
    padding: 20px 5%;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); /* Hidden state */
    transition: clip-path var(--transition-smooth);
  }
  
  .nav-links.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }

  .menu-toggle {
    display: flex;
  }
  
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* --- Section Layouts --- */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.center-btn {
  display: flex;
  justify-content: center;
}

/* --- Filtering UI --- */
.filter-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--text-main);
  color: var(--text-main);
}

.filter-btn.active {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: white;
  box-shadow: 0 4px 10px var(--accent-red-glow);
}

/* --- Page Header --- */
.page-header {
  padding-top: 140px;
  padding-bottom: 60px;
  text-align: center;
  background: linear-gradient(to bottom, rgba(20, 20, 24, 0.8) 0%, var(--bg-dark) 100%);
  border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1.15rem;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh; /* Replaced fixed height to avoid overflow */
  display: flex;
  align-items: center;
  background-image: radial-gradient(circle at 70% 50%, rgba(255, 51, 51, 0.08) 0%, transparent 50%),
                    linear-gradient(to bottom, var(--bg-dark) 0%, #000 100%);
  padding-top: 120px; /* Just enough padding to clear the 100px navbar safely */
  padding-bottom: 60px; /* Add padding to the bottom so content never touches the edge */
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMDIiLz4KPC9zdmc+') repeat;
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 800px;
  z-index: 2;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255, 51, 51, 0.1);
  color: var(--accent-red);
  border: 1px solid rgba(255, 51, 51, 0.2);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  margin-left: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 1.05;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 20px;
  margin-bottom: 60px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  border-top: 1px solid var(--border-color);
  padding-top: 40px;
}

.stat h3 {
  font-size: 2rem;
  color: #fff;
  margin-bottom: 4px;
}

.stat p {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Bike Cards --- */
.bike-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.bike-card {
  background: var(--bg-surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all var(--transition-smooth);
}

.bike-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 51, 51, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.card-image-wrapper {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.bike-card:hover .card-image-wrapper img {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--accent-red);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.card-content {
  padding: 24px;
}

.bike-name {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.bike-specs {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

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

.bike-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.view-details {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-red);
  font-weight: 600;
  font-size: 0.95rem;
}

.view-details:hover {
  gap: 10px; /* Slight micro-interaction on hover */
}

/* --- Features / Trust Section --- */
.bg-glass {
  background: rgba(20, 20, 24, 0.4);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.feature-card {
  text-align: center;
  padding: 30px 20px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: transform var(--transition-fast);
}

.feature-card:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,0.04);
}

.feature-icon {
  font-size: 3rem;
  color: var(--accent-red);
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Contact Page --- */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .contact-container {
    grid-template-columns: 1fr;
  }
}

.contact-form-wrapper {
  background: var(--bg-surface);
  padding: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.contact-form-wrapper h2 {
  font-size: 2rem;
  margin-bottom: 30px;
}

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

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group input, 
.form-group select, 
.form-group textarea {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: white;
  padding: 14px 16px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition-fast);
  outline: none;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 2px rgba(255, 51, 51, 0.2);
}

.contact-info-wrapper {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.info-card {
  background: rgba(20, 20, 24, 0.6);
  backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.info-card h3 {
  font-size: 1.8rem;
  margin-bottom: 24px;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.info-list ion-icon {
  font-size: 1.5rem;
  color: var(--accent-red);
  flex-shrink: 0;
}

.map-container {
  height: 350px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

/* Animations Utility */
.fade-in {
  animation: fadeIn 1s ease forwards;
}

.slide-up {
  opacity: 0;
  transform: translateY(30px);
  animation: slideUp 0.8s forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
  .hero-actions { flex-direction: column; }
  .hero-stats { flex-direction: column; gap: 20px; text-align: center; }
  .bike-grid { grid-template-columns: 1fr; }
}
.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-orientation: from-image;
  transform: rotate(0deg);
}
