/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Exo:wght@400;500;600&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;

  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --first-color: hsl(0, 90%, 51%);
  --first-color-alt: hsl(219, 69%, 52%);
  --title-color: hsl(0, 0%, 4%);
  --text-color: hsl(0, 0%, 5%);
  --text-color-light: hsl(219, 4%, 55%);
  --white-color: #080808;
  --body-color: #ffff;
  --container-color: hsl(219, 4%, 7%);

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Exo", sans-serif;
  --h1-font-size: 0.813rem;
  --h2-font-size: 1rem;
  --h3-font-size: 1.5rem;
  --normal-font-size: 0.938rem;
  --small-font-size: 0.813rem;
  --smaller-font-size: 0.75rem;

  /*========== Font weight ==========*/
  --font-medium: 500;
  --font-semi-bold: 600;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}

@media screen and (min-width: 968px) {
  :root {
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.813rem;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
}

h1,
h2,
h3 {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1024px;
  margin-right: 1.5rem;
  margin-left: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding: 4.5rem 0 2rem;
}

.section__title {
  font-size: var(--h2-font-size);
  text-align: center;
  margin-bottom: 2.5rem;
}

.main {
  overflow: hidden;
}
.shape__smaller {
  width: 180px;
  height: 180px;
  filter: blur(64px);
}

/*=============== HEADER & NAV ===============*/
.header {
  width: 100%;

  position: fixed;
  top: 10px;
  left: 0;
  z-index: var(--z-fixed);
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
  max-width: 100%;
}

.nav__toggle {
  color: var(--first-color);
  display: inline-flex;
}

.nav__logo {
  display: flex;
  align-items: center;
  column-gap: 1rem;
}

.nav__logo img {
  width: 150px;
  margin-top: 20px;
}

.nav__toggle {
  font-size: 1.25rem;
  cursor: pointer;
}

@media screen and (max-width: 767px) {
  .nav__menu {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.9);
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    transition: left 0.3s ease;
    backdrop-filter: blur(10px);
  }
}

.nav__list {
  display: flex;
  flex-direction: column;
  text-align: center;
  row-gap: 2rem;
  padding-top: 9rem;
}

.nav__link {
  text-transform: uppercase;
  color: var(--title-color);
  font-size: var(--h2-font-size);
  font-weight: var(--font-medium);
  transition: 0.3s;
  color: red;
}

.nav__link:hover {
  color: var(--first-color);
}

.nav__close {
  font-size: 2rem;
  color: var(--body-color);
  position: absolute;
  top: 1rem;
  right: 1rem;
  cursor: pointer;
}

/* Show menu */
.show-menu {
  left: 0;
}

/* Change background header */

/* Active link */

/*=============== HOME ===============*/
.home {
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.7),
    rgba(0, 0, 0, 0)
  );
  background-position: center;
  background-size: cover;
  height: 100vh;
  animation: slideBackground 15s infinite;
}
.home__container {
  position: relative;
  padding-top: 4rem;
  row-gap: 1rem;
}
.home__data {
  text-align: center;
}
.home__title {
  font-size: var(--h1-font-size);
  margin-bottom: 1rem;
  color: var(--body-color);
}
.home__subtitle {
  font-size: var(--h3-font-size);
  margin-bottom: 9rem;
  color: var(--body-color);
}
.home__elec {
  font-size: var(--small-font-size);
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  color: var(--text-color);
  column-gap: 0.25rem;
}
.home__img {
  width: 280px;
  justify-self: center;
}
.home__car {
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 4rem;
}
.home__car-name {
  font-size: 0.625rem;
  font-weight: 400;
  color: var(--text-color-light);
}
.home__car-data {
  text-align: center;
}
.home__car-number {
  font-size: var(--h2-font-size);
  font-weight: var(--font-medium);
  margin-bottom: 2.1rem;
  color: var(--body-color);
}
.home__car-icon {
  border-radius: 50%;
  padding: 0.326rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
.home__button {
  position: relative;
  justify-content: center;
  align-items: center;
  justify-self: center;
  display: flex;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid hsl(0, 90%, 55%);
  font-size: var(--small-font-size);
  color: var(--body-color);
  font-weight: var(--font-medium);
}
.home__button::before {
  content: "";
  width: 90px;
  height: 90px;
  position: absolute;
  border-radius: 50%;
  box-shadow: 0 0 12px hsl(0, 100%, 57%);
  transition: 0.3s;
  animation: button 3s infinite;
  border: 0 0 12px hsl(0, 100%, 57%);
}
.static-image {
  display: none; /* Hide the static image by default */
  width: 100%; /* Ensure the static image is responsive */
  height: auto;
}
/* Button animate */
@keyframes button {
  0% {
    box-shadow: 0 0 12px hsl(0, 90%, 55%);
  }
  50% {
    box-shadow: 0 0 24px hsl(0, 90%, 55%);
  }
}
/* Slideshow container styling */
.slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 300%; /* 3 images side by side */
  height: 100%;
  display: flex;
  animation: slideLeft 15s infinite;
}

