/**
 * Art Gallery Pro - Frontend Styles
 * Version 1.1.0 - Enhanced with animations
 */

/* Gallery Wrapper */
.agp-gallery-wrapper {
    width: 100%;
    max-width: 100%;
}

/* Gallery Header - Title + Filters */
.agp-gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.agp-gallery-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Filter Tabs */
.agp-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.agp-filter-btn {
    padding: 8px 16px;
    border: 1px solid #999;
    background: transparent;
    color: #666;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

/* Default hover/active - will be overridden by Elementor */
.agp-filter-btn:hover,
.agp-filter-btn.active {
    /* Colors controlled by Elementor category settings */
}

/* Gallery Grid */
.agp-gallery-grid {
    display: grid;
    gap: 20px;
}

.agp-columns-1 {
    grid-template-columns: 1fr;
}

.agp-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.agp-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.agp-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.agp-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.agp-columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Gallery Item */
.agp-gallery-item {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.agp-gallery-item.hidden {
    display: none;
}

.agp-gallery-item.fade-out {
    opacity: 0;
    transform: scale(0.95);
}

.agp-gallery-item.fade-in {
    opacity: 1;
    transform: scale(1);
}

/* Artwork Card */
.agp-artwork-card {
    display: flex;
    flex-direction: column;
}

/* Artwork Image Container */
.agp-artwork-image {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.agp-artwork-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease, filter 0.5s ease;
    position: relative;
    z-index: 1;
}

/* Image Zoom Effect - Contained in box */
.agp-artwork-card:hover .agp-artwork-image img {
    transform: scale(1.1);
}

/* Hover Overlay */
.agp-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 58, 26, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    padding: 20px;
    box-sizing: border-box;
    z-index: 10;
}

.agp-artwork-card:hover .agp-hover-overlay {
    opacity: 1;
    visibility: visible;
}

.agp-hover-text {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
    line-height: 1.5;
}

/* ===========================================
   HOVER ANIMATIONS
   =========================================== */

/* Zoom In Animation */
.agp-animation-zoom-in .agp-artwork-image:hover img {
    transform: scale(1.1);
}

/* Zoom Out Animation */
.agp-animation-zoom-out .agp-artwork-image img {
    transform: scale(1.1);
}
.agp-animation-zoom-out .agp-artwork-image:hover img {
    transform: scale(1);
}

/* Rotate Animation */
.agp-animation-rotate .agp-artwork-image:hover img {
    transform: rotate(3deg);
}

/* Rotate + Zoom Animation */
.agp-animation-rotate-zoom .agp-artwork-image:hover img {
    transform: scale(1.1) rotate(3deg);
}

/* Slide Up Animation */
.agp-animation-slide-up .agp-artwork-image:hover img {
    transform: translateY(-10px);
}

/* Slide Down Animation */
.agp-animation-slide-down .agp-artwork-image:hover img {
    transform: translateY(10px);
}

/* Blur Animation */
.agp-animation-blur .agp-artwork-image:hover img {
    filter: blur(3px);
}

/* Grayscale Animation */
.agp-animation-grayscale .agp-artwork-image img {
    filter: grayscale(0%);
}
.agp-animation-grayscale .agp-artwork-image:hover img {
    filter: grayscale(100%);
}

/* Sepia Animation */
.agp-animation-sepia .agp-artwork-image:hover img {
    filter: sepia(100%);
}

/* Brightness Animation */
.agp-animation-brightness .agp-artwork-image:hover img {
    filter: brightness(1.2);
}

/* Flash Animation */
@keyframes agp-flash {
    0% { opacity: 1; }
    25% { opacity: 0.5; }
    50% { opacity: 1; }
    75% { opacity: 0.5; }
    100% { opacity: 1; }
}
.agp-animation-flash .agp-artwork-image:hover img {
    animation: agp-flash 0.8s ease;
}

/* Shine Animation */
.agp-animation-shine .agp-artwork-image {
    position: relative;
}
.agp-animation-shine .agp-artwork-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    z-index: 10;
    transition: left 0.5s ease;
}
.agp-animation-shine .agp-artwork-image:hover::before {
    left: 100%;
}

