/* Extracted from Views/Projects/Index.cshtml @section styles */

:root {
    --ref-height: 0px;
}

body {
    background: url('/images/projectbg.png');
    background-position: top left;
    background-repeat: repeat-y;
    background-size: 100% auto;
    background-color: #fff !important;
}

.grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
    max-width: 100%;
}

.grid-item {
    width: 50px;
    height: 50px;
    border: 1px solid black;
    user-select: none;
    color: #000;
    text-align: center;
}

.grid-item-project {
    transition: transform 0.3s ease, opacity 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 1024px) {
    .grid {
        display: grid;
        grid-template-columns: repeat(10, 1fr);
        grid-gap: 10px;
        width: 100%;
    }

    .grid-item {
        position: absolute;
    }

    .grid-item-topic {
        border: 0;
        height: 25px;
        width: 100px;
    }

    .topic4 {
        width: 160px;
    }

    .navproj {
        position: absolute;
        top: calc(var(--ref-height) / 2);
        transform: translateY(-50%);
        left: 49.5%;
        width: 25.21%;
    }

        .navproj .nav-link {
            padding: 0;
            margin-left: 10px;
            margin-right: 10px;
            font-size: 14px;
            color: #a4a1a1;
        }
}

@media (max-width: 1024px) {
    .grid-item-topic {
        width: 100px;
        padding-top: 12px;
    }

    .topic4 {
        width: 160px;
    }

    .grid-item {
        position: relative;
        left: auto !important;
        top: auto !important;
    }

    .navproj .nav-link {
        padding: 0;
        margin-left: 5px;
        margin-right: 5px;
        font-size: 12px;
        color: #a4a1a1;
    }
}

.fmenu {
    font-size: 13px;
}

.grid-item-project:hover {
    transform: scale(2);
    z-index: 10;
    border: 2px solid #306786 !important;
    box-shadow: 0 0 10px rgba(48, 103, 134, 0.5);
}

.grid-item-project .tooltip {
    visibility: hidden;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    padding: 5px 10px;
    border-radius: 5px;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 20;
}

.grid-item-project:hover .tooltip {
    visibility: visible;
}

.actives {
    color: #000000 !important;
}

.grid-item-project.highlight {
    border: 2px solid #306786 !important;
    box-shadow: 0 0 10px rgba(48, 103, 134, 0.5);
}

.grid-item-topic {
    cursor: pointer;
}

/* جلوگیری از پرش در لود اولیه */
.grid.initial-load .grid-item-project {
    opacity: 0;
}

/* Loading indicator */
.loading-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    display: none;
}

    .loading-overlay.active {
        display: block;
    }

.loading-spinner {
    width: 35px;
    height: 35px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #306786;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.navproj.loading .nav-link {
    pointer-events: none;
    opacity: 0.5;
}
