/* Custom styles for Farmàcia Martínez */

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

/* Custom animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-slide-up-delay {
    animation: slideUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.animate-slide-up-delay-2 {
    animation: slideUp 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

/* Intersection Observer animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

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

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* Service card hover effect */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #14b8a6, #0ea5e9);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}

.service-card:hover::after {
    transform: scaleX(1);
}

/* Mobile menu */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #14b8a6;
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 100%;
}

/* Form focus styles */
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Selection color */
::selection {
    background: #99f6e4;
    color: #134e4a;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        letter-spacing: -0.01em;
    }
}

/* Print styles */
@media print {
    header, footer, #contacto form {
        display: none;
    }
}
