@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700;800;900&display=swap");

:root {
  --yellow: #f9d821;
  --gray: #555555;
  --light-gray: #b4b4b4;
  --dark-gray: #757575;
  --strong-yellow: #fbff00;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
  text-decoration: none;
}

/* Padrao da home Ilumina (base: Ilumina Cotia). Imagem de abertura do site. */
body {
  background-image:
    linear-gradient(rgba(5, 10, 20, 0.38), rgba(5, 10, 20, 0.38)),
    url("../assets/iluminaConderCenica.jpeg");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  background-color: #05080c;
  border-top: 2px solid var(--strong-yellow);
  border-bottom: 2px solid var(--strong-yellow);
}

.container {
  /* display: flex;
  flex-direction: column;
  justify-content: center; */
  /* desconta as bordas amarelas de 2px do body, que faziam a home
     ultrapassar a janela e gerar uma barra de rolagem de 4px */
  min-height: calc(100vh - 4px);
  max-width: 95em;
  margin: 0 auto;
}

h2 {
  font-size: clamp(0.5em, 0.8em + 2vw, 1.5em);
}

h3 {
  font-size: clamp(0.35em, 0.5em + 2vw, 1.25em);
}

/* HEADER */
header {
  position: relative;
  z-index: 30;
}

nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 10vh;
}

header .logo {
  margin-top: 30px;
  width: 180px;
}

.nav-list {
  display: flex;
  list-style: none;
  position: relative;
  z-index: 40;
}

.nav-list li {
  position: relative;
  letter-spacing: 1.5px;
  margin-left: 20px;
  transition: 0.4s ease;
  margin-top: 10px;
  padding: 11px;
}

.nav-list li:hover > .sub-nav {
  display: block;
  transition: 0.5s ease;
}

.nav-list a {
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  transition: 0.3s ease;
  text-transform: uppercase;
  --b: 0.2em; /* the thickness of the line */
  --c: #ffe800; /* the color */

  color: #0000;
  padding-block: var(--b);
  background: linear-gradient(var(--c) 50%, #b4b4b4 0) 0%
      calc(100% - var(--_p, 0%)) / 100% 200%,
    linear-gradient(var(--c) 0 0) 0% var(--_p, 0%) / var(--_p, 0%) var(--b)
      no-repeat;
  -webkit-background-clip: text, padding-box;
  background-clip: text, padding-box;
  transition: 0.3s var(--_s, 0s) linear,
    background-size 0.3s calc(0.3s - var(--_s, 0s));
}

.nav-list a:hover {
  --_p: 100%;
  --_s: 0.3s;
}

.sub-nav {
  position: absolute;
  top: 100%;
  left: 0;
  list-style: none;
  width: 220px;
  display: none;
  z-index: 300;
}
.submenu-mobile {
  display: none;
}

.sub-nav li {
  width: 100%;
  left: 0;
  padding: 5px;
  margin: 10px;
}

.label-menu {
  position: relative;
}

.sub-nav-right {
  left: 0;
}

.mobile-menu {
  display: none;
  cursor: pointer;
}

.mobile-menu div {
  width: 32px;
  height: 2px;
  background: #4b4b4b;
  margin: 8px;
  transition: 0.4s;
}

.sm-icons {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
}

.sm-icons i {
  color: #b4b4b4;
  font-size: 22px;
  transition: 0.3s ease;
}

.sm-icons i:hover {
  color: #ffe800;
}
/* HEADER */

/* MAIN */

main {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  /* min-height em vez de height fixo: o header ja ocupa 10vh + 30px de margem
     do logo, e a altura fixa empurrava a pagina para alem da janela */
  min-height: calc(90vh - 30px);
  padding: 2em 1em 3em;
  box-sizing: border-box;
}

/* O logo fica direto sobre a foto de fundo, sem cartao branco */
main .container-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 15px;
  box-sizing: border-box;
  position: relative;
}

main .container-img .logos-home {
  box-sizing: border-box;
  padding: 0 20px;
  width: 100%;
}

/* o max-height em vh impede que o logo empurre o restante da home
   para fora da janela em telas baixas (notebooks 768px, por exemplo) */
