* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 5rem;
}

input,
select,
textarea,
button {
    font: inherit;
}

/* iOS zooms focused inputs below 16px. Keep form controls readable on mobile. */
@media (max-width: 767px) {
    input,
    select,
    textarea {
        font-size: 16px;
    }

    #mobileMenu {
        max-height: 70vh;
        overflow-y: auto;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    #mobileMenu::-webkit-scrollbar {
        display: none;
    }

    html {
        scroll-padding-top: 4.75rem;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    html::-webkit-scrollbar {
        display: none;
    }

    body {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    body::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 420px) {
    .demo-pin-label {
        display: none;
    }
}

@media (max-width: 640px) {
    #demo {
        overflow-x: hidden;
    }

    .demo-grid > * {
        min-width: 0;
    }

    .demo-map-card,
    .demo-directory-card {
        width: 100%;
        max-width: 100%;
    }

    .demo-map-header {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .demo-live-badge {
        margin-left: auto;
        flex-shrink: 0;
        padding: 0.4rem 0.75rem;
    }

    .demo-floor-selector {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
        overflow: visible;
        padding-bottom: 0;
    }

    .demo-floor-tab {
        width: 100%;
        padding: 0.65rem 0.5rem;
        font-size: 0.95rem;
        line-height: 1.2;
        white-space: normal;
    }
}

/* Gradient Animations */
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-animate {
    background-size: 200% 200%;
    animation: gradient 15s ease infinite;
}

/* Fade in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Pulse animation for demo */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.8);
    }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Glass effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Hover effects */
.hover-scale {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Hide scrollbars globally while keeping scrolling enabled. */
html,
body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track,
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
    background: transparent !important;
}

/* FAQ Accordion */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-content.active {
    max-height: 500px;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-icon.active {
    transform: rotate(180deg);
}

/* Map Pin Animation */
@keyframes pin-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.pin-bounce {
    animation: pin-bounce 2s ease-in-out infinite;
}

/* Interactive Demo Styles */
.store-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.store-item:hover {
    background: #f3f4f6;
    transform: translateX(10px);
}

.floor-tab {
    transition: all 0.3s ease;
    cursor: pointer;
}

.floor-tab.active {
    background: linear-gradient(135deg, #14B8A6 0%, #0EA5E9 100%);
    color: white;
}

/* Search Bar Animation */
.search-bar:focus {
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.3);
}

/* Keep scrolling enabled on small iOS devices while fully hiding visible scrollbars. */
@media (max-width: 767px) {
    html,
    body,
    #mobileMenu {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}
