/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */
   :root {
    /* Brand Colors (from Rainbow Bar SVG) */
    --color-1: #EF4136; /* Red */
    --color-2: #F7941D; /* Orange */
    --color-3: #FAE300; /* Yellow */
    --color-4: #00ABBD; /* Teal */
    --color-5: #1C75BC; /* Blue */

    /* Neutrals */
    --text-main: #1A1A24;
    --text-muted: #6B7280;
    --bg-main: #F9FAFB;
    --card-bg: #FFFFFF;
    
    /* Layout Variables */
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: transparent;
    color: var(--text-main);
    line-height: 1.6;
    position: relative;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'League Gothic', sans-serif;
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Main Container & Header
   ========================================================================== */
.attractions-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.filter-header {
    text-align: center;
    margin-bottom: 3rem;
}

.title {
    font-family: 'League Gothic', sans-serif;
    text-transform: uppercase;
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #111827;
}

.filter-controls {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    justify-content: center;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-family: 'League Gothic', sans-serif;
    text-transform: uppercase;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
}

/* Filter Button colors are now generated dynamically in PHP based on the Brand Color Palette. */

/* ==========================================================================
   Grid Layout & Mobile Carousel
   ========================================================================== */
.attractions-grid {
    display: grid;
    /* Desktop: 4 columns */
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem 1rem;
    padding-top: 1rem;
    padding-bottom: 2rem;
}

.swipe-indicator {
    display: none;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    opacity: 0.7;
    animation: breatheFade 2s infinite ease-in-out;
}

@keyframes breatheFade {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

@media (max-width: 768px) and (pointer: coarse) {
    .swipe-indicator {
        display: block;
    }
}

/* Mobile: 1 column swipeable */
@media (max-width: 1024px) {
    .attractions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .attractions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-header {
        padding: 0 1rem;
        margin-bottom: 2rem;
    }


    .filter-controls {
        display: flex;
        flex-wrap: nowrap !important;
        border-radius: 50px;
        width: 100%;
        padding: 0.35rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        -ms-overflow-style: none; /* IE and Edge */
        scrollbar-width: none; /* Firefox */
        justify-content: flex-start;
    }

    .filter-controls::-webkit-scrollbar {
        display: none; /* Chrome, Safari and Opera */
    }

    .filter-btn {
        flex: 0 0 auto;
        font-size: 0.9rem;
        padding: 0.6rem 1.25rem;
        white-space: nowrap;
    }
}

@media (max-width: 560px) {
    .attractions-container {
        padding-left: 0;
        padding-right: 0;
    }

    .attractions-grid {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        padding: 1rem 1rem 3rem 1rem;
        /* Hide scrollbar for a cleaner swipe experience */
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }
    
    .attractions-grid::-webkit-scrollbar {
        display: none;
    }

    .card {
        flex: 0 0 100%;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }
}

/* ==========================================================================
   Card Styling
   ========================================================================== */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    transition: var(--transition);
    position: relative;
    opacity: 0; /* Start hidden for animation */
    transform: scale(1);
    margin-bottom: 25px;
}

@keyframes popIn {
    0% { opacity: 0; transform: translateY(20px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.card.hidden {
    display: none;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-sheen {
    position: absolute;
    inset: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    pointer-events: none;
    z-index: 8;
}

.card-sheen::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: left 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-sheen::after {
    left: 150%;
}

.card-image-wrapper {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-image {
    transform: scale(1.05);
}

.card-wave {
    position: absolute;
    bottom: -2px; /* Avoid subpixel rendering gaps */
    left: -2px;
    width: calc(100% + 4px);
    height: 100px;
    z-index: 2;
    pointer-events: none;
    transform: scaleY(1.02);
    transform-origin: bottom;
}

.card-location {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    z-index: 5;
    color: var(--card-theme, #333);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-shadow: none;
    white-space: nowrap;
}

.card-content {
    position: relative;
    padding: 1.5rem;
    padding-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    text-align: center;
}

.card-title {
    font-size: 2.35rem;
    line-height: 1;
    margin-bottom: 0.75rem;
    color: inherit;
}

.card-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-actions {
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    padding: 0 1.5rem;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    z-index: 10;
}

.safety-btn, .visit-btn {
    flex: 1;
    padding: 0.875rem 0.5rem;
    border: none;
    font-family: 'League Gothic', sans-serif;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--card-theme, #EF4136);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4), 0 4px 6px rgba(0,0,0,0.2);
    text-shadow: none;
}

.safety-btn:hover, .visit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.5), 0 6px 8px rgba(0,0,0,0.3);
}

/* ==========================================================================
   Button Sheen & Flash Effect (rrbuttonAction)
   ========================================================================== */
.rrbuttonAction {
    position: relative;
    overflow: hidden !important;
    border-radius: 3px;
}

.rrbuttonAction::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0) 100%);
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0) 100%);
    -webkit-transform: skewX(-25deg);
    transform: skewX(-25deg);
    -webkit-transition: left 0.5s ease-in-out;
    transition: left 0.5s ease-in-out;
    pointer-events: none;
    z-index: 1;
}

.rrbuttonAction:hover::before {
    left: 150%;
}

.rrbuttonAction:hover {
    -webkit-animation: rapidBorderFlash 0.2s ease-in-out 0.5s forwards;
    animation: rapidBorderFlash 0.2s ease-in-out 0.5s forwards;
}

@-webkit-keyframes rapidBorderFlash {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
    50% { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.7), inset 0 0 4px rgba(255, 255, 255, 0.3); }
}

@keyframes rapidBorderFlash {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
    50% { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.7), inset 0 0 4px rgba(255, 255, 255, 0.3); }
}

/* ==========================================================================
   Modal Styling
   ========================================================================== */
.safety-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.safety-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: var(--border-radius);
    padding: 2rem;
    position: relative;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.safety-modal.active .modal-content {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-modal:hover {
    background: #e2e8f0;
    color: var(--color-1);
}

#modal-title {
    margin-bottom: 1.5rem;
    padding-right: 2rem;
    font-size: 1.5rem;
}

.modal-body {
    overflow-y: auto;
    padding-right: 0.5rem;
    font-size: 0.95rem;
    color: #4b5563;
    flex: 1;
    min-height: 0;
}

.modal-body h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #111827;
}

.modal-body ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.modal-body p {
    margin-bottom: 1rem;
}
