/* ── PAGE HEADER ── */
.page-header {
  padding-top: 64px;
  background: linear-gradient(135deg, #1565c0 0%, #0288d1 60%, #4fc3f7 100%);
  padding-bottom: 48px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '☁';
  position: absolute;
  font-size: 200px;
  opacity: 0.07;
  top: -30px;
  right: 40px;
  pointer-events: none;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 50px;
  background: var(--cream);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.page-header-content {
  position: relative;
  z-index: 2;
}

.page-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.page-header h1 {
  font-family: 'Baloo 2', cursive;
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 8px;
}

.page-header p {
  font-size: 16px;
  opacity: 0.85;
}

/* ── WEATHER MAIN ── */
.weather-main {
  padding: 40px 0 80px;
}

/* ── LOCATION BAR ── */
.location-bar {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
  border: 1px solid var(--border);
}

.location-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--brown);
}

.location-left i { color: #e53935; font-size: 18px; }

.location-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.city-input {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  width: 200px;
}

.city-input:focus { border-color: #0288d1; }

.btn-search {
  background: #0288d1;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-search:hover { background: #0277bd; }

.btn-locate {
  background: var(--green-pale);
  color: var(--green);
  border: 1.5px solid var(--green-light);
  border-radius: 8px;
  padding: 8px 16px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-locate:hover { background: #c8e6c9; }

/* ── LOADING & ERROR ── */
.loading-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--border);
  border-top-color: #0288d1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-state {
  text-align: center;
  padding: 60px 20px;
  color: #e53935;
}

.error-state i { font-size: 40px; margin-bottom: 12px; }

/* ── CURRENT WEATHER CARD ── */
.current-weather-card {
  background: linear-gradient(135deg, #1565c0 0%, #0288d1 100%);
  border-radius: 20px;
  padding: 36px;
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  color: white;
  box-shadow: 0 8px 32px rgba(2,136,209,0.3);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.current-weather-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 240px; height: 240px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

.current-left {
  text-align: center;
  flex-shrink: 0;
}

.current-icon { font-size: 72px; line-height: 1; margin-bottom: 8px; }

.current-temp {
  font-family: 'Baloo 2', cursive;
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}

.current-desc {
  font-size: 16px;
  font-weight: 500;
  text-transform: capitalize;
  margin-bottom: 4px;
  opacity: 0.9;
}

.current-city {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 2px;
}

.current-date {
  font-size: 13px;
  opacity: 0.75;
}

.current-right { flex: 1; min-width: 260px; }

.weather-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.w-detail-box {
  background: rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.15);
  transition: background 0.2s;
}

.w-detail-box:hover { background: rgba(255,255,255,0.2); }

.w-detail-box i {
  font-size: 18px;
  margin-bottom: 6px;
  opacity: 0.85;
  display: block;
}

.w-detail-box strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

.w-detail-box span {
  font-size: 11px;
  opacity: 0.72;
}

/* ── FARM ADVISORY ── */
.farm-advisory {
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  border: 2px solid;
  transition: all 0.3s;
}

.farm-advisory.good {
  background: #e8f5e9;
  border-color: var(--green-light);
  color: var(--green);
}

.farm-advisory.warning {
  background: #fff8e1;
  border-color: var(--yellow);
  color: #f57f17;
}

.farm-advisory.bad {
  background: #ffebee;
  border-color: #ef9a9a;
  color: #c62828;
}

.advisory-icon { font-size: 36px; flex-shrink: 0; }

.advisory-text strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.advisory-text p {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.85;
}

/* ── SECTION LABEL ── */
.section-label {
  font-family: 'Baloo 2', cursive;
  font-size: 20px;
  font-weight: 800;
  color: var(--brown);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label i { color: #0288d1; }

.forecast-section { margin-bottom: 36px; }

/* ── 5 DAY FORECAST ── */
.forecast-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.forecast-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 14px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1.5px solid var(--border);
  transition: all 0.25s;
}

.forecast-card:hover {
  transform: translateY(-4px);
  border-color: #4fc3f7;
  box-shadow: 0 8px 24px rgba(2,136,209,0.15);
}

.forecast-card.today {
  background: linear-gradient(135deg, #e3f2fd, #e1f5fe);
  border-color: #0288d1;
}

.forecast-day {
  font-size: 13px;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 8px;
}

.forecast-icon { font-size: 32px; margin-bottom: 8px; }

.forecast-temp-max {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.forecast-temp-min {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 6px;
}

.forecast-rain {
  font-size: 12px;
  color: #0288d1;
  font-weight: 500;
}

/* ── HOURLY FORECAST ── */
.hourly-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.hourly-scroll::-webkit-scrollbar { height: 4px; }
.hourly-scroll::-webkit-scrollbar-track { background: transparent; }
.hourly-scroll::-webkit-scrollbar-thumb {
  background: #b0bec5;
  border-radius: 2px;
}

.hourly-card {
  background: var(--white);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
  flex-shrink: 0;
  min-width: 80px;
  box-shadow: var(--shadow);
  border: 1.5px solid var(--border);
  transition: all 0.2s;
}

.hourly-card:hover {
  border-color: #4fc3f7;
  transform: translateY(-2px);
}

.hourly-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 6px;
}

.hourly-icon { font-size: 22px; margin-bottom: 6px; }

.hourly-temp {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

/* ── TIPS GRID ── */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tip-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid;
  transition: transform 0.2s;
}

.tip-card:hover { transform: translateY(-3px); }

.tip-card.green  { border-color: var(--green); }
.tip-card.blue   { border-color: #0288d1; }
.tip-card.yellow { border-color: var(--yellow); }
.tip-card.red    { border-color: #e53935; }

.tip-card-icon { font-size: 26px; margin-bottom: 10px; }

.tip-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 6px;
}

.tip-card p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .current-weather-card { flex-direction: column; text-align: center; }
  .weather-detail-grid  { grid-template-columns: repeat(2, 1fr); }
  .forecast-grid        { grid-template-columns: repeat(2, 1fr); }
  .tips-grid            { grid-template-columns: 1fr; }
  .location-bar         { flex-direction: column; align-items: stretch; }
  .location-right       { flex-direction: column; }
  .city-input           { width: 100%; }
}

@media (max-width: 480px) {
  .forecast-grid { grid-template-columns: repeat(2, 1fr); }
}