/* Reset e Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #ffffff;
  color: #333;
  line-height: 1.6;
}

/* ===== HEADER (REUTILIZÁVEL) ===== */
.header-sobre {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 3rem;
  background: url('imagens/header2.png') no-repeat center center;
  background-size: cover;
  box-shadow: 0 2px 15px rgba(0,0,0,0.1);
  height: 120px;
  transition: all 0.3s ease;
  z-index: 1000;
}

.header-sobre .logo-container .logo {
  max-height: 180px;
  width: auto;
  transition: all 0.3s ease;
}

/* MARGEM SÓ NO DESKTOP */
@media (min-width: 769px) {
  .header-sobre .logo-container {
    margin-left: 160px;
  }
  
  .header-sobre .menu-desktop {
    margin-right: 160px;
  }
}

/* MENU DESKTOP */
.header-sobre .menu-desktop ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.header-sobre .menu-desktop a {
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
  transition: color 0.3s ease;
  padding: 8px 0;
  position: relative;
}

.header-sobre .menu-desktop a:hover {
  color: #C0995D;
}

.header-sobre .menu-desktop a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #C0995D;
  transition: width 0.3s ease;
}

.header-sobre .menu-desktop a:hover::after {
  width: 100%;
}

/* MENU MOBILE TOGGLE */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1300;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: #ffffff;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* ===== MENU LATERAL MOBILE (REUTILIZÁVEL) ===== */
#side-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 102%;
  background: url('imagens/backgroundmenu.png');
  box-shadow: -2px 0 12px rgba(0,0,0,0.25);
  transition: right 0.3s ease-in-out;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.5rem;
  border-radius: 20px;
}

#side-menu.active {
  right: 0;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1100;
  display: none;
}

.overlay.active {
  display: block;
}

.close-menu {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  color: #ffffff;
  cursor: pointer;
  z-index: 1300;
}

.side-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.side-logo img {
  max-height: 200px;
  margin-bottom: 0.5rem;
}

.side-menu a {
  padding: 15px 20px;
  text-decoration: none;
  font-size: 18px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.3s, color 0.3s;
}

.side-menu a:hover {
  background: rgba(90, 45, 12, 0.1);
  color: #C0995D;
}

/* Header do Vocabulário */
.vocab-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 0 20px;
}

.vocab-header h1 {
  font-size: 3.5rem;
  color: #6a7263;
  margin-bottom: 0.5rem;
  font-weight: 800;
}

.vocab-header .subtitle {
  font-size: 2.5rem;
  color: #C0995D;
  margin-bottom: 1rem;
  font-weight: 700;
}

.vocab-header p {
  font-size: 1.1rem;
  color: #555;
  max-width: 600px;
  margin: 0 auto;
}

/* Container Principal */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Barra de Pesquisa */
.search-bar {
  background: white;
  border-radius: 50px;
  padding: 12px 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  border: 2px solid #e0e0e0;
  position: relative;
  z-index: 10;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  padding: 8px 0;
  background: transparent;
}

.search-bar i {
  color: #666;
  margin-right: 12px;
}

/* Categorias */
.categories {
  display: flex;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  padding-bottom: 8px;
  gap: 8px;
  position: relative;
  z-index: 5;
  margin-top: 20px; /* CORREÇÃO: Adicionado margin-top */
}

.category {
  background: white;
  padding: 10px 16px;
  border-radius: 30px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-weight: 500;
  font-size: 0.9rem;
  border: 2px solid #e0e0e0;
  position: relative;
  margin-top: 5px;
}

.category.active {
  background: #5a2d0c;
  color: rgb(255, 255, 255);
  border-color: #5a2d0c;
}

.category:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  z-index: 6;
}

/* Tabela de Vocabulário */
.vocabulary-table {
  background: rgb(138, 59, 59);
  color: #C0995D;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  border: 1px solid #e0e0e0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
      color: rgb(255, 255, 255);
}

th {
  padding: 15px 20px;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
}

