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

/* =========================
   BODY
========================= */
body {
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  background-color: #000;
  color: #fff;
  line-height: 1.6;
  font-size: 16px;
  display: flex;
  flex-direction: column;
}

/* =========================
   CONTAINER
========================= */
.container {
  background-color: #fff;
  color: #000;
  width: 100%;
  margin: 0 auto;
  overflow-x: hidden;
}

/* =========================
   TOPBAR
========================= */
#topbar {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* =========================
   HERO
========================= */
#hero {
  padding: 60px 80px;
  text-align: center;
}

#composites {
  font-weight: bold;
  font-size: clamp(30px, 7vw, 48px);
  letter-spacing: 3px;
  line-height: 1;
}

#design_and_manufacture {
  font-size: 16px;
  opacity: 0.7;
  margin-top: 8px;
}

/* =========================
   IMAGE GRID
========================= */
.image_container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 60px 0;
  height: 420px;
}

.standard,
.double > div {
  background-size: cover;
  background-position: center;
  border-radius: 10px;
}

.double {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 20px;
}

/* =========================
   DEMO IMAGES
========================= */
.img-1 { background-image: url("../images/cars/Buggy_001.jpg"); }
.img-2 { background-image: url("../images/cars/M8_002.jpg"); }
.img-3 { background-image: url("../images/cars/ind_011.png"); }
.img-4 { background-image: url("../images/projects/subaru_project/Sub_003.jpg"); }
.img-5 { background-image: url("../images/cars/Meg_001.jpg"); }

/* =========================
   SERVICES
========================= */
#services {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
}

#services h1 {
  font-size: 16px;
  letter-spacing: 2px;
  transition: transform 0.3s ease;
}

/* =========================
   MAIN SECTION (VIDEO + TEXT)
========================= */
.main-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3rem;
  padding: 3rem 80px;
  background-color: #d8e2ec;
}

.video-container {
  flex: 1;
  max-width: 50%;
}

.video-container video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border-radius: 10px;
}

.text-container {
  flex: 1;
  max-width: 45%;
}

/* =========================
   SHARED TEXT SCALE
========================= */
.text-container h2,
.about h3,
.competing h3,
#clients h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.text-container p,
.about p,
.competing ul li,
.client-names span {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

/* =========================
   ABOUT
========================= */
.about {
  background-color: #fff;
  color: #000;
  min-height: 60vh;
  padding: 6rem 2rem;
  text-align: center;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.about p {
  max-width: 900px;
}

/* =========================
   COMPETING
========================= */
.competing {
  background-color: #fff;
  min-height: 55vh;
  padding: 6rem 2rem;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.competing ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
}

.competing ul li {
  margin: 0.5rem 1.5rem;
}

/* =========================
   CLIENTS
========================= */
#clients {
  background-color: #d8e2ec;
  min-height: 60vh;
  padding: 6rem 0;
  text-align: center;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.client-list {
  display: flex;
  overflow: hidden;
  width: 100%;
}

.client-names {
  display: flex;
  white-space: nowrap;
  animation: scrollClients 60s linear infinite;
}

.client-names span {
  margin-right: 2rem;
}

/* =========================
   ANIMATION
========================= */
@keyframes scrollClients {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* =========================
   DESKTOP ENHANCEMENTS
========================= */
@media (min-width: 901px) {

  .about h3,
  .competing h3,
  #clients h2 {
    font-size: 2.6rem;
  }

  .about p,
  .competing ul li,
  .client-names span {
    font-size: 1.25rem;
  }
}

/* =========================
   TABLET & MOBILE (≤ 900px)
========================= */
@media (max-width: 900px) {

  #topbar {
    margin-top: 0;
  }

  #services {
    flex-direction: column;
    gap: 1rem;
  }

  .image_container {
    display: none;
  }

  .main-section {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 0;
  }

  .video-container,
  .video-container video {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
  }

  /* 🔑 CENTERED TEXT CONTAINER FIX */
  .text-container {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem;
    text-align: center;

    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .about,
  .competing {
    min-height: auto;
    padding: 4.5rem 1.5rem;
  }

  #clients {
    padding: 4.5rem 0;
  }
}

/* =========================
   MOBILE (≤ 600px)
========================= */
@media (max-width: 600px) {

  body {
    font-size: 14px;
  }

  #hero {
    padding: 100px 16px;
  }

  #composites {
    font-size: 7vw;
    letter-spacing: 1px;
  }

  #design_and_manufacture {
    font-size: 12px;
  }

  .text-container h2,
  .about h3,
  .competing h3,
  #clients h2 {
    font-size: 1.3rem;
  }

  .text-container p,
  .about p,
  .competing ul li,
  .client-names span {
    font-size: 0.95rem;
  }

  .text-container {
    max-width: 100%;
    padding: 1.25rem 1rem;
  }

  .about,
  .competing {
    padding: 3.5rem 1rem;
  }

  #clients {
    padding: 3.5rem 0;
  }
}
