/* =========================================
   VARIÁVEIS GERAIS E RESET
   ========================================= */
:root {
  --color-maroon: #6b0202;
  --color-red: hsl(0, 100%, 51%);
  --color-orange: #fe6600;
  --color-purple: #770093;
  --color-white: #ffffff;
  --color-dark: #000000;
  --color-light-red: #f0535f;
  
  --font-gravitas: 'Gravitas One', cursive;
  --font-great-vibes: 'Great Vibes', cursive;
  --font-montserrat-alt: 'Montserrat Alternates', sans-serif;
  --font-inter: 'Inter', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #f4f4f4;
  font-family: 'Montserrat', sans-serif;
  color: #000;
  overflow-x: hidden;
}

/* --- ESTRUTURA PRINCIPAL --- */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 20px 40px;
}

/* --- CABEÇALHO (Logo Imagem + Pesquisa) --- */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding-left: 20px;
}

.logo-container-img {
  max-width: 300px;
}

.logo-img-file {
  width: 100%;
  height: auto;
  display: block;
}

.search-container {
  position: relative;
  width: 50%;
  max-width: 600px;
}

.search-bar {
  width: 100%;
  padding: 12px 20px;
  border-radius: 25px;
  border: none;
  background-color: #e8e8e8;
  font-size: 16px;
  outline: none;
}

.search-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #333;
}

/* --- CORPO PRINCIPAL --- */
.main-content {
  display: flex;
  flex: 1;
  gap: 40px;
}

/* --- MENU LATERAL --- */
.sidebar {
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: #000;
  font-size: 16px;
}

.nav-item:hover b {
  color: #7a1b1b;
  transition: 0.2s;
}

/* --- CAIXA DE ENTRADA --- */
.inbox-container {
  flex: 1;
  background-color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.inbox-header {
  padding: 20px 30px;
  border-bottom: 2px solid #000;
}

.inbox-header .tab {
  font-size: 18px;
  color: #7a1b1b;
}

/* --- LISTA DE E-MAILS --- */
.email-row {
  border-bottom: 1px solid #000;
  max-height: 50px;
  overflow: hidden;
  transition: max-height 0.6s ease;
}

.email-header-visible {
  display: flex;
  align-items: center;
  padding: 15px 30px;
  gap: 15px;
  cursor: pointer;
  height: 50px;
}

.email-list {
  flex: 1;
  overflow-y: auto;
  max-height: calc(100vh - 200px);
}

.email-subject {
  font-size: 16px;
  color: #000;
}

.email-body {
  padding: 10px 30px 30px 75px;
  font-size: 15px;
  line-height: 1.6;
  color: #444;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.email-body p {
  font-style: italic;
  color: #555;
  padding-left: 10px;
  border-left: 2px solid #7a1b1b;
}

.email-row:hover {
  max-height: 2500px; /* Permite abertura total */
  background-color: #fafafa;
}

.email-row:hover .email-body {
  opacity: 1;
}

/* --- RODAPÉ --- */
.footer { 
  background-color: var(--color-white); 
  padding: 30px 0; 
  border-top: 1px solid #eee;
}

.footer-title { 
  font-family: var(--font-montserrat-alt); 
  color: var(--color-maroon); 
  font-size: 28px; 
}

.social-icons { display: flex; gap: 20px; align-items: center; }
.social-icons img { width: 30px; height: 30px; transition: transform 0.2s; cursor: pointer; }

/* =========================================
   RESPONSIVIDADE (CELULARES E TABLETS)
   ========================================= */
@media screen and (max-width: 900px) {
  .app-container {
    height: auto ;
    min-height: 100vh;
    padding: 15px ;
  }

  /* Ajuste da Logo PNG e Pesquisa */
  .top-bar {
    flex-direction: column ;
    align-items: center ;
    gap: 15px ;
    padding-left: 0 ;
    margin-bottom: 25px ;
  }

  .logo-container-img {
    width: 75% ;
    max-width: 250px ;
  }

  .search-container {
    width: 100%;
    margin: 0 auto;
  }

  /* Corpo e Menu Lateral */
  .main-content {
    flex-direction: column ;
    gap: 20px ;
  }

  .sidebar {
    width: 100% ;
    flex-direction: row ;
    justify-content: space-evenly ;
    padding-top: 0 ;
  }

  .nav-item {
    font-size: 13px ;
    flex-direction: column ;
    text-align: center;
  }

  /* Caixa de Entrada e E-mails */
  .inbox-container {
    height: auto ;
    overflow: visible ;
  }

  .email-list {
    max-height: none ;
    overflow: visible ;
  }

  .email-row:hover {
    max-height: 3000px ; 
  }

  .email-body {
    padding: 15px 20px 30px 40px ;
    font-size: 14px ;
    max-height: none ;
    opacity: 1 ;
  }

  /* Rodapé sem sobreposição */
  .footer {
    position: relative ;
    margin-top: 40px ;
  }

  .footer .container {
    flex-direction: column ;
    gap: 20px ;
    text-align: center;
    align-items: center;
  }

  .social-icons {
    flex-direction: column ;
    gap: 10px;
  }
}