
/* Enhanced HealthyLifeHub CSS - Modern design with sidebar and beautiful styling */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #1e293b;
  --muted: #64748b;
  --light-gray: #f1f5f9;
  --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--dark);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 1rem;
}

p {
  color: var(--muted);
  line-height: 1.7;
}

a {
  text-decoration: none;
  color: var(--primary);
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* Layout with Sidebar */
.main-wrapper {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.content-wrapper {
  display: flex;
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.main-content {
  flex: 1;
  padding: 2rem;
  min-width: 0;
  min-height: calc(100vh - 200px);
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(226, 232, 240, 0.5);
  padding: 2rem 1.5rem;
  position: sticky;
  top: 80px;
  height: fit-content;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-section h5 {
  color: var(--dark);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin-bottom: 0.5rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--muted);
  transition: var(--transition);
  text-decoration: none;
  font-weight: 500;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  transform: translateX(5px);
}

.health-tip {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--warning);
  margin-bottom: 1rem;
}

.health-tip h6 {
  color: #92400e;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.health-tip p {
  color: #a16207;
  margin: 0;
  font-size: 0.9rem;
}

/* Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  font-weight: 700;
  color: var(--primary) !important;
  font-size: 1.25rem;
}

.nav-link {
  color: var(--muted) !important;
  font-weight: 500;
  padding: 0.75rem 1rem !important;
  border-radius: 8px;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--primary) !important;
  background: rgba(99, 102, 241, 0.1);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
  padding: 3rem 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.hero p.lead {
  font-size: 1.2rem;
  color: var(--muted);
  position: relative;
  z-index: 2;
}

/* Cards */
.card {
  border: 0;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  overflow: hidden;
  background: white;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--bg-gradient);
  transition: var(--transition);
  transform: scaleX(0);
  transform-origin: left;
}

.card:hover::before {
  transform: scaleX(1);
}

.card-img-top {
  height: 200px;
  object-fit: cover;
  transition: var(--transition);
  flex-shrink: 0;
  width: 100%;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

.article-card {
  height: 100%;
}

.article-card .card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-card .card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.article-card .card-text {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.article-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* Grid Layout */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Alternative Bootstrap Grid for Articles */
.articles-bootstrap-grid .col-md-4 {
  flex: 0 0 auto;
  width: 33.33333333%;
}

@media (max-width: 992px) {
  .articles-bootstrap-grid .col-md-4 {
    width: 50%;
  }
}

@media (max-width: 576px) {
  .articles-bootstrap-grid .col-md-4 {
    width: 100%;
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Buttons */
.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: var(--bg-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-outline-secondary {
  border: 2px solid var(--light-gray);
  color: var(--muted);
}

.btn-outline-secondary:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Quick Stats */
.stats-section {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 100%);
  padding: 2rem;
  border-radius: var(--border-radius);
  margin: 2rem 0;
}

.stat-item {
  text-align: center;
  padding: 1rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--dark) 0%, #334155 100%);
  color: white;
  padding: 2rem 0;
  margin-top: 4rem;
}

footer p {
  color: #cbd5e1;
  margin: 0;
}

/* Animations */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Icons */
.icon {
  width: 1.2rem;
  height: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Responsive Design */
@media (max-width: 992px) {
  .content-wrapper {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
  }
  
  .main-content {
    padding: 1rem;
  }
  
  .hero {
    padding: 2rem 1rem;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .articles-bootstrap-grid .col-md-4 {
    width: 50%;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 1.5rem 1rem;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .sidebar {
    padding: 1rem;
  }
  
  .articles-bootstrap-grid .col-md-4 {
    width: 100%;
  }
}

/* Article specific styles */
.article-content {
  max-width: none;
  opacity: 1 !important;
  transform: none !important;
}

.article-content h1 {
  font-size: 2.5rem;
  color: var(--dark);
  margin-bottom: 1rem;
}

.article-content h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-content h3 {
  font-size: 1.5rem;
  color: var(--dark);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.article-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #475569;
  margin-bottom: 1.5rem;
}

.article-content ul, .article-content ol {
  padding-left: 2rem;
  margin-bottom: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  color: #475569;
}

.article-meta {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary);
}

/* Scroll to top button */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-gradient);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 1000;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  transform: translateY(-3px);
}
