/* ==========================================================================
   1. ESTILOS GERAIS DE LAYOUT (Sidebar, Main Content Wrapper, Botões)
   Estes estilos são necessários para a estrutura da Home funcionar aqui.
   ========================================================================== */

:root {
  --sidebar-width: 260px;
  --sidebar-width-collapsed: 80px;
  --sidebar-bg: #161b22;
  /* A cor do body será sobrescrita pelo main-content nas páginas internas para um visual mais limpo */
  --text-color: #333;
}

/* Configuração base do corpo para o layout flexível */
body {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: #faf9f6; /* Cor de fundo neutra para páginas internas */
  font-family: "Open Sans", sans-serif; /* Garantindo a fonte base */
}

/* Oculta qualquer navegação antiga que não seja a sidebar */
body > nav:not(#sidebar nav) {
    display: none !important;
}

/* --- SIDEBAR (Menu Lateral) --- */
aside {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 20px 15px;
  position: fixed;
  height: 100%;
  left: 0;
  top: 0;
  transition: width 0.3s ease;
  z-index: 1000;
  overflow-x: hidden; /* Garante que o texto não vaze ao recolher */
  white-space: nowrap;
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-left: 5px;
  min-height: 40px; /* Garante altura para os elementos */
}

#btn-toggle {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border-radius: 5px;
  transition: background 0.2s;
  min-width: 40px; /* Garante área de clique */
}

#btn-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.logo-container {
  flex-grow: 1;
  text-align: center;
  overflow: hidden;
  transition: opacity 0.2s, width 0.3s ease; /* Adicionado transição de largura */
}

.logo-container img {
  max-height: 40px;
  width: auto;
  vertical-align: middle; /* Ajuda no alinhamento */
}

  /* No arquivo: assets/css/forca_e_massa.css */

/* Encontre este bloco e adicione as duas linhas marcadas */
/* ==========================================================================
   SUBSTITUA O BLOCO DE CSS ATUAL DO MENU POR ESTE
   Arquivo: assets/css/forca_e_massa.css
   ========================================================================== */

/* Garante que a lista ocupe toda a largura e empilhe os itens verticalmente */
/* ==========================================================================
   SUBSTITUA O BLOCO DE CSS ATUAL DO MENU POR ESTE
   Arquivo: assets/css/forca_e_massa.css
   ========================================================================== */

/* Garante que a lista ocupe toda a largura e empilhe os itens verticalmente */
aside nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: flex;             /* Essencial para alinhar */
  flex-direction: column;    /* Essencial para um abaixo do outro */
}

/* Garante que o item da lista (o container do link) ocupe toda a largura */
aside nav ul li {
  margin-bottom: 8px;
  width: 100%;
}

/* --- O ESTILO DO LINK (O "BOTÃO") --- AQUI ESTAVA O ERRO PRINCIPAL */
aside nav ul li a {
  color: #b0b8c4;
  text-decoration: none;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;

  /* Transforma o link em um container flexível */
  display: flex;
  align-items: center; /* Centraliza verticalmente ícone e texto */

  /* Espaçamento interno para dar o volume de botão */
  padding: 10px 15px;

  border-radius: 8px;
  transition: all 0.3s ease;

  /* Define uma altura padrão e garante largura total */
  height: 50px;
  width: 100%;

  /* Garante que o padding não aumente a largura total */
  box-sizing: border-box;
}

/* Estilo quando passa o mouse (hover) ou quando é a página atual (active) */
aside nav ul li a:hover,
aside nav ul li a.active {
  background-color: #262c36; /* O fundo escuro */
  color: #fff;
}

/* Ajuste fino do ícone para não ficar colado no texto */
aside .material-icons {
  font-size: 24px;
  margin-right: 15px;
  /* Garante uma largura mínima para o ícone, alinhando os textos */
  min-width: 30px;
  text-align: center;
}

/* Ajuste do texto para garantir que apareça */
.link-text {
  opacity: 1;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

/* --- ESTADO RECOLHIDO (COLLAPSED) --- */
aside.recolhido {
  width: var(--sidebar-width-collapsed);
}

aside.recolhido .link-text {
  opacity: 0;
  pointer-events: none;
  /* display: none; Removido display none para animar a opacidade */
  width: 0; /* Ajuda na transição */
  overflow: hidden;
}

aside.recolhido .logo-container {
  opacity: 0; /* Usa opacidade em vez de display none para transição mais suave */
  width: 0;
  pointer-events: none;
}

aside.recolhido .menu-header {
  justify-content: center;
  padding-left: 0;
}

/* --- CONTEÚDO PRINCIPAL (WRAPPER) --- */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 30px;
  width: calc(100% - var(--sidebar-width));
  transition: margin-left 0.3s ease, width 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* CORREÇÃO DO FUNDO: Define um fundo sólido para o conteúdo principal, evitando que o body apareça nos buracos */
  background-color: #faf9f6; 
}

