/* ===== SPECIES STYLES ===== */

/* Single Species Page */
.single-species-main {
  background: #f8f9fa;
  min-height: 100vh;
}

.species-article {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  padding: 0;
  overflow: hidden;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.species-header {
  background: linear-gradient(135deg, #e9f7ef 0%, #f8fff9 100%);
  padding: 3rem 0 2rem;
  border-bottom: 1px solid #e9ecef;
}

.species-scientific-name {
  font-size: 1.25rem;
  color: #6c757d;
  font-style: italic;
}

.species-title {
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(40,167,69,0.1);
}

.species-meta {
  font-size: 0.95rem;
}

.species-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.species-categories .badge {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.species-featured-image {
  padding: 0 2rem;
}

.species-featured-image figure {
  margin: 0;
}

.species-featured-image img {
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
}

.species-featured-image img:hover {
  transform: scale(1.02);
}

.species-quick-info {
  padding: 0 2rem;
}

.species-quick-info .card {
  border: 2px solid #28a745;
  border-radius: 15px;
  overflow: hidden;
}

.species-quick-info .card-header {
  background: #28a745;
  border: none;
}

.species-quick-info .card-body {
  padding: 1.5rem;
}

.info-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f3f4;
}

.info-item:last-child {
  border-bottom: none;
}

.info-label {
  color: #495057;
  min-width: 120px;
}

.info-value {
  color: #28a745;
  font-weight: 500;
}

.species-content {
  padding: 2rem;
}

.species-content .content-wrapper {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #495057;
}

.species-content h2 {
  color: #28a745;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e9f7ef;
}

.species-content h3 {
  color: #495057;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.species-content p {
  margin-bottom: 1.2rem;
}

.species-content ul,
.species-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.species-content li {
  margin-bottom: 0.5rem;
}

.species-content img {
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  margin: 1.5rem 0;
}

.species-features .badge {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  margin: 0.25rem;
}

.species-tags .badge {
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  margin: 0.2rem;
}

.species-gallery {
  padding: 0 2rem 2rem;
}

.gallery-grid {
  gap: 1rem;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.species-share {
  padding: 2rem;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

/* Navigation between species */
.species-navigation {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-top: 1px solid #dee2e6;
}

.species-navigation .nav-link {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  color: #495057;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.species-navigation .nav-link:hover {
  background: #28a745;
  color: #fff;
  border-color: #28a745;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40,167,69,0.3);
}

.species-navigation .nav-icon {
  font-size: 1.5rem;
}

.species-navigation .nav-title {
  font-weight: 600;
  font-size: 1rem;
}

/* Related species section */
.related-species {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9f7ef 100%);
}

.related-species .species-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
}

.related-species .species-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  border-color: #28a745;
}

.species-thumbnail-wrapper {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.species-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-species .species-card:hover .species-thumbnail {
  transform: scale(1.05);
}

.species-placeholder {
  background: linear-gradient(135deg, #28a745, #20c997);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
}

.species-card-content {
  padding: 1.5rem;
}

.species-card-title {
  color: #495057;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.species-scientific {
  color: #6c757d;
  font-size: 0.9rem;
  font-style: italic;
}

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

.species-meta small {
  font-size: 0.8rem;
  color: #6c757d;
}

/* Archive Species Page */
.species-archive-main {
  background: #f8f9fa;
  min-height: 100vh;
}

.species-archive-header {
  background: linear-gradient(135deg, #e9f7ef 0%, #f8fff9 100%);
  border-bottom: 1px solid #e9ecef;
}

.species-archive-title {
  color: #28a745;
  font-weight: 700;
  margin-bottom: 1rem;
}

.species-archive-description {
  color: #6c757d;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.species-archive-meta .badge {
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
}

.species-filters {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-bottom: 2rem;
}

.species-view-toggle .btn {
  border-color: #28a745;
  color: #28a745;
}

.species-view-toggle .btn.active {
  background: #28a745;
  color: #fff;
}

.species-sort select {
  border-color: #28a745;
  border-radius: 8px;
}

.species-sort select:focus {
  border-color: #28a745;
  box-shadow: 0 0 0 0.2rem rgba(40,167,69,0.25);
}

/* Archive Grid */
.species-grid .species-item {
  margin-bottom: 2rem;
}

.species-grid .species-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  height: 100%;
}

.species-grid .species-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
  border-color: #28a745;
}

.species-card-image-wrapper {
  position: relative;
  text-align: center;
  padding: 1.5rem 1.5rem 1rem;
}

.species-card-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto;
  overflow: hidden;
  border: 4px solid #f8f9fa;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.species-difficulty-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.species-card-content {
  padding: 0 1.5rem 1.5rem;
  text-align: center;
}

.species-card-title {
  color: #495057;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.species-scientific-name {
  color: #6c757d;
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 1rem;
}

.species-card-excerpt {
  color: #6c757d;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.species-card-meta {
  margin-bottom: 1rem;
}

.species-card-meta small {
  display: block;
  margin-bottom: 0.25rem;
  color: #6c757d;
  font-size: 0.8rem;
}

.feature-tag {
  display: inline-block;
  background: #e9f7ef;
  color: #28a745;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  margin: 0.1rem;
  font-weight: 500;
}

.species-card-action .btn {
  transition: all 0.3s ease;
  border-radius: 20px;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

.species-card:hover .species-card-action .btn {
  background: #28a745;
  color: #fff;
  border-color: #28a745;
  transform: translateY(-2px);
}

/* List view styles */
.species-grid[data-view="list"] .row {
  flex-direction: column;
}

.species-grid[data-view="list"] .species-item {
  max-width: 100%;
  flex: 0 0 100%;
}

.species-grid[data-view="list"] .species-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: left;
  margin-bottom: 1.5rem;
}

.species-grid[data-view="list"] .species-card-image-wrapper {
  flex: 0 0 180px;
  padding: 1.5rem;
}

.species-grid[data-view="list"] .species-card-content {
  flex: 1;
  text-align: left;
  padding: 1.5rem;
}

.species-grid[data-view="list"] .species-card-image {
  width: 100px;
  height: 100px;
}

/* Pagination */
.species-pagination .pagination {
  justify-content: center;
}

.species-pagination .page-link {
  color: #28a745;
  border-color: #28a745;
  padding: 0.75rem 1rem;
  margin: 0 0.25rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.species-pagination .page-link:hover {
  background: #28a745;
  color: #fff;
  transform: translateY(-2px);
}

.species-pagination .page-item.active .page-link {
  background: #28a745;
  border-color: #28a745;
}

/* No species found */
.no-species-found {
  padding: 4rem 2rem;
}

.no-species-icon {
  color: #6c757d;
}

.no-species-title {
  color: #495057;
  margin-bottom: 1rem;
}

.no-species-description {
  color: #6c757d;
  max-width: 500px;
  margin: 0 auto 2rem;
}

/* Related articles in archive */
.related-articles {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9f7ef 100%);
}

.related-article-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
}