.slide {
  width: 100vw; /* Each slide takes the full viewport width */
  height: 100%;
  background-size: cover;
  background-position: center;
}

@media screen and (max-width: 767px) {
  .home {
    background-image: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 2),
      rgba(0, 0, 0, 2)
    );
    background-size: cover;
    height: 600px;
    background-position: center;
    height: 100vh;
  }
  .home__car-number {
    margin-bottom: 9rem;
  }
  .home {
    height: auto; /* Adjust height for smaller screens */
  }

  .slideshow {
    display: none; /* Hide the slideshow on small screens */
  }

  .static-image {
    display: block; /* Show the static image on small screens */
  }
}
/*=============== BUTTON ===============*/
.button {
  display: inline-block;
  background-color: var(--first-color);
  color: var(--white-color);
  padding: 1rem 2rem;
  border-radius: 0.25rem;
  font-size: var(--normal-font-size);
  transition: 0.3s;
}
.button:hover {
  background-color: var(--first-color-alt);
}
/*=============== ABOUT ===============*/
.about__container {
  row-gap: 6rem;
}

.about__group {
  position: relative;
}
.about__img {
  width: 350px;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
  margin-top: 20px;
}
.about__card {
  width: 180px;
  position: absolute;
  right: 0;
  bottom: -2.5rem;
  background-color: hsl(0, 0%, 100%, 0.1);
  backdrop-filter: blur(16px);
  padding: 1rem 0.75rem;
  text-align: center;
  border-radius: 1.25rem;
}
.about__card-title {
  font-size: var(--h3-font-size);
  margin-bottom: 0.5rem;
}
.about__card-description {
  font-size: var(--small-font-size);
}
.about__title {
  text-align: initial;
  margin-bottom: 2rem;
}
.about__card-description {
  margin-bottom: 2rem;
}

/*=============== OFFER ===============*/
.offer {
  position: relative;
}
.offer__container {
  grid-template-rows: max-content 224px;
}
.offer__bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}
.offer__data,
.offer__img {
  position: relative;
}
.offer__data {
  text-align: center;
}
.offer__title {
  margin-bottom: 2rem;
  color: #fff;
}
.offer__description {
  margin-bottom: 3rem;
  color: #fad5d3;
}
.offer__img {
  position: absolute;
  max-width: initial;
  width: 400px;
  bottom: 2rem;
}