.logo-ilumina {
  width: 100%;
  max-width: 640px;
  max-height: 40vh;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.texts-home {
  margin-top: 1.5em;
  text-align: center;
  color: white;
}

.options {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 2.25em;
}

.options a,
.options button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 270px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  margin: 0;
  padding: 16px 26px;
  border-radius: 6px;
  border: 2px solid var(--yellow);
  background: transparent;
  color: var(--yellow);
  box-shadow: 0 8px 20px rgba(249, 216, 33, 0.25);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* preenchimento que desliza da esquerda no hover */
.options a::before,
/* preenchimento que desliza da esquerda no hover */
.options button::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--yellow);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.options a:hover::before,
.options button:hover::before {
  width: 100%;
}

.options a:hover,
.options button:hover {
  color: #0f0f0f;
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(249, 216, 33, 0.45);
}

.abrir-chamado {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2.75em;
  flex-direction: column;
  border-radius: 10px;
  padding: 10px;
}

.abrir-chamado h2 {
  font-weight: 800;
  color: white;
}

.abrir-chamado h3 {
  font-weight: 600;
  color: white;
}

/* MAIN */

/* RESPONSIVIDADE */
@media (max-width: 1550px) {
  .nav-list a {
    font-size: 10px;
    font-weight: 900;
  }

  .container {
    max-width: 90em;
  }
}

@media (max-width: 1450px) {
  .nav-list a {
    font-size: 9px;
    font-weight: 900;
  }

  .container {
    max-width: 83em;
  }
}

@media (max-width: 1360px) {
  .container {
    max-width: 80em;
  }

  header .logo {
    width: 150px;
  }

  .nav-list li {
    letter-spacing: 1.2px;
    margin-left: 10px;
    padding: 3px;
    margin-top: 0px;
  }

  .nav-list a {
    font-size: 8px;
    font-weight: 900;
  }

  main .container-img .logos-home {
    box-sizing: border-box;
    padding: 0 20px;
  }

  .logo-ilumina {
    max-width: 520px;
  }

  .texts-home h2 {
    font-size: 20px;
  }

  .texts-home h3 {
    font-size: 15px;
  }

  .options a,
.options button {
    font-size: 13px;
    min-width: 240px;
    padding: 14px 22px;
  }

  .abrir-chamado {
    margin-top: 2em;
    border-radius: 10px;
    padding: 10px;
  }

  .abrir-chamado h2 {
    font-weight: 800;
    color: white;
    font-size: 18px;
  }

  .abrir-chamado h3 {
    font-weight: 600;
    color: white;
    font-size: 16px;
  }
}

@media (max-width: 1250px) {
  .nav-list a {
    font-size: 8px;
    font-weight: 900;
  }

  .container {
    max-width: 90em;
  }
}

