/* Custom Styles for Event Decor by Shang */

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

/* Text Shadow Utility */
.text-shadow {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Floating Animation Elements */
.floating-element {
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(2) {
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    animation-delay: 4s;
}

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

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

::-webkit-scrollbar-thumb {
    background: #FFB6C1;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FFC0CB;
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Lightbox Styling */
#lightbox {
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

#lightboxImage {
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Lightbox buttons hover effect */
#closeLightbox:hover,
#prevImage:hover,
#nextImage:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Form Focus States */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(255, 182, 193, 0.2);
}

/* Button Hover Effects */
button:active,
a:active {
    transform: scale(0.98);
}

/* Gallery Item Animation */
.gallery-item {
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.6s ease-out !important;
    will-change: transform;
}

.gallery-item:hover {
    transform: translateY(-12px) !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25) !important;
}

/* Filter Button Active State */
.filter-btn.active {
    background-color: #FFB6C1;
    color: white;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #FAFAFA;
    border-top: 3px solid #FFB6C1;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

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

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

/* Testimonial Cards */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

/* Mobile Menu Slide Animation */
#mobile-menu {
    transition: all 0.3s ease-in-out;
}

/* Image Lazy Loading Placeholder */
img[data-src] {
    filter: blur(5px);
    transition: filter 0.3s;
}

img[data-src].loaded {
    filter: blur(0);
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Gold Accent Utilities */
.border-gold {
    border-color: #D4AF37;
}

.text-gold {
    color: #D4AF37;
}

.bg-gold {
    background-color: #D4AF37;
}

/* Custom Grid for Masonry Layout */
.masonry {
    column-count: 3;
    column-gap: 1rem;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1rem;
}

@media (max-width: 1024px) {
    .masonry {
        column-count: 2;
    }
}

@media (max-width: 640px) {
    .masonry {
        column-count: 1;
    }
}

/* Form Success/Error Messages */
.form-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.form-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Print Styles */
@media print {
    nav,
    footer,
    .no-print {
        display: none;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible for Keyboard Navigation */
*:focus-visible {
    outline: 2px solid #FFB6C1;
    outline-offset: 2px;
}

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