/* milligram-modern.css
   Versão otimizada e moderna do framework Milligram
   Autor: luan macena (2025)
   Licença: MIT
*/

/* ========== CORE ========== */
:root {
  --color-primary: #9b4dca;
  --color-secondary: #606c76;
  --color-border: #d1d1d1;
  --color-bg: #fff;
  --radius: .3rem;
  --spacing: 1rem;
  --max-width: 960px;
  --font-size: 1rem;
  --font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size);
  color: var(--color-secondary);
  line-height: 1.6;
  background: var(--color-bg);
  margin: 0;
  padding: 0;
}

/* ========== TYPOGRAPHY ========== */
:where(h1, h2, h3, h4, h5, h6, p) {
  margin: 0 0 1rem;
  font-weight: 400;
  line-height: 1.3;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }

a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ========== CONTAINER GLOBAL ========== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding: 3rem 1rem;
  box-sizing: border-box;
}

.container-narrow {
  max-width: 720px;
}

/* Header e hero sem padding vertical */
header .container,
.hero .container {
  padding-top: 0;
  padding-bottom: 0;
}

@media (max-width: 768px) {
  .container {
    padding: 2rem 1rem;
  }
}

/* ========== LAYOUT ========== */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing);
}

.column {
  flex: 1 1 100%;
}
@media (min-width: 640px) {
  .column-50 { flex: 1 1 calc(50% - var(--spacing)); }
  .column-33 { flex: 1 1 calc(33.333% - var(--spacing)); }
  .column-25 { flex: 1 1 calc(25% - var(--spacing)); }
}

/* Mobile: colunas empilhadas e centralizadas */
@media (max-width: 640px) {
  .row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .row > * {
    max-width: 100%;
  }
}

/* ================= HERO AJUSTADO ================= */
/* garante que o hero não crie espaço extra */
.hero {
  display: flex;
  align-items: center;
  min-height: 380px; /* ajuste para a altura desejada do hero */
  padding: 2rem 1rem;
}

/* alinha texto e imagem corretamente */
.hero-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-end; /* faz a imagem descer */
  width: 100%;
  gap: 2rem;
}



/* no mobile volta ao padrão empilhado */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-image img {
    max-height: 220px;
  }
}
.hero-image img {
  display: block;
  margin: 0 auto;
  padding: 0;
  transform: translateY(63px); /* desce a imagem */
}



/* ========== FORMS ========== */
:where(input, select, textarea, button) {
  font: inherit;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  width: 100%;
  background: #fff;
  color: var(--color-secondary);
}

input:focus,
select:focus,
textarea:focus,
button:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 .1rem color-mix(in srgb, var(--color-primary) 40%, transparent);
}

/* ========== BUTTONS ========== */
.button,
button {
  background: #fff;
  color: #0b2c44;
  border: 2px solid #fff;
  padding: .75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  transition: .2s ease;
  display: inline-block;
}

.button:hover,
button:hover,
.button:focus,
button:focus {
  background: transparent;
  color: #fff;
  border-color: #fff;
  outline: none;
}

/* ========== UTILITIES ========== */
img, video, canvas, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: var(--spacing); }
.mb-1 { margin-bottom: var(--spacing); }
.pt-1 { padding-top: var(--spacing); }
.pb-1 { padding-bottom: var(--spacing); }

.hidden { display: none !important; }

/* ========== TABLES ========== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--spacing);
}
th, td {
  border: 1px solid var(--color-border);
  padding: .75rem;
  text-align: left;
}
th {
  background: color-mix(in srgb, var(--color-border) 10%, white);
}

/* ========== BLOCKQUOTES ========== */
blockquote {
  border-left: .3rem solid var(--color-primary);
  margin: 1rem auto;
  padding: 1rem 1.5rem;
  max-width: 700px;
  color: var(--color-secondary);
}
@media (max-width: 640px) {
  blockquote { padding: 1rem; }
}

/* ========== CODE ========== */
code {
  background: color-mix(in srgb, var(--color-border) 20%, white);
  padding: .2rem .4rem;
  border-radius: .2rem;
  font-family: monospace;
}

/* ========== GRID ========== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing);
}

/* ========== HEADER / NAV ========== */
header {
  background: #0b2c44;
  border-bottom: 1px solid rgba(255, 255, 255, .15);
  padding: .75rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  border: 2px solid #fff;
  padding: .25rem .6rem;
  border-radius: var(--radius);
  font-size: 1.1rem;
  letter-spacing: .5px;
}

