/* ===================================
   Engadina Now - Hero Weather Card
   =================================== */

.hero-card {
  background: var(--gradient-sky);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl) var(--space-2xl);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-xl);
  transition: box-shadow var(--duration-normal) var(--ease-smooth);
}

/* ===== Header ===== */
.hero-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-2xl);
}

.location-info {
  flex: 1;
}

.location-name {
  font-size: var(--text-xlarge);
  font-weight: var(--weight-medium);
  color: var(--forest-dark);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  margin: 0;
}

.location-elevation {
  font-size: var(--text-small);
  color: var(--text-secondary);
  font-weight: var(--weight-regular);
  display: block;
  margin-top: var(--space-xs);
}

.weather-icon-large {
  display: flex;
  align-items: center;
  justify-content: center;
}

.weather-icon-large .icon {
  font-size: 60px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* ===== Temperature Display ===== */
.temperature-display {
  margin-bottom: var(--space-lg);
}

.temp-primary {
  display: flex;
  align-items: baseline;
  gap: var(--space-xs);
}

.temp-value {
  font-size: var(--text-hero);
  font-weight: var(--weight-regular); /* NON bold - critical */
  color: var(--forest-dark);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
}

.temp-unit {
  font-size: var(--text-large);
  color: var(--text-secondary);
  font-weight: var(--weight-regular);
}

.temp-feels {
  font-size: var(--text-small);
  color: var(--text-tertiary);
  display: block;
  margin-top: var(--space-sm);
}

/* ===== Condition Display ===== */
.condition-display {
  margin-bottom: var(--space-xl);
}

.condition-text {
  font-size: var(--text-body);
  color: var(--text-secondary);
  font-weight: var(--weight-medium);
}

/* ===== Weather Details Grid ===== */
.weather-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin: var(--space-2xl) 0;
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  text-align: center;
}

.detail-label {
  font-size: var(--text-xsmall);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-weight: var(--weight-medium);
}

.detail-value {
  font-size: var(--text-body);
  color: var(--text-primary);
  font-weight: var(--weight-medium);
}

