/**
 * Health Calculators Page Styles
 */

:root {
  /* Light mode variables */
  --health-primary: #4CAF50;
  --health-secondary: #66BB6A;
  --health-accent: #2196F3;
  --health-warning: #FF9800;
  --health-error: #F44336;
  --health-light-bg: #E8F5E9;
  --health-dark: #1B5E20;
  --health-gradient: linear-gradient(135deg, var(--health-primary), var(--health-secondary));
  
  --text-color: #333333;
  --text-light: #666666;
  --heading-color: #1f6e2d;
  --bg-color: #f9f9f9;
  --card-bg: #ffffff;
  --card-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  --hover-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  --border-color: #e0e0e0;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark mode variables */
    --health-primary: #4CAF50;
    --health-secondary: #66BB6A;
    --health-accent: #42A5F5;
    --health-warning: #FFA726;
    --health-error: #EF5350;
    --health-light-bg: #1B5E20;
    --health-dark: #E8F5E9;
    --health-gradient: linear-gradient(135deg, var(--health-primary), var(--health-secondary));
    
    --text-color: #f0f0f0;
    --text-light: #bbbbbb;
    --heading-color: #6eca77;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --card-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    --hover-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    --border-color: #3a3a3a;
  }
}

/* Main Container */
.health-calculators-page {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Poppins', sans-serif;
}

/* Hero Section with Graphics */
.health-hero-section {
  background: var(--health-gradient);
  padding: 60px 20px;
  border-radius: 15px;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.health-hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/health-pattern.png');
  opacity: 0.1;
  z-index: 0;
}

.health-hero-content {
  position: relative;
  z-index: 1;
}

.health-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
}

.health-hero-text {
  padding-right: 20px;
}

.health-hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: white;
}

.health-hero-description {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.health-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 25px;
}

.health-stat {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: 0.9rem;
}

.health-stat i {
  font-size: 1.1rem;
}

.health-hero-graphic {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 300px;
}

.health-hero-image {
  position: relative;
  z-index: 2;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
}

.health-graphic-circle {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  z-index: 1;
}

.circle-1 {
  width: 200px;
  height: 200px;
  top: 10%;
  left: 10%;
  background-color: rgba(255, 255, 255, 0.05);
  animation: float 6s ease-in-out infinite;
}

.circle-2 {
  width: 150px;
  height: 150px;
  bottom: 20%;
  right: 10%;
  background-color: rgba(255, 255, 255, 0.08);
  animation: float 8s ease-in-out infinite;
}

.circle-3 {
  width: 100px;
  height: 100px;
  bottom: 30%;
  left: 20%;
  background-color: rgba(255, 255, 255, 0.12);
  animation: float 10s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Search and Filter - Combined in one line */
.health-search-filter {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.health-search-filter-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  align-items: center;
}

.search-container {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--health-primary);
  font-size: 1rem;
}

.health-search-input {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 20px 12px 45px;
  width: 100%;
  font-size: 1rem;
  transition: all 0.3s ease;
  color: var(--text-color);
  background-color: var(--bg-color);
}

.health-search-input:focus {
  box-shadow: 0 0 0 2px var(--health-primary);
  outline: none;
  border-color: var(--health-primary);
}

.health-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.health-filter-button {
  background-color: var(--health-light-bg);
  color: var(--health-dark);
  border: none;
  border-radius: 30px;
  padding: 8px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.health-filter-button:hover {
  background-color: var(--health-secondary);
  color: white;
  transform: translateY(-2px);
}

.health-filter-button.active {
  background-color: var(--health-primary);
  color: white;
}

/* Calculator Cards - Fixed image display */
.health-calculators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.health-calculator-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--card-shadow);
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.05);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.health-calculator-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

.health-calculator-card:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--health-gradient);
}

.health-calculator-image {
  height: 180px;
  position: relative;
  overflow: hidden;
}

.health-calculator-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.health-calculator-category {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 20px;
  z-index: 2;
}

.health-calculator-card:hover .health-calculator-image img {
  transform: scale(1.05);
}

.health-calculator-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.health-calculator-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--heading-color);
}

.health-calculator-description {
  font-size: 0.95rem;
  color: var(--text-color);
  margin-bottom: 20px;
  flex-grow: 1;
}

.health-calculator-button {
  display: inline-block;
  background-color: var(--health-primary);
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  text-align: center;
  border: none;
  cursor: pointer;
  z-index: 2;
  position: relative;
}

.health-calculator-button:hover {
  background-color: #3a9d3e;
  transform: translateY(-2px);
}

.health-calculator-overlay-link {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

/* Explore More Section - Modern design */
.health-explore-more-section {
  margin: 60px 0;
  padding: 40px 20px;
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.health-explore-more-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--heading-color);
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.health-explore-more-title:after {
  content: '';
  position: absolute;
  width: 80px;
  height: 4px;
  background: var(--health-gradient);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.health-explore-more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.health-explore-card {
  background-color: var(--bg-color);
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.health-explore-card:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--health-gradient);
}

.health-explore-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--hover-shadow);
}

