* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  background-color: #eef3f8;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

.site-header {
  background-color: #0a2f3a;
  border-bottom: 4px solid #2dd4bf;
  color: #ffffff;
}

.header-flex {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
}

.brand {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 70px;
}

.brand-text h1 {
  margin: 0;
  font-size: 32px;
}

.brand-text p {
  margin: 5px 0 0 0;
  color: #c9fff7;
}

.logo {
  width: 140px;
  height: auto;
}

.hero {
  background-image: url("hero.png");
  background-position: right center;
  background-size: cover;
  background-repeat: no-repeat;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr minmax(300px, 600px);
  align-items: center;
  min-height: 600px;
  box-shadow: 0 14px 28px rgba(43, 98, 100, 0.50);
}

.hero-space {
  min-height: 600px;
}

.hero-content {
  color: #003844;
  max-width: 600px;
  margin-left: -120px;
}

.hero-content h2 {
  font-size: 50px;
  margin-bottom: 30px;
}

.hero-content p {
  font-size: 18px;
  margin-bottom: 30px;
}

.hero-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 22px;
  background-color: #2dd4bf;
  color: #003844;
  text-decoration: none;
  font-weight: bold;
  border-radius: 20px;
}

.hero-btn:hover {
  background-color: #1fb5a3;
}

.intro {
  margin-bottom: 20px;
}

.tips-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.tip-card {
  background: #ffffff;
  border: 1px solid #cccccc;
  padding: 15px;
  border-radius: 10px;
}

.tip-card h3 {
  margin-top: 0;
}

.tip-card ul {
  padding-left: 20px;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-list a {
  text-decoration: none;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #74a4aa;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.nav-list a:hover {
  color: #0f766e;
  border-bottom: 2px solid #0f766e;
}

.nav-list a:active {
  color: #797c80;
  border-bottom: 2px solid #1f2937;
}

.main {
  flex: 1;
  padding: 22px 0;
}

.main-box {
  background-color: #ffffff;
  border: 1px solid #d7e2ea;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.section {
  margin-bottom: 0;
  padding: 18px;
  background-color: #ffffff;
  border: 1px solid #d7e2ea;
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
}

.section:last-child {
  margin-bottom: 0;
}

h2 {
  margin: 0 0 12px 0;
  color: #0a2f3a;
}

h3 {
  margin-top: 18px;
  color: #0a2f3a;
}

p {
  margin: 10px 0;
}

ul {
  margin: 10px 0;
  padding: 0;
  list-style: none;
}

form {
  margin-top: 14px;
  padding: 18px;
  background-color: #f6fbff;
  border: 1px solid #d7e2ea;
  border-radius: 16px;
}

label {
  display: block;
  font-weight: bold;
  margin-bottom: 6px;
  color: #0f172a;
}

input[type="number"] {
  width: 100%;
  max-width: 380px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #c8d7e2;
  background-color: #ffffff;
}

input[type="submit"] {
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid #0a2f3a;
  background-color: #0a2f3a;
  color: #ffffff;
  font-weight: bold;
  box-shadow: 0 10px 18px rgba(10, 47, 58, 0.18);
}

input[type="submit"]:hover {
  background-color: #083440;
}

.error {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #c62828;
  background-color: #ffecec;
}

.result {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #2e7d32;
  background-color: #eaffea;
}

.site-footer {
  background-color: #0a2f3a;
  border-top: 4px solid #2dd4bf;
  color: #c9fff7;
}

.footer-flex {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.footer-box {
  min-width: 240px;
  padding: 6px 0;
}

.site-footer p {
  margin: 6px 0;
}

.site-footer strong {
  color: #ffffff;
}

@media (max-width: 900px) {
  .main-box {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 28px 14px;
  }

  .hero-space {
    display: none;
  }

  .hero-content {
    margin-left: 0;
    max-width: 100%;
    padding: 16px;
    border-radius: 14px;
  }

  .hero-content h2 {
    font-size: 28px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .footer-flex {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .header-flex {
    grid-template-columns: 1fr;
  }

  .brand {
    grid-template-columns: 1fr;
    gap: 20px;
    justify-items: start;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-box {
    padding: 16px;
  }

  input[type="number"] {
    max-width: 100%;
  }
}