/*------------------------------------------------------
[Gallery Stylesheet]

# Template Name:		Social Fantasy By 5iali
# Version:		1.5 - 2025 - Arabic Version
# Primary use:	Personal Page
# Author: 5iali.com - FAME MAKERS
# Template URI: https://5iali.com
------------------------------------------------------*/

.gallery-container-margin {
  margin-top: 20px
}
.gallery-container {
    max-width: 450px;
    margin: 10px auto 25px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 12px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 90px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.gallery-item:hover {
    transform: scale(1.05);
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.15);
}

.gallery-badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 4px;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    display: block;
}

.lightbox-caption {
    background: rgba(15, 15, 15, 0.5); /* خلفية شبه شفافة */
    color: white;
    width: 100%;
    padding: 10px 15px;
    border-radius: 0 0 8px 8px;
    text-align: center;
    font-size: 12px;
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lightbox-caption .title-row {
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-caption .title-row h3 {
    font-size: 14px;
    font-weight: 600;
    color: #3AA6B9;
    margin: 0;
}

.lightbox-caption .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2.5px;
}

.lightbox-caption .price {
    font-size: 14px;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.order-btn {
    display: inline-block;
    background: linear-gradient(to right, #3AA6B9, #2980b9);
    color: white;
    padding: 6px 10px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 5px;
}

.order-btn:hover {
    background: linear-gradient(to right, #2980b9, #3AA6B9);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    background: rgba(255,255,255,0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    transform: rotate(90deg);
    background: rgba(255,255,255,0.2);
}

.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    backdrop-filter: blur(2px);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.prev-btn:hover, .next-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Responsive */
@media (max-width: 480px) {
    .gallery-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .gallery-item {
        height: 85px;
    }
    .lightbox-caption .title-row h3 {
    font-size: 12px;
    }
}