/**
 * Single Painting Page Enhancements
 * Makes individual painting pages more visually interesting while keeping focus on the artwork
 */

/* ========================================
   SINGLE PAINTING PAGE LAYOUT
   ======================================== */

/* Main container for single painting posts */
.single-painting .site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Featured image container - the star of the show */
.single-painting .wp-block-post-featured-image,
.single-painting .post-thumbnail {
    margin: 0 auto 3rem;
    text-align: center;
    position: relative;
}

.single-painting .wp-block-post-featured-image::after,
.single-painting .post-thumbnail::after {
    content: "Click to enlarge";
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.single-painting .wp-block-post-featured-image:hover::after,
.single-painting .post-thumbnail:hover::after {
    opacity: 1;
}

.single-painting .wp-block-post-featured-image img,
.single-painting .post-thumbnail img {
    max-width: 100%;
    height: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.single-painting .wp-block-post-featured-image:hover img,
.single-painting .post-thumbnail:hover img {
    transform: scale(1.02);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}

/* Elegant frame effect */
.single-painting .wp-block-post-featured-image::before,
.single-painting .post-thumbnail::before {
    content: "";
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    pointer-events: none;
    z-index: -1;
}

/* Title styling - elegant and prominent */
.single-painting .entry-title,
.single-painting .wp-block-post-title {
    font-family: 'Ibarra Real Nova', serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 500;
    text-align: center;
    margin: 0 0 1.5rem;
    letter-spacing: 0.5px;
    color: #1a1a1a;
    line-height: 1.2;
}

/* Subtitle or year display */
.single-painting .entry-meta {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.1rem;
    color: #666;
    font-style: italic;
}

/* Content area - description */
.single-painting .entry-content {
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #333;
}

.single-painting .entry-content p {
    margin-bottom: 1.5rem;
}

/* Enhanced painting meta box for single pages */
.single-painting .painting-meta {
    max-width: 600px;
    margin: 3rem auto;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-left: 6px solid #333;
    border-radius: 0 12px 12px 0;
    padding: 2rem 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
}

.single-painting .painting-meta::before {
    content: "Details";
    position: absolute;
    top: -12px;
    left: 20px;
    background: #333;
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.single-painting .painting-meta p {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin: 0;
    font-size: 1.05rem;
}

.single-painting .painting-meta p:last-child {
    border-bottom: none;
}

.single-painting .painting-meta strong {
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    min-width: 100px;
}

.single-painting .painting-meta p span {
    color: #555;
    font-weight: 400;
}

/* Decorative element above painting */
.single-painting .entry-header::before {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #333, transparent);
    margin: 0 auto 2rem;
}

/* Related paintings or navigation */
.single-painting .post-navigation,
.single-painting .wp-block-post-navigation-link {
    max-width: 800px;
    margin: 4rem auto;
    padding: 2rem;
    background: #fafafa;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.single-painting .post-navigation a {
    text-decoration: none;
    color: #333;
    padding: 1rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.single-painting .post-navigation a:hover {
    border-color: #333;
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Breadcrumbs or back link */
.single-painting .back-to-gallery {
    text-align: center;
    margin: 2rem 0;
}

.single-painting .back-to-gallery a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 8px;
}

.single-painting .back-to-gallery a:hover {
    color: #000;
    border-color: #e0e0e0;
    background: #fafafa;
}

.single-painting .back-to-gallery a::before {
    content: "←";
    font-size: 1.2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .single-painting .site-main {
        padding: 2rem 1rem;
    }
    
    .single-painting .entry-title,
    .single-painting .wp-block-post-title {
        font-size: 2rem;
    }
    
    .single-painting .painting-meta {
        padding: 1.5rem;
    }
    
    .single-painting .painting-meta p {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .single-painting .post-navigation {
        flex-direction: column;
    }
    
    .single-painting .wp-block-post-featured-image::before,
    .single-painting .post-thumbnail::before {
        top: -10px;
        left: -10px;
        right: -10px;
        bottom: -10px;
    }
}

/* Print optimization for single paintings */
@media print {
    .single-painting .painting-meta {
        border: 1px solid #333;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .single-painting .post-navigation,
    .single-painting .back-to-gallery {
        display: none;
    }
}

/* Optional: Lightbox effect on click (shows full size) */
.single-painting .wp-block-post-featured-image img,
.single-painting .post-thumbnail img {
    cursor: zoom-in;
}

/* Lightbox overlay */
.painting-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    cursor: zoom-out;
    animation: fadeIn 0.3s ease;
}

.painting-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.painting-lightbox img {
    max-width: 95%;
    max-height: 95vh;
    object-fit: contain;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
    animation: zoomIn 0.3s ease;
}

.painting-lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: white;
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    background: none;
    border: none;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    z-index: 10000;
}

.painting-lightbox-close:hover {
    transform: scale(1.2);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Add subtle animation on page load */
.single-painting .entry-header {
    animation: fadeInUp 0.6s ease;
}

.single-painting .wp-block-post-featured-image,
.single-painting .post-thumbnail {
    animation: fadeIn 0.8s ease 0.2s both;
}

.single-painting .entry-content {
    animation: fadeInUp 0.6s ease 0.4s both;
}

.single-painting .painting-meta {
    animation: fadeInUp 0.6s ease 0.6s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gallery context - if there are multiple images */
.single-painting .wp-block-gallery {
    margin: 3rem 0;
    gap: 1.5rem;
}

.single-painting .wp-block-gallery img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.single-painting .wp-block-gallery img:hover {
    transform: scale(1.05);
}

/* Signature or artist note section */
.single-painting .artist-signature {
    text-align: right;
    font-family: 'Ibarra Real Nova', serif;
    font-style: italic;
    color: #666;
    margin-top: 3rem;
    font-size: 1.1rem;
}

/* Share buttons area (if added later) */
.single-painting .share-buttons {
    max-width: 600px;
    margin: 3rem auto;
    text-align: center;
    padding: 1.5rem;
    background: #fafafa;
    border-radius: 12px;
}

.single-painting .share-buttons h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 500;
}
