/* ================================================
   FitnessCalc — Design System
   Primary: #10B981 | Accent: #059669 | Dark: #064E3B
   Fonts: Exo 2 (headings) + Nunito (body)
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;600;700;800;900&family=Nunito:wght@400;500;600;700&display=swap');

:root {
  --green:        #10B981;
  --green-dark:   #059669;
  --green-deeper: #047857;
  --green-pale:   #D1FAE5;
  --green-faint:  #ECFDF5;
  --dark:         #064E3B;
  --text:         #1F2937;
  --muted:        #6B7280;
  --border:       #E5E7EB;
  --white:        #FFFFFF;
  --shadow:       0 4px 24px rgba(16,185,129,0.10);
  --radius:       12px;
  --radius-sm:    8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  color: var(--text);
  background: #F9FAFB;
  line-height: 1.6;
}

/* HEADER */
header {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--green);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.logo {
  font-family: 'Exo 2', sans-serif;
  font-weight: 900;
  font-size: 1.45rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo span { color: var(--green); }
nav { display: flex; align-items: center; gap: 6px; }
nav a {
  font-family: 'Exo 2', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
nav a:hover { background: rgba(16,185,129,0.15); color: var(--green); }

/* HERO */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, #065F46 60%, #047857 100%);
  padding: 70px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(16,185,129,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(5,150,105,0.14) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-family: 'Exo 2', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 16px;
  position: relative;
}
.hero h1 em { font-style: normal; color: var(--green); }
.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.80);
  max-width: 580px;
  margin: 0 auto 32px;
  position: relative;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16,185,129,0.18);
  border: 1px solid rgba(16,185,129,0.35);
  color: var(--green);
  font-family: 'Exo 2', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
  position: relative;
}

/* SEARCH */
.search-wrap { max-width: 520px; margin: 0 auto; position: relative; }
.search-wrap input {
  width: 100%;
  padding: 14px 52px 14px 20px;
  border-radius: 50px;
  border: 2px solid rgba(16,185,129,0.3);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-size: 0.97rem;
  outline: none;
  transition: border 0.2s;
}
.search-wrap input::placeholder { color: rgba(255,255,255,0.45); }
.search-wrap input:focus { border-color: var(--green); background: rgba(255,255,255,0.12); }
.search-wrap svg {
  position: absolute;
  right: 18px; top: 50%;
  transform: translateY(-50%);
  color: var(--green);
  pointer-events: none;
}

/* SECTIONS */
.section { max-width: 1280px; margin: 0 auto; padding: 56px 24px; }
.section-title {
  font-family: 'Exo 2', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--green-pale), transparent);
  border-radius: 2px;
}

/* TOOL CARDS */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.tool-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.22s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--green);
  transform: scaleY(0);
  transition: transform 0.22s ease;
  transform-origin: bottom;
}
.tool-card:hover { border-color: var(--green); box-shadow: var(--shadow); transform: translateY(-3px); }
.tool-card:hover::before { transform: scaleY(1); }
.tool-icon {
  width: 42px; height: 42px;
  background: var(--green-faint);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: background 0.22s;
}
.tool-card:hover .tool-icon { background: var(--green-pale); }
.tool-card h3 {
  font-family: 'Exo 2', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.tool-card p { font-size: 0.82rem; color: var(--muted); line-height: 1.45; }
.tool-card .arrow {
  margin-top: auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green);
  font-family: 'Exo 2', sans-serif;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.2s;
}
.tool-card:hover .arrow { opacity: 1; }

/* CALCULATOR LAYOUT */
.calc-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 860px) { .calc-layout { grid-template-columns: 1fr; } }

.calc-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 36px;
  box-shadow: var(--shadow);
}
.calc-card h1 {
  font-family: 'Exo 2', sans-serif;
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 8px;
}
.calc-card .subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

/* Form */
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-family: 'Exo 2', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.form-row input, .form-row select {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border 0.2s;
}
.form-row input:focus, .form-row select:focus { border-color: var(--green); }

