/* ============================================================================
   AUTOSALONI.LV - Cloudflare Pages Site
   Design inspired by carwow.co.uk
   =========================================================================== */

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

/* Root variables */
:root {
  --teal: #00c8b4;
  --teal-d: #00a896;
  --teal-light: #e6f7f5;
  --dark: #1a1a1a;
  --gray-bg: #f2f2f2;
  --gray-card: #f9f9f9;
  --text-dark: #1a1a1a;
  --text-light: #666;
  --border-color: #e0e0e0;
  --red-accent: #d32f2f;
  --red-light: #ffebee;
  --transition: all 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: white;
  color: var(--text-dark);
  line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
}

h1 {
  font-size: 3.5rem;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h2 {
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 2rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

p {
  font-size: 1rem;
  color: var(--text-light);
}

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

a:hover {
  color: var(--teal-d);
}

/* ============================================================================
   NAVIGATION
   =========================================================================== */

nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 60px;
  background: white;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.1em;
}

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

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--teal);
}

.nav-btn {
  background: var(--teal);
  color: white;
  padding: 0.65rem 1.2rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.nav-btn:hover {
  background: var(--teal-d);
}

/* ============================================================================
   HERO SECTION
   =========================================================================== */

.hero {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-d) 100%);
  padding: 3rem 2rem;
  position: relative;
  overflow: hidden;
  color: white;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-cars {
  display: flex;
  gap: 1rem;
}

.hero-car {
  width: 200px;
  height: 150px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  object-fit: cover;
}

.hero-center {
  text-align: center;
}

.hero-center h1 {
  color: white;
  margin-bottom: 2rem;
  font-size: 3rem;
}

.hero-search {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 1rem;
  backdrop-filter: blur(10px);
}

.search-tabs {
  display: flex;
  gap: 1px;
  margin-bottom: 1rem;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.1);
}

