/* Moments Page Styles - Flat Design */

/* Moments Content Container */
.moments-content {
    padding: var(--spacing-xl) 0;
}

.moments-intro {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-lg);
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.moments-intro h2 {
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.moments-intro p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Tags Filter - Chip Style */
.tags-filter {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    align-items: center;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--background-secondary);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: var(--font-weight-medium);
    font-size: 0.9rem;
}

.tag-chip:hover {
    background: var(--primary-gold);
    color: var(--white);
    border-color: var(--primary-gold);
    transform: translateY(-2px);
}

.tag-chip.active {
    background: var(--primary-gold);
    color: var(--white);
    border-color: var(--primary-gold);
}

.tag-name {
    font-weight: var(--font-weight-medium);
}

.tag-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: var(--font-weight-semibold);
}

.tag-chip.active .tag-count {
    background: rgba(255, 255, 255, 0.3);
}

.tag-chip:not(.active) .tag-count {
    background: var(--primary-gold);
    color: var(--white);
}

/* Gallery Styles - Flat Design */
.moments-gallery {
    margin-bottom: var(--spacing-2xl);
}

.gallery-header {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.gallery-header h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    margin: 0;
}

/* Gallery Grid - Simple Grid Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}



/* Media Items - Flat Style */
.media-item {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-fast);
}

.media-item:hover {
    border-color: var(--primary-gold);
    background: var(--background-primary);
}

.media-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--background-secondary);
}

.media-thumbnail img,
.media-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-overlay {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    z-index: 2;
}

.media-type-icon {
    background: rgba(255, 255, 255, 0.9);
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    color: var(--primary-gold);
}

.media-type-svg {
    width: 1rem;
    height: 1rem;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.pdf-thumbnail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--primary-brown);
    color: var(--white);
}

.pdf-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.pdf-label {
    font-weight: var(--font-weight-semibold);
    font-size: 1rem;
    text-transform: uppercase;
}

.media-info {
    padding: var(--spacing-md);
}

.media-title {
    font-size: 1.1rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
}

.media-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: var(--spacing-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.media-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.media-date {
    background: var(--background-secondary);
    color: var(--text-secondary);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-weight: var(--font-weight-medium);
}

/* Loading States - Simple Style */
.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl);
    color: var(--text-secondary);
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top: 3px solid var(--primary-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-md);
}

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

.no-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl);
    color: var(--text-secondary);
    text-align: center;
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.no-media-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.6;
}

.no-media p {
    font-size: 1rem;
    color: var(--text-secondary);
}



/* Media Modal - Simple Style */
.media-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--spacing-lg);
}

.media-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.media-modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.media-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: #000;
}

.media-container img,
.media-container video {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.pdf-viewer {
    width: 80vw;
    height: 70vh;
    position: relative;
}

.pdf-viewer iframe {
    border: none;
}

.pdf-actions {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
}

.media-info {
    background: white;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.modal-media-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.modal-media-description {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.modal-media-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.media-type {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-weight: 500;
}

.media-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 var(--spacing-lg);
    pointer-events: none;
    z-index: 1002;
}

.nav-btn {
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .moments-intro {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-lg);
    }
    
    .moments-intro h2 {
        font-size: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .gallery-header {
        padding: var(--spacing-md);
    }
    
    .gallery-header h3 {
        font-size: 1.3rem;
        text-align: center;
    }
    
    .tags-filter {
        padding: var(--spacing-md);
        justify-content: center;
    }
    
    .media-modal {
        padding: var(--spacing-md);
    }
    
    .media-thumbnail {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .moments-intro h2 {
        font-size: 1.3rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .tags-filter {
        padding: var(--spacing-sm);
    }
    
    .tag-chip {
        font-size: 0.85rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    
    .media-thumbnail {
        height: 160px;
    }
    
    .media-info {
        padding: var(--spacing-sm);
    }
    
    .media-title {
        font-size: 1rem;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .video-play-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .media-modal-close {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .gallery-header h3 {
        font-size: 1.2rem;
    }
}

/* Focus states for accessibility */
.tag-chip:focus,
.media-item:focus {
    outline: 2px solid var(--primary-gold);
    outline-offset: 2px;
}
/*
 Image Loading and Error States */
.media-thumbnail img {
    transition: opacity 0.3s ease;
    background-color: #f5f5f5;
    background-image: 
        linear-gradient(45deg, #e0e0e0 25%, transparent 25%), 
        linear-gradient(-45deg, #e0e0e0 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #e0e0e0 75%), 
        linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.media-thumbnail img[src=""] {
    opacity: 0;
}

.media-thumbnail img:not([src]),
.media-thumbnail img[src=""] {
    opacity: 0;
    background-color: #f0f0f0;
}

.media-thumbnail img[alt*="Failed"] {
    border: 2px solid #ff6b6b !important;
    background-color: #ffe0e0 !important;
    position: relative;
}

.media-thumbnail img[alt*="Failed"]::after {
    content: "❌ Image failed to load";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    color: #d63031;
}

/* Loading placeholder */
.media-thumbnail .loading-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Error message styling */
.error-message {
    text-align: center;
    padding: var(--spacing-lg);
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    margin: var(--spacing-md) 0;
}

.error-message .error-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.error-message h3 {
    color: #dc2626;
    margin-bottom: var(--spacing-sm);
    font-weight: var(--font-weight-semibold);
}

.error-message p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.error-message button {
    background: #dc2626;
    color: var(--white);
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: var(--font-weight-medium);
}

.error-message button:hover {
    background: #b91c1c;
}/* Mo
ments CTA Section */
.moments-cta {
    text-align: center;
    padding: var(--spacing-2xl);
    background: var(--background-secondary);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-2xl);
}

.moments-cta h3 {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.moments-cta p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.primary-btn {
    background: var(--primary-gold);
    color: var(--white);
    border: none;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: var(--transition-fast);
}

.primary-btn:hover {
    background: var(--primary-gold-dark);
}

.btn-text {
    font-size: 1rem;
}

.btn-icon {
    font-size: 1.2rem;
}