/* ************************************************************
:: Template Name: Digimax - SEO & Digital Marketing Agency HTML Template
:: Template URI: https://theme-land.com/digimax/
:: Template Author Name: theme_land
:: Template Author URI: hridoy1272@gmail.com
:: Version: 1.0.0
:: Created: 15 Aug 2020
************************************************************ 
*
*
******* :: INDEX OF RESPONSIVE CSS :: *******
:: 1.0 COMMON CSS
:: 2.0 HEADER AREA CSS
:: 3.0 WELCOME AREA CSS
:: 4.0 PROMO AREA CSS
:: 5.0 CONTENT AREA CSS
:: 6.0 SERVICE AREA CSS
:: 7.0 PRICE PLAN AREA CSS
:: 8.0 FAQ AREA CSS
:: 9.0 REVIEWS AREA CSS
:: 10.0 TEAM AREA CSS
:: 11.0 BREADCRUMB AREA CSS
:: 12.0 BLOG PAGE DETAILS AREA CSS
:: 13.0 CONTACT AREA CSS
:: 14.0 FOOTER AREA CSS
:: 15.0 ERROR AREA CSS
:: 16.0 PREVIEW AREA CSS
****************************** */

/* ******************************
:: 1.0 COMMON CSS
****************************** */
@media only screen and (min-width: 768px) and (max-width: 991px) {
    .ptb_180 {
        padding: 130px 0;
    }

    .ptb_150 {
        padding: 100px 0;
    }

    .ptb_100 {
        padding: 70px 0;
    }
}

@media (max-width: 991px) {
    .res-margin {
        margin-bottom: 45px;
    }
}

@media (max-width: 767px) {
    .ptb_180 {
        padding: 130px 0;
    }

    .ptb_150,
    .ptb_100 {
        padding: 50px 0;
    }

    .res-margin {
        margin-bottom: 30px;
    }
}

@media (max-width: 575px) {
    .avatar-lg {
        height: 4rem;
        width: 4rem;
    }

    .ptb_180 {
        padding: 80px 0;
    }

    .single-counter span {
        font-size: 3em;
    }
}

/*SECTION HEADING*/
@media (max-width: 991px) {
    h1 {
        font-size: 3em;
    }

    h2 {
        font-size: 36px;
    }

    .section-heading {
        margin-bottom: 50px;
    }
}

@media (max-width: 767px) {
    h1 {
        font-size: 2.8em;
    }

    h2 {
        font-size: 30px;
        line-height: 1.4;
    }
}

@media (max-width: 575px) {
    h1 {
        font-size: 2em;
        line-height: 1.4;
    }

    h2 {
        font-size: 24px;
        line-height: 1.4;
    }

    h3 {
        font-size: 18px;
        line-height: 1.4;
    }

    p {
        line-height: 26px;
    }
}

/*BUTTONS*/
@media (max-width: 575px) {
    .button-group a {
        margin-top: 0;
        margin-right: 5px;
    }
}

/* ******************************
:: 2.0 HEADER AREA CSS
****************************** */
@media(max-width: 1199px) {
    header .navbar-expand .navbar-nav.toggle {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
    }

    header .navbar-expand .navbar-nav.items,
    header .navbar-expand .navbar-nav.icons .social {
        display: none;
    }
}

@media(max-width: 767px) {
    header .navbar-expand .navbar-nav.action .btn {
        padding: 5px 10px;
        font-size: 0;
    }

    header .navbar-expand .navbar-nav.action .btn .contact-icon {
        font-size: initial;
        margin: 0;
    }

    .navbar-brand {
        margin: 0;
    }
}

@media (max-width: 575px) {
    .modal-body {
        -webkit-box-align: start;
        -ms-flex-align: start;
        align-items: start;
    }

    .search-title {
        font-size: 40px;
    }
}

/* ******************************
:: 3.0 WELCOME AREA CSS
****************************** */
@media (min-width: 992px) {
    .homepage-3 .welcome-intro h1 {
        font-size: 65px;
    }
}

@media (max-width: 991px) {
    .welcome-area,
    .inner .welcome-area {
        height: 700px !important;
    }

    .welcome-thumb-2 {
        left: -22%;
    }

    .welcome-thumb-3 {
        left: 25%;
    }

    .welcome-thumb-4 {
        right: -16%;
    }

    .welcome-thumb-5 {
        top: -25%;
        left: 2%;
    }

    .welcome-thumb-6 {
        top: -16%;
    }
}

