/* ========================================
   Memzo Gallery Premium - Wedding Gallery
   ======================================== */

/* CSS Variables for easy customization */
:root {
    --memzo-primary: #d4af37;
    --memzo-primary-dark: #b8941f;
    --memzo-secondary: #f8f5f0;
    --memzo-text: #2c2c2c;
    --memzo-text-light: #666;
    --memzo-white: #ffffff;
    --memzo-shadow: rgba(0, 0, 0, 0.1);
    --memzo-shadow-hover: rgba(0, 0, 0, 0.2);
    --memzo-overlay: rgba(0, 0, 0, 0.4);
    --memzo-gap: 8px;
    --memzo-radius: 8px;
    --memzo-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --memzo-bg: #1a1a1a;
    --memzo-bg-light: #2a2a2a;
}

/* ========================================
   Body Background (Dark Theme)
   ======================================== */

body {
    background: var(--memzo-bg);
}

/* ========================================
   Wrapper & Container
   ======================================== */

.memzo-gallery-wrapper {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 60px 20px 40px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--memzo-white);
    background: linear-gradient(180deg, var(--memzo-bg) 0%, var(--memzo-bg-light) 100%);
    min-height: 100vh;
}

/* ========================================
   Centered Header Section
   ======================================== */

.memzo-header-centered {
    text-align: center;
    margin-bottom: 50px;
}

.memzo-title {
    font-family: 'Playfair Display', serif;
    font-size: 64px;
    font-weight: 700;
    color: var(--memzo-primary);
    margin: 0 0 30px 0;
    letter-spacing: -1px;
}

.memzo-controls-centered {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Select Dropdown
   ======================================== */

.memzo-select {
    min-width: 180px;
    padding: 12px 40px 12px 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--memzo-white);
    background: var(--memzo-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--memzo-transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.2);
}

.memzo-select:hover {
    background: var(--memzo-primary-dark);
    box-shadow: 0 3px 8px rgba(212, 175, 55, 0.3);
    transform: translateY(-1px);
}

.memzo-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* ========================================
   Buttons
   ======================================== */

.memzo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--memzo-transition);
    white-space: nowrap;
}

.memzo-btn:hover {
    transform: translateY(-1px);
}

.memzo-btn:active {
    transform: translateY(0);
}

.memzo-btn svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.memzo-btn-upload {
    background: rgba(255, 255, 255, 0.08);
    color: var(--memzo-white);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.memzo-btn-upload:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* ========================================
   Status Messages
   ======================================== */

.memzo-status {
    padding: 16px 24px;
    margin-bottom: 30px;
    background: rgba(212, 175, 55, 0.15);
    border-left: 4px solid var(--memzo-primary);
    border-radius: var(--memzo-radius);
    color: var(--memzo-white);
    font-size: 15px;
    font-weight: 500;
}

/* ========================================
   Loading State
   ======================================== */

.memzo-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.memzo-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--memzo-primary);
    border-radius: 50%;
    animation: memzo-spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.memzo-loading p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    margin: 0;
}

/* ========================================
   Gallery Grid - Justified Layout
   ======================================== */

.memzo-gallery {
    display: flex;
    flex-direction: column;
    gap: var(--memzo-gap);
}

.memzo-row {
    display: flex;
    gap: var(--memzo-gap);
    width: 100%;
}

.memzo-photo {
    position: relative;
    overflow: hidden;
    border-radius: var(--memzo-radius);
    background: #f5f5f5;
    flex-shrink: 0;
    cursor: pointer;
    transition: var(--memzo-transition);
}

.memzo-photo:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px var(--memzo-shadow-hover);
    z-index: 10;
}

.memzo-photo-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.memzo-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--memzo-transition);
}

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

/* ========================================
   Photo Overlay
   ======================================== */

.memzo-photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--memzo-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--memzo-transition);
}

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

.memzo-zoom-icon {
    color: var(--memzo-white);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transform: scale(0.8);
    transition: var(--memzo-transition);
}

.memzo-photo:hover .memzo-zoom-icon {
    transform: scale(1);
}

/* ========================================
   Back Button
   ======================================== */

.memzo-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    color: var(--memzo-white);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--memzo-radius);
    cursor: pointer;
    transition: var(--memzo-transition);
    box-shadow: 0 2px 8px var(--memzo-shadow);
}

.memzo-back-btn:hover {
    border-color: var(--memzo-primary);
    background: rgba(212, 175, 55, 0.1);
    color: var(--memzo-primary);
    transform: translateX(-5px);
}

.memzo-back-btn svg {
    transition: var(--memzo-transition);
}

.memzo-back-btn:hover svg {
    transform: translateX(-3px);
}

/* ========================================
   Lightbox Customization
   ======================================== */

.lb-data .lb-details {
    font-family: 'Inter', sans-serif;
}

