:root {
  --primary-color: #007bff;
  --primary-hover: #0056b3;
  --secondary-bg: #f8f9fa;
  --text-color: #333;
  --border-color: #dee2e6;
  --white-color: #fff;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #17a2b8;
}

body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  background-color: var(--secondary-bg);
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  max-width: 900px;
  margin: auto;
  padding: 20px;
}

header {
  background: var(--white-color);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 15px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  text-decoration: none;
  color: var(--primary-color);
  font-size: 22px;
}

nav a {
  margin-left: 20px;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--primary-hover);
}

.breadcrumb {
  margin: 15px 0;
  color: #6c757d;
  font-size: 14px;
}

.tool-box {
  background: var(--white-color);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  text-align: center;
}

.tool-icon {
  width: 70px;
  height: 70px;
  margin-bottom: 15px;
}

h1 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.description {
  max-width: 600px;
  margin: 0 auto 25px auto;
  color: #555;
}

.unit-switcher {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  background: #e9ecef;
  border-radius: 8px;
  padding: 5px;
}

.unit-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  color: #555;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.unit-btn.active {
  background: var(--primary-color);
  color: var(--white-color);
  box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
}

.input-group {
  display: none;
  gap: 20px;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: 20px;
}

.input-group.active {
  display: flex;
}

.input-field {
  flex: 1;
  text-align: left;
}

.input-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #495057;
}

.input-field input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
}

.height-imperial div {
  display: flex;
  gap: 10px;
}

.calculator-form button {
  background: var(--primary-color);
  color: var(--white-color);
  border: none;
  padding: 12px 25px;
  margin: 10px 5px 0 5px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: background-color 0.3s;
}

.calculator-form button:hover {
  background: var(--primary-hover);
}

#clearBtn {
  background-color: #6c757d;
}
#clearBtn:hover {
  background-color: #5a6268;
}

.result-display {
  margin-top: 25px;
  padding: 20px;
  border-radius: 8px;
  display: none; /* Hidden by default */
  color: var(--white-color);
  transition: background-color 0.5s;
}

.result-display h3 {
  margin-top: 0;
}

/* BMI Chart & Info */
.bmi-chart ul {
  list-style: none;
  padding: 0;
}
.bmi-chart li {
  padding: 8px 12px;
  margin-bottom: 5px;
  border-left: 5px solid;
  border-radius: 4px;
}
.underweight { border-color: var(--info-color); background: #e8f7fa; }
.normal { border-color: var(--success-color); background: #eaf6ec; }
.overweight { border-color: var(--warning-color); background: #fff8e6; }
.obese { border-color: var(--danger-color); background: #fbebec; }

/* Grid & Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 15px;
}
.card {
  background: var(--white-color);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.card img { width: 50px; height: 50px; margin-bottom: 10px; }
.card button { background: var(--primary-color); color: white; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; }

/* FAQ */
.faq { margin-top: 40px; }
.faq-item {
  background: var(--white-color);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

footer {
  text-align: center;
  padding: 20px;
  background: var(--white-color);
  margin-top: 40px;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.1);
}
footer a { margin: 0 12px; text-decoration: none; color: var(--primary-color); }

#backToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary-color);
  color: var(--white-color);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: none;
  font-size: 20px;
  line-height: 40px;
  text-align: center;
}

@media(max-width: 600px) {
  .input-group {
    flex-direction: column;
    align-items: stretch;
  }
  .tool-box {
    padding: 20px;
  }
}
/* style.css */

/* --- Global Styles & Variables --- */
:root {
  --primary: #0056ff;
  --secondary: linear-gradient(135deg, #00E0FF, #00FFFF); /* Bright Cyan Gradient */
  --text: #222;
}

body {
  font-family: Poppins, sans-serif;
  margin: 0;
  background: var(--secondary);
  color: var(--text);
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

/* --- Header Styles --- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #0056ff, #00aaff);
  padding: 15px 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: auto;
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo-img {
  margin-right: 12px;
  filter: brightness(1) invert(0.9) sepia(0.8) saturate(3) hue-rotate(45deg);
}

.logo-text {
  font-size: 24px;
  color: #fff;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.3);
  font-weight: 700;
}

/* Navbar links */
#navbar {
  display: flex;
  align-items: center;
  gap: 20px;
}

#navbar a {
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 5px 0;
}

#navbar a:hover {
  color: #fffa;
  transform: scale(1.1);
}

/* Hamburger Icon */
#hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  z-index: 1002;
}

#hamburger span {
  width: 25px;
  height: 3px;
  background: #fff;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Dropdown styles */
.dropdown {
  position: relative;
}

.dropbtn {
  background: none;
  border: none;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 16px;
  font-family: Poppins, sans-serif;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #0056ff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  min-width: 180px;
  z-index: 999;
  border: 1px solid #004acb;
}

.dropdown-content a {
  display: block;
  padding: 10px 15px;
  color: #ffffff;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.dropdown-content a:hover {
  background-color: #004acb;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* --- Mobile Responsive Menu --- */
@media screen and (max-width: 768px) {
  #hamburger {
    display: flex;
  }

  #navbar {
    position: fixed;
    top: 80px;
    right: 15px;
    width: 250px;
    background: linear-gradient(180deg, #0056ff, #00399d);
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
    gap: 0;
    box-shadow: -5px 5px 15px rgba(0,0,0,0.25);
    z-index: 1001;
    border-radius: 12px;
    transform: translateX(110%);
    transition: transform 0.3s ease-in-out;
  }

  #navbar.show {
    display: flex;
    transform: translateX(0);
  }

  #navbar a, .dropdown {
    padding: 15px 25px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
  }

  .dropdown-content {
    position: static;
    display: none;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: none;
    border-radius: 0;
    border: none;
    min-width: 100%;
  }

  .dropdown-content a {
    color: #e0f7ff;
    font-weight: normal;
    padding-left: 40px;
  }

  .dropdown.active .dropdown-content {
    display: block;
  }
}

