/* =====================================================================
   ESPAÇO FLORESCER — Folha de estilo principal
   Paleta oficial, layout responsivo e componentes do site.
   ===================================================================== */

/* ---------- Variáveis de cor (paleta oficial) ---------- */
:root {
  --azul: #0059A8;
  --azul-escuro: #00427d;
  --marrom: #682F05;
  --verde-claro: #C7EDE4;
  --amarelo: #F4E87F;
  --verde: #62AB37;      /* verde da marca — acentos e ícones */
  --verde-btn: #3d7d1f;  /* verde escurecido — botões com texto branco */
  --dourado: #b8860b;    /* amarelo escurecido — ícones com texto/contraste */

  --texto: #26303a;
  --texto-suave: #56616d;
  --branco: #ffffff;
  --fundo: #ffffff;
  --fundo-alt: #f1f9f6;  /* fundo claro com leve tom verde */
  --borda: #e4eaef;

  --raio: 16px;
  --raio-sm: 10px;
  --sombra: 0 10px 30px rgba(11, 60, 93, 0.08);
  --sombra-forte: 0 16px 40px rgba(11, 60, 93, 0.16);
  --container: 1140px;
  --header-h: 74px;
}

/* ---------- Reset básico ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 10px); }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--texto);
  background: var(--fundo);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;             /* trava rolagem horizontal indevida */
  overflow-wrap: break-word;      /* quebra palavras muito longas */
}

img { max-width: 100%; display: block; }

/* Evita que itens de grid/flex estourem a largura por causa de imagens */
.hero-text, .hero-media, .sobre-text, .sobre-media { min-width: 0; }
a { color: var(--azul); text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--texto); }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
p { margin: 0 0 1rem; }

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

/* ---------- Foco visível (acessibilidade) ---------- */
a:focus-visible, button:focus-visible, .gallery-item:focus-visible {
  outline: 3px solid var(--azul);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Link "pular para o conteúdo" ---------- */
.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--azul); color: #fff; padding: 10px 16px;
  border-radius: 8px; z-index: 1200; transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.3rem; border-radius: 999px;
  font-weight: 600; font-size: 1rem; cursor: pointer;
  border: 2px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn-lg { padding: .9rem 1.7rem; font-size: 1.05rem; }
.btn .ico { width: 1.2em; height: 1.2em; fill: currentColor; }

