:root {
  --azul-escuro: #000D1C;
  --dourado: #DAB369;
  --cinza-escuro: #747474;
  --marrom: #41261B;
  --fundo-claro: #FFF3E7;
}

html {
  font-family: 'Montserrat';
  scroll-behavior: smooth;
}

body {
  background-color: var(--fundo-claro);
}

.img-icon {
  width: max(35px, 5%);
  height: auto;
}

.section-light {
  background-color: var(--fundo-claro);
  color: var(--azul-escuro);
}

.section-dark {
  background-color: var(--dourado);
  color: var(--azul-escuro);
}

a {
  color: var(--marrom);
}

#navbar {
  align-items: center;
  background-color: var(--cinza-escuro);
  position: sticky;
  top: 0;
  z-index: 999;
  justify-content: space-between;
  padding: 12px 5%;
  display: grid;
  grid-template-columns: auto max-content auto max-content auto;
}

#navbar .logo img {
  height: 50px;
  width: auto;
  display: block;
  margin: 0 auto;
  justify-self: start;
  grid-column: 1;
}

.nav-links {
  display: flex;
  justify-self: center;
  gap: 18px;
  grid-column: 3;
}

.nav-links a {
  color: var(--fundo-claro);
  text-decoration: none;
  margin: 0 10px;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--dourado);
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  margin-left: auto;
  justify-self: end;
  grid-column: 5;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--fundo-claro);
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 3px;
  background-color: var(--dourado);
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--azul-escuro);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

.nav-toggle {
  display: none; 
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px;
}

.container {
  display: inline-block;
  cursor: pointer;
}

.bar1, .bar2, .bar3 {
  width: 35px;
  height: 5px;
  background-color: #333;
  margin: 6px 0;
  transition: 0.4s;
}

button[aria-expanded="true"] .bar1 {
  transform: translate(0, 11px) rotate(-45deg);
}

button[aria-expanded="true"] .bar2 {
  opacity: 0;
}

button[aria-expanded="true"] .bar3 {
  transform: translate(0, -11px) rotate(45deg);
}

/* Hero */
#home { 
  text-align: center;
  padding: 60px 20px; 
  display: flex;
  flex-direction: column;
  justify-content: center; 
}

#home .logo-inline {
  margin: 0 auto 12px;
  content: url('../images/submarca2.png');
}

#home a.btn {
  padding: 12px 30px;
  background-color: var(--marrom);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.3s;
  display: inline-block;
  margin: 20px auto 0; 
  max-width: 200px;    
  width: 100%;         
}

#home .btn:hover {
  background-color: #2a1a12;
}

section {
  padding: 30px 5%;
}

section h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 600;  
  margin-bottom: 6px;
  margin-top: 6px;
}

section ul {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
  list-style: disc;
  padding-left: 20px;
}

#sobre,
#missao,
#servicos {
  scroll-margin-top: 90px;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  justify-content: center;
  align-items: center;
}

#servicos {
  flex-direction: row-reverse;
}

#sobre > h2,
#missao > h2,
#servicos > h2 {
  width: 100%;
  text-align: center;
  margin-bottom: 22px;
  position: relative;
}

#sobre > h2::after,
#missao > h2::after,
#servicos > h2::after {
  content: "";
  display: block;
  height: 3px;
  width: 72px;
  margin: 10px auto 0;
  background: var(--cinza-escuro);
  opacity: .35;
  border-radius: 2px;
}

/*
.divisor {
  width: 80px;
  height: 3px;
  background-color: var(--cinza-escuro);
  opacity: 0.4;
  border: none;
  border-radius: 2px;
  margin: 0 auto 60px;
}
*/

#sobre > p,
#missao > p,
#servicos > p,
#servicos > ul,
#missao > ul {
  flex: 1 1 50px;
  max-width: 620px;
  font-size: 1.06rem;
  line-height: 1.85;
  text-align: justify;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
  justify-items: center;
  align-items: stretch;          
}

.card {
  background-color: var(--dourado);
  color: var(--azul-escuro);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 320px;
  display: flex;                 
  flex-direction: column;
  justify-content: flex-start;   
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card .foto {
  width: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  margin-bottom: 15px;
  transform: translateY(-10px);
  box-shadow: 0 8px 20px rgba(96, 92, 91, 0.3);
}

.card h3 {
  margin-bottom: 5px;
  font-size: 1.2rem;
}

.card .tooltip {
  visibility: hidden;
  width: 120px;
  background: var(--azul-escuro);
  text-align: center;
  padding: 5px 0;
  border-radius: 6px;
  position: absolute;
  z-index: 1;
  top: 50%;
}

.card:hover .tooltip {
  visibility: visible;
}

.card .tooltip a {
  color: var(--dourado);
}

#contato {
  padding-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--azul-escuro);
  color: var(--fundo-claro);
}

#contato img {
  max-height: 10vw;
}

@media (prefers-reduced-motion: reduce) {
  img { 
    transition: none; 
    transform: none;
  }
}

@media (max-width: 768px) {
  #navbar {
    --nav-h: 64px;
    height: var(--nav-h);
    padding: 10px 16px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 12px;
  }

  .nav-toggle {
    display: inline-flex; 
    justify-self: center;
  }

  .switch {
    justify-self: end;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--cinza-escuro);
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,.25);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  #sobre,
  #missao,
  #servicos { 
    flex-direction: column; 
    text-align: center; 
  }
}

.nav-links a.active {
  pointer-events: none;
  color: var(--dourado);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: default;
}
