/* Reset & Base Styles */
* {
    margin: 20;
    padding: 20;
    box-sizing: border-box;
}

body {
    background-color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #333333;
    overflow-x: hidden;
    /* Prevent horizontal scrollbars if logos are too wide during transition */
}

a {
    color: #333333;
    text-decoration: none;
}

a:hover {
    color: #000000;
}

/* Center Container */
.center-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    padding: 2rem 1rem 6rem;
    /* Top, horizontal, bottom padding */
}

/* Logo Overlap Wrapper */
.logo-overlap-wrapper {
    position: relative;
    width: min(80vw, 600px);
    /* Responsive but not too large */
    height: min(40vh, 300px);
    /* Height proportional to viewport */
    min-height: 200px;
    margin-bottom: 2rem;
    /* Space for service categories */
}

/* Base KUP Logo - always visible */
.logo-base {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: opacity 300ms ease-in-out;
    /* Smooth opacity transition */
    padding: 10%;
    /* Add 10% padding around KUP logo */
}

.logo-base img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.logo-item {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    filter: none;
    transition: clip-path 300ms ease-in-out, opacity 300ms ease-in-out, filter 300ms ease-in-out;
    z-index: 2;
    /* Ensure logos stay below service categories */
    /* Clip-path will be set by JavaScript */
}

.logo-item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.logo-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Or 'cover' if you prefer image to fill, might crop */
    display: block;
    cursor: pointer;
}

/* Center both logos */
.logo-a {
    left: -0%;
    /* Reduced offset - slimmer padding */
    z-index: 3;
    padding: 10%;
}

.logo-b {
    left: 0%;
    /* Reduced offset - slimmer padding */
    z-index: 3;
}

/* Description Container - positioned below service categories */
.description-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 2rem auto 0;
    text-align: center;
    z-index: 5;
    pointer-events: none;
    min-height: 80px;
    /* Reserve space for descriptions */
}

.description-left,
.description-right {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 300ms ease-in-out;
}

.description {
    font-size: 0.95rem;
    line-height: 1.4;
    color: #333333;
    margin: 0;
}

/* States for interaction */
.logo-item.interaction-active {
    opacity: 1;
    filter: none;
    z-index: 3 !important;
}

.logo-item.interaction-behind {
    opacity: 0.3;
    filter: grayscale(100%);
    z-index: 1 !important;
}

/* Show descriptions only when active */
.description-left.active,
.description-right.active {
    opacity: 1;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 1rem 0;
    font-size: 0.875rem;
    color: #666666;
    width: 100%;
    background-color: #ffffff;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 10;
}

.site-footer .separator {
    margin: 0 0.5rem;
    color: #cccccc;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .logo-overlap-wrapper {
        width: 90vw;
        height: min(35vh, 250px);
    }

    .logo-a {
        left: 0;
        /* Centered on mobile too */
    }

    .logo-b {
        left: 0;
        /* Centered on mobile too */
    }

    .description {
        font-size: 0.9rem;
    }

    /* Stack service categories vertically on mobile */
    .service-categories {
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .service-item {
        font-size: 1.5rem;
        /* Smaller font size for mobile */
    }
}

@media (max-width: 480px) {
    .service-item {
        font-size: 1.2rem;
        /* Even smaller for very small screens */
    }

    .service-categories {
        gap: 1rem;
    }

    /* Language switch mobile adjustments */
    .language-switch {
        bottom: 4.5rem;
        /* Above footer */
        right: 0.5rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Service Categories */
.service-categories {
    display: flex;
    gap: 3rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 100;
    /* High z-index to ensure it's above other elements */
    flex-wrap: wrap;
    /* Allow wrapping on smaller screens */
}

.service-item {
    font-size: 2rem;
    font-weight: 600;
    color: #676767;
    cursor: pointer;
    transition: color 300ms ease-in-out, transform 300ms ease-in-out;
    margin: 0;
    user-select: none;
    position: relative;
    z-index: 101;
    /* Even higher z-index */
    pointer-events: auto;
    /* Ensure pointer events work */
    white-space: nowrap;
    /* Prevent text from breaking */
}

.service-item:hover {
    color: #000000;
    transform: scale(1.05);
}

.service-item.active {
    color: #000000;
    transform: scale(1.1);
}

/* Language Switch */
.language-switch {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 200;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.875rem;
    font-weight: 600;
}

.lang-current {
    color: #000000;
}

.lang-link {
    color: #666666;
    text-decoration: none;
    transition: color 300ms ease-in-out;
}

.lang-link:hover {
    color: #333333;
}

.lang-separator {
    color: #cccccc;
}