/*=============== LOGOS ===============*/
.logos__img {
  width: 80px;
  opacity: 4;
  transition: 0.3s;
}
.logos__container {
  grid-template-columns: repeat(3, max-content);
  justify-content: center;
  align-items: center;
  gap: 4rem;
  padding-bottom: 2rem;
}
.logos__img:hover {
  opacity: 1;
}
/*=============== FOOTER ===============*/
.footer {
  position: relative;
  overflow: hidden;
  background-color: #0f172b;
  color: #f1f8ff;
}
.footer .shape__small,
.footer .shape__big {
  position: absolute;
}
.footer .shape__big {
  width: 300px;
  height: 300px;
  left: -12rem;
  top: 6rem;
}
.footer .shape__small {
  right: -13rem;
  bottom: -6rem;
}
.footer__container {
  row-gap: 2.5rem;
  position: relative;
}
.footer__logo {
  display: inline-flex;
  align-items: center;
  column-gap: 0.25rem;
  color: var(--title-color);
  font-size: var(--h2-font-size);
  margin-bottom: 1.25rem;
  transition: 0.3s;
}
.footer__logo img {
  width: 100px;
}
.footer__title {
  font-size: var(--h3-font-size);
  margin-bottom: 1.25rem;
  color: #e62e22;
}
.footer__links {
  display: flex;
  flex-direction: column;
  row-gap: 0.5rem;
  color: #e62e22;
}
.footer__link,
.footer__social-link {
  color: #f1f8ff;
  transition: 0.3s;
}
.footer__link:hover,
.footer__social-link:hover {
  color: var(--text-color);
}
.footer__social {
  display: flex;
  column-gap: 1.5rem;
}
.footer__social-link {
  font-size: 1.25rem;
}
.footer__copy {
  margin-top: 4.5rem;
  display: block;
  text-align: center;
  font-size: var(--smaller-font-size);
  color: var(--text-color-light);
}
/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar {
  width: 0.6rem;
  background-color: hsl(219, 4%, 16%);
  border-radius: 1rem;
}
::-webkit-scrollbar-thumb {
  background-color: hsl(219, 4%, 24%);
  border-radius: 1rem;
}

::-webkit-scrollbar-thumb:hover {
  background-color: hsl(219, 4%, 32%);
}
/*=============== SCROLL UP ===============*/
.scrollup {
  position: fixed;
  right: 1rem;
  bottom: -30%;
  background-color: hsl(0, 0%, 100%, 0.1);
  backdrop-filter: blur(16px);
  display: inline-flex;
  padding: 0.45rem;
  border-radius: 0.5rem;
  font-size: 1.15rem;
  color: var(--white-color);
  z-index: var(--z-tooltip);
  transition: 0.4s;
}
.scrollup:hover {
  transform: translateY(-0.25rem);
}
/* Show Scroll Up*/
.show-scroll {
  bottom: 3rem;
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 320px) {
  .container {
    margin-left: 1rem;
    margin-right: 1rem;
  }
  .offer__img {
    width: 300px;
  }
  .offer__container {
    grid-template-rows: max-content 180px;
  }
  .logos__container {
    gap: 2.5rem;
  }
}
/* For medium devices */
@media screen and (min-width: 576px) {
  .about__group {
    width: 350px;
    justify-content: center;
  }
  .offer__container {
    grid-template-rows: initial;
    grid-template-columns: 0.5fr;
    justify-content: center;
  }
  .offer__img {
    position: relative;
    bottom: initial;
    right: initial;
  }
}
@media screen and (min-width: 767px) {
  .section {
    padding: 7rem 0 2rem;
  }
  .nav {
    height: calc(var(--header-height)) + 1.5rem;
  }
  .nav__toggle,
  .nav__close {
    display: none;
  }
  .nav__list {
    flex-direction: row;
    column-gap: 3rem;
    padding-top: 10px;
  }
  .nav__link {
    font-size: var(--normal-font-size);
    text-transform: initial;
  }
  .about__container {
    grid-template-columns: repeat(2, 1fr);
  }
  .logos__container {
    gap: 4rem 8rem;
  }
  .footer__container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* For large devices */
@media screen and (min-width: 1040px) {
  .container {
    margin-left: auto;
    margin-right: auto;
  }
  .shape__big {
    height: 500px;
    width: 500px;
  }
  .shape__small {
    width: 400px;
    height: 400px;
  } /* Missing closing bracket added here */
  .home__container {
    padding-top: 2rem;
  }
  .home__img {
    width: 480px;
  }
  .home__car {
    column-gap: 7rem;
  }
  .about__container {
    column-gap: 6rem;
    align-items: center;
  }
  .about__group,
  .about__img {
    width: 380px;
  }
  .about__card {
    width: 198px;
    padding: 1rem 1.25rem;
  }
  .about__card-description {
    margin-bottom: 4rem;
    margin-right: 3rem;
  }
  .popular__container {
    width: 985px;
    padding-top: 3rem;
  }
  .popular__card {
    width: 258px;
    border-radius: 1.25rem;
    margin-bottom: 5rem;
  }
  .popular__img {
    width: 180px;
    margin: 0.75rem 0 1.25rem 2rem;
  }
  .offer__container {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 5rem;
    align-items: center;
    padding-bottom: 2rem;
  }
  .offer__data,
  .offer__title {
    text-align: initial;
  }
  .offer__data {
    margin-bottom: 0;
  }
  .offer__description {
    padding-right: 6rem;
  }
  .offer__img {
    width: 550px;
  }
  .logos__container {
    grid-template-columns: repeat(5, max-content);
  }
  .logos__img {
    width: 60px;
  }
  .footer__container {
    grid-template-columns: repeat(2, max-content);
    justify-content: space-between;
  }
  .footer__logo {
    column-gap: 0.5rem;
  }
  .footer__title {
    margin-bottom: 1.5rem;
  }
  .footer__links {
    row-gap: 0.75rem;
  }
  .footer__social-link {
    font-size: 1.5rem;
  }
  .footer__copy {
    margin-top: 8rem;
    padding-bottom: 1rem;
  }
}
/* Style inputs */
input[type="text"],
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  margin-top: 6px;
  margin-bottom: 16px;
  resize: vertical;
}