.main-content.expandido {
  margin-left: var(--sidebar-width-collapsed);
  width: calc(100% - var(--sidebar-width-collapsed));
}

/* --- BOTÕES FLUTUANTES --- */
.scroll-trigger-area {
  position: fixed;
  bottom: 0;
  left: 57%;
  transform: translateX(-50%);
  width: 300px;
  height: 100px;
  z-index: 9998;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

#floating-scroll-btn {
  background-color: rgba(255, 255, 255, 0.95);
  color: #333;
  padding: 12px 25px;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  pointer-events: auto;
}

#floating-scroll-btn .material-icons {
  color: #ec7a7a;
  font-size: 20px;
}

.scroll-trigger-area:hover #floating-scroll-btn {
  opacity: 1;
  transform: translateY(0);
}

#floating-scroll-btn:hover {
  background-color: #fff;
  transform: scale(1.05) translateY(0) !important;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

#btn-back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #fff;
  color: #333;
  width: 110px;
  height: 50px;
  border-radius: 50px;
  border: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

#btn-back-to-top .material-icons {
  font-size: 28px;
  color: #ef5252;
}

#btn-back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#btn-back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  background-color: #fce38a;
}

/* --- FOOTER (Estilo padrão da Home) --- */
footer#main-footer {
  margin-top: auto;
  background-color: #fff;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
  text-align: center;
  position: relative;
  z-index: 10;
  width: 100%; /* Garante largura total */
  box-sizing: border-box;
}

.footer-content {
    /* Adicionado para garantir centralização */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logos-footer {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 15px;
}

.logos-footer img {
  height: 40px;
  object-fit: contain;
}

/* --- RESPONSIVIDADE MOBILE DO LAYOUT --- */
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }
  aside {
    width: 100%;
    height: auto;
    position: relative;
    padding: 10px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  aside.recolhido {
    width: 100%;
  }
  .menu-header {
    margin-bottom: 0;
    width: auto;
  }
  #btn-toggle {
    display: none;
  }
  aside nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    width: 100%;
  }
  aside nav ul li {
    margin-bottom: 0;
    width: auto; /* No mobile, largura automática */
  }
  
  aside nav ul li a {
      width: auto;
      padding: 8px 12px;
      height: auto;
  }
  
  aside .material-icons {
      margin-right: 5px;
      min-width: auto;
  }

  .link-text {
    /* display: none; Se quiser esconder o texto no mobile, descomente aqui. */
    font-size: 14px;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 15px;
  }
  
  /* Ajustes Mobile dos Botões */
  .scroll-trigger-area {
      width: 100%;
      left: 50%;
  }
  #floating-scroll-btn {
      opacity: 0.8;
      transform: translateY(0);
  }
  
  #btn-back-to-top {
      bottom: 20px;
      right: 20px;
      width: 45px;
      height: 45px;
      font-size: 0;
  }
    #btn-back-to-top .material-icons {
        margin: 0;
    }
}

/* ==========================================================================
   2. ESTILOS ESPECÍFICOS DA PÁGINA FORÇA E MASSA (SEU CONTEÚDO)
   ========================================================================== */

