/* Scoped to avoid theme conflicts */
.wtp-portfolio-wrapper { width: 100%; margin: 0 auto; font-family: inherit; color: #0E1C2A; }
.wtp-portfolio-wrapper * { box-sizing: border-box; }

/* ── FILTERS ── */
.wtp-portfolio-wrapper .filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 32px 24px 0; }
.wtp-portfolio-wrapper .filter-btn { padding: 8px 22px; border-radius: 999px; font-size: 0.875rem; font-weight: 600; cursor: pointer; border: 2px solid #23456A; background: transparent; color: #23456A; transition: all 0.2s; }
.wtp-portfolio-wrapper .filter-btn:hover { transform: scale(1.05); }
.wtp-portfolio-wrapper .filter-btn.active { background: #F0B65A; border-color: #F0B65A; color: #0E1C2A; }

/* ── GRID ── */
.wtp-portfolio-wrapper .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; padding: 32px 24px 48px; }

/* ── CARD ── */
.wtp-portfolio-wrapper .card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(14,28,42,0.10);
    transition: box-shadow 0.3s, opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: scale(1);
}
.wtp-portfolio-wrapper .card:hover { box-shadow: 0 8px 32px rgba(14,28,42,0.18); }

/* Animation Classes */
.wtp-portfolio-wrapper .card.hide-animate { opacity: 0; transform: scale(0.95); pointer-events: none; }
.wtp-portfolio-wrapper .card.d-none { display: none; }

.wtp-portfolio-wrapper .card-img { position: relative; aspect-ratio: 4/3; overflow: hidden; cursor: pointer; }
.wtp-portfolio-wrapper .card-img img.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.wtp-portfolio-wrapper .card:hover .card-img img.cover { transform: scale(1.05); }

