/*
 * Photos Gallery Styles for Music Fan Pro Club
 * @version 2025.07.02.14.30.37
 * @location SITE-ROOT/photos.css
 * Styling for photo gallery with masonry layout, filters, and lightbox
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #0f0f23;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

.photos-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    animation: fadeIn 0.8s ease-out;
}

/* Header Styles */
.photos-header {
    text-align: center;
    margin-bottom: 60px;
}

.page-title {
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    animation: slideInDown 0.8s ease-out;
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    animation: slideInUp 0.8s ease-out 0.2s both;
}

/* No Photos State */
.no-photos {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    text-align: center;
}

.no-photos-content {
    max-width: 400px;
    padding: 40px;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.no-photos-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.6;
}

.no-photos h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #ffffff;
}

.no-photos p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 20px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid rgba(102, 126, 234, 0.3);
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-1px);
}

.view-controls {
    display: flex;
    gap: 5px;
}

.view-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

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

/* Photos Gallery - Base */
.photos-gallery {
    margin-bottom: 40px;
}

/* Masonry View */
.photos-gallery.masonry-view {
    column-count: 4;
    column-gap: 20px;
    column-fill: balance;
}

.photos-gallery.masonry-view .photo-item {
    break-inside: avoid;
    margin-bottom: 20px;
    display: inline-block;
    width: 100%;
}

/* Grid View */
.photos-gallery.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.photos-gallery.grid-view .photo-item .photo-image {
    aspect-ratio: 4/3;
}

.photos-gallery.grid-view .photo-item .photo-image img {
    height: 100%;
    object-fit: cover;
}

/* List View */
.photos-gallery.list-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.photos-gallery.list-view .photo-item {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.photos-gallery.list-view .photo-image {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
}

.photos-gallery.list-view .photo-details {
    flex: 1;
}

/* Photo Item */
.photo-item {
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

.photo-item.hidden {
    display: none;
}

.photo-card {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.photo-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.2);
}

/* Photo Image */
.photo-image {
    position: relative;
    overflow: hidden;
    background: #000;
}

.photo-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.photo-card:hover .photo-image img {
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
}

.photo-card:hover .photo-overlay {
    opacity: 1;
}

.photo-info {
    margin-top: auto;
}

.photo-overlay .photo-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.photo-overlay .photo-date {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

.photo-actions {
    display: flex;
    gap: 8px;
    align-self: flex-end;
}

.action-btn {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
}

.action-btn:hover {
    background: rgba(102, 126, 234, 0.8);
    transform: scale(1.1);
}

/* Photo Details */
.photo-details {
    padding: 15px;
}

.photo-details .photo-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.photo-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 12px;
}

.photo-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.photo-date {
    color: #667eea;
    font-size: 0.85rem;
    font-weight: 500;
}

.photo-category {
    background: rgba(118, 75, 162, 0.2);
    color: #764ba2;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Load More */
.load-more-container {
    text-align: center;
    margin-top: 40px;
}

.load-more-btn {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
}

.load-more-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1001;
    animation: lightboxSlideIn 0.4s ease-out;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 1002;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.lightbox-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1002;
}

.nav-btn {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(102, 126, 234, 0.8);
    transform: scale(1.1);
}

.prev-btn {
    left: -70px;
}

.next-btn {
    right: -70px;
}

.lightbox-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.lightbox-image img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 10px;
}

.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.lightbox-info {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    padding: 20px;
    border-radius: 0 0 10px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.lightbox-details {
    flex: 1;
}

.lightbox-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.lightbox-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

.lightbox-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.lightbox-date,
.lightbox-category {
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 4px;
}

.lightbox-date {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
}

.lightbox-category {
    background: rgba(118, 75, 162, 0.2);
    color: #764ba2;
}

.lightbox-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lightbox-action-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lightbox-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
}

/* Footer */
.footer {
    background: #0f0f23;
    padding: 50px 0 20px;
    border-top: 2px solid #667eea;
    margin-top: 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section li {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #667eea;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #667eea;
    color: rgba(255, 255, 255, 0.7);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lightboxSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .photos-gallery.masonry-view {
        column-count: 3;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .view-controls {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .photos-container {
        padding: 30px 15px;
    }
    
    .page-title {
        font-size: 2.2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .photos-gallery.masonry-view {
        column-count: 2;
        column-gap: 15px;
    }
    
    .photos-gallery.masonry-view .photo-item {
        margin-bottom: 15px;
    }
    
    .photos-gallery.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .photos-gallery.list-view .photo-item {
        flex-direction: column;
        text-align: center;
    }
    
    .photos-gallery.list-view .photo-image {
        width: 100%;
        height: 200px;
    }
    
    .filter-controls {
        padding: 15px;
        gap: 15px;
    }
    
    .filter-buttons {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .lightbox-close {
        top: -40px;
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .prev-btn {
        left: -50px;
    }
    
    .next-btn {
        right: -50px;
    }
    
    .lightbox-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .lightbox-actions {
        flex-direction: row;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .photos-container {
        padding: 20px 10px;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .photos-gallery.masonry-view {
        column-count: 1;
    }
    
    .photos-gallery.grid-view {
        grid-template-columns: 1fr;
    }
    
    .filter-controls {
        padding: 12px;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .filter-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
        flex: 1;
        min-width: calc(50% - 3px);
    }
    
    .view-controls {
        margin-top: 10px;
    }
    
    .photo-details {
        padding: 12px;
    }
    
    .photo-details .photo-title {
        font-size: 1rem;
    }
    
    .photo-description {
        font-size: 0.85rem;
    }
    
    .lightbox-info {
        padding: 15px;
    }
    
    .lightbox-title {
        font-size: 1.1rem;
    }
    
    .lightbox-description {
        font-size: 0.9rem;
    }
    
    .nav-btn {
        display: none; /* Hide navigation buttons on very small screens */
    }
    
    .lightbox-counter {
        bottom: -30px;
        font-size: 0.8rem;
        padding: 4px 12px;
    }
}

/* Loading States */
.photo-item.loading {
    opacity: 0.6;
}

.photo-item.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #667eea;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

/* Image lazy loading */
.photo-image img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-image img.loaded {
    opacity: 1;
}

.photo-image img.error {
    opacity: 0.5;
    filter: grayscale(100%);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    .photo-card {
        border: 2px solid #ffffff;
    }
    
    .filter-btn {
        border-width: 3px;
    }
    
    .lightbox {
        background: rgba(0, 0, 0, 0.98);
    }
}

/* Focus styles for accessibility */
.photo-card:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.filter-btn:focus,
.view-btn:focus,
.action-btn:focus,
.lightbox-close:focus,
.nav-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .filter-controls,
    .lightbox,
    .footer {
        display: none !important;
    }
    
    .photos-gallery {
        column-count: 2 !important;
    }
    
    .photo-card {
        break-inside: avoid;
        background: white !important;
        color: black !important;
    }
}