/* --- Footer Styles --- */
footer a {
  text-decoration: none;
  color: var(--primary);
  margin-right: 15px;
}

footer a:hover {
  color: #0039c1;
}

/* Social media icon hover effect */
.footer-social a:hover {
    transform: scale(1.15);
}
/* =========================================
   BASE TYPOGRAPHY & RESET
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.7;
    color: #333333;
    background-color: #f4f7f6;
    font-size: 18px; /* Readable base size */
}

/* =========================================
   LAYOUT CONTAINER
   ========================================= */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    min-height: 100vh;
}

/* =========================================
   HEADER STYLES (NON-STICKY)
   ========================================= */
.article-header {
    text-align: center;
    padding: 40px 20px;
    border-bottom: 1px solid #eeeeee;
    margin-bottom: 40px;
    
    /* Ensures header scrolls normally */
    position: relative; 
    top: auto;
    z-index: auto;
    background-color: #ffffff;
}

.article-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 800;
    line-height: 1.2;
}

.meta-info {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 500;
}

/* =========================================
   CONTENT SECTIONS
   ========================================= */
.content-section {
    margin-bottom: 40px;
    padding: 0 10px;
}

h2 {
    font-size: 1.8rem;
    color: #27ae60; /* Green shade for health theme */
    margin-bottom: 20px;
    border-left: 5px solid #27ae60;
    padding-left: 15px;
}

h3 {
    font-size: 1.4rem;
    color: #34495e;
    margin-bottom: 15px;
    margin-top: 25px;
}

p {
    margin-bottom: 20px;
    text-align: justify; /* Clean look for long form */
}

ul, ol {
    margin-bottom: 20px;
    padding-left: 40px;
}

li {
    margin-bottom: 10px;
}

/* =========================================
   FEATURE BOXES (Step-by-Step)
   ========================================= */
.step-box {
    background: #eafaf1; /* Light green tint */
    border: 1px solid #d5f5e3;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.2s ease;
}

.step-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.step-box h3 {
    margin-top: 0;
    color: #1e8449;
}

/* =========================================
   RESPONSIVE TABLE
   ========================================= */
.table-container {
    overflow-x: auto; /* Allows scroll on mobile */
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    min-width: 600px; /* Ensures table doesn't squish too much */
}

th, td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #27ae60;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

tr:hover {
    background-color: #f1f1f1;
}

/* =========================================
   CALL TO ACTION (CTA)
   ========================================= */
