/* Listings Styles */

.listing-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid #e0e0e0;
}

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

.listing-card img {
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}

.listing-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
}

.price-tag {
    font-size: 1.25rem;
    font-weight: bold;
    color: #28a745;
}

.rating-stars {
    color: #ffc107;
}

.rating-stars .empty {
    color: #e0e0e0;
}

/* Species Detail Styles */
.species-hero {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    background-attachment: fixed;
}

.species-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 85, 48, 0.8), rgba(76, 175, 80, 0.6));
}

.species-hero .container {
    position: relative;
    z-index: 2;
}

.species-card {
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.2s ease-in-out;
}

.species-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.related-species-card {
    border: 1px solid #e0e0e0;
    display: block;
    text-decoration: none;
    color: inherit;
}

.related-species-card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: inherit;
    text-decoration: none;
}

.species-image {
    border-radius: 5px;
    object-fit: cover;
}

/* Filter Styles */
.filter-sidebar {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.filter-section {
    margin-bottom: 25px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c5530;
    border-bottom: 2px solid #4caf50;
    padding-bottom: 5px;
}

.form-check-input:checked {
    background-color: #4caf50;
    border-color: #4caf50;
}

.form-check-input:focus {
    border-color: #4caf50;
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
}

/* Pagination Styles */
.pagination .page-link {
    color: #2c5530;
    border-color: #dee2e6;
}

.pagination .page-link:hover {
    color: #1a3f1d;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #4caf50;
    border-color: #4caf50;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .species-hero {
        padding: 60px 0;
        background-attachment: scroll;
    }
    
    .species-hero h1 {
        font-size: 2rem;
    }
    
    .listing-card {
        margin-bottom: 20px;
    }
    
    .related-species-card {
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .species-hero {
        padding: 40px 0;
    }
    
    .species-hero h1 {
        font-size: 1.75rem;
    }
    
    .species-card {
        margin-bottom: 20px;
    }
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading states */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4caf50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success and error states */
.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Button enhancements */
.btn-primary {
    background-color: #4caf50;
    border-color: #4caf50;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #45a049;
    border-color: #45a049;
}

.btn-outline-primary {
    color: #4caf50;
    border-color: #4caf50;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: #4caf50;
    border-color: #4caf50;
}
