/* Custom styles for Clínica Dental Carmen Gea */

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Selection color */
::selection {
    background: #ff6b35;
    color: white;
}

/* Navigation styles */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ff6b35;
    transition: width duration-300;
}

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

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

/* Reveal animations */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0);
}

/* Staggered delays for grid items */
.reveal-up:nth-child(1) { transition-delay: 0s; }
.reveal-up:nth-child(2) { transition-delay: 0.1s; }
.reveal-up:nth-child(3) { transition-delay: 0.2s; }
.reveal-up:nth-child(4) { transition-delay: 0.3s; }
.reveal-up:nth-child(5) { transition-delay: 0.4s; }
.reveal-up:nth-child(6) { transition-delay: 0.5s; }

/* Navbar scroll effect */
.navbar-scrolled {
    background: rgba(250, 250, 249, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Mobile menu animations */
.mobile-menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

.mobile-menu-open #mobile-menu {
    opacity: 1;
    pointer-events: all;
}

/* Service card hover effect */
.group:hover .group-hover\:translate-x-1 {
    transform: translateX(4px);
}

/* Form focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

/* Image hover effect */
.group:hover img {
    transform: scale(1.02);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Loading state for buttons */
button:active {
    transform: scale(0.98);
}

/* Print styles */
@media print {
    nav, #back-to-top, .reveal-up, .reveal-left, .reveal-right {
        display: none !important;
    }
    
    body {
        color: #1a1a1a;
        background: white;
    }
}

/* Reduced motion */
@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;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .text-charcoal-400 {
        color: #6b7280;
    }
    
    .text-charcoal-500 {
        color: #4b5563;
    }
}

/* Landscape mode on mobile */
@media (max-width: 640px) and (orientation: landscape) {
    .min-h-screen {
        min-height: auto;
        padding-top: 6rem;
        padding-bottom: 2rem;
    }
    
    .lg\:h-\[600px\] {
        height: 400px;
    }
    
    .h-\[500px\] {
        height: 350px;
    }
}

/* Tablet landscape */
@media (max-width: 1024px) and (orientation: landscape) {
    section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}
