
/* Header container */
.header-caption {
    position: relative;
    z-index: 2;
    width: 500px;
    text-align: center;
    top: 410px;
    margin: 0 auto 0 auto;
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Responsive header heights */
@media (min-width: 768px) {
    .header {
        height: 500px;
    }
}

@media (min-width: 1024px) {
    .header {
        height: 500px;
    }
}

/* Image container for smooth transition */
.header-image-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Both images positioned absolutely for overlay effect */
.header-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease-in-out;
}

/* Hide desktop images on mobile */
.desktop-image {
    display: none;
}

/* Show mobile images on mobile */
.mobile-image {
    display: block;
}

/* Tablet and desktop: show desktop images, hide mobile */
@media (min-width: 768px) {
    .desktop-image {
        display: block;
    }
    
    .mobile-image {
        display: none;
    }
}

/* Placeholder is visible by default */
.placeholder-image {
    opacity: 1;
    z-index: 1;
}

/* GIF is hidden by default */
.gif-image {
    opacity: 0;
    z-index: 2;
}

/* When loaded, show GIF and hide placeholder */
.header-image-container.gif-loaded .gif-image {
    opacity: 1;
}

.header-image-container.gif-loaded .placeholder-image {
    opacity: 0;
}

/* Optional subtle loading indicator */
.loading-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    z-index: 10;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.loading-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Spinning animation */
.loading-indicator::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Content section */
.content {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    font-size: 2em;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (min-width: 768px) {
    h1 {
        font-size: 2.5em;
    }
}

p {
    font-size: 1.1em;
    line-height: 1.6;
    color: #b0b0b0;
    margin-bottom: 15px;
}

@media (max-width: 767px) {
    .content {
        padding: 30px 15px;
    }
    
    .header { 
        height: 550px;
    }

    .header-caption {
        position: relative;
        z-index: 2;
        width: unset;
        flex-direction: column;
        width: 60%;
    }
}