:root {
  --verde-escuro: #173f35;
  --verde: #28745a;
  --verde-claro: #e9f2ec;
  --creme: #f8f8f1;
  --branco: #ffffff;
  --texto: #26352f;
  --texto-suave: #617169;
  --linha: #dce6dd;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Exemplo apenas para visualização (remova o background do body ao integrar no seu site) */
.weather-section {
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--texto);
  padding: 80px 20px;
}

/* =========================================
    SEÇÃO DE CLIMA (SEM FUNDO SÓLIDO)
========================================= */
.weather-container {
  width: 100%;
  max-width: 960px;
  padding: 20px;
  position: relative;
  background-color: transparent;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 32px;
  align-items: center;
}

/* Coluna Esquerda: Contexto e Secagem do Solo */
.weather-info {
  background-color: transparent;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.weather-info-title {
  margin: 0.45rem 0 1rem;
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--verde-escuro);
  line-height: 1.15;
}

.weather-info-text {
  line-height: 1.65;
  color: var(--texto);
  font-size: 1.04rem;
}

.weather-info-highlight {
  padding-left: 14px;
  border-left: 2px solid var(--verde);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--texto-suave);
}

/* Coluna Direita: Busca + Card */
.weather-widget-col {
  width: 100%;
  background-color: transparent;
}

/* Container de Busca + Autocomplete */
.search-wrapper {
  position: relative;
  margin-bottom: 18px;
  z-index: 30;
}

.search-input {
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  color: var(--texto);
  background-color: transparent;
  border: 1px solid var(--linha);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-input::placeholder {
  color: var(--texto-suave);
}

.search-input:focus {
  border-color: var(--verde);
  box-shadow: 0 0 0 3px rgba(40, 116, 90, 0.14);
}

/* Lista de Sugestões (Autocomplete) */
.suggestions-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background-color: var(--branco);
  border: 1px solid var(--linha);
  border-radius: 14px;
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 12px 28px rgba(23, 63, 53, 0.12);
}

.suggestions-list.active {
  display: block;
}

.suggestion-item {
  padding: 12px 18px;
  cursor: pointer;
  border-bottom: 1px solid var(--linha);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background-color: var(--verde-claro);
}

.suggestion-city {
  font-weight: 600;
  color: var(--verde-escuro);
}

.suggestion-region {
  font-size: 0.8rem;
  color: var(--texto-suave);
}

/* Card Principal do Clima */
.weather-card {
  position: relative;
  border-radius: 24px;
  padding: 32px 28px;
  background-color: var(--branco);
  color: var(--texto);
  border: 1px solid var(--linha);
  overflow: hidden;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background-color 0.5s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Períodos do Dia no Card */
.weather-card.period-day {
  background-color: var(--branco);
}

.weather-card.period-afternoon {
  background-color: var(--creme);
}

.weather-card.period-night {
  background-color: var(--verde-escuro);
  color: var(--branco);
  border-color: var(--verde);
}

.weather-card.period-night .city-name,
.weather-card.period-night .temperature {
  color: var(--branco);
}

.weather-card.period-night .city-country,
.weather-card.period-night .weather-details,
.weather-card.period-night .weather-tip {
  color: var(--verde-claro);
}

.weather-card.period-night .weather-tip {
  border-top-color: rgba(233, 242, 236, 0.2);
}

.weather-card.period-night .weather-badge {
  background-color: var(--verde);
  border-color: rgba(233, 242, 236, 0.25);
  color: var(--branco);
}

/* Camada de Interatividade Visual (Animações Climáticas) */
.weather-fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* Conteúdo de Texto sobreposto às animações */
.weather-content {
  position: relative;
  z-index: 2;
}

.weather-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.city-name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--verde-escuro);
  transition: color 0.4s ease;
}

.city-country {
  font-size: 0.9rem;
  color: var(--texto-suave);
  margin-top: 2px;
  transition: color 0.4s ease;
}

.weather-badge {
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 20px;
  background-color: var(--verde-claro);
  border: 1px solid var(--linha);
  color: var(--verde-escuro);
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

.weather-main {
  margin-top: 28px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.temperature {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--verde-escuro);
  transition: color 0.4s ease;
}

.weather-details {
  text-align: right;
  font-size: 0.9rem;
  color: var(--texto-suave);
  line-height: 1.6;
  transition: color 0.4s ease;
}

.weather-tip {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--linha);
  font-size: 0.88rem;
  color: var(--texto-suave);
  font-style: italic;
  line-height: 1.55;
  transition: color 0.4s ease, border-color 0.4s ease;
}

/* =========================================
    EFEITOS INTERATIVOS POR CLIMA (CSS)
========================================= */

/* 1. Sol Pulsante */
.fx-sun {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 50, 0.35) 0%, rgba(255, 170, 0, 0) 70%);
  animation: pulseSun 4s infinite alternate ease-in-out;
}

@keyframes pulseSun {
  0% { transform: scale(0.95); opacity: 0.65; }
  100% { transform: scale(1.25); opacity: 1; }
}

/* 2. Gotas de Chuva */
.raindrop {
  position: absolute;
  top: -20px;
  width: 2px;
  height: 16px;
  background: linear-gradient(to bottom, transparent, rgba(40, 116, 90, 0.45));
  animation: fallRain linear infinite;
}

.weather-card.period-night .raindrop {
  background: linear-gradient(to bottom, transparent, rgba(233, 242, 236, 0.45));
}

@keyframes fallRain {
  to { transform: translateY(280px); }
}

/* 3. Flocos de Neve */
.snowflake {
  position: absolute;
  top: -10px;
  width: 6px;
  height: 6px;
  background-color: rgba(23, 63, 53, 0.25);
  border-radius: 50%;
  animation: fallSnow linear infinite;
}

.weather-card.period-night .snowflake {
  background-color: rgba(255, 255, 255, 0.75);
}

@keyframes fallSnow {
  0% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(130px) translateX(12px); }
  100% { transform: translateY(270px) translateX(-8px); }
}

/* 4. Estrelas / Pontos Noturnos */
.star {
  position: absolute;
  width: 3px;
  height: 3px;
  background-color: var(--verde-claro);
  border-radius: 50%;
  animation: twinkle 2.5s infinite alternate ease-in-out;
}

@keyframes twinkle {
  0% { opacity: 0.15; transform: scale(0.8); }
  100% { opacity: 0.85; transform: scale(1.2); }
}

/* 5. Nuvens Flutuantes */
.cloud-blob {
  position: absolute;
  background: radial-gradient(circle, rgba(233, 242, 236, 0.9) 0%, rgba(233, 242, 236, 0) 70%);
  border-radius: 50%;
  animation: driftCloud 12s infinite alternate ease-in-out;
}

.weather-card.period-night .cloud-blob {
  background: radial-gradient(circle, rgba(40, 116, 90, 0.45) 0%, rgba(40, 116, 90, 0) 70%);
}

@keyframes driftCloud {
  from { transform: translateX(-15px); }
  to { transform: translateX(25px); }
}

/* 6. Flash de Tempestade */
.thunder-flash {
  animation: lightning 6s infinite;
}

@keyframes lightning {
  0%, 92%, 96%, 100% { box-shadow: none; }
  93%, 97% { box-shadow: inset 0 0 40px rgba(23, 63, 53, 0.16); }
}

/* Responsividade */
@media (max-width: 820px) {
  .weather-container {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 12px 0;
  }

  .weather-info-title {
    font-size: 1.75rem;
  }
}