/* Additional custom styles beyond Tailwind */

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

/* Ensure all images have smooth loading */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Prevent layout shift on images */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Enhanced button interactions */
.btn-primary,
.btn-secondary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before,
.btn-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before,
.btn-secondary:hover::before {
    width: 300px;
    height: 300px;
}

/* Mobile menu button animation */
#mobile-menu-btn svg {
    transition: transform 0.3s ease;
}

#mobile-menu-btn.active svg {
    transform: rotate(90deg);
}

/* Gallery hover overlay */
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 148, 136, 0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Service card icon animation */
.service-card:hover svg {
    transform: scale(1.1) rotate(5deg);
    transition: transform 0.3s ease;
}

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

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Form input animations */
input,
select,
textarea {
    transition: all 0.3s ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #14b8a6;
}

/* Decorative line animation */
.decorative-line {
    position: relative;
    overflow: hidden;
}

.decorative-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-image {
        height: 400px;
    }
    
    .font-serif {
        font-size: 2.5rem;
    }
    
    .font-serif.text-5xl {
        font-size: 2.25rem;
    }
}

@media (max-width: 640px) {
    .font-serif.text-4xl {
        font-size: 2rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
}

/* Print styles */
@media print {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .btn-primary,
    .btn-secondary {
        background: #14b8a6 !important;
        color: white !important;
    }
}

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