body.noScroll{overflow: hidden;}


@media (max-width: 800px) {
    body {
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .projects {
        overflow: visible;
        height: auto;
        min-height: auto;
        z-index: 0 !important;
    }
    
    body.noScroll .projects {z-index: 0 !important;}
    body.noScroll .titleProjects {z-index: 0 !important;}
    body.noScroll section:has(.titleProjects) {z-index: 0 !important; position: relative;}
    .filterPrj {z-index: 10 !important;}
    .filtrerBg {z-index: 9 !important;}
    body.noScroll section:not(.filterPrj) {z-index: 0 !important;}
}

.btnPrj{
    width: 100%;
    background: rgba(26, 26, 26, 0.9);
    color: #f0f0f5;
    padding: 10px 10px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btnPrjReset{border-radius: 15px 15px 20px 15px;}

.btnPrj:hover {transform: scale(1.02);}
.btnPrj:active {transform: scale(0.96);}

@keyframes titleLineAnim {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.filterBtn, .totalPrj, .totalPrjM, .navPrj{animation: titleLineAnim 0.5s ease forwards;}

.titleLine{
    margin: 10px 0 50px 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.titleLine h2{
    color: rgba(40, 40, 40, 0.95);
    font-size: 18px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.totalPrjM{display: none;}

.totalPrj {
    position: relative;
    cursor: pointer;
}

.totalPrj:hover::before {
    content: 'A total projects';
    position: absolute;
    left: 10%;
    bottom: 108%;
    transform: translateX(-50%) scale(1);
    background: rgba(40, 40, 40, 0.95);
    color: #f0f0f0;
    font-size: 14px;
    padding: 8px 18px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 1;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    white-space: nowrap;
    z-index: 10;
}

.totalPrj::before {
    content: '';
    opacity: 0;
    transform: translateX(-50%) scale(0.95);
    transition: opacity 0.25s, transform 0.25s;
}

.totalPrj:hover::before {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.filterBtn{display: flex; align-items: center; gap: 1px; cursor: pointer;}
.filterBtn svg{fill: rgba(40, 40, 40, 0.95);}

@keyframes filterSlideIn {
    0% {
      opacity: 0;
      transform: translateX(-100%);
    }
    100% {
      opacity: 1;
      transform: translateX(0);
    }
}
  
@keyframes filterSlideOut {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-100%);
    }
}

.filtrerBg {
    position: fixed;
    width: 100%;
    height: 100%;
    left: 0; top: 0;
    z-index: 999 !important;
    display: none;
}

.filtrerBg.active {
    display: block;
    z-index: 999 !important;
}

.filterPrj {
    display: flex;
    flex-direction: column;
    height: 100svh;
    max-height: 93.5dvh;
    top: 0;
    bottom: 0;
    position: fixed;
    top: 0; left: 0;
    width: 300px;
    background: rgba(187, 187, 190, 0.8);
    backdrop-filter: blur(18px);
    border-radius: 0 30px 30px 0;
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
    margin-top: 15px;
    padding: 15px 10px 10px;
    z-index: 1000 !important;
    overflow-y: auto;
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.filterPrj.show {
    animation: filterSlideIn 0.4s ease forwards;
    pointer-events: all;
    z-index: 1000;
}
  
.filterPrj.hide {
    animation: filterSlideOut 0.4s ease forwards;
    pointer-events: none;
}

.filterClose{cursor: pointer;}
.filterClose span{
    display: block;
    width: 25px;
    height: 3px;
    background-color: #1a1a1a;
    margin: 5px;
    transition: all .50s ease;
    border-radius: 100px;

    &:nth-child(1){transform: rotate(45deg) translate(1px, 0px);}
    &:nth-child(2){transform: rotate(-45deg) translate(5px, -5px);}
}

.filterHeader{
    padding-bottom: 0px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.sortPrj select {
    border-radius: 12px;
    height: 30px;
    background-color: rgba(26, 26, 26, 0.9);
    color: #f0f0f5;
    padding: 0 5px;
    box-sizing: border-box;
    font-weight: bold;
}

.filterBtns {
    display: flex;
    gap: 5px;
    justify-content: space-between;
    padding: 10px 0;
}

#allPrjBtn, 
#frontPrjBtn, 
#backPrjBtn, 
#fullPrjBtn{
    transition: all .3s ease;
}
#allPrjBtn.active, 
#frontPrjBtn.active,
#backPrjBtn.active, 
#fullPrjBtn.active {
  background: linear-gradient(135deg, #1a1a1a, #3a3a3a);
  color: #f5f5f5;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transform: scale(1.09);
  transition: 0.3s ease;
}

.searchPrj{
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    height: 40px;
    background-color: #929191;
    border-radius: 13px;
    height: auto;
    max-height: 35px;
    transition: max-height 0.5s ease;
}

.searchPrj.expanded {max-height: 500px;}

.searchInput{
    border-radius: 15px;
    display: flex;
    flex-direction: row;
    width: 100%;
    margin-bottom: 10px;
}

.searchInput input {
    width: 100%;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 12px;
    border-top-left-radius: 12px;
    height: 39px;
    background-color: #a0a0a0;
    color: #1a1a1a;
    padding: 0 16px;
    box-sizing: border-box;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
    outline: none;
}

.searchInput input.active{background: #908d8d; &:focus{background: #979494;}}
.searchInput input.active:focus-within button{background-color: #979494}

.searchInput input:focus {
    border-color: #5a5a5a;
    background: #999898;
}

.searchInput:has(input.active:focus) button {background-color: #979494;}
.searchInput:has(input:focus) button {background-color: #999898;}

.searchInput input::placeholder {
    color: #3b3a3a;
    opacity: 1;
    font-size: 15px;
}

.searchInput button{
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    width: 15%;
    background-color: #a0a0a0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    color: #1a1a1a;

    &:hover{transform: scale(1);}
}

.btnPrjSearch.active{background-color: #908d8d;}
.searchInput button:active svg {transform: scale(0.9);}

.searchInput button svg{transition: all .2s ease; fill: #3b3a3a;}

.searchOptions {
    width: 100%;
    padding: 0 0 12px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.searchOptions a{
    cursor: pointer;
    padding: 5px 16px;
    border-radius: 7px;
    width: 40%;
    font-weight: bold;
    color: #272626;
    text-align: left;
    transition: all .3s ease;
}

.searchOptions p {
    text-align: center;
    padding: 5px 16px;
    border-radius: 7px;
    color: #272626;
    margin: 0;
}

.searchOptions a:hover{transform: scale(1.1);}

.filterBottom{
    width: 100%;
    margin-top: auto;
}

.FilterAvailability{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.FilterAvailability .btnAFilter{
    width: 100%;
    cursor: pointer;
    padding: 10px 20px;
    color: #a0a0a0;
    background: rgba(26, 26, 26, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    text-align: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: all 0.3s ease;
    font-family: 'Codec Pro', sans-serif;

    &:hover{background: rgba(40, 40, 40, 0.9); transform: scale(1.05);}
    &:active {transform: scale(0.96);}
}

.FilterAvailability .btnAFilter.active{
    background: linear-gradient(135deg, #1a1a1a, #3a3a3a);
    color: #f5f5f5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transform: scale(1.05);
}

.navPrj{
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.navSwitch{
    position: relative;
    display: inline-flex;
    background-color: #1a1a1a;
    padding: 7px;
    border-radius: 50px;
    overflow: hidden;
}

.navBtn{
    position: relative;
    background: none;
    border: none;
    color: #a0a0a0;
    font-weight: 500;
    padding: 12px 30px;
    border-radius: 50px;
    cursor: pointer;
    z-index: 1;
    font-size: clamp(0.9rem, 1vw, 1rem);;
    transition: all .3s ease;
    &.active{color: #1a1a1a;}
}

.sliderBg{
    position: absolute;
    top: 7px;
    left: 0px;
    bottom: 7px;
    width: 50%;
    background: #a0a0a0;
    border-radius: 50px;
    transition: all 0.4s ease;
    z-index: 0;
}


.titleProjects{
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin: 100px 0 0 0;
    position: relative;
}

.titleProjects h1{
    color: var(--text);
    font-size: clamp(1.2rem, 22vw, 22rem);
    font-family: 'Codec Pro', sans-serif;
    font-weight: bold;
    text-indent: -0.1em;
}

.titleProjects h2{
    color: var(--text);
    font-size: clamp(2rem, 8vw, 8rem);
    font-weight: bold;
    margin-left: 1vw;
    align-self: flex-end;
    min-width: 1.5ch;
    text-align: center;
    font-family: 'Codec Pro', sans-serif;
}


@keyframes fadeSlideUp {
    0% {opacity: 0; transform: translateY(20px);}
    100% {opacity: 1; transform: translateY(0);}
}

.projects{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    flex-wrap: wrap;
    gap: 30px;
    margin: 40px 0;
    animation: fadeSlideUp 0.4s ease forwards;
    z-index: -1;

}

.projects, .projectsLive {
    position: relative;
    opacity: 1;
    z-index: 1;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.projects.err{
    /* margin-top: 40px; */
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    height: 50%;
    margin: 0 auto;
}

.projects.err h1 {
    text-align: center;
    line-height: 1.5;
    color: #1a1a1a;
    font-size: 22px;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    padding: 0 15px;
}

@keyframes cardAppear {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.prjCard{
    transform: translateY(800px) rotate(10deg);
    cursor: pointer;
    /* padding: 10px; */
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.prjCard:nth-child(1), .prjCard:nth-child(2){transform: translateY(1400px); animation: prjCardAnim .9s ease both; }

.prjCard.no-delay:nth-child(1), 
.prjCard.no-delay:nth-child(2){animation-delay: 0s !important;}

body.page-reloaded .prjCard:nth-child(1),
body.page-reloaded .prjCard:nth-child(2){
    animation-delay: 0.4s;
}

@keyframes prjCardAnim {
    0%{transform: translateY(1400px) rotate(10deg);}
    100%{transform: translateY(0) rotate(0);}
}

.prjImgContainer{
    padding: 30px;
    background-color: #929292;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
}

.prjImgContainer .prjCardImg{
    width: 50%;
    border-radius: 10px;
}

.prjCardImg{
    overflow: hidden;
    width: 100%;
    border-radius: 20px;
}

.prjCardTitle{
    width: 100%;
    color: var(--text);
    padding: 10px 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    overflow-x: hidden;
}

.prjCardTitle h2{
    transform: translateX(-45px);
    font-weight: bold;
    font-size: clamp(2rem, 3vw, 3rem);
    font-family: 'Codec Pro';
    transition: transform .3s ease-in-out;
}

.prjCard:hover .prjCardTitle h2 {transform: translateX(20px);}

.prjCardTitle svg {
    opacity: 1;
    transform: translateX(-50px);
    transition: all .37s ease-in;
    pointer-events: none;

    & path{stroke: var(--text);}
}

.prjCard:hover .prjCardTitle svg {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}


.prjCardDesc{
    margin-top: 10px;
    color: var(--text);
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    & p {font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-weight: 500; text-align: left;}
}

.projectsLive {
    display: none;
    padding: 0;
    height: 50%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* margin: 25% auto; */
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
  }  

.projectsLive h1 {
    text-align: center;
    line-height: 1.5;
    color: #1a1a1a;
    font-size: 22px;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    padding: 0 15px;
}

@media (max-width: 1024px) {
    .projectsLive h1 {font-size: 20px;}
}


@media (max-width: 768px) {
    .projectsLive h1 {
        font-size: 18px;
    }
}



@media (max-width: 550px) {
    .titleProjects h1{font-size: clamp(1.2rem, 20vw, 20rem);}
}

@media (max-width: 480px) {
    .projectsLive h1 {
        font-size: 16px;
    }
}

@keyframes fadeInUp {
    from {opacity: 0; visibility: hidden; transform: translateY(20px);}    
    to {opacity: 1; visibility: visible; transform: translateY(0);}    
}

@keyframes fadeOutDown {
    from {opacity: 1; visibility: visible; transform: translateY(0);}    
    to {opacity: 0; visibility: hidden; transform: translateY(20px);}    
}

.projects.open, .projectsLive.open {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 1;
    visibility: visible;
    display: flex;
}

.projects.closed, .projectsLive.closed {
    animation: fadeOutDown 0.4s ease forwards;
    opacity: 0;
    visibility: hidden;
    display: none;
}

@media (max-width: 1000px) {
    section{padding: 0 30px;}
}