input[type="submit"] {
  background-color: #e90f2c;
  color: white;
  padding: 12px 20px;
  border: none;
  cursor: pointer;
}

input[type="submit"]:hover {
  background-color: #e90f2c;
}

/* Style the container/contact section */
.containers {
  border-radius: 5px;
  background-color: #f2f2f2;
  padding: 10px;
}

/* Create two columns that float next to eachother */
.column {
  float: left;
  width: 50%;
  margin-top: 6px;
  padding: 20px;
}

/* Clear floats after the columns */
.row:after {
  content: "";
  display: table;
  clear: both;
}

/* Responsive layout - when the screen is less than 600px wide, make the two columns stack on top of each other instead of next to each other */
@media screen and (max-width: 600px) {
  .column,
  input[type="submit"] {
    width: 100%;
    margin-top: 0;
  }
}

/* Services section */
.services {
  text-align: center;
  padding: 40px 20px;
}

.service_main_title {
  font-size: var(--h3-font-size);
  margin-bottom: 30px;
}

.service-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.service {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 30%;
  min-width: 250px; /* Ensures it maintains a reasonable size on smaller screens */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease-out, transform 1s ease-out;
  text-align: center;
}
.service.show {
  opacity: 1;
  transform: translateY(0);
}

.service img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.service_title {
  font-size: var(--h2-font-size);
  margin: 20px 0;
}

.service_description {
  font-size: var(--small-font-size);
  margin: 0 15px 15px;
  padding: 0 10px; /* Add padding for better readability */
  line-height: 1.5;
  text-align: left;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .service-container {
    justify-content: space-around;
  }

  .service {
    width: 45%;
  }
}

@media (max-width: 768px) {
  .service-container {
    flex-direction: column;
    align-items: center;
  }

  .service {
    width: 80%;
  }
}
.service_title {
  margin-bottom: 0.25rem;
  margin-top: 5.5rem;
}
