.projects-page{
    padding:4rem 0;
}

.projects-title{
    margin-bottom:.25rem;
}

.projects-subtitle{
    margin-bottom:3rem;
    color:#6c757d;
}

.project-genre{

    color:#ff914d;

    font-size:.85rem;

    font-weight:500;

    margin-bottom:1.5rem;

    letter-spacing:1px;
}

/* =========================
   Grid
========================= */

#projects-grid{

    display:grid;

    grid-template-columns:
        repeat(auto-fill,minmax(320px,1fr));

    gap:2rem;

    justify-content:start;
}

/* =========================
   Card
========================= */

.project-card{

    position: relative;
    border-radius:16px;
    overflow:hidden;
    background:#fff;
    box-shadow:0 4px 20px rgba(0,0,0,.08);
    transition:.25s ease;
}

.project-card:hover{

    transform:translateY(-6px);

    box-shadow:
        0 10px 30px rgba(0,0,0,.15);
}

.project-card img{
    width:100%;
    height:220px;

    object-fit:cover;
}

.project-content{
    padding:1.5rem;

    display:flex;
    flex-direction:column;
    gap:1rem;
}

.project-title{
    color:#212529;

    font-size:1.4rem;
}

.project-btn{
    width:100%;
    height:44px;

    display:flex;
    align-items:center;
    justify-content:center;
    gap:.5rem;

    border:none;
    border-radius:999px;

    background:#495057;
    color:white;

    text-decoration:none;

    font-weight:400;

    transition:.2s ease;

    cursor:pointer;
}

.project-btn:hover{
    background:#bd5d38;
}

.project-card:has(.project-personal)::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    pointer-events: none;
    box-shadow: inset 0 0 0 2px rgba(255,145,77,0.3);
}

.project-card:has(.project-personal) {
    border: 2px solid #ff914d;
    box-shadow: 0 10px 30px rgba(255,145,77,0.2);
}

.project-client {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.project-personal {
    font-size: 0.85rem;
    color: #ff914d;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.project-card:has(.project-personal)::after {
    content: "PERSONAL";

    position: absolute;
    top: 16px;
    right: -28px;

    transform: rotate(35deg);

    width: 145px;
    text-align: center;

    padding: 5px 0;

    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;

    background: rgba(255, 145, 77);
    color: white;

    border-radius: 4px;

    box-shadow: 0 3px 10px rgba(0,0,0,0.18);

    z-index: 2;
}

.project-card:has(.project-personal):hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(255,145,77,0.3);
}

/* =========================
   Overlay
========================= */

#project-overlay{

    position:fixed;
    inset:0;

    backdrop-filter:blur(8px);
    background:rgba(0,0,0,.85);

    display:flex;

    justify-content:center;

    align-items:flex-start;

    overflow-y:auto;

    opacity:0;
    visibility:hidden;

    transition:
        opacity .3s ease,
        visibility .3s ease;

    z-index:9999;
}

#project-overlay.active{

    opacity:1;
    visibility:visible;
}

#overlay-genre{

    color:#ff914d;

    font-weight:600;

    text-transform:uppercase;

    letter-spacing:1px;

    margin-bottom:1rem;
}

.overlay-content{

    width:min(1200px, calc(100vw - 2rem));

    margin:2rem auto;

    padding:2rem;

    box-sizing:border-box;
    
    background:#1a1a1a;

    border-radius:20px;

    color:white;

    position:relative;
}

#close-overlay{

    position:absolute;

    top:20px;
    right:20px;

    width:45px;
    height:45px;

    border:none;

    border-radius:50%;

    background:#343a40;

    color:white;

    cursor:pointer;

    transition:.2s;
}

#close-overlay:hover{
    background:#bd5d38;
}

#overlay-title{
    color:#ff914d;

    margin-bottom:1rem;
}

#overlay-description{
    color:#adb5bd;

    line-height:1.8;

    margin-bottom:2rem;
}

#overlay-platforms{

    display:flex;

    gap:1rem;

    flex-wrap:wrap;

    margin-bottom:2rem;

    color:#adb5bd;
}

#overlay-banner{

    width:100%;
    height:350px;

    border-radius:16px;

    background-size:cover;
    background-position:center;

    margin-bottom:2rem;
}

#overlay-meta{

    display:flex;

    gap:3rem;

    margin-top:2rem;

    color:#adb5bd;
}

.overlay-section-title{

    margin-top:2rem;

    margin-bottom:1rem;

    font-size:1.25rem;

    font-weight:700;

    color:#ff914d;
}

.info-label{

    font-size:.85rem;

    color:#ffffff;

    margin-bottom:.25rem;
}

.info-value{

    font-size:1rem;

    font-weight:600;

    color:#ff914d;
}

