/* Custom CSS for Photography Website */

/* Tailwind CSS Configuration */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Inter:wght@300;400;500;600&display=swap');

/* CSS Variables */
:root {
    --primary-color: #f59e0b;
    --primary-dark: #d97706;
    --secondary-color: #1f2937;
    --accent-color: #fbbf24;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --background-light: #f9fafb;
    --background-dark: #111827;
}

/* Custom Font Classes */
.font-playfair {
    font-family: 'Playfair Display', serif;
}

.font-inter {
    font-family: 'Inter', sans-serif;
}

/* Custom Button Styles */
.btn-primary {
    background-color: #f59e0b;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    transform: scale(1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background-color: #d97706;
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.btn-secondary {
    border: 2px solid white;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    transform: scale(1);
    background-color: transparent;
}

.btn-secondary:hover {
    background-color: white;
    color: #f59e0b;
    transform: scale(1.05);
}

/* Navigation Styles */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #f59e0b;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Background */
.hero-bg {
    background: linear-gradient(135deg, rgba(0,0,0,0.6), rgba(0,0,0,0.4)), 
                url('https://images.unsplash.com/photo-1502920917128-1aa500764cbd?w=1920&h=1080&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Gallery Item Styles */
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.8));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}
/* Filter Button Styles */
.filter-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    border: 1px solid #d1d5db;
    color: #4b5563;
    transition: all 0.3s ease;
    background-color: transparent;
}

.filter-btn:hover {
    border-color: #f59e0b;
    color: #d97706;
}

.filter-btn.active {
    background-color: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.service-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.service-card:hover {
    border-color: #f59e0b;
    transform: translateY(-4px);
}

/* Testimonial Card Styles */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Filter Button Styles */
.filter-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    border: 1px solid #d1d5db;
    color: #4b5563;
    transition: all 0.3s ease;
    background-color: transparent;
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Lightbox Styles */
#lightbox {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

#lightbox.hidden {
    animation: fadeOut 0.3s ease;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: transparent;
    box-shadow: 0 0 0 2px #f59e0b, 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Error and Success Messages */
.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.success-message {
    color: #16a34a;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #f59e0b;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Image Optimization */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -webkit-crisp-edges;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast; /* Edge 79+ support */
}

/* Image Loading States */
.image-loading {
    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; }
}

/* Placeholder gradients for fallback */
.bg-portrait { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.bg-wedding { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.bg-nature { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.bg-street { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.bg-events { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.bg-commercial { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Styles */
.form-group {
    position: relative;
}

.form-input {
    @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-amber-400 focus:border-transparent transition-all duration-300;
}

.form-input:focus {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.form-label {
    @apply block text-sm font-medium text-gray-700 mb-2;
}

/* Error and Success Messages */
.error-message {
    @apply text-red-600 text-sm mt-1;
}

.success-message {
    @apply text-green-600 text-sm mt-1;
}

/* Responsive Design Utilities */
@media (max-width: 768px) {
    .hero-bg {
        background-attachment: scroll;
    }
    
    .gallery-item:hover {
        transform: none;
    }
    
    .gallery-overlay {
        opacity: 1;
        background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.8));
    }
}

/* Image Optimization */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -webkit-crisp-edges;
    image-rendering: crisp-edges;
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
.focus-visible:focus {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid currentColor;
    }
    
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    
.hero-bg {
    background-attachment: scroll;
}
    }
    
    .hero-bg {
        background-attachment: scroll;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Custom Grid Layouts */
.masonry-grid {
    column-count: 3;
    column-gap: 1.5rem;
    column-fill: balance;
}

.masonry-grid .masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

@media (max-width: 1024px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 640px) {
    .masonry-grid {
        column-count: 1;
    }
}

/* Backdrop Filter Fallback */
.backdrop-blur-fallback {
    background-color: rgba(0, 0, 0, 0.8);
}

@supports (backdrop-filter: blur(8px)) {
    .backdrop-blur-fallback {
        backdrop-filter: blur(8px);
        background-color: rgba(0, 0, 0, 0.6);
    }
}

/* Custom Selection */
::selection {
    background-color: #f59e0b;
    color: white;
}

::-moz-selection {
    background-color: #f59e0b;
    color: white;
}