.cta-section {
    background: linear-gradient(135deg, #52be80 0%, #27ae60 100%);
    color: white;
    text-align: center;
    padding: 50px 20px;
    border-radius: 12px;
    margin: 50px 0;
}

.cta-section h2 {
    color: white;
    border: none;
    padding: 0;
}

.cta-section p {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.cta-button {
    background-color: #ffffff;
    color: #27ae60;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cta-button:hover {
    background-color: #f8f9fa;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* =========================================
   MEDIA QUERIES (Mobile & Tablet)
   ========================================= */
@media (max-width: 768px) {
    
    /* Typography Adjustments */
    body {
        font-size: 16px;
    }
    
    .article-header h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }

    /* Layout Adjustments */
    .main-container {
        padding: 15px;
        width: 100%;
    }
    
    .content-section {
        padding: 0;
    }

    /* Table Adjustments */
    th, td {
        padding: 10px;
        font-size: 0.9rem;
    }

    /* CTA Adjustments */
    .cta-button {
        width: 100%; /* Full width button for easier tapping */
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .article-header {
        padding: 20px 0;
    }
    
    .meta-info {
        font-size: 0.8rem;
    }
}
/* =========================================
   FAQ SECTION BASE STYLES
   ========================================= */
:root {
    --faq-primary: #27ae60; /* Health Green */
    --faq-secondary: #2ecc71;
    --faq-bg: #f9fbfd;
    --faq-text: #333;
    --faq-border: #e1e8ed;
}

.faq-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--faq-text);
    line-height: 1.6;
    background-color: #ffffff;
}

/* Header Styling */
.faq-header {
    text-align: center;
    margin-bottom: 50px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

.faq-header h2 {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 700;
}

.faq-intro {
    font-size: 1.1rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

/* FAQ Item Styling */
.faq-item {
    margin-bottom: 30px;
    padding: 25px;
    background-color: var(--faq-bg);
    border-radius: 10px;
    border: 1px solid var(--faq-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-color: #d0dbe5;
}

.faq-item h3 {
    font-size: 1.3rem;
    color: var(--faq-primary);
    margin-top: 0;
    margin-bottom: 12px;
    font-weight: 600;
}

.faq-item p {
    font-size: 1rem;
    color: #444;
    margin: 0;
}

/* =========================================
   COMPARISON TABLE STYLES
   ========================================= */
.faq-table-section {
    margin-top: 60px;
    margin-bottom: 40px;
}

.faq-table-section h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.faq-table-section p {
    text-align: center;
    margin-bottom: 25px;
    color: #666;
}

.table-wrapper {
    overflow-x: auto; /* Enables scroll on mobile */
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid var(--faq-border);
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    min-width: 600px; /* Ensures table doesn't squish */
}

th, td {
    padding: 18px 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: var(--faq-primary);
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #f1f4f8;
}

/* =========================================
   FOOTER SUMMARY STYLES
   ========================================= */
.faq-footer {
    text-align: center;
    margin-top: 50px;
    padding: 30px;
    background-color: #eef2f5;
    border-radius: 10px;
    color: #555;
    font-weight: 500;
}

/* =========================================
   MEDIA QUERIES (RESPONSIVE DESIGN)
   ========================================= */
@media (max-width: 768px) {
    .faq-container {
        padding: 20px 15px;
    }

    .faq-header h2 {
        font-size: 1.8rem;
    }

    .faq-intro {
        font-size: 1rem;
    }

    .faq-item {
        padding: 20px;
        margin-bottom: 20px;
    }

    .faq-item h3 {
        font-size: 1.15rem;
        line-height: 1.4;
    }

    /* Table adjustments for mobile */
    th, td {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .faq-table-section h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .faq-header h2 {
        font-size: 1.5rem;
    }
    
    .faq-item h3 {
        font-size: 1.1rem;
    }
    
    .faq-footer {
        padding: 20px;
        font-size: 0.95rem;
    }
}
/* --- GRID LAYOUT --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

/* --- CARD DESIGN (Green Background) --- */
.card {
  background: linear-gradient(160deg, #00e600, #00ff00); /* Bright Green Gradient */
  border-radius: 30px;
  padding: 20px 25px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px; /* Height fix for alignment */
}

/* --- BLUE ENERGY ANIMATION EFFECT --- */
@keyframes blueEnergyAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 224, 255, 0.4), rgba(0, 255, 255, 0.6), rgba(0, 224, 255, 0.4), rgba(0, 255, 255, 0.6), rgba(0, 224, 255, 0.4));
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  z-index: 0;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.card:hover::before {
  opacity: 1;
  animation: blueEnergyAnimation 4s linear infinite;
}

.card > * {
  position: relative;
  z-index: 1;
}

/* --- IMAGES & TEXT --- */
.card img {
  width: 100px;
  height: 100px;
  margin: 0 auto 15px auto;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
  display: block; /* Ensures centering */
}

.card h2 {
  color: #ffffff;
  font-size: 1.35rem;
  text-shadow: 1px 1px 6px rgba(0,0,0,0.6);
  margin: 0 0 10px 0;
  font-family: 'Poppins', sans-serif;
}

.card p {
  color: #f5f5f5;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
  font-family: 'Poppins', sans-serif;
}

/* --- BUTTON STYLE (Cyan with Black Border) --- */
.card a {
  text-decoration: none;
}

.card button {
  background: linear-gradient(45deg, #00BFFF, #00FFFF);
  color: #ffffff;
  border: 2px solid black; /* Black Border */
  border-radius: 12px;
  padding: 14px 25px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 5px 15px rgba(0, 200, 255, 0.4);
  transition: all 0.3s ease;
}

.card button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 200, 255, 0.6);
}