/* Inspired by reference gallery — cards, overlays, lightbox shell */

.project-card {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
    transform: translateY(-6px);
}

.image-wrapper {
    position: relative;
    overflow: hidden;
}

.project-card:hover .image-wrapper {
    box-shadow: 0 25px 50px -12px rgba(16, 185, 129, 0.15), 0 0 0 1px rgba(16, 185, 129, 0.05);
}

.image-wrapper img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .image-wrapper img,
.image-wrapper.group:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.image-wrapper:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay .eye-icon {
    transform: scale(0.8) translateY(10px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.image-wrapper:hover .gallery-overlay .eye-icon {
    transform: scale(1) translateY(0);
}

.gallery-overlay .view-text {
    transform: translateY(10px);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

.image-wrapper:hover .gallery-overlay .view-text {
    transform: translateY(0);
    opacity: 1;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
}

.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.35);
}

.btn-secondary {
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    border-color: #10b981;
    color: #059669;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Home lightbox (reference style) */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    position: relative;
    width: 100%;
    max-width: 1100px;
    padding: 0 4rem;
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-img {
    width: 100%;
    height: auto;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 1rem;
    box-shadow: 0 25px 80px -20px rgba(0, 0, 0, 0.5);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
    left: 1rem;
}

.lightbox-nav.next {
    right: 1rem;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.lightbox-counter {
    position: absolute;
    bottom: -3rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.1em;
}

.lightbox-thumbs {
    position: absolute;
    bottom: -6rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
}

.lightbox-thumb {
    width: 4rem;
    height: 3rem;
    border-radius: 0.5rem;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.lightbox-thumb:hover,
.lightbox-thumb.active {
    opacity: 1;
    border-color: #10b981;
    transform: translateY(-2px);
}

.portfolio-lightbox.is-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.portfolio-modal-swiper .swiper-button-prev,
.portfolio-modal-swiper .swiper-button-next {
    color: #fff;
}

.portfolio-modal-swiper .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.45;
}

.portfolio-modal-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: #10b981;
}

/* Rich-text description from admin TinyMCE */
.portfolio-description p {
    margin-bottom: 1rem;
}

.portfolio-description p:last-child {
    margin-bottom: 0;
}

.portfolio-description ul,
.portfolio-description ol {
    margin: 0 0 1rem 1.25rem;
    padding-left: 0.25rem;
}

.portfolio-description ul {
    list-style: disc;
}

.portfolio-description ol {
    list-style: decimal;
}

.portfolio-description a {
    color: #059669;
    text-decoration: underline;
}

.portfolio-description blockquote {
    margin: 0 0 1rem;
    padding-left: 1rem;
    border-left: 4px solid #e2e8f0;
    color: #475569;
}

/* Full-width banner — bottom-to-top reveal + image rise */
.hero-banner__mask {
    clip-path: inset(100% 0 0 0);
    animation: hero-mask-open 1.15s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    line-height: 0;
}

.hero-banner__img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    opacity: 0;
    transform: scale(1.07) translateY(5%);
    animation: hero-img-rise 1.28s cubic-bezier(0.22, 1, 0.36, 1) 0.08s forwards;
    will-change: transform, opacity;
}

.hero-banner__scroll-hint {
    opacity: 0;
    animation: hero-hint-fade 0.8s ease-out 0.85s forwards;
}

.hero-banner__dot {
    animation: hero-dot-bounce 2.2s ease-in-out infinite 1.4s;
}

@keyframes hero-mask-open {
    to {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes hero-img-rise {
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes hero-hint-fade {
    to {
        opacity: 1;
    }
}

@keyframes hero-dot-bounce {
    0%,
    100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(7px);
        opacity: 0.35;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-banner__mask,
    .hero-banner__img,
    .hero-banner__scroll-hint,
    .hero-banner__dot {
        animation: none !important;
        clip-path: inset(0 0 0 0) !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
