.ourProject-section {
    padding: 50px 0;
    max-width: 1400px;
    margin: 0 auto;
    width: calc(100% - 140px);
}

.ourProject-header {
    text-align: center;
    margin-bottom: 40px;
}

.ourProject-header h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
}

.ourProject-header p {
    color: #666;
    font-size: 16px;
}

.ourProject-gallery {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.ourProject-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
}

.ourProject-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ourProject-card:hover img {
    transform: scale(1.05);
}

.ourProject-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
}

.ourProject-overlay h3 {
    text-align: center;
    font-size: 18px;
    font-weight: 500;
}

.ourProject-card-large {
    flex: 0 0 40%;
    height: 500px;
}

.ourProject-grid {
    flex: 0 0 60%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.ourProject-grid .ourProject-card {
    height: 240px;
}

.ourProject-viewall {
    display: block;
    margin: 0 auto;
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid var(--ssbond-blue);
    font-size: var(--ssbond-d-desc2);
    cursor: pointer;
    transition: all 0.3s ease;
    
    /* Default state */
    background: transparent;
    color: var(--ssbond-black);
}
/* Hover state */
.ourProject-viewall:hover {
    background: var(--ssbond-primaryLinear);
    color: var(--ssbond-white);
    border-color: transparent;
}
/* Active/Clicked state */
.ourProject-viewall:active,
.ourProject-viewall.active {
    background: var(--ssbond-primaryLinear);
    color: var(--ssbond-white);
    border-color: transparent;
}
/* Responsive Design */
@media (max-width: 1400px) {
    .ourProject-section {
        width: calc(100% - 100px);
    }
}

@media (max-width: 992px) {
    .ourProject-section {
        width: 100%;
        padding: 50px 0;
    }

    .ourProject-container {
        overflow: hidden;
        width: 100%;
        position: relative;
    }

    .ourProject-gallery {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 20px;
        padding: 0 calc((100% - 85vw) / 2);
        margin: 0;
        cursor: grab;
        user-select: none;
        -webkit-user-select: none;
    }

    .ourProject-gallery::-webkit-scrollbar {
        display: none;
    }

    .ourProject-card,
    .ourProject-card-large,
    .ourProject-grid .ourProject-card {
        flex: 0 0 85vw;
        min-width: 85vw;
        width: 85vw;
        height: 400px;
        scroll-snap-align: center;
        scroll-snap-stop: always;
        transform: translateZ(0);
        will-change: transform;
        transition: transform 0.3s ease;
    }

    .ourProject-card.clone {
        scroll-snap-align: none;
    }

    .ourProject-grid {
        display: flex;
        gap: 20px;
        width: auto;
        flex: none;
    }

    /* Reset grid layout for mobile */
    .ourProject-grid {
        display: flex;
        width: auto;
        flex: none;
    }

    /* Card styles for mobile */
    .ourProject-card,
    .ourProject-card-large,
    .ourProject-grid .ourProject-card {
        flex: 0 0 85%;
        min-width: 85%;
        width: 85%;
        height: 400px;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    .ourProject-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Dots styling */
    .ourProject-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 20px;
        padding: 10px 0;
    }

    .ourProject-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(0, 102, 204, 0.2);
        transition: all 0.3s ease;
        border: none;
        padding: 0;
        cursor: pointer;
    }

    .ourProject-dot.active {
        background: #0066CC;
        transform: scale(1.2);
    }
}

@media (max-width: 768px) {
    .ourProject-section {
        width: calc(100% - 60px);
    }
    
    .ourProject-grid {
        grid-template-columns: 1fr;
    }
    
    .ourProject-grid .ourProject-card {
        height: 200px;
    }

    .ourProject-card-large {
        flex: 0 0 80%;
        height: 350px;
    }

    .ourProject-grid .ourProject-card {
        flex: 0 0 280px;
        height: 350px;
    }
}

@media (max-width: 576px) {
    .ourProject-section {
        width: calc(100% - 40px);
    }

    .ourProject-card-large {
        flex: 0 0 85%;
        height: 300px;
    }

    .ourProject-grid .ourProject-card {
        flex: 0 0 250px;
        height: 300px;
    }
}

/* Add these optimizations */
.project-section {
    will-change: transform; /* Hardware acceleration */
    contain: content; /* Improve scrolling performance */
}

.project-card {
    contain: layout style paint; /* Reduce repaints */
    transform: translateZ(0); /* Force GPU acceleration */
}

.project-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9; /* Prevent layout shifts */
    background: #f0f0f0; /* Placeholder color */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card img.loaded {
    opacity: 1;
}

/* Add loading attribute for native lazy loading */
img[loading="lazy"] {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.project-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.project-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 25px;
}

.modal-gallery {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
    align-items: start;
}

.modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
}

.modal-info {
    padding: 0;
}