.btn-primary { background: var(--azul); color: #fff; }
.btn-primary:hover { background: var(--azul-escuro); }
.btn-whats { background: var(--verde-btn); color: #fff; }
.btn-whats:hover { background: #336c1a; box-shadow: var(--sombra); }
.btn-outline { background: transparent; color: var(--azul); border-color: var(--azul); }
.btn-outline:hover { background: var(--azul); color: #fff; }

/* ---------- Cabeçalho fixo ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--borda);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .6rem; }
.brand img { width: 54px; height: 54px; }
.brand-text { font-size: 1.15rem; color: var(--marrom); line-height: 1.05; font-weight: 600; }
.brand-text strong { display: block; color: var(--azul); font-weight: 800; }

.main-nav { display: flex; align-items: center; }
.nav-menu { list-style: none; display: flex; align-items: center; gap: .3rem; margin: 0; padding: 0; }
.nav-menu a { color: var(--texto); font-weight: 600; padding: .5rem .8rem; border-radius: 8px; font-size: .98rem; }
.nav-menu a:hover { color: var(--azul); background: var(--fundo-alt); }
.nav-cta a { color: #fff; }
.nav-cta a:hover { color: #fff; }

/* Botão hambúrguer (mobile) */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 46px; height: 46px; background: var(--fundo-alt);
  border: 1px solid var(--borda); border-radius: 10px; cursor: pointer;
}
.nav-toggle span { width: 22px; height: 2.5px; background: var(--azul); border-radius: 2px; margin: 0 auto; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Seções gerais ---------- */
main { padding-top: var(--header-h); }
.section { padding: 76px 0; }
.section-alt { background: var(--fundo-alt); }
.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-sub { color: var(--texto-suave); font-size: 1.08rem; margin: 0; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .08em; font-size: .8rem;
  font-weight: 700; color: var(--azul); margin: 0 0 .6rem;
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(244, 232, 127, 0.35), transparent 60%),
    linear-gradient(160deg, var(--verde-claro) 0%, #eafaf5 45%, #ffffff 100%);
}
.hero-inner {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center;
  padding: 70px 20px 80px;
}
.hero-text h1 { color: var(--azul); margin-bottom: .35em; }
.hero-lead { font-size: 1.15rem; color: #35414d; max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 18px; }
.hero-note { font-size: .95rem; color: var(--texto-suave); margin: 0; }

.hero-media { position: relative; }
.hero-media img {
  border-radius: 22px; box-shadow: var(--sombra-forte);
  width: 100%; height: 460px; object-fit: cover;
  border: 6px solid #fff;
}
.hero-media::after {
  content: ""; position: absolute; inset: auto -18px -18px auto;
  width: 130px; height: 130px; background: var(--verde);
  border-radius: 26px; z-index: -1; opacity: .35;
}

/* ---------- Sobre ---------- */
.sobre-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 48px; align-items: center; }
.sobre-media img {
  border-radius: 20px; box-shadow: var(--sombra);
  width: 100%; height: 480px; object-fit: cover;
}
.feature-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 16px; }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; }
.feature-ico {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px;
  color: #fff; display: grid; place-items: center; font-size: 1.1rem;
}

/* ---------- Grade de cartões ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.card {
  background: var(--branco); border: 1px solid var(--borda);
  border-radius: var(--raio); padding: 28px 24px; box-shadow: var(--sombra);
}
.card-ico {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  margin-bottom: 16px;
}
.card-ico svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { color: var(--azul); font-size: 1.2rem; }
.card p { color: var(--texto-suave); margin: 0; }

.service { transition: transform .18s ease, box-shadow .18s ease; }
.service:hover { transform: translateY(-4px); box-shadow: var(--sombra-forte); }

.tip { border-left: 5px solid var(--verde); }
.tip h3 { color: var(--marrom); font-size: 1.12rem; }

/* ---------- ODS ---------- */
.ods-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ods { display: flex; gap: 20px; align-items: center; }
.ods-badge {
  flex: 0 0 auto; width: 96px; height: 96px; border-radius: 16px; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.ods-num { font-size: 2.6rem; font-weight: 800; }
.ods-label { font-size: .8rem; letter-spacing: .12em; font-weight: 700; margin-top: 4px; }
.ods-body h3 { color: var(--texto); }
.ods-body p { color: var(--texto-suave); margin: 0; }

/* ---------- Galeria ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.gallery-item {
  padding: 0; border: none; cursor: pointer; background: none;
  border-radius: 14px; overflow: hidden; box-shadow: var(--sombra);
  aspect-ratio: 3 / 4;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery-item:hover img { transform: scale(1.06); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 1300;
  background: rgba(10, 25, 40, 0.9);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 12px; box-shadow: var(--sombra-forte); }
.lightbox-close {
  position: absolute; top: 18px; right: 24px; width: 48px; height: 48px;
  font-size: 2rem; line-height: 1; color: #fff; background: rgba(255,255,255,0.15);
  border: none; border-radius: 50%; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }

/* ---------- Contato ---------- */
.contato-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.contato { display: block; color: inherit; transition: transform .18s ease, box-shadow .18s ease; }
.contato:hover { transform: translateY(-4px); box-shadow: var(--sombra-forte); }
.contato p { color: var(--texto); font-weight: 600; word-break: break-word; }
.contato-cta { color: var(--azul); font-weight: 700; font-size: .95rem; }
.contato.is-placeholder { opacity: .7; border-style: dashed; }
.contato.is-placeholder .contato-cta { color: var(--texto-suave); }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--azul); color: #eaf2fb; margin-top: 20px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1.3fr 1.6fr; gap: 32px;
  padding: 52px 20px 36px;
}
.site-footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: 1rem; }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand img { width: 64px; height: 64px; background: #fff; border-radius: 12px; padding: 4px; }
.footer-brand p { margin: 0; font-size: .95rem; }
.footer-nav ul, .footer-contato ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-nav a { color: #eaf2fb; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-contato li { font-size: .95rem; }
.footer-projeto p { font-size: .95rem; margin: 0; color: #d5e6f7; }
.footer-base { border-top: 1px solid rgba(255,255,255,0.2); text-align: center; padding: 18px; font-size: .9rem; }
.footer-base p { margin: 0; }

/* ---------- Voltar ao topo ---------- */
.back-to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 900;
  width: 50px; height: 50px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--azul); color: #fff; font-size: 1.4rem; box-shadow: var(--sombra-forte);
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: .25s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--azul-escuro); }

/* =====================================================================
   RESPONSIVIDADE
   ===================================================================== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; }
  .hero-media { order: -1; max-width: 460px; }
  .hero-media img { height: 320px; }
  .sobre-grid { grid-template-columns: 1fr; gap: 30px; }
  .sobre-media { max-width: 480px; margin: 0 auto; }
  .sobre-media img { height: 360px; }
  .ods-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  /* Menu mobile */
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--borda);
    box-shadow: var(--sombra); padding: 8px 16px 16px;
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: .85rem .5rem; border-radius: 8px; border-bottom: 1px solid var(--borda); }
  .nav-menu li:last-child a { border-bottom: none; }
  .nav-cta { margin-top: 10px; }
  .nav-cta a { justify-content: center; display: flex; }
}

@media (max-width: 560px) {
  .section { padding: 54px 0; }
  .hero-media img { height: 260px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; padding-top: 40px; }
  .btn { width: 100%; justify-content: center; }
  .hero-actions .btn { width: 100%; }
}

/* ---------- Preferência por menos animação ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
