/**
 * Category Hero Gallery - Frontend Styles
 */

.chg-hero-gallery {
    width: 100%;
    margin: 0 auto;
    padding: 20px 0;
}

.chg-grid {
    display: grid;
    grid-template-columns: repeat(var(--chg-columns, 4), 1fr);
    gap: 20px;
    padding: 0;
    margin: 0;
}

/* Responsive Grid */
@media (max-width: 1200px) {
    .chg-grid-6-cols {
        grid-template-columns: repeat(4, 1fr);
    }
    .chg-grid-5-cols {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .chg-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .chg-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .chg-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
}

.chg-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    height: var(--chg-height, 300px);
}

.chg-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.chg-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.chg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.5s ease;
    display: block;
}

.chg-placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.chg-placeholder-image::before {
    content: '📷';
    font-size: 60px;
    opacity: 0.5;
}

.chg-no-image .chg-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.8) 100%);
}

.chg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
    transition: opacity 0.3s ease;
}

.chg-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px 20px;
    z-index: 2;
    color: #fff;
    text-align: center;
}

.chg-title {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.chg-count {
    display: inline-block;
    font-size: 14px;
    opacity: 0.9;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

/* Hover Effects */
.chg-hover-zoom .chg-item:hover .chg-image {
    transform: scale(1.1);
}

.chg-hover-fade .chg-item:hover .chg-overlay {
    opacity: 0.5;
}

.chg-hover-fade .chg-item:hover .chg-image {
    opacity: 0.8;
}

.chg-hover-lift .chg-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.chg-hover-lift .chg-item:hover .chg-title {
    transform: translateY(-5px);
}

.chg-hover-zoom .chg-item:hover,
.chg-hover-fade .chg-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Loading State */
.chg-hero-gallery.loading .chg-item {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Accessibility */
.chg-link:focus {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .chg-hero-gallery {
        page-break-inside: avoid;
    }
    
    .chg-item {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
}

