/* Main Layout */
main {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Language Selector */
.language-selector {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
}

.language-selector select {
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #ddd;
  background: white;
  font-size: 0.9rem;
}

/* Filter Panel */
.filter-panel {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-group {
  flex: 1;
}

.filter-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #333;
  font-weight: 500;
}

.filter-group select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
}

/* Map Container */
#map {
  height: 600px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

/* Farm Profile Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal-content {
  position: relative;
  background: white;
  margin: 5% auto;
  padding: 2rem;
  width: 80%;
  max-width: 1000px;
  border-radius: 8px;
  max-height: 90vh;
  overflow-y: auto;
}

.close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
}

.farm-profile {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.farm-images img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.farm-details h2 {
  color: #ff8c00;
  margin-bottom: 1rem;
}

.farm-details p {
  margin-bottom: 0.5rem;
  color: #666;
}

.farm-metrics,
.farm-partners {
  margin-top: 1.5rem;
}

.farm-metrics h3,
.farm-partners h3 {
  color: #228b22;
  margin-bottom: 0.5rem;
}

.farm-metrics ul,
.farm-partners ul {
  list-style: none;
  padding: 0;
}

.farm-metrics li,
.farm-partners li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

/* Export Options */
.export-options {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.export-options button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  background: #ff8c00;
  color: white;
  cursor: pointer;
  transition: background 0.3s ease;
}

.export-options button:hover {
  background: #e67e00;
}

/* Responsive Design */
@media (max-width: 768px) {
  .filter-panel {
    flex-direction: column;
  }

  .farm-profile {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95%;
    margin: 2% auto;
  }

  .export-options {
    flex-direction: column;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* RTL Support */
[dir="rtl"] .modal-content {
  text-align: right;
}

[dir="rtl"] .close {
  left: 1rem;
  right: auto;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .modal-content {
    border: 2px solid black;
  }

  .farm-details h2 {
    color: black;
  }

  .farm-metrics h3,
  .farm-partners h3 {
    color: black;
  }
}

.image-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #f5f5f5;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.farm-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.farm-image:hover {
  transform: scale(1.02);
}

.farm-image-description {
  text-align: center;
  margin: 15px 0;
  padding: 15px;
  background: white;
  border-radius: 8px;
  font-style: italic;
  color: #333;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
  width: 100%;
}

.carousel-navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
  width: 100%;
}

.carousel-button {
  background: rgba(255, 140, 0, 0.8);
  color: white;
  border: none;
  padding: 8px 15px;
  cursor: pointer;
  border-radius: 20px;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
}

.carousel-button:hover {
  background: rgba(255, 140, 0, 1);
  transform: scale(1.05);
}

.carousel-button:active {
  transform: scale(0.95);
}

.image-counter {
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
}

/* Remove the old positioning styles */
.prev-button,
.next-button {
  position: static;
  transform: none;
}

/* Add fade animation for image transitions */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.farm-image {
  animation: fadeIn 0.5s ease-in-out;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ff8c00;
  text-decoration: none;
  margin-top: 5px;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: #e67e00;
  text-decoration: underline;
}

.contact-link i {
  font-size: 14px;
}