/* ── BEFORE/AFTER ── */
.wtp-portfolio-wrapper .ba-wrap { position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s; pointer-events: none; user-select: none; }
.wtp-portfolio-wrapper .card:hover .ba-wrap { opacity: 1; pointer-events: auto; }
.wtp-portfolio-wrapper .ba-after { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.wtp-portfolio-wrapper .ba-before-clip { position: absolute; inset: 0; overflow: hidden; z-index: 6; }
.wtp-portfolio-wrapper .ba-before { position: absolute; top: 0; left: 0; height: 100%; object-fit: cover; pointer-events: none; }

.wtp-portfolio-wrapper .ba-label { position: absolute; top: 8px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; z-index: 5; }
.wtp-portfolio-wrapper .ba-label-before { left: 8px; background: rgba(14,28,42,0.8); color: #fff; }
.wtp-portfolio-wrapper .ba-label-after { right: 8px; background: #F0B65A; color: #0E1C2A; }

.wtp-portfolio-wrapper .ba-line { position: absolute; top: 0; bottom: 0; width: 3px; background: #F0B65A; transform: translateX(-50%); z-index: 10; pointer-events: none; }
.wtp-portfolio-wrapper .ba-handle { position: absolute; top: 50%; width: 40px; height: 40px; background: #F0B65A; border: 3px solid #fff; border-radius: 50%; transform: translate(-50%, -50%); z-index: 20; cursor: ew-resize; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }

/* ── BUTTON OVERLAY ── */
.wtp-portfolio-wrapper .view-btn-wrap { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 20px; background: linear-gradient(to top, rgba(14,28,42,0.65) 0%, transparent 60%); opacity: 0; transition: opacity 0.3s; pointer-events: none; z-index: 30; }
.wtp-portfolio-wrapper .card:hover .view-btn-wrap { opacity: 1; }
.wtp-portfolio-wrapper .view-btn { pointer-events: auto; background: #F0B65A; color: #0E1C2A; border: none; border-radius: 999px; padding: 8px 22px; font-size: 0.875rem; font-weight: 700; cursor: pointer; transition: transform 0.2s; }
.wtp-portfolio-wrapper .view-btn:hover { transform: scale(1.06); }
.wtp-portfolio-wrapper .card-info { padding: 12px 16px; border-top: 1px solid #f0ece6; }
.wtp-portfolio-wrapper .card-info p { font-size: 0.875rem; font-weight: 600; color: #23456A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin:0;}
.wtp-portfolio-wrapper .card-info span { color: #6b7280; font-weight: 400; }

/* ── LIGHTBOX ── */
.wtp-portfolio-wrapper .lightbox { display: none; position: fixed; inset: 0; z-index: 999999 !important; background: rgba(14,28,42,0.88); backdrop-filter: blur(6px); align-items: center; justify-content: center; padding: 16px; }
.wtp-portfolio-wrapper .lightbox.open { display: flex; }

.wtp-portfolio-wrapper .lb-modal {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.35s ease;
    position: relative;
    z-index: 9999;
}

@keyframes modalIn { from { opacity:0; transform: translateY(30px) scale(0.97); } to { opacity:1; transform: none; } }
.wtp-portfolio-wrapper .lb-header { background: #23456A; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }

/* ── UPDATED TITLE STYLING ── */
.wtp-portfolio-wrapper .lb-header h2,
.et_pb_text_0 .wtp-portfolio-wrapper .lb-header #lb-title,
.et_pb_text_0 .wtp-portfolio-wrapper h2{
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    color: #fff !important;
    font-size: 1.125rem;
    line-height: 1.75rem;
    font-weight: 700;  /* Kept from previous to maintain visual scale, remove if not needed */
    letter-spacing: 0;
    text-transform: capitalize;
}

/* ── UPDATED LOCATION STYLING ── */
.wtp-portfolio-wrapper .lb-header p {
    font-family: -apple-system,system-ui,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;
    margin: 0;
    color: rgb(240, 182, 90);
    font-size: .875rem;
    line-height: 1.25rem;
    font-weight: 500;
    padding-bottom: 0 !important;
}

.wtp-portfolio-wrapper .lb-close { width:36px; height:36px; border-radius:50%; background:rgba(255,255,255,0.15); color:#fff; border:none; cursor:pointer; font-size:1.2rem; display:flex; align-items:center; justify-content:center; transition: transform 0.2s; line-height: 0; }
.wtp-portfolio-wrapper .lb-close:hover { transform: scale(1.1); }
.wtp-portfolio-wrapper .lb-main { position: relative; aspect-ratio: 16/9; background: #0E1C2A; flex-shrink: 0; }
.wtp-portfolio-wrapper .lb-main img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; animation: fadeImg 0.3s ease; }
@keyframes fadeImg { from { opacity:0; transform: scale(1.03); } to { opacity:1; transform: none; } }
.wtp-portfolio-wrapper .lb-arrow { position:absolute; top:50%; transform:translateY(-50%); width:40px; height:40px; background:rgba(240,182,90,0.95); color:#0E1C2A; border:none; border-radius:50%; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:1.2rem; z-index: 5; font-family: apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; line-height: 0;}
.wtp-portfolio-wrapper .lb-arrow:hover { transform: translateY(-50%) scale(1.1); }
.wtp-portfolio-wrapper .lb-prev { left: 12px; }
.wtp-portfolio-wrapper .lb-next { right: 12px; }
.wtp-portfolio-wrapper .lb-counter { position:absolute; bottom:10px; right:12px; background:rgba(14,28,42,0.75); color:#F0B65A; font-size:0.75rem; padding:3px 10px; border-radius:999px; }
.wtp-portfolio-wrapper .lb-thumbs { display:flex; gap:10px; padding:14px 18px; overflow-x:auto; background:#f6f1eb; flex-shrink:0; }
.wtp-portfolio-wrapper .lb-thumb { flex-shrink:0; width:72px; height:52px; border-radius:8px; overflow:hidden; border:2.5px solid transparent; cursor:pointer; }
.wtp-portfolio-wrapper .lb-thumb.active { border-color: #F0B65A; }
.wtp-portfolio-wrapper .lb-thumb img { width:100%; height:100%; object-fit:cover; }
.wtp-portfolio-wrapper .no-results { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: #6b7280; display: none; }

/* Theme Specific Overrides */
body.wtp-portfolio-gallery-open .et_pb_fullwidth_header .et_pb_fullwidth_header_container {
z-index: auto;
}

body.wtp-portfolio-gallery-open.page.et_pb_pagebuilder_layout #main-content {
    position: relative;
    z-index: 50;
}