/* Reset e configurações básicas */
* {
  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-box2 {
  background-color: white;
}


.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: #ffffff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background 1s ease;
}

/* Top header (previously 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; /* Reduzido de 150px */
  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; /* Reduzido ligeiramente */
  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.active {
  background: rgba(48, 34, 175, 0.06);
  border-bottom: 4px solid var(--primary);
}

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

/* Conteúdo principal */
.main-content {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.current-time {
  font-size: 1.5rem;
  font-weight: 500;
  color: #ffffff;
}

.update-status {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}

/* Top row: summary + temperature chart */
.top-row {
  display: grid;
  grid-template-columns: minmax(300px, 400px) 1fr; /* fixed-ish summary, flexible chart */
  gap: 20px;
  margin-bottom: 30px;
  align-items: stretch;
  grid-auto-rows: auto;
}

.summary-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  max-width: 400px;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--primary);
}

.card-top {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
}

.weather-img {
  width: 100px;
  height: auto;
  flex-shrink: 0;
}

.weather-values {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  flex: 1;
}

.temp-large {
  font-size: 100px;
  line-height: 1;
  color: var(--primary);
  font-weight: 600;
}

.humidity-sensation {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px; /* Adicionado para separar da temperatura */
  padding-top: 15px;
  border-top: 1px solid var(--border);
}

.metric-small {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
}

.summary-metrics {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.metric {
  flex: 1;
  background: #fbfbff;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.metric-label {
  font-size: 0.85rem;
  color: var(--text-light);
}

.metric-value {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 6px;
}

.temp-chart-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  min-height: 220px;
  display: flex;
  align-items: stretch;
}

/* Seção de gráficos (full-width branca que cresce) */
.charts-section {
  background: var(--card-bg);
  width: 100%;
  border-radius: 0;
  padding: 10px;
  box-sizing: border-box;
}

.section-header {
  display: flex;
  justify-content: center;
  text-align: center;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-dark);
}

.chart-container {
  position: relative;
  height: auto;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.chart-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  min-height: 320px;
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.chart-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.chart-card canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Media Queries para responsividade */
@media (max-width: 1200px) {
  .temp-large {
    font-size: 80px;
  }
  .weather-img {
    width: 90px;
  }
}

@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: 768px) {
  body {
    flex-direction: column;
  }

  .sidebar {
    height: 50px; 
    padding: 0 10px;
  }

  .logo h1 {
    display: none;
  }
  .nav-menu {
    gap: 6px;
  }

  .main-content {
    padding: 15px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .current-time {
    font-size: 1.3rem;
  }

  .card-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .weather-values {
    align-items: center;
  }

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

  .weather-img {
    width: 100px;
  }

  .charts-section {
    width: calc(100% + 30px);
    margin-left: -15px;
    margin-right: -15px;
    padding: 15px;
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .chart-selector {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .sidebar {
    height: 45px; /* Ajustado */
  }

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

  .nav-item {
    padding: 6px 8px; /* Ajustado */
  }

  .main-content {
    padding: 10px;
  }

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

  .weather-img {
    width: 80px;
  }

  .metric-small {
    font-size: 0.9rem;
  }

  .charts-section {
    width: calc(100% + 20px);
    margin-left: -10px;
    margin-right: -10px;
    padding: 10px;
  }

  .chart-card {
    min-height: 250px;
  }
}

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

.summary-card,
.charts-section {
  animation: fadeIn 0.5s ease-out;
}

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

.loading::after {
  content: "Atualizando...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
}




/* 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;
}


