@import url("../fonts/genericon/genericons.css");

/* =============================================================
   Custom Portfolio — portfolio.css
   Merged & cleaned from Nimble Portfolio 3.0.1 skin.css,
   nimble-portfolio.css, and genericons reference.
   ============================================================= */

/* ── Box sizing ─────────────────────────────────────────────── */
.-skin-default *,
.-skin-default *::before,
.-skin-default *::after {
    box-sizing: border-box;
}

/* ── Clearfix ────────────────────────────────────────────────── */
.-skin-default .-items,
.-skin-default .-filters,
.-skin-default .-pages {
    clear: both;
}

/* ── Filter buttons ──────────────────────────────────────────── */
.-skin-default .-filters .-filter,
.-skin-default .-pages .-page-link {
    display: inline-block;
    padding: 5px 14px;
    margin: 3px;
    border: 1px solid #ccc;
    border-radius: 3px;
    text-decoration: none;
    outline: none;
    cursor: pointer;
    transition: color .3s ease, background .3s ease, border-color .3s ease;
}

.-skin-default .-filters .-filter.active,
.-skin-default .-pages .-page-link.active {
    background: #eee;
}

.-skin-default .-filters {
    margin-bottom: 16px;
}

/* ── Items grid ──────────────────────────────────────────────── */
.-skin-default .-items {
    position: relative;
    width: 100%;
    overflow: hidden; /* clearfix for floated children */
}

/* Clearfix: ensures the container wraps floated items */
.-skin-default .-items::after {
    content: "";
    display: table;
    clear: both;
}

.-skin-default .-items .-item {
    float: left;
    width: 31.33%;
    margin: 1%;
}

.-skin-default .-items .-item.hidden {
    display: none;
    position: absolute;
}

/* ── Column variants ─────────────────────────────────────────── */
.-skin-default .-item.-columns2 { width: 48%;    }
.-skin-default .-item.-columns3 { width: 31.33%; }
.-skin-default .-item.-columns4 { width: 23%;    }
.-skin-default .-item.-columns5 { width: 18%;    }

.-skin-default .-item.-columns4 .-links a { font-size: 12px; }
.-skin-default .-item.-columns5 .-links a { font-size: 11px; }

/* ── Item box ────────────────────────────────────────────────── */
.-skin-default .-items .-item .itembox {
    width: 90%;
    border: 5px solid #fff;
    box-shadow: 3px 3px 5px #888;
    background: #fff;
    position: relative;
    margin: 0 auto;
    overflow: hidden;
}

.-skin-default .-items .-item .itembox img {
    vertical-align: middle;
    display: block;
    width: 100%;
    height: auto;
}

/* ── Normal / Square / Round styles ─────────────────────────── */
.-skin-default .-items .-item.-normal .itembox img {
    max-width: 100%;
}

.-skin-default .-items .-item.-square .itembox,
.-skin-default .-items .-item.-round  .itembox {
    padding-bottom: 90%;
    height: 0;
    overflow: hidden;
    box-sizing: content-box;
}

.-skin-default .-items .-item.-round .itembox {
    border-radius: 50%;
}

.-skin-default .-items .-item.-round .itembox .-mask {
    border-radius: 50%;
}

