/* 
  Entrance Page Styling
  (Split screen)
*/
body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Header overlaying the content */
.entrance-header {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 100;
}

.entrance-logo {
    color: #fff;
    font-size: 1.5rem;
    font-family: 'Noto Serif JP', "Yu Mincho", "Hiragino Mincho ProN", "MS PMincho", serif;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    margin: 0;
}

.entrance-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

.entrance-pane {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    transition: flex 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    text-decoration: none;
    color: #fff;
}

/* Background images setup */
.pane-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
    z-index: 1;
}

/* Overlay to darken background implicitly and show text clearly */
.pane-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    transition: background 0.4s ease;
    z-index: 2;
}

/* Specific background assignments */
.pane-left .pane-bg {
    background-image: url('../images/entrance/02.webp');
    background-position-x: right;
}

.pane-right .pane-bg {
    background-image: url('../images/entrance/01.webp');
}

/* Content wrapper */
.pane-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 2rem;
    text-align: center;
}

.pane-category {
    position: absolute;
    top: 24%;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    padding: 2.5rem 0.6rem;
    height: 280px;
    width: 60px;
    /* Force an identical width */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    z-index: 10;
    box-sizing: border-box;
    position: absolute;
    line-height: 1.5;
}

.pane-category::after {
    position: absolute;
    bottom: 20px;
    /* Force arrows to stay at the identical bottom height */
    left: 50%;
    transform: translateX(-50%);
    /* Center the arrow horizontally in the vertical strip */
    display: inline-block;
    font-size: 1.2rem;
    transition: margin-bottom 0.3s ease;
}

.pane-left .pane-category::after {
    content: "↓";
}

.pane-right .pane-category::after {
    content: "↓";
    /* Arrow points to the right */
    transform: translateX(-50%) rotate(-180deg);
    /* Counteract the vertical text mode */
}

.entrance-pane.pane-left:hover .pane-category::after {
    margin-bottom: -5px;
}

.entrance-pane.pane-right:hover .pane-category::after {
    margin-bottom: -5px;
    /* Since it's absolutely positioned, animate its margin or bottom instead of transform so we don't clobber the rotation */
}

.pane-left .pane-category {
    right: 0;
    background: rgba(233, 30, 99, 0.8);
    border-radius: 4px 0 0 4px;
    border-right: none;
}

.pane-right .pane-category {
    left: 0;
    background: rgba(33, 150, 243, 0.8);
    border-radius: 0 4px 4px 0;
    border-left: none;
}

.pane-title {
    font-family: 'Noto Serif JP', "Yu Mincho", "Hiragino Mincho ProN", "MS PMincho", serif;
    font-size: 2.2rem;
    line-height: 1.4;
    font-weight: 500;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.pane-title .sub-title {
    display: block;
    font-size: 1.5rem;
    margin-top: 0.5rem;
}

.pane-left::before {
    content: "For patients";
    position: absolute;
    bottom: 1rem;
    font-size: 8rem;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    color: rgba(255, 255, 255, 0.6);
    z-index: 2;
}

.pane-right::before {
    content: "For medical institutions";
    position: absolute;
    bottom: 1rem;
    font-size: 8rem;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    color: rgba(255, 255, 255, 0.6);
    z-index: 2;
}


/* Hover Interactions */
.entrance-container:hover .entrance-pane:not(:hover) {
    flex: 0.8;
    /* Shrink the other side */
}

.entrance-container:hover .entrance-pane:not(:hover) .pane-overlay {
    background: rgba(0, 0, 0, 0.6);
    /* Darken the other side slightly more */
}

.entrance-pane:hover {
    flex: 1.2;
    /* Expand hovered side */
}

.entrance-pane:hover .pane-bg {
    transform: scale(1.05);
    /* Slight zoom on background on hover */
}

.entrance-pane:hover .pane-overlay {
    background: rgba(0, 0, 0, 0);
    /* Lighten overlay to reveal more photo */
}

.entrance-pane.pane-left:hover .pane-category {
    background: rgba(233, 30, 99, 1);
    /* Add a slight tint to category box */
    border-color: transparent;
}

.entrance-pane.pane-right:hover .pane-category {
    background: rgba(33, 150, 243, 1);
    /* Add a slight tint to category box */
    border-color: transparent;
}


/* Mobile Responsiveness */
@media (max-width: 768px) {
    .entrance-container {
        flex-direction: column;
    }

    .entrance-header {
        top: 1rem;
        left: 1rem;
        z-index: 10;
        text-align: center;
        width: calc(100% - 2rem);
    }

    .entrance-logo {
        font-size: 1.2rem;
        line-height: 1.5;
    }

    .entrance-logo a span {
        font-size: 0.8rem;
        display: block;
    }

    .entrance-container:hover .entrance-pane:not(:hover) {
        flex: 1;
        /* Reset on mobile */
    }

    .entrance-pane:hover {
        flex: 1;
        /* Reset on mobile */
    }

    .pane-title {
        font-size: 1.15rem;
    }

    .pane-title .sub-title {
        font-size: 0.9rem;
    }

    .pane-category {
        font-size: 1rem;
        padding: 1.5rem 0.5rem;
        height: 200px;
        top: 50%;
    }

    .pane-left .pane-category {
        right: auto;
        left: 0;
        border-radius: 0 4px 4px 0;
        border-left: none;
        border-right: 1px solid rgba(255, 255, 255, 0.6);
    }

    .pane-right .pane-category::after {
        transform: translateX(-50%) rotate(0deg);
    }

    .pane-content {
        padding: 2rem 2rem 2rem 5rem;
    }
}