/* ===========================================
   ARTWORK INFO
   =========================================== */

.agp-artwork-info {
    padding: 12px 0 0 0;
    transition: all 0.3s ease;
}

.agp-artist-name {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.agp-artwork-details {
    font-size: 12px;
    color: #666;
    margin: 0;
    line-height: 1.4;
    transition: color 0.3s ease;
}

/* Info Hover Effects */
.agp-artwork-card:hover .agp-artist-name {
    /* color controlled by Elementor */
}

.agp-artwork-card:hover .agp-artwork-details {
    /* color controlled by Elementor */
}

/* No Image Placeholder */
.agp-no-image {
    background: #eee;
    width: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

/* No Artworks Message */
.agp-no-artworks {
    text-align: center;
    color: #666;
    padding: 40px;
    grid-column: 1 / -1;
}

/* ===========================================
   RESPONSIVE STYLES
   =========================================== */

@media screen and (max-width: 1200px) {
    .agp-columns-6 {
        grid-template-columns: repeat(4, 1fr);
    }
    .agp-columns-5 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (max-width: 1024px) {
    .agp-columns-4,
    .agp-columns-5,
    .agp-columns-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .agp-columns-3,
    .agp-columns-4,
    .agp-columns-5,
    .agp-columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .agp-gallery-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .agp-filter-tabs {
        justify-content: flex-start;
    }
    
    .agp-filter-btn {
        padding: 6px 12px;
        font-size: 10px;
    }
    
    .agp-hover-text {
        font-size: 12px;
        letter-spacing: 1px;
    }
    
    .agp-artist-name {
        font-size: 13px;
    }
    
    .agp-artwork-details {
        font-size: 11px;
    }
    
    .agp-gallery-title {
        font-size: 20px;
    }
}

@media screen and (max-width: 480px) {
    .agp-columns-2,
    .agp-columns-3,
    .agp-columns-4,
    .agp-columns-5,
    .agp-columns-6 {
        grid-template-columns: 1fr;
    }
    
    .agp-gallery-grid {
        gap: 15px;
    }
    
    .agp-gallery-header {
        margin-bottom: 20px;
    }
    
    .agp-filter-tabs {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .agp-filter-btn {
        flex: 1;
        min-width: auto;
        text-align: center;
    }
    
    .agp-gallery-title {
        font-size: 18px;
    }
}

/* ===========================================
   ANIMATION ON LOAD
   =========================================== */

@keyframes agp-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.agp-gallery-item {
    animation: agp-fadeIn 0.6s ease forwards;
    opacity: 0;
}

.agp-gallery-item:nth-child(1) { animation-delay: 0.1s; }
.agp-gallery-item:nth-child(2) { animation-delay: 0.15s; }
.agp-gallery-item:nth-child(3) { animation-delay: 0.2s; }
.agp-gallery-item:nth-child(4) { animation-delay: 0.25s; }
.agp-gallery-item:nth-child(5) { animation-delay: 0.3s; }
.agp-gallery-item:nth-child(6) { animation-delay: 0.35s; }
.agp-gallery-item:nth-child(7) { animation-delay: 0.4s; }
.agp-gallery-item:nth-child(8) { animation-delay: 0.45s; }
.agp-gallery-item:nth-child(9) { animation-delay: 0.5s; }
.agp-gallery-item:nth-child(10) { animation-delay: 0.55s; }
.agp-gallery-item:nth-child(11) { animation-delay: 0.6s; }
.agp-gallery-item:nth-child(12) { animation-delay: 0.65s; }

/* Card hover effect */
.agp-artwork-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

.agp-artwork-card:hover {
    transform: translateY(-3px);
}
