/* Destinations Page Premium Styles */

:root {
    --primary-color: #1a1a1a;
    --accent-color: #c5a059;
    --accent-hover: #b08d4b;
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-light: #f9f9f9;
    --card-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Open Sans', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: var(--font-body);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

/* Hero Section */
.destinations-hero {
    position: relative;
    height: 60vh;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    overflow: hidden;
    margin-top: -80px;
    /* Offset fixed navbar */
    padding-top: 80px;
}

.destinations-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.destinations-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* transform: scale(1.1); Optional subtle zoom */
}

.destinations-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
}

.destinations-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.hero-subtitle {
    display: block;
    font-family: var(--font-body);
    font-size: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
    opacity: 0.9;
}

.destinations-hero-content h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.destinations-hero-content p {
    font-size: 1.3rem;
    font-weight: 300;
}

/* Filter Section */
.filter-section {
    padding: 2rem 0;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    /* Adjust based on navbar height if needed */
    z-index: 90;
}

.filter-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border: none;
    border-bottom: 2px solid #eee;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
    background: transparent;
}

.search-box input:focus {
    outline: none;
    border-bottom-color: var(--accent-color);
}

.search-box i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
    font-size: 1.1rem;
}

.filter-buttons {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.filter-btn {
    background: none;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: #888;
    position: relative;
    transition: var(--transition-fast);
    letter-spacing: 0.5px;
}

.filter-btn::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--accent-color);
    transition: var(--transition-fast);
    transform: translateX(-50%);
}

.filter-btn:hover,
.filter-btn.active {
    color: var(--primary-color);
}

.filter-btn.active::after {
    width: 100%;
}

/* Destinations Grid */
.destinations-grid-section {
    padding: 5rem 0;
    max-width: 1300px;
    margin: 0 auto;
}

.destinations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 3rem;
    padding: 0 30px;
}

.destination-card {
    background: #fff;
    border-radius: 8px;
    /* Slightly softer */
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition-medium);
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
    position: relative;
    display: flex;
    flex-direction: column;
}

.destination-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.destination-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.card-image-wrapper {
    position: relative;
    height: 300px;
    /* Taller images */
    overflow: hidden;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.destination-card:hover .card-image-wrapper img {
    transform: scale(1.1);
}

.card-overlay-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Full height gradient for better readability */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    z-index: 1;
}

.card-category {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #fff;
    color: var(--primary-color);
    padding: 5px 15px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Ensure content stacks properly */
.card-content {
    position: relative;
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    /* Ensure text sits on white background below image, OR if overlay style is desired, adjust */
    z-index: 2;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    transition: color 0.3s;
}

.destination-card:hover .card-title {
    color: var(--accent-color);
}

.card-tagline {
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 1.5rem;
    font-style: italic;
    font-family: var(--font-heading);
}

.card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 1.5rem;
}

.card-meta {
    font-size: 0.85rem;
    color: #888;
}

.card-meta i {
    color: var(--accent-color);
    margin-right: 5px;
}

.card-link {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.card-link i {
    margin-left: 5px;
    transition: transform 0.3s;
}

.destination-card:hover .card-link i {
    transform: translateX(5px);
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.5rem;
    color: #999;
    padding: 4rem;
    font-family: var(--font-heading);
}

/* Responsive */
@media (max-width: 768px) {
    .destinations-hero {
        height: 50vh;
    }

    .destinations-hero-content h1 {
        font-size: 2.5rem;
    }

    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box input {
        padding-left: 40px;
        /* Adjust back for mobile */
    }

    .destinations-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    z-index: 100;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background: var(--accent-hover);
    transform: translateY(-5px);
}