td {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
  text-align: center;
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

/* CORREÇÃO: Definir cores específicas para cada tipo de conteúdo */

thead tr {
  background-color: #C0995D !important; /* Cor do cabeçalho */
}

tr:nth-child(even) {
  background-color: #f8f9fa;
}

tr:nth-child(odd) {
  background-color: #ffffff;
}

/* CORREÇÃO: Hover funcional apenas no corpo da tabela */
tbody tr:hover {
  background-color: #f1e2d0 !important;
}

/* CORREÇÃO: Definir estilos específicos para cada coluna */
.arabic {
  font-size: 1.4rem;
  font-weight: bold;
  direction: rtl;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
  color: #5a2d0c;
}

.portuguese {
  font-weight: 500;
  color: #333;
}

.category-cell {
  color: #666;
  font-style: italic;
}

.audio-cell {
  text-align: center;
}

.audio-btn {
  background: #C0995D;
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  margin: 0 auto;
}

.audio-btn:hover {
  background: #5a2d0c;
  transform: scale(1.1);
}

/* ===== RODAPÉ ===== */
#footer {
  background: #222222;
  padding: 50px 20px 20px;
}

.footer-container {
  max-width: 1000px;
  margin: 0 auto;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 30px;
}

.footer-col h3 {
  font-size: 1.4em;
  margin: 0 0 15px 0;
  color: #F5E1C0;
  font-weight: 600;
}

.arabic-text {
  font-size: 1.1em;
  color: #F5E1C0;
  text-align: right;
  direction: rtl;
}

.footer-desc {
  line-height: 1.5;
  color: #F2D4B6;
  margin: 0;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: #F2D4B6;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: #EEAA6B;
}

.social-icons {
  display: flex;
  gap: 10px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 37px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fffbf8;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.4em;
}

.social-icons a:hover {
  background: #F2D4B6;
}

.footer-bottom {
  border-top: 1px solid #83887A;
  padding-top: 20px;
  text-align: center;
}

.footer-bottom p {
  color: #F2D4B6;
  line-height: 1.4;
  margin: 0 0 5px 0;
}

.heart {
  color: #EEAA6B;
  font-size: 1.2em;
}

.copyright {
  font-size: 0.9em;
  color: #F2D4B6 !important;
}


/* Responsividade */
@media (max-width: 768px) {
  .header-sobre {
    padding: 10px 1rem;
    height: 100px;
  }
  
  .header-sobre .logo-container .logo {
    max-height: 140px;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .header-sobre .menu-desktop {
    display: none;
  }
  
  main {
   margin-top: 120px !important;
  } 
  
  .vocab-header h1 {
    font-size: 2rem;
  }
  
  .vocab-header .subtitle {
    font-size: 1.2rem;
  }
  
  th, td {
    padding: 12px 15px;
  }
  
  .arabic {
    font-size: 1.2rem;
  }
  
  .categories {
    padding-bottom: 5px;
    margin-top: 15px; /* CORREÇÃO: Mantido no mobile */
  }
  
  .category {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  
  .search-bar {
    padding: 10px 16px;
  }
  
  .container {
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .vocab-header h1 {
    font-size: 1.8rem;
  }
  
  th, td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
  
  .arabic {
    font-size: 1.1rem;
  }
  
  .audio-btn {
    width: 35px;
    height: 35px;
    font-size: 0.8rem;
  }
  
  .categories {
    margin-top: 10px; /* CORREÇÃO: Mantido no mobile pequeno */
  }
}

/* Limite de altura e scroll para a tabela de vocabulário */
.vocabulary-table {
  max-height: 700px; /* limite de altura da tabela */
  overflow-y: auto;   /* adiciona barra de rolagem vertical */
}

/* Mantém o cabeçalho fixo */
.vocabulary-table thead th {
  position: sticky;
  top: 0;
  background-color: #C0995D; /* mantém a cor do cabeçalho */
  z-index: 2;
}

/* Garante que tbody não quebre o layout */
.vocabulary-table table {
  display: block;
  width: 100%;
}

.vocabulary-table thead,
.vocabulary-table tbody {
  display: block;
}

.vocabulary-table tbody {
  max-height: 550px; /* altura do corpo da tabela */
  overflow-y: auto;
}

.vocabulary-table th,
.vocabulary-table td {
  width: 33.33%; /* ajusta a largura das colunas, caso tenha 3 colunas */
  box-sizing: border-box;
}

/* === RESPONSIVIDADE RODAPÉ === */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer-col {
    text-align: center;
  }
  
  .social-icons {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .footer-container {
    padding: 0 15px;
  }
  
  .footer-content {
    gap: 1rem;
  }
  
  .footer-col h3 {
    font-size: 1.2rem;
  }
}