* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #eef4f8;
  color: #1f2933;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
}

header {
  margin-bottom: 24px;
}

h1 {
  margin: 0 0 6px;
  font-size: 2.5rem;
}

h2 {
  margin-top: 32px;
}

h3 {
  color: #243b53;
}

.subtitle {
  margin: 0 0 12px;
  color: #66788a;
  font-size: 1.05rem;
}


/* --------------------------------------------------
   AWS demo project link
-------------------------------------------------- */

.project-link {
  margin: 0 0 20px;
}

.project-link a {
  display: inline-block;
  padding: 8px 13px;

  border: 1px solid #9fb0bf;
  border-radius: 8px;

  background: #ffffff;
  color: #243b53;

  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.project-link a:hover {
  background: #e7eef5;
}


/* --------------------------------------------------
   Location search
-------------------------------------------------- */

.location-search-wrapper {
  max-width: 620px;
  position: relative;
}

.location-form {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.location-input-wrapper {
  flex: 1;
  position: relative;
  min-width: 0;
}

.location-form input {
  width: 100%;

  padding: 12px 14px;

  font-size: 1rem;

  border: 1px solid #bcc8d3;
  border-radius: 8px;

  outline: none;

  background: white;
  color: #1f2933;
}

.location-form input:focus {
  border-color: #506b85;
  box-shadow: 0 0 0 2px rgba(80, 107, 133, 0.12);
}


/*
  Search button only.

  This selector is intentionally limited to
  the direct submit button so autocomplete
  option buttons do not inherit this styling.
*/

.location-form > button {
  padding: 12px 20px;

  border: none;
  border-radius: 8px;

  background: #243b53;
  color: white;

  font-size: 1rem;
  font-weight: 600;

  cursor: pointer;
}

.location-form > button:hover {
  background: #334e68;
}


/* --------------------------------------------------
   Location autocomplete
-------------------------------------------------- */

.location-suggestions {
  display: none;

  position: absolute;

  top: calc(100% + 5px);
  left: 0;
  right: 0;

  z-index: 1000;

  background: #ffffff;

  border: 1px solid #bcc8d3;
  border-radius: 8px;

  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);

  overflow: hidden;
}

.location-suggestions.open {
  display: block;
}


/*
  Important:
  Explicitly override normal button appearance.
*/

.location-suggestions .location-suggestion {
  appearance: none;
  -webkit-appearance: none;

  display: block;

  width: 100%;

  margin: 0;
  padding: 11px 14px;

  border: none;
  border-bottom: 1px solid #e2e8ee;
  border-radius: 0;

  background: #ffffff;
  color: #1f2933;

  text-align: left;

  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  font-weight: 400;

  line-height: 1.35;

  cursor: pointer;
}

.location-suggestions .location-suggestion:last-child {
  border-bottom: none;
}

.location-suggestions .location-suggestion:hover,
.location-suggestions .location-suggestion:focus {
  background: #edf3f8;
  color: #1f2933;
  outline: none;
}

.suggestion-primary {
  display: block;

  font-weight: 600;
  color: #243b53;
}

.suggestion-secondary {
  display: block;

  margin-top: 3px;

  font-size: 0.82rem;
  color: #6b7c8c;
}

.geocode-credit {
  margin: 8px 0 0;

  font-size: 0.78rem;
  color: #7a8996;
}


/* --------------------------------------------------
   Status
-------------------------------------------------- */

#status {
  margin: 24px 0;
  font-weight: 600;
}


/* --------------------------------------------------
   Alerts
-------------------------------------------------- */

#alerts {
  margin-bottom: 24px;
}

.alert {
  background: #fff3cd;

  border-left: 5px solid #d39e00;
  border-radius: 8px;

  padding: 16px;
  margin-bottom: 12px;
}


/* --------------------------------------------------
   Current conditions
-------------------------------------------------- */

.current-weather {
  margin-bottom: 30px;
}

.current-card {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 30px;

  background: white;

  border-radius: 14px;

  padding: 24px;

  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.current-main {
  display: flex;
  align-items: center;
  gap: 20px;
}

.current-icon {
  width: 100px;
  height: 100px;

  object-fit: cover;

  border-radius: 10px;

  display: none;
}

.current-temperature {
  font-size: 3.5rem;
  font-weight: bold;

  line-height: 1;

  margin-bottom: 8px;
}

#current-description {
  font-size: 1.2rem;
  font-weight: 600;
}

