/* === GLOBAL STYLES === */
:root {
  /* Primary color palette - green theme */
  --primary-color: #3A9B53;
  --primary-light: #8FD4A5;
  --primary-dark: #2A7D3A;
  --primary-transparent: rgba(58, 155, 83, 0.1);
  
  /* Secondary colors */
  --secondary-color: #336B9F;
  --secondary-light: #6A9FCA;
  --secondary-dark: #1F4A72;
  
  /* Accent colors */
  --accent-color: #FFA800;
  --accent-light: #FFCC80;
  --accent-dark: #E09600;
  
  /* Neutrals */
  --light-color: #F8F9FA;
  --light-gray: #E9ECEF;
  --medium-gray: #CED4DA;
  --dark-gray: #6C757D;
  --dark-color: #343A40;
  
  /* Text colors */
  --text-color: #2D3748;
  --text-light: #4A5568;
  --text-muted: #718096;
  
  /* Functional colors */
  --success-color: #38A169;
  --info-color: #4299E1;
  --warning-color: #F6AD55;
  --danger-color: #E53E3E;
  
  /* Layout variables */
  --border-radius-sm: 0.25rem;
  --border-radius: 0.5rem;
  --border-radius-lg: 1rem;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --box-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
  
  /* Content width */
  --container-width: 1240px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-color);
  background-color: #FFFFFF;
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
  padding-top: 76px; /* Add padding to accommodate fixed navbar height */
}

main {
  flex: 1;
}

/* Improved Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-color);
  line-height: 1.3;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.5rem;
}

.lead {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-light);
}

p {
  margin-bottom: 1.2rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

small {
  font-size: 0.875rem;
}

.text-muted {
  color: var(--text-muted) !important;
}

/* Section styling */
.section-title {
  position: relative;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  text-align: center;
}

.section-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
}

.section-title.text-start:after {
  left: 0;
  transform: none;
}

section {
  padding: 4rem 0;
}

section.bg-light {
  background-color: var(--light-color);
}

/* Button styling */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.5rem;
  font-weight: 500;
  border-radius: var(--border-radius);
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn i {
  margin-right: 0.5rem;
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(58, 155, 83, 0.3);
}

.btn-outline-primary {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.btn-success {
  background-color: var(--success-color);
  color: white;
}

.btn-success:hover, .btn-success:focus {
  background-color: #2F8A5B;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(56, 161, 105, 0.3);
}

.btn-outline-success {
  background-color: transparent;
  border: 2px solid var(--success-color);
  color: var(--success-color);
}

.btn-outline-success:hover, .btn-outline-success:focus {
  background-color: var(--success-color);
  color: white;
  transform: translateY(-2px);
}

.btn-light {
  background-color: white;
  color: var(--text-color);
}

.btn-light:hover, .btn-light:focus {
  background-color: var(--light-gray);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

/* === HEADER STYLES === */
header {
  background-color: white;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Update navbar styles for fixed positioning */
.navbar {
  padding: 0.75rem 0;
  background-color: white; /* Ensure background is not transparent */
}


.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-dark) !important;
  display: flex;
  align-items: center;
}

.navbar-brand img {
  max-height: 40px;
  margin-right: 0.5rem;
}

.nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  color: var(--text-color) !important;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color) !important;
}

.nav-link:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
  transform: translateX(-50%);
  opacity: 0;
}

.nav-link:hover:after, .nav-link.active:after {
  width: 80%;
  opacity: 1;
}

.dropdown-menu {
  border: none;
  box-shadow: var(--box-shadow);
  border-radius: var(--border-radius);
  padding: 0.75rem 0;
  margin-top: 0.5rem;
  min-width: 200px;
}

.dropdown-item {
  padding: 0.6rem 1.5rem;
  font-weight: 500;
}

.dropdown-item:hover, .dropdown-item:focus {
  background-color: var(--primary-transparent);
  color: var(--primary-color);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--light-gray);
}

