/* === UNIFIED STYLES + DARK MODE (v5) === */
:root {
  --bg:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --brand:#111827;
  --card:#f8fafc;
  --card-border:#e2e8f0;
  --ring:#0ea5e9;
  --accent:#0ea5e9;
  color-scheme: light dark;
}

*{box-sizing:border-box}
body{
  margin:0; 
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,Helvetica,sans-serif; 
  color:var(--text); 
  background:var(--bg); 
  line-height:1.5
}

/* Header */
.header{
  position:sticky; 
  top:0; 
  z-index:10; 
  background:var(--bg); 
  border-bottom:1px solid var(--card-border); 
  text-align:center; 
  padding:12px 0
}

.logo-img{height:100px; display:inline-block} /* logo maior em todas as páginas */
.nav-tabs{display:flex; justify-content:center; gap:40px}
.nav-tabs a{
  display:inline-block; 
  padding:8px 0; 
  text-decoration:none; 
  color:var(--brand); 
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,Helvetica,sans-serif; 
  font-size:1.15rem; 
  font-weight:700; 
  letter-spacing:.3px
}
.nav-tabs a:hover{color:var(--accent)}

/* Layout */
.wrap{max-width:1100px; margin:24px auto 56px; padding:0 16px}
.page-title{text-align:center; font-size:clamp(24px, 2.4vw + 12px, 40px); margin:24px 0 16px; letter-spacing:.2px}
.lead{text-align:center; color:var(--muted); margin-bottom:24px}

/* Grids */
.products-grid, .services-grid, .grid-container {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* <--- mais flexível */
  justify-content: center;
  max-width: 1400px; /* mais largura total */
  margin: 0 auto;
}.product-card, .service-card, .grid-item{
  width:260px; 
  background:var(--card); 
  border:1px solid var(--card-border); 
  border-radius:16px; 
  overflow:hidden; 
  text-decoration:none; 
  color:inherit; 
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease; 
  display:flex; 
  flex-direction:column
}
.product-card:hover, .service-card:hover, .grid-item:hover{
  transform:translateY(-2px); 
  box-shadow:0 8px 24px rgba(2,6,23,.08); 
  border-color:#cbd5e1
}
.card-media{aspect-ratio:16/10; width:100%; object-fit:cover; background:var(--card-border)}
.card-body{padding:14px 14px 16px; display:flex; flex-direction:column; gap:8px}
.card-title{margin:0; font-weight:700; font-size:1.05rem; letter-spacing:.2px}
.card-desc,.card-meta{font-size:1rem; color:var(--muted)}

/* Filters */
.filters{
  display:flex; flex-wrap:wrap; justify-content:center; 
  align-items:center; gap:12px 16px; margin:8px 0 28px
}
.select{
  min-width:220px; padding:10px 12px; border:1px solid var(--card-border); 
  border-radius:12px; background:var(--card); color:var(--text); 
  font-size:.95rem; outline:none; 
  transition:border-color .15s ease, box-shadow .15s ease
}
.select:focus{border-color:var(--accent); box-shadow:0 0 0 3px rgba(14,165,233,.25)}

/* Gallery (listagem) */
.gallery-grid{
  display:grid; gap:20px; 
  grid-template-columns:repeat(auto-fit, minmax(240px, 260px)); 
  justify-content:center; 
  padding:0 16px 32px; 
  margin-top:40px /* mais espaço após hr */
}
.gallery-grid img{
  width:260px; aspect-ratio:16/10; object-fit:cover; display:block; 
  background:var(--card-border); 
  border:1px solid var(--card-border); 
  border-radius:16px; 
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease; 
  cursor:pointer
}
.gallery-grid img:hover{
  transform:translateY(-2px); 
  box-shadow:0 8px 24px rgba(2,6,23,.08); 
  border-color:#cbd5e1
}
main hr{margin:24px 0 40px}

