
.image-grid {
    display: grid;
    gap: 5px;
}

/* صورة واحدة */
.images-1 {
    grid-template-columns: 1fr;
}

/* صورتين */
.images-2 {
    grid-template-columns: 1fr 1fr;
}

/* 3 صور */
.images-3 {
    grid-template-columns: 2fr 1fr;
}
.images-3 .image-item:nth-child(1) {
    grid-row: span 2;
}

/* 4 صور */
.images-4 {
    grid-template-columns: 1fr 1fr;
}

/* أكثر من 4 */
.image-grid:not(.images-1):not(.images-2):not(.images-3):not(.images-4) {
    grid-template-columns: repeat(3, 1fr);
}

/* الصور */
.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.image-item {
    position: relative;
}

.faded-image {
    opacity: 0.3;
    filter: brightness(0.7);
}

.more-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.4);
    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 22px;
    font-weight: bold;
    border-radius: 10px;
}

.more-box {
    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0,0,0,0.6);
    color: white;

    font-size: 22px;
    font-weight: bold;
    border-radius: 10px;

    width: 100%;
    height: 100%;
}






.dashboard-workshops .row {
    margin: 0;
}

.dashboard-workshops .workshop-card {
    min-height: 26rem;
    display: flex;
    flex-direction: column;
}

.dashboard-workshops .workshop-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.dashboard-workshops .image-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.dashboard-workshops .image-item {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    border-radius: 0.75rem;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.dashboard-workshops .image-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dashboard-workshops .image-item.more-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(33, 37, 41, 0.08);
    color: #212529;
    font-weight: 700;
    font-size: 1.05rem;
    text-align: center;
    padding: 0.75rem;
    cursor: pointer;
}

.dashboard-workshops .image-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1100;
    padding: 1rem;
}

.dashboard-workshops .image-modal.open {
    display: flex;
}

.dashboard-workshops .image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    overflow: hidden;
    border-radius: 0.75rem;
}

.dashboard-workshops .image-modal-content img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 0.75rem;
}

.dashboard-workshops .image-modal-close,
.dashboard-workshops .image-modal-arrow {
    position: absolute;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    color: #212529;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.16);
}

.dashboard-workshops .image-modal-close {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 1rem;
}

.dashboard-workshops .image-modal-arrow {
    top: 50%;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.1rem;
    opacity: 0.9;
}

.dashboard-workshops .image-modal-arrow:hover {
    opacity: 1;
}

.dashboard-workshops .image-modal-prev {
    margin-left: 25px;
    left: -1.25rem;
}

.dashboard-workshops .image-modal-next {
    margin-right: 25px;
    right: -1.25rem;
}

.dashboard-workshops .image-counter {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10;
}

@media (max-width: 576px) {
    .dashboard-workshops .image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


.dashboard-workshops .workshop-details {
    flex: 1;
}

.dashboard-workshops .image-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.dashboard-workshops .image-item {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    border-radius: 0.75rem;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-workshops .image-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dashboard-workshops .image-item.more-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(33, 37, 41, 0.08);
    color: #212529;
    font-weight: 700;
    font-size: 1.05rem;
    text-align: center;
    padding: 0.75rem;
}

@media (max-width: 576px) {
    .dashboard-workshops .image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Mobile form styling - labels above inputs */
    .form-control-plaintext,
    .form-control {
        width: 100% !important;
    }

    .row > .col-sm-10:first-child {
        order: 2;
    }

    .row > .col-sm-2:last-child {
        order: 1;
        text-align: right !important;
        margin-bottom: 0.5rem;
    }
}

/* Card animations temporarily disabled for testing */
.workshop-card {
    /* transition: all 0.5s ease; */
}

.workshop-card:hover {
    /* transform: translateY(-5px); */
    /* box-shadow: 0 15px 30px rgba(0,0,0,0.15); */
}

.workshop-card .btn {
    /* transition: all 0.5s ease; */
}

.workshop-card .btn:hover {
    /* transform: translateY(-3px); */
    /* box-shadow: 0 8px 16px rgba(0,0,0,0.2); */
}

.adminAboutUs {
    text-align: right;
}

/* Remove border-radius from images and videos in welcome page only */
.gallery-workshops .video-item,
.gallery-workshops .image-item,
.gallery-workshops .more-box,
.gallery-workshops video,
.gallery-workshops img {
    border-radius: 0 !important;
}
.gallery-workshops .more-overlay {
    border-radius: 0 !important;
}

/* Reduce spacing between images and videos in gallery-workshops */
.gallery-workshops .video-grid,
.gallery-workshops .image-grid {
    gap: 4px;
    margin-bottom: 8px;
}

/* Fix more-overlay positioning for gallery-workshops */
.gallery-workshops .more-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gallery-workshops .more-box {
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

.gallery-workshops .image-item {
    position: relative !important;
    width: 100% !important;
    padding-top: 100% !important; /* enforce square tiles */
    overflow: hidden !important;
    display: block !important;
}

.gallery-workshops .image-item img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
