@charset "UTF-8";

/* ==================================================
   VARIÁVEIS DO LAYOUT
================================================== */

:root {
  --sidebar-width: 250px;
  --sidebar-bg: #1e1e1e;
  --sidebar-active: #333;
}


/* ==================================================
   ESTRUTURA GERAL
================================================== */

.layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}


/* ==================================================
   MENU LATERAL — DESKTOP
================================================== */

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;

  width: var(--sidebar-width);
  height: 100vh;

  overflow-x: hidden;
  overflow-y: auto;

  background: var(--sidebar-bg);
  color: #fff;

  box-shadow:
    2px 0 12px rgba(0, 0, 0, 0.08);
}

#menu-container {
  width: 100%;
  min-height: 100%;
}

.main-nav {
  width: 100%;
  padding: 20px 0;
}

.main-nav a {
  display: block;
  width: 100%;

  padding: 12px 20px;

  background: transparent;
  color: #fff;

  line-height: 1.45;
  text-decoration: none;

  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: var(--sidebar-active);
  color: #fff;
}

.main-nav a.is-active {
  background: var(--sidebar-active);
  color: #fff;
  font-weight: 700;
}

.menu-error {
  margin: 20px;
  color: #fff;
  font-size: 0.88rem;
  line-height: 1.5;
}


/* ==================================================
   ÁREA PRINCIPAL — DESKTOP
================================================== */

.main-area {
  display: flex;
  width: calc(100% - var(--sidebar-width));
  min-width: 0;
  min-height: 100vh;

  margin-left: var(--sidebar-width);

  flex-direction: column;
}


/* ==================================================
   HEADER
================================================== */

.site-header {
  width: 100%;
  padding: 18px 28px 14px;
  background: #fff;
}

.site-header a {
  display: block;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.site-header img {
  display: block;
  width: 100%;
  max-width: 1120px;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}


/* ==================================================
   CONTEÚDO
================================================== */

.main-content {
  flex: 1;

  width: 100%;
  max-width: 1200px;

  margin: 0 auto;
  padding: 30px 24px 40px;
}


/* ==================================================
   BOTÃO MOBILE
================================================== */

.menu-toggle {
  display: none;
}


/* ==================================================
   RESPONSIVO
================================================== */

@media (max-width: 768px) {

  .layout {
    display: block;
  }

  .main-area {
    width: 100%;
    margin-left: 0;
  }

  /*
    Botão do menu
  */

  .menu-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 3001;

    display: flex;
    width: 44px;
    height: 44px;

    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    border-radius: 7px;

    background: var(--sidebar-bg);
    color: #fff;

    font-family: inherit;
    font-size: 20px;
    line-height: 1;

    cursor: pointer;
  }

  .menu-toggle:hover,
  .menu-toggle:focus-visible {
    background: var(--sidebar-active);
  }

  /*
    Sidebar fechada por padrão
  */

  .sidebar {
    top: 0;
    right: auto;
    bottom: 0;
    left: 0;
    z-index: 3000;

    width: min(82vw, 300px);
    height: 100dvh;

    transform: translateX(-100%);
    visibility: hidden;

    transition:
      transform 0.3s ease,
      visibility 0s linear 0.3s;

    box-shadow:
      8px 0 24px rgba(0, 0, 0, 0.22);
  }

  /*
    Sidebar aberta pelo JavaScript
  */

  .sidebar.is-open {
    transform: translateX(0);
    visibility: visible;

    transition:
      transform 0.3s ease,
      visibility 0s;
  }

  .main-nav {
    padding-top: 76px;
    padding-bottom: 30px;
  }

  .main-nav a {
    padding: 14px 26px;
    font-size: 1rem;
  }

  /*
    Header no celular
  */

  .site-header {
    padding:
      14px
      16px
      12px
      68px;
  }

  .site-header a {
    width: 100%;
    max-width: 520px;
    margin: 0;
  }

  .site-header img {
    width: 100%;
    max-width: 520px;
    height: auto;
    max-height: 70px;
    margin: 0;
    object-fit: contain;
  }

  .main-content {
    padding: 24px 16px 32px;
  }

  body.menu-open {
    overflow: hidden;
  }

}