/* Custom styles for The Soap Tree Med Spa */

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

/* Custom animations */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

/* Glass morphism 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);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #ffd555, #f5a90a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hover card effect */
.hover-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -15px rgba(42, 24, 32, 0.25);
}

/* Image hover zoom */
.img-zoom {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Button ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Decorative corner accents */
.corner-accent {
    position: relative;
}

.corner-accent::before,
.corner-accent::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border-color: #ffd555;
    border-style: solid;
}

.corner-accent::before {
    top: -10px;
    left: -10px;
    border-width: 2px 0 0 2px;
}

.corner-accent::after {
    bottom: -10px;
    right: -10px;
    border-width: 0 2px 2px 0;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f3eaf0 25%, #e8d4e0 50%, #f3eaf0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 12px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #a06e88, #704054);
    border-radius: 6px;
    border: 2px solid #f9f5f7;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #8a556e, #5c3546);
}

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #ffd555;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .hero-gradient {
        background: #f9f5f7 !important;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .float-animation,
    .float-animation-delayed,
    .float-animation-slow {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid #000;
    }
    
    .btn-secondary {
        border-width: 3px;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .service-card:hover {
        transform: none;
    }
    
    .service-card:active {
        transform: translateY(-4px);
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(2rem, 5vw, 3rem);
    }
    
    .card-shadow {
        box-shadow: 0 10px 30px -10px rgba(42, 24, 32, 0.2);
    }
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .hero-gradient {
        min-height: auto;
        padding: 100px 0 60px;
    }
    
    .stat-card {
        position: relative;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        margin-bottom: 1rem;
    }
}

/* Utility classes */
.text-shadow-lg {
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.bg-blur {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Loading state */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

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

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

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Form validation styles */
input:valid,
textarea:valid {
    border-color: #10b981;
}

input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

/* Selection color */
::selection {
    background: #ffd555;
    color: #2a1820;
}

::-moz-selection {
    background: #ffd555;
    color: #2a1820;
}
