/* =========================================
   custom/projectgallary — style.css
   ========================================= */
/* ── Editor ── */
.projectgallary-editor-wrap {
    padding: 20px;
    background: #111;
    border-radius: 8px;
}
.pgal-editor-notice {
    font-size: 12px; color: #888; font-style: italic;
    margin-bottom: 16px; padding: 8px 12px;
    background: #1e1e1e; border-radius: 4px;
}
.pgal-preview-heading {
    color: #fff !important;
    font-size: 32px !important;
    margin: 0 0 20px !important;
    font-weight: 400;
}
.pgal-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.pgal-preview-item {
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #222;
}
.pgal-preview-item img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.pgal-preview-caption {
    font-size: 11px; color: #aaa;
    padding: 4px 6px; margin: 0;
    background: #1a1a1a;
}
.pgal-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #555;
    border: 1px dashed #333;
    border-radius: 8px;
    font-size: 14px;
}
.pgal-item-editor {
    padding: 12px;
    background: #1a1a1a;
    border-radius: 6px;
    margin-bottom: 12px;
    border: 1px solid #2a2a2a;
}
.pgal-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
    display: block;
}

/* ── Frontend: Section ── */
.projectgallary-section.proj-gallery-sec {
    padding: 0px 0 90px;
    background: #000;
}
.projectgallary-section .sh-container {
    max-width: 1280px;
    margin: 0 auto;
}

/* ── Header row: heading left, arrows right ── */
.projectgallary-section .pgal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    gap: 20px;
}
.projectgallary-section .gallery-heading {
    font-size: 48px;
    font-weight: 400;
    color: #fff;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -1px;
    flex: 1;
}

/* ── Arrow buttons ── */
.projectgallary-section .pgal-arrows {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.projectgallary-section .pgal-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 1;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease, opacity 0.25s ease;
    outline: none;
}
.projectgallary-section .pgal-arrow:hover {
    background: #e8176a;
    border-color: #e8176a;
    transform: scale(1.08);
}
.projectgallary-section .pgal-arrow svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

/* Arrows: 3 se zyada images = opacity 1, warna 0.5 (disabled) */
.projectgallary-section .pgal-arrows.is-disabled .pgal-arrow,
.projectgallary-section .pgal-arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
.projectgallary-section .pgal-arrows.is-disabled .pgal-arrow:hover {
    background: #1a1a1a;
    border-color: #333;
    transform: none;
}

/* ── Gallery grid (static — 3 or fewer) ── */
.projectgallary-section .gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ── Slider overrides ── */
/* Slick init hone se pehle ka layout (flash na ho) */
.projectgallary-section .pgal-slider:not(.slick-initialized) {
    display: flex !important;
    overflow: hidden;
    gap: 20px;
}
.projectgallary-section .pgal-slider:not(.slick-initialized) > .gallery-item {
    flex: 0 0 calc((100% - 40px) / 3);
}
@media (max-width: 900px) {
    .projectgallary-section .pgal-slider:not(.slick-initialized) > .gallery-item { flex-basis: calc((100% - 20px) / 2); }
}
@media (max-width: 580px) {
    .projectgallary-section .pgal-slider:not(.slick-initialized) > .gallery-item { flex-basis: 100%; }
}
.projectgallary-section .pgal-slider {
    display: block !important; /* slick takes over */
}
.projectgallary-section .pgal-slider .slick-track {
    display: flex;
    gap: 0;
}
.projectgallary-section .pgal-slider .slick-slide {
    padding: 0 10px;
    box-sizing: border-box;
}
.projectgallary-section .pgal-slider .slick-list {
    margin: 0 -10px;
    overflow: hidden;
}

/* ── Gallery item ── */
.projectgallary-section .gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    aspect-ratio: 4/3;
    display: block;
    text-decoration: none;
}
.projectgallary-section .gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.projectgallary-section .gallery-item:hover img {
    transform: scale(1.08);
}
.projectgallary-section .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.35s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.projectgallary-section .gallery-item:hover .overlay {
    background: rgba(0,0,0,0.22);
}
.projectgallary-section .overlay-icon {
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.3s ease, transform 0.3s ease;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    display: flex; align-items: center; justify-content: center;
}
.projectgallary-section .overlay-icon svg {
    width: 22px; height: 22px;
    stroke: #222; stroke-width: 1.8; fill: none;
}
.projectgallary-section .gallery-item:hover .overlay-icon {
    opacity: 1;
    transform: scale(1);
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .projectgallary-section .gallery-grid,
    .projectgallary-section .pgal-static-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .projectgallary-section .gallery-heading {
        font-size: 32px;
    }
}
@media (max-width: 580px) {
    .projectgallary-section .gallery-grid,
    .projectgallary-section .pgal-static-grid {
        grid-template-columns: 1fr;
    }
    .projectgallary-section .gallery-heading {
        font-size: 26px;
    }
    .projectgallary-section .pgal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
}