/* =========================================================
   Album Single
   ========================================================= */

.lwf-album-single {
    width: min(
        var(--site-max-width),
        calc(100% - (var(--site-side-space) * 2))
    );

    max-width: none;
    margin: 0 auto;

    padding: 48px 0 70px;
}


/* =========================================================
   Header
   ========================================================= */

.lwf-album-single-header {
    margin-bottom: 35px;

    text-align: center;
}

.lwf-album-single-header h1 {
    margin: 0 0 14px;

    color: #111827;

    font-size: 42px;
    line-height: 1.35;
    font-weight: 800;
}

.lwf-album-single-meta {
    display: flex;

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

    gap: 18px;

    color: #6b7280;

    font-size: 13px;
    font-weight: 600;
}

.lwf-album-single-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}


/* =========================================================
   Gallery
   ========================================================= */

.lwf-album-gallery {
    column-count: 3;
    column-gap: 5px;

    width: 100%;
}

.lwf-album-gallery-item {
    position: relative;

    display: block;

    width: 100%;

    margin: 0 0 5px;

    overflow: hidden;

    break-inside: avoid;

    background: #111827;

    text-decoration: none;

    border-radius: 6px;
}

.lwf-album-gallery-item img {
    display: block;

    width: 100%;
    height: auto;

    margin: 0;

    object-fit: contain;

    transition: transform .35s ease;
}

.lwf-album-gallery-item:hover img {
    transform: scale(1.025);
}


/* =========================================================
   Empty State
   ========================================================= */

.lwf-album-empty {
    padding: 80px 20px;

    text-align: center;
}

.lwf-album-empty-icon {
    margin-bottom: 15px;

    font-size: 44px;
}

.lwf-album-empty h2 {
    margin: 0;

    color: #111827;

    font-size: 22px;
    font-weight: 800;
}


/* =========================================================
   Description
   ========================================================= */

.lwf-album-description {
    max-width: 900px;

    margin: 40px auto 0;
    padding-top: 30px;

    border-top: 1px solid #e5e7eb;

    color: #374151;

    font-size: 15px;
    line-height: 1.9;

    text-align: right;
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {

    .lwf-album-gallery {
        column-count: 2;
    }

    .lwf-album-single-header h1 {
        font-size: 34px;
    }

}

@media (max-width: 600px) {

    .lwf-album-single {
        width: calc(100% - 24px);
        padding: 30px 0 45px;
    }

    .lwf-album-single-header {
        margin-bottom: 25px;
    }

    .lwf-album-single-header h1 {
        font-size: 27px;
    }

    .lwf-album-single-meta {
        gap: 12px;
        font-size: 12px;
    }

    .lwf-album-gallery {
        column-count: 2;
        column-gap: 5px;
    }

    .lwf-album-gallery-item {
        margin-bottom: 5px;
        border-radius: 5px;
    }

    .lwf-album-description {
        margin-top: 30px;
        padding-top: 24px;
    }

}

/* =========================================================
   Album Lightbox
   ========================================================= */

.lwf-album-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;

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

    padding: 30px;

    background: rgba(0, 0, 0, .96);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity .25s ease,
        visibility .25s ease;
}

.lwf-album-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

body.lwf-album-lightbox-open {
    overflow: hidden;
}


/* =========================================================
   Image
   ========================================================= */

.lwf-album-lightbox-content {
    position: relative;

    width: 100%;
    height: 100%;

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

.lwf-album-lightbox-image {
    display: block;
    max-width: calc(100vw - 160px);
    max-height: calc(100vh - 60px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 2px;

    clip-path: inset(0 0 0 0);
    transition: clip-path .35s ease;
}

.lwf-album-lightbox-image.is-changing {
    clip-path: inset(0 100% 0 0);
}

/* =========================================================
   Close
   ========================================================= */

.lwf-album-lightbox-close {
    position: absolute;

    top: 22px;
    right: 28px;

    z-index: 10;

    width: 42px;
    height: 42px;

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

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, .10);

    color: #fff;

    font-size: 30px;
    line-height: 1;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease;
}

.lwf-album-lightbox-close:hover {
    background: rgba(255, 255, 255, .20);

    transform: scale(1.05);
}


/* =========================================================
   Navigation
   ========================================================= */

.lwf-album-lightbox-prev,
.lwf-album-lightbox-next {
    position: absolute;

    top: 50%;

    z-index: 10;

    width: 48px;
    height: 48px;

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

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, .10);

    color: #fff;

    font-size: 22px;

    cursor: pointer;

    transform: translateY(-50%);

    transition:
        background .2s ease,
        transform .2s ease;
}

