/* HostessAdvisor - Responsive Animations & Smooth Transitions */
/* Advanced animations with performance optimization and accessibility */

/* CSS Custom Properties for Animations */
:root {
    /* Animation Durations */
    --animation-fast: 0.2s;
    --animation-normal: 0.3s;
    --animation-slow: 0.5s;
    --animation-very-slow: 0.8s;

    /* Easing Functions */
    --ease-out-cubic: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    --ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1.000);
    --ease-out-back: cubic-bezier(0.175, 0.885, 0.320, 1.275);
    --ease-in-out-back: cubic-bezier(0.680, -0.550, 0.265, 1.550);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.320, 1.275);

    /* Animation States */
    --animation-play-state: running;
    --animation-fill-mode: both;
}

/* Respect user preferences for reduced motion */
@media (prefers-reduced-motion: reduce) {
    :root {
        --animation-fast: 0.01s;
        --animation-normal: 0.01s;
        --animation-slow: 0.01s;
        --animation-very-slow: 0.01s;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01s !important;
        animation-delay: 0s !important;
        transition-duration: 0.01s !important;
        transition-delay: 0s !important;
    }
}

/* Base Animation Classes */
.animate {
    animation-fill-mode: var(--animation-fill-mode);
    animation-play-state: var(--animation-play-state);
}

.animate-fast { animation-duration: var(--animation-fast); }
.animate-normal { animation-duration: var(--animation-normal); }
.animate-slow { animation-duration: var(--animation-slow); }
.animate-very-slow { animation-duration: var(--animation-very-slow); }

/* Page Transition Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-200deg);
    }
    to {
        opacity: 1;
        transform: rotate(0);
    }
}

/* Card Entrance Animations */
.hostess-card-container {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp var(--animation-normal) var(--ease-out-cubic) forwards;
}

.hostess-card-container:nth-child(1) { animation-delay: 0.1s; }
.hostess-card-container:nth-child(2) { animation-delay: 0.2s; }
.hostess-card-container:nth-child(3) { animation-delay: 0.3s; }
.hostess-card-container:nth-child(4) { animation-delay: 0.4s; }
.hostess-card-container:nth-child(5) { animation-delay: 0.5s; }
.hostess-card-container:nth-child(n+6) { animation-delay: 0.6s; }

/* Staggered animations for multiple cards */
.stagger-animation {
    animation-delay: calc(var(--stagger-delay, 0.1s) * var(--item-index, 1));
}

/* Card Hover Animations */
.hostess-card {
    transition: all var(--animation-normal) var(--ease-out-cubic);
    transform-origin: center;
}

.hostess-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(139, 95, 191, 0.15);
}

.hostess-card:hover .card-images img {
    transform: scale(1.1);
}

.hostess-card:hover .thumbnail-grid .thumb img {
    transform: scale(1.05);
}

/* Button Animations */
.btn {
    position: relative;
    overflow: hidden;
    transition: all var(--animation-normal) var(--ease-out-cubic);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: translateY(-50%);
    transition: left var(--animation-fast) var(--ease-out-cubic);
    pointer-events: none;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Contact Button Specific Animations */
.btn-whatsapp:hover {
    background: linear-gradient(135deg, #25D366, #1ebe57);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.btn-call:hover {
    background: linear-gradient(135deg, #DC2626, #b91c1c);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}

.contact-success {
    animation: contactSuccess var(--animation-slow) var(--ease-out-back);
}

@keyframes contactSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); background-color: #10B981; }
    100% { transform: scale(1); }
}

/* Filter Button Animations */
.filter-btn {
    position: relative;
    transition: all var(--animation-normal) var(--ease-out-cubic);
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left var(--animation-fast) var(--ease-out-cubic);
    z-index: -1;
    border-radius: inherit;
}

.filter-btn:hover::before,
.filter-btn.active::before {
    left: 0;
}

.filter-btn:hover {
    color: var(--text-white);
    transform: translateY(-2px);
}

.filter-btn.active {
    color: var(--text-white);
    transform: translateY(-1px);
}

/* Category Card Animations */
.category-card {
    transition: all var(--animation-normal) var(--ease-out-cubic);
    transform-origin: center;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--animation-fast) var(--ease-out-cubic);
    pointer-events: none;
}

.category-card:hover::before {
    left: 100%;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.05);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.category-card.active {
    animation: categorySelected var(--animation-slow) var(--ease-out-back);
}

@keyframes categorySelected {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1.05) translateY(-5px); }
}

/* Modal Animations */
.modal.fade .modal-dialog {
    transition: all var(--animation-normal) var(--ease-out-cubic);
    transform: translateY(-50px) scale(0.95);
}

.modal.show .modal-dialog {
    transform: translateY(0) scale(1);
}

/* Filter Modal Specific */
.filter-modal {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: all var(--animation-normal) var(--ease-out-cubic);
}