/* ===== Temperature Chart ===== */
.temp-chart-container {
  margin: var(--space-xl) 0;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.temp-chart {
  width: 100%;
  height: 100%;
}

/* ===== Update Timestamp ===== */
.update-timestamp {
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: var(--space-lg);
  line-height: 1.4;
  font-weight: var(--weight-regular);
  opacity: 0.85;
  transition: opacity var(--duration-fast) var(--ease-smooth);
}

.update-timestamp:hover {
  opacity: 1;
}

/* Server Down Warning */
.update-timestamp.server-down {
  opacity: 1;
}

.update-time-warning {
  font-size: 12px;
  color: var(--warning-dark, #d97706);
  background: var(--warning-light, #fef3c7);
  border: 1px solid var(--warning-border, #fbbf24);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  display: inline-block;
  text-align: center;
}

.meteoswiss-link {
  color: var(--primary, #0369a1);
  text-decoration: none;
  font-weight: var(--weight-medium);
  border-bottom: 1px solid currentColor;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.meteoswiss-link:hover {
  color: var(--primary-dark, #075985);
  border-bottom-color: transparent;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 374px) {
  .hero-card {
    padding: var(--space-2xl) var(--space-lg);
  }

  .weather-details-grid {
    gap: var(--space-md);
  }

  .temp-value {
    font-size: 28px;
  }
}

/* ===================================
   COMPACT HERO CARD LAYOUT (v2.1)
   =================================== */

/* Header Compact: Location + Temp + Icon inline */
.hero-header-compact {
  margin-bottom: var(--space-lg);
}

.hero-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.location-info-inline {
  flex: 1;
}

.location-name-inline {
  font-size: var(--text-xlarge);
  font-weight: var(--weight-medium);
  color: var(--forest-dark);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  margin: 0;
  display: inline-block;
  margin-right: var(--space-sm);
}

.location-elevation-inline {
  font-size: var(--text-small);
  color: var(--text-secondary);
  font-weight: var(--weight-regular);
}

/* Temp + Icon Group */
.temp-icon-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.weather-icon-inline .icon {
  font-size: 90px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08));
  display: inline-flex;
  align-items: center;
}

.weather-icon-inline .icon svg,
.weather-icon-inline .icon .wmo-icon {
  width: 90px !important;
  height: 90px !important;
  color: var(--primary-color);
  display: block;
}

.temp-inline {
  display: flex;
  align-items: flex-start;
}

.temp-value-inline {
  font-size: 36px;
  font-weight: var(--weight-regular);
  color: var(--forest-dark);
  line-height: 1;
}

.temp-unit-inline {
  font-size: 20px;
  font-weight: var(--weight-regular);
  color: var(--text-secondary);
  margin-left: 2px;
  line-height: 1.2;
}

/* Weather Summary Row */
.weather-summary-row {
  margin-bottom: var(--space-md);
}

.condition-text-main {
  font-size: var(--text-large);
  color: var(--text-primary);
  font-weight: var(--weight-medium);
}

/* Weather Info Compact - Inline with separators */
.weather-info-compact {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-2xl);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
}

.info-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-small);
  color: var(--text-secondary);
}

.info-icon {
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.info-icon svg {
  width: 14px;
  height: 14px;
  color: var(--text-secondary);
  opacity: 0.9;
}

.info-value {
  font-weight: var(--weight-medium);
  color: var(--text-primary);
}

.info-separator {
  color: var(--text-tertiary);
  font-weight: var(--weight-regular);
  margin: 0 var(--space-xs);
}

/* ===== 5-Day Forecast Section ===== */
.forecast-section {
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(76, 144, 164, 0.15);
}

.forecast-title {
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  color: var(--forest-dark);
  margin: 0 0 var(--space-md) 0;
  letter-spacing: 0.01em;
}

.forecast-container {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--stone-grey) transparent;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-xs);
}

.forecast-day-card {
  flex: 0 0 auto;
  min-width: 95px;
  max-width: 95px;
  background: linear-gradient(135deg, rgba(224, 242, 254, 0.6), rgba(187, 222, 251, 0.4));
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  text-align: center;
  border: 1px solid rgba(187, 222, 251, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.forecast-day-name {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  line-height: 1.2;
}

.forecast-day-icon {
  font-size: 65px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.forecast-day-icon svg,
.forecast-day-icon .wmo-icon {
  width: 65px !important;
  height: 65px !important;
  color: var(--primary-color);
  display: block;
}

.forecast-day-condition {
  font-size: 9px;
  color: var(--text-tertiary);
  font-weight: var(--weight-medium);
  text-align: center;
  line-height: 1.2;
  margin-top: -4px;
  margin-bottom: 4px;
}

.forecast-day-temps {
  font-size: var(--text-xsmall);
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
  display: flex;
  gap: 2px;
  align-items: center;
}

.forecast-temp-min, .forecast-temp-max {
  font-size: var(--text-xsmall);
}

.forecast-day-rain {
  font-size: 10px;
  color: var(--text-tertiary);
  font-weight: var(--weight-medium);
  display: flex;
  align-items: center;
  gap: 2px;
}

.forecast-day-rain svg {
  width: 10px;
  height: 10px;
  color: var(--text-tertiary);
}

.forecast-day-wind {
  font-size: 10px;
  color: var(--text-tertiary);
  font-weight: var(--weight-medium);
}

/* Temperature Trend Bar (SVG) */
.trend-bar-container {
  margin-top: var(--space-md);
  height: 40px;
  position: relative;
}

.trend-bar {
  display: block;
  width: 100%;
  height: 100%;
}

.trend-bar path {
  fill: none;
  stroke: var(--lake-blue);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.trend-bar circle {
  fill: var(--lake-blue);
}

/* ===== Responsive - Compact Layout ===== */
@media (max-width: 768px) {
  .temp-value-inline {
    font-size: 32px;
  }

  .weather-icon-inline .icon {
    font-size: 45px;
  }

  .forecast-container {
    gap: var(--space-xs);
  }

  .forecast-day-card {
    padding: var(--space-sm) var(--space-xs);
  }

  .forecast-day-icon {
    font-size: 65px;
  }

  .forecast-day-icon svg,
  .forecast-day-icon .wmo-icon {
    width: 65px !important;
    height: 65px !important;
  }
}

@media (max-width: 374px) {
  .location-name-inline {
    font-size: var(--text-large);
  }

  .temp-value-inline {
    font-size: 28px;
  }

  .weather-info-compact {
    font-size: var(--text-xsmall);
  }
}
