/* Pereiras – Reparação de Automóveis, Lda
   Folha de estilos única, sem dependências externas. */

:root {
  --bg: #ffffff;
  --soft: #f3f4f6;
  --ink: #14181f;
  --muted: #5b6472;
  --line: #e3e6ea;
  --brand: #c8102e;
  --brand-dark: #a30d25;
  --dark: #0f141b;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(15, 20, 27, .10);
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.section { padding: 72px 0; }
.section.soft { background: var(--soft); }
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 12px;
}

/* Botões */
.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { border-color: #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--dark); }
.btn-dark { border-color: var(--ink); color: var(--ink); }
.btn-dark:hover { background: var(--ink); color: #fff; }

/* Cabeçalho */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo img { height: 44px; width: auto; }
.nav { display: flex; gap: 6px; }
.nav a {
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  color: var(--muted);
}
.nav a:hover { color: var(--ink); background: var(--soft); }
.nav a[aria-current="page"] { color: var(--brand); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* Hero */
.hero {
  position: relative;
  color: #fff;
  background: var(--dark) url("../images/hero.jpg") center / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 20, 27, .88) 0%, rgba(15, 20, 27, .55) 60%, rgba(15, 20, 27, .35) 100%);
}
.hero .container { position: relative; padding: 120px 0 130px; }
.hero .eyebrow { color: #ff8a9b; }
.hero p { max-width: 560px; font-size: 1.15rem; color: #e6e9ee; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Historial */
.grid-2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.cards { display: grid; gap: 16px; }
.info-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.info-card h3 { margin-bottom: .3em; }
.info-card p { margin: 0; color: var(--muted); }

/* Galeria */
.gallery { margin-top: 28px; }
.gallery-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--dark);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.gallery-stage img { width: 100%; height: 100%; object-fit: cover; }
.gallery-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 36px 20px 16px;
  color: #fff;
  font-weight: 600;
  background: linear-gradient(transparent, rgba(0, 0, 0, .7));
}
.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
}
.gallery-counter { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted); }
.gallery-buttons { display: flex; gap: 8px; }
.gallery-buttons button {
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.gallery-buttons button:hover { border-color: var(--brand); color: var(--brand); }
.thumbs { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.thumbs button {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  background: none;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  opacity: .65;
}
.thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.thumbs button[aria-current="true"] { border-color: var(--brand); opacity: 1; }
.thumbs button:hover { opacity: 1; }

/* Serviços */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.service img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--soft); }
.service-body { padding: 20px 22px 24px; }
.service-num { font-size: .85rem; font-weight: 700; color: var(--brand); letter-spacing: .1em; }
.service-body h2, .service-body h3 { margin: 4px 0 8px; font-size: 1.3rem; }
.service-body p { margin: 0; color: var(--muted); }
.page-title { padding: 56px 0 8px; }
.page-title h1 { margin: 0; }

/* Contactos */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.contact-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.contact-item dt { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.contact-item dd { margin: 0; font-size: 1.1rem; font-weight: 600; }
.contact-item a { text-decoration: none; }
.contact-item a:hover { color: var(--brand); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.map-wrap {
  margin-top: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.map-wrap iframe { width: 100%; height: 400px; border: 0; display: block; }

/* Rodapé */
.site-footer { background: var(--dark); color: #b9c0cb; padding: 28px 0; font-size: .92rem; }
.site-footer a { color: #fff; text-decoration: none; }

/* Responsivo */
@media (max-width: 860px) {
  .grid-2 { grid-template-columns: 1fr; gap: 24px; }
  .services { grid-template-columns: 1fr 1fr; }
  .thumbs { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 640px) {
  .section { padding: 48px 0; }
  .hero .container { padding: 80px 0 90px; }
  .services { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px;
  }
  .nav.open { display: flex; }
  .map-wrap iframe { height: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
