/* ShowMyAura Portfolio Showcase — Frontend CSS v6.0 */

/* ════════════════════════════════════════════════════════
   BASE WRAPPER
════════════════════════════════════════════════════════ */
.sma-gallery-wrap {
    --sma-primary: #6366f1;
    --sma-secondary: #8b5cf6;
    --gradient: linear-gradient(135deg,#6366f1,#8b5cf6);
    --hover-opacity-default: 0.4;
    --hover-opacity-hover: 0.9;
    --hover-speed: 0.6s;
    --image-scroll-speed: 4s;
    --cols: 3;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    width: 100%;
    position: relative;
}

/* ── Category Filters ── */
.sma-category-filters {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 28px;
}
.sma-cat-btn {
    background: transparent;
    border: 2px solid #e2e8f0;
    padding: 7px 18px; border-radius: 50px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    color: #64748b; transition: all .22s;
    line-height: 1;
}
.sma-cat-btn:hover { border-color: var(--sma-primary); color: var(--sma-primary); }
.sma-cat-btn.active {
    background: var(--gradient); border-color: transparent;
    color: #fff; box-shadow: 0 4px 14px rgba(99,102,241,.3);
}

/* ── Dark mode ── */
.sma-gallery-wrap.theme-dark { --bg: #0f172a; --card-bg: #1e293b; --text: #f1f5f9; --sub: #94a3b8; }
.sma-gallery-wrap.theme-dark .sma-cat-btn { border-color: #334155; color: #94a3b8; }
.sma-gallery-wrap.theme-dark .sma-cat-btn:hover { border-color: var(--sma-primary); color: #fff; }
.sma-gallery-wrap.theme-dark .smaps-sg-footer { background: #1e293b; }
.sma-gallery-wrap.theme-dark .smaps-sg-footer-title { color: #f1f5f9; }
.sma-gallery-wrap.theme-dark .smaps-sg-footer-cat { color: #64748b; }
.sma-gallery-wrap.theme-dark .smaps-sg-footer-date { color: #475569; }

/* ── Image scroll container ── */
.sma-img-scroll-box {
    width: 100%; height: 100%; overflow: hidden;
    position: relative;
}
.sma-scroll-img {
    width: 100%; height: auto; display: block;
    transform: translateY(0);
    /* Scroll only triggers on hover of the .sma-card */
    will-change: transform;
}
/* When taller than box and card is hovered */
.sma-img-scroll-box.can-scroll .sma-scroll-img {
    transition: transform var(--image-scroll-speed, 4s) ease-in-out;
}
.sma-card:hover .sma-img-scroll-box.can-scroll .sma-scroll-img {
    transform: translateY(var(--sd, 0px));
}

/* ── Curtain + Shine ── */
.sma-curtain {
    position: absolute; inset: 0;
    background: rgba(0,0,0, var(--hover-opacity-default, 0.4));
    transition: background var(--hover-speed,.6s) ease;
    pointer-events: none; z-index: 1;
}
.sma-card:hover .sma-curtain {
    background: rgba(0,0,0, var(--hover-opacity-hover, 0.9));
}
.sma-shine {
    position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.08) 40%, transparent 60%);
    transform: translateX(-100%);
    transition: transform .6s ease;
    pointer-events: none; z-index: 2;
}
.sma-card:hover .sma-shine { transform: translateX(100%); }

/* ── Backlink ── */
.sma-backlink-wrap { text-align: center; margin-top: 24px; }
.sma-backlink {
    font-size: 11px; color: #94a3b8; text-decoration: none;
    border: 1px solid #e2e8f0; border-radius: 20px;
    padding: 4px 12px; transition: color .2s;
}
.sma-backlink:hover { color: var(--sma-primary); }

/* ════════════════════════════════════════════════════════
   LAYOUT 1: SMART MASONRY
════════════════════════════════════════════════════════ */
.smaps-masonry-wrap {
    display: flex; gap: 16px; align-items: flex-start;
}
.smaps-masonry-col {
    flex: 1; display: flex; flex-direction: column; gap: 16px;
}
.smaps-masonry-card {
    position: relative; border-radius: 16px;
    overflow: hidden; cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    transition: transform .3s ease, box-shadow .3s ease;
    background: #f1f5f9;
}
.smaps-masonry-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,.18);
}
.smaps-masonry-media {
    position: relative; width: 100%;
    min-height: 200px;
}
.smaps-masonry-media video {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.smaps-masonry-media .sma-img-scroll-box {
    min-height: 200px;
}

/* Card overlay (title + CTA) */
.smaps-card-overlay {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: flex-start; justify-content: flex-end;
    padding: 20px 18px; z-index: 3;
    opacity: 0; transition: opacity var(--hover-speed,.6s) ease;
}
.smaps-masonry-card:hover .smaps-card-overlay { opacity: 1; }
.smaps-card-cat {
    font-size: 10px; font-weight: 800; letter-spacing: 1.2px;
    text-transform: uppercase; color: var(--sma-primary);
    background: rgba(255,255,255,.9); border-radius: 20px;
    padding: 3px 10px; margin-bottom: 8px;
    display: inline-block;
}
.smaps-card-overlay h3 {
    font-size: 16px; font-weight: 800; color: #fff;
    margin: 0 0 12px; line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.smaps-view-pill {
    background: var(--gradient); color: #fff;
    font-size: 12px; font-weight: 700; padding: 6px 16px;
    border-radius: 50px; letter-spacing: .3px;
    box-shadow: 0 4px 14px rgba(99,102,241,.4);
}

/* ════════════════════════════════════════════════════════
   LAYOUT 2: SWIPE SLIDER
════════════════════════════════════════════════════════ */
.smaps-slider-wrap { position: relative; }
.smaps-swiper { opacity: 0; transition: opacity .4s; border-radius: 20px; overflow: hidden; }
.swiper-slide.smaps-slide {
    display: flex; min-height: 420px;
    border-radius: 20px; overflow: hidden;
    background: #0f172a;
}
.smaps-slide-image {
    flex: 0 0 55%; position: relative; overflow: hidden;
    min-height: 420px;
}
.smaps-slide-image .sma-img-scroll-box { height: 100%; min-height: 420px; }
.smaps-slide-image video { width: 100%; height: 100%; object-fit: cover; }
.smaps-slide-zoom {
    position: absolute; top: 14px; right: 14px; z-index: 4;
    background: rgba(255,255,255,.15); backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.25); border-radius: 50%;
    width: 36px; height: 36px; cursor: pointer; color: #fff;
    font-size: 16px; display: flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.smaps-slide-zoom:hover { background: rgba(255,255,255,.3); }
.smaps-slide-details {
    flex: 1; padding: 36px 32px; display: flex;
    flex-direction: column; justify-content: center;
    background: #0f172a; color: #f1f5f9;
}
.smaps-slide-cat {
    font-size: 10px; font-weight: 800; letter-spacing: 1.5px;
    text-transform: uppercase; color: var(--sma-primary);
    margin-bottom: 10px; display: block;
}
.smaps-slide-title {
    font-size: 22px; font-weight: 800; color: #fff;
    margin: 0 0 14px; line-height: 1.3;
}
.smaps-slide-meta {
    font-size: 13px; color: #94a3b8; margin-bottom: 6px;
}
.smaps-slide-desc {
    font-size: 14px; color: #94a3b8; line-height: 1.7;
    margin: 12px 0 16px;
}
.smaps-slide-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.smaps-tag {
    background: rgba(99,102,241,.15); color: var(--sma-primary);
    font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px;
}
.smaps-slide-btn {
    align-self: flex-start; background: var(--gradient); color: #fff;
    border: none; padding: 11px 24px; border-radius: 50px;
    font-size: 13px; font-weight: 700; cursor: pointer;
    transition: opacity .2s, transform .2s;
}
.smaps-slide-btn:hover { opacity: .88; transform: translateY(-2px); }
.smaps-slider-pagination { text-align: center; padding: 14px 0 0; }
.smaps-slider-pagination .swiper-pagination-bullet {
    width: 8px; height: 8px; background: #cbd5e1; opacity: 1;
    transition: background .3s, transform .3s;
}
.smaps-slider-pagination .swiper-pagination-bullet-active {
    background: var(--sma-primary); transform: scale(1.3);
}
.smaps-slider-nav {
    display: flex; gap: 10px; justify-content: center; margin-top: 16px;
}
.smaps-nav-btn {
    width: 44px; height: 44px; border-radius: 50%;
    background: #fff; border: 2px solid #e2e8f0;
    cursor: pointer; font-size: 18px; font-weight: 700; color: #1e293b;
    display: flex; align-items: center; justify-content: center;
    transition: all .22s; box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.smaps-nav-btn:hover {
    background: var(--sma-primary); color: #fff; border-color: var(--sma-primary);
    box-shadow: 0 6px 20px rgba(99,102,241,.3);
}
.sma-gallery-wrap.theme-dark .smaps-nav-btn { background: #1e293b; border-color: #334155; color: #f1f5f9; }
.sma-gallery-wrap.theme-dark .smaps-nav-btn:hover { background: var(--sma-primary); }

/* ════════════════════════════════════════════════════════
   LAYOUT 3: SPOTLIGHT GRID
════════════════════════════════════════════════════════ */
.smaps-spotlight-grid {
    display: grid;
    grid-template-columns: repeat(var(--sg-cols, 3), 1fr);
    gap: 20px;
}
.smaps-sg-card {
    border-radius: 16px; overflow: hidden;
    background: #f8fafc; cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
    transition: transform .3s ease, box-shadow .3s ease;
    display: flex; flex-direction: column;
}
.smaps-sg-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,.15);
}
.smaps-sg-media {
    position: relative; overflow: hidden;
    aspect-ratio: 4/3;
}
.smaps-sg-media .sma-img-scroll-box { height: 100%; }
.smaps-sg-media video { width: 100%; height: 100%; object-fit: cover; }
/* Spotlight overlay */
.smaps-sg-overlay {
    position: absolute; inset: 0; z-index: 3;
    background: var(--gradient);
    opacity: 0; transition: opacity .3s ease;
    display: flex; align-items: flex-end; padding: 20px;
}
.smaps-sg-card:hover .smaps-sg-overlay { opacity: 0.92; }
.smaps-sg-overlay-inner {
    transform: translateY(12px);
    transition: transform .3s ease;
}
.smaps-sg-card:hover .smaps-sg-overlay-inner { transform: translateY(0); }
.smaps-sg-cat {
    font-size: 10px; font-weight: 800; letter-spacing: 1.4px;
    text-transform: uppercase; color: rgba(255,255,255,.75);
    display: block; margin-bottom: 6px;
}
.smaps-sg-title {
    font-size: 16px; font-weight: 800; color: #fff;
    margin: 0 0 10px; line-height: 1.3;
}
.smaps-sg-tags {
    display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px;
}
.smaps-sg-tags span {
    background: rgba(255,255,255,.2); color: #fff;
    font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px;
}
.smaps-sg-cta {
    font-size: 12px; font-weight: 800; color: #fff;
    background: rgba(255,255,255,.2); padding: 6px 14px;
    border-radius: 50px; display: inline-block; letter-spacing: .3px;
}
.smaps-sg-footer {
    padding: 14px 16px;
    display: flex; align-items: center; justify-content: space-between;
    background: #fff; border-top: 1px solid #f1f5f9;
}
.smaps-sg-footer-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.smaps-sg-footer-title {
    font-size: 14px; font-weight: 700; color: #0f172a;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.smaps-sg-footer-cat { font-size: 11px; color: #94a3b8; }
.smaps-sg-footer-date { font-size: 11px; color: #cbd5e1; flex-shrink: 0; }

/* ════════════════════════════════════════════════════════
   LIGHTBOX
════════════════════════════════════════════════════════ */
.sma-lightbox {
    position: fixed; inset: 0; z-index: 999999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity .28s ease;
}
.sma-lightbox.active { opacity: 1; pointer-events: all; }
body.sma-lb-open { overflow: hidden; }

.sma-lightbox-bg {
    position: absolute; inset: 0;
    background: rgba(5,5,15,.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}
.sma-lightbox-wrap {
    position: relative; z-index: 2;
    width: calc(100% - 40px); max-width: 980px;
    max-height: 90vh;
    transform: scale(.94) translateY(16px);
    transition: transform .3s ease;
}
.sma-lightbox.active .sma-lightbox-wrap { transform: scale(1) translateY(0); }

.sma-lightbox-inner {
    display: flex; background: #fff; border-radius: 20px;
    overflow: hidden; max-height: 85vh;
    transition: opacity .16s ease;
}
.sma-lightbox-inner.sma-lb-fade { opacity: 0; }

.sma-lightbox-close {
    position: absolute; top: -16px; right: -16px; z-index: 10;
    width: 40px; height: 40px; border-radius: 50%;
    background: #fff; border: none; cursor: pointer;
    font-size: 16px; color: #0f172a; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    transition: background .2s, transform .2s;
}
.sma-lightbox-close:hover { background: #fee2e2; transform: scale(1.1); }

.sma-lightbox-prev, .sma-lightbox-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 10; width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,.15); backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255,255,255,.25); color: #fff;
    font-size: 20px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.sma-lightbox-prev { left: -22px; }
.sma-lightbox-next { right: -22px; }
.sma-lightbox-prev:hover, .sma-lightbox-next:hover { background: rgba(255,255,255,.3); }

.sma-lightbox-media-col {
    flex: 0 0 52%; position: relative; background: #0f172a;
    overflow: hidden; max-height: 85vh;
}
.sma-lightbox-media-frame {
    width: 100%; height: 100%; display: flex;
    align-items: flex-start; /* show top of image */
    overflow: hidden;
}
.sma-lb-media { width: 100%; }

/* Lightbox image auto-scroll — top shown, hover scrolls */
.sma-lb-media .sma-img-scroll-box.sma-lb-imgbox {
    height: 100%; min-height: 300px; max-height: 75vh;
    overflow: hidden; display: block;
}
.sma-lb-media .sma-img-scroll-box.sma-lb-imgbox .sma-scroll-img {
    width: 100%; height: auto;
}

.sma-lightbox-info-col {
    flex: 1; padding: 36px 32px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 10px;
}
.sma-lb-category {
    font-size: 10px; font-weight: 800; letter-spacing: 1.5px;
    text-transform: uppercase; color: var(--sma-primary, #6366f1);
}
.sma-lb-title {
    font-size: 22px; font-weight: 800; color: #0f172a;
    margin: 0; line-height: 1.3;
}
.sma-lb-meta {
    display: flex; flex-wrap: wrap; gap: 12px;
    font-size: 13px; color: #64748b;
}
.sma-lb-tags {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.sma-tech-tag {
    background: #eef2ff; color: #6366f1;
    font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px;
}
.sma-lb-desc {
    font-size: 14px; color: #475569; line-height: 1.75; margin: 0;
}
.sma-lb-visit {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--gradient, linear-gradient(135deg,#6366f1,#8b5cf6));
    color: #fff; text-decoration: none;
    padding: 11px 24px; border-radius: 50px;
    font-size: 13px; font-weight: 700;
    box-shadow: 0 4px 16px rgba(99,102,241,.3);
    transition: opacity .2s, transform .2s;
    margin-top: 4px;
}
.sma-lb-visit:hover { opacity: .88; transform: translateY(-2px); color: #fff; }

/* ════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════ */

/* Masonry: 2 cols on tablet, 1 on mobile */
@media (max-width: 900px) {
    .smaps-masonry-wrap { gap: 12px; }
}
@media (max-width: 600px) {
    .smaps-masonry-wrap {
        display: block;
    }
    .smaps-masonry-col { display: block; }
    .smaps-masonry-card { margin-bottom: 14px; }
}

/* Slider: stack on mobile */
@media (max-width: 700px) {
    .swiper-slide.smaps-slide { flex-direction: column; min-height: auto; }
    .smaps-slide-image { flex: none; height: 260px; }
    .smaps-slide-image .sma-img-scroll-box { height: 260px; }
    .smaps-slide-details { padding: 22px 20px; }
    .smaps-slide-title { font-size: 18px; }
}

/* Spotlight grid: 2 cols tablet, 1 mobile */
@media (max-width: 900px) {
    .smaps-spotlight-grid { --sg-cols: 2 !important; gap: 14px; }
}
@media (max-width: 520px) {
    .smaps-spotlight-grid { --sg-cols: 1 !important; }
}

/* Lightbox: stack on mobile */
@media (max-width: 700px) {
    .sma-lightbox-inner { flex-direction: column; }
    .sma-lightbox-media-col { flex: none; max-height: 260px; }
    .sma-lightbox-info-col { padding: 22px 20px; }
    .sma-lightbox-prev { left: -10px; }
    .sma-lightbox-next { right: -10px; }
    .sma-lightbox-close { top: -12px; right: -8px; }
}
@media (max-width: 480px) {
    .sma-lightbox-wrap { width: calc(100% - 20px); }
    .sma-lb-title { font-size: 18px; }
}

/* Error / empty states */
.sma-error, .sma-empty {
    padding: 40px; text-align: center;
    background: #f8fafc; border-radius: 16px;
    color: #94a3b8; font-size: 14px;
}