@media (max-width: 1120px) {
  /* Mantem a imagem de abertura legivel nas telas menores. */
  body {
    background: linear-gradient(
          180deg,
          rgba(5, 10, 20, 0.46) 0%,
          rgba(5, 10, 20, 0.76) 36%,
          rgba(5, 10, 20, 0.92) 100%
        ),
      url("../assets/iluminaConderCenica.jpeg") center center / cover no-repeat;
  }

  .container {
    max-width: 35em;
    position: relative;
    overflow-x: hidden;
  }
  /* ÍCONES */
  .sm-icons {
    position: absolute;
    left: 40%;
    bottom: 10px;
    z-index: -1;
  }

  .sm-icons i {
    color: #b3b3b3;
    font-size: 25px;
  }
  /* ÍCONES */

  /* MOBILE / HEADER */
  .nav-list {
    position: absolute;
    top: 11vh;
    right: 0;
    width: 93vw;
    height: 90vh;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    transform: translateX(100%);
    transition: transform 0.3s ease-in;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
  }

  .submenu-mobile {
    display: initial;
  }

  /* No menu mobile aparecem apenas os itens .submenu-mobile,
     evitando duplicar DASHBOARD, ACOMPANHE SUA SOLICITACAO e MAPA */
  .nav-list > li:not(.submenu-mobile) {
    display: none;
  }

  .nav-list li.submenu-mobile {
    display: block;
  }

  .nav-list li:hover > .sub-nav {
    display: none;
  }

  .nav-list li {
    margin-left: 0;
    opacity: 0;
    margin-top: 0;
  }

  .nav-list a {
    font-size: 10px;
    font-weight: 900;
    color: #b4b4b4;
  }

  .mobile-menu {
    display: block;
  }

  .mobile-menu div {
    background: #b3b3b3;
  }
  /* MOBILE / HEADER */

  /* O cartao de logos passa a aparecer no mobile em versao compacta.
     Antes ficava oculto e deixava um vazio grande acima do titulo, alem de
     sumir com o brasao da Prefeitura. */
  main {
    min-height: calc(100vh - 11vh);
    justify-content: center;
    padding: 1.5em 1em 2.5em;
  }

  /* no mobile o logo ganha um cartao escuro translucido, destacando-o da foto */
  main .container-img {
    width: min(92vw, 430px);
    min-height: 0;
    padding: 26px 18px;
    background: rgba(13, 18, 27, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
  }

  main .container-img .logos-home {
    padding: 0 10px;
  }

  .logo-ilumina {
    max-width: 260px;
    max-height: 26vh;
  }

  .options {
    margin-top: 1.75em;
  }

  /* acao principal solida e secundaria em contorno claro */
  .options .home-cta-primary {
    background: var(--yellow);
    color: #101010;
    border-color: var(--yellow);
    box-shadow: 0 14px 30px rgba(249, 216, 33, 0.28);
  }

  .options .home-cta-primary::before {
    background: rgba(255, 255, 255, 0.18);
  }

  .options .home-cta-primary:hover {
    color: #101010;
  }

  .options .home-cta-secondary {
    background: rgba(13, 18, 27, 0.58);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.26);
  }

  .options .home-cta-secondary::before {
    background: rgba(255, 255, 255, 0.12);
  }

  .options .home-cta-secondary:hover {
    color: #ffffff;
  }

  .abrir-chamado {
    margin-top: 1.75em;
  }
}

@media (max-width: 550px) {
  .container {
    max-width: 22em;
    position: relative;
    overflow-x: hidden;
  }

  /* MOBILE / HEADER */
  .nav-list {
    width: 87vw;
  }

  .nav-list a {
    font-size: 10px;
    font-weight: 600;
  }

  .label-menu {
    display: none;
  }

  .sub-nav {
    display: none;
  }

  .sub-nav li {
    margin-top: 12px;
    padding: 0;
  }

  header .logo {
    width: 100px;
    margin-top: 5px;
  }
  /* MOBILE / HEADER */

  .options {
    flex-direction: column;
    width: 100%;
  }

  .options a,
.options button {
    width: 100%;
    min-width: 0;
    font-size: 12px;
    padding: 14px 18px;
  }

  main {
    padding: 0.75em 1em 1.25em;
  }

  main .container-img {
    width: 100%;
    padding: 14px 12px;
  }

  .texts-home {
    margin-top: 1.1em;
  }

  .logo-ilumina {
    max-width: 190px;
    max-height: 19vh;
  }

  .options {
    margin-top: 1.35em;
    gap: 12px;
  }

  .abrir-chamado {
    margin-top: 1.35em;
  }
}
/* RESPONSIVIDADE */

/* CLASSE ADICIONADA COM JS */
.nav-list.active {
  transform: translateX(0);
}

/* ANIMAÇÕES */
@keyframes navLinkFade {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mobile-menu.active .line1 {
  transform: rotate(-45deg) translate(-8px, 8px);
}

.mobile-menu.active .line2 {
  opacity: 0;
}

.mobile-menu.active .line3 {
  transform: rotate(45deg) translate(-5px, -7px);
}
/* ANIMAÇÕES */

/* Botoes do seletor de municipio (Conder) */
.options button {
  cursor: pointer;
  font-family: inherit;
}

/* Itens do menu em uma linha, com espacamento menor para caber
   menus com mais itens e os icones das redes sociais */
@media (min-width: 1121px) {
  .nav-list > li {
    margin-left: 6px;
    padding: 8px 7px;
  }
  .nav-list > li > a {
    white-space: nowrap;
  }
  .sm-icons {
    gap: 14px;
    margin-left: 12px;
  }
}