/* SOBRESCRITA DO HERO PARA A PÁGINA ESPECÍFICA */
.page-hero {
    position: relative;
    width: 100%;
    height: 550px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('img/bolasfisica.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.page-hero .container {
    z-index: 2;
    max-width: 900px;
    padding: 0 20px;
}

.page-hero h1 {
    font-size: 3rem;
    margin: 0 0 10px 0;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.page-hero p {
    font-size: 1.2rem;
    margin-bottom: 0;
    font-family: 'Open Sans', sans-serif;
    line-height: 1.4;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* ESTILOS DOS CARDS DE VÍDEO */
.lei-card-video {
    display: flex;
    gap: 40px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto 30px auto;
    padding: 20px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.lei-card-video:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.12);
    background-color: #fdfdeb;
}

.lei-ilustracao-video {
    flex: 0 0 300px;
    max-width: 40%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    background-color: #000;
}

.lei-ilustracao-video img {
    width: 100%;
    height: 180px;
    display: block;
    transition: transform 0.3s ease-in-out;
    object-fit: cover;
}

/* SEÇÃO DE INTRODUÇÃO GERAL ÀS LEIS */
.leis-introducao {
    padding: 60px 10px;
    background: linear-gradient(#fbf5e4, #faf9f6);
    text-align: center;
    box-shadow: inset 0 5px 15px rgba(0,0,0,0.03);
    border-radius: 15px;
    margin-bottom: 40px;
}

.leis-introducao h2 {
    font-size: 2.5rem;
    color: #23272b;
    margin-bottom: 25px;
    font-family: 'Montserrat', sans-serif;
}

.leis-introducao p {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: #444;
}

/* SEÇÕES INDIVIDUAIS DAS LEIS */
.lei-secao {
    padding: 60px 0;
    background-color: #faf9f6;
    border-bottom: 1px solid #eee;
}

.lei-secao:nth-of-type(odd) {
    background-color: #fbf5e4;
}

.lei-secao.alternada h1 {
    text-align: center;
    margin-bottom: 30px;
    font-family: 'Montserrat', sans-serif;
    color: #23272b;
}

.lei-secao.alternada i {
    margin-left: 10px;
    color: red;
}

/* ESTILOS DOS CARDS DE CONTEÚDO */
.lei-card {
    display: flex;
    gap: 40px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 35px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.lei-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.12);
}

.lei-conteudo {
    flex: 1;
    min-width: 300px;
}

.lei-conteudo h2 {
    font-size: 2rem;
    color: #23272b;
    margin-bottom: 15px;
    font-family: 'Montserrat', sans-serif;
}

.lei-conteudo p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #555;
}

.lei-ilustracao {
    flex: 0 0 350px;
    max-width: 40%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.lei-ilustracao img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease-in-out;
}

.lei-card:hover .lei-ilustracao img {
    transform: scale(1.03);
}

/* Inverte a ordem para seções alternadas */
.lei-secao.alternada .lei-card {
    flex-direction: row-reverse;
}

/* ESTILO PARA VÍDEOS (LINK) */
.lei-video {
    flex: 1;
    min-width: 300px;
}

.lei-video a {
    font-size: 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #3b3b3b;
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
}

.lei-video a:hover {
    color: #f1c344;
}

/* ESTILO PARA FÓRMULAS */
.formula {
    background-color: #eee;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    font-family: 'PT Serif', serif;
    font-size: 1.15rem;
    color: #333;
    text-align: center;
}
.formula p {
    margin: 5px 0;
    color: #333;
}
.formula .MathJax_Display {
    margin-top: 10px;
}

/* SEÇÃO FINAL DE APLICAÇÕES */
.aplicacoes {
    padding: 80px 0;
    text-align: center;
    margin-top: 40px;
}

.aplicacoes h2 {
    font-size: 2.5rem;
    color: #23272b;
    margin-bottom: 30px;
    font-family: 'Montserrat', sans-serif;
}

.aplicacoes p {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #444;
}

/* Botão de destaque */
.btn-destaque {
    display: inline-block;
    background-color: #f9e28d;
    color: #000;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-weight: 700;
    font-family: "Montserrat", sans-serif;
    transition: all 0.3s ease;
    border: 2px solid #fadb6a;
}

.btn-destaque:hover {
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* MEDIA QUERIES ESPECÍFICAS PARA ESTA PÁGINA */
@media (max-width: 992px) {
    .page-hero h1 {
        font-size: 2.5rem;
    }
    .page-hero p {
        font-size: 1rem;
    }
    .lei-card, .lei-card-video {
        flex-direction: column;
        text-align: center;
    }
    .lei-secao.alternada .lei-card {
        flex-direction: column;
    }
    .lei-ilustracao, .lei-ilustracao-video {
        max-width: 80%;
        margin-bottom: 25px;
    }
    .lei-conteudo h2, .lei-video a {
        font-size: 1.8rem;
    }
    .lei-conteudo p {
        font-size: 1rem;
    }
    .leis-introducao h2, .aplicacoes h2 {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    .page-hero {
        height: 250px;
    }
    .page-hero h1 {
        font-size: 1.8rem;
    }
    .page-hero p {
        font-size: 0.9rem;
    }
    .lei-ilustracao, .lei-ilustracao-video {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
    }
    .lei-conteudo h2 {
        font-size: 1.5rem;
    }
    .lei-conteudo p {
        font-size: 0.9rem;
    }
    .formula {
        font-size: 1rem;
    }
    .leis-introducao h2, .aplicacoes h2 {
        font-size: 1.6rem;
    }
}