.stab {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.stab.active {
  background: white;
  color: var(--teal);
  font-weight: 600;
}

.search-box {
  display: flex;
  gap: 0.5rem;
}

.search-box input {
  flex: 1;
  padding: 0.9rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.search-btn {
  padding: 0.9rem 1.5rem;
  background: white;
  color: var(--teal);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.search-btn:hover {
  background: var(--teal-light);
}

/* ============================================================================
   CHIP ROW
   =========================================================================== */

.chip-row {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.chip {
  padding: 0.6rem 1.2rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.chip:hover,
.chip.active {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

/* ============================================================================
   STATS BAR
   =========================================================================== */

.stats-bar {
  background: var(--gray-bg);
  padding: 1.5rem 2rem;
  text-align: center;
  font-weight: 500;
  color: var(--text-dark);
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 8px;
  margin-bottom: 3rem;
}

/* ============================================================================
   SECTIONS
   =========================================================================== */

section {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 2rem;
}

section h2 {
  margin-bottom: 2rem;
}

/* ============================================================================
   DEALER CARDS GRID
   =========================================================================== */

.dealers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.dealer-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.dealer-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.dealer-photo {
  width: 100%;
  height: 240px;
  object-fit: cover;
  position: relative;
  background: var(--gray-bg);
}

.dealer-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: white;
  color: var(--text-dark);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dealer-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dealer-brands {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.brand-pill {
  background: var(--teal-light);
  color: var(--teal);
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.dealer-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.dealer-address {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.dealer-rating {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.dealer-rating-stars {
  color: #ffa500;
}

.dealer-rating-count {
  color: var(--text-light);
}

.dealer-pricing {
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.dealer-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 0.25rem;
}

.dealer-monthly {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ============================================================================
   CHINESE AUTO SECTION
   =========================================================================== */

.chinese-banner {
  background: linear-gradient(135deg, #c41e3a 0%, #d32f2f 100%);
  color: white;
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  text-align: center;
}

.chinese-banner h2 {
  color: white;
}

.chinese-banner p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
}

.chinese-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ============================================================================
   OFFERS SECTION
   =========================================================================== */

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

.offer-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
  transition: var(--transition);
}

.offer-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.offer-photo {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.offer-discount {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--red-accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.offer-content {
  padding: 1.5rem;
}

.offer-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.offer-pricing {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: center;
}

.offer-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--teal);
}

.offer-was {
  font-size: 0.9rem;
  color: var(--text-light);
  text-decoration: line-through;
}

.offer-monthly {
  font-size: 0.9rem;
  color: var(--text-light);
}

.offer-deadline {
  font-size: 0.85rem;
  color: var(--red-accent);
  font-weight: 600;
}

/* ============================================================================
   BUDGET GRID
   =========================================================================== */

.budget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.budget-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 200px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.budget-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.budget-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.budget-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}

.budget-label {
  color: white;
  font-weight: 600;
  font-size: 1rem;
}

/* ============================================================================
   BRANDS SECTION
   =========================================================================== */

.brands-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.brands-tab {
  padding: 0.6rem 1.2rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

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

.logos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.logo-card {
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.logo-circle {
  width: 100px;
  height: 100px;
  margin: 0 auto 0.75rem;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.logo-card:hover .logo-circle {
  border-color: var(--teal);
  background: var(--teal-light);
  transform: scale(1.05);
}

.logo-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
}

.logo-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.logo-count {
  font-size: 0.75rem;
  color: var(--text-light);
}

.logo-on-dark {
  filter: brightness(0) invert(1);
}

/* ============================================================================
   MAP SECTION
   =========================================================================== */

.map-placeholder {
  background: var(--dark);
  border-radius: 12px;
  height: 400px;
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  font-weight: 500;
}

.map-dots {
  position: absolute;
  width: 100%;
  height: 100%;
}

.map-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--teal);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

.cities-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.city-row {
  padding: 1rem 1.5rem;
  background: white;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.city-row:hover {
  border-color: var(--teal);
  background: var(--teal-light);
}

.city-name {
  font-weight: 500;
  color: var(--text-dark);
}

.city-count {
  color: var(--text-light);
  font-size: 0.9rem;
}

.city-arrow {
  color: var(--teal);
  font-size: 1.2rem;
}

/* ============================================================================
   TRUST SECTION
   =========================================================================== */

.trust-section {
  background: var(--dark);
  color: white;
  padding: 3rem 2rem;
  border-radius: 12px;
  margin-bottom: 3rem;
}

.trust-section h2 {
  color: white;
  margin-bottom: 2rem;
  text-align: center;
}

.trust-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.trust-stat {
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.trust-stat:last-child {
  border-right: none;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

/* ============================================================================
   SEO LINK CLOUD
   =========================================================================== */

.link-cloud {
  background: var(--gray-bg);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 3rem;
}

.link-cloud h3 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.link-cloud-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.link-cloud a {
  padding: 0.5rem 1rem;
  background: white;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--teal);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.link-cloud a:hover {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

/* ============================================================================
   FOOTER
   =========================================================================== */

footer {
  background: #000;
  color: white;
  padding: 3rem 2rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--teal);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.75rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--teal);
}

.footer-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 1.5rem;
}

.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================================================
   STICKY BOTTOM BANNER
   =========================================================================== */

.sticky-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-d) 100%);
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
  z-index: 999;
}

.sticky-banner.hidden {
  display: none;
}

.sticky-banner-text {
  font-weight: 500;
  font-size: 1rem;
}

.sticky-banner-text a {
  color: white;
  text-decoration: underline;
}

.sticky-banner-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: var(--transition);
}

.sticky-banner-close:hover {
  opacity: 0.7;
}

/* Avoid overlap with sticky banner */
body.has-sticky-banner {
  padding-bottom: 60px;
}

/* ============================================================================
   RESPONSIVE
   =========================================================================== */

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  nav {
    padding: 0 1rem;
    height: 50px;
  }

  .nav-links {
    gap: 1rem;
    font-size: 0.8rem;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-cars {
    justify-content: center;
  }

  .hero-car {
    width: 150px;
    height: 120px;
  }

  .chip-row {
    justify-content: flex-start;
  }

  .dealers-grid,
  .offers-grid,
  .budget-grid {
    grid-template-columns: 1fr;
  }

  .trust-stats {
    grid-template-columns: 1fr;
  }

  .trust-stat {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 2rem;
  }

  .trust-stat:last-child {
    border-bottom: none;
  }

  .sticky-banner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 1.5rem 1rem;
  }

  body.has-sticky-banner {
    padding-bottom: 90px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  section {
    padding: 0 1rem;
  }

  .nav-links {
    display: none;
  }

  .nav-btn {
    display: none;
  }

  .chip-row {
    padding: 0 1rem;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .logos-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .logo-circle {
    width: 80px;
    height: 80px;
  }

  .logo-img {
    width: 44px;
    height: 44px;
  }
}
