:root {
  --green-dark: #126635;
  --green-light: #97cc68;
  --white: #ffffff;
  --bg-soft: #f6fbf3;
  --text-main: #143122;
  --text-muted: #3e5a4b;
  --danger: #bb1f1f;
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-soft: 0 14px 34px rgba(18, 102, 53, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--text-main);
  background: linear-gradient(180deg, #f8fcf7 0%, #edf7e9 100%);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--green-dark);
  box-shadow: 0 8px 22px rgba(5, 30, 16, 0.25);
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
}

.brand-logo {
  width: 168px;
  height: auto;
}

.site-nav {
  display: none;
  gap: 1.4rem;
  color: var(--white);
  font-weight: 600;
}

.site-nav a {
  opacity: 0.95;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--green-light);
}

.language-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0.2rem;
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--white);
  border-radius: 999px;
  min-width: 42px;
  padding: 0.35rem 0.6rem;
  font-weight: 700;
  cursor: pointer;
}

.lang-btn.is-active {
  background: var(--white);
  color: var(--green-dark);
}

.hero-section {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 3.5rem;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.hero-brand-wrap {
  width: fit-content;
  background: var(--white);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  margin-bottom: 1.2rem;
}

.hero-logo {
  width: 280px;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 2.8vw, 3rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h2,
h3 {
  margin-top: 0;
  line-height: 1.25;
}

.hero-text {
  margin: 0.65rem 0;
  color: var(--text-muted);
  font-size: 1.03rem;
}

.btn {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  opacity: 0.95;
}

.btn-primary {
  background: var(--green-dark);
  color: var(--white);
  box-shadow: 0 12px 24px rgba(18, 102, 53, 0.3);
}

.btn-secondary {
  background: var(--green-light);
  color: #0d2d1b;
}

.hero-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.hero-shape-one {
  width: 300px;
  height: 300px;
  top: -90px;
  inset-inline-end: -70px;
  background: radial-gradient(circle, rgba(151, 204, 104, 0.45) 0%, rgba(151, 204, 104, 0.08) 65%, rgba(151, 204, 104, 0) 100%);
}

.hero-shape-two {
  width: 360px;
  height: 360px;
  bottom: -210px;
  inset-inline-start: -140px;
  background: radial-gradient(circle, rgba(18, 102, 53, 0.18) 0%, rgba(18, 102, 53, 0.04) 65%, rgba(18, 102, 53, 0) 100%);
}

.lead-section,
.bmi-section {
  padding: 1.8rem 0 3.2rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.45rem;
}

.lead-card h2,
.bmi-card h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.35rem, 2.1vw, 1.9rem);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.95rem;
}

.field label,
.field legend {
  display: block;
  margin-bottom: 0.36rem;
  font-weight: 600;
  color: #2b4839;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"] {
  width: 100%;
  border: 1px solid #d3e4d4;
  border-radius: 12px;
  padding: 0.68rem 0.8rem;
  font-size: 1rem;
  color: var(--text-main);
  background: #fcfefb;
}

input:focus-visible,
.btn:focus-visible,
.lang-btn:focus-visible {
  outline: 3px solid rgba(151, 204, 104, 0.5);
  outline-offset: 1px;
}

.goal-group {
  border: 1px solid #dbead9;
  border-radius: 12px;
  margin: 1rem 0;
  padding: 0.8rem 0.95rem 0.95rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.38rem;
}

.radio-option input {
  accent-color: var(--green-dark);
}

.form-note {
  margin: 0.8rem 0;
  color: #355847;
  font-size: 0.95rem;
}

.feedback {
  min-height: 1.4rem;
  margin-top: 0.7rem;
  font-weight: 600;
}

.feedback.is-error {
  color: var(--danger);
}

.feedback.is-success {
  color: var(--green-dark);
}

.formula-title {
  margin-bottom: 0.2rem;
  color: #2f4b3a;
  font-weight: 700;
}

.formula {
  margin-top: 0;
  margin-bottom: 1rem;
  padding: 0.6rem 0.8rem;
  background: var(--bg-soft);
  border-radius: 10px;
  border: 1px dashed rgba(18, 102, 53, 0.28);
}

.bmi-grid {
  margin-bottom: 0.8rem;
}

.bmi-result {
  margin-top: 1rem;
  border: 1px solid #d9e8da;
  border-radius: 12px;
  padding: 0.85rem;
  background: #f7fcf5;
}

.bmi-categories {
  margin-top: 1rem;
  display: grid;
  gap: 0.55rem;
}

.category {
  margin: 0;
  border-radius: 10px;
  padding: 0.56rem 0.72rem;
  border: 1px solid transparent;
}

.category.is-active {
  border-color: rgba(18, 102, 53, 0.5);
  box-shadow: 0 8px 20px rgba(18, 102, 53, 0.13);
  font-weight: 700;
}

.category.underweight.is-active {
  background: #ecf5ff;
}

.category.normal.is-active {
  background: #ebf9e4;
}

.category.overweight.is-active {
  background: #fff8e8;
}

.category.obese.is-active {
  background: #ffecee;
}

.site-footer {
  background: #0f4f2b;
  color: var(--white);
  text-align: center;
  padding: 1.1rem 0 1.4rem;
  margin-top: 1.5rem;
}

[dir="rtl"] .site-nav,
[dir="rtl"] .header-inner,
[dir="rtl"] .goal-group,
[dir="rtl"] .radio-option {
  direction: rtl;
}

@media (min-width: 760px) {
  .site-nav {
    display: flex;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-card,
  .bmi-card {
    padding: 1.7rem;
  }
}

@media (min-width: 980px) {
  .lead-section,
  .bmi-section {
    padding-top: 2.4rem;
  }

  .hero-section {
    padding-top: 5.4rem;
  }
}
