/* Animals Page Specific Styles */

.animals-hero {
    position: relative;
    height: 60vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 2rem;
}

.animals-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
                url('https://images.unsplash.com/photo-1484406566174-9da000fda645?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1580&q=80');
    background-size: cover;
    background-position: center;
    z-index: 0;
    animation: kenburns-right 15s ease-in-out forwards;
}

.animals-hero .hero-content {
    position: relative;
    z-index: 1;
}

.animals-hero .hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.animals-hero .hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Ken Burns Right Animation */
@keyframes kenburns-right {
    0% {
        transform: scale(1) translate(0, 0);
        transform-origin: 84% 50%;
    }
    100% {
        transform: scale(1.25) translateX(20px);
        transform-origin: right;
    }
}

/* Animals Filter */
.animals-filter {
    background-color: var(--light);
    padding: 2rem 0;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: var(--dark);
}

.filter-group select, 
.filter-group input {
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.filter-group input {
    width: 200px;
}

#search-btn {
    padding: 0.6rem 1rem;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Animals Gallery */
.animals-gallery {
    padding: 4rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.animal-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.animal-card:hover {
    transform: translateY(-5px);
}

.animal-image {
    height: 250px;
    position: relative;
    overflow: hidden;
}

.animal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.animal-card:hover .animal-image img {
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.badge.endemic {
    background-color: var(--primary);
}

.badge.endangered {
    background-color: #d32f2f;
}

.badge.protected {
    background-color: #1976d2;
}

.animal-info {
    padding: 1.5rem;
}

.animal-info h3 {
    color: var(--dark);
    margin-bottom: 0.3rem;
}

.scientific {
    color: #777;
    font-style: italic;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.animal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.animal-meta i {
    margin-right: 5px;
    color: var(--primary);
}

.description {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.animal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-details {
    padding: 0.6rem 1.5rem;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-details:hover {
    background-color: var(--primary);
}

.btn-favorite {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #ccc;
    cursor: pointer;
    transition: color 0.3s;
}

.btn-favorite:hover, 
.btn-favorite.active {
    color: #d32f2f;
}

/* Conservation Status */
.conservation-status {
    margin-top: 1rem;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.status-endangered {
    background-color: #ffebee;
    color: #d32f2f;
    border-left: 4px solid #d32f2f;
}

.status-protected {
    background-color: #e3f2fd;
    color: #1976d2;
    border-left: 4px solid #1976d2;
}

.status-endemic {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.btn-pagination {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-pagination:hover,
.btn-pagination.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-pagination-next {
    padding: 0 1.5rem;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-pagination-next:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    width: 80%;
    max-width: 800px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
    z-index: 1;
}

.close-modal:hover {
    color: var(--text);
}

.modal-body {
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.modal-animal-image {
    position: relative;
}

.modal-animal-image img {
    width: 100%;
    border-radius: 8px;
}

.modal-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 0.5rem;
}

.modal-animal-info h2 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.modal-animal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .filter-options {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-group input {
        width: 100%;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
}