/* Projects Section */
.projects-section {
    margin: 40px 0;
}

/* Filter Bar */
.projects-filter {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  gap: 25px;
  padding: 5rem 0;
}

.projects-filter .blue-line {
  display: block;
  width: 2px;
  height: 65px;
  background-color: #30D5C8;
}


.projects-filter .filter-btn {
  background: none;
  border: none;
  padding: 0;
  color: #fff;
  font-size: 48px;
  font-family: "Manrope", Sans-serif;
  position: relative;
  cursor: pointer;
  font-weight: 400;
}

.projects-filter .filter-btn:hover {
  color: #30D5C8;
  background: transparent !important;
}



.projects-filter .filter-btn.active {
  color: #30D5C8;
  background: transparent !important;
}


/* Projects Grid */
.projects-grid {
    display: inline-grid;
    gap: 100px;
    transition: all 0.3s ease;
    align-content: space-evenly;
    justify-content: start;
    align-items: start;
    justify-items: start;
}

/* Web Development Layout - 2 columns */
.projects-grid.web-development-layout {
    grid-template-columns: repeat(2, 1fr);
}

/* Design Layout - 3 columns */
.projects-grid.design-layout {
    grid-template-columns: repeat(3, 1fr);
    gap: 0px;
}

.project-item {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}
.project-item h3 {
    margin: 15px 0 0;
    font-size: 18px;
}

/* Web Development Project Styles */
.project-item.web-development {
    width: 100%;
    height: 400px;
    max-width: 700px;
    margin: 0 auto;
    cursor: ns-resize;
}
.project-item.design {
    width: 460px;
    max-width: 100%;
    height: 460px;
}
.scrollable-image-container {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: #f5f5f5;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
    scroll-behavior: smooth;
}
.scrollable-image-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}
.scrollable-image-container img.scrollable-image {
    max-width: 100%;
    height: auto;
    display: block;
}

.scroll-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 2;
    opacity: 0;
}


.scroll-indicator.visible {
    opacity: 1;
}

.scroll-indicator.hidden {
    opacity: 0;
}

.scroll-text {
    font-size: 14px;
    margin-top: 0.5rem;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.scrollwheel-icon {
    width: 24px;
    height: 40px;
    border: 2px solid white;
    border-radius: 12px;
    position: relative;
}

.scrollwheel-icon::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: white;
    border-radius: 2px;
    animation: scroll-indicator-bounce 1.2s infinite;
}

@keyframes scroll-indicator-bounce {
    0% { transform: translate(-50%, 0); opacity: 1; }
    50% { transform: translate(-50%, 8px); opacity: 0.3; }
    100% { transform: translate(-50%, 0); opacity: 1; }
}

/* Design Project Styles */
.project-item.design .image-rotator {
    position: relative;
    overflow: hidden;
    max-width: 460px;
    height: 460px; 
}

.project-item.design .image-rotator img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: translateZ(0);
    backface-visibility: hidden;
    transition: opacity 0.05s linear !important; /* 50ms - faster transition */
    will-change: opacity;
}

/* Loading State */
.projects-grid.loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.projects-grid.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@media (max-width: 1700px) {
    .projects-grid.design-layout {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 1100px) {
    .project-item.design .image-rotator {
        max-width: 360px;
        height: 360px;
    }
    .project-item.design {
        max-width: 360px;
        height: 360px;
    }
}
/* Responsive */
@media (max-width: 1024px) {
    .projects-grid.web-development-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .projects-grid.web-development-layout,
    .projects-grid.design-layout {
        grid-template-columns: 1fr;
    }
    .projects-filter .filter-btn {
        font-size: 32px;
    }
    .projects-filter {
        flex-direction: column;
    }
    .blue-line {
        display: none !important;
    }
    .filter-btn {
        border-bottom: 2px solid #30D5C8 !important;
    }
        .projects-section {
        margin: 0;
    }
    .projects-filter {
        padding: 3rem 0;
    }
}
@media (max-width: 420px) {
    .project-item.design .image-rotator {
        max-width: 300px;
        height: 300px;
    }
    .project-item.design {
        max-width: 300px;
        height: 300px;
    }
    .projects-grid {
        justify-items: center;
        width: 100%;
    }

}