/* Custom styles for Farmàcia Olzinelles */

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

/* Navbar scroll effect */
nav.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

/* Floating animations */
@keyframes floatSlow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@keyframes floatMedium {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes floatFast {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-16px); }
}

@keyframes floatCard1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes floatCard2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
}

.float-slow {
    animation: floatSlow 4s ease-in-out infinite;
}

.float-medium {
    animation: floatMedium 3s ease-in-out infinite;
}

.float-fast {
    animation: floatFast 2.5s ease-in-out infinite;
}

.float-card-1 {
    animation: floatCard1 3.5s ease-in-out infinite;
}

.float-card-2 {
    animation: floatCard2 4s ease-in-out infinite;
}

/* Nav links active state */
.nav-link.active {
    color: #ff7034 !important;
    background: #fff5f0 !important;
}

/* Mobile menu */
#mobileMenu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to top button */
#backToTop.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

/* Section reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Form focus styles */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(255, 112, 52, 0.15);
}

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

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

::-webkit-scrollbar-thumb {
    background: #d6d3d1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a29e;
}

/* Service card hover glow */
.group:hover .w-14 {
    box-shadow: 0 8px 25px rgba(255, 112, 52, 0.3);
}

/* Image hover zoom */
.group img {
    transition: transform 0.6s ease;
}

.group:hover img {
    transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .float-card-1 {
        position: relative;
        top: auto;
        left: auto;
        margin-bottom: 1rem;
        animation: none;
    }
    
    .float-card-2 {
        position: relative;
        top: auto;
        right: auto;
        animation: none;
    }
}
