/* Gallery Detail Styles */
.gallery-detail-page {
    min-height: calc(100vh - 200px);
}

/* Breadcrumb */
.breadcrumb {
    background: #f9fafb;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb-nav a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-nav a:hover {
    color: #dc2626;
}

.breadcrumb-nav span:last-child {
    color: #1f2937;
    font-weight: 500;
}

/* Gallery Header */
.gallery-header {
    padding: 2rem 0;
    background: linear-gradient(135deg, #fef2f2, #f3e8ff);
}

.gallery-header .container {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: start;
}

.gallery-info h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.gallery-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.meta-icon {
    font-size: 1rem;
}

.gallery-info p {
    color: #6b7280;
    line-height: 1.6;
    max-width: 600px;
}

.gallery-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 200px;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    white-space: nowrap;
}

.action-btn.primary {
    background: linear-gradient(135deg, #dc2626, #7c3aed);
    color: white;
}

.action-btn.secondary {
    background: #7c3aed;
    color: white;
}

.action-btn.outline {
    background: transparent;
    color: #374151;
    border: 2px solid #d1d5db;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Featured Photo */
.featured-photo {
    padding: 2rem 0;
}

.featured-photo-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

#featured-image {
    width: 100%;
    height: 600px;
    object-fit: cover;
    display: block;
}

.featured-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    transition: background 0.3s;
}

.featured-photo-container:hover .featured-overlay {
    background: rgba(0,0,0,0.3);
}

.photo-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    border: 2px solid rgba(255,255,255,0.4);
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0.8;
    backdrop-filter: blur(10px);
    z-index: 100;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.photo-nav-btn.prev {
    left: 1rem;
}

.photo-nav-btn.next {
    right: 1rem;
}

.featured-photo-container:hover .photo-nav-btn,
.photo-nav-btn:hover {
    opacity: 1;
    background: rgba(0,0,0,0.9);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-50%) scale(1.05);
}

.photo-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.featured-photo-container:hover .photo-controls {
    opacity: 1;
}

.control-btn {
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 1rem;
}

.control-btn:hover {
    background: rgba(0,0,0,0.7);
}

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 2rem 1.5rem 1.5rem;
}

.photo-caption h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.photo-caption p {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Photo Carousel */
.photo-carousel {
    padding: 3rem 0;
    background: #f9fafb;
}

.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.carousel-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
}

.carousel-controls {
    display: flex;
    gap: 0.5rem;
}

.carousel-control-btn {
    background: #dc2626;
    color: white;
    border: none;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.25rem;
}

.carousel-control-btn:hover {
    background: #b91c1c;
    transform: scale(1.1);
}

.carousel-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 1rem;
}

.carousel-container::-webkit-scrollbar {
    height: 8px;
}

.carousel-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.carousel-container::-webkit-scrollbar-thumb {
    background: #dc2626;
    border-radius: 4px;
}

