/* =====================================================
   ОБЛОЖКА
   ===================================================== */
.wpgfe-gallery {
    position: relative;
    width: 100%;
    display: block;
}

.wpgfe-cover {
    position: relative;
    width: 100%;
    overflow: hidden;
    cursor: pointer;
    border-radius: 20px !important;
    outline: none;
    background: #000;
    isolation: isolate;
    display: block;
    line-height: 0;
    font-size: 0;
}

.wpgfe-cover-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center center;
    display: block;
    margin: 0; padding: 0; border: 0;
    transform: scale(1.001);
    transition: transform 0.6s ease;
    font-size: 16px;
}

.wpgfe-cover:hover .wpgfe-cover-img,
.wpgfe-cover:focus-visible .wpgfe-cover-img {
    transform: scale(1.04);
}

/* =====================================================
   ОВЕРЛЕЙ
   ===================================================== */
.wpgfe-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: transparent;
    transition: background 0.35s ease;
    font-size: 16px;
    line-height: normal;
}

/* =====================================================
   ПОЛОСА С ИНФО
   ===================================================== */
.wpgfe-info {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 18px 16px;
    background: rgba(0, 0, 0, 0.62);
    transition: background 0.35s ease;
}

.wpgfe-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wpgfe-title {
    font-size: 21px;
    font-weight: 400;
    color: #ffffff;
    line-height: 1.25;
    transition: color 0.3s ease, transform 0.35s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    font-family: 'Verdana Обычный', 'Verdana', sans-serif;
}

.wpgfe-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #ffffff;
    /* background: rgba(255, 255, 255, 0.18); */
    transition: color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.wpgfe-icon svg {
    width: 30px;
    height: 30px;
    display: block;
}

.wpgfe-desc {
    font-size: 12px;
    color: #ffffff;
    line-height: 1.5;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease,
                margin-top 0.35s ease;
    font-family: 'Verdana Обычный', 'Verdana', sans-serif;
}

/* =====================================================
   HOVER
   ===================================================== */
.wpgfe-cover:hover .wpgfe-overlay,
.wpgfe-cover:focus-visible .wpgfe-overlay {
    background: rgba(0, 0, 0, 0.75);
}

.wpgfe-cover:hover .wpgfe-info,
.wpgfe-cover:focus-visible .wpgfe-info {
    background: transparent;
}

.wpgfe-cover:hover .wpgfe-title,
.wpgfe-cover:focus-visible .wpgfe-title {
    color: #029044;
    transform: translateY(-2px);
}

.wpgfe-cover:hover .wpgfe-icon,
.wpgfe-cover:focus-visible .wpgfe-icon {
    color: #ffd400;
    background: rgba(255, 212, 0, 0.14);
    transform: scale(1.05);
}

.wpgfe-cover:hover .wpgfe-desc,
.wpgfe-cover:focus-visible .wpgfe-desc {
    max-height: 400px;
    opacity: 1;
    margin-top: 10px;
}

/* =====================================================
   ЛАЙТБОКС
   ===================================================== */
.wpgfe-lightbox {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999999;
    display: none;
    background: rgba(0, 0, 0, 0.75);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.wpgfe-lightbox.wpgfe-open {
    display: block;
    opacity: 1;
}

.wpgfe-lb-stage {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
    box-sizing: border-box;
}

.wpgfe-lb-stage img {
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 20px;
    box-shadow: 0 15px 60px rgba(0, 0, 0, 0.7);
    user-select: none;
    -webkit-user-drag: none;
}

.wpgfe-lb-info {
    position: absolute;
    left: 200px;
    bottom: 30px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 20px 28px;
    max-width: 580px;
    z-index: 3;
    pointer-events: none;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.wpgfe-lb-info h3 {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 32px;
    color: #ffffff;
    margin: 0 0 8px;
    font-weight: 4700;
    line-height: 1.15;
    word-wrap: break-word;
}

.wpgfe-lb-info p {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 12px;
    color: #ffffff;
    margin: 0;
    line-height: 1.5;
    word-wrap: break-word;
}

.wpgfe-lb-close,
.wpgfe-lb-prev,
.wpgfe-lb-next {
    position: absolute;
    z-index: 4;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    padding: 0;
}

.wpgfe-lb-close:hover,
.wpgfe-lb-prev:hover,
.wpgfe-lb-next:hover {
    background: rgba(255, 255, 255, 0.25);
}

.wpgfe-lb-close { top: 20px; right: 20px; font-size: 30px; }
.wpgfe-lb-prev  { left: 20px;  top: 50%; transform: translateY(-50%); }
.wpgfe-lb-next  { right: 20px; top: 50%; transform: translateY(-50%); }

.wpgfe-lb-prev:hover { transform: translateY(-50%) scale(1.08); }
.wpgfe-lb-next:hover { transform: translateY(-50%) scale(1.08); }

.wpgfe-lightbox.wpgfe-single .wpgfe-lb-prev,
.wpgfe-lightbox.wpgfe-single .wpgfe-lb-next {
    display: none;
}

/* =====================================================
   АДАПТИВ
   ===================================================== */
@media (max-width: 767px) {
    .wpgfe-title { font-size: 16px; }
    .wpgfe-desc  { font-size: 13px; }
    .wpgfe-icon  { width: 30px; height: 30px; }
    .wpgfe-icon svg { width: 18px; height: 18px; }

    .wpgfe-lb-info {
        left: 15px;
        right: 15px;
        bottom: 15px;
        max-width: none;
        padding: 15px 18px;
    }
    .wpgfe-lb-info h3 { font-size: 22px; }
    .wpgfe-lb-info p  { font-size: 12px; }

    .wpgfe-lb-stage  { padding: 20px; }
    .wpgfe-lb-prev   { left: 10px; }
    .wpgfe-lb-next   { right: 10px; }
    .wpgfe-lb-close  { top: 10px; right: 10px; width: 42px; height: 42px; }
}