/* Gallery-specific styles for individual collection pages */

/* Copyright Watermark Styles */
.gallery-image-container::after,
.collection-image-container::after {
    content: '© 2026 Cannon Art';
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 3px 6px;
    font-size: 0.49rem;
    font-weight: 600;
    border-radius: 2px;
    z-index: 10;
    pointer-events: none;
    font-family: Arial, sans-serif;
    letter-spacing: 0.4px;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .gallery-image-container::after,
    .collection-image-container::after {
        font-size: 0.42rem;
        padding: 2px 4px;
        bottom: 8px;
        right: 8px;
    }
}

/* Copyright notice section */
.copyright-notice {
    background-color: #f8f9fa;
    border-top: 2px solid #169B62;
    padding: 1.5rem 0;
    margin-top: 3rem;
    text-align: center;
}

.copyright-notice p {
    color: #555;
    font-size: 0.9rem;
    margin: 0.5rem 0;
    font-family: Arial, sans-serif;
}

.copyright-notice a {
    color: #169B62;
    text-decoration: none;
    font-weight: 600;
}

.copyright-notice a:hover {
    text-decoration: underline;
}

/* Gallery Grid - 2 pictures per row */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    margin-top: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-item {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.gallery-image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background-color: #f8f9fa;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    pointer-events: auto;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.02);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-info {
    padding: 2rem;
    text-align: center;
}

.gallery-title {
    font-family: 'Old English Text MT', 'UnifrakturMaguntia', 'Blackletter', cursive;
    font-size: 1.5rem;
    font-weight: 600;
    color: #169B62;
    margin-bottom: 0.5rem;
}

.gallery-medium {
    color: #666;
    font-size: 1rem;
    font-weight: 400;
}

/* Gallery Notes Section */
.gallery-notes {
    padding: 0 2rem 2rem 2rem;
    border-top: 1px solid #e0e0e0;
    margin-top: 1rem;
}

.notes-preview,
.notes-full {
    margin-top: 1rem;
}

.notes-preview {
    display: block;
}

.notes-text-preview,
.notes-text-full {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
    font-style: italic;
    font-family: Arial, Calibri;
    display: inline;
}

.notes-text-preview {
    margin-right: 0.3rem;
}

.notes-text-full {
    margin-bottom: 0.5rem;
    display: block;
}

.notes-text-full a {
    color: #169B62;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.notes-text-full a:hover {
    color: #0d7a4a;
}

.expand-notes-btn,
.collapse-notes-btn {
    background-color: transparent;
    color: #007AFF;
    border: none;
    padding: 0;
    margin-left: 0.2rem;
    border-radius: 0;
    font-size: 0.95rem;
    font-weight: 400;
    font-style: normal;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: Arial, Calibri;
    text-transform: lowercase;
    letter-spacing: 0;
    text-decoration: none;
    display: inline;
    vertical-align: baseline;
}

.expand-notes-btn:hover,
.collapse-notes-btn:hover {
    color: #0051D5;
    text-decoration: underline;
    text-decoration-color: #0051D5;
}

.expand-notes-btn:active,
.collapse-notes-btn:active {
    color: #003D9E;
}

.notes-full {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Collection Description Section */
.collection-description {
    padding: 4rem 0;
    background-color: #f8f9fa;
}

.description-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.description-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #555;
    line-height: 1.8;
}

/* Active Navigation Link */
.nav-link.active {
    color: #169B62;
    font-weight: 600;
}

.nav-link.active::after {
    width: 100%;
}

/* Image Modal for Full Size Viewing */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
    padding-left: 120px; /* Space for back button on the left */
}

.modal-content {
    position: relative;
    max-width: 85%;
    max-height: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image-container {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: inline-block;
}

.modal-image {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    pointer-events: auto;
    display: block;
}

/* Copyright watermark for modal */
.modal-image-container::after {
    content: '© 2026 Cannon Art';
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 6px 8px;
    font-size: 0.63rem;
    font-weight: 600;
    border-radius: 3px;
    z-index: 10;
    pointer-events: none;
    font-family: Arial, sans-serif;
    letter-spacing: 0.4px;
    opacity: 0.95;
}


/* Back button for modal - positioned outside image on the left */
.back-modal {
    position: fixed;
    top: 20px;
    left: 20px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.4);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    z-index: 2001;
    font-family: Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.back-modal:hover {
    background-color: rgba(255, 255, 255, 0.9);
    color: #000;
    border-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

.back-modal::before {
    content: '← ';
    margin-right: 5px;
    font-size: 1.2rem;
}

/* Responsive Design for Gallery Pages */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .gallery-info {
        padding: 1.5rem;
    }
    
    .gallery-title {
        font-size: 1.3rem;
    }
    
    .image-modal {
        padding: 1rem;
        padding-left: 90px; /* Space for back button on mobile */
    }
    
    .modal-content {
        max-width: 90%;
        max-height: 90%;
    }
    
    .modal-image {
        max-height: 80vh;
    }
    
    .modal-image-container::after {
        font-size: 0.53rem;
        padding: 4px 7px;
        bottom: 10px;
        right: 10px;
    }
    
    .back-modal {
        top: 10px;
        left: 10px;
        font-size: 0.85rem;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        gap: 1.5rem;
    }
    
    .gallery-info {
        padding: 1rem;
    }
    
    .gallery-title {
        font-size: 1.1rem;
    }
    
    .gallery-medium {
        font-size: 0.9rem;
    }
    
    .description-content p {
        font-size: 1rem;
    }
    
    .gallery-notes {
        padding: 0 1rem 1rem 1rem;
    }
    
    .notes-text-preview,
    .notes-text-full {
        font-size: 0.9rem;
    }
    
    .expand-notes-btn,
    .collapse-notes-btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }
}

/* Special styling for different collections */
.hero-title {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Batman collection specific styling */
body:has(.hero-title:contains("Batman")) .hero {
    background: linear-gradient(135deg, #169B62 0%, #0d6b3f 100%);
}

/* Rolling Stones collection specific styling */
body:has(.hero-title:contains("Rolling Stones")) .hero {
    background: linear-gradient(135deg, #169B62 0%, #0d6b3f 100%);
}

/* The Who collection specific styling */
body:has(.hero-title:contains("The Who")) .hero {
    background: linear-gradient(135deg, #169B62 0%, #0d6b3f 100%);
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .gallery-item,
    .gallery-image,
    .gallery-overlay {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .gallery-item {
        border: 2px solid #000;
    }
    
    .gallery-overlay {
        background-color: rgba(0, 0, 0, 0.9);
    }
}

/* Focus styles for keyboard navigation */
.view-btn:focus,
.close-modal:focus {
    outline: 2px solid #169B62;
    outline-offset: 2px;
}

/* Print styles for gallery pages */
@media print {
    .gallery-overlay,
    .view-btn,
    .close-modal {
        display: none;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .gallery-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .gallery-image-container {
        aspect-ratio: 1;
    }
}