/* DP Gallery Frontend Styles - Modern Grid Layout */

.dp-gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.dp-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dp-gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: #fff;
    aspect-ratio: 1;
}

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

.dp-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

.dp-gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 20px 15px 15px;
    text-align: center;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.dp-gallery-item:hover .dp-gallery-overlay {
    transform: translateY(0);
}

.dp-gallery-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.dp-gallery-description {
    font-size: 14px;
    margin: 5px 0 0 0;
    opacity: 0.9;
    line-height: 1.2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dp-gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .dp-gallery-container {
        padding: 15px;
    }
    
    .dp-gallery-overlay {
        padding: 15px 12px 12px;
    }
    
    .dp-gallery-title {
        font-size: 14px;
    }
    
    .dp-gallery-description {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .dp-gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 12px;
    }
    
    .dp-gallery-container {
        padding: 10px;
    }
}

/* Loading Animation */
.dp-gallery-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.dp-gallery-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: dp-gallery-spin 1s linear infinite;
}

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

/* Filter Buttons */
.dp-gallery-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.dp-gallery-filter-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #495057;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
}

.dp-gallery-filter-btn:hover,
.dp-gallery-filter-btn.active {
    background: #007cba;
    border-color: #007cba;
    color: white;
}

/* Lightbox Styles */
.dp-gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.dp-gallery-lightbox.active {
    display: flex;
}

.dp-gallery-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.dp-gallery-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.dp-gallery-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Masonry Layout Alternative */
.dp-gallery-masonry {
    columns: 4;
    column-gap: 20px;
}

.dp-gallery-masonry .dp-gallery-item {
    break-inside: avoid;
    margin-bottom: 20px;
    display: block;
}

@media (max-width: 1200px) {
    .dp-gallery-masonry {
        columns: 3;
    }
}

@media (max-width: 768px) {
    .dp-gallery-masonry {
        columns: 2;
        column-gap: 15px;
    }
}

@media (max-width: 480px) {
    .dp-gallery-masonry {
        columns: 1;
    }
}

/* Category Tags */
.dp-gallery-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 124, 186, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    z-index: 2;
}

/* Loading Skeleton */
.dp-gallery-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: dp-gallery-skeleton-loading 1.5s infinite;
    border-radius: 12px;
    aspect-ratio: 1;
}

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

/* No Images Message */
.dp-gallery-no-images {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.dp-gallery-no-images h3 {
    margin-bottom: 10px;
    color: #333;
}

.dp-gallery-no-images p {
    margin: 0;
    font-size: 16px;
}

/* Hide PHP errors and debug output */
.dp-gallery-container * {
    box-sizing: border-box;
}

/* Remove any PHP error display */
.dp-gallery-container .php-error,
.dp-gallery-container .debug-output {
    display: none !important;
} 