/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.8;
}

/* Navbar */
header {
  background: #2c7be5;
  color: white;
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.logo {
  font-size: 1.8rem;
  font-weight: 700;
}
.logo .blue-text {
  color: #00205B;
}
.logo .red-bars {
  color: red;
  padding: 0 4px;
}

/* Navigation */
.nav-links {
  display: flex;
  align-items: center;
}
.nav-links a {
  color: white;
  margin-left: 15px;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease, transform 0.2s ease;
}
.nav-links a:hover {
  color: #ffd700;
  transform: scale(1.05);
}
.nav-links a.active {
  border-bottom: 2px solid #ffd700;
  font-weight: 600;
}

/* Sections */
.section {
  max-width: 1100px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}
.section h1 {
  color: #2c7be5;
  margin-bottom: 20px;
  font-size: 2rem;
}
.section h2 {
  color: #28a745;
  margin-top: 25px;
  margin-bottom: 15px;
  font-size: 1.4rem;
}
.section p,
.section ul {
  margin-bottom: 15px;
  font-size: 1rem;
}
.section ul {
  padding-left: 20px;
}

/* Buttons */
button,
.subscribe-form button,
.btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 25px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  text-decoration: none;
  display: inline-block;
}
button:hover,
.subscribe-form button:hover,
.btn:hover {
  background: #218838;
  transform: scale(1.05);
}
.btn-outline {
  background: transparent;
  border: 2px solid #28a745;
  color: #28a745;
}
.btn-outline:hover {
  background: #28a745;
  color: white;
}

/* Forms */
.input-group label i {
  margin-right: 6px;
  color: #2c7be5;
}
input[type="email"],
input[type="text"],
input[type="number"],
textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  width: 100%;
  margin-bottom: 10px;
}
input:focus,
textarea:focus {
  border-color: #2c7be5;
  box-shadow: 0 0 5px rgba(44,123,229,0.3);
}
textarea {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
.modern-footer {
  background: #1c1c1c;
  color: #ccc;
  text-align: center;
  padding: 30px 20px;
  margin-top: 50px;
}
.modern-footer h2 {
  color: #fff;
}
.subscribe-form {
  display: flex;
  justify-content: center;
  margin: 15px 0;
}
.subscribe-form input {
  width: 250px;
  margin-right: 10px;
}
.social-icons {
  margin: 15px 0;
}
.social-icons a img {
  margin: 0 8px;
  transition: transform 0.3s ease, filter 0.3s ease;
}
.social-icons a img:hover {
  transform: scale(1.15);
  filter: brightness(1.2);
}

/* === BMI Chart & Tips Section === */
.bmi-chart {
  text-align: center;
}
.bmi-chart h2 {
  color: #2c7be5;
  margin-bottom: 15px;
}
.bmi-chart-img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}
.bmi-tips {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 15px;
}
.tip-card {
  padding: 15px;
  border-radius: 10px;
  color: white;
  text-align: left;
}
.tip-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}
.tip-card ul {
  padding-left: 18px;
}
.tip-card li {
  margin-bottom: 6px;
  font-size: 0.95rem;
}

/* Tip Colors */
.tip-card.underweight { background: #fbbf24; color: #222; }
.tip-card.normal { background: #22c55e; }
.tip-card.overweight { background: #f97316; }
.tip-card.obese { background: #ef4444; }

/* === Article Grid === */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
  gap: 20px;
  margin: 20px 0;
}
.article-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.article-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.article-card h3 {
  padding: 12px;
  color: #2c7be5;
  font-size: 1.1rem;
}
.article-card p {
  padding: 0 12px 16px;
  color: #555;
  font-size: 0.95rem;
}
.article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

/* === Articles Listing Page === */
.article-listing {
  max-width: 950px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
  line-height: 1.7;
}
.article-category {
  margin-bottom: 30px;
}
.article-category h2 {
  color: #2c7be5;
  margin-bottom: 15px;
  border-bottom: 2px solid #eee;
  padding-bottom: 6px;
}
.topic {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #ddd;
}
.topic h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: #28a745;
}
.topic p {
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: #444;
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: white;
  cursor: pointer;
}
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }
  .input-row {
    display: block;
  }
  .menu-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    background: #2c7be5;
    padding: 10px;
    width: 100%;
  }
  .nav-links a {
    margin: 10px 0;
  }
  .nav-links.active {
    display: flex;
  }
}

/* Tips Box (Dynamic Suggestions) */
#suggestion-box {
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 10px;
  margin-top: 12px;
}
#suggestion-box ul {
  padding-left: 20px;
  margin: 10px 0;
}
#suggestion-box li {
  margin-bottom: 6px;
  font-size: 0.95rem;
}

/* Success/Error Messages */
#success-msg,
#newsletter-success {
  display: none;
  color: #22c55e;
  font-weight: 600;
  margin-top: 10px;
  text-align: center;
}
.error-msg {
  color: #ef4444;
  font-weight: 600;
  margin-top: 8px;
  text-align: center;
}

/* Newsletter alignment fix for mobile */
@media (max-width: 480px) {
  .subscribe-form {
    flex-direction: column;
  }
  .subscribe-form input {
    width: 100%;
    margin: 0 0 10px 0;
  }
  .subscribe-form button {
    width: 100%;
  }
}
