/* =========================================
   Responsive Fixes for Small Laptop Screens
   ========================================= */

/* Fix menu button visibility on dark backgrounds */
/* JavaScript adds 'mil-frame-on-dark' class when dark background is detected */
.mil-frame-on-dark .mil-menu-btn span,
.mil-frame-on-dark .mil-menu-btn span:after,
.mil-frame-on-dark .mil-menu-btn span:before,
.mil-frame.mil-frame-on-dark .mil-frame-top .mil-menu-btn span,
.mil-frame.mil-frame-on-dark .mil-frame-top .mil-menu-btn span:after,
.mil-frame.mil-frame-on-dark .mil-frame-top .mil-menu-btn span:before {
    background: #dc143c !important;
}

/* Ensure logo is visible on dark backgrounds too */
.mil-frame-on-dark .mil-frame-top .mil-logo {
    color: rgb(255, 255, 255) !important;
}

/* CSS-only fallback using :has() for modern browsers */
@supports selector(:has(*)) {
    body:has(.mil-banner.mil-dark-bg) .mil-frame .mil-menu-btn span,
    body:has(.mil-banner.mil-dark-bg) .mil-frame .mil-menu-btn span:after,
    body:has(.mil-banner.mil-dark-bg) .mil-frame .mil-menu-btn span:before {
        background: #dc143c !important;
    }

    body:has(.mil-banner.mil-dark-bg) .mil-frame-top .mil-logo {
        color: rgb(255, 255, 255) !important;
    }
}

/* Fix header and hero overlap on small laptops (1024px - 1200px) */
@media screen and (min-width: 993px) and (max-width: 1200px) {
    /* Ensure proper spacing in banner to avoid header overlap */
    .mil-banner .mil-banner-content {
        padding-top: 120px;
        padding-bottom: 100px;
    }

    /* Adjust heading sizes for better fit */
    .mil-banner .mil-banner-content h1 {
        font-size: 58px;
        margin-bottom: 50px !important;
    }

    /* Reduce paragraph size slightly */
    .mil-banner .mil-banner-content p {
        font-size: 15px;
        line-height: 160%;
    }

    /* Adjust logo size for better proportions */
    .mil-logo img {
        height: 35px !important;
    }

    /* Ensure frame has proper background on scroll */
    .mil-frame.mil-frame-top {
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
    }
}

/* Additional fixes for tablet landscape (768px - 992px) */
@media screen and (min-width: 769px) and (max-width: 992px) {
    .mil-banner .mil-banner-content {
        padding-top: 140px;
        padding-bottom: 80px;
    }

    .mil-banner .mil-banner-content h1 {
        font-size: 48px;
    }

    /* Adjust logo for tablets */
    .mil-logo img {
        height: 32px !important;
    }
}

/* Mobile optimizations (max-width: 768px) */
@media screen and (max-width: 768px) {
    /* Ensure adequate spacing on mobile */
    .mil-banner .mil-banner-content {
        padding-top: 120px;
        padding-bottom: 60px;
    }

    .mil-banner .mil-banner-content h1 {
        font-size: 32px;
        line-height: 130%;
        margin-bottom: 40px !important;
    }

    .mil-banner .mil-banner-content p {
        font-size: 14px;
        line-height: 150%;
    }

    /* Smaller logo on mobile */
    .mil-logo img {
        height: 28px !important;
    }

    /* Ensure menu button doesn't overlap with logo */
    .mil-frame-top {
        padding: 0 20px !important;
    }

    /* Adjust button spacing */
    .mil-button {
        height: 55px !important;
        font-size: 14px !important;
    }
}

/* Fix for very small laptops (1200px - 1366px) - 13 inch screens */
@media screen and (min-width: 1201px) and (max-width: 1366px) {
    .mil-banner .mil-banner-content {
        padding-top: 130px;
    }

    .mil-banner .mil-banner-content h1 {
        font-size: 54px !important;
        line-height: 115%;
    }
}

