/* Custom CSS for Farmacia Torío Abad */

/* Color Variables */
:root {
    --plum-50: #faf5ff;
    --plum-100: #f3e8ff;
    --plum-200: #e9d5ff;
    --plum-300: #d8b4fe;
    --plum-400: #c084fc;
    --plum-500: #a855f7;
    --plum-600: #9333ea;
    --plum-700: #7e22ce;
    --plum-800: #6b21a8;
    --plum-900: #581c87;
    
    --amber-300: #fcd34d;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
}

/* Typography */
.font-playfair {
    font-family: 'Playfair Display', serif;
}

.font-lato {
    font-family: 'Lato', sans-serif;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Scroll Reveal Animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Delay classes */
.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-700 {
    transition-delay: 700ms;
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--plum-700), var(--amber-500));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--plum-800), var(--amber-600));
}

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

/* Navigation Active State */
.nav-link.active {
    color: #d97706;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #fbbf24, #d97706);
    border-radius: 1px;
}

/* Button Hover Effects */
button, a {
    transition: all 0.3s ease;
}

/* Focus States */
input:focus,
textarea:focus,
button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.3);
}

/* Image Hover Effects */
img {
    transition: transform 0.5s ease;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--plum-700), var(--amber-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive Typography */
@media (max-width: 768px) {
    .font-playfair {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
    }
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print Styles */
@media print {
    nav,
    #contacto,
    button {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: none;
        color: #000;
    }
}