/* ── Hover overlay ───────────────────────────────────────────── */
.-skin-default .-items .-item .itembox .-mask,
.-skin-default .-items .-item .itembox .genericon {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.-skin-default .-items .-item .itembox .-mask {
    background: #000;
    opacity: .75;
}

.-skin-default .-items .-item .itembox:hover .-mask,
.-skin-default .-items .-item .itembox:hover .genericon,
.-skin-default .-items .-item .itembox:hover .title {
    display: block;
}

/* ── Genericon (hover icon) ──────────────────────────────────── */
.-skin-default .-items .-item .itembox .genericon {
    background: transparent;
    color: #fff;
    opacity: 1;
    width: 48px;
    height: 48px;
    top: 50%;
    left: 50%;
    margin: -24px 0 0 -24px;
    overflow: hidden;
}

.-skin-default .-items .-item .itembox .genericon::before {
    font-size: 48px;
}

.genericon::before {
    font-size: 100%;
}

/* ── Title ────────────────────────────────────────────────────── */
.-skin-default .-item .title {
    font-size: 16px;
    font-weight: bold;
    margin: 5px 0;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.-skin-default .-items .-item .itembox .title {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0 10px;
    white-space: normal;
    overflow: auto;
    color: #fff;
    z-index: 2;
}

/* ── Read More / View Project links ──────────────────────────── */
.-skin-default .-items .-item .-links {
    overflow: hidden;
}

.-skin-default .-items .-item .-links .-link {
    width: 50%;
    float: left;
    box-sizing: border-box;
    padding: 2% 0;
    text-align: center;
}

.-skin-default .-items .-item .-links .-link a {
    text-decoration: none;
}

.-skin-default .-items .-item .-links .-onlyonelink {
    width: 100%;
}

/* ── Separate gallery images (hidden — lightbox uses them) ───── */
.-skin-default .sep-gal-img {
    display: none;
}

/* ── Loading spinner ─────────────────────────────────────────── */
.nimble-portfolio.-isloading > * { visibility: hidden; }
.nimble-portfolio.-isloading    { position: relative;  }

.nimble-portfolio .-loading {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    background: rgba(0,0,0,0);
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s linear .2s, opacity .2s linear;
}

.nimble-portfolio.-isloading .-loading {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.nimble-portfolio .-loading .-loader,
.nimble-portfolio .-loading .-loader::before,
.nimble-portfolio .-loading .-loader::after {
    background: #fff;
    animation: cp-loadanim 1s infinite ease-in-out;
    width: 1em;
    height: 4em;
}

.nimble-portfolio .-loading .-loader::before,
.nimble-portfolio .-loading .-loader::after {
    position: absolute;
    top: 0;
    content: '';
}

.nimble-portfolio .-loading .-loader {
    text-indent: -9999em;
    margin: 8em auto;
    position: relative;
    font-size: 20px;
    transform: translateZ(0);
    animation-delay: -.16s;
}

.nimble-portfolio .-loading .-loader::before { left: -1.5em; animation-delay: -.32s; }
.nimble-portfolio .-loading .-loader::after  { left:  1.5em; }

@keyframes cp-loadanim {
    0%, 80%, 100% { box-shadow: 0 0 #fff;    height: 4em; }
    40%           { box-shadow: 0 -2em #fff;  height: 5em; }
}

/* ── Native lightbox overlay ─────────────────────────────────── */
.cp-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: cp-lb-fadein .2s ease;
}

@keyframes cp-lb-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.cp-lightbox-wrap {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cp-lightbox-wrap img,
.cp-lightbox-wrap iframe {
    max-width: 90vw;
    max-height: 80vh;
    border: 0;
    box-shadow: 0 4px 32px rgba(0,0,0,.6);
}

.cp-lightbox-caption {
    color: #ddd;
    margin-top: 10px;
    font-size: 14px;
    text-align: center;
}

.cp-lb-close {
    position: absolute;
    top: -36px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    padding: 0 6px;
}

.cp-lb-prev,
.cp-lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.4);
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 14px 18px;
    z-index: 100000;
    transition: background .2s;
}

.cp-lb-prev:hover, .cp-lb-next:hover { background: rgba(0,0,0,.7); }
.cp-lb-prev { left:  10px; }
.cp-lb-next { right: 10px; }

/* ── Recent items widget ─────────────────────────────────────── */
.cp-recent-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cp-recent-items li {
    margin-bottom: 10px;
}

.cp-recent-items li a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.cp-recent-items li img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    flex-shrink: 0;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media screen and (max-width: 768px) {
    .-skin-default .-items .-item.-columns4,
    .-skin-default .-items .-item.-columns5 {
        width: 48%;
    }
}

@media screen and (max-width: 480px) {
    .-skin-default .-items .-item,
    .-skin-default .-items .-item.-columns2,
    .-skin-default .-items .-item.-columns3,
    .-skin-default .-items .-item.-columns4,
    .-skin-default .-items .-item.-columns5 {
        width: 98%;
        margin: 1%;
    }
}
