/* Enhanced Global Styles */
body {
    font-family: 'Lato', sans-serif;
    background-color: #F9F9F9;
    color: #222222;
    overflow-x: hidden;
    cursor: auto;
    scroll-behavior: smooth;
}

.serif {
    font-family: 'Playfair Display', serif;
}

/* Default Cursor System - Standard browser cursor */
/* Custom cursor has been removed for better compatibility */

/* Enhanced Artwork Cards */
.artwork-card {
    position: relative;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 0;
    cursor: pointer;
}

.artwork-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(75, 138, 136, 0.1);
}

.artwork-card:hover .artwork-info {
    opacity: 1;
    transform: translateY(0);
}

.artwork-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.artwork-card:hover img {
    transform: scale(1.08);
    filter: brightness(1.1) contrast(1.1);
}

.artwork-info {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 50%, transparent 100%);
    backdrop-filter: blur(2px);
}

/* Enhanced Modal */
.modal-overlay {
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}

.modal-content {
    max-height: 90vh;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-radius: 0;
}

.watercolor-bg {
    background-image: 
        linear-gradient(135deg, rgba(75, 138, 136, 0.1) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(75, 138, 136, 0.15) 100%),
        url('https://images.unsplash.com/photo-1541961017774-22349e4a1262?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    animation: watercolor-shift 30s ease-in-out infinite;
    position: relative;
}

.watercolor-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(75, 138, 136, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(75, 138, 136, 0.2) 0%, transparent 50%);
    animation: floating-blobs 25s ease-in-out infinite;
    pointer-events: none;
}

@keyframes watercolor-shift {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
}

@keyframes floating-blobs {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(30px, -30px) rotate(90deg);
    }
    50% {
        transform: translate(-20px, 20px) rotate(180deg);
    }
    75% {
        transform: translate(20px, -20px) rotate(270deg);
    }
}

/* Enhanced Button Effects */
.btn-hover-effect {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
}

.btn-hover-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

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

.btn-hover-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: #4B8A88;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
}

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

.btn-hover-effect:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(75, 138, 136, 0.3);
}

/* Enhanced Filter Buttons */
.filter-btn {
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(75, 138, 136, 0.1);
    transition: left 0.3s ease;
}

.filter-btn:hover::before {
    left: 0;
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #4B8A88;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-btn:hover::after {
    width: 100%;
}

.filter-btn.active {
    color: #4B8A88;
    border-color: #4B8A88;
    background: rgba(75, 138, 136, 0.05);
}

.filter-btn.active::after {
    width: 100%;
}

/* Enhanced Process Toggle */
.process-toggle {
    position: relative;
    display: inline-block;
    width: 90px;
    height: 36px;
}

.process-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.process-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #F9F9F9;
    border: 2px solid #4B8A88;
    transition: .4s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 18px;
}

.process-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 3px;
    background-color: #4B8A88;
    transition: .4s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.process-toggle input:checked + .process-slider {
    background-color: rgba(75, 138, 136, 0.1);
}

.process-toggle input:checked + .process-slider:before {
    transform: translateX(52px);
    background-color: #5EAAA8;
}

.process-labels {
    position: absolute;
    top: 8px;
    width: 100%;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    padding: 0 8px;
    pointer-events: none;
    font-weight: 500;
}

/* Enhanced Animations */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(-5px) rotate(-1deg); }
}

.animate-float {
    animation: float 8s ease-in-out infinite;
}

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

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

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

/* Scroll Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger Animation for Gallery */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
}

.stagger-item.animate {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.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; }
}

/* Enhanced Form Styles */
.form-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    background: white;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #4B8A88;
    box-shadow: 0 0 0 3px rgba(75, 138, 136, 0.1);
    transform: translateY(-1px);
}

.form-label {
    position: absolute;
    left: 16px;
    top: 12px;
    color: #999;
    transition: all 0.3s ease;
    pointer-events: none;
    background: white;
    padding: 0 4px;
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    top: -8px;
    font-size: 12px;
    color: #4B8A88;
}

/* Success/Error States */
.form-success {
    border-color: #10B981;
    background-color: rgba(16, 185, 129, 0.05);
}

.form-error {
    border-color: #EF4444;
    background-color: rgba(239, 68, 68, 0.05);
}

.form-message {
    font-size: 14px;
    margin-top: 4px;
    transition: opacity 0.3s ease;
}

.form-message.success {
    color: #10B981;
}

.form-message.error {
    color: #EF4444;
}

/* Performance Optimizations */
* {
    will-change: auto;
}

.artwork-card img,
.cursor-dot,
.cursor-circle {
    will-change: transform;
}

/* Reduced Motion Support */
@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;
    }
    
    .cursor-dot,
    .cursor-circle,
    .cursor-view {
        display: none;
    }
    
    body {
        cursor: auto;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .watercolor-bg {
        background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPgogIDxmaWx0ZXIgaWQ9ImIiPgogICAgPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMTUiLz4KICA8L2ZpbHRlcj4KICA8cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWx0ZXI9InVybCgjYikiIG9wYWNpdHk9IjAuMDUiLz4KPC9zdmc+');
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .modal-content {
        flex-direction: column;
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-image {
        width: 100% !important;
        max-height: 50vh;
    }
    
    .modal-details {
        width: 100% !important;
        padding: 20px;
        max-height: 45vh;
    }
    
    .cursor-dot,
    .cursor-circle,
    .cursor-view {
        display: none;
    }
    
    body {
        cursor: auto;
    }
    
    .artwork-card:hover {
        transform: none;
    }
    
    .artwork-card:hover img {
        transform: none;
        filter: none;
    }
}

/* Print Styles */
@media print {
    .cursor-dot,
    .cursor-circle,
    .cursor-view,
    nav,
    #artwork-modal,
    .btn-hover-effect {
        display: none !important;
    }
    
    body {
        color: black !important;
        background: white !important;
    }
    
    .artwork-card {
        break-inside: avoid;
    }
}

/* High DPI Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .cursor-dot {
        width: 4px;
        height: 4px;
    }
    
    .cursor-circle {
        width: 32px;
        height: 32px;
    }
}

/* Focus Styles for Accessibility */
*:focus {
    outline: 2px solid #4B8A88;
    outline-offset: 2px;
}

.artwork-card:focus,
.btn-hover-effect:focus,
.filter-btn:focus {
    outline: 2px solid #4B8A88;
    outline-offset: 4px;
}

/* Skip Link for Screen Readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #4B8A88;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 4px;
}

.skip-link:focus {
    top: 6px;
}