.lwf-album-lightbox-prev {
    left: 25px;
}

.lwf-album-lightbox-next {
    right: 25px;
}

.lwf-album-lightbox-prev:hover,
.lwf-album-lightbox-next:hover {
    background: rgba(255, 255, 255, .20);

    transform: translateY(-50%) scale(1.05);
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 600px) {

    .lwf-album-lightbox {
        padding: 15px;
    }

    .lwf-album-lightbox-image {
        max-width: calc(100vw - 30px);
        max-height: calc(100vh - 100px);
    }

    .lwf-album-lightbox-close {
        top: 14px;
        right: 14px;

        width: 38px;
        height: 38px;

        font-size: 27px;
    }

    .lwf-album-lightbox-prev,
    .lwf-album-lightbox-next {
        width: 42px;
        height: 42px;

        font-size: 19px;
    }

    .lwf-album-lightbox-prev {
        left: 12px;
    }

    .lwf-album-lightbox-next {
        right: 12px;
    }

}

.lwf-album-lightbox-prev svg,
.lwf-album-lightbox-next svg {
    width: 22px;
    height: 22px;
    display: block;
}

.lwf-album-lightbox-close svg {
    width: 22px;
    height: 22px;
    display: block;
}

/* ==========================================================================
   Latest Albums
   ========================================================================== */

.lwf-latest-albums-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.lwf-latest-albums-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

.lwf-latest-albums-header a {
    color: #006633;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.lwf-latest-albums-header a:hover {
    text-decoration: underline;
}

.lwf-latest-albums-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.lwf-latest-album-card {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 10px;
    text-decoration: none;
    color: #fff;
    background: #111827;
}

.lwf-latest-album-image {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.lwf-latest-album-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, .82) 0%,
            rgba(0, 0, 0, .35) 45%,
            rgba(0, 0, 0, 0) 75%
        );
}

.lwf-latest-album-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.lwf-latest-album-card:hover
.lwf-latest-album-image img {
    transform: scale(1.04);
}

.lwf-latest-album-info {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 2;
    padding: 18px;
}

.lwf-latest-album-info h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 16px;
    line-height: 1.55;
    font-weight: 700;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lwf-latest-album-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    color: rgba(255, 255, 255, .9);
    font-size: 12px;
    font-weight: 500;
}

/* شارة معرض الصور */

.lwf-latest-album-card::before {
    content: "معرض الصور";
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;

    padding: 5px 9px;
    border-radius: 5px;

  background: #087f3f;
    color: #ffffff;

    font-size: 11px;
    font-weight: 700;
}

/* أيقونة الصور */

.lwf-latest-album-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;

    width: 46px;
    height: 46px;

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

    border-radius: 50%;
    background: rgba(0, 0, 0, .42);
    color: #fff;

    transform: translate(-50%, -50%);
    opacity: 0;
    transition:
        opacity .25s ease,
        transform .25s ease;
}

.lwf-latest-album-icon svg {
    width: 22px;
    height: 22px;
}

.lwf-latest-album-card:hover
.lwf-latest-album-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {

    .lwf-latest-albums-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 600px) {

    .lwf-latest-albums {
        margin-top: 50px;
        padding-top: 28px;
    }

    .lwf-latest-albums-header h2 {
        font-size: 19px;
    }

    .lwf-latest-albums-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .lwf-latest-album-card {
        aspect-ratio: 16 / 10;
    }

}

.lwf-latest-albums {
    margin-top: 50px;
}

/* =========================================================
   French / LTR
   ========================================================= */

.lwf-album-single--fr {
    direction: ltr;
}

.lwf-album-single--fr .lwf-album-single-header {
    direction: ltr;
}

.lwf-album-single--fr .lwf-album-single-meta {
    direction: ltr;
}

.lwf-album-single--fr .lwf-album-description {
    text-align: left;
}

.lwf-album-single--fr .lwf-latest-albums {
    direction: ltr;
}

.lwf-album-single--fr .lwf-latest-albums-header h2 {
    text-align: left;
}

.lwf-album-single--fr .lwf-latest-album-info {
    text-align: left;
}

.lwf-album-single--fr .lwf-latest-album-card::before {
    content: "Galerie photos";
}