/* Custom Styles for The A List Tanning Co. */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Body overflow for scroll */
body {
    overflow-x: hidden;
}

/* Hero content animation */
.hero-content {
    opacity: 1;
    transform: translateY(0);
    animation: heroEntrance 1s ease-out forwards;
}

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

/* Scroll indicator */
.scroll-indicator {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(8px);
        opacity: 0.5;
    }
}

/* Service cards */
.service-card {
    opacity: 1;
}

.service-card:hover .relative {
    transform: translateY(-4px);
}

.service-card .relative {
    transition: transform 0.3s ease;
}

/* Gallery items */
.gallery-item {
    cursor: pointer;
}

/* Navbar styles */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .nav-link {
    color: #374151;
}

#navbar.scrolled .nav-link:hover {
    color: #cb2d78;
}

/* Mobile menu */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Reveal animations - only for below-fold content */
.reveal {
    /* Default state: visible */
    opacity: 1;
    transform: translateY(0);
}

/* Only animate if user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Staggered reveals */
    .reveal:nth-child(1) { transition-delay: 0.05s; }
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.15s; }
    .reveal:nth-child(4) { transition-delay: 0.2s; }
    .reveal:nth-child(5) { transition-delay: 0.25s; }
    .reveal:nth-child(6) { transition-delay: 0.3s; }
}

/* Back to top button */
#backToTop {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#backToTop.visible {
    opacity: 1;
    pointer-events: auto;
}

#backToTop.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    border-color: #f4a9cf;
    box-shadow: 0 0 0 3px rgba(244, 169, 207, 0.2);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #fefdf8;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #f4a9cf, #fbbf24);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #ed72b3, #f59e0b);
}

/* Selection color */
::selection {
    background-color: #f9d0e3;
    color: #721d45;
}

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* Ensure all text is readable */
.text-white {
    color: #ffffff;
}

/* Mobile menu transitions */
#mobileMenu {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Floating badge animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(1deg);
    }
}

/* Pulse animation for badge dot */
@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.5);
    }
}

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

/* Gradient text fix */
.text-transparent {
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

/* Card hover effects */
.service-card:hover {
    z-index: 10;
}

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.3s ease;
}

/* Image hover zoom */
.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
