.attraction {
    width: 100%;
    height: auto;
    padding: 80px 20px;
    background: var(--bg-box);
}

.attraction-grid {
    max-width: 1400px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: white;
    font-size: 3rem;
    margin-bottom: 50px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.AttractionGallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    padding: 0 10px;
}

.card {
    position: relative;
    height: 250px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card.active {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

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

.card.active .card-bg {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.3) 0%,
            rgba(0, 0, 0, 0.7) 100%);
    transition: background 0.3s ease;
}

.card:hover .card-overlay {
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.5) 0%,
            rgba(0, 0, 0, 0.9) 100%);
}

.card.active .card-overlay {
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.5) 0%,
            rgba(0, 0, 0, 0.9) 100%);
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    color: white;
    z-index: 2;
}

.card-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.card:hover .card-title {
    transform: translateY(-5px);
}

.card.active .card-title {
    transform: translateY(-5px);
}

.card-description {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, max-height 0.4s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.card:hover .card-description {
    opacity: 1;
    max-height: 200px;
}

.card.active .card-description {
    opacity: 1;
    max-height: 200px;
}

.card-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    z-index: 3;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.card:hover .card-badge {
    opacity: 1;
    transform: translateY(0);
}

.card.active .card-badge {
    opacity: 1;
    transform: translateY(0);
}

/* --- Media Queries --- */

@media (max-width: 848px) {
    h1 {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .AttractionGallery {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }

    .card {
        height: 240px;
    }

    .card-title {
        font-size: 1.5rem;
    }

    .card-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 692px) {
    body {
        padding: 20px 10px;
    }

    .AttractionGallery {
        /* This is the fix for 2 columns */
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .card {
        /* This height will now apply correctly */
        height: 150px;
    }

    .card-content {
        padding: 20px;
    }

    .card-title {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .card-description {
        font-size: 0.85rem;
    }
}