.dropdown-divider {
  margin: 0.5rem 0;
  border-top: 1px solid var(--light-gray);
}

.user-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 0.5rem;
}

.badge-practitioner {
  background-color: var(--primary-transparent);
  color: var(--primary-dark);
}

.badge-contributor {
  background-color: rgba(66, 153, 225, 0.15);
  color: var(--secondary-dark);
}

/* Search form */
.search-form {
  position: relative;
  max-width: 300px;
}

.search-form input {
  border-radius: 50px;
  padding: 0.65rem 1rem;
  padding-right: 3rem;
  border: 1px solid var(--medium-gray);
  width: 100%;
  transition: var(--transition);
  font-size: 0.95rem;
}

.search-form input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(58, 155, 83, 0.15);
}

.search-form button {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--primary-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.search-form button:hover {
  background-color: var(--primary-transparent);
}

/* HERO SECTION */
.hero {
  padding: 5rem 0 4rem;
  background-color: white;
  background-image: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%), url('/api/placeholder/1200/800');
  background-size: cover;
  background-position: center;
  position: relative;
  border-radius: 0;
  margin-bottom: 0;
}

.hero h1 {
  margin-bottom: 1.5rem;
  max-width: 600px;
}

.hero .lead {
  margin-bottom: 2rem;
  max-width: 550px;
}

.search-container {
  position: relative;
  max-width: 600px;
  margin-bottom: 2rem;
}

.search-input {
  height: 60px;
  width: 100%;
  border-radius: 30px;
  border: 1px solid var(--medium-gray);
  padding: 0 30px;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(58, 155, 83, 0.15), 0 4px 15px rgba(0, 0, 0, 0.05);
}

.search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  height: 44px;
  width: 44px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.search-btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-50%) scale(1.05);
}

.category-tag {
  background-color: var(--primary-transparent);
  color: var(--primary-dark);
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  font-weight: 500;
  transition: var(--transition);
  display: inline-block;
  margin: 0.25rem;
  text-decoration: none;
}

.category-tag:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  text-decoration: none;
}

.category-tag i {
  margin-right: 0.5rem;
}

/* CATEGORIES SECTION */
.category-card {
  transition: var(--transition);
  border: none;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  height: 100%;
  background-color: white;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--box-shadow-lg);
}

.category-card .card-title {
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.category-card .card-text {
  color: var(--text-light);
  margin-bottom: 1.25rem;
}

.category-card .card-img-top {
  height: 180px;
  object-fit: cover;
  transition: var(--transition);
}

.category-card:hover .card-img-top {
  transform: scale(1.03);
}

.category-card .card-body {
  padding: 1.5rem;
}

/* ABOUT SECTION */
.feature-icon {
  width: 48px;
  height: 48px;
  background-color: var(--primary-transparent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-right: 1rem;
  flex-shrink: 0;
}

#about {
  background-color: white;
}

#about h5 {
  margin-bottom: 0.3rem;
  font-size: 1.1rem;
}

#about p {
  color: var(--text-light);
}

#about img {
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

/* FEATURED SECTION */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  overflow: hidden;
  background-color: white;
}

.card:hover {
  box-shadow: var(--box-shadow-lg);
  transform: translateY(-5px);
}

.card-header {
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  padding: 1rem 1.5rem;
  border-bottom: none;
}

.card-header.bg-success {
  background-color: var(--success-color) !important;
}

.card-body {
  padding: 1.5rem;
}

.rounded-circle {
  border: 2px solid var(--light-gray);
}

.text-warning {
  color: var(--accent-color) !important;
}

.bg-dark {
  background-color: var(--dark-color) !important;
}

.card.bg-dark {
  box-shadow: var(--box-shadow-lg);
}

.card-img-overlay {
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: var(--border-radius);
}

/* HEALTH QUESTION SECTION */
#healthQuestionForm {
  border-radius: var(--border-radius);
  transition: var(--transition);
  box-shadow: var(--box-shadow);
}