@media (max-width: 767px) {
    .welcome-area {
        height: 100% !important;
        padding-top: 100px !important;
        margin-top: 0 !important;
    }

    .welcome-intro {
        margin-top: 0 !important;
    }

    .welcome-intro h1 {
        font-size: 50px;
    }

    .welcome-thumb-2 {
        left: 15%;
    }

    .welcome-thumb-3 {
        left: 48%;
    }

    .welcome-thumb-4 {
        right: 0;
    }

    .welcome-thumb-5 {
        top: -10%;
        left: 25%;
    }

    .welcome-thumb-6 {
        top: -8%;
    }

    .homepage-3 .welcome-thumb-1 {
        width: auto;
    }

    .homepage-3 .welcome-thumb-2,
    .homepage-3 .welcome-thumb-3,
    .homepage-3 .welcome-thumb-4 {
        width: auto;
        max-width: 320px;
    }
}

@media (max-width: 575px) {
    .welcome-area {
        padding-top: 90px !important;
        margin-top: 0 !important;
    }
    
    .welcome-intro {
        margin-top: 0;
    }

    .welcome-intro h1 {
        font-size: 45px;
    }

    .welcome-thumb-2 {
        left: -4%;
    }

    .welcome-thumb-3 {
        left: 38%;
    }

    .welcome-thumb-4 {
        right: -13%;
    }

    .welcome-thumb-5 {
        left: 2%;
    }

    .welcome-thumb-6 {
        top: -6%;
    }

    .homepage-3 .welcome-thumb-2,
    .homepage-3 .welcome-thumb-3,
    .homepage-3 .welcome-thumb-4 {
        width: auto;
        max-width: 250px;
    }
}

