/* ==========================================================================
   Óticas Alto Estilo — CSS Global (Navbar fixa + Modo Escuro + Fundo em todas as páginas)
   ========================================================================== */

:root {
  --brand: #0055a5;   /* Azul primário */
  --accent: #ffd700;  /* Dourado */
  --text: #1f2937;    /* Cinza escuro (texto) */
  --card: #ffffff;
  --header: #ffffff;  /* Fundo da navbar */
  --shadow: 0 2px 10px rgba(0,0,0,.08);

  --bg-image: url('../img/Fundo da pagina/Fundo-pagina.jpg');
  --bg-overlay: rgba(255,255,255,.70); 
}

html.dark {
  --text: #e5e7eb;
  --card: #0f172a;
  --header: #0b1222;
  --shadow: 0 2px 12px rgba(0,0,0,.35);
  --bg-overlay: rgba(0,0,0,.60);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: linear-gradient(var(--bg-overlay), var(--bg-overlay)), var(--bg-image) center/cover fixed no-repeat;
}

.container { max-width: 1200px; margin: 0 auto; padding: 14px 20px; }
.fade-in { opacity: 0; transform: translateY(12px); animation: fadeIn .6s forwards; }
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }

/* ===== Header / Navbar ===== */
.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.1rem;
  font-weight: bold;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.logo-img {
  height: 100px;
  width: auto;
  display: block;
}

.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--header);
  box-shadow: var(--shadow);
}

.site-header .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

.menu-toggle {
  margin-left: auto; font-size: 1.6rem; background: transparent; border: 0;
  color: var(--brand); cursor: pointer; display: none;
}

.site-nav ul { list-style: none; display: flex; gap: 16px; }
.site-nav a {
  color: var(--brand); font-weight: 700;
  padding: 8px 10px; border-radius: 10px; display: inline-block;
  transition: background .2s ease, color .2s ease, transform .06s ease;
  text-decoration: none; /* remove linha */
  border-bottom: none;   /* garante que não apareça underline */
}
.site-nav a:hover { background: rgba(0,85,165,.10); transform: translateY(-1px); }
.site-nav a.active { background: var(--accent); color: #003a74 !important; }

.btn-orcamento {
  margin-left: 8px; padding: 10px 14px; border-radius: 12px;
  background: var(--accent); color: #003a74; font-weight: 800; white-space: nowrap;
  border: 0; cursor: pointer; transition: transform .06s ease, filter .2s ease;
  text-decoration: none; /* remove underline do link Orçamentos */
}
.btn-orcamento:hover { transform: translateY(-1px); filter: brightness(1.03); }

.theme-toggle {
  margin-left: 6px; border: 1px solid rgba(0,0,0,.08); background: transparent;
  color: var(--brand); padding: 8px 10px; border-radius: 10px; cursor: pointer; font-weight: 700;
}
html.dark .theme-toggle { border-color: rgba(255,255,255,.18); color: #e5e7eb; }

/* ===== Hero ===== */
.hero {
  padding: 64px 20px 24px;
}
.hero .container {
  background: rgba(255,255,255,.66);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px;
}
html.dark .hero .container { background: rgba(16,23,42,.5); }

.hero h1 { font-size: 2rem; margin-bottom: 8px; color: var(--brand); }
.hero p { font-size: 1.05rem; }

/* ===== Conteúdo ===== */
section.block { margin: 30px auto; }
section.block h2 { font-size: 1.6rem; margin-bottom: 12px; color: var(--brand); }

/* ===== Grid & Cards ===== */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(4,1fr); }
.card {
  background: var(--card); border-radius: 14px; padding: 14px; text-align: center;
  box-shadow: var(--shadow); overflow: hidden;
}
.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
}
.card p { font-weight: 700; }

/* ===== Listas ===== */
.list { display: grid; gap: 16px; }
.list-item { background: var(--card); padding: 18px; border-radius: 12px; box-shadow: var(--shadow); }
.list-item h3 { color: var(--brand); margin-bottom: 6px; }