/* =========================
   Gallery
========================= */

#overlay-gallery{

    display:flex;

    gap:1rem;

    overflow-x:auto;

    scrollbar-width:none;
}

#overlay-gallery::-webkit-scrollbar{
    display:none;
}

#overlay-gallery img{

    width:320px;
    height:180px;

    object-fit:cover;

    border-radius:12px;

    flex-shrink:0;

    cursor:pointer;

    transition:.2s;
}

#overlay-gallery img:hover{

    transform:scale(1.03);
}

.gallery-wrapper{

    display:flex;

    align-items:center;

    gap:1rem;

    width:100%;
}


#overlay-gallery{

    display:flex;

    gap:1rem;

    overflow-x:auto;

    scroll-behavior:smooth;

    flex:1;

    scrollbar-width:none;
}

#overlay-gallery::-webkit-scrollbar{
    display:none;
}

#gallery-prev,
#gallery-next{

    display:flex;

    align-items:center;

    justify-content:center;

    width:50px;
    height:50px;

    flex-shrink:0;

    z-index:10;
}

#gallery-prev:hover,
#gallery-next:hover{

    background:#ff914d;
}

#gallery-prev.disabled,
#gallery-next.disabled{

    opacity:.3;

    pointer-events:none;

    cursor:default;
}

/* =========================
   Videos
========================= */

#overlay-videos{

    display:flex;
    flex-direction:column;
    gap:1rem;

    margin-bottom:2rem;
}

#overlay-videos iframe{

    width:100%;
    height:500px;

    border:none;

    border-radius:16px;
}

.video-thumb{

    position:relative;

    cursor:pointer;

    flex-shrink:0;
}

.video-thumb img{

    width:300px;

    height:180px;

    object-fit:cover;

    border-radius:12px;

    display:block;
}

.play-icon{

    position:absolute;

    top:50%;

    left:50%;

    transform:translate(-50%,-50%);

    width:64px;

    height:64px;

    border-radius:50%;

    background:rgba(0,0,0,.7);

    display:flex;

    align-items:center;

    justify-content:center;

    color:white;

    font-size:1.5rem;

    pointer-events:none;
}

/* =========================
   Image Viewer
========================= */

#image-viewer{

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.95);

    z-index:9999;

    display:none;

    align-items:center;

    justify-content:center;
}

#image-viewer.active{

    display:flex;
}

#viewer-content img{

    max-width:90vw;

    max-height:90vh;

    border-radius:12px;
}

#viewer-content iframe{

    width:min(1200px,90vw);

    height:min(675px,80vh);

    border:none;

    border-radius:12px;
}

#close-image{

    position:absolute;

    top:25px;

    right:25px;

    width:50px;

    height:50px;

    border:none;

    border-radius:50%;

    background:#343a40;

    color:white;

    cursor:pointer;

    font-size:1.2rem;
}

#close-image:hover{

    background:#ff914d;
}

/* =========================
   Links
========================= */

#overlay-links{

    display:flex;

    justify-content:flex-end;

    flex-wrap:wrap;

    gap:1rem;

    margin-top:2rem;
}

.overlay-link{

    width:220px;
    height:44px;

    display:flex;
    align-items:center;
    justify-content:center;

    gap:.75rem;

    border-radius:999px;

    background:#495057;

    color:#fff;

    text-decoration:none;

    font-weight:600;

    transition:.2s ease;
}

.overlay-link:hover{

    background:#bd5d38;

    color:#fff;
}

/* =========================
   Mobile
========================= */

@media(max-width:768px){

    .overlay-content{
        margin:0;
        min-height:100vh;
        border-radius:0;
    }

    #overlay-gallery img{
        width:260px;
        height:150px;

        cursor:pointer;
    }

    #overlay-videos iframe{
        height:250px;
    }
}

.nav-dropdown.active .dropdown-menu-custom{
    display:block;
}

.nav-dropdown.active .dropdown-arrow{
    transform:rotate(180deg);
}

.dropdown-menu-custom a.active{
    color:#fff;
    font-weight:700;
}

.nav-link.active{
    color:#fff !important;
    font-weight:700;
}

.gamehub-featured {
    margin-bottom: 2.5rem;
    border: 2px solid #ff914d;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(255,145,77,0.15);
    transition: 0.25s ease;
}

.gamehub-featured:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 15px 40px rgba(255,145,77,0.25);
}

.section-divider{
    position:relative;
    margin:3rem 0;
    text-align:center;
}

.section-divider::before{
    content:"";
    position:absolute;
    left:0;
    right:0;
    top:50%;
    height:1px;
    background:rgba(0,0,0,.1);
}

.section-divider span{
    position:relative;
    background:white;
    padding:0 1rem;
    color:#ff914d;
}