/* Sliding gallery 01-specific CSS - Does not affect other site pages */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow-x: hidden;
    /* Prevent iOS zoom */
    -webkit-text-size-adjust: 100%;
    /* Improve mobile performance */
    -webkit-overflow-scrolling: touch;
}

/* Loading Indicator */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 300;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Error Message */
.error-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.error-content {
    text-align: center;
    color: white;
    max-width: 500px;
    padding: 40px;
}

.error-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.error-content p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

.btn-back {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Gallery Title */
.gallery-title {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    z-index: 10;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 40px;
    margin-top: 10px;
}

.container {
    height: 500vh; /* Make page scrollable */
    position: relative;
}

.fixed-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../Images/Backgrounds/CarbonFiber01.jpg') center center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 1;
}

.scroll-indicator {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    opacity: 0.9;
    animation: bounce 2s infinite;
    z-index: 100;
    transition: opacity 0.3s ease;
    font-size: 1.1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

.image-element {
    position: absolute;
    width: 80vw;
    height: 60vh;
    max-width: 600px;
    max-height: 400px;
    min-width: 250px;
    min-height: 167px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    z-index: 5;
    transition: box-shadow 0.3s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.1);
}

.image-element img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 15px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .image-element {
        width: 85vw;
        height: 50vh;
        max-width: 350px;
        max-height: 233px;
        min-width: 200px;
        min-height: 133px;
    }
    
    .gallery-title {
        font-size: 2rem;
        top: 22%;
        margin-top: 20px;
    }
    
    /* Fix background for mobile devices */
    .fixed-content {
        background-size: cover;
        background-position: center center;
        background-attachment: scroll;
    }
}

@media (max-width: 480px) {
    .image-element {
        width: 90vw;
        height: 45vh;
        max-width: 300px;
        max-height: 200px;
        border-radius: 10px;
    }
    
    .gallery-title {
        font-size: 1.5rem;
        top: 25%;
        margin-top: 15px;
    }
    
    /* Enhanced mobile background handling */
    .fixed-content {
        background-size: cover;
        background-position: center center;
        background-attachment: scroll;
        background-repeat: no-repeat;
    }
}

/* Image backgrounds using CSS gradients */
.img1 { background: linear-gradient(45deg, #ff6b6b, #feca57); }
.img2 { background: linear-gradient(45deg, #48cae4, #023e8a); }
.img3 { background: linear-gradient(45deg, #06ffa5, #1cb5e0); }
.img4 { background: linear-gradient(45deg, #ff9a9e, #fecfef); }
.img5 { background: linear-gradient(45deg, #a8edea, #fed6e3); }
.img6 { background: linear-gradient(45deg, #ff8a80, #ffab40); }
.img7 { background: linear-gradient(45deg, #84fab0, #8fd3f4); }
.img8 { background: linear-gradient(45deg, #fa709a, #fee140); }


/* This can be used to add an image label to the bottom left of each image
.image-element::after {
    content: attr(data-label);
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

*/

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48cae4);
    transform-origin: left;
    z-index: 100;
}

.scroll-debug {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.9rem;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    z-index: 100;
    opacity: 0.8;
}