.modal-title {
    font-size: var(--ssbond-m-h2);
    font-weight: 600;
    margin-bottom: 12px;
    color: #1d1d1f;
}

.modal-description {
    font-size: var(--ssbond-d-desc2);
    line-height: 1.5;
    color: #86868b;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #333;
    font-size: var(--ssbond-d-desc1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-gallery {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .modal-image {
        height: 250px;
    }

    .modal-content {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .project-modal {
        width: 95%;
        max-height: 85vh;
    }

    .modal-image {
        height: 200px;
    }
}

/* Add styles for small project modal */
.project-small-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.project-small-modal.show {
    opacity: 1;
    visibility: visible;
}

.project-small-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 80vh;
}

.project-small-modal.show .project-small-modal-content {
    transform: translateY(0);
}

.project-small-modal-body {
    padding: 25px;
    overflow-y: auto;
}

.project-small-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 25px;
}

.project-small-modal-image-wrapper {
    flex: 0 0 auto;
    width: 200px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.project-small-modal-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.project-small-modal-info {
    flex: 1;
    padding-top: 10px;
}

.project-small-modal-title {
    font-size: var(--ssbond-m-h2);
    font-weight: 600;
    margin-bottom: var(--ssbond-d-b1);
    color: #333;
}

.project-small-modal-category {
    font-size: var(--ssbond-d-desc2);
    color: #666;
    margin-bottom: 15px;
}

.project-small-modal-description {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
}

.project-small-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.project-small-modal-close::before,
.project-small-modal-close::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.project-small-modal-close::before {
    transform: rotate(45deg);
}

.project-small-modal-close::after {
    transform: rotate(-45deg);
}

.project-small-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .project-small-modal-close::before,
    .project-small-modal-close::after {
        background-color: #fff;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .project-small-modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .project-small-modal-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }

    .project-small-modal-image-wrapper {
        width: 150px;
    }

    .project-small-modal-body {
        padding: 20px;
    }

    .project-small-modal-title {
        font-size: var(--ssbond-d-desc1);
    }
}

@media (max-width: 576px) {
    .project-small-modal {
        padding: 15px;
    }

    .project-small-modal-content {
        width: 100%;
    }

    .project-small-modal-image-wrapper {
        width: 120px;
    }

    .project-small-modal-body {
        padding: 15px;
    }
}

/* Improved dot styling */
.ourProject-dots {
    display: none;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

@media (max-width: 992px) {
    .ourProject-dots {
        display: flex;
    }
}

.ourProject-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    margin: 0 4px;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ourProject-dot.active {
    background: #06c;
    transform: scale(1);
}

.ourProject-dot:not(.active) {
    transform: scale(0.75);
    opacity: 0.5;
}

/* Add these styles for modal details */
.modal-details {
    margin-top: 20px;
    border-top: 1px solid #e5e5e5;
    padding-top: 15px;
}

.modal-detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: var(--ssbond-d-desc2);
}

.detail-label {
    color: #86868b;
}

.detail-value {
    color: #1d1d1f;
    font-weight: 500;
}

/* Ensure modal is above other content */
.project-modal {
    z-index: 9999;
}

/* Add backdrop styles */
.project-modal::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: -1;
}

/* Add/modify these styles */
.ourProject-container {
    position: relative;
    width: 100%;
}

@media (max-width: 992px) {
    .ourProject-gallery {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 15px;
        padding: 20px 0;
        margin: -20px 0;
        cursor: grab;
    }

    .ourProject-gallery::-webkit-scrollbar {
        display: none;
    }

    .ourProject-card {
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    .ourProject-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 20px;
        padding: 10px 0;
    }

    .ourProject-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(0, 102, 204, 0.2);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
        border: none;
    }

    .ourProject-dot.active {
        background: #0066CC;
        transform: scale(1.2);
    }

    .ourProject-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 20px;
        flex: 0 0 auto;
        width: auto;
    }

    .ourProject-card {
        flex: 0 0 300px;
        min-width: 300px;
        width: 300px;
        height: 400px;
        scroll-snap-align: center;
        position: relative;
        user-select: none;
        -webkit-user-select: none;
    }

    .ourProject-card-large {
        flex: 0 0 300px;
        min-width: 300px;
        width: 300px;
        height: 400px;
    }

    .ourProject-grid .ourProject-card {
        flex: 0 0 300px;
        min-width: 300px;
        width: 300px;
        height: 400px;
    }

    .ourProject-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    @media (max-width: 768px) {
        .ourProject-card,
        .ourProject-card-large,
        .ourProject-grid .ourProject-card {
            flex: 0 0 280px;
            min-width: 280px;
            width: 280px;
            height: 350px;
        }
    }

    @media (max-width: 576px) {
        .ourProject-card,
        .ourProject-card-large,
        .ourProject-grid .ourProject-card {
            flex: 0 0 260px;
            min-width: 260px;
            width: 260px;
            height: 300px;
        }
    }
}