.current-details {
  min-width: 280px;
}

.current-details p {
  margin: 8px 0;
}


/* --------------------------------------------------
   Hourly forecast
-------------------------------------------------- */

.hourly-section {
  margin-bottom: 30px;
}

.hourly-forecast {
  display: flex;

  gap: 14px;

  overflow-x: auto;

  padding: 4px 2px 12px;

  scroll-behavior: smooth;
}

.hourly-card {
  flex: 0 0 135px;

  background: white;

  border-radius: 12px;

  padding: 16px 12px;

  text-align: center;

  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.hourly-time {
  font-weight: bold;
  margin-bottom: 10px;
}

.hourly-card img {
  width: 58px;
  height: 58px;

  object-fit: cover;

  border-radius: 6px;
}

.hourly-temperature {
  font-size: 1.5rem;
  font-weight: bold;

  margin: 8px 0 4px;
}

.hourly-forecast-text {
  font-size: 0.9rem;
  line-height: 1.2;
}

.hourly-precip {
  margin-top: 8px;

  font-size: 0.85rem;
  color: #506273;
}


/* --------------------------------------------------
   Multi-day forecast
-------------------------------------------------- */

.forecast-grid {
  display: grid;

  grid-template-columns:
    repeat(
      auto-fit,
      minmax(190px, 1fr)
    );

  gap: 16px;
}

.forecast-card {
  background: white;

  border-radius: 12px;

  padding: 18px;

  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.forecast-card h3 {
  margin-top: 0;
}

.forecast-card img {
  width: 70px;
  height: 70px;
}

.temperature {
  font-size: 1.8rem;
  font-weight: bold;

  margin: 8px 0;
}


/* --------------------------------------------------
   AWS demo project documentation
-------------------------------------------------- */

.project-notes {
  margin-top: 72px;

  padding-top: 42px;
  padding-bottom: 30px;

  border-top: 2px solid #d5dfe7;
}

.project-heading {
  max-width: 820px;

  margin-bottom: 28px;
}

.project-eyebrow {
  margin: 0 0 6px;

  text-transform: uppercase;

  letter-spacing: 0.08em;

  font-size: 0.78rem;
  font-weight: 700;

  color: #66788a;
}

.project-notes h2 {
  margin-top: 0;
  margin-bottom: 10px;
}

.project-intro {
  margin: 0;

  font-size: 1.03rem;

  line-height: 1.6;

  color: #536273;
}

.project-grid {
  display: grid;

  grid-template-columns:
    repeat(
      auto-fit,
      minmax(260px, 1fr)
    );

  gap: 18px;
}

.project-card {
  background: #ffffff;

  border: 1px solid #d9e2e8;
  border-radius: 12px;

  padding: 20px;
}

.project-card h3 {
  margin-top: 0;
  margin-bottom: 10px;

  font-size: 1.05rem;
}

.project-card p {
  margin: 0;

  line-height: 1.55;

  color: #3f4f5f;
}

.project-card ul {
  margin: 0;

  padding-left: 20px;

  line-height: 1.55;

  color: #3f4f5f;
}

.project-card li {
  margin-bottom: 5px;
}

.project-card li:last-child {
  margin-bottom: 0;
}

.project-summary {
  margin-top: 24px;

  padding: 18px 20px;

  border-left: 4px solid #334e68;
  border-radius: 4px;

  background: #e6edf4;

  line-height: 1.6;

  color: #293b4c;
}

.back-to-top {
  margin: 24px 0 0;
}

.back-to-top a {
  color: #334e68;

  text-decoration: none;

  font-weight: 600;
}

.back-to-top a:hover {
  text-decoration: underline;
}


/* --------------------------------------------------
   Mobile
-------------------------------------------------- */

@media (max-width: 700px) {

  .container {
    padding: 24px 14px;
  }

  h1 {
    font-size: 2rem;
  }

  .location-form {
    flex-direction: column;
  }

  .location-form > button {
    width: 100%;
  }

  .location-suggestions {
    top: calc(100% + 5px);
  }

  .current-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .current-main {
    align-items: center;
  }

  .current-details {
    min-width: 0;
  }

  .current-temperature {
    font-size: 3rem;
  }

  .current-icon {
    width: 80px;
    height: 80px;
  }

  .hourly-card {
    flex-basis: 120px;
  }

  .project-notes {
    margin-top: 55px;
    padding-top: 32px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

}