@import './index.css';

/* Override the default body rules strictly for the home page */
body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* Perfect full-bleed fit without scrolling */
}

/* Container holding the two halves */
.split-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* The actual clickable side logic */
.split-side,
.split-side:visited {
    position: relative;
    flex: 1;
    /* By default, take 50% of the screen */
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: white;
    cursor: pointer;
    overflow: hidden;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    background-color: #000000;
    /* Fallback incase image loads slow */
}

/* Expanding flex logic on hover */
.split-side:hover {
    color: white;
    flex: 1.05;
    /* When hovered, grow larger than the other side */
}

/* Background image handling using ::after */
.split-side::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Default black tint so White text is readable */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    /* 50% dark tint */
    z-index: 1;
    transition: background-color 0.6s;
}

/* Scale the image slightly on hover and lighten the tint slightly */
.split-side:hover::after {
    transform: scale(1.05);
    /* Smooth zoom-in */
}

.split-side:hover .overlay {
    background-color: rgba(0, 0, 0, 0.3);
    /* Let the image shine through more */
}

.left-side::after {
    background-image: url('/images/splitBlog.avif');
}

.right-side::after {
    background-image: url('/images/splitProfile.avif');
}

/* Content formatting */
.split-side .content {
    position: relative;
    z-index: 2;
    /* Sit on top of image and overlay */
    text-align: center;
}

/* Reset .title inside home.css specific to home's parallax layout */
.split-side .title {
    font-size: 3.5rem;
    margin-bottom: 5px;
    transform: translateY(0);
    transition: transform 0.4s ease;
}

.split-side .subtitle {
    font-style: italic;
    opacity: 0.7;
    margin-top: 0;
    transform: translateY(0);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Parallax vertical lift on text when hovered */
.split-side:hover .title {
    transform: translateY(-8px);
}

.split-side:hover .subtitle {
    transform: translateY(-8px);
    opacity: 1;
}

/* Mobile responsive (stack them on tiny screens instead of left/right) */
@media screen and (max-width: 768px) {
    .split-container {
        flex-direction: column;
    }
}
