/* Custom styles for Farmacia La Vega */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1e1e26;
}
::-webkit-scrollbar-thumb {
    background: #E85D4A;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d14532;
}

/* Navbar scroll effect */
#navbar {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}
#navbar.scrolled .font-serif {
    color: #1e1e26 !important;
}
#navbar.scrolled .text-charcoal-500,
#navbar.scrolled .text-charcoal-600 {
    color: #6b6b74 !important;
}

/* Stat card animations */
.stat-card {
    animation: floatCard 6s ease-in-out infinite;
}
.stat-card:nth-child(2) {
    animation-delay: -1.5s;
}
.stat-card:nth-child(3) {
    animation-delay: -3s;
}
.stat-card:nth-child(4) {
    animation-delay: -4.5s;
}
@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Service card hover */
.service-card {
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Mobile menu */
#mobileMenu {
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid #ececee;
    transition: color 0.2s, padding-left 0.2s;
}
.mobile-link:hover {
    color: #E85D4A;
    padding-left: 0.5rem;
}

/* Menu button animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}
#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.25rem;
}

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

/* Stagger children */
.reveal-grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal-grid .reveal:nth-child(3) { transition-delay: 0.15s; }
.reveal-grid .reveal:nth-child(4) { transition-delay: 0.2s; }
.reveal-grid .reveal:nth-child(5) { transition-delay: 0.25s; }
.reveal-grid .reveal:nth-child(6) { transition-delay: 0.3s; }

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

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #E85D4A;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Print styles */
@media print {
    #navbar, .stat-card { animation: none; }
    body { color: #000; background: #fff; }
}
