/* Floating Images Hero Section */
.floating-images-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
}

.floating-img {
    position: absolute;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    object-fit: cover;
    opacity: 0.85;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: auto;
    z-index: 3;
}

.floating-img:hover {
    opacity: 1;
    transform: scale(1.05);
    z-index: 10;
}

/* Floating animation keyframes */
@keyframes float1 {

    0%,
    100% {
        transform: translateY(0) rotate(-5deg);
    }

    50% {
        transform: translateY(-20px) rotate(-3deg);
    }
}

@keyframes float2 {

    0%,
    100% {
        transform: translateY(0) rotate(5deg);
    }

    50% {
        transform: translateY(-25px) rotate(7deg);
    }
}

@keyframes float3 {

    0%,
    100% {
        transform: translateY(0) rotate(-3deg);
    }

    50% {
        transform: translateY(-15px) rotate(-5deg);
    }
}

@keyframes float4 {

    0%,
    100% {
        transform: translateY(0) rotate(3deg);
    }

    50% {
        transform: translateY(-18px) rotate(5deg);
    }
}

@keyframes float5 {

    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
    }

    50% {
        transform: translateY(-22px) rotate(0deg);
    }
}

/* Individual floating images positioning and animation */
.floating-img-1 {
    width: 140px;
    height: 100px;
    top: 12%;
    left: 3%;
    animation: float1 6s ease-in-out infinite;
    animation-delay: 0s;
}

.floating-img-2 {
    width: 120px;
    height: 90px;
    top: 14%;
    right: 5%;
    animation: float2 7s ease-in-out infinite;
    animation-delay: 1s;
}

.floating-img-3 {
    width: 130px;
    height: 95px;
    bottom: 25%;
    left: 5%;
    animation: float3 5.5s ease-in-out infinite;
    animation-delay: 0.5s;
}

.floating-img-4 {
    width: 125px;
    height: 90px;
    bottom: 20%;
    right: 4%;
    animation: float4 6.5s ease-in-out infinite;
    animation-delay: 1.5s;
}

.floating-img-5 {
    width: 110px;
    height: 80px;
    top: 45%;
    left: 2%;
    animation: float5 7.5s ease-in-out infinite;
    animation-delay: 2s;
}

/* Ensure hero content stays above floating images */
.masthead {
    position: relative;
}

.masthead-content {
    position: relative;
    z-index: 5;
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Large screens (desktops) */
@media (min-width: 1200px) {
    .floating-img-1 {
        width: 180px;
        height: 130px;
        top: 15%;
        left: 5%;
    }

    .floating-img-2 {
        width: 160px;
        height: 120px;
        top: 15%;
        right: 8%;
    }

    .floating-img-3 {
        width: 170px;
        height: 125px;
        bottom: 22%;
        left: 6%;
    }

    .floating-img-4 {
        width: 155px;
        height: 115px;
        bottom: 18%;
        right: 7%;
    }

    .floating-img-5 {
        width: 140px;
        height: 100px;
        top: 40%;
        left: 3%;
    }
}

/* Medium screens (tablets landscape) */
@media (min-width: 992px) and (max-width: 1199px) {
    .floating-img-1 {
        width: 150px;
        height: 110px;
        top: 14%;
        left: 3%;
    }

    .floating-img-2 {
        width: 130px;
        height: 95px;
        top: 10%;
        right: 4%;
    }

    .floating-img-3 {
        width: 140px;
        height: 100px;
        bottom: 25%;
        left: 4%;
    }

    .floating-img-4 {
        width: 125px;
        height: 90px;
        bottom: 20%;
        right: 3%;
    }

    .floating-img-5 {
        width: 115px;
        height: 85px;
        top: 48%;
        left: 2%;
    }
}

/* Small tablets */
@media (min-width: 768px) and (max-width: 991px) {
    .floating-img-1 {
        width: 110px;
        height: 80px;
        top: 12%;
        left: 2%;
    }

    .floating-img-2 {
        width: 100px;
        height: 75px;
        top: 8%;
        right: 2%;
    }

    .floating-img-3 {
        width: 105px;
        height: 78px;
        bottom: 28%;
        left: 2%;
    }

    .floating-img-4 {
        width: 95px;
        height: 70px;
        bottom: 22%;
        right: 2%;
    }

    .floating-img-5 {
        display: none;
        /* Hide 5th image on tablets */
    }
}

/* Mobile devices */
@media (max-width: 767px) {
    .floating-img {
        opacity: 0.9;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 15px rgba(255, 255, 255, 0.1);
        border: 2px solid rgba(255, 255, 255, 0.2);
    }

    .floating-img-1 {
        width: 90px;
        height: 65px;
        top: 15%;
        left: 3%;
    }

    .floating-img-2 {
        width: 85px;
        height: 60px;
        top: 13%;
        right: 3%;
        left: auto;
    }

    .floating-img-3 {
        width: 80px;
        height: 58px;
        bottom: 18%;
        left: 2%;
    }

    .floating-img-4 {
        width: 75px;
        height: 55px;
        bottom: 15%;
        right: 2%;
        left: auto;
    }

    .floating-img-5 {
        display: none;
        /* Hide 5th image on mobile */
    }
}

/* Extra small devices (phones portrait) */
@media (max-width: 480px) {
    .floating-img {
        opacity: 0.85;
        border-radius: 10px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 10px rgba(255, 255, 255, 0.15);
        border: 2px solid rgba(255, 255, 255, 0.25);
    }

    .floating-img-1 {
        width: 75px;
        height: 55px;
        top: 14%;
        left: 2%;
    }

    .floating-img-2 {
        width: 70px;
        height: 50px;
        top: 12%;
        right: 2%;
        left: auto;
    }

    .floating-img-3 {
        width: 68px;
        height: 50px;
        bottom: 20%;
        left: 1%;
    }

    .floating-img-4 {
        width: 65px;
        height: 48px;
        bottom: 17%;
        right: 1%;
        left: auto;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .floating-img {
        animation: none !important;
    }

    .floating-lightbox-img {
        animation: none !important;
        transform: scale(1) !important;
    }
}

/* ==================== LIGHTBOX MODAL ==================== */
.floating-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, background 0.4s ease, visibility 0.4s ease;
}

.floating-lightbox.active {
    opacity: 1;
    visibility: visible;
    background: rgba(0, 0, 0, 0.9);
}

.floating-lightbox-img {
    max-width: 90%;
    max-height: 85%;
    border-radius: 15px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 255, 255, 0.1);
    transform: scale(0.3);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.floating-lightbox.active .floating-lightbox-img {
    transform: scale(1);
    opacity: 1;
}

/* Close button */
.floating-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 45px;
    color: white;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease 0.2s, transform 0.3s ease 0.2s, color 0.2s ease;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 10000;
}

.floating-lightbox.active .floating-lightbox-close {
    opacity: 0.8;
    transform: translateY(0);
}

.floating-lightbox-close:hover {
    opacity: 1;
    color: #ff6b6b;
}

/* Make floating images look clickable */
.floating-img {
    cursor: pointer;
}

/* Mobile lightbox adjustments */
@media (max-width: 767px) {
    .floating-lightbox-img {
        max-width: 95%;
        max-height: 70%;
        border-radius: 10px;
    }

    .floating-lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 35px;
    }
}