.nav-list {
  display: flex;
  gap: var(--spacing);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.nav-list a:hover,
.nav-logo:hover {
  opacity: .8;
}

/* Toggle escondido */
.nav-toggle {
  display: none;
}
.nav-toggle-label {
  display: none;
  width: 28px;
  height: 22px;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  gap: 5px;
}
.nav-toggle-label span {
  background: #fff;
  height: 3px;
  width: 100%;
  border-radius: 2px;
  transition: .3s;
}

/* MOBILE MENU */
@media (max-width: 768px) {
  .nav-list {
    position: absolute;
    top: 60px;
    right: 0;
    background: #0b2c44;
    width: 100%;
    flex-direction: column;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,.15);
    padding: var(--spacing) 0;
    display: none;
  }
  .nav-toggle:checked + .nav-toggle-label + .nav-list {
    display: flex;
  }
  .nav-toggle-label {
    display: flex;
  }
}

/* ========== HERO ========== */
.hero {
  background: #0b2c44;
  color: #fff;
  padding: 4rem 1rem;
}
.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing);
  flex-wrap: wrap;
}
.hero-text { flex: 1 1 400px; }
.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.hero p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}
.hero .button {
  background: #fff;
  color: #0b2c44;
  border: 2px solid #fff;
  border-radius: var(--radius);
  font-weight: 700;
  transition: .2s;
}
.hero .button:hover {
  background: transparent;
  color: #fff;
}
.hero-image img { border-radius: .5rem; }

@media (max-width: 768px) {
  .hero-content { flex-direction: column; text-align: center; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
}

/* ========== SERVIÇOS ========== */
.servicos {
  background: #f5f6f7;
  text-align: center;
}
.servicos h2 {
  font-size: 1.8rem;
  color: #0b2c44;
  font-weight: 700;
  margin-bottom: 2rem;
  text-transform: uppercase;
}
.grid-servicos {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 1100px;
  display: grid;
  gap: 1.5rem;
}
.card-servico {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem 1rem;
  border: 1px solid #e5e5e5;
  transition: .2s ease;
}
.card-servico:hover {
  transform: translateY(-4px);
  border-color: #0b2c44;
}

.card-servico img {
  width: 56px;
  height: 56px;
  margin-bottom: .8rem;
}
.card-servico p {
  margin: 0;
  font-size: .95rem;
  color: #0b2c44;
}
@media (max-width: 500px) {
  .servicos h2 { font-size: 1.4rem; }
  .card-servico { padding: 1.2rem; }
}

/* ========== ORÇAMENTO ========== */
.orcamento {
  background: #0b2c44;
  color: #fff;
}
.orcamento-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.orcamento h2 {
  text-transform: uppercase;
  margin-bottom: .25rem;
}
.orcamento-btn {
  border: 2px solid #fff;
  color: #0b2c44;
  background: #fff;
  font-weight: 700;
  text-transform: uppercase;
  transition: .2s;
  white-space: nowrap;
}
.orcamento-btn:hover,
.orcamento-btn:focus {
  background: transparent;
  color: #fff;
}
@media (max-width: 768px) {
  .orcamento-content {
    flex-direction: column;
    text-align: center;
  }
  .orcamento-btn {
    width: 100%;
    max-width: 280px;
  }
}

/* ========== ESTADOS / BOTÕES ========== */
#estados p { margin-bottom: 2rem; }
.estado {
  background: #f5f6f7;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  color: var(--color-secondary);
  text-decoration: none;
  display: block;
  transition: .2s;
}
.estado:hover,
.estado:focus {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  transform: translateY(-3px);
}

/* ========== FOOTER ========== */
.footer {
  padding: 40px 0;
  border-top: 1px solid #E0E0E0;
  text-align: center;
  background: #fff;
}
.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-menu a {
  font-weight: 600;
  text-decoration: none;
  color: #333;
}
.footer-menu a:hover,
.footer-menu a:focus {
  text-decoration: underline;
}
.footer-brand {
  font-size: 1.4rem;
  font-weight: 700;
  margin: .5rem 0;
}
.footer-copy {
  font-size: .9rem;
  color: #555;
  margin: 0;
}
@media (max-width: 600px) {
  .footer-menu {
    gap: 1rem;
    font-size: .95rem;
  }
}

.footer-extra-links {
  margin-top: 15px;
  text-align: center;
}

.footer-extra-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-extra-links ul li {
  display: inline-block;
  margin: 5px 10px;
}

.footer-extra-links a {
  color: #606c76; /* troque se seu footer for claro */
  text-decoration: none;
  opacity: 0.85;
}

.footer-extra-links a:hover {
  opacity: 1;
  text-decoration: underline;
}