/* Lightbox */
.lightbox-overlay{position:fixed; inset:0; background:rgba(0,0,0,.8); display:none; align-items:center; justify-content:center; z-index:1000; padding:24px}
.lightbox-overlay.active{display:flex}
.lightbox-content{max-width:min(1000px, 92vw); max-height:90vh}
.lightbox-content img{width:100%; height:auto; display:block; border-radius:12px}
.lightbox-close{position:absolute; top:16px; right:16px; background:rgba(255,255,255,.15); color:#fff; border:1px solid rgba(255,255,255,.35); padding:8px 12px; border-radius:10px; font-weight:600; cursor:pointer}

/* Contact */
.contact-wrap{display:grid; grid-template-columns:1fr; gap:24px}
@media (min-width:900px){.contact-wrap{grid-template-columns:1fr 1.2fr; align-items:start}}
.contact-card{background:var(--card); border:1px solid var(--card-border); border-radius:16px; padding:16px 18px}
.contact-item{display:grid; grid-template-columns:36px 1fr; align-items:start; gap:12px; padding:12px 2px; border-bottom:1px dashed var(--card-border)}
.contact-item:last-child{border-bottom:0}
.contact-item .icon{width:28px; height:28px; margin-top:2px; opacity:.85}
.map-embed{aspect-ratio:16/10; width:100%; border:0; border-radius:16px; background:var(--card-border)}
.btn-primary, .btn-contact{
  display:inline-block; margin-top:20px; padding:12px 20px; border-radius:12px; 
  background:var(--accent); color:#fff; font-weight:700; text-decoration:none; text-align:center; 
  transition:filter .15s ease
}
.btn-primary:hover, .btn-contact:hover{filter:brightness(.95)}

/* === Dark mode (prefers-color-scheme) === */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:#282828;
    --text:#f1f5f9;
    --muted:#94a3b8;
    --brand:#f8fafc;
    --card:#141414;
    --card-border:#646464;
    --ring:#38bdf8;
    --accent:#38bdf8;
  }
}

/* About */
.about-img {
  max-width: 600px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 24px;
  border-radius: 12px;
}
.about-text {
  padding: 0 60px;
}

