/* Override main styles for better readability */
.hero-section h1,
.hero-section h3,
.hero-section p {
  color: white !important;
}

.post-card h3,
.post-card h3 a {
  color: #004d4d !important;
}

.post-card h3 a:hover {
  color: #006666 !important;
}

/* Fix the Read on Substack links */
.post-card .read-more {
  color: #004d4d !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  font-size: 0.9rem !important;
}

.post-card .read-more:hover {
  color: #003333 !important;
}

/* Make buttons visible in hero section */
.hero-section .btn {
  color: white !important;
}

.hero-section .btn-primary {
  background: rgba(255,255,255,0.2) !important;
  color: white !important;
  border: 2px solid white !important;
}

.hero-section .btn-primary:hover {
  background: white !important;
  color: #004d4d !important;
  transform: translateY(-2px);
}

.hero-section .btn-outline {
  background: transparent !important;
  color: white !important;
  border: 2px solid rgba(255,255,255,0.6) !important;
}

.hero-section .btn-outline:hover {
  background: rgba(255,255,255,0.1) !important;
  border-color: white !important;
  transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #004d4d 0%, #006666 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  border-radius: 15px;
  margin-bottom: 3rem;
}

.hero-section h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-section h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
  font-weight: 400;
}

.hero-section p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: rgba(255,255,255,0.2);
  color: white;
  border: 2px solid white;
}

.btn-primary:hover {
  background: white;
  color: #004d4d;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.6);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: white;
  transform: translateY(-2px);
}

/* Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.post-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  height: fit-content;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.post-card h3 {
  color: #004d4d;
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
  line-height: 1.4;
}

.post-card h3 a {
  text-decoration: none;
  color: inherit;
}

.post-card h3 a:hover {
  color: #006666;
}

.post-card em {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: block;
}

.post-card p {
  color: #495057;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  background: #f8f9fa;
  color: #6c757d;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
}

.read-more {
  color: #004d4d !important;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

.read-more:hover {
  color: #003333 !important;
}

/* Topics Grid */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.topic-card {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 10px;
  text-align: center;
  transition: all 0.3s ease;
}

.topic-card:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

.topic-card i {
  font-size: 2.5rem;
  color: #006666;
  margin-bottom: 1rem;
}

.topic-card h3 {
  color: #004d4d;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.topic-card p {
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Newsletter Footer */
.newsletter-footer {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
  margin-top: 3rem;
}

.newsletter-content h4 {
  color: #004d4d !important;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.newsletter-content p {
  color: #6c757d;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.footer-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-buttons .btn-primary {
  background: #004d4d !important;
  color: white !important;
  border: 2px solid #004d4d !important;
}

.footer-buttons .btn-primary:hover {
  background: #003333 !important;
  border-color: #003333 !important;
}

.footer-buttons .btn-outline {
  background: transparent !important;
  color: #004d4d !important;
  border: 2px solid #004d4d !important;
}

.footer-buttons .btn-outline:hover {
  background: #004d4d !important;
  color: white !important;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .post-card {
    background: #004d4d;
    border-color: #006666;
    color: white;
  }
  
  .post-card h3 {
    color: white !important;
  }
  
  .post-card h3 a {
    color: white !important;
  }
  
  .post-card h3 a:hover {
    color: #66b3b3 !important;
  }
  
  .post-card p {
    color: #bdc3c7;
  }
  
  .tag {
    background: #006666;
    color: #bdc3c7;
  }
  
  .topic-card {
    background: #006666;
    color: white;
  }
  
  .topic-card h3 {
    color: white;
  }
  
  .topic-card p {
    color: #bdc3c7;
  }
  
  .newsletter-footer {
    background: linear-gradient(135deg, #006666 0%, #004d4d 100%);
  }
  
  .newsletter-content h4 {
    color: white !important;
  }
  
  .newsletter-content p {
    color: #bdc3c7;
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 1rem;
  }
  
  .hero-section h1 {
    font-size: 2.2rem;
  }
  
  .hero-section h3 {
    font-size: 1.2rem;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .topics-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .footer-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 200px;
    justify-content: center;
  }
}