@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; 
}

html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
  width: 0;
}

body {
  font-family: "Arial", sans-serif;
  margin: 0;
  background-color: #F5F5F5;
  overflow-y: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar {
  display: none;
  width: 0;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: #D50000;
  position: fixed;
  width: 100%;
  margin-bottom: 40px;
  top: 0;
  z-index: 1000;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

figure.logo {
  display: flex;
  align-items: center;
}

.logo-image {
  height: 55px;
  width: auto;
  object-fit: contain;
}

section.glass-background {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 30px;
  padding: 15px 30px;
  display: flex;
}

section.nav-center {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  color: white;
  padding: 10px 20px;
  transition: color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
  border-radius: 20px;
}

.nav-links a:hover {
  background-color: white;
  color: #D50000;
}

.nav-links a.active {
  background-color: white;
  color: #D50000;
}

.nav-links .divider {
  height: 24px;
  width: 1px;
  background-color: rgba(255, 255, 255, 0.4);
  margin: 0 15px;
}

.navbar.scrolled {
  background: #000000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.nav-links.scrolled a {
  color: white;
}

.nav-links.scrolled a.active {
  background-color: white;
  color: #D50000;
}

.hamburger {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  margin-right: 10px;
  position: relative;
  width: 35px;
  height: 35px;
  padding: 5px;
  justify-content: center;
  align-items: center;
  background: none;
  border: none;
}

.hamburger.open {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  border: 2px solid white;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
  position: absolute;
}

.hamburger span:nth-child(1) {
  transform: translateY(-8px);
}

.hamburger span:nth-child(2) {
  transform: translateY(0px);
}

.hamburger span:nth-child(3) {
  transform: translateY(8px);
}

/* X state */
.hamburger.open span:nth-child(1) {
  transform: rotate(45deg);
  width: 20px;
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  width: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg);
  width: 20px;
}

.mobile-menu {
  position: fixed;
  top: 60px;
  left: -100%;
  width: 100%;
  height: 100vh;
  background: rgba(213, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  padding: 20px;
  z-index: 999;
  transition: left 0.3s ease;
}

.mobile-menu.open {
  left: 0;
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu ul li {
  margin: 15px 0;
}

.mobile-menu ul li a {
  color: white;
  text-decoration: none;
  font-size: 18px;
  display: block;
  padding: 10px;
  text-align: center;
  border-radius: 20px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.mobile-menu ul li a:hover {
  background-color: white;
  color: #D50000;
}

.mobile-menu ul li a.active {
  background-color: white;
  color: #D50000;
}

noscript div {
  background: #ffebee;
  color: #c62828;
  padding: 10px;
  text-align: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
}

noscript ~ body .hamburger,
noscript ~ body .mobile-menu {
  display: none !important;
}

noscript ~ body .nav-center {
  display: flex !important;
}

noscript ~ body .navbar {
  background: #000000 !important;
}

@media (max-width: 768px) {
  .nav-center {
    display: none;
  }

  .navbar {
    padding: 10px 15px;
  }

  .logo-image {
    height: 45px;
  }

  .glass-background {
    display: none !important;
  }

  .hamburger {
    display: flex;
    margin-right: 20px;
  }

  .mobile-menu {
    display: block;
  }
}

@media (min-width: 769px) {
  .hamburger {
    display: none;
  }

  .mobile-menu {
    display: none;
  }

  .nav-center {
    display: flex;
  }
}

.hidden {
  display: none;
}

main {
  padding-top: 80px;
}

.car-listings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.car-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

.car-card:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.car-card:nth-child(1) { animation-delay: 0.1s; }
.car-card:nth-child(2) { animation-delay: 0.2s; }
.car-card:nth-child(3) { animation-delay: 0.3s; }
.car-card:nth-child(4) { animation-delay: 0.4s; }
.car-card:nth-child(5) { animation-delay: 0.5s; }
.car-card:nth-child(6) { animation-delay: 0.6s; }
.car-card:nth-child(7) { animation-delay: 0.7s; }
.car-card:nth-child(8) { animation-delay: 0.8s; }
.car-card:nth-child(9) { animation-delay: 0.9s; }
.car-card:nth-child(10) { animation-delay: 1.0s; }

@media (max-width: 768px) {
  .car-listings {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    padding: 10px;
  }
}

.car-carousel {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.slides {
  position: relative;
  height: 100%;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.slide.active {
  opacity: 1;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  z-index: 2;
}

.prev { left: 10px; }
.next { right: 10px; }

.slide-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}

.dot {
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  cursor: pointer;
}

.dot.active {
  background: white;
}

.car-info {
  padding: 1rem;
  text-align: left;
}

.car-info h3 {
  margin: 0.5rem 0;
  font-size: 1.2rem;
}

.car-type {
  font-size: 1rem;
  color: #888;
  margin-bottom: 0.5rem;
}

.car-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #666;
}

.spec {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: calc(33.33% - 0.67rem);
}

.spec:nth-last-child(-n+2) {
  width: calc(33.33% - 0.67rem);
  margin-left: auto;
  margin-right: auto;
}

.spec-top {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}

.spec img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  margin-bottom: 0;
}

.spec-label {
  font-size: 0.8rem;
  color: #888;
}

.spec-value {
  font-weight: 600;
  color: #333;
  text-align: center;
  width: 100%;
}

.car-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.amount {
  font-weight: bold;
  font-size: 1.5rem;
}

.lease {
  font-size: 0.9rem;
  color: #666;
}

.view-details {
  width: 100%;
  padding: 0.8rem;
  background: #D50000;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.view-details:hover {
  background: #b50000;
}
@media (max-width: 768px) {
  .car-listings {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
}

h1 {
  font-size: 2.5rem; 
  font-weight: 700;
  color: #D50000; 
  text-align: center;
  margin: 20px 0; 
  text-transform: uppercase; 
  letter-spacing: 2px; 
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.footer {
  background-color: #000;
  color: white;
  padding: 40px 20px 20px;
  margin-top: 40px;
}

.footer .innehall {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.footer .länkar h3, .footer .kontakt h3 {
  color: #D50000;
  font-size: 1.5rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.footer .länkar, .footer .kontakt {
  flex: 1;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer li {
  margin-bottom: 12px;
}

.footer a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #D50000;
}

.footer address {
  font-style: normal;
  line-height: 1.6;
}

.footer .copyright {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
  .footer .innehall {
    flex-direction: column;
    gap: 30px;
  }

  .footer .länkar, .footer .kontakt {
    text-align: center;
  }
}

