/* ==================== JOURNEY GALLERY STYLES ==================== */

/* Profile Image Styles */
.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    transition: transform 0.3s ease;
    transform: scale(0.8);
}

.profile-avatar:hover .profile-image {
    transform: scale(0.85);
}

/* Journey Gallery Category Content */
.journey-gallery-content {
    padding: 20px 0;
    max-width: 100%;
}

.journey-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(234, 88, 12, 0.05));
    border-radius: 20px;
    border: 1px solid rgba(249, 115, 22, 0.2);
    position: relative;
    overflow: hidden;
}

.journey-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.03) 0%, transparent 70%);
    animation: journeyFloat 15s ease-in-out infinite alternate;
}

@keyframes journeyFloat {
    0% { transform: rotate(0deg) translate(0, 0); }
    100% { transform: rotate(10deg) translate(10px, -10px); }
}

.journey-icon {
    font-size: 48px;
    margin-bottom: 15px;
    animation: journeyBounce 2s ease-in-out infinite alternate;
}

@keyframes journeyBounce {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-5px); }
}

.journey-title {
    font-size: 28px;
    font-weight: 700;
    color: #e5e5e5;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.journey-subtitle {
    font-size: 16px;
    color: #a3a3a3;
    position: relative;
    z-index: 1;
}

/* Year Navigation */
.year-navigation {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.year-tab {
    padding: 10px 20px;
    background: rgba(64, 64, 64, 0.5);
    border: 1px solid #525252;
    border-radius: 25px;
    color: #a3a3a3;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.year-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.2), transparent);
    transition: left 0.5s ease;
}

.year-tab:hover {
    background: rgba(249, 115, 22, 0.1);
    border-color: #f97316;
    color: #f97316;
    transform: translateY(-2px);
}

.year-tab:hover::before {
    left: 100%;
}

.year-tab.active {
    background: linear-gradient(135deg, #f97316, #ea580c);
    border-color: #f97316;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(249, 115, 22, 0.3);
}

/* Photo Grid */
.photos-container {
    margin-top: 30px;
}

.year-section {
    margin-bottom: 40px;
    display: none;
}

.year-section.active {
    display: block;
}

.year-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(249, 115, 22, 0.3);
}

.year-number {
    font-size: 24px;
    font-weight: 700;
    color: #f97316;
    background: rgba(249, 115, 22, 0.1);
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.year-stats {
    font-size: 14px;
    color: #a3a3a3;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Photo Card */
.photo-card {
    background: rgba(64, 64, 64, 0.3);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #525252;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    backdrop-filter: blur(10px);
    aspect-ratio: 3/4; /* Portrait aspect ratio */
    display: flex;
    flex-direction: column;
}

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.2);
    border-color: #f97316;
}

.photo-wrapper {
    position: relative;
    width: 100%;
    flex: 1;
    overflow: hidden;
}

.photo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.photo-card:hover .photo-image {
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 60%,
        rgba(0, 0, 0, 0.7) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-card:hover .photo-overlay {
    opacity: 1;
}

.photo-info {
    padding: 16px;
    background: rgba(42, 42, 42, 0.9);
    flex-shrink: 0;
}

.photo-title {
    font-size: 15px;
    font-weight: 600;
    color: #e5e5e5;
    margin-bottom: 6px;
    line-height: 1.3;
}

.photo-description {
    font-size: 13px;
    color: #a3a3a3;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.photo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.photo-tag {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

/* Loading State */
.gallery-loading {
    text-align: center;
    padding: 60px 20px;
    color: #a3a3a3;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #404040;
    border-top: 3px solid #f97316;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.gallery-empty {
    text-align: center;
    padding: 60px 20px;
    color: #a3a3a3;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Gallery Stats */
.gallery-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    background: rgba(64, 64, 64, 0.3);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #525252;
    backdrop-filter: blur(10px);
    min-width: 120px;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #f97316;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #a3a3a3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Photo Modal */
.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
}

.photo-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: #2a2a2a;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #525252;
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(249, 115, 22, 0.8);
}

.modal-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    max-height: 70vh;
    padding: 20px;
    overflow: hidden;
}

.modal-image-container img {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-info {
    padding: 20px;
    border-top: 1px solid #525252;
    background: #202020;
}

.modal-info h3 {
    font-size: 20px;
    color: #e5e5e5;
    margin-bottom: 10px;
}

.modal-info p {
    font-size: 14px;
    color: #a3a3a3;
    line-height: 1.6;
    margin-bottom: 15px;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modal-navigation {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    background: #1a1a1a;
    border-top: 1px solid #525252;
}

.nav-button {
    background: rgba(64, 64, 64, 0.8);
    border: 1px solid #525252;
    border-radius: 8px;
    padding: 10px 15px;
    color: #e5e5e5;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.nav-button:hover:not(:disabled) {
    background: #f97316;
    border-color: #f97316;
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Gallery Error State */
.gallery-error {
    text-align: center;
    padding: 60px 20px;
    color: #a3a3a3;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ef4444;
}

.error-message {
    font-size: 16px;
    color: #a3a3a3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .journey-header {
        padding: 20px 15px;
    }
    
    .journey-icon {
        font-size: 36px;
    }
    
    .journey-title {
        font-size: 24px;
    }
    
    .gallery-stats {
        gap: 20px;
    }
    
    .stat-item {
        min-width: 100px;
        padding: 15px;
    }
    
    .year-navigation {
        gap: 10px;
    }
    
    .year-tab {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .photo-card {
        aspect-ratio: 3/4; /* Maintain portrait ratio */
    }
    
    .photo-info {
        padding: 12px;
    }
    
    .photo-title {
        font-size: 14px;
    }
    
    .photo-description {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }
    
    /* Modal adjustments for mobile */
    .modal-content {
        max-width: 90vw;
        max-height: 85vh;
        aspect-ratio: 3/4; /* Portrait modal on mobile */
    }
    
    .modal-image-container {
        padding: 15px;
    }
    
    .modal-info {
        padding: 15px;
    }
    
    .modal-info h3 {
        font-size: 18px;
    }
    
    .modal-info p {
        font-size: 13px;
    }
    
    .modal-navigation {
        padding: 10px 15px;
        flex-direction: row;
        gap: 10px;
    }
    
    .nav-button {
        flex: 1;
        justify-content: center;
        padding: 8px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .year-navigation {
        flex-direction: column;
        align-items: center;
    }
    
    .year-tab {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }
    
    .year-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
    
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    
    .photo-card {
        aspect-ratio: 3/4; /* Maintain portrait ratio */
    }
    
    .photo-info {
        padding: 10px;
    }
    
    .photo-title {
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    .photo-description {
        font-size: 11px;
        -webkit-line-clamp: 1;
        margin-bottom: 8px;
    }
    
    .photo-tag {
        font-size: 9px;
        padding: 2px 5px;
    }
    
    .modal-content {
        max-width: 95vw;
        max-height: 90vh;
        aspect-ratio: 3/4;
    }
    
    .modal-image-container {
        padding: 10px;
    }
    
    .modal-info {
        padding: 12px;
    }
    
    .modal-info h3 {
        font-size: 16px;
    }
    
    .modal-info p {
        font-size: 12px;
    }
    
    .nav-button {
        padding: 6px 10px;
        font-size: 12px;
    }
}