/* Simple Gallery Cards */

.sgc-gallery {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
    width: 100%;
}

/* WordPress block alignment support */
.wp-block-sgc-gallery.alignwide .sgc-gallery,
.wp-block-sgc-gallery.alignfull .sgc-gallery {
    width: 100%;
    max-width: none;
}

.wp-block-sgc-gallery.alignfull {
    margin-left: auto;
    margin-right: auto;
    max-width: none;
}

/* Desktop - Fixed columns */
.sgc-gallery[data-columns="1"] {
    grid-template-columns: 1fr;
}

.sgc-gallery[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.sgc-gallery[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.sgc-gallery[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.sgc-gallery[data-columns="5"] {
    grid-template-columns: repeat(5, 1fr);
}

.sgc-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sgc-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.sgc-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: #f0f0f0;
    cursor: pointer;
}

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

.sgc-card:hover .sgc-image img {
    transform: scale(1.05);
}

.sgc-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sgc-card:hover .sgc-overlay {
    opacity: 1;
}

/* Eye Icon with Glassmorphism */
.sgc-eye-icon {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    opacity: 0.8;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sgc-eye-icon:hover {
    opacity: 1;
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.25);
}

.sgc-eye-icon svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .sgc-eye-icon {
        top: 8px;
        left: 8px;
        padding: 4px 6px;
        opacity: 0.6;
    }

    .sgc-eye-icon svg {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 320px) {
    .sgc-eye-icon {
        display: none; /* Hide on very small screens */
    }
}

.sgc-content {
    padding: 1.5rem;
}

.sgc-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: #333;
}

.sgc-card h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
}

.sgc-card p {
    margin: 0;
    font-size: 0.95rem;
    color: #777;
    line-height: 1.6;
}

/* Lightbox */
.sgc-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sgc-lightbox.active {
    opacity: 1;
    visibility: visible;
}

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

.sgc-lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.sgc-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

.sgc-lightbox-close:hover {
    background: white;
    color: #333;
}

.sgc-lightbox-prev,
.sgc-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

.sgc-lightbox-prev {
    left: 20px;
}

.sgc-lightbox-next {
    right: 20px;
}

.sgc-lightbox-prev:hover,
.sgc-lightbox-next:hover {
    background: white;
    color: #333;
}

.sgc-lightbox-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 10000;
}

/* Tablet - Reduce columns */
@media (max-width: 1024px) {
    .sgc-gallery {
        gap: 1.5rem;
    }
    
    .sgc-gallery[data-columns="5"] {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .sgc-gallery[data-columns="4"] {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .sgc-gallery {
        gap: 1.5rem;
    }
    
    .sgc-gallery[data-columns="5"],
    .sgc-gallery[data-columns="4"],
    .sgc-gallery[data-columns="3"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sgc-card:hover {
        transform: translateY(-4px);
    }
    
    .sgc-lightbox-prev,
    .sgc-lightbox-next,
    .sgc-lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* Mobile - Single column */
@media (max-width: 480px) {
    .sgc-gallery {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }
    
    .sgc-content {
        padding: 1rem;
    }
    
    .sgc-card h3 {
        font-size: 1.1rem;
    }
}

