* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; 
}

/* https://www.w3schools.com/howto/howto_css_hide_scrollbars.asp hur man gömmer scrollbaren */

html, body {
  scrollbar-width: none; 
  -ms-overflow-style: none; 
}

html::-webkit-scrollbar, body::-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; 
  font-size: 112%;
}

body::-webkit-scrollbar {
  display: none; 
  width: 0;
}

body::-webkit-scrollbar {
  display: none;
}

.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: 80%;
  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);
}

.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;
}


.hidden {
  display: none;
}

@media (max-width: 768px) {
  .nav-center {
    display: none;
  }

  .navbar {
    padding: 10px 15px;
  }

  .logo-image {
    height: 45px; 
  }

  .glass-background {
    display: none !important;
  }

  .animated-title {
    display: none; 
  }

  .mobile-title {
    display: block !important;
    font-size: 1.8rem;
    padding: 0;
    margin-top: 90px;
    margin-bottom: 20px;
  }

  .search-content {
    flex-direction: column;
    width: 100%;
  }

  .search-bar {
    flex-direction: column;
    width: 100%;
    gap: 15px;
    padding: 15px;
  }

  .dropdown,
  .price-range,
  .mileage-range,
  .year-range,
  select {
    width: 100%;
  }

  .search-btn {
    width: 100%;
    margin-top: 10px;
  }

  .container {
    height: auto;
    padding: 10px 15px;
    margin-top: 10px;
  }

  .car-image {
    max-width: 95%;
  }

  .car-image-container {
    margin-top: -5px;
  }

  .hamburger {
    display: flex;
    margin-right: 20px;
  }

  .mobile-menu {
    display: block;
  }

  .promo-section {
    flex-direction: column;
    padding: 30px;
  }

  .promo-content {
    max-width: 100%;
    margin-bottom: 30px;
  }

  .promo-content h2 {
    font-size: 1.8rem;
  }

  .promo-content p {
    font-size: 1rem;
  }

  .promo-image {
    max-width: 100%;
    right: 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stat-box h3 {
    font-size: 3rem;
  }
}

@media (max-width: 480px) {
  .top-section {
    padding: 0 20px 20px 20px;
  }

  .search-container {
    padding: 0;
    position: relative;
  }

  .search-content {
    width: 100%;
    position: relative;
  }

  .search-bar {
    background: white;
    border-radius: 15px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 34px;
  }

  .search-btn {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -20px;
    padding: 12px 25px;
    border-radius: 20px;
    width: 100%;
    z-index: 10;
  }

  .mobile-title {
    text-align: left;
    font-size: 1.6rem;
    padding: 0;
    margin-top: 90px;
    margin-bottom: 20px;
    line-height: 1.2;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-section {
    padding: 20px;
    margin: 20px;
  }

  .review-section h2 {
    font-size: 2rem;
  }

  .stars {
    gap: 5px;
  }

  .star {
    font-size: 3rem;
  }

  .review-button {
    padding: 10px 20px;
    font-size: 1rem;
  }
}

@media (max-width: 320px) {
  .top-section {
    padding: 35px 15px 20px 15px;
  }
  
  .search-bar {
    margin-bottom: 40px;
  }
  
  .search-btn {
    bottom: -36px;
  }
}

@media (min-width: 769px) {
  .hamburger,
  .mobile-menu {
    display: none; 
  }

  .nav-center {
    display: flex; 
  }

  .mobile-title {
    display: none; 
  }

  .animated-title {
    display: block; 
  }
}

.top-section {
  background: #d50000;
  padding-bottom: 30px;
  padding-top: 120px
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: auto;
  min-height: 10vh;
  margin-top: 20px;
  padding: 0 15px;
  width: 100%;
}

.animated-title {
  color: #ffffff;
  font-size: 3rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  width: fit-content;
  text-align: center;
  margin: 0 auto;
  border-right: 2px solid white;
  animation: typewriter 2.5s steps(22) 0.5s forwards, blink 0.5s step-end infinite;
}

@keyframes typewriter {
  from {
    max-width: 0;
  }
  to {
    max-width: 100%;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

section.search-container {
  background: #D50000;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0px;
}

form.search-content {
  display: flex;
  flex-direction: row;
  align-items: center; 
  gap: 20px; 
}

section.search-bar {
  background: linear-gradient(to bottom, #FFFFFF, #F5F5F5);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  display: flex;
  gap: 30px; 
  align-items: flex-start;
}

.field-label {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #333;
  margin-bottom: 5px;
  text-align: left;
  margin-left: 2px;
}

.icon {
  margin-right: 5px;
}

fieldset.dropdown {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start; 
  border: none; 
}

.price-range, .mileage-range, .year-range {
  display: flex;
  align-items: center;
  gap: 10px; 
}

select {
  padding: 8px;
  border: 1px solid #E0E0E0;
  border-radius: 5px;
  background: white;
  color: #000;
  font-size: 14px;
  width: 100%; 
}

select:focus {
  outline: none;
  border-color: #D50000;
}

.arrow {
  color: #D50000;
}

.search-btn {
  background-color: white;
  color: #D50000;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: background 0.3s, transform 0.2s;
}

.search-btn:hover {
  background-color: #cccccc;
  transform: scale(1.05);
}

figure.car-image-container {
  background: linear-gradient(to bottom, #d50000 50%, #f5f5f5 50%);
  text-align: center;
  margin-top: -10px;
}

.car-image {
  max-width: 60%;
  height: auto;
}

.mobile-title {
  display: none; 
  color: #ffffff;
  font-size: 2.2rem; 
  font-weight: 600;
  text-align: center;
  width: 100%;
  padding: 15px 20px; 
  margin: 0;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .animated-title {
    display: none;
  }

  .mobile-title {
    display: block !important;
    font-size: 1.8rem;
    padding: 0;
    margin-top: 90px;
    margin-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .mobile-title {
    font-size: 1.6rem;
    padding: 0;
    margin-top: 90px;
    margin-bottom: 20px;
    line-height: 1.2;
  }

  .top-section {
    padding: 0 20px 20px 20px;
  }
}

@media (max-width: 360px) {
  .mobile-title {
    font-size: 1.8rem; 
    padding: 8px 12px;
  }
}

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;
}

.search-icon {
  width: 32px;
  height: 32px;
  vertical-align: middle;
  margin-right: 5px;
}

.promo-section {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background-color: #000000;
  padding: 40px 60px;
  border-radius: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin: 40px;
  min-height: 300px;
  position: relative;
}

.promo-content {
  max-width: 70%;
}

.promo-content h2 {
  color: #FFFFFF;
  font-size: 2.8rem;
  margin-bottom: 20px;
  font-weight: 600;
  line-height: 1.2;
}

.promo-content h2 span {
  color: #0066B3;
}

.promo-content p {
  color: #FFFFFF;
  font-size: 1.4rem;
  margin-bottom: 30px;
  line-height: 1.3;
  font-weight: 400;
}

.cta-button {
  background-color: #0066B3;
  color: #FFFFFF;
  padding: 15px 35px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.2rem;
  font-weight: 500;
  text-transform: none;
  box-shadow: 0 4px 15px rgba(0, 102, 179, 0.3);
  text-decoration: none;
  display: inline-block;
}

.cta-button:hover {
  background-color: #0077CC;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 102, 179, 0.4);
}

.promo-image {
  max-width: 25%;
  align-self: flex-start;
  margin-top: 0;
}

.promo-img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

@media (max-width: 768px) {
  .promo-section {
    flex-direction: column;
    padding: 30px;
  }

  .promo-content {
    max-width: 100%;
    margin-bottom: 30px;
  }

  .promo-content h2 {
    font-size: 2.2rem;
  }

  .promo-content p {
    font-size: 1.4rem;
  }

  .promo-image {
    max-width: 100%;
    right: 0;
  }
}

.stats-section {
  padding: 40px;
  margin: 40px;
  border-top: 1px solid rgba(51, 51, 51, 0.3);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 40px auto;
}

.stat-box {
  background-color: #d50000;
  padding: 40px;
  border-radius: 15px;
  text-align: left;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 200px;
}

.stat-box h3 {
  font-size: 4rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}

.stat-box p {
  font-size: 0.9rem;
  color: #FFFFFF;
  margin-top: 10px;
}

/* Responsive design */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stat-box h3 {
    font-size: 3rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-section {
    padding: 20px;
    margin: 20px;
  }
}

.review-section {
  background-color: #d50000;
  padding: 40px;
  text-align: center;
  border-radius: 20px;
  margin: 40px;
}

.review-section h2 {
  color: #FFFFFF;
  font-size: 1.6rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.stars {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.star {
  font-size: 4rem;
}

.red-star {
  color: #FFFFFF;
}

.gray-star {
  color: rgba(255, 255, 255, 0.6);
}

.review-button {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 25px;
  background-color: #FFFFFF;
  color: #d50000;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 30px;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.review-button:hover {
  background-color: #990000;
  color: #FFFFFF;
}

@media (max-width: 480px) {
  .review-section h2 {
    font-size: 1.6rem;
  }

  .stars {
    gap: 5px;
  }

  .star {
    font-size: 3rem;
  }

  .review-button {
    padding: 10px 20px;
    font-size: 1rem;
  }
}

.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;
  }
}