/* Custom Hero Layout */
#header .hero-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4em;
    text-align: left;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2em;
}

.hero-text {
    flex: 1;
}

#header .hero-text p {
    text-align: left;
}

/* Override existing #heroImage margins */
#header #heroImage {
    margin: 0;
    flex-shrink: 0;
    display: block;
}

/* Adjust HR styling */
#header .hero-text hr {
    position: static;
    margin: 1.5em 0;
    width: 100%;
}

#header .hero-text hr:before, #header .hero-text hr:after {
    display: none;
}

/* Slot Machine Animation */
.slot-machine {
    display: inline-block;
    height: 1.5em; /* Adjust based on line-height/font-size */
    line-height: 1.5em;
    overflow: hidden;
    vertical-align: bottom;
    text-align: center;
    position: relative;
    top: -0.1em; /* Fine tune alignment */
    width: 3.2em; /* Starting width for "Game" */
    transition: width 0.5s ease-in-out;
    animation: slot-width 8s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

.slot-wrapper {
    display: block;
    animation: slot-slide 8s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

.slot-item {
    display: block;
    height: 1.5em;
    color: #ef8376; /* Accent color matching links */
    font-weight: 600;
}

@keyframes slot-slide {
    0%, 20% {
        transform: translateY(0);
        /* Game */
    }
    25%, 45% {
        transform: translateY(-1.5em);
        /* Web */
    }
    50%, 70% {
        transform: translateY(-3em);
        /* Software */
    }
    75%, 95% {
        transform: translateY(-4.5em);
        /* XR */
    }
    100% {
        transform: translateY(-6em);
        /* Game (loop) */
    }
}

@keyframes slot-width {
    0%, 20% {
        width: 3.2em; /* Game */
    }
    25%, 45% {
        width: 2.4em; /* Web */
    }
    50%, 70% {
        width: 5.5em; /* Software */
    }
    75%, 95% {
        width: 1.8em; /* XR */
    }
    100% {
        width: 3.2em; /* Game */
    }
}

#header .hero-text p a {
    color: #3b82f6;
    text-decoration: none;
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

#header .hero-text p a:hover {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

#header .hero-text p a strong {
    color: inherit;
}

/* Responsive design */
@media screen and (max-width: 960px) {
    #header .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2em;
    }

    #header .hero-text p {
        text-align: center;
    }

    #header #heroImage {
        margin: 0 auto;
    }

    #header .hero-text hr {
        margin: 1.5em auto;
    }
    
    .slot-machine {
        vertical-align: middle;
        top: 0;
    }
}