/*
Theme Name: NewWeigh
Theme URI: https://newweigh.online
Author: NewWeigh
Author URI: https://newweigh.online
Description: A clean, clinical weight loss and health website theme for NewWeigh.online. Features a BMI calculator, tips section, testimonials, and full Gutenberg block support.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: newweigh
Tags: health, weight-loss, clean, clinical, one-page, bmi-calculator
*/

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --nw-blue-dark:    #042C53;
  --nw-blue-mid:     #185FA5;
  --nw-blue-light:   #E6F1FB;
  --nw-blue-border:  #B5D4F4;
  --nw-teal:         #0F6E56;
  --nw-teal-light:   #E1F5EE;
  --nw-amber:        #BA7517;
  --nw-red:          #A32D2D;
  --nw-surface:      #ffffff;
  --nw-surface-alt:  #f7fafd;
  --nw-border:       rgba(0,0,0,0.08);
  --nw-text:         #1a1a1a;
  --nw-text-muted:   #5f6b7a;
  --nw-text-light:   #8a96a3;
  --nw-radius:       8px;
  --nw-radius-lg:    12px;
  --nw-font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nw-max-width:    1100px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--nw-font);
  color: var(--nw-text);
  background: var(--nw-surface);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--nw-blue-mid); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { padding-left: 1.5rem; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  line-height: 1.25;
  color: var(--nw-blue-dark);
  margin-bottom: 0.75rem;
}

h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin-bottom: 1rem; color: var(--nw-text-muted); }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.nw-container {
  max-width: var(--nw-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nw-section {
  padding: 5rem 0;
}

.nw-section--alt {
  background: var(--nw-surface-alt);
}

.nw-section--blue {
  background: var(--nw-blue-light);
  border-top: 0.5px solid var(--nw-blue-border);
  border-bottom: 0.5px solid var(--nw-blue-border);
}

.nw-section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nw-blue-mid);
  margin-bottom: 0.5rem;
}

.nw-section-title {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 500;
  color: var(--nw-blue-dark);
  margin-bottom: 0.75rem;
}

.nw-section-sub {
  font-size: 1.05rem;
  color: var(--nw-text-muted);
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.nw-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.75rem 1.75rem;
  border-radius: var(--nw-radius);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: var(--nw-font);
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
}
.nw-btn:hover { opacity: 0.88; transform: translateY(-1px); text-decoration: none; }
.nw-btn:active { transform: translateY(0); }

.nw-btn--primary { background: var(--nw-blue-mid); color: #fff; }
.nw-btn--secondary { background: #fff; color: var(--nw-blue-mid); border: 1px solid var(--nw-blue-border); }
.nw-btn--outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.5); }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nw-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 0.5px solid var(--nw-border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.nw-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--nw-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nw-nav__logo {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--nw-blue-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nw-nav__logo span { color: var(--nw-blue-mid); }

.nw-nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nw-nav__links a {
  font-size: 0.9rem;
  color: var(--nw-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.nw-nav__links a:hover { color: var(--nw-blue-dark); }

.nw-nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--nw-text);
}

.nw-nav__mobile {
  display: none;
  background: #fff;
  border-bottom: 0.5px solid var(--nw-border);
  padding: 1rem 1.5rem;
}

.nw-nav__mobile.open { display: block; }

.nw-nav__mobile a {
  display: block;
  padding: 0.6rem 0;
  color: var(--nw-text-muted);
  font-size: 0.95rem;
  border-bottom: 0.5px solid var(--nw-border);
}

/* ============================================================
   HERO
   ============================================================ */
.nw-hero {
  background: linear-gradient(135deg, #deeefa 0%, #eef6ff 55%, #ddf2eb 100%);
  padding: 6rem 1.5rem 5rem;
  text-align: center;
  border-bottom: 0.5px solid var(--nw-blue-border);
}

.nw-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--nw-blue-border);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--nw-blue-mid);
  margin-bottom: 1.5rem;
}

.nw-hero h1 {
  max-width: 640px;
  margin: 0 auto 1rem;
  letter-spacing: -0.3px;
}

.nw-hero__sub {
  font-size: 1.1rem;
  color: var(--nw-text-muted);
  max-width: 480px;
  margin: 0 auto 2rem;
}

.nw-hero__btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   STATS BAR
   ============================================================ */
.nw-stats {
  background: #fff;
  border-bottom: 0.5px solid var(--nw-border);
  padding: 2rem 1.5rem;
}

.nw-stats__grid {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  max-width: var(--nw-max-width);
  margin: 0 auto;
}

.nw-stat { text-align: center; }
.nw-stat__num { font-size: 1.8rem; font-weight: 600; color: var(--nw-blue-mid); line-height: 1; }
.nw-stat__lbl { font-size: 0.8rem; color: var(--nw-text-light); margin-top: 4px; }

/* ============================================================
   BMI CALCULATOR
   ============================================================ */
.nw-bmi__card {
  background: #fff;
  border: 0.5px solid var(--nw-border);
  border-radius: var(--nw-radius-lg);
  padding: 2rem;
  max-width: 640px;
}

.nw-bmi__unit-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.nw-unit-btn {
  padding: 7px 18px;
  border-radius: var(--nw-radius);
  border: 0.5px solid var(--nw-border);
  background: #fff;
  color: var(--nw-text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--nw-font);
  transition: all 0.15s;
}