.filter-modal.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.filter-modal.hiding {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
}

/* Toast Notifications */
.toast {
    opacity: 0;
    transform: translateX(100%);
    animation: toastSlideIn var(--animation-normal) var(--ease-out-cubic) forwards;
}

.toast.hide {
    animation: toastSlideOut var(--animation-normal) var(--ease-out-cubic) forwards;
}

@keyframes toastSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Loading Animations */
.spinner-border {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-dots::after {
    content: '';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* VIP Badge Animations */
.vip-badge {
    animation: vipGlow 2s infinite;
}

@keyframes vipGlow {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
        transform: scale(1.05);
    }
}

/* Star Rating Animations */
.star-rating {
    transition: all var(--animation-fast) var(--ease-out-cubic);
}

.star {
    transition: all var(--animation-fast) var(--ease-out-cubic);
    transform-origin: center;
}

.star:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.8));
}

.star.filled {
    animation: starFill var(--animation-normal) var(--ease-out-back);
}

@keyframes starFill {
    0% { 
        transform: scale(0.5);
        opacity: 0;
    }
    50% { 
        transform: scale(1.2);
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

.rating-selected {
    animation: ratingConfirm var(--animation-slow) var(--ease-out-back);
}

@keyframes ratingConfirm {
    0% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Search Results Animations */
.search-results-enter {
    animation: searchResultsEnter var(--animation-slow) var(--ease-out-cubic);
}

@keyframes searchResultsEnter {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.no-results-container {
    animation: noResultsBounce var(--animation-very-slow) var(--ease-out-back);
}

@keyframes noResultsBounce {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    60% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Map Animations */
.map-marker-bounce {
    animation: markerBounce 1s var(--ease-out-back);
}

@keyframes markerBounce {
    0% { 
        transform: translateY(-50px) scale(0.5);
        opacity: 0;
    }
    60% { 
        transform: translateY(5px) scale(1.1);
        opacity: 1;
    }
    100% { 
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.map-info-window {
    animation: infoWindowSlideUp var(--animation-normal) var(--ease-out-cubic);
}

@keyframes infoWindowSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar Animations */
.navbar {
    transition: all var(--animation-normal) var(--ease-out-cubic);
}

.navbar.scrolled {
    backdrop-filter: blur(20px);
    background: rgba(245, 245, 245, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.dropdown-menu {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: all var(--animation-fast) var(--ease-out-cubic);
}

.dropdown-menu.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    transition: all var(--animation-fast) var(--ease-out-cubic);
}

.dropdown-item:hover {
    transform: translateX(5px);
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-cyan));
    color: white;
}

/* Carousel Animations */
.carousel-item {
    transition: transform var(--animation-slow) var(--ease-out-cubic);
}

.carousel-control-prev,
.carousel-control-next {
    transition: all var(--animation-normal) var(--ease-out-cubic);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    transform: translateY(-50%) scale(1.1);
    background: var(--primary-cyan);
}

.carousel-indicators [data-bs-target] {
    transition: all var(--animation-normal) var(--ease-out-cubic);
}

.carousel-indicators .active {
    transform: scale(1.2);
    background-color: var(--primary-cyan);
}

/* Footer Animations */
.footer {
    background: linear-gradient(135deg, var(--bg-secondary), var(--smoke-gray));
    transition: all var(--animation-normal) var(--ease-out-cubic);
}

.footer a {
    transition: all var(--animation-fast) var(--ease-out-cubic);
}

.footer a:hover {
    transform: translateX(3px);
    color: var(--primary-purple);
}

/* Scroll Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all var(--animation-slow) var(--ease-out-cubic);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Performance Optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform, opacity;
}

/* Hover Effects */
.hover-lift {
    transition: transform var(--animation-normal) var(--ease-out-cubic);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-scale {
    transition: transform var(--animation-normal) var(--ease-out-cubic);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow var(--animation-normal) var(--ease-out-cubic);
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(139, 95, 191, 0.4);
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        rgba(255, 255, 255, 0) 100%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
}

@keyframes skeleton {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    /* Reduce animation complexity on mobile */
    .hostess-card:hover {
        transform: translateY(-4px) scale(1.01);
    }
    
    .category-card:hover {
        transform: translateY(-4px) scale(1.02);
    }
    
    /* Disable some heavy animations on mobile */
    .btn::before,
    .filter-btn::before,
    .category-card::before {
        display: none;
    }
}

@media (max-width: 576px) {
    /* Further reduce animations on small screens */
    .hostess-card:hover {
        transform: none;
        box-shadow: var(--shadow-lg);
    }
    
    /* Disable hover effects on touch devices */
    .category-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
}

/* Print Styles - Disable all animations */
@media print {
    *,
    *::before,
    *::after {
        animation-duration: 0s !important;
        transition-duration: 0s !important;
        animation-delay: 0s !important;
        transition-delay: 0s !important;
    }
}