/*========================================
    Modern Responsive Home Page CSS
    Fix for image responsiveness & modern design
=========================================*/

/* ====================================
   1. Image Responsive Fixes
======================================= */

/* Ensure all images are responsive by default */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Fix for background images */
.header-area.header-bg,
.slider-img,
.single-blog-grid-01,
.quality-img {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative;
}

/* Object-fit for modern browsers */
.img-wrapper img,
.experience-img img,
.thumb img,
.only-mobile-version-show img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Prevent image overflow */
.single-brand .img-wrapper,
.img-icon,
.testimonial-carousel .thumb {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ====================================
   2. Modern Hero Section
======================================= */
.header-area {
    min-height: 650px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.header-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

.header-area .container,
.header-area .row,
.header-area .header-inner {
    position: relative;
    z-index: 2;
}

.header-inner .title {
    font-size: 56px;
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease-out;
}

.header-inner .subtitle {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
    animation: fadeInUp 0.6s ease-out;
}

.header-inner .description {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease-out;
}

/* ====================================
   3. Modern Button Styles
======================================= */
.boxed-btn {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.boxed-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.boxed-btn:hover::before {
    left: 100%;
}

.boxed-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* ====================================
   4. Modern Card Styles
======================================= */
.single-what-we-cover-item,
.single-price-plan-01,
.single-blog-grid-01,
.single-testimonial-item {
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.single-what-we-cover-item:hover,
.single-price-plan-01:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.single-what-we-cover-item .icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.single-what-we-cover-item:hover .icon {
    transform: scale(1.1) rotate(5deg);
}

/* ====================================
   5. Quality/Feature Section
======================================= */
.quality-img {
    min-height: 600px;
    position: relative;
}

.quality-content {
    display: flex;
    align-items: center;
    min-height: 600px;
    padding: 60px;
}

.quality-content-wrapper {
    max-width: 600px;
}

/* ====================================
   6. Modern Animations
======================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* ====================================
   7. Responsive Design
======================================= */

/* Tablet Landscape (1024px and below) */
@media only screen and (max-width: 1024px) {
    .header-area {
        min-height: 550px;
    }
    
    .header-inner .title {
        font-size: 42px;
    }
    
    .quality-content {
        padding: 40px;
    }
    
    .quality-img {
        min-height: 450px;
    }
}

/* Tablet Portrait (768px and below) */
@media only screen and (max-width: 768px) {
    .header-area {
        min-height: 500px;
        padding: 40px 0;
    }
    
    .header-inner .title {
        font-size: 36px;
        line-height: 1.3;
    }
    
    .header-inner .subtitle {
        font-size: 14px;
    }
    
    .header-inner .description {
        font-size: 16px;
    }
    
    .boxed-btn {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    .quality-img {
        min-height: 350px;
        display: block !important;
    }
    
    .quality-content {
        padding: 40px 20px;
        min-height: auto;
    }
    
    /* Fix for images on mobile */
    .only-mobile-version-show {
        display: block !important;
        width: 100%;
        margin-bottom: 30px;
    }
    
    .only-mobile-version-show img {
        width: 100%;
        height: auto;
        max-height: 350px;
        object-fit: cover;
        border-radius: 10px;
    }
    
    /* Hide desktop images on mobile */
    .col-lg-6 .quality-img {
        display: none !important;
    }
    
    /* Cards full width on mobile */
    .single-what-we-cover-item,
    .single-price-plan-01,
    .single-blog-grid-01 {
        margin-bottom: 30px;
    }
}

/* Mobile (576px and below) */
@media only screen and (max-width: 576px) {
    .header-area {
        min-height: 450px;
        padding: 30px 0;
    }
    
    .header-inner .title {
        font-size: 28px;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .header-inner .subtitle {
        font-size: 12px;
        letter-spacing: 1px;
        margin-bottom: 10px;
    }
    
    .header-inner .description {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 20px;
    }
    
    .boxed-btn {
        padding: 10px 25px;
        font-size: 12px;
        letter-spacing: 0.5px;
    }
    
    .quality-img {
        min-height: 250px;
    }
    
    .only-mobile-version-show img {
        max-height: 250px;
    }
    
    /* Section padding adjustments */
    section {
        padding-top: 50px !important;
        padding-bottom: 50px !important;
    }
    
    .padding-top-110 {
        padding-top: 50px !important;
    }
    
    .padding-bottom-120 {
        padding-bottom: 50px !important;
    }
    
    /* Icon adjustments */
    .single-what-we-cover-item .icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    /* Image sliders */
    .case-studies-slider-active .owl-item,
    .blog-grid-carousel .owl-item {
        padding: 0 10px;
    }
    
    /* Testimonials */
    .single-testimonial-item .thumb {
        width: 80px;
        height: 80px;
        margin: 0 auto 20px;
    }
    
    .single-testimonial-item .thumb img {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        object-fit: cover;
    }
}

/* Extra Small Mobile (425px and below) */
@media only screen and (max-width: 425px) {
    .header-inner .title {
        font-size: 24px;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* ====================================
   8. Image Gallery Improvements
======================================= */
.slider-img,
.single-blog-grid-01 {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    padding: 30px;
}

.slider-img::before,
.single-blog-grid-01::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
}

.slider-img .slider-inner-text,
.single-blog-grid-01 .content {
    position: relative;
    z-index: 2;
}

@media only screen and (max-width: 768px) {
    .slider-img,
    .single-blog-grid-01 {
        min-height: 300px;
        padding: 20px;
    }
}

/* ====================================
   9. Brand Logos Section
======================================= */
.single-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: all 0.3s ease;
}

.single-brand:hover {
    transform: scale(1.1);
}

.single-brand .img-wrapper {
    max-width: 150px;
    height: auto;
}

.single-brand img {
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.single-brand:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* ====================================
   10. Loading States & Performance
======================================= */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ====================================
   11. Accessibility Improvements
======================================= */
.boxed-btn:focus,
a:focus {
    outline: 2px dashed currentColor;
    outline-offset: 4px;
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {
    .header-area::before {
        background: rgba(0, 0, 0, 0.8);
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