/* Fix for 1367px - 1440px (standard 13-15 inch laptops) */
@media screen and (min-width: 1367px) and (max-width: 1440px) {
    .mil-banner .mil-banner-content {
        padding-top: 120px;
    }

    .mil-banner .mil-banner-content h1 {
        font-size: 58px !important;
        line-height: 118%;
    }
}

/* Ensure smooth transitions between breakpoints */
.mil-banner .mil-banner-content,
.mil-banner .mil-banner-content h1,
.mil-banner .mil-banner-content p,
.mil-logo img {
    transition: all 0.3s ease-in-out;
}

/* Fix circle text positioning on small laptops */
@media screen and (min-width: 993px) and (max-width: 1200px) {
    .mil-circle-text {
        bottom: 80px;
        right: 80px;
    }
}

/* Additional safety: prevent any content from going under fixed header */
@media screen and (max-width: 1200px) {
    .mil-content {
        margin-top: 0;
    }

    /* Ensure the banner takes up proper space considering fixed header */
    .mil-banner {
        min-height: 100vh;
        display: flex;
        align-items: flex-end;
    }
}

/* =========================================
   Projects Logo Band - Red/Black/White Theme - Full Width
   ========================================= */

.mil-projects-band {
    background: #ffffff;
    padding: 120px 0 90px;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.mil-projects-band::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #000000 0%, #dc143c 50%, #000000 100%);
}

.mil-logos-band-wrapper {
    position: relative;
    padding: 40px 0;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.mil-logos-slider {
    overflow: visible !important;
    width: 100%;
}

.mil-logos-slider .swiper-wrapper {
    display: flex;
    align-items: center;
    transition-timing-function: linear !important;
}

.mil-logos-slider .swiper-slide {
    width: 260px !important;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 40px;
}

.mil-logo-band-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 150px;
    padding: 35px;
    background: #ffffff;
    border: 2px solid #f0f0f0;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.mil-logo-band-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.03) 0%, rgba(0, 0, 0, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.mil-logo-band-item:hover::before {
    opacity: 1;
}

.mil-logo-band-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(220, 20, 60, 0.15) 50%,
        transparent 100%);
    transition: left 0.6s ease;
}

.mil-logo-band-item:hover::after {
    left: 100%;
}

.mil-logo-band-item:hover {
    border-color: #dc143c;
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(220, 20, 60, 0.2);
}

.mil-logo-band-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(0%);
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.mil-logo-band-item:hover img {
    transform: scale(1.15);
    filter: grayscale(0%) brightness(1.08);
}

/* Responsive adjustments */
@media screen and (max-width: 1200px) {
    .mil-logos-slider .swiper-slide {
        width: 240px !important;
        margin-right: 35px;
    }

    .mil-logo-band-item {
        height: 140px;
        padding: 30px;
    }
}

@media screen and (max-width: 992px) {
    .mil-projects-band {
        padding: 100px 0 70px;
    }

    .mil-logos-band-wrapper {
        padding: 35px 0;
    }

    .mil-logos-slider .swiper-slide {
        width: 220px !important;
        margin-right: 30px;
    }

    .mil-logo-band-item {
        height: 130px;
        padding: 25px;
    }
}

@media screen and (max-width: 768px) {
    .mil-projects-band {
        padding: 80px 0 60px;
    }

    .mil-logos-band-wrapper {
        padding: 30px 0;
    }

    .mil-logos-slider .swiper-slide {
        width: 200px !important;
        margin-right: 25px;
    }

    .mil-logo-band-item {
        height: 120px;
        padding: 20px;
        border-radius: 12px;
    }
}

@media screen and (max-width: 480px) {
    .mil-logos-slider .swiper-slide {
        width: 180px !important;
        margin-right: 20px;
    }

    .mil-logo-band-item {
        height: 110px;
        padding: 18px;
    }
}
