/* Lightbox CSS */
/* Modern lightbox for yacht image galleries */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: lightboxZoomIn 0.3s ease;
}

@keyframes lightboxZoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: -60px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-close:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Navigation Buttons */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: calc(100% + 120px);
    left: -60px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    pointer-events: auto;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-prev:focus,
.lightbox-next:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.lightbox-prev:disabled,
.lightbox-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.lightbox-prev:disabled:hover,
.lightbox-next:disabled:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.1);
}

/* Counter */
.lightbox-counter {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* Loading State */
.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
}

.lightbox-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: lightboxSpin 1s linear infinite;
}

@keyframes lightboxSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Zoom Controls */
.lightbox-zoom {
    position: absolute;
    bottom: -60px;
    right: 0;
    display: flex;
    gap: 10px;
}

.lightbox-zoom-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-zoom-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-zoom-btn:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Image Zoom */
.lightbox-image-container {
    position: relative;
    overflow: hidden;
    cursor: grab;
}

.lightbox-image-container.dragging {
    cursor: grabbing;
}

.lightbox-image-container img {
    transition: transform 0.3s ease;
}

.lightbox-image-container.zoomed img {
    cursor: grab;
}

.lightbox-image-container.zoomed.dragging img {
    cursor: grabbing;
}

/* Thumbnail Strip */
.lightbox-thumbnails {
    position: absolute;
    bottom: -120px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    max-width: 80%;
    overflow-x: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.lightbox-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.lightbox-thumbnails::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.lightbox-thumbnails::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.lightbox-thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.lightbox-thumbnail:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.lightbox-thumbnail.active {
    border-color: white;
}

.lightbox-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info Panel */
.lightbox-info {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    max-width: 300px;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.lightbox:hover .lightbox-info {
    opacity: 1;
    transform: translateY(0);
}

.lightbox-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.lightbox-info p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Share Button */
.lightbox-share {
    position: absolute;
    top: -60px;
    left: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-share:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-share:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 100%;
        max-height: 100%;
        padding: 20px;
    }
    
    .lightbox-close {
        top: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .lightbox-nav {
        width: calc(100% + 80px);
        left: -40px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .lightbox-counter {
        bottom: 20px;
        font-size: 0.9rem;
        padding: 6px 12px;
    }
    
    .lightbox-zoom {
        bottom: 20px;
        right: 20px;
    }
    
    .lightbox-zoom-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .lightbox-thumbnails {
        bottom: 80px;
        max-width: 90%;
        padding: 8px;
    }
    
    .lightbox-thumbnail {
        width: 50px;
        height: 35px;
    }
    
    .lightbox-info {
        top: 80px;
        left: 20px;
        right: 20px;
        max-width: none;
        padding: 12px 15px;
    }
    
    .lightbox-info h3 {
        font-size: 1rem;
    }
    
    .lightbox-info p {
        font-size: 0.8rem;
    }
    
    .lightbox-share {
        top: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .lightbox-content {
        padding: 15px;
    }
    
    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 45px;
        height: 45px;
        font-size: 0.9rem;
    }
    
    .lightbox-nav {
        width: calc(100% + 60px);
        left: -30px;
    }
    
    .lightbox-counter {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    
    .lightbox-zoom-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .lightbox-thumbnails {
        bottom: 70px;
        padding: 6px;
    }
    
    .lightbox-thumbnail {
        width: 45px;
        height: 30px;
    }
    
    .lightbox-share {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Touch Gestures */
@media (pointer: coarse) {
    .lightbox-prev,
    .lightbox-next,
    .lightbox-close,
    .lightbox-zoom-btn,
    .lightbox-share {
        min-width: 44px;
        min-height: 44px;
    }
    
    .lightbox-thumbnail {
        min-width: 44px;
        min-height: 44px;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .lightbox {
        background: rgba(0, 0, 0, 0.98);
    }
    
    .lightbox-close,
    .lightbox-prev,
    .lightbox-next,
    .lightbox-zoom-btn,
    .lightbox-share {
        background: rgba(255, 255, 255, 0.9);
        color: black;
        border: 2px solid white;
    }
    
    .lightbox-counter,
    .lightbox-info,
    .lightbox-thumbnails {
        background: rgba(0, 0, 0, 0.9);
        border: 1px solid white;
    }
    
    .lightbox-thumbnail {
        border-width: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .lightbox,
    .lightbox-content img,
    .lightbox-close,
    .lightbox-prev,
    .lightbox-next,
    .lightbox-zoom-btn,
    .lightbox-share,
    .lightbox-thumbnail,
    .lightbox-info {
        transition: none !important;
        animation: none !important;
    }
    
    .lightbox-content img {
        animation: none !important;
    }
}

/* Print Styles */
@media print {
    .lightbox {
        display: none !important;
    }
}

/* Focus Trap for Accessibility */
.lightbox[aria-hidden="false"] {
    display: flex;
}

.lightbox[aria-hidden="true"] {
    display: none;
}

/* Screen Reader Only */
.lightbox-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;
}

/* Keyboard Navigation Indicators */
.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible,
.lightbox-zoom-btn:focus-visible,
.lightbox-share:focus-visible,
.lightbox-thumbnail:focus-visible {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}