/* POS Installations Showcase */
.installations-section {
    background: linear-gradient(180deg, #f0f9ff 0%, #f8fafc 40%, #ffffff 100%);
    padding: 80px 0;
    overflow-x: hidden;
}

.installations-section .section-title {
    text-align: center;
    margin-bottom: 28px;
}

.inst-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 36px;
    padding: 0;
}

.inst-filter-btn {
    padding: 10px 20px;
    border: 2px solid #e2e8f0;
    background: #fff;
    border-radius: 30px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: 0.2s;
}

.inst-filter-btn:hover,
.inst-filter-btn.active {
    border-color: #0ea5e9;
    background: #0ea5e9;
    color: #fff;
}

.inst-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    width: 100%;
}

.inst-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 32px;
    padding: 0 16px;
}

.inst-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 24px;
    background: #0ea5e9;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    min-width: 110px;
}

.inst-page-btn:hover:not(:disabled) {
    background: #0369a1;
    transform: translateY(-1px);
}

.inst-page-btn:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.inst-page-info {
    font-size: 0.95rem;
    font-weight: 700;
    color: #475569;
    min-width: 64px;
    text-align: center;
}

.inst-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
}

.inst-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(14, 165, 233, 0.15);
}

@media (hover: none) {
    .inst-card:hover {
        transform: none;
        box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
    }
}

.inst-card.featured {
    border: 2px solid rgba(14, 165, 233, 0.25);
}

.inst-gallery {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #e0f2fe, #f1f5f9);
    overflow: hidden;
}

.inst-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.inst-card:hover .inst-gallery img {
    transform: scale(1.04);
}

.inst-gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    gap: 8px;
    font-size: 0.9rem;
}

.inst-gallery-placeholder i {
    font-size: 2.5rem;
    opacity: 0.5;
}

.inst-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
    opacity: 0;
    transition: 0.2s;
    z-index: 2;
}

.inst-card:hover .inst-gallery-nav,
.inst-gallery-nav:focus {
    opacity: 1;
}

.inst-gallery-nav.prev { left: 10px; }
.inst-gallery-nav.next { right: 10px; }

.inst-photo-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.inst-featured-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    z-index: 2;
}

.inst-body {
    padding: 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.inst-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #0ea5e9;
    background: rgba(14, 165, 233, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 10px;
    width: fit-content;
}

.inst-location i {
    font-size: 0.75rem;
}

.inst-business {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
    line-height: 1.35;
    word-break: break-word;
}

.inst-system {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 12px;
    line-height: 1.4;
}

.inst-system i {
    width: 28px;
    height: 28px;
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.inst-caption {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.65;
    margin-bottom: 14px;
    flex: 1;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.inst-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.inst-view-btn {
    padding: 8px 16px;
    background: #0ea5e9;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.inst-view-btn:hover {
    background: #0369a1;
}

/* Lightbox */
.inst-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.inst-lightbox.active {
    display: flex;
}

.inst-lightbox-inner {
    max-width: 900px;
    width: 100%;
    position: relative;
}

.inst-lightbox img {
    width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 12px;
}

.inst-lightbox-info {
    color: #fff;
    text-align: center;
    margin-top: 16px;
}

.inst-lightbox-info h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.inst-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

.inst-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}

.inst-lightbox-nav.prev { left: -60px; }
.inst-lightbox-nav.next { right: -60px; }

.inst-empty {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    grid-column: 1 / -1;
}

/* Mobile */
@media (max-width: 768px) {
    .installations-section {
        padding: 48px 0 56px;
    }

    .installations-section .section-title {
        font-size: 1.35rem;
        margin-bottom: 20px;
        padding: 0 8px;
    }

    .inst-filters {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: 0 0 20px;
        padding: 4px 0 10px;
    }

    .inst-filters::-webkit-scrollbar {
        display: none;
    }

    .inst-filter-btn {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 9px 14px;
        font-size: 0.8rem;
    }

    .inst-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .inst-card {
        border-radius: 16px;
    }

    .inst-gallery {
        aspect-ratio: 16 / 11;
    }

    .inst-gallery-nav {
        opacity: 1;
        width: 36px;
        height: 36px;
    }

    .inst-body {
        padding: 16px;
    }

    .inst-business {
        font-size: 1rem;
    }

    .inst-system {
        display: flex;
        align-items: flex-start;
        font-size: 0.75rem;
    }

    .inst-caption {
        font-size: 0.84rem;
        line-height: 1.55;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .inst-location {
        font-size: 0.78rem;
        padding: 5px 12px;
        max-width: 100%;
    }

    .inst-featured-badge {
        font-size: 0.68rem;
        padding: 4px 10px;
    }

    .inst-pagination {
        gap: 12px;
        margin-top: 24px;
        padding: 0 8px;
    }

    .inst-page-btn {
        flex: 1;
        min-width: 0;
        max-width: 140px;
        padding: 14px 16px;
        font-size: 0.88rem;
        border-radius: 10px;
        min-height: 50px;
    }

    .inst-page-info {
        font-size: 0.88rem;
        flex-shrink: 0;
    }

    .inst-view-btn {
        padding: 10px 14px;
        font-size: 0.78rem;
        width: 100%;
        justify-content: center;
    }

    .inst-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .inst-lightbox {
        padding: 12px;
    }

    .inst-lightbox-nav.prev { left: 8px; }
    .inst-lightbox-nav.next { right: 8px; }

    .inst-lightbox-close {
        top: 8px;
        right: 8px;
    }
}

@media (max-width: 400px) {
    .inst-page-label {
        display: none;
    }

    .inst-page-btn {
        max-width: 56px;
        padding: 14px;
    }

    .inst-page-btn-next {
        max-width: 56px;
    }
}

@media (min-width: 769px) and (max-width: 1100px) {
    .inst-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }
}