/* ===== Formulários ===== */
form.form {
  max-width: 680px; margin: 20px auto; padding: 20px;
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow);
}
.form .row { margin-bottom: 12px; }
label { display: block; font-weight: 700; margin-bottom: 6px; }
input, textarea, select {
  width: 100%; padding: 12px; font-size: 1rem;
  border: 1px solid #cfcfcf; border-radius: 10px; background: #fff;
}
html.dark input, html.dark textarea, html.dark select { background: #0b1222; color: #e5e7eb; border-color: #23304c; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,85,165,.15); }

.btn, .btn-primary {
  display: inline-block; background: var(--brand); color: #fff; border: 0; cursor: pointer;
  padding: 12px 18px; border-radius: 10px; font-weight: 800; transition: transform .06s ease, filter .2s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.02); }

/* ===== Footer ===== */
footer {
  background: var(--header); margin-top: 40px; padding: 26px 20px;
  box-shadow: var(--shadow);
}
footer .grid-footer { display: grid; gap: 16px; grid-template-columns: repeat(3,1fr); max-width: 1200px; margin: 0 auto; }
footer h4 { color: var(--brand); margin-bottom: 8px; }
footer a { color: var(--brand); font-weight: 700; text-decoration: none; }
.copy { text-align: center; margin-top: 8px; color: #6b7280; }
html.dark .copy { color: #9aa5b1; }

/* ===== Responsividade ===== */
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2,1fr); }
  footer .grid-footer { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .card img { height: 200px; }
  .hero { padding: 40px 14px 20px; }

  /* Ajustes Header no Mobile */
  .site-header .row {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
  }

  .logo-img { height: 48px; }
  .logo { font-size: 1rem; gap: 4px; }

  .actions { display: flex; align-items: center; gap: 6px; }
  .btn-orcamento { font-size: 14px; padding: 6px 10px; border-radius: 8px; }
  .theme-toggle { padding: 6px 8px; font-size: 14px; }
  .menu-toggle { display: block; font-size: 22px; }

  /* Menu mobile */
  .site-nav {
    display: none;
    flex-direction: column;
    background: var(--header);
    padding: 12px;
    position: absolute;
    top: 60px;
    right: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    width: 200px;
  }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 10px; }
  .site-nav a { 
    display: block; 
    padding: 12px; 
    text-align: center; 
    font-size: 16px; 
    border-radius: 8px; 
    text-decoration: none; 
    border-bottom: none;
  }
  .site-nav a.active {
    background: var(--accent);
    color: #003a74 !important;
  }
}

/* ===== Redes Sociais (Instagram + WhatsApp) ===== */
.social-section {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
}

.social-section a {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  background: #111;
  border-radius: 50%;
  transition: 0.3s;
  text-decoration: none;
}

.instagram-btn { background: #E1306C; }
.instagram-btn:hover { background: #C13584; }

.whatsapp-btn { background: #25D366; }
.whatsapp-btn:hover { background: #1ebe57; }

@media (max-width: 760px) {
  .social-section {
    justify-content: center;
    gap: 12px;
    margin: 30px auto;
  }
  .social-section a {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
}

/* =========================
   Melhorias responsivas & UX
   (adicionadas automaticamente)
   ========================= */

/* Garante que não existam sublinhados no menu hambúrguer */
.site-nav a,
.site-nav a:link,
.site-nav a:visited {
  text-decoration: none !important;
  border-bottom: 0 !important;
}

/* Ajustes de menu mobile: evita linhas/bordas visuais indesejadas */
@media (max-width: 760px) {
  .site-nav ul li {
    border: 0 !important;
  }
}

/* Evita zoom de imagem na logo/ícones pelo lightbox (regra neutra) */
header .logo img, .logo img, .site-header img {
  pointer-events: auto;
}

/* Imagens responsivas por padrão */
img {
  max-width: 100%;
  height: auto;
}

/* Suaviza rolagem e melhora foco */
html { scroll-behavior: smooth; }
:focus { outline-color: var(--brand); }
