/* Estilos do sidebar (copiados da primeira página) */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a {
  text-decoration: none;
}

.delimiter-sidebar{
  background-color: white;
  display: flex;
  justify-content: center;
  align-items: center;
}

.delimiter-box {
  width: 100%;
  display: flex;
  justify-content: center; 
  padding: 0 20px; 
}

.delimiter {
  max-width: 1300px;
  width: 100%; 
}

:root {
  --primary: #3022af;
  --secondary: #667eea;
  --light-bg: #f5f7fb;
  --card-bg: #ffffff;
  --text-dark: #333333;
  --text-light: #666666;
  --border: #e0e0e0;
  --good: #00e400;
  --moderate: #ffff00;
  --unhealthy: #ff7e00;
  --very-unhealthy: #ff0000;
  --hazardous: #8f3f97;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--primary);
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top header (sidebar) */
.sidebar {
  max-width: 1500px;
  width: 100%;
  height: 60px; /* Reduzido de 70px */
  background-color: #ffffff;
  color: var(--text-dark);
  padding: 0 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  padding: 0;
  border-bottom: none;
  margin: 0;
}

.logo img {
  height: 60px;
  margin-right: 10px;
}

.logo h1 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-dark);
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
}

.nav-right {
  margin-left: auto;
}

.nav-item {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 8px;
  color: var(--text-dark);
}

.nav-item:hover {
  background: rgba(0, 0, 0, 0.06);
}

.nav-item i {
  margin-right: 8px;
  font-size: 1rem;
  width: auto;
  text-align: left;
}

/* Estilos do Main Container */
.main-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 30px 20px;
}

.main-content {
  padding: 40px;
  width: 100%;
  animation: fadeInUp 0.6s ease-out;
}

.main-content h1 {
  color: white;
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 30px;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

/* Estilos dos controles */
.controls {
  background-color: white;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 20px;
  margin-bottom: 30px;
  align-items: end;
  padding: 25px;
  border-radius: 20px;
}

.controls label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.95rem;
}

.controls input[type="date"] {
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: var(--light-bg);
  color: var(--text-dark);
}

.controls input[type="date"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(48, 34, 175, 0.1);
  background-color: white;
}

#btnBuscar {
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(48, 34, 175, 0.3);
}

#btnBuscar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(48, 34, 175, 0.4);
}

#btnBuscar:active {
  transform: translateY(0);
}

/* Estilo da nota */
.note {
  background-color: var(--light-bg);
  border-left: 4px solid var(--primary);
  padding: 15px 20px;
  margin-bottom: 25px;
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

.btn-baixar {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Botão de download */
#baixar {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--good), #00b300);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0, 228, 0, 0.3);
  max-width: 500px;
}

#baixar:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 228, 0, 0.4);
}

#baixar:disabled {
  background: #cccccc;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Container de resultados */
.containerResult {
  display: flex;
  justify-content: center;
  align-items: center;
}
/* Resultados */
#resultado {
  margin: 25px 0;
  width: 100%;
  overflow-x: auto; /* Adiciona scroll horizontal */
}
/* Tabela - MELHORIAS APLICADAS */
table {
  width: auto; /* Mudei de 100% para auto */
  min-width: 100%; /* Garante que a tabela tenha pelo menos 100% de largura */
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  table-layout: auto; /* Mudei de fixed para auto para melhor adaptação */
}

thead {
  background: #3022af;
}

th {
  padding: 18px 15px; /* Aumentado o padding vertical */
  text-align: left;
  color: white;
  font-weight: 600;
  font-size: 15px; /* Aumentado o tamanho da fonte */
  text-transform: uppercase;
  letter-spacing: 0.8px; /* Aumentado o espaçamento */
  line-height: 1.3;
}

td {
  padding: 15px 12px; /* Aumentado o padding */
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word; /* Quebra palavras longas */
  overflow: hidden;
  text-overflow: ellipsis;
}

th,
td {
  min-width: 10px;
  max-width: 300px;
}

th:first-child,
td:first-child {
  min-width: 80px;
  max-width: 100px;
}

th:nth-child(2), /* Data */
td:nth-child(2) {
  min-width: 180px;
  max-width: 250px;
}

th:nth-child(3), /* Ozônio */
td:nth-child(3) {
  min-width: 140px;
  max-width: 200px;
}

/* Adicione esta classe para melhor visualização do scroll */
.containerResult {
  display: block; /* Mudei de flex para block */
  width: 100%;
  max-width: 100%;
}

/* Ajuste o width conforme suas colunas específicas */

tbody tr {
  transition: background-color 0.2s ease;
}

