/* css/amenities.css */

/* --- CSS Variable for Primary Color (fallback if not set by JS) --- */
:root {
    /* This fallback is used if JS fails or --primary-color is not set from data.json */
    /* It's good practice to have a fallback that matches your general theme. */
    --primary-color: #336100; /* UPDATED: Fallback to match your data.json primary */
}

/* --- Amenities Page Specific Styles --- */
.amenities-section {
    padding: 3rem 1rem;
    background-color: #f9f9f9;
    overflow-x: hidden; /* Prevent horizontal scrollbar during animations */
}

.amenities-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.amenities-title {
    font-family: 'Lora', serif;
    font-size: 2.8rem;
    color: #2c3e50; /* This could also use var(--primary-color) if desired */
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
    opacity: 0;
    animation: slideDownFadeInPageTitle 0.8s 0.3s ease-out forwards;
}

.amenities-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color); /* Already using variable, ensure fallback is good */
}

.amenities-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: fadeInUpSubtitle 0.8s 0.6s ease-out forwards;
}

.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    list-style: none;
    padding: 0;
}

.amenity-item {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 1.5rem 1.2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation-name: fadeInUpItem;
    animation-duration: 0.5s;
    animation-fill-mode: forwards;
    animation-timing-function: ease-out;
    /* animation-delay will be set inline by JS */
}

.amenity-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.amenity-item i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color); /* Already using variable */
    transition: transform 0.3s ease;
}

.amenity-item:hover i {
    transform: scale(1.1);
}

.amenity-item span {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: #333;
    display: block;
}

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

@keyframes fadeInUpSubtitle {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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