/* Sliding Door Effect CSS */

/* Container for the sliding doors */
#sliding-door-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999999;
    pointer-events: none;
    display: none; /* Hidden by default, will be shown by JavaScript on homepage only */
}

/* Left door panel - starts covering left half of screen */
.door-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background-image: url('../img/trusmi-left-new.webp');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 4s ease-in-out;
    z-index: 99999999;
    overflow: hidden;
}

/* Right door panel - starts covering right half of screen */
.door-right {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-image: url('../img/trusmi-right-new.webp');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 4s ease-in-out;
    z-index: 99999999;
    overflow: hidden;
}

/* Logo or text in the center (optional) */
.door-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999999999;
    text-align: center;
    color: white;
    opacity: 1;
    transition: opacity 1.5s ease-out;
}

.door-logo-img {
    max-width: 300px;
    width: 80%;
    height: auto;
    filter: drop-shadow(2px 2px 12px rgba(255, 77, 87, 0.4));
    animation: logoFadeIn 1s ease-in-out;
    position: relative;
    z-index: 2;
}

@keyframes logoFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Decorative elements on doors - Red & White stripes */
/* Commented out to show the gerbang images clearly */
/*
.door-left::before,
.door-right::before {
    content: '';
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.1) 10px,
        rgba(255, 255, 255, 0.1) 20px
    );
}
*/

/* Animation states - doors slide away */
.door-left.opening {
    transform: translateX(-100%);
}

.door-right.opening {
    transform: translateX(100%);
}

.door-logo.fade-out {
    opacity: 0;
}

/* Hide the overlay completely after animation */
#sliding-door-overlay.hidden {
    display: none;
}

/* Circular loading ring around logo */
.door-spinner {
    position: absolute;
    width: 380px;
    height: 380px;
    border: 4px solid rgba(255, 77, 87, 0.15);
    border-top: 4px solid #ff4d57;
    border-right: 4px solid #ffffff;
    border-radius: 50%;
    animation: spinCircle 1s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spinCircle {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive spinner size */
@media (max-width: 768px) {
    .door-spinner {
        width: 320px;
        height: 320px;
    }
}

@media (max-width: 480px) {
    .door-spinner {
        width: 260px;
        height: 260px;
        border-width: 2px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .door-logo-img {
        max-width: 250px;
        width: 70%;
    }
}

@media (max-width: 480px) {
    .door-logo-img {
        max-width: 200px;
        width: 60%;
    }
}