/* ******************************
:: 4.0 PROMO AREA CSS
****************************** */
@media (max-width: 991px) {
    .single-promo h3 {
        font-size: 45px;
    }
    
    .whyus-card h3 {
        word-wrap: break-word;
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .single-promo h3 {
        font-size: 40px;
    }
    
    .whyus-card h3 {
        word-wrap: break-word;
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
}

/* ******************************
:: 5.0 CONTENT AREA CSS
****************************** */
@media (max-width: 991px) {
    .profile-circle-wrapper {
        overflow: hidden;
        border-bottom: 1px solid rgba(0, 0, 0, 0.09);
    }
}

/* ******************************
:: 6.0 SERVICE AREA CSS
****************************** */
@media (max-width: 575px) {
    .service-area .col-12:last-of-type .single-service.service-gallery {
        margin-bottom: 0;
    }
}

/* ******************************
:: 7.0 PRICE PLAN AREA CSS
****************************** */
@media(max-width: 991px) {
    .plan-price span:not(.h1) {
        font-size: 30px;
    }

    .plan-price sub {
        font-size: 20px;
    }
}

@media (max-width: 575px) {
    .plan-price span:not(.h1) {
        font-size: 26px;
    }
}

/* ******************************
:: 8.0 FAQ AREA CSS
****************************** */
@media (max-width: 575px) {
    .card-header .btn {
        line-height: 1.4;
    }
}

/* ******************************
:: 9.0 REVIEWS AREA CSS
****************************** */
@media (max-width: 575px) {
    .single-review {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .owl-item.active.center .single-review {
        -webkit-transform: scale(1);
        transform: scale(1);
    }
}

/* ******************************
:: 10.0 TEAM AREA CSS
****************************** */
@media (max-width: 575px) {
    .team-area .col-12:last-of-type .single-team {
        margin-bottom: 0;
    }
}

/* ******************************
:: 11.0 BREADCRUMB AREA CSS
****************************** */
@media (max-width: 991px) {
    .breadcrumb-content > h2 {
        font-size: 54px;
    }
}

@media (max-width: 575px) {
    .breadcrumb-content > h2 {
        font-size: 45px;
    }
}

/* **********************************
:: 12.0 BLOG PAGE DETAILS AREA CSS
*************************************/
@media (max-width: 991px) {

    .comments,
    .blog-contact {
        margin-left: 0;
        margin-right: 200px;
    }
}

@media (max-width: 767px) {

    .comments,
    .blog-contact {
        margin-right: 0;
    }
}

/* ******************************
:: 13.0 CONTACT AREA CSS
****************************** */
@media (max-width: 575px) {
    .contact-info h3 {
        font-size: 28px;
    }

    .map-area {
        height: 450px;
    }
}

/* ******************************
:: 14.0 FOOTER AREA CSS
****************************** */
@media only screen and (min-width: 576px) and (max-width: 991px) {
    .footer-items {
        margin-bottom: 30px;
    }
}

@media (max-width: 575px) {
    .footer-items {
        margin-bottom: 30px;
    }

    .footer-area .col-12:last-of-type .footer-items {
        margin-bottom: 0;
    }
    
    /* Left-align footer content on mobile */
    .footer-area .col-12,
    .footer-area .col-12 .footer-items {
        text-align: left !important;
    }
    
    .footer-title {
        text-align: left !important;
    }
    
    .footer-items {
        text-align: left !important;
    }
    
    .footer-items ul {
        text-align: left !important;
    }
    
    .footer-items .contact-links {
        text-align: left !important;
        display: block !important;
    }
    
    .footer-items .contact-links li {
        text-align: left !important;
        display: block !important;
    }
    
    .footer-items .contact-links a {
        text-align: left !important;
        justify-content: flex-start !important;
        width: 100% !important;
    }
    
    .footer-text {
        text-align: left !important;
    }
}

/* Ensure copyright area items stay on same line */
@media (max-width: 767px) {
    .copyright-area {
        flex-wrap: nowrap !important;
        font-size: 12px;
        overflow: hidden;
    }
    
    .copyright-left {
        white-space: nowrap;
        flex-shrink: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .copyright-left img {
        flex-shrink: 0;
    }
    
    .copyright-left span {
        white-space: nowrap;
    }
    
    .copyright-right {
        white-space: nowrap;
        flex-shrink: 0;
        margin-left: 10px;
    }
}

@media (max-width: 575px) {
    .copyright-area {
        font-size: 11px;
        gap: 8px;
    }
    
    .copyright-left {
        font-size: 10px;
    }
    
    .copyright-left span {
        display: inline;
    }
    
    .copyright-right {
        font-size: 10px;
        margin-left: 8px;
    }
}

@media (max-width: 375px) {
    .copyright-area {
        font-size: 9px;
    }
    
    .copyright-left {
        font-size: 9px;
    }
    
    .copyright-right {
        font-size: 9px;
    }
    
    .copyright-left img {
        height: 16px !important;
        margin-right: 6px !important;
    }
}

/* ******************************
:: 15.0 ERROR AREA CSS
****************************** */
@media only screen and (max-width: 991px) {
    .error-content {
        padding-top: 45%;
    }
}

@media only screen and (max-width: 575px) {
    .error-content {
        padding-top: 50%;
    }

    .thumb-2 {
        top: 12%;
        left: 8%;
    }

    .thumb-3 {
        top: 5%;
        left: 30%;
    }

    .astronaut {
        top: 70%;
    }
}

/* ******************************
:: 16.0 PREVIEW AREA CSS
****************************** */
@media (min-width: 992px) {
    .preview .welcome-intro p {
        font-size: 15px;
        line-height: 28px;
    }
}

@media (max-width: 991px) {
    .preview .welcome-area {
        background-position: unset;
    }

    .preview .welcome-intro h2,
    .preview-area h2 {
        font-size: 50px;
    }
}

@media (max-width: 767px) {
    .preview .welcome-area {
        height: 700px !important;
        padding-top: 0;
    }
}

@media (max-width: 575px) {

    .preview .welcome-intro h2,
    .preview-area h2 {
        font-size: 42px;
    }
}

/* ******************************
:: 17.0 MOBILE OPTIMIZATION ENHANCEMENTS
****************************** */

/* Touch-friendly interactive elements */
@media (max-width: 767px) {
    /* Minimum touch target size (44x44px recommended by Apple/Google) */
    .nav-link,
    .btn,
    a {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Button spacing for easier tapping */
    .button-group a {
        margin: 5px;
        padding: 12px 20px;
    }
    
    /* Form inputs optimization */
    .form-control,
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 15px;
        min-height: 44px;
    }
    
    /* Text readability */
    body {
        font-size: 16px;
        line-height: 1.6;
    }
    
    p {
        font-size: 16px;
        line-height: 1.7;
        margin-bottom: 1rem;
    }
    
    /* Image optimization */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Container padding for small screens */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Section spacing */
    .ptb_100 {
        padding: 40px 0;
    }
    
    .ptb_150 {
        padding: 50px 0;
    }
    
    /* Navigation menu mobile */
    .navbar-nav.action .btn {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    /* Service cards */
    .single-service {
        margin-bottom: 20px;
        padding: 20px 15px;
    }
    
    /* Portfolio items */
    .portfolio-item {
        margin-bottom: 20px;
    }
    
    /* Contact info cards */
    .contact-info {
        margin-bottom: 15px;
        padding: 20px 15px;
    }
    
    /* Footer spacing */
    .footer-items {
        margin-bottom: 30px;
    }
    
    /* Ensure footer contact links are left-aligned on mobile */
    .footer-area .row .col-12 {
        text-align: left !important;
    }
    
    .footer-items .contact-links {
        text-align: left !important;
    }
    
    .footer-items .contact-links li {
        text-align: left !important;
    }
    
    .footer-items .contact-links a {
        text-align: left !important;
        justify-content: flex-start !important;
    }
    
    .footer-title {
        text-align: left !important;
    }
    
    .footer-items {
        text-align: left !important;
    }
}

/* Extra small devices (phones in portrait) */
@media (max-width: 375px) {
    h1 {
        font-size: 1.75em;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 22px;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 18px;
        line-height: 1.4;
    }
    
    /* Reduce padding further */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .ptb_100 {
        padding: 30px 0;
    }
    
    /* Button text size */
    .btn {
        font-size: 14px;
        padding: 10px 18px;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .welcome-area {
        min-height: 100vh;
        padding-top: 80px !important;
    }
    
    .welcome-intro h1 {
        font-size: 2.5em;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Accessibility improvements for mobile */
@media (max-width: 767px) {
    /* Focus states for keyboard navigation */
    a:focus,
    button:focus,
    input:focus,
    textarea:focus {
        outline: 2px solid #0066cc;
        outline-offset: 2px;
    }
    
    /* Readable line lengths */
    .container {
        max-width: 100%;
    }
    
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
        width: 100%;
    }
    
    * {
        max-width: 100%;
    }
}

/* Performance optimizations */
@media (max-width: 767px) {
    /* Reduce animations on mobile for better performance */
    * {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* Optimize carousels */
    .owl-carousel {
        touch-action: pan-y;
    }
}

/* ******************************
:: 18.0 IMAGE AND OVERLAP FIXES
****************************** */

/* Fix portfolio image overlapping */
@media (max-width: 991px) {
    .portfolio-item {
        margin-bottom: 30px;
    }
    
    .single-case-studies {
        margin-bottom: 30px;
    }
    
    .single-case-studies > a {
        display: block;
        position: relative;
        overflow: hidden;
    }
    
    .single-case-studies img {
        width: 100%;
        height: auto;
        display: block;
    }
}

@media (max-width: 767px) {
    .portfolio-item {
        margin-bottom: 20px;
    }
    
    .single-case-studies {
        margin-bottom: 20px;
    }
    
    /* Ensure portfolio images don't overflow */
    .portfolio-items {
        margin: 0;
    }
    
    .portfolio-item {
        padding: 0 10px;
        margin-bottom: 20px;
    }
    
    /* Fix service cards spacing */
    .single-service {
        margin-bottom: 20px;
    }
    
    /* Fix testimonial images */
    .single-review {
        margin-bottom: 20px;
    }
    
    /* Prevent testimonial container expansion during transitions */
    .testimonial-mobile-slider {
        overflow: hidden !important;
    }
    
    .testimonial-mobile-slider .single-review.is-leaving {
        margin-bottom: 0 !important;
    }
    
    .reviewer {
        margin-top: 15px;
    }
    
    .reviewer-thumb {
        flex-shrink: 0;
    }
    
    .reviewer-meta {
        min-width: 0;
    }
}

/* Fix welcome area image on mobile */
@media (max-width: 767px) {
    .welcome-thumb-wrapper {
        margin-top: 30px;
        text-align: center;
    }
    
    .welcome-thumb-1 {
        display: block;
        margin: 0 auto;
        max-width: 100%;
    }
    
    .welcome-animation {
        max-width: 100%;
        height: auto;
    }
}

/* Fix contact info cards overlapping */
@media (max-width: 767px) {
    .contact-us ul {
        padding: 0;
        margin: 0;
    }
    
    .contact-info {
        margin: 10px 0 !important;
        width: 100%;
    }
}

/* Fix promo cards */
@media (max-width: 767px) {
    .single-promo {
        margin-bottom: 20px;
    }
    
    .whyus-card {
        margin-bottom: 20px;
    }
}

/* Ensure proper z-index stacking */
@media (max-width: 991px) {
    .case-studies-overlay {
        z-index: 10;
    }
    
    .single-case-studies > a {
        z-index: 1;
    }
}

/* Fix image aspect ratios */
@media (max-width: 767px) {
    .portfolio-item img,
    .single-case-studies img {
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }
    
    /* Service detail images */
    .servicedetail-area .container img {
        max-width: 100%;
        height: auto;
        margin: 20px 0;
    }
    
    /* Portfolio detail images */
    .portfolio-featured-image {
        margin: 20px 0;
    }
    
    .portfolio-featured-image img {
        width: 100%;
        height: auto;
        max-height: none;
    }
}

/* Fix blog images */
@media (max-width: 767px) {
    .blog-thumb img,
    .post-thumb img {
        width: 100%;
        height: auto;
        margin-bottom: 15px;
    }
}

/* Prevent horizontal scroll */
@media (max-width: 767px) {
    body {
        overflow-x: hidden;
        width: 100%;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100%;
    }
    
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .row > [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }
}