tbody tr:hover {
  background-color: #f8f9fa;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* Note */
.note {
  text-align: center;
  color: #666;
  font-style: italic;
  margin: 10px 0;
}

/* Responsividade */
@media (max-width: 768px) {
  table {
    font-size: 12px;
    table-layout: auto; /* Volta ao automático em mobile */
  }

  th,
  td {
    padding: 10px 8px;
    font-size: 12px;
  }

  /* Remove limites de largura em mobile */
  td:not(:first-child) {
    max-width: none;
  }
}

@media (max-width: 668px) {
  .controls {
    background-color: white;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
  }
}
@media (max-width: 1024px) {
  .top-row {
    grid-template-columns: 1fr;
  }

  .temp-large {
    font-size: 72px;
  }

  .weather-img {
    width: 120px;
  }

  .sidebar {
    height: 55px; 
    padding: 0 12px;
  }

  .logo h1 {
    font-size: 1rem;
  }

  .logo img {
    height: 50px; /* Ajustado */
  }

  .nav-item span {
    display: none;
  }
}

@media (max-width: 515px) {
  .controls {
    background-color: white;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .main-content {
    padding: 0px;
    padding-top: 20px;
  }

  .main-container{
    padding: 20px 0px;
  }
}

/* Animações */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.controls,
table {
  animation: fadeIn 0.5s ease-out;
}

/* Estados de loading */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Mensagens de status */
#resultado p {
  text-align: center;
  padding: 20px;
  background: white;
  border-radius: 8px;
  margin: 10px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Classe para texto reduzido */
.texto-reduzido {
  font-size: 13px;
  line-height: 1.3;
}

/* Tooltip para texto muito longo */
td[title] {
  cursor: help;
  position: relative;
}

td[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
}





/* Footer Moderno e Responsivo */
footer {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: #e2e8f0;
    padding: 3rem 0 1rem;
    position: relative;
    overflow: hidden;
    border-top: 2px solid #4299e1;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .footer-container {
        grid-template-columns: repeat(3, 1fr);
        align-items: start;
    }
}

/* Coluna Logo */
.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.footer-brand:hover {
    transform: translateX(5px);
}



.footer-brand:hover .footer-logo {
    transform: scale(1.05);
}

.brand-name {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0;
    background: linear-gradient(135deg, #4299e1, #68d391);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-description {
    font-size: 1.3rem;
    color: #a0aec0;
    margin: 0.25rem 0 0;
    line-height: 1.4;
}

/* Coluna Créditos */
.footer-credits {
    text-align: center;
}

@media (min-width: 768px) {
    .footer-credits {
        text-align: left;
    }
}

.credits-title {
    font-size: 2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.credits-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 50%;
    height: 2px;
    background: #4299e1;
    border-radius: 2px;
}

.credits-list {
    font-size: 1.3rem;
    line-height: 1.6;
    color: #cbd5e0;
}

.credits-institution {
    font-size: 1rem;
    color: #718096;
    margin-top: 1rem;
    font-style: italic;
}

/* Coluna Contato */
.footer-contact {
    text-align: center;
}

@media (min-width: 768px) {
    .footer-contact {
        text-align: right;
    }
}

.contact-title {
    font-size: 2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.contact-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 50%;
    height: 2px;
    background: #68d391;
    border-radius: 2px;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #63b3ed;
    text-decoration: none;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    background: rgba(66, 153, 225, 0.1);
}

.contact-email:hover {
    color: white;
    background: rgba(66, 153, 225, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.contact-email::before {
    content: '✉️';
    font-size: 0.75rem;
}

.contact-university {
    font-size: 1rem;
    color: #a0aec0;
    margin-top: 1rem;
    line-height: 1.5;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid #4a5568;
    margin-top: 3rem;
    padding-top: 1.5rem;
    text-align: center;
}

.footer-copyright {
    font-size: 0.875rem;
    color: #718096;
    margin: 0;
}

.footer-copyright::before {
    content: '©';
    margin-right: 0.25rem;
}

/* Efeitos de hover para todas as seções */
.footer-section {
    transition: transform 0.3s ease;
}

.footer-section:hover {
    transform: translateY(-2px);
}

/* Animações suaves */
.footer-container > * {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsividade para mobile */
@media (max-width: 767px) {
    footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-container {
        gap: 2rem;
        text-align: center;
    }
    
    .footer-brand {
        justify-content: center;
        flex-direction: column;
        text-align: center;
    }
    
    .brand-name {
        font-size: 1.25rem;
    }
    
    .credits-title::after,
    .contact-title::after {
        left: 50%;
        transform: translateX(-50%);
        width: 30%;
    }
    
    .contact-email {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    footer {
        background: linear-gradient(135deg, #0f1419 0%, #1a202c 100%);
    }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles para acessibilidade */
.contact-email:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

.advisor-info {
    font-size: 1.5rem;
    color: #ffffff;
    margin: 1rem 0;
    font-weight: 500;
    line-height: 1.5;
}

.advisor-name {
    font-weight: 600;
    color: #cbd5e0;
    font-size: 1.3rem;
}