.health-explore-icon {
  width: 70px;
  height: 70px;
  background: var(--health-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 25px;
  box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.health-explore-icon i {
  font-size: 28px;
  color: white;
}

.health-explore-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--heading-color);
  margin-bottom: 15px;
}

.health-explore-description {
  font-size: 0.95rem;
  color: var(--text-color);
  margin-bottom: 25px;
  flex-grow: 1;
  line-height: 1.6;
}

.health-explore-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 25px;
}

.health-explore-tag {
  background-color: var(--health-light-bg);
  color: var(--health-dark);
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 30px;
  transition: all 0.3s ease;
}

.health-explore-tag:hover {
  background-color: var(--health-secondary);
  color: white;
  transform: translateY(-2px);
}

.health-explore-button {
  display: inline-block;
  background-color: var(--health-primary);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  text-align: center;
  transition: all 0.3s ease;
  align-self: flex-start;
  margin-top: auto;
  width: 100%;
}

.health-explore-button:hover {
  background-color: #3a9d3e;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(76, 175, 80, 0.2);
}

/* Category Pills */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-bottom: 40px;
}

.category-pill {
  background-color: var(--card-bg);
  color: var(--text-color);
  border-radius: 30px;
  padding: 10px 20px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-pill i {
  color: var(--health-primary);
  font-size: 1rem;
}

.category-pill:hover {
  background-color: var(--health-light-bg);
  color: var(--health-dark);
  transform: translateY(-2px);
}

.all-pill {
  background-color: var(--health-primary);
  color: white;
}

.all-pill i {
  color: white;
}

.all-pill:hover {
  background-color: #3a9d3e;
  color: white;
}

/* SEO Content Section */
.health-seo-content {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: var(--card-shadow);
}

.health-seo-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 20px;
}

.health-seo-text {
  color: var(--text-color);
  line-height: 1.6;
}

.health-seo-text h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--heading-color);
  margin: 20px 0 10px;
}

.health-seo-text p {
  margin-bottom: 15px;
}

.health-seo-list {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.health-seo-list li {
  padding-left: 25px;
  position: relative;
  margin-bottom: 10px;
}

.health-seo-list li::before {
  content: '✓';
  color: var(--health-primary);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Call to Action */
.cta-section {
  background: var(--health-gradient);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/health-pattern.png');
  opacity: 0.1;
  z-index: 0;
}

.cta-section h2 {
  color: white;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 25px;
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
}

.cta-button {
  display: inline-block;
  background-color: white;
  color: var(--health-primary);
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.cta-button:hover {
  background-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Animation Classes */
.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.slide-up {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Results Count */
.health-results-count {
  background-color: var(--health-light-bg);
  color: var(--health-dark);
  border-radius: 30px;
  padding: 6px 15px;
  font-size: 0.9rem;
  margin-top: 15px;
  text-align: center;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* Image placeholders and error states */
.health-calculator-card.image-error .health-calculator-image {
  background-color: var(--health-light-bg);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.health-calculator-card.image-error .health-calculator-image::before {
  content: '\f1ec';  /* Calculator icon from Font Awesome */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 3rem;
  color: var(--health-primary);
  position: absolute;
  z-index: 1;
}

.health-calculator-card.image-error .health-calculator-image img {
  opacity: 0.2;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .health-hero-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .health-hero-text {
    padding-right: 0;
    text-align: center;
  }
  
  .health-hero-title {
    font-size: 2rem;
  }
  
  .health-hero-description {
    font-size: 1rem;
  }
  
  .health-hero-stats {
    justify-content: center;
  }
  
  .health-hero-graphic {
    height: 250px;
    order: -1;
  }
  
  .health-search-filter-container {
    grid-template-columns: 1fr;
  }
  
  .health-filter-buttons {
    justify-content: center;
  }
  
  .health-calculators-grid,
  .health-explore-more-grid {
    grid-template-columns: 1fr;
  }
  
  .health-explore-more-title {
    font-size: 1.75rem;
  }
  
  .category-pills {
    flex-direction: column;
    align-items: center;
  }
  
  .category-pill {
    width: 100%;
    justify-content: center;
  }
  
  .cta-section {
    padding: 30px 20px;
  }
  
  .cta-section h2 {
    font-size: 1.75rem;
  }
  
  .health-results-count {
    width: 100%;
    margin-top: 10px;
  }
  
  .health-explore-more-grid {
    grid-template-columns: 1fr;
  }
  
  .health-explore-card {
    padding: 25px;
  }
  
  .health-explore-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
  }
  
  .health-explore-title {
    font-size: 1.3rem;
  }
  
  .health-explore-button {
    padding: 10px 15px;
  }
} 