/* ==========================================================
   Auto Sem Limites – single page
   ========================================================== */
:root {
  --red: #dd3125;
  --red-dark: #b9251b;
  --dark: #3f3f3f;
  --grey: #6b6b6b;
  --light: #e1e1e1;
  --black: #111;
  --footer: #262626;
  --text: #333;
  --container: 962px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Lato', Arial, sans-serif;
  font-size: 16px;
  color: var(--text);
  background: #fff;
  line-height: 1.35;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Faixa superior ---------- */
.topstripe { display: flex; height: 8px; }
.topstripe span:nth-child(1) { flex: 0 0 34.6%; background: var(--red); }
.topstripe span:nth-child(2) { flex: 0 0 15.7%; background: #ddd; }
.topstripe span:nth-child(3) { flex: 0 0 31.6%; background: #555; }
.topstripe span:nth-child(4) { flex: 1; background: var(--red); }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}
.header-inner {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 171px;
  overflow: hidden;
}
/* Padrão xadrez (bandeira) no canto superior direito */
.header-inner::before {
  content: "";
  position: absolute;
  right: 0; top: 0;
  width: 380px; height: 122px;
  background:
    repeating-conic-gradient(#d5d5d5 0 25%, transparent 0 50%) 0 0 / 120px 120px;
  transform: skewX(-12deg);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 40%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 40%);
  opacity: .85;
  pointer-events: none;
}
.logo { position: relative; z-index: 1; padding-bottom: 32px; }
.logo img { width: 220px; height: auto; }

.header-right {
  position: relative; z-index: 1;
  flex: 1;
  display: flex; flex-direction: column; align-items: flex-end;
  align-self: stretch; justify-content: space-between;
}
.header-contacts {
  font-size: 13px;
  padding-top: 6px;
  color: #333;
}
.header-contacts a:hover { color: var(--red); }

.main-nav {
  width: 100%;
  border-top: 2px solid #555;
  margin-left: 2px;
}
.main-nav ul {
  list-style: none;
  display: flex;
  justify-content: flex-end;
}
.main-nav a {
  display: block;
  padding: 18px 24px 17px;
  font-size: 14px;
  white-space: nowrap;
  color: #333;
  transition: background .2s, color .2s;
}
.main-nav a:hover { color: var(--red); }
.main-nav a.active { background: var(--red); color: #fff; }

.menu-toggle {
  display: none;
  background: var(--red); color: #fff;
  border: 0; border-radius: 3px;
  width: 44px; height: 40px;
  font-size: 20px; cursor: pointer;
  margin-bottom: 16px;
}

/* ---------- Hero ---------- */
.hero { background: var(--light); }
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 332px;
  gap: 32px;
  padding: 0;
}
.hero-image img { width: 100%; height: 432px; object-fit: cover; background: #999; }
.hero-facebook { position: relative; background: #fff; height: 432px; overflow: hidden; }
.hero-facebook iframe { position: relative; z-index: 1; width: 100%; height: 100%; border: 0; display: block; }
.fb-fallback {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; padding: 24px; color: #333;
}
.fb-fallback i { font-size: 56px; color: #1877f2; }
.fb-fallback strong { font-size: 20px; }
.fb-fallback span { font-size: 14px; color: #666; }
.fb-fallback em {
  font-style: normal; margin-top: 8px;
  background: #1877f2; color: #fff; padding: 8px 16px; border-radius: 4px; font-size: 14px;
}

/* ---------- Títulos de secção ---------- */
.section-title {
  text-align: center;
  padding: 18px 16px 16px;
  border-bottom: 4px solid #fff;
  scroll-margin-top: 80px;
}
.section-title h2 { font-weight: 400; font-size: 30px; color: #fff; letter-spacing: .5px; }
.section-title.dark { background: var(--dark); }
.section-title.red  { background: var(--red); }

/* ---------- Quem Somos ---------- */
.about { background: var(--grey); color: #fff; padding: 22px 0 30px; }
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.about-text p { text-align: justify; margin-bottom: 12px; font-size: 16.5px; }
.about-image img { width: 100%; height: auto; }

/* ---------- Serviços ---------- */
.services {
  display: grid;
  grid-template-columns: minmax(420px, 44.3%) 1fr;
  min-height: 395px;
  border-bottom: 8px solid var(--red);
}
.services-left {
  background: var(--black);
  display: flex; justify-content: flex-end;
  position: relative; overflow: hidden;
}
/* Faixas inclinadas em xadrez por trás da lista */
.services-left::before {
  content: "";
  position: absolute;
  right: 30px; top: 22px; bottom: 12px;
  width: 400px;
  background: repeating-conic-gradient(#2b2b2b 0 25%, #1a1a1a 0 50%) 0 0 / 140px 140px;
  transform: skewX(-14deg);
}
.services-list {
  position: relative;
  list-style: none;
  padding: 30px 40px 30px 0;
  width: 400px;
  max-width: 100%;
}
.services-list li {
  font-family: 'Saira', 'Lato', sans-serif;
  font-style: italic;
  font-size: 31px;
  color: #fff;
  line-height: 1.3;
  display: flex; align-items: center; gap: 18px;
  white-space: nowrap;
}
.services-list li i {
  font-style: normal;
  width: 30px; text-align: center;
  font-size: 22px; color: #eee;
}
.services-list strong { font-weight: 700; font-size: 1.15em; }
.services-right {
  background: #444 url("../images/servicos.jpg") center / cover no-repeat;
}

/* ---------- Marcas ---------- */
.brands { padding: 22px 0 20px; text-align: center; scroll-margin-top: 80px; }
.brands h2 { font-weight: 400; font-size: 30px; color: #444; margin-bottom: 16px; }
.brands-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px 20px;
  align-items: center;
  justify-items: center;
}
.brands-grid img {
  max-height: 140px; max-width: 160px;
  object-fit: contain;
  filter: grayscale(0);
  transition: transform .25s;
}
.brands-grid img:hover { transform: scale(1.06); }

/* ---------- Contactos ---------- */
.contacts { background: var(--footer); color: #fff; padding: 22px 0 32px; }
.contacts-inner {
  display: grid;
  grid-template-columns: 1fr 332px;
  gap: 28px;
}
.map a { position: relative; display: block; }
.map img { width: 100%; height: auto; }
.map-cta {
  position: absolute; right: 12px; bottom: 12px;
  background: var(--red); color: #fff;
  font-size: 13px; padding: 8px 12px; border-radius: 3px;
  opacity: 0; transform: translateY(6px);
  transition: opacity .25s, transform .25s;
}
.map a:hover .map-cta, .map a:focus .map-cta { opacity: 1; transform: none; }
.contact-info h3 { font-weight: 400; font-size: 31px; margin-bottom: 10px; }
.contact-info p { font-size: 17px; margin-bottom: 9px; }
.contact-info a:hover { color: var(--red); }
.contact-info .social-title { margin-top: 36px; }
.social-link { font-size: 42px; display: inline-block; transition: color .2s; }
.social-link:hover { color: var(--red); }

/* ---------- Rodapé ---------- */
.site-footer { background: #111; color: #fff; font-size: 13px; padding: 30px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.credits a:hover { color: var(--red); }

.back-to-top {
  position: fixed; right: 40px; bottom: 40px;
  width: 46px; height: 46px;
  background: var(--red); color: #fff;
  display: grid; place-items: center;
  border-radius: 3px; font-size: 18px;
  opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s, background .2s;
  z-index: 200;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--red-dark); }

/* ==========================================================
   Responsivo
   ========================================================== */
@media (max-width: 960px) {
  .main-nav a { padding: 16px 14px; font-size: 13px; }
  .services { grid-template-columns: 1fr; }
  .services-left { justify-content: center; }
  .services-left::before { right: 50%; transform: translateX(50%) skewX(-14deg); }
  .services-list { padding: 30px 20px; width: auto; }
  .services-right { min-height: 280px; }
}

@media (max-width: 780px) {
  .header-inner { min-height: 0; align-items: center; padding-top: 10px; padding-bottom: 10px; }
  .header-inner::before { display: none; }
  .logo { padding-bottom: 0; }
  .logo img { width: 160px; }
  .header-contacts { display: none; }
  .header-right { justify-content: center; align-self: center; }
  .menu-toggle { display: block; margin: 0; }
  .main-nav {
    display: none;
    position: fixed; left: 0; right: 0; top: 96px;
    background: #fff; border-top: 2px solid var(--red);
    box-shadow: 0 8px 20px rgba(0,0,0,.15);
    margin: 0;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: 14px 20px; border-bottom: 1px solid #eee; }

  .hero-inner, .about-inner, .contacts-inner { grid-template-columns: 1fr; }
  .hero-inner { gap: 0; }
  .hero-image img { height: 260px; }
  .hero-facebook { height: 430px; max-width: 500px; width: 100%; margin: 0 auto; }

  .section-title h2, .brands h2 { font-size: 24px; }
  .services-list li { font-size: 24px; gap: 12px; }
  .brands-grid { grid-template-columns: repeat(2, 1fr); }
  .brands-grid img { max-height: 100px; max-width: 130px; }

  .map-cta { opacity: 1; transform: none; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .back-to-top { right: 16px; bottom: 16px; }
}
