/**
 * Pictures Page Styles
 * Modern, responsive design for greeting card pictures
 */

/* ==========================================================================
   Page Container
   ========================================================================== */

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

/* ==========================================================================
   Hero Section with Main Image
   ========================================================================== */

.picture-hero {
    background: linear-gradient(135deg, #2c4a68 0%, #5b7b9c 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.picture-hero-header {
    text-align: center;
    color: white;
    margin-bottom: 25px;
}

.picture-hero-header h1 {
    color: white !important;
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 600;
}

.picture-hero-header p {
    font-size: 16px;
    opacity: 0.95;
    margin: 5px 0;
}

.back-link {
    display: inline-block;
    color: white;
    text-decoration: none;
    margin-bottom: 15px;
    font-size: 16px;
    transition: opacity 0.2s;
}

.back-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Main Image Container */
.main-image-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.main-image-wrapper {
    position: relative;
    width: 100%;
    max-height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
}

.main-image-wrapper img {
    max-width: 100%;
    max-height: 600px;
    height: auto;
    width: auto;
    display: block;
    border-radius: 10px;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.main-image-wrapper img:hover {
    transform: scale(1.02);
}

.image-credit {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

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

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.action-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

.action-btn.download {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.action-btn.download:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.action-btn::before {
    font-size: 20px;
}

.action-btn.download::before {
    content: "⬇";
}

.action-btn.gallery::before {
    content: "🖼";
}

/* ==========================================================================
   Categories Section
   ========================================================================== */

.categories-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.categories-section h3 {
    color: #2c4a68;
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 600;
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-list li {
    display: inline-block;
}

.categories-list a {
    display: inline-block;
    padding: 8px 16px;
    background: #4c6a8a;
    color: white;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.categories-list a:hover {
    background: #3a5269;
    transform: translateY(-2px);
}

/* ==========================================================================
   Related Pictures Gallery
   ========================================================================== */

.related-pictures-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.related-pictures-section h4 {
    color: #2c4a68;
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 600;
}

.related-pictures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.picture-thumbnail {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.picture-thumbnail:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.picture-thumbnail.current {
    border: 3px solid #667eea;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #667eea;
}

.picture-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

.picture-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.picture-thumbnail:hover img {
    transform: scale(1.1);
}

/* ==========================================================================
   Lazy Loading Placeholder
   ========================================================================== */

.lazy-loading {
    position: relative;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

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

@media (max-width: 768px) {
    .pictures-page-container {
        padding: 15px 10px;
    }

    .picture-hero {
        padding: 20px 15px;
        border-radius: 15px;
    }

    .picture-hero-header h1 {
        font-size: 22px;
    }

    .main-image-container {
        padding: 15px;
    }

    .main-image-wrapper {
        max-height: 400px;
    }

    .related-pictures-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }

    .categories-section,
    .related-pictures-section {
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    .related-pictures-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }

    .picture-hero-header h1 {
        font-size: 20px;
    }
}

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

@media print {
    .action-buttons,
    .related-pictures-section,
    .categories-section {
        display: none !important;
    }

    .main-image-wrapper img {
        max-height: none;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states */
.action-btn:focus,
.picture-thumbnail a:focus,
.categories-list a:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* ==========================================================================
   Gallery View
   ========================================================================== */

.gallery-view {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.gallery-view h1 {
    color: #2c4a68;
    font-size: 28px;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 600;
}

.gallery-view p {
    text-align: center;
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 30px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item h3 {
    padding: 15px;
    margin: 0;
    font-size: 16px;
    color: #2c4a68;
    text-align: center;
    background: white;
    font-weight: 600;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }

    .gallery-view {
        padding: 20px 15px;
    }

    .gallery-view h1 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .gallery-item h3 {
        font-size: 14px;
        padding: 10px;
    }
}
