/* === Custom Styles for My Essence of Beauty === */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #3d0b1c;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #dc436e, #fbbf24);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #ed6c92, #fcd34d);
}

/* Selection color */
::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #fff;
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(61, 11, 28, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Service card tilt effect */
.service-card {
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), 
                box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(220, 67, 110, 0.15),
                0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Gallery hover */
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(61, 11, 28, 0.8), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: inherit;
}
.gallery-item:hover::after {
    opacity: 1;
}

/* Mobile menu animations */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* Menu line animation */
.menu-line {
    transform-origin: center;
}
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 24px;
}

/* Floating animation for hero cards */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}
@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

.floating-card-1 { animation: float 4s ease-in-out infinite; }
.floating-card-2 { animation: float-delayed 5s ease-in-out infinite 0.5s; }
.floating-card-3 { animation: float-slow 6s ease-in-out infinite 1s; }

/* Scroll reveal base state (visible by default for progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
    }
    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
    }
    .reveal-left.visible {
        opacity: 1;
        transform: translateX(0);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
    }
    .reveal-right.visible {
        opacity: 1;
        transform: translateX(0);
    }
    .reveal-scale {
        opacity: 0;
        transform: scale(0.95);
    }
    .reveal-scale.visible {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse dot */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}
.animate-pulse {
    animation: pulse-dot 2s ease-in-out infinite;
}

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

/* Button ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}
.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Form focus styles */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.3), 0 4px 20px rgba(220, 67, 110, 0.1);
}

/* Map dark mode */
iframe[title="Map"] {
    filter: invert(90%) hue-rotate(180deg) brightness(0.9) contrast(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-card-1,
    .floating-card-2,
    .floating-card-3 {
        animation: none;
    }
}