.nw-unit-btn.active {
  background: var(--nw-blue-light);
  border-color: var(--nw-blue-mid);
  color: var(--nw-blue-mid);
  font-weight: 600;
}

.nw-bmi__inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.nw-field label {
  display: block;
  font-size: 0.85rem;
  color: var(--nw-text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.nw-field input {
  width: 100%;
  height: 42px;
  border: 0.5px solid var(--nw-border);
  border-radius: var(--nw-radius);
  background: #fafafa;
  padding: 0 12px;
  font-size: 1rem;
  font-family: var(--nw-font);
  color: var(--nw-text);
  transition: border-color 0.15s;
}

.nw-field input:focus {
  outline: none;
  border-color: var(--nw-blue-mid);
  background: #fff;
}

.nw-bmi__result {
  display: none;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 0.5px solid var(--nw-border);
}

.nw-bmi__result.show { display: block; }

.nw-bmi__number { font-size: 3rem; font-weight: 600; line-height: 1; }
.nw-bmi__category { font-size: 1rem; font-weight: 600; margin-top: 4px; }
.nw-bmi__desc { font-size: 0.9rem; color: var(--nw-text-muted); margin-top: 6px; line-height: 1.6; }

.nw-bmi__bar {
  position: relative;
  height: 10px;
  border-radius: 8px;
  background: linear-gradient(to right, #85B7EB, #5DCAA5, #EF9F27, #E24B4A);
  margin: 1.25rem 0 0.4rem;
}

.nw-bmi__needle {
  position: absolute;
  top: -4px;
  width: 3px;
  height: 18px;
  background: var(--nw-blue-dark);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: left 0.5s ease;
}

.nw-bmi__labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--nw-text-light);
}

/* ============================================================
   TIPS
   ============================================================ */
.nw-tips__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.nw-tip-card {
  background: #fff;
  border: 0.5px solid var(--nw-border);
  border-radius: var(--nw-radius-lg);
  padding: 1.5rem;
  transition: box-shadow 0.2s;
}

.nw-tip-card:hover {
  box-shadow: 0 4px 16px rgba(24,95,165,0.08);
}

.nw-tip-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--nw-radius);
  background: var(--nw-blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.nw-tip-card h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.nw-tip-card p { font-size: 0.9rem; margin: 0; }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.nw-testimonials__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.nw-t-card {
  background: #fff;
  border-radius: var(--nw-radius-lg);
  border: 0.5px solid var(--nw-blue-border);
  padding: 1.5rem;
}

.nw-t-card__stars { color: var(--nw-amber); font-size: 0.85rem; letter-spacing: 2px; margin-bottom: 0.75rem; }
.nw-t-card__quote { font-size: 0.9rem; color: var(--nw-text-muted); line-height: 1.7; margin-bottom: 1rem; font-style: italic; }

.nw-t-card__person { display: flex; align-items: center; gap: 10px; }

.nw-t-card__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--nw-blue-light);
  color: var(--nw-blue-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.nw-t-card__name { font-size: 0.85rem; font-weight: 600; }
.nw-t-card__detail { font-size: 0.78rem; color: var(--nw-text-light); }

/* ============================================================
   CTA BANNER
   ============================================================ */
.nw-cta {
  background: var(--nw-blue-dark);
  padding: 5rem 1.5rem;
  text-align: center;
  color: #fff;
}

.nw-cta h2 { color: #fff; margin-bottom: 0.75rem; }
.nw-cta p { color: rgba(255,255,255,0.7); max-width: 440px; margin: 0 auto 2rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.nw-footer {
  background: #020f1e;
  color: rgba(255,255,255,0.55);
  padding: 3rem 1.5rem 2rem;
}

.nw-footer__inner {
  max-width: var(--nw-max-width);
  margin: 0 auto;
}

.nw-footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2rem;
  border-bottom: 0.5px solid rgba(255,255,255,0.1);
  margin-bottom: 1.5rem;
}

.nw-footer__logo {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  display: block;
  margin-bottom: 0.75rem;
}

.nw-footer__tagline { font-size: 0.85rem; line-height: 1.6; }

.nw-footer__col h4 {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.nw-footer__col ul { list-style: none; padding: 0; }
.nw-footer__col ul li { margin-bottom: 0.5rem; }
.nw-footer__col ul li a { color: rgba(255,255,255,0.55); font-size: 0.85rem; text-decoration: none; transition: color 0.15s; }
.nw-footer__col ul li a:hover { color: #fff; }

.nw-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nw-footer__disclaimer {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  margin-top: 1rem;
  line-height: 1.6;
}

/* ============================================================
   WORDPRESS CORE CLASSES
   ============================================================ */
.wp-block-image { margin: 1.5rem 0; }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { text-align: center; margin: 1.5rem auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--nw-text-light); text-align: center; margin-top: 4px; }
.sticky { /* WordPress sticky post */ }
.bypostauthor { /* WordPress post author */ }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nw-nav__links, .nw-nav__cta { display: none; }
  .nw-nav__toggle { display: flex; }
  .nw-bmi__inputs { grid-template-columns: 1fr; }
  .nw-footer__top { grid-template-columns: 1fr; gap: 2rem; }
  .nw-stats__grid { gap: 1.5rem; }
  .nw-footer__bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .nw-section { padding: 3rem 0; }
  .nw-hero { padding: 4rem 1rem 3rem; }
  .nw-hero__btns { flex-direction: column; align-items: center; }
}
