/* pages/enfermedades.css */
:root {
  --primary: #2e7d32;
  --primary-dark: #1b5e20;
  --primary-light: #81c784;
  --danger: #d32f2f;
  --danger-light: #ffebee;
  --warning: #f57c00;
  --info: #0288d1;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-600: #6c757d;
  --gray-800: #343a40;
  --white: #ffffff;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Inter', system-ui, sans-serif;
  background: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.6;
}

/* Navigation */
.nav-wrapper {
  background: linear-gradient(135deg, #1a3c1a 0%, #2e7d32 100%);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

#header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

#logo h1 {
  margin: 0;
  font-size: 1.5rem;
}

#logo a {
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
}

#logo span {
  color: #ffb74d;
}

#mainav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

#mainav ul li a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

#mainav ul li a:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #1a3c1a 0%, #2e7d32 100%);
  padding: 2.5rem 20px;
  text-align: center;
}

.hero-content h1 {
  color: var(--white);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.hero-content h1 i {
  margin-right: 0.75rem;
}

.hero-content p {
  color: rgba(255,255,255,0.9);
  font-size: 1rem;
}

/* Main Container */
.main-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 20px;
  display: flex;
  gap: 2rem;
}

/* Sidebar */
.sidebar {
  flex: 0 0 280px;
}

.sidebar-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  position: sticky;
  top: 100px;
}

.sidebar-card h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-light);
  color: var(--primary-dark);
}

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

.nav-item {
  margin-bottom: 0.75rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-800);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: var(--primary);
  transform: translateX(5px);
}

.nav-link i {
  width: 20px;
  color: var(--primary);
}

.sub-nav {
  list-style: none;
  padding-left: 1.75rem;
  margin-top: 0.5rem;
}

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

.sub-nav li a {
  color: var(--gray-600);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.sub-nav li a:hover {
  color: var(--primary);
  padding-left: 5px;
}

/* Main Content */
.main-content {
  flex: 1;
  min-width: 0;
}

/* Disease Section */
.disease-section {
  margin-bottom: 3rem;
}

.section-header {
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--primary);
}

.section-header h2 {
  font-size: 1.5rem;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-header p {
  color: var(--gray-600);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Disease Grid */
.disease-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
  gap: 1.5rem;
}

.disease-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  display: flex;
}

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

.disease-image {
  flex: 0 0 200px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.disease-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.disease-info {
  flex: 1;
  padding: 1rem 1.25rem;
}

.disease-info h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
}

.disease-info p {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.disease-source {
  font-size: 0.7rem;
  color: var(--gray-600);
  font-style: italic;
  padding-top: 0.5rem;
  border-top: 1px solid var(--gray-200);
}

.disease-source i {
  margin-right: 0.25rem;
}

/* Contact Form */
.contact-form-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}

.form-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.form-header i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.form-header h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.form-header p {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--gray-800);
}

.form-group label span {
  color: var(--danger);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46,125,50,0.1);
}

.form-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.btn-submit,
.btn-reset {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.btn-submit {
  background: var(--primary);
  color: var(--white);
}

.btn-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-reset {
  background: var(--gray-200);
  color: var(--gray-800);
}

.btn-reset:hover {
  background: var(--gray-300);
}

/* CTA Footer */
.cta-footer {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 2rem;
}

.cta-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.cta-content i {
  font-size: 2rem;
  color: var(--white);
}

.cta-content h4 {
  color: var(--white);
  margin-bottom: 0.25rem;
}

.cta-content p {
  color: rgba(255,255,255,0.8);
  font-size: 0.875rem;
}

.btn-cta {
  background: var(--white);
  color: var(--primary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Footer */
.footer {
  background: var(--gray-800);
  color: var(--white);
  text-align: center;
  padding: 2rem;
  margin-top: 2rem;
}

.footer-content p {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.8;
}

.footer-credit {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  opacity: 0.6;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background: var(--primary);
  color: var(--white);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  z-index: 1000;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 992px) {
  .main-container {
    flex-direction: column;
  }
  
  .sidebar {
    flex: none;
  }
  
  .sidebar-card {
    position: static;
  }
  
  .disease-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 1.5rem;
  }
  
  .disease-card {
    flex-direction: column;
  }
  
  .disease-image {
    flex: none;
    padding: 1rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .form-buttons {
    flex-direction: column;
  }
  
  .btn-submit,
  .btn-reset {
    width: 100%;
    justify-content: center;
  }
  
  .cta-content {
    flex-direction: column;
    text-align: center;
  }
  
  #header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  #mainav ul {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .contact-form-section {
    padding: 1.5rem;
  }
  
  .section-header h2 {
    font-size: 1.25rem;
  }
}