/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Filters section */
.filters-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.filters-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 0.9rem;
}

.filter-select {
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.clear-btn {
    padding: 12px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* Results section */
.results-section {
    margin-top: 30px;
}

.results-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.results-header h2 {
    color: #555;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-controls label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.sort-select {
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 200px;
}

.sort-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Hikes grid */
.hikes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Hike card styles */
.hike-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

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

.hike-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
}

.hike-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hike-content {
    padding: 25px;
}

.hike-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
}

.hike-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.meta-label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.meta-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

.grade-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.grade-leisurely {
    background: #28a745;
    color: white;
}

.grade-moderate {
    background: #ffc107;
    color: #333;
}

.grade-challenging {
    background: #dc3545;
    color: white;
}

.grade-tough {
    background: #6f42c1;
    color: white;
}

.grade-very-tough {
    background: #343a40;
    color: white;
}

.area-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Expandable description */
.description-section {
    margin-top: 20px;
}

.description-toggle {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.description-toggle:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.description-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 15px;
}

.description-content.expanded {
    max-height: 1000px;
}

.description-text {
    padding: 20px;
    line-height: 1.7;
    color: #555;
}

.description-text p {
    margin-bottom: 15px;
}

.description-text p:last-child {
    margin-bottom: 0;
}

/* Action buttons */
.hike-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.action-btn {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.action-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.action-btn.primary {
    background: #667eea;
    color: white;
}

.action-btn.primary:hover {
    background: #5a6fd8;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.2rem;
}

/* No results state */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #999;
}

.no-results p {
    font-size: 1.1rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .filters-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .hikes-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .hike-meta {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .hike-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 30px 20px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .filters-section {
        padding: 20px;
    }
    
    .hike-content {
        padding: 20px;
    }
}

/* Animation for card appearance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hike-card {
    animation: fadeInUp 0.6s ease forwards;
}

.hike-card:nth-child(1) { animation-delay: 0.1s; }
.hike-card:nth-child(2) { animation-delay: 0.2s; }
.hike-card:nth-child(3) { animation-delay: 0.3s; }
.hike-card:nth-child(4) { animation-delay: 0.4s; }
.hike-card:nth-child(5) { animation-delay: 0.5s; }
.hike-card:nth-child(6) { animation-delay: 0.6s; }


