/* ===============================================
   ANIMATIONS & TRANSITIONS CSS
   Modern, smooth animations for the entire site
   =============================================== */

/* Smooth scroll behavior for the entire page */
html {
    scroll-behavior: smooth;
}

/* Page load fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(194, 167, 107, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(194, 167, 107, 0.8), 0 0 30px rgba(194, 167, 107, 0.6);
    }
}

/* Apply fade-in animation to body on page load */
body {
    animation: fadeIn 0.6s ease-out;
}

/* Header animations */
.header {
    animation: fadeInDown 0.8s ease-out;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.sticky {
    animation: none;
}

/* Logo animations */
.logo {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}


/* Navigation menu animations */
.navbar-menu a {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.navbar-menu a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #c2a76b;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.navbar-menu a:hover::before {
    width: 80%;
}

.navbar-menu a:hover {
    transform: translateY(-2px);
}

/* Button animations - Enhanced */
button,
.booking-button-homepage,
.learn-more-button,
.learn-more-button-reversed,
.contact-button-footer-gallery {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

button::before,
.booking-button-homepage::before,
.learn-more-button::before,
.learn-more-button-reversed::before,
.contact-button-footer-gallery::before {
    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;
}

button:hover::before,
.booking-button-homepage:hover::before,
.learn-more-button:hover::before,
.learn-more-button-reversed:hover::before,
.contact-button-footer-gallery:hover::before {
    width: 300px;
    height: 300px;
}

button:hover,
.booking-button-homepage:hover,
.learn-more-button:hover,
.learn-more-button-reversed:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Contact button footer - preserve original positioning transform */
.contact-button-footer-gallery:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
}

button:active,
.booking-button-homepage:active,
.learn-more-button:active,
.learn-more-button-reversed:active,
.contact-button-footer-gallery:active {
    transform: translateY(-1px) scale(0.98);
}

/* Review card animations */
.review-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.6s ease-out forwards;
}

.review-card:nth-child(1) {
    animation-delay: 0.1s;
}

.review-card:nth-child(2) {
    animation-delay: 0.2s;
}

.review-card:nth-child(3) {
    animation-delay: 0.3s;
}

.review-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 15px 35px rgba(194, 167, 107, 0.4);
}

/* Image hover effects */
img {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-section img:hover,
.info-section-reversed img:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* Gallery item animations */
.gallery-item {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 40px rgba(194, 167, 107, 0.4);
}

/* Sliding image container animations */
.sliding-image-container img {
    transition: all 0.6s ease-in-out;
}

/* Text content animations */
.text-content,
.text-content-reversed {
    animation: fadeInLeft 0.8s ease-out;
}

.text-content h1,
.text-content-reversed h1,
.why-jaclyn h1 {
    transition: all 0.3s ease;
}

.text-content h1:hover,
.text-content-reversed h1:hover,
.why-jaclyn h1:hover {
    color: #d4ba7a;
    transform: scale(1.05);
}

/* Social media icons animation */
.social-media-gallery a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.social-media-gallery a:hover {
    transform: translateY(-5px) scale(1.2) rotate(5deg);
    color: #c2a76b;
}

/* Map container animation */
.map-container {
    animation: scaleIn 0.8s ease-out;
    transition: all 0.4s ease;
}

.map-container:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* Star rating animation */
.review-rating .star {
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.review-rating .star:hover {
    transform: scale(1.3) rotate(15deg);
    color: #ffd700;
}

/* Contact info animation */
.contact-info p {
    transition: all 0.3s ease;
    animation: fadeIn 0.8s ease-out;
}

.contact-info p:hover {
    transform: translateX(10px);
    color: #c2a76b;
}

/* Footer animation */
footer {
    animation: fadeIn 1s ease-out;
}

/* Page title animation */
.page-title {
    animation: fadeInDown 0.8s ease-out;
    transition: all 0.3s ease;
}

.page-title:hover {
    transform: scale(1.05);
    color: #d4ba7a;
    text-shadow: 0 5px 15px rgba(194, 167, 107, 0.5);
}

/* Scroll reveal animation utility classes */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger animation delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Hover glow effect for important elements */
.glow-on-hover {
    transition: all 0.3s ease;
}

.glow-on-hover:hover {
    animation: glow 1.5s ease-in-out infinite;
}

/* Loading spinner animation (if needed) */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* Parallax effect helper */
.parallax {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus states with smooth transitions */
*:focus {
    outline: 2px solid #c2a76b;
    outline-offset: 3px;
    transition: outline-offset 0.2s ease;
}

/* Link underline animation */
a:not(.navbar-menu a):not(.logo) {
    position: relative;
    transition: color 0.3s ease;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Mobile-specific animations */
@media (max-width: 768px) {
    .review-card:hover {
        transform: translateY(-5px) scale(1.02);
    }
    
    button:hover,
    .booking-button-homepage:hover,
    .learn-more-button:hover,
    .learn-more-button-reversed:hover {
        transform: scale(1.02);
    }
    
    .contact-button-footer-gallery:hover {
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
        filter: brightness(1.1);
    }
}
