/**
 * Enhanced Index Page Styles
 * Beautiful, modern, responsive design for the dinosaur encyclopedia
 */

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, #2d5016 0%, #4a7c2c 100%);
    color: white;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-features {
    margin: 3rem 0;
}

.feature-item {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    text-align: center;
}

.feature-item:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-5px);
}

.feature-item i {
    color: #ffd700;
    margin-bottom: 0.5rem;
}

.hero-actions {
    margin-top: 2rem;
}

/* ===== Statistics Section ===== */
.statistics-section {
    padding: 60px 0;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.stat-icon {
    font-size: 3rem;
    color: #2d5016;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    color: #2d5016;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== Featured Section ===== */
.featured-section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #2d5016;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
}

.featured-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.featured-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.featured-image-wrapper {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-card:hover .featured-image {
    transform: scale(1.1);
}

.featured-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.featured-badge {
    background: rgba(255,215,0,0.9);
    color: #2d5016;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
}

.featured-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.featured-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2d5016;
    margin-bottom: 0.5rem;
}

.featured-scientific {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.featured-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge-period, .badge-diet {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.featured-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.featured-stats {
    display: flex;
    justify-content: space-around;
    padding: 1rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
}

.stat-item {
    text-align: center;
}

.stat-item i {
    color: #2d5016;
    margin-right: 0.3rem;
}

/* ===== Search Section ===== */
.search-section {
    padding: 60px 0;
}

.search-filter-container {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.search-input-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.2rem;
}

.search-input {
    padding-left: 3rem;
    padding-right: 3rem;
    height: 50px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #2d5016;
    box-shadow: 0 0 0 3px rgba(45,80,22,0.1);
}

.clear-search {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.clear-search:hover {
    color: #2d5016;
}

.filter-select {
    height: 50px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    padding: 0 1.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-select:focus {
    border-color: #2d5016;
    box-shadow: 0 0 0 3px rgba(45,80,22,0.1);
}

.results-info {
    color: #666;
    font-size: 0.95rem;
}

/* ===== Dinosaurs Grid ===== */
.dinosaurs-grid-section {
    padding: 60px 0;
}

.dinosaur-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dinosaur-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.dinosaur-image-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.dinosaur-card:hover .dinosaur-image {
    transform: scale(1.1);
}

.dinosaur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.5) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.popularity-badge {
    background: rgba(255,215,0,0.95);
    color: #2d5016;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
}

.dinosaur-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.dinosaur-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #2d5016;
    margin-bottom: 0.3rem;
}

.dinosaur-scientific {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.dinosaur-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.dinosaur-description {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.dinosaur-stats {
    display: flex;
    justify-content: space-around;
    padding: 0.8rem 0;
    border-top: 1px solid #eee;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.dinosaur-stats i {
    color: #2d5016;
    margin-right: 0.3rem;
}

/* ===== Period Badges ===== */
.period-triassic {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.period-jurassic {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: white;
}

.period-cretaceous {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

/* ===== Diet Badges ===== */
.diet-herbivore {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: #2d5016;
}

.diet-carnivore {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #2d5016;
}

.diet-omnivore {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #2d5016;
}

/* ===== No Results ===== */
.no-results-container {
    text-align: center;
    padding: 80px 20px;
}

.no-results-icon {
    font-size: 5rem;
    color: #ddd;
    margin-bottom: 2rem;
}

.no-results-container h3 {
    font-size: 2rem;
    color: #666;
    margin-bottom: 1rem;
}

/* ===== Pagination ===== */
.pagination-nav {
    margin-top: 3rem;
}

.pagination {
    gap: 0.5rem;
}

.page-link {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    color: #2d5016;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #2d5016;
    color: white;
    border-color: #2d5016;
}

.page-item.active .page-link {
    background: #2d5016;
    border-color: #2d5016;
    color: white;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .featured-image-wrapper {
        height: 200px;
    }
    
    .dinosaur-image-wrapper {
        height: 180px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 60px 0 40px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-filter-container {
        padding: 1.5rem;
    }
    
    .search-input, .filter-select {
        height: 45px;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out forwards;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* ===== Buttons ===== */
.btn-dino-primary {
    background: linear-gradient(135deg, #2d5016 0%, #4a7c2c 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(45,80,22,0.3);
}

.btn-dino-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(45,80,22,0.4);
    color: white;
}

.btn-dino-secondary {
    background: white;
    color: #2d5016;
    border: 2px solid #2d5016;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-dino-secondary:hover {
    background: #2d5016;
    color: white;
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}