.carousel-item {
    flex: none;
    width: 200px;
    height: 150px;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.carousel-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.carousel-item.active {
    border: 3px solid #dc2626;
    transform: scale(1.05);
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.carousel-item:hover .carousel-item-overlay {
    background: rgba(0,0,0,0.5);
}

.carousel-item-number {
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.carousel-item:hover .carousel-item-number {
    opacity: 1;
}

/* Photo Grid */
.photo-grid-section {
    padding: 3rem 0;
}

.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.grid-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
}

.view-options {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.875rem;
}

.view-btn:hover,
.view-btn.active {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    transition: all 0.3s;
}

.photo-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.photo-grid.cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.grid-item {
    aspect-ratio: 1;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.grid-item:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.grid-item:hover .grid-item-overlay {
    background: rgba(0,0,0,0.6);
}

.grid-item-controls {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.grid-item:hover .grid-item-controls {
    opacity: 1;
}

.grid-control-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 1rem;
}

.grid-control-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Related Galleries */
.related-galleries {
    padding: 3rem 0;
    background: #f9fafb;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.related-item {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.related-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.related-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.related-item-content {
    padding: 1.5rem;
}

.related-item h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.related-item p {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.related-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Fullscreen Modal */
.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.98);
    z-index: 9999;
}

.fullscreen-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.fullscreen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: rgba(0,0,0,0.5);
}

.fullscreen-info h3 {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.fullscreen-info p {
    color: #d1d5db;
    font-size: 0.875rem;
}

.fullscreen-controls {
    display: flex;
    gap: 0.75rem;
}

.fullscreen-body {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    min-height: 0;
    overflow: hidden;
}

.fullscreen-nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    border: 2px solid rgba(255,255,255,0.4);
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10001;
    backdrop-filter: blur(10px);
    opacity: 0.9;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.fullscreen-nav-btn:hover {
    background: rgba(0,0,0,0.9);
    border-color: rgba(255,255,255,0.6);
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
}

.fullscreen-nav-btn.prev {
    left: 2rem;
}

.fullscreen-nav-btn.next {
    right: 2rem;
}

#fullscreen-image {
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 200px);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-header .container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-info h1 {
        font-size: 2rem;
    }
    
    .gallery-meta {
        gap: 1rem;
    }
    
    .gallery-actions {
        flex-direction: row;
        flex-wrap: wrap;
        min-width: auto;
    }
    
    #featured-image {
        height: 400px;
    }
    
    .carousel-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .grid-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .photo-grid.cols-4,
    .photo-grid.cols-5 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .fullscreen-nav-btn {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
    }
    
    .fullscreen-nav-btn.prev {
        left: 1rem;
    }
    
    .fullscreen-nav-btn.next {
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-info h1 {
        font-size: 1.75rem;
    }
    
    .gallery-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #featured-image {
        height: 300px;
    }
    
    .photo-nav-btn {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
    }
    
    .carousel-item {
        width: 150px;
        height: 112px;
    }
    
    .photo-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .photo-grid.cols-4,
    .photo-grid.cols-5 {
        grid-template-columns: 1fr;
    }
}/
* Slideshow Styles */
.slideshow-notification {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    z-index: 10000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.fullscreen-modal.slideshow-mode .fullscreen-nav-btn {
    opacity: 0.8;
    display: flex !important;
    visibility: visible !important;
}

.fullscreen-modal.slideshow-mode .fullscreen-nav-btn:hover {
    opacity: 1;
}

.fullscreen-modal.slideshow-mode .fullscreen-header {
    background: rgba(0,0,0,0.7);
}

/* Better visibility for navigation buttons - styles moved above */

/* Ensure buttons are always accessible */
@media (max-width: 768px) {
    .photo-nav-btn {
        opacity: 0.8;
        width: 3.5rem;
        height: 3.5rem;
        font-size: 1.25rem;
    }
    
    .photo-nav-btn.prev {
        left: 0.5rem;
    }
    
    .photo-nav-btn.next {
        right: 0.5rem;
    }
}

@media (max-width: 480px) {
    .photo-nav-btn {
        width: 3rem;
        height: 3rem;
        font-size: 1rem;
        opacity: 0.9;
    }
}

/* Loading state for images */
.featured-photo-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3rem;
    height: 3rem;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}/* Fo
rce navigation buttons to always be visible - Override any conflicting styles */
.featured-photo-container .photo-nav-btn {
    display: flex !important;
    opacity: 0.8 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.featured-photo-container:hover .photo-nav-btn {
    opacity: 1 !important;
}

/* Specific fix for photo 5 and all photos */
.featured-photo-container .photo-nav-btn.prev,
.featured-photo-container .photo-nav-btn.next {
    display: flex !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 1000 !important;
}

.featured-photo-container .photo-nav-btn.prev {
    left: 1rem !important;
}

.featured-photo-container .photo-nav-btn.next {
    right: 1rem !important;
}

/* Ensure buttons work on touch devices */
@media (hover: none) and (pointer: coarse) {
    .photo-nav-btn {
        opacity: 0.9 !important;
        background: rgba(0,0,0,0.8) !important;
    }
}/* Enhan
ced fullscreen image handling for portrait images */
.fullscreen-modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.fullscreen-modal .fullscreen-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.fullscreen-modal .fullscreen-body {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
}

/* Ensure navigation buttons are always visible in fullscreen */
.fullscreen-modal .fullscreen-nav-btn {
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10002 !important;
    display: flex !important;
    opacity: 0.9 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.fullscreen-modal .fullscreen-nav-btn.prev {
    left: 2rem !important;
}

.fullscreen-modal .fullscreen-nav-btn.next {
    right: 2rem !important;
}

/* Portrait image specific handling */
.fullscreen-modal #fullscreen-image {
    max-width: calc(100vw - 8rem) !important;
    max-height: calc(100vh - 150px) !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

/* Mobile responsive for fullscreen */
@media (max-width: 768px) {
    .fullscreen-modal .fullscreen-nav-btn {
        width: 3.5rem !important;
        height: 3.5rem !important;
        font-size: 1.25rem !important;
    }
    
    .fullscreen-modal .fullscreen-nav-btn.prev {
        left: 1rem !important;
    }
    
    .fullscreen-modal .fullscreen-nav-btn.next {
        right: 1rem !important;
    }
    
    .fullscreen-modal #fullscreen-image {
        max-width: calc(100vw - 6rem) !important;
        max-height: calc(100vh - 120px) !important;
    }
}

@media (max-width: 480px) {
    .fullscreen-modal .fullscreen-nav-btn {
        width: 3rem !important;
        height: 3rem !important;
        font-size: 1rem !important;
    }
    
    .fullscreen-modal .fullscreen-nav-btn.prev {
        left: 0.5rem !important;
    }
    
    .fullscreen-modal .fullscreen-nav-btn.next {
        right: 0.5rem !important;
    }
    
    .fullscreen-modal #fullscreen-image {
        max-width: calc(100vw - 4rem) !important;
        max-height: calc(100vh - 100px) !important;
    }
}