/* Mobile-Specific Enhancements for KeyShift Media */

/* Logo text responsive styling */
.sitename {
    font-size: 2.8rem !important;
    line-height: 1.2;
    letter-spacing: 0.1rem;
}

/* Green dot styling */
.sitename span {
    color: #39b54a !important;
    font-weight: bold;
    margin-left: 0.1rem;
}

/* Responsive logo text sizing - larger sizes for better mobile visibility */
@media only screen and (max-width: 768px) {
    .sitename {
        font-size: 2.4rem !important;
    }
}

@media only screen and (max-width: 600px) {
    .sitename {
        font-size: 2.2rem !important;
    }
}

@media only screen and (max-width: 480px) {
    .sitename {
        font-size: 2rem !important;
    }
}

@media only screen and (max-width: 400px) {
    .sitename {
        font-size: 1.8rem !important;
        letter-spacing: 0.05rem;
    }
}

/* Enhanced touch targets for better mobile usability */
@media only screen and (max-width: 768px) {
    /* Minimum 44px touch targets as per accessibility guidelines */
    .btn, 
    .header-menu-toggle,
    .header-nav__close,
    .home-content__scroll,
    .contact-form input,
    .contact-form textarea,
    .contact-form button,
    .header-nav__list a {
        min-height: 44px;
        min-width: 44px;
    }

    /* Improved button spacing for mobile */
    .btn {
        padding: 1.2rem 3rem;
        margin: 0.5rem;
        font-size: 1.4rem;
    }

    /* Enhanced mobile navigation */
    .header-nav__list {
        padding: 2rem 0;
    }

    .header-nav__list li {
        margin-bottom: 1rem;
    }

    .header-nav__list a {
        padding: 1.2rem 0;
        font-size: 1.8rem;
        display: block;
    }

    /* Mobile-friendly forms */
    .contact-form input,
    .contact-form textarea {
        font-size: 1.6rem;
        padding: 1.5rem 2rem;
        border-radius: 0.8rem;
        -webkit-appearance: none;
        appearance: none;
    }

    /* Prevent zoom on input focus */
    .contact-form input[type="text"],
    .contact-form input[type="email"],
    .contact-form textarea {
        font-size: 16px; /* Prevents iOS zoom */
    }

    /* Mobile-optimized images */
    img {
        height: auto;
        max-width: 100%;
        object-fit: cover;
    }

    /* Better mobile typography */
    body {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    /* Smoother scrolling on mobile */
    html {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    /* Enhanced tap targets for social links */
    .home-social a,
    .header-nav__social a {
        padding: 1rem;
        margin: 0.5rem;
        border-radius: 0.5rem;
        display: inline-block;
        min-width: 44px;
        min-height: 44px;
        text-align: center;
        line-height: 24px;
    }

    /* Mobile-optimized portfolio grid */
    .masonry-wrap {
        padding: 0 2rem;
    }

    /* Better mobile spacing */
    .row {
        margin: 0 -15px;
    }

    .column {
        padding: 0 15px;
        margin-bottom: 3rem;
    }
}

/* Extra small mobile devices */
@media only screen and (max-width: 480px) {
    /* Further reduce font sizes for very small screens */
    .home-content h1 {
        font-size: 3rem !important;
        line-height: 1.2;
    }

    .about-desc {
        font-size: 2rem !important;
        line-height: 1.6;
    }

    /* Smaller padding for tiny screens */
    .s-home,
    .s-about,
    .s-services,
    .s-works,
    .s-clients,
    .s-contact {
        padding: 10rem 0 6rem;
    }

    /* More compact navigation */
    .header-nav__content {
        padding: 2rem;
    }

    .header-nav__list a {
        font-size: 1.6rem;
    }
}

/* High DPI displays - better image quality */
@media only screen and (-webkit-min-device-pixel-ratio: 2),
       only screen and (min-device-pixel-ratio: 2),
       only screen and (min-resolution: 192dpi),
       only screen and (min-resolution: 2dppx) {
    /* Use higher quality images for retina displays */
    .hero-bg,
    .contact-bg {
        background-size: cover;
        background-position: center;
    }
}

/* Landscape orientation optimizations */
@media only screen and (max-height: 500px) and (orientation: landscape) {
    .s-home {
        min-height: 400px;
    }

    .home-content__main {
        padding-top: 8rem;
    }

    .home-content h1 {
        font-size: 2.8rem;
    }
}

/* Dark mode support for mobile */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
    /* Adjust colors for better mobile dark mode experience */
    .contact-form input,
    .contact-form textarea {
        background-color: rgba(255, 255, 255, 0.1);
        color: #fff;
        border-color: rgba(255, 255, 255, 0.2);
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Better mobile performance optimizations */
@media only screen and (max-width: 768px) {
    /* Optimize animations for mobile */
    * {
        will-change: auto;
    }

    /* Reduce expensive filters on mobile */
    .blur,
    .shadow-heavy {
        filter: none;
        box-shadow: none;
    }

    /* Improve mobile scrolling performance */
    .scroll-container {
        -webkit-overflow-scrolling: touch;
        overflow-scrolling: touch;
    }
}