/* Creart Gallery Frontend Styles */

/* Gallery Wrapper */
.creart-gallery-wrapper {
/*     margin: 20px 0; */
    margin: 0px 0;
    max-width: 100%;
}

.creart-gallery-title {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

/* Gallery Container */
.creart-gallery-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

/* Featured Image */
.creart-featured-image {
    position: relative;
    display: block;
    width: 100%;
}

.creart-gallery-featured-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

/* Hover Effects */
.creart-hover-zoom .creart-gallery-featured-img {
    transition: transform 0.3s ease;
}

.creart-hover-zoom:hover .creart-gallery-featured-img,
.creart-hover-zoom.creart-hover-active .creart-gallery-featured-img {
    transform: scale(1.05);
}

.creart-hover-fade .creart-gallery-featured-img {
    transition: opacity 0.3s ease;
}

.creart-hover-fade:hover .creart-gallery-featured-img,
.creart-hover-fade.creart-hover-active .creart-gallery-featured-img {
    opacity: 0.85;
}

.creart-hover-slide .creart-gallery-featured-img {
    transition: transform 0.3s ease;
}

.creart-hover-slide:hover .creart-gallery-featured-img,
.creart-hover-slide.creart-hover-active .creart-gallery-featured-img {
    transform: translateX(5px);
}

/* Gallery Overlay */
.creart-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.creart-gallery-container:hover .creart-gallery-overlay,
.creart-gallery-container.creart-hover-active .creart-gallery-overlay {
    opacity: 1;
}

.creart-gallery-overlay-content {
    text-align: center;
    color: white;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.creart-gallery-container:hover .creart-gallery-overlay-content,
.creart-gallery-container.creart-hover-active .creart-gallery-overlay-content {
    transform: translateY(0);
}

/* Gallery Icon */
.creart-gallery-icon {
    display: block;
    margin-bottom: 10px;
    opacity: 0.9;
}

.creart-gallery-icon svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Gallery Text */
.creart-gallery-text {
    display: block;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

/* Gallery Trigger Link */
.creart-gallery-trigger {
    text-decoration: none;
    color: inherit;
    display: block;
}

.creart-gallery-trigger:hover,
.creart-gallery-trigger:focus {
    text-decoration: none;
    color: inherit;
    outline: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .creart-gallery-wrapper {
        margin: 15px 0;
    }
    
    .creart-gallery-title {
        font-size: 1.25em;
        margin-bottom: 10px;
    }
    
    .creart-gallery-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .creart-gallery-text {
        font-size: 13px;
    }
    
    .creart-gallery-container:hover {
        transform: none;
    }
    
    .creart-gallery-overlay {
        opacity: 0.8;
    }
}

@media (max-width: 480px) {
    .creart-gallery-title {
        font-size: 1.1em;
    }
    
    .creart-gallery-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .creart-gallery-text {
        font-size: 12px;
    }
}

/* Touch Devices */
@media (hover: none) and (pointer: coarse) {
    .creart-gallery-container:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    
    .creart-gallery-overlay {
        opacity: 0.7;
        background: linear-gradient(
            135deg,
            rgba(0, 0, 0, 0.2) 0%,
            rgba(0, 0, 0, 0.4) 50%,
            rgba(0, 0, 0, 0.7) 100%
        );
    }
    
    .creart-gallery-overlay-content {
        transform: translateY(0);
    }
}

/* Gallery States */
.creart-gallery-loading {
    position: relative;
    pointer-events: none;
}

.creart-gallery-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: creart-gallery-spin 1s linear infinite;
    z-index: 10;
}

@keyframes creart-gallery-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Error State */
.creart-gallery-error {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-style: italic;
}

/* Accessibility */
.creart-gallery-trigger:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.creart-gallery-overlay {
    transition: opacity 0.3s ease, visibility 0.3s ease;
    visibility: hidden;
}

.creart-gallery-container:hover .creart-gallery-overlay,
.creart-gallery-container:focus-within .creart-gallery-overlay {
    opacity: 1;
    visibility: visible;
}

/* Screen Reader Text */
.creart-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .creart-gallery-title {
        color: #f0f0f1;
    }
    
    .creart-gallery-error {
        background: #2c3338;
        border-color: #3c434a;
        color: #a7aaad;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .creart-gallery-overlay {
        background: linear-gradient(
            135deg,
            rgba(0, 0, 0, 0.5) 0%,
            rgba(0, 0, 0, 0.8) 100%
        );
    }
    
    .creart-gallery-text {
        text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
    }
}

/* Animation Preferences */
@media (prefers-reduced-motion: reduce) {
    .creart-gallery-container,
    .creart-gallery-featured-img,
    .creart-gallery-overlay,
    .creart-gallery-overlay-content {
        transition: none;
    }
    
    .creart-gallery-container:hover {
        transform: none;
    }
    
    .creart-hover-zoom:hover .creart-gallery-featured-img,
    .creart-hover-zoom.creart-hover-active .creart-gallery-featured-img {
        transform: none;
    }
    
    .creart-gallery-loading::after {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .creart-gallery-overlay {
        display: none;
    }
    
    .creart-gallery-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .creart-gallery-wrapper {
        break-inside: avoid;
    }
} 