.toggle-row { display: flex; gap: 8px; margin-bottom: 20px; }
.toggle-btn {
  flex: 1;
  padding: 9px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: 'Exo 2', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.18s;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.toggle-btn.active { background: var(--green); border-color: var(--green); color: var(--white); }

.calc-btn {
  width: 100%;
  padding: 14px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Exo 2', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s;
  margin-top: 8px;
}
.calc-btn:hover { background: var(--green-dark); transform: translateY(-1px); }
.calc-btn:active { transform: translateY(0); }

/* Result */
.result-box {
  display: none;
  margin-top: 28px;
  padding: 24px;
  background: var(--green-faint);
  border: 2px solid var(--green-pale);
  border-radius: var(--radius);
}
.result-box.show { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

.result-main {
  font-family: 'Exo 2', sans-serif;
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--green-deeper);
  line-height: 1.1;
}
.result-label { font-size: 0.9rem; color: var(--green-dark); font-weight: 600; margin-bottom: 4px; }
.result-sub { font-size: 0.88rem; color: var(--muted); margin-top: 6px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.result-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border: 1px solid var(--green-pale);
}
.result-item .val {
  font-family: 'Exo 2', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--dark);
}
.result-item .lbl { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

/* Sidebar */
.sidebar h3 {
  font-family: 'Exo 2', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}
.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
}
.sidebar-links { list-style: none; }
.sidebar-links li + li { margin-top: 2px; }
.sidebar-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  transition: all 0.18s;
}
.sidebar-links a:hover { background: var(--green-faint); color: var(--green-deeper); }
.sidebar-links a .dot { width: 7px; height: 7px; background: var(--green); border-radius: 50%; flex-shrink: 0; }

/* Info box */
.info-box {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 28px 36px;
  margin: 0 0 32px;
}
.info-box h2 {
  font-family: 'Exo 2', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--dark);
  margin-bottom: 10px;
}
.info-box p { font-size: 0.93rem; color: var(--muted); line-height: 1.65; }
.info-box p + p { margin-top: 10px; }

/* Breadcrumb */
.breadcrumb { background: var(--white); border-bottom: 1px solid var(--border); padding: 10px 0; }
.breadcrumb-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  font-size: 0.83rem;
  color: var(--muted);
}
.breadcrumb-inner a { color: var(--green-dark); text-decoration: none; }
.breadcrumb-inner a:hover { text-decoration: underline; }
.breadcrumb-inner span { margin: 0 6px; }

/* Footer */
footer { background: var(--dark); color: rgba(255,255,255,0.65); padding: 44px 24px 28px; margin-top: 60px; }
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
@media (max-width: 768px) { .footer-top { grid-template-columns: 1fr 1fr; } }
.footer-brand .logo { font-size: 1.25rem; }
.footer-brand p { margin-top: 10px; font-size: 0.85rem; line-height: 1.6; color: rgba(255,255,255,0.5); }
.footer-col h4 {
  font-family: 'Exo 2', sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}
.footer-col ul { list-style: none; }
.footer-col li + li { margin-top: 6px; }
.footer-col a { color: rgba(255,255,255,0.55); text-decoration: none; font-size: 0.87rem; transition: color 0.18s; }
.footer-col a:hover { color: var(--green); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom a { color: rgba(255,255,255,0.45); text-decoration: none; }
.footer-bottom a:hover { color: var(--green); }

/* Pages */
.page-hero {
  background: linear-gradient(135deg, var(--dark) 0%, #065F46 100%);
  padding: 52px 24px;
  text-align: center;
}
.page-hero h1 { font-family: 'Exo 2', sans-serif; font-size: 2.2rem; font-weight: 900; color: var(--white); }
.page-hero p { color: rgba(255,255,255,0.7); margin-top: 10px; font-size: 1rem; }

.content-section { max-width: 820px; margin: 0 auto; padding: 52px 24px 80px; }
.content-section h2 {
  font-family: 'Exo 2', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--dark);
  margin: 36px 0 14px;
}
.content-section p { color: var(--text); line-height: 1.75; font-size: 0.96rem; margin-bottom: 14px; }
.content-section ul { padding-left: 22px; color: var(--text); line-height: 1.9; font-size: 0.96rem; margin-bottom: 14px; }

.hidden { display: none; }

@media (max-width: 600px) {
  .header-inner { padding: 0 16px; }
  nav a { display: none; }
  .calc-card { padding: 24px 18px; }
  .result-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
}
