/* Material Design Color System */
:root {
  --md-primary: #6200EE;
  --md-primary-dark: #3700B3;
  --md-secondary: #03DAC6;
  --md-secondary-dark: #018786;
  --md-background: #FFFFFF;
  --md-surface: #FFFFFF;
  --md-error: #B00020;
  --md-on-primary: #FFFFFF;
  --md-on-secondary: #000000;
  --md-on-background: #000000;
  --md-on-surface: #000000;
  --md-text-primary: rgba(0, 0, 0, 0.87);
  --md-text-secondary: rgba(0, 0, 0, 0.60);
  --md-text-disabled: rgba(0, 0, 0, 0.38);
  --md-divider: rgba(0, 0, 0, 0.12);
  
  /* Additional colors */
  --accent-green: #00C853;
  --accent-orange: #FF6D00;
  --accent-red: #D50000;
  
  /* Shadows */
  --shadow-1: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  --shadow-2: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
  --shadow-3: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
  --shadow-4: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
  --shadow-5: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #f5f5f5;
  color: var(--md-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--md-primary);
}

/* Header / Navigation */
.md-header {
  background-color: var(--md-primary);
  color: var(--md-on-primary);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: var(--shadow-2);
}

.md-header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.md-logo {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.md-logo-icon {
  font-size: 28px;
}

.md-nav {
  display: flex;
  gap: 8px;
}

.md-nav-link {
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background-color 0.3s ease;
}

.md-nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--md-on-primary);
}

.md-nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Mobile Menu */
.md-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--md-on-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
}

/* Main Content */
.md-main {
  margin-top: 64px;
  min-height: calc(100vh - 64px - 200px);
}

/* Hero Section */
.md-hero {
  background: linear-gradient(135deg, var(--md-primary) 0%, var(--md-primary-dark) 100%);
  color: var(--md-on-primary);
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.md-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.05)"/></svg>');
  background-size: 100px 100px;
}

.md-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.md-hero h1 {
  font-size: 48px;
  font-weight: 300;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.md-hero p {
  font-size: 18px;
  font-weight: 300;
  opacity: 0.9;
  margin-bottom: 32px;
}

.md-hero-btn {
  display: inline-block;
  padding: 12px 32px;
  background-color: var(--md-secondary);
  color: var(--md-on-secondary);
  border-radius: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: var(--shadow-2);
  transition: all 0.3s ease;
}

.md-hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-4);
  color: var(--md-on-secondary);
}

/* Section */
.md-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

.md-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.md-section-title {
  font-size: 28px;
  font-weight: 400;
  color: var(--md-text-primary);
  position: relative;
  padding-bottom: 12px;
}

.md-section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--md-primary);
}

.md-view-all {
  color: var(--md-primary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.3s ease;
}

.md-view-all:hover {
  gap: 8px;
}

/* Article Grid */
.md-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* Article Card */
.md-card {
  background-color: var(--md-surface);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.md-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-3);
}

.md-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background-color: #e0e0e0;
}

.md-card-image.error {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.md-featured-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.md-article-image {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  display: block;
  border-radius: 8px;
  box-shadow: var(--shadow-2);
}

.md-card-content {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.md-card-category {
  display: inline-block;
  padding: 4px 12px;
  background-color: var(--md-primary);
  color: var(--md-on-primary);
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  width: fit-content;
}

.md-card-category.healthy {
  background-color: var(--accent-green);
}

.md-card-category.tips {
  background-color: var(--accent-orange);
}

.md-card-title {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.4;
  color: var(--md-text-primary);
}

.md-card-title:hover {
  color: var(--md-primary);
}

.md-card-desc {
  font-size: 14px;
  color: var(--md-text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.md-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--md-text-secondary);
  padding-top: 12px;
  border-top: 1px solid var(--md-divider);
}

.md-card-author {
  display: flex;
  align-items: center;
  gap: 6px;
}

.md-card-date {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Featured Article */
.md-featured {
  background-color: var(--md-surface);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-2);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  margin-bottom: 24px;
  transition: box-shadow 0.3s ease;
}

.md-featured:hover {
  box-shadow: var(--shadow-4);
}

.md-featured-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.md-featured-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.md-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background-color: var(--md-primary);
  color: var(--md-on-primary);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  width: fit-content;
}

.md-featured-title {
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 16px;
  line-height: 1.3;
  color: var(--md-text-primary);
}

.md-featured-desc {
  font-size: 16px;
  color: var(--md-text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.md-featured-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--md-text-secondary);
}

/* Footer */
.md-footer {
  background-color: #263238;
  color: #ffffff;
  padding: 48px 24px 24px;
}

.md-footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 48px;
}

.md-footer-section h4 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.md-footer-links {
  list-style: none;
}

.md-footer-links li {
  margin-bottom: 8px;
}

.md-footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  transition: color 0.3s ease;
}

.md-footer-links a:hover {
  color: var(--md-secondary);
}

.md-footer-bottom {
  max-width: 1200px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.md-footer-social {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.md-footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s ease;
}

.md-footer-social a:hover {
  background-color: var(--md-primary);
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .md-featured {
    grid-template-columns: 1fr;
  }
  
  .md-featured-image {
    height: 300px;
  }
  
  .md-featured-content {
    padding: 24px;
  }
  
  .md-featured-title {
    font-size: 26px;
  }
}

@media (max-width: 768px) {
  .md-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background-color: var(--md-primary-dark);
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow-3);
  }
  
  .md-nav.active {
    display: flex;
  }
  
  .md-nav-link {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .md-menu-toggle {
    display: block;
  }
  
  .md-hero h1 {
    font-size: 32px;
  }
  
  .md-hero p {
    font-size: 16px;
  }
  
  .md-section {
    padding: 32px 16px;
  }
  
  .md-section-title {
    font-size: 24px;
  }
  
  .md-grid {
    grid-template-columns: 1fr;
  }
  
  .md-featured-title {
    font-size: 22px;
  }
  
  .md-footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  
  /* Make About and Follow Us sections span both columns */
  .md-footer-content .md-footer-section:nth-child(1),
  .md-footer-content .md-footer-section:nth-child(4) {
    grid-column: 1 / -1;
  }

  .mobile-hide {
    display: none !important;
  }
}

/* Loading Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.md-card {
  animation: fadeInUp 0.5s ease forwards;
}

.md-card:nth-child(1) { animation-delay: 0.1s; }
.md-card:nth-child(2) { animation-delay: 0.2s; }
.md-card:nth-child(3) { animation-delay: 0.3s; }
.md-card:nth-child(4) { animation-delay: 0.4s; }
.md-card:nth-child(5) { animation-delay: 0.5s; }
.md-card:nth-child(6) { animation-delay: 0.6s; }

/* Skeleton Loading */
.md-skeleton {
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Button Styles */
.md-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

.md-btn-primary {
  background-color: var(--md-primary);
  color: var(--md-on-primary);
}

.md-btn-primary:hover {
  background-color: var(--md-primary-dark);
  box-shadow: var(--shadow-2);
}

.md-btn-outline {
  background-color: transparent;
  border: 2px solid var(--md-primary);
  color: var(--md-primary);
}

.md-btn-outline:hover {
  background-color: var(--md-primary);
  color: var(--md-on-primary);
}

/* Badge */
.md-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.md-badge-primary {
  background-color: var(--md-primary);
  color: var(--md-on-primary);
}

.md-badge-secondary {
  background-color: var(--md-secondary);
  color: var(--md-on-secondary);
}

/* Divider */
.md-divider {
  height: 1px;
  background-color: var(--md-divider);
  margin: 24px 0;
}

/* Container */
.md-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
