/* Custom CSS for Melbourne Art Studio */

/* Hero Section with Blurred Background */
.hero-bg-image {
    background-size: cover;
    background-position: center;
    transform: scale(1.1); /* Slightly larger to ensure no white edges during blur */
}

.blur-backdrop {
    backdrop-filter: blur(8px);
    transition: backdrop-filter 0.5s ease;
}

/* Enhance logo appearance on hover */
.logo-hover {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-hover:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px rgba(79, 70, 229, 0.5));
}

/* Animation classes */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.animation-delay-300 {
    animation-delay: 300ms;
}

.animation-delay-600 {
    animation-delay: 600ms;
}

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

/* Smooth scrolling and overflow prevention */
html, body {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
}

/* Service cards hover effects */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Testimonial card styles */
.testimonial-card {
    transition: transform 0.3s ease;
}

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

.testimonial-author-img {
    transition: transform 0.3s ease;
}

.testimonial-card:hover .testimonial-author-img {
    transform: scale(1.1);
}

/* For dark mode adjustments */
.dark .testimonial-card {
    background-color: rgba(31, 41, 55, 0.6);
    backdrop-filter: blur(10px);
}

/* Gallery item hover effects */
.gallery-item {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
}

/* CTA (Call To Action) section styles */
.cta-btn {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Contact form styles */
.form-input:focus {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

/* Social media icons hover effects */
.social-icon {
    transition: transform 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
}

/* Customer review carousel */
.review-carousel {
    transition: transform 0.5s ease;
}

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

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

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

.dark ::-webkit-scrollbar-track {
    background: #2d3748;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4a5568;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

/* Custom styles for masonry layout and lightbox */
.masonry-grid {
    column-count: 2;
    column-gap: 20px;
}

@media (min-width: 768px) {
    .masonry-grid {
        column-count: 3;
    }
}

@media (min-width: 1024px) {
    .masonry-grid {
        column-count: 4;
    }
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
    display: block;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.lightbox-close:hover {
    transform: scale(1.2);
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 16px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.4);
    transition: background-color 0.3s ease;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(79, 70, 229, 0.7);
}

/* Image hover effects */
.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    transition: transform 0.7s ease;
}

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

/* Additional gallery styles and animations */
.gallery-item {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1), 0 8px 8px rgba(0, 0, 0, 0.05);
}

/* Gallery image hover effects */
.gallery-item img {
    transform-origin: center;
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.gallery-item:hover img {
    filter: brightness(1.05);
}

/* Masonry Gallery Layout */
.masonry-gallery {
    column-count: 1;
    column-gap: 20px;
}

.masonry-item {
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .masonry-gallery {
        column-count: 2;
        column-gap: 20px;
    }
}

@media (min-width: 1024px) {
    .masonry-gallery {
        column-count: 3;
        column-gap: 24px;
    }
}

/* Button hover effect with custom properties */
[href="#"]:not(footer [href="#"]) {
    --x-pos: 50%;
    --y-pos: 50%;
    position: relative;
    overflow: hidden;
}

[href="#"]:not(footer [href="#"])::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--x-pos) var(--y-pos), rgba(255,255,255,0.2) 0%, transparent 50%);
    transform: scale(0);
    transition: transform 0.5s;
    pointer-events: none;
}

[href="#"]:not(footer [href="#"]):hover::after {
    transform: scale(2.5);
}

/* Lightbox animation */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-content {
    animation: zoomIn 0.3s ease forwards;
}

/* Custom focus styles */
:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

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

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

.dark ::-webkit-scrollbar-track {
    background: #2D3748;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4F46E5;
}

/* Gradients */
.bg-gradient {
    background: linear-gradient(135deg, #4F46E5 0%, #10B981 100%);
}

/* Responsive typography adjustments */
@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 2rem;
    }
}

/* Theme transition */
.theme-transition {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Image hover effect */
.img-hover-zoom {
    overflow: hidden;
}

.img-hover-zoom img {
    transition: transform 0.5s ease;
}

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

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

.btn-hover-effect:after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.btn-hover-effect:hover:after {
    left: 100%;
}

/* Contact form input focus effect */
.input-focus-effect {
    transition: border-color 0.3s ease;
}

.input-focus-effect:focus {
    border-color: #4F46E5;
}

/* Footer styling */
footer {
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, #4F46E5, #10B981);
}

/* Footer link hover effect - removed underline to match top nav */
footer a {
    transition: color 0.3s ease;
}

/* Social icons still need their specific hover effect */
footer .social-icon {
    transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

footer .social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Social media icons hover effect */
footer .social-icon {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

footer .social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Page transitions */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.page-transition.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hover card effect */
.hover-card {
    transition: all 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Custom loader */
.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #4F46E5;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

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

/* Add AOS-like animations for elements */
[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

[data-aos="fade-right"] {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-aos="fade-right"].aos-animate {
    opacity: 1;
    transform: translateX(0);
}

[data-aos="fade-left"] {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-aos="fade-left"].aos-animate {
    opacity: 1;
    transform: translateX(0);
}

/* Reviews Carousel Styles */
.reviews-carousel {
    position: relative;
    width: 100%;
}

.reviews-track {
    display: flex;
    width: 100%;
}

.review-slide {
    flex: 0 0 100%;
    padding: 0 12px;
    box-sizing: border-box;
}

/* Ensure equal height cards */
.review-slide > div {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Pagination dots */
.pagination-dot {
    transition: opacity 0.3s ease, width 0.3s ease, background-color 0.3s ease;
}

.pagination-dot.active {
    background-color: rgb(79, 70, 229);
    width: 32px;
}

/* Carousel navigation buttons */
#prev-review, #next-review {
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#prev-review:hover, #next-review:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* Responsive adjustments for the carousel */
@media (min-width: 768px) {
    .review-slide {
        flex: 0 0 33.333%;
    }
}

@media (max-width: 767px) {
    #prev-review, #next-review {
        padding: 8px;
    }
}

[data-aos-delay="100"] {
    transition-delay: 100ms;
}

[data-aos-delay="200"] {
    transition-delay: 200ms;
}

[data-aos-delay="300"] {
    transition-delay: 300ms;
}

/* Image Optimization and Loading Styles */
.masonry-gallery, .masonry-grid {
    transition: opacity 0.5s ease;
}

.masonry-gallery.loading, .masonry-grid.loading {
    opacity: 0.7;
    position: relative;
}

.masonry-gallery.loading::after, .masonry-grid.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid rgba(79, 70, 229, 0.3);
    border-radius: 50%;
    border-top-color: #4F46E5;
    animation: spin 1s linear infinite;
    z-index: 10;
}

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

/* Improve placeholder appearance */
.gallery-item {
    position: relative;
    background-color: rgba(240, 240, 240, 0.5);
}

.dark .gallery-item {
    background-color: rgba(45, 55, 72, 0.5);
}
