/**
 * Custom Visual Enhancements for Heidy Kux Kardos Portfolio
 * Optional styling improvements - can be enabled/disabled as needed
 */

/* ========================================
   ENHANCEMENT 1: Subtle Image Overlay on Hover
   Adds a gentle darkening effect with a "View" hint
   ======================================== */
.painting-enhancement-overlay .grid-item {
    position: relative;
    overflow: hidden;
}

.painting-enhancement-overlay .grid-item::after {
    content: "View Details";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    z-index: 2;
}

.painting-enhancement-overlay .grid-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.6));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

/* Only apply hover effects on devices that support hover (not touch screens) */
@media (hover: hover) and (pointer: fine) {
    .painting-enhancement-overlay .grid-item:hover::before,
    .painting-enhancement-overlay .grid-item:hover::after {
        opacity: 1;
    }
}


/* ========================================
   ENHANCEMENT 2: Elegant Fade-in Animation
   Paintings gracefully appear when scrolling
   ======================================== */
/* Disable fade-in animation on mobile to prevent re-triggering during scroll */
@media (min-width: 769px) {
    .painting-enhancement-fadein .grid-item {
        opacity: 0;
        animation: fadeInUp 0.6s ease forwards;
    }

    .painting-enhancement-fadein .grid-item:nth-child(1) { animation-delay: 0.1s; }
    .painting-enhancement-fadein .grid-item:nth-child(2) { animation-delay: 0.2s; }
    .painting-enhancement-fadein .grid-item:nth-child(3) { animation-delay: 0.3s; }
    .painting-enhancement-fadein .grid-item:nth-child(4) { animation-delay: 0.4s; }
    .painting-enhancement-fadein .grid-item:nth-child(5) { animation-delay: 0.5s; }
    .painting-enhancement-fadein .grid-item:nth-child(6) { animation-delay: 0.6s; }
}

/* On mobile, items are immediately visible without animation */
@media (max-width: 768px) {
    .painting-enhancement-fadein .grid-item {
        opacity: 1;
        animation: none;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ========================================
   ENHANCEMENT 3: Refined Sort Controls
   More artistic styling for the dropdown
   ======================================== */
.painting-enhancement-controls .painting-grid-controls {
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 3rem;
}

.painting-enhancement-controls .painting-grid-controls label {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    letter-spacing: 0.5px;
}

.painting-enhancement-controls .painting-sort {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.painting-enhancement-controls .painting-sort:hover {
    border-color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.painting-enhancement-controls .painting-sort:focus {
    border-color: #000;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}


/* ========================================
   ENHANCEMENT 4: Stylish Group Headers
   More artistic section dividers
   ======================================== */
.painting-enhancement-headers .group-header {
    position: relative;
    text-align: center;
    font-family: 'Ibarra Real Nova', serif;
    font-weight: 500;
    letter-spacing: 1px;
    margin: 3rem 0 2rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}


/* ========================================
   ENHANCEMENT 5: Smooth Image Loading Effect
   Blur-to-sharp transition for a professional feel
   ======================================== */
.painting-enhancement-loading .grid-item img {
    filter: blur(10px);
    transition: filter 0.5s ease;
}

.painting-enhancement-loading .grid-item img.loaded {
    filter: blur(0);
}


/* ========================================
   ENHANCEMENT 6: Painting Title Styling
   More elegant typography for titles
   ======================================== */
.painting-enhancement-titles .grid-item h4 {
    font-family: 'Ibarra Real Nova', serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: #2c2c2c;
    letter-spacing: 0.3px;
    margin-top: 1rem;
    transition: color 0.3s ease;
}

.painting-enhancement-titles .grid-item:hover h4 {
    color: #000;
}


/* ========================================
   ENHANCEMENT 7: Enhanced Painting Meta Box
   More artistic styling for painting details
   ======================================== */
.painting-enhancement-meta .painting-meta {
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
    border-left: 5px solid #333;
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.25rem;
    margin-top: 2.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.painting-enhancement-meta .painting-meta p {
    line-height: 1.8;
    font-size: 1.05rem;
}

.painting-enhancement-meta .painting-meta strong {
    font-weight: 700;
    color: #000;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.85rem;
}


/* ========================================
   ENHANCEMENT 8: Subtle Grid Spacing Animation
   Items gently reposition on sort change
   ======================================== */
.painting-enhancement-smooth-sort .grid-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ========================================
   ENHANCEMENT 9: Focus Styles for Accessibility
   Beautiful focus indicators
   ======================================== */
.painting-enhancement-accessibility .grid-item a:focus {
    outline: 3px solid rgba(0, 0, 0, 0.3);
    outline-offset: 4px;
    border-radius: 4px;
}

.painting-enhancement-accessibility .grid-item a:focus img {
    transform: scale(1.02);
}


/* ========================================
   ENHANCEMENT 10: Mobile-Optimized Hover
   Touch-friendly interactions for mobile
   ======================================== */
@media (max-width: 768px) {
    .painting-enhancement-mobile .grid-item:active img {
        transform: scale(0.98);
    }
    
    .painting-enhancement-mobile .painting-grid-controls {
        position: sticky;
        top: 0;
        z-index: 10;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
        padding: 0.75rem 1rem !important;
    }
}


/* ========================================
   ENHANCEMENT 11: Print Styles
   Optimized for printing portfolios
   ======================================== */
@media print {
    .painting-grid-controls {
        display: none !important;
    }
    
    .grid {
        column-count: 2 !important;
    }
    
    .grid-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .grid-item img {
        border: 1px solid #ddd;
    }
    
    .grid-item h4 {
        font-size: 0.9rem;
    }
}


/* ========================================
   PAINTING INFO TAGS
   Small badges showing year and medium
   ======================================== */
.painting-info-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    justify-content: center;
    min-height: 2rem;
    align-items: center;
}

.painting-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
    transition: all 0.2s ease;
}

.painting-tag.year {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.painting-tag.medium {
    background: rgba(118, 75, 162, 0.1);
    color: #764ba2;
}

.grid-item:hover .painting-tag {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


/* ========================================
   ENHANCEMENT 12: Dark Mode Support (Optional)
   Automatic dark mode for evening viewing
   ======================================== */
@media (prefers-color-scheme: dark) {
    .painting-enhancement-darkmode .painting-meta {
        background-color: #1a1a1a;
        border-left-color: #fff;
        color: #e0e0e0;
    }
    
    .painting-enhancement-darkmode .painting-meta p,
    .painting-enhancement-darkmode .painting-meta strong {
        color: #e0e0e0;
    }
    
    .painting-enhancement-darkmode .group-header {
        color: #e0e0e0;
        border-bottom-color: #666;
    }
    
    .painting-enhancement-darkmode .grid-item h4 {
        color: #e0e0e0;
    }
}