.lb-data .lb-caption {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 600;
}

.lb-data .lb-number {
    color: var(--memzo-primary);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
    .memzo-title {
        font-size: 56px;
    }
}

@media (max-width: 768px) {
    .memzo-gallery-wrapper {
        padding: 30px 15px;
    }
    
    .memzo-title {
        font-size: 42px;
        margin-bottom: 30px;
    }
    
    .memzo-header-centered {
        margin-bottom: 40px;
    }
    
    .memzo-controls-centered {
        gap: 15px;
    }
    
    .memzo-select {
        min-width: 150px;
        font-size: 15px;
        padding: 10px 35px 10px 18px;
    }
    
    .memzo-btn {
        font-size: 15px;
        padding: 10px 20px;
    }
    
    .memzo-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .memzo-photo:hover {
        transform: none;
    }
    
    .memzo-photo:hover .memzo-photo-img {
        transform: none;
    }
}

@media (max-width: 480px) {
    :root {
        --memzo-gap: 6px;
    }
    
    .memzo-title {
        font-size: 32px;
    }
    
    .memzo-controls-centered {
        gap: 12px;
    }
    
    .memzo-select {
        min-width: 130px;
        font-size: 14px;
        padding: 9px 32px 9px 16px;
    }
    
    .memzo-btn {
        padding: 9px 18px;
        font-size: 14px;
        gap: 6px;
    }
    
    .memzo-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* ========================================
   Animation Utilities
   ======================================== */

.memzo-photo {
    animation: memzo-fade-in 0.4s ease-out forwards;
}

@keyframes memzo-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .memzo-header,
    .memzo-back-btn,
    .memzo-photo-overlay {
        display: none !important;
    }
    
    .memzo-photo {
        break-inside: avoid;
    }
}

/* ========================================
   Custom Lightbox Design
   ======================================== */

.memzo-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: none;
}

.memzo-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
}

.memzo-lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.memzo-lightbox-top {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
}

.memzo-lightbox-counter {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 500;
}

.memzo-lightbox-actions {
    display: flex;
    gap: 15px;
    margin-left: auto;
}

.memzo-lb-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.memzo-lb-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Main Image Area */
.memzo-lightbox-main {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 80px;
    min-height: 0;
}

.memzo-lightbox-image-wrap {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#memzo-lb-image {
    max-width: 100%;
    max-height: calc(100vh - 300px);
    object-fit: contain;
    border-radius: 4px;
}

.memzo-lightbox-filename {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-top: 15px;
    text-align: center;
}

/* Navigation Arrows */
.memzo-lb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.8);
    z-index: 10;
}

.memzo-lb-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.memzo-lb-prev {
    left: 20px;
}

.memzo-lb-next {
    right: 20px;
}

/* Thumbnail Strip */
.memzo-lightbox-thumbs {
    position: relative;
    z-index: 10;
    padding: 20px 30px 30px;
    background: rgba(0, 0, 0, 0.3);
}

.memzo-lb-thumbs-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 10px 0;
}

/* Custom scrollbar */
.memzo-lb-thumbs-container::-webkit-scrollbar {
    height: 6px;
}

.memzo-lb-thumbs-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.memzo-lb-thumbs-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.memzo-lb-thumbs-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.memzo-lb-thumb {
    flex-shrink: 0;
    width: 100px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    opacity: 0.6;
}

.memzo-lb-thumb:hover {
    opacity: 1;
    transform: scale(1.05);
}

.memzo-lb-thumb.active {
    border-color: var(--memzo-primary);
    opacity: 1;
}

.memzo-lb-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .memzo-lightbox-top {
        padding: 15px 20px;
    }
    
    .memzo-lightbox-main {
        padding: 0 50px;
    }
    
    .memzo-lb-arrow {
        width: 40px;
        height: 40px;
    }
    
    .memzo-lb-prev {
        left: 10px;
    }
    
    .memzo-lb-next {
        right: 10px;
    }
    
    .memzo-lightbox-thumbs {
        padding: 15px 20px 20px;
    }
    
    .memzo-lb-thumb {
        width: 80px;
        height: 60px;
    }
    
    #memzo-lb-image {
        max-height: calc(100vh - 250px);
    }
}

@media (max-width: 480px) {
    .memzo-lightbox-main {
        padding: 0 40px;
    }
    
    .memzo-lb-arrow {
        width: 35px;
        height: 35px;
    }
    
    .memzo-lb-arrow svg {
        width: 24px;
        height: 24px;
    }
    
    .memzo-lightbox-counter {
        font-size: 14px;
    }
    
    .memzo-lb-btn {
        padding: 8px;
    }
    
    .memzo-lb-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .memzo-lb-thumb {
        width: 70px;
        height: 50px;
    }
}

