/* Reset geral */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  font-family: "Arial", sans-serif;
  font-size: 62.5%;
  scroll-behavior: smooth;
}

/* Fundo geral e cores */
body {
  font-size: 1.8rem;
  background-color: #f4f4f4;
  color: #333;
  text-align: center;
}

section {
  margin: 4rem auto 0;
  padding: 3rem;
  width: 80%;
  max-width: 80%;
  border-radius: 12px;
  box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
  text-align: left;
  h2 {
    padding-bottom: 2rem;
  }
  &:not(#descricao, #contato) {
    h2 {
      padding-bottom: 0;
      & + p {
        padding-bottom: 2rem;
        text-align: right;
        text-transform: lowercase;
        font-style: italic;
        font-size: smaller;
      }
    }
  }

  article:not(:first-child) {
    margin-top: 3rem;
  }
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: orangered;
}

/* ===== HEADER COM IMAGEM DE FUNDO ===== */
header {
  position: relative;
  /* prettier-ignore */
  background: url("./images/frente-45-esquerda.jpg") center/cover no-repeat rgba(0, 0, 0, 0.5);
  background-blend-mode: multiply;
  color: #fff;
  padding: 5rem 2rem;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  h1 {
    font-size: 4.5rem;
    font-weight: bold;
  }
  h2 {
    font-size: 3.5rem;
    margin-top: 1rem;
    text-shadow: 0 0 15px limegreen;
  }
  h3 {
    font-size: 2.4rem;
    margin-top: 1rem;
  }
  .header__description {
    margin: 3rem auto 0;
    width: 80%;
    font-size: 1.6rem;
    background: rgba(0, 0, 0, 0.5);
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 5px;
    padding: 3rem;
    p:not(:first-child) {
      margin-top: 1.5rem;
    }
  }
  .header__scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    a {
      color: orange;
    }
  }
}

/* ===== SEÇÃO DE DESCRIÇÃO ===== */
.car-description {
  p {
    font-size: 1.8rem;
    line-height: 1.6;
    color: #444;
  }
  ul {
    list-style: disc;
    li {
      margin-left: 1.6rem;
    }
  }
  .notas {
    font-size: smaller;
    font-style: italic;
    text-align: right;
    line-height: normal;
  }
}

.car-details {
  transition: transform 0.3s;
  &:hover {
    transform: scale(1.02);
  }
}

/* ===== GALERIA DE IMAGENS ===== */

.car-gallery {
  box-shadow: none;
  ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    width: 125%;
    transform: translateX(-10%);
  }
  figure {
    position: relative;
    opacity: 0.85;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
    border-radius: 12px;
    overflow: hidden;
    img {
      display: block;
      max-width: 320px;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    figcaption {
      display: none;
      position: absolute;
      margin: 0;
      padding: 1rem 0;
      bottom: 0;
      left: 0;
      text-align: center;
      font-size: 1.2rem;
      font-weight: bold;
      width: 100%;
      background-color: hsla(0, 0%, 0%, 0.5);
      color: white;
    }
    &:hover {
      transform: scale(1.05);
      box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.4);
      opacity: 1;
      & figcaption {
        display: block;
      }
    }
  }
}

/* ===== SEÇÃO DE VÍDEO ===== */
.car-video {
  box-shadow: none;
  iframe {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
    opacity: 0.85;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s, opacity 0.3s;
    &:hover {
      transform: scale(1.08);
      box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.4);
      opacity: 1;
    }
  }
}
/* ===== SEÇÃO DETALHES ===== */
.car-details {
  li:not(:first-child) {
    padding-top: 0.5rem;
  }
}

/* ===== SEÇÃO ITENS DE SERIE ===== */
.car-features {
  .car-features-group {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 0 1.6rem;

    box-shadow: none;
    h3 {
      color: #002244;
      font-size: 1.6rem;
      padding-bottom: 0.5rem;
    }
    .car-features__list {
      display: flex;
      width: 100%;
      gap: 1rem;
      flex-wrap: wrap;
      justify-content: center;
      ul {
        flex: 1;
        list-style: disc;
        padding-left: 1.6rem;
        li {
          font-size: 1.4rem;
          text-wrap: nowrap;
        }
      }
    }
  }
  .features__credit {
    font-size: 1.2rem;
    font-style: italic;
    width: fit-content;
    margin-left: auto;
    text-align: right;
  }
}

/* ===== BOTÃO DE CONTATO ===== */
.contact {
  background: linear-gradient(45deg, #002244, #004488);
  padding: 3rem;
  color: white;
  margin: 3rem auto;
  width: 80%;
  border-radius: 12px;
  text-align: center;
  h2 {
    color: white;
  }
  p {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }
  .btn {
    background: #ff9900;
    color: white;
    padding: 15px 25px;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    border-radius: 8px;
    transition: background 0.3s ease, transform 0.2s;
    display: inline-block;
    &:hover {
      background: #cc7a00;
      transform: scale(1.05);
    }
  }
}

/* ===== RODAPÉ ===== */
footer {
  background: #001122;
  color: white;
  padding: 15px;
  text-align: center;
  font-size: 16px;
  margin-top: 4rem;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
  section {
    width: 90%;
    max-width: 90%;
  }
  .car-gallery ul {
    flex-direction: column;
    align-items: center;
    img:hover {
      transform: scale(1.18);
    }
  }
  .car-features__list {
    flex-direction: column;
    /* gap: 0rem !important; */
    li {
      text-wrap: wrap !important;
    }
  }
  .car-video iframe {
    height: 300px;
  }
  .contact .btn {
    width: 100%;
  }
}
