/* ==========================================================================
   MINECRAFT MODS HUB PAGE (yigitguven.net/minecraft-mods/)
   ========================================================================== */

/* 7 Panels Diagonal Slash Division */
.portal-hero-mc {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 80px);
    min-height: calc(100dvh - 80px);
    height: calc(100vh - 80px);
    height: calc(100dvh - 80px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #000;
}

.portal-panels-mc {
    display: flex;
    width: 100%;
    height: 100%;
    flex: 1;
    overflow: hidden;
    position: relative;
}

.portal-panel-mc {
    position: relative;
    flex: 1;
    height: 100%;
    text-decoration: none;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: flex-end;
    padding: 50px 20px;
    box-sizing: border-box;
}

@media (min-width: 901px) {
    :root {
        --mc-slash-offset: 42px;
    }

    .portal-panels-mc {
        margin: 0;
        width: 100%;
        display: flex;
        overflow: hidden;
    }

    .portal-panel-mc {
        flex: 1;
        width: 14.285%;
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        border: none;
        box-shadow: none;
        padding: 45px clamp(12px, 1.6vw, 24px);
    }

    .portal-panel-mc:not(:first-child) {
        margin-left: calc(-1 * var(--mc-slash-offset));
    }

    .portal-panel-mc:first-child {
        clip-path: polygon(0 0, 100% 0, calc(100% - var(--mc-slash-offset)) 100%, 0 100%);
        padding-left: clamp(20px, 2.5vw, 40px);
        padding-right: calc(var(--mc-slash-offset) + 12px);
    }

    .portal-panel-mc:not(:first-child):not(:last-child) {
        clip-path: polygon(var(--mc-slash-offset) 0, 100% 0, calc(100% - var(--mc-slash-offset)) 100%, 0 100%);
        padding-left: calc(var(--mc-slash-offset) + 12px);
        padding-right: calc(var(--mc-slash-offset) + 12px);
    }

    .portal-panel-mc:last-child {
        clip-path: polygon(var(--mc-slash-offset) 0, 100% 0, 100% 100%, 0 100%);
        padding-left: calc(var(--mc-slash-offset) + 12px);
        padding-right: clamp(20px, 2.5vw, 40px);
    }

    .portal-panel-mc:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0;
        width: var(--mc-slash-offset);
        background: linear-gradient(to bottom right,
                transparent calc(50% - 2px),
                rgba(255, 255, 255, 0.5) calc(50% - 1px),
                rgba(255, 255, 255, 0.95) 50%,
                rgba(255, 255, 255, 0.5) calc(50% + 1px),
                transparent calc(50% + 2px));
        z-index: 5;
        pointer-events: none;
    }

    .portal-panel-mc:first-child .portal-panel-header {
        left: 0;
        right: 0;
        width: 100%;
        padding: 0 10px;
    }

    .portal-panel-mc:not(:first-child):not(:last-child) .portal-panel-header {
        left: 36px;
        right: 0;
        width: auto;
        padding: 0 10px;
    }

    .portal-panel-mc:last-child .portal-panel-header {
        left: var(--mc-slash-offset);
        right: 0;
        width: auto;
        padding: 0 10px;
    }
}

.portal-panel-mc .portal-panel-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    filter: brightness(0.92) saturate(1);
    transition: filter 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 1;
}

.portal-panel-mc:hover .portal-panel-bg {
    filter: brightness(1.08) saturate(1.15);
}

.portal-panel-mc .portal-panel-overlay {
    position: absolute;
    inset: 0;
    width: 140%;
    left: -20%;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.3) 0%,
            rgba(0, 0, 0, 0.15) 45%,
            rgba(0, 0, 0, 0.7) 100%);
    transition: opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 2;
    pointer-events: none;
}

.portal-panel-mc:hover .portal-panel-overlay {
    opacity: 0.5;
}

.portal-panel-mc .portal-panel-heading {
    font-size: clamp(0.85rem, 1.1vw, 1.15rem);
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
    line-height: 1.2;
}

/* Mobile responsive layout for 7 panels */
@media (max-width: 900px) {
    .portal-hero-mc {
        min-height: calc(100vh - 80px);
        min-height: calc(100dvh - 80px);
        height: auto;
        overflow: visible;
    }

    .portal-panels-mc {
        flex-direction: column;
        width: 100%;
        height: auto;
        display: flex;
    }

    .portal-panel-mc {
        flex: none;
        width: 100%;
        height: 120px;
        min-height: 110px;
        padding: 0 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .portal-panel-mc:last-child {
        border-bottom: none;
    }

    .portal-panel-mc .portal-panel-header {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        width: auto;
        justify-content: center;
    }

    .portal-panel-mc .portal-panel-heading {
        font-size: 1.15rem;
        text-align: center;
    }
}
