/* Interactive Animations and Enhanced UI for Demo 1 */

/* --- Keyframes --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translate3d(-30px, 0, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* --- Scroll Reveal Classes --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Hero Animations --- */
.hero-animate-text {
    opacity: 0;
    animation: fadeInRight 1s ease-out forwards;
    animation-delay: 0.2s;
}

.hero-animate-image {
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
    animation-delay: 0.4s;
}

.hero-animate-image img {
    /* Gentle floating effect for the product image */
    animation: float 6s currentcolor infinite;
    /* Note: infinite float applied after load */
}

/* --- Enhanced Hover Effects --- */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Hover slide effect - only active on hover or via before */
.btn:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: var(--text-secondary);
    /* Hover fill color */
    transition: all 0.3s;
    border-radius: 4px;
    z-index: -1;
}

.btn:hover:before {
    width: 100%;
}

/* Ensure text changes color on hover if needed */
.btn:hover {
    color: #fff !important;
    /* Force white text on hover */
    border-color: var(--text-secondary) !important;
}

.product-card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* --- Section Transitions --- */
.section {
    /* Ensure content doesn't overlap during transitions if we add them later */
    position: relative;
}

/* --- Map Overlay --- */
.map-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.map-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.map-overlay-content {
    width: 90%;
    height: 90%;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background: #fff;
}

.map-overlay-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.map-overlay-close:hover {
    transform: scale(1.1);
}

#map-large {
    width: 100%;
    height: 100%;
}

/* Fix for Mobile Visibility: Disable reveal animation on small screens to prevent content hiding */
@media (max-width: 900px) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .hero-animate-text,
    .hero-animate-image {
        opacity: 1 !important;
        animation: none !important;
    }
}