#healthQuestionForm:hover {
  box-shadow: var(--box-shadow-lg);
}

#healthQuestion {
  resize: none;
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius-sm);
  padding: 0.75rem;
  transition: var(--transition);
}

#healthQuestion:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(58, 155, 83, 0.15);
}

.form-check-input {
  border: 1px solid var(--medium-gray);
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.alert-info {
  background-color: rgba(66, 153, 225, 0.15);
  border: none;
  color: var(--secondary-dark);
  border-radius: var(--border-radius-sm);
}

/* MODAL STYLES */
.modal-content {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow-lg);
}

.modal-header {
  border-bottom: 1px solid var(--light-gray);
  padding: 1.25rem 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--light-gray);
  padding: 1.25rem 1.5rem;
}

.spinner-border.text-primary {
  color: var(--primary-color) !important;
}

/* FOOTER STYLES */
footer {
  background-color: #1a1a2e;
  color: white;
  padding: 4rem 0 1.5rem;
  margin-top: 0;
}

footer h5 {
  font-weight: 600;
  color: white;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 10px;
}

footer h5:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background: var(--primary-color);
}

footer p {
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.7);
}

footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

footer a:hover {
  color: white;
  text-decoration: none;
}

footer .social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  margin-right: 10px;
  transition: var(--transition);
  color: white;
}

footer .social-icons a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

footer hr {
  opacity: 0.1;
  margin: 2rem 0;
}

footer .form-control {
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
}

footer .form-control:focus {
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  box-shadow: none;
}

footer .form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

footer .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.3);
}

footer .btn-outline-light:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* RESPONSIVE STYLES */
@media (max-width: 992px) {
  h1 {
    font-size: 2.25rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  section {
    padding: 3rem 0;
  }
  
  .hero {
    padding: 4rem 0 3rem;
  }
  
  .search-input {
    height: 55px;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  .hero {
    padding: 3rem 0 2rem;
  }
  
  .search-container {
    max-width: 100%;
  }
  
  .search-input {
    height: 50px;
    font-size: 1rem;
  }
  
  section {
    padding: 2.5rem 0;
  }
  
  .category-card .card-img-top {
    height: 160px;
  }
  
  footer {
    text-align: center;
    padding: 3rem 0 1.5rem;
  }
  
  footer h5:after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .section-title.text-start:after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  #about img {
    margin-top: 2rem;
  }
}

@media (max-width: 576px) {
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .lead {
    font-size: 1rem;
  }
  
  .btn {
    padding: 0.5rem 1.25rem;
  }
  
  .hero {
    padding: 2.5rem 0 2rem;
  }
  
  .search-input {
    height: 50px;
    font-size: 0.95rem;
  }
  
  .search-btn {
    height: 40px;
    width: 40px;
  }
  
  .category-tag {
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
  }
  
  section {
    padding: 2rem 0;
  }
  
  .section-title {
    margin-bottom: 2rem;
  }
  
  .card-header {
    padding: 0.75rem 1rem;
  }
  
  .card-body {
    padding: 1.25rem;
  }
}

/* ===== ADDITIONAL UTILITIES ===== */
.shadow-sm {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.shadow {
  box-shadow: var(--box-shadow) !important;
}

.shadow-lg {
  box-shadow: var(--box-shadow-lg) !important;
}

.border-primary {
  border-color: var(--primary-color) !important;
}

.text-primary {
  color: var(--primary-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.text-success {
  color: var(--success-color) !important;
}

.bg-success {
  background-color: var(--success-color) !important;
}

.text-info {
  color: var(--info-color) !important;
}

.bg-info {
  background-color: var(--info-color) !important;
}

.opacity-50 {
  opacity: 0.5 !important;
}

.rounded {
  border-radius: var(--border-radius) !important;
}

.text-decoration-none {
  text-decoration: none !important;
}

.text-decoration-none:hover {
  text-decoration: none !important;
}