/* === Galeria (serviços & produtos) === */
.product-image-gallery{
  max-width: 980px;
  margin: 16px auto 32px;
  text-align: center;
}
.product-image-gallery #mainImage,
.product-image-gallery .main-image,
.product-image-gallery .mainImage {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 12px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.product-image-gallery .thumbnail-container,
.product-image-gallery .thumbnail-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.product-image-gallery .thumbnail,
.product-image-gallery .thumbnail-container img,
.product-image-gallery .thumbnail-row img {
  width: 80px !important;
  height: 80px !important;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s ease, border-color .15s ease;
}
.product-image-gallery .thumbnail:hover,
.product-image-gallery .thumbnail-container img:hover,
.product-image-gallery .thumbnail-row img:hover {
  transform: scale(1.05);
  border-color: var(--accent);
}
.product-image-gallery .thumbnail.is-active {
  border-color: var(--accent);
  transform: scale(1.02);
}

/* Layout 2 colunas no serviço */
.service-detail{
  display:grid;
  grid-template-columns: 1.1fr 1fr; /* texto | galeria */
  gap: 24px;
  align-items: start;
  margin-top: 8px;
}
@media (max-width: 900px){
  .service-detail{ grid-template-columns: 1fr; }
}

/* Galeria (serviços & produtos) */
.product-image-gallery{
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.product-image-gallery #mainImage,
.product-image-gallery .main-image,
.product-image-gallery .mainImage{
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 12px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.product-image-gallery .thumbnail-container,
.product-image-gallery .thumbnail-row{
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
}
.product-image-gallery .thumbnail,
.product-image-gallery .thumbnail-container img,
.product-image-gallery .thumbnail-row img{
 pointer-events: auto;
  width:80px !important;
  height:80px !important;
  object-fit:cover;
  border-radius:8px;
  cursor:pointer;
  border:2px solid transparent;
  transition:transform .15s ease, border-color .15s ease;
}
.product-image-gallery .thumbnail:hover,
.product-image-gallery .thumbnail-container img:hover,
.product-image-gallery .thumbnail-row img:hover{
  transform:scale(1.05);
  border-color:var(--accent);
}
.product-image-gallery .thumbnail.is-active{
  border-color:var(--accent);
  transform:scale(1.02);
}

/* === Homepage Quote Styling === */
.quote.large-quote {
  display: block;
  text-align: center;
  font-size: 2.2rem;       /* Increase this for a bigger quote (try 2.5rem or 3rem) */
  font-weight: 600;        /* Makes it bolder */
  font-style: italic;      /* Optional — gives it a refined look */
  color: var(--text);      /* Keeps it consistent with theme */
  margin-top: 10px;        /* Space below the logo */
  letter-spacing: 0.5px;   /* Slight spacing for elegance */
}

/* Responsive adjustment for smaller screens */
@media (max-width: 600px) {
  .quote.large-quote {
    font-size: 1.6rem;     /* Slightly smaller on phones */
  }
}

/* === Ajustes para mobile (até ~768px) === */
@media (max-width: 768px) {

  /* Header mais compacto */
  .header {
    padding: 8px 0;
  }

  .logo-img {
    height: 80px; /* em vez dos 100px no mobile */
  }

  /* Menu: permitir quebrar linha e reduzir espaço */
  .nav-tabs {
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 8px;
  }

  .nav-tabs a {
    font-size: 0.95rem;
    padding: 4px 0;
  }

  /* Conteúdo com menos margens laterais */
  .wrap,
  .main-content {
    padding: 0 12px;
    margin: 16px auto 40px;
  }

  .page-title {
    font-size: 1.6rem;
    margin-top: 16px;
  }

  /* Grelha de PRODUTOS e SERVIÇOS: 2 colunas no mobile */
  .products-grid,
  .services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 10px;
    row-gap: 10px;   /* menos espaço entre linhas */
  }

  /* MUITO IMPORTANTE: tirar larguras fixas dos cards no mobile */
  .service-card,
  .product-card {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
  }
  
    /* E se houver algo tipo “flex: 0 0 320px” em desktop,
     isto garante que no mobile podem encolher */
  .services-grid > .service-card,
  .products-grid > .product-card {
    flex: 1 1 auto !important;
  }
  
  /* GALERIA continua 1 coluna */
  .gallery-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  /*  CARDS DE SERVIÇOS — deixar mais pequenos */
  .service-card {
    padding: 6px !important;        /* reduzir padding */
    border-radius: 8px;
  }

  .service-card .card-media {
    width: 100%;
    height: 130px !important;        /* altura menor */
    object-fit: cover !important;    /* corta sem distorcer */
    border-radius: 6px;
    margin-bottom: 4px;
  }

  .service-card .card-body {
    padding: 0 !important;             /* se tiver padding no desktop, anulamos aqui */
  }
  
  .service-card .card-title {
    font-size: 0.8rem !important;
    margin-bottom: 3px;
  }

  .service-card .card-desc {
    font-size: 0.7rem !important;   /* texto menor */
    line-height: 1.3;
    margin-bottom: 4px;
  }

  .service-card .pill {
    font-size: 0.65rem !important;
    padding: 1px 5px;
  }

  /* 👉 CARDS DE PRODUTOS — também mais compactos no mobile */
  .product-card {
    padding: 6px;
  }

  .product-card img {
    height: 130px;       /* altura menor */
    object-fit: cover;
    border-radius: 6px;
  }

  .product-card h3 {
    font-size: 0.9rem;
    margin-top: 4px;
  }

  .product-card p {
    font-size: 0.75rem;
  }

  /* Secções 2 colunas (texto + imagem) passam a 1 coluna */
  .service-detail {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .product-image-gallery {
    max-width: 100%;
    margin-top: 12px;
  }

  /* Texto de descrição um pouco mais pequeno no telemóvel */
  .service-text p,
  .product-info p {
    font-size: 0.95rem;
  }

  /* Quote da home um bocadinho mais pequena */
  .home .quote.large-quote {
    font-size: 1.8rem;
    margin-top: 8px;
  }
}

.header{
  position:sticky; 
  top:0; 
  z-index:10; 
  background:var(--bg); 
  border-bottom:1px solid var(--card-border); 
  text-align:center; 
  padding:12px 0
}