.related-article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border-color: #28a745;
}

.related-article-thumbnail-wrapper {
  overflow: hidden;
  height: 200px;
}

.related-article-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-article-card:hover .related-article-thumbnail {
  transform: scale(1.05);
}

.related-article-content {
  padding: 1.5rem;
}

.related-article-title {
  color: #495057;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.related-article-meta {
  margin-bottom: 0.75rem;
}

.related-article-excerpt {
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .species-article {
    margin: 1rem;
    border-radius: 15px;
  }
  
  .species-header {
    padding: 2rem 0 1.5rem;
  }
  
  .species-title {
    font-size: 2.5rem;
  }
  
  .species-featured-image {
    padding: 0 1rem;
  }
  
  .species-content {
    padding: 1.5rem;
  }
  
  .species-gallery {
    padding: 0 1rem 1.5rem;
  }
  
  .species-share {
    padding: 1.5rem;
  }
}

@media (max-width: 767.98px) {
  .species-article {
    margin: 0.5rem;
    border-radius: 12px;
  }
  
  .species-header {
    padding: 1.5rem 0 1rem;
  }
  
  .species-title {
    font-size: 2rem;
  }
  
  .species-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .species-featured-image {
    padding: 0 0.5rem;
  }
  
  .species-content {
    padding: 1rem;
  }
  
  .species-quick-info {
    padding: 0 0.5rem;
  }
  
  .species-quick-info .info-item {
    flex-direction: column;
    text-align: left;
  }
  
  .species-quick-info .info-label {
    min-width: auto;
    margin-bottom: 0.25rem;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .gallery-item img {
    height: 150px;
  }
  
  .species-navigation .nav-link {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
  }
  
  .species-navigation .nav-icon {
    margin: 0 0 0.5rem 0;
  }
  
  /* Archive responsive */
  .species-grid[data-view="list"] .species-card {
    flex-direction: column;
    text-align: center;
  }
  
  .species-grid[data-view="list"] .species-card-content {
    text-align: center;
  }
  
  .species-card-image {
    width: 80px;
    height: 80px;
  }
  
  .species-filters {
    padding: 1rem;
  }
  
  .species-view-toggle,
  .species-sort {
    text-align: center;
    margin-bottom: 1rem;
  }
}

@media (max-width: 575.98px) {
  .species-title {
    font-size: 1.75rem;
  }
  
  .species-scientific-name {
    font-size: 1rem;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-item img {
    height: 200px;
  }
  
  .species-card-image {
    width: 60px;
    height: 60px;
  }
}

/* Print styles */
@media print {
  .species-navigation,
  .species-share,
  .related-species,
  .species-filters {
    display: none;
  }
  
  .species-article {
    box-shadow: none;
    border: none;
    margin: 0;
    padding: 0;
  }
  
  .species-header {
    background: none;
    border: none;
  }
  
  .species-content a {
    color: #495057;
    text-decoration: underline;
  }
}