/* ===================================
   CREATIVE MOBILE ENHANCEMENTS
   =================================== */

/* Mobile-First Animations */
@keyframes slideUpMobile {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleInMobile {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInStagger {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Hero Section */
@media (max-width: 768px) {

    /* Enhanced Hero Typography */
    .font-feathergraphy {
        font-size: 3rem !important;
        line-height: 1.2;
        text-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    /* Mobile Hero Content */
    section[style*="background-image"] {
        background-attachment: scroll !important;
        background-size: cover;
        position: relative;
    }

    /* Improved Mobile Spacing */
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    /* Force hero padding override */
    .mobile-hero {
        padding-top: 10rem !important;
    }

    /* Mobile Card Stagger Animation */
    /* Mobile Card Stagger Animation - Disabled for stability */
    .grid>div:nth-child(1) {
        /* animation: fadeInStagger 0.6s ease-out 0.1s both; */
        opacity: 1;
    }

    .grid>div:nth-child(2) {
        /* animation: fadeInStagger 0.6s ease-out 0.2s both; */
        opacity: 1;
    }

    .grid>div:nth-child(3) {
        /* animation: fadeInStagger 0.6s ease-out 0.3s both; */
        opacity: 1;
    }

    /* Enhanced Mobile Images */
    img {
        border-radius: 1rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    /* Mobile-Optimized Buttons */
    .btn-primary,
    a[class*="bg-"] {
        padding: 1rem 2rem !important;
        font-size: 1.125rem !important;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 20px rgba(0, 180, 166, 0.3);
    }

    /* Touch-Friendly Testimonials */
    .testimonial-card {
        margin-bottom: 1.5rem;
        transform: scale(1);
        transition: transform 0.3s ease;
    }

    .testimonial-card:active {
        transform: scale(0.98);
    }

    /* Mobile Gallery Enhancement */
    .distorted-gallery {
        padding: 2rem 1rem;
    }

    /* Improved Mobile Form */
    input,
    textarea {
        font-size: 16px !important;
        /* Prevents zoom on iOS */
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
        padding-right: 1rem !important;
        /* padding-left handled by utility classes or specific rule below */
        border-radius: 0.75rem !important;
    }

    /* Ensure specific icon padding for contact form */
    #contact-form input,
    #contact-form textarea {
        padding-left: 3rem !important;
    }

    /* Mobile Section Spacing */
    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    /* Enhanced Mobile Typography */
    h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }

    h2 {
        font-size: 2rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1.5rem !important;
    }

    h3 {
        font-size: 1.5rem !important;
    }

    p {
        font-size: 1rem !important;
        line-height: 1.7 !important;
    }

    /* Mobile-Optimized Cards */
    .card-hover {
        border-radius: 1.25rem;
        overflow: hidden;
    }

    /* Sticky Mobile Header - DISABLED to fix overlay */
    #header {
        /* position: sticky; */
        /* top: 0; */
        z-index: 1000;
    }

    /* Mobile Footer Optimization */
    footer {
        padding-top: 2rem !important;
    }

    footer .grid {
        gap: 2rem !important;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {

    /* Compact Hero */
    .font-feathergraphy {
        font-size: 2.5rem !important;
    }

    /* Smaller Cards */
    .card-hover {
        padding: 1.25rem !important;
    }

    /* Compact Buttons */
    .btn-primary,
    a[class*="bg-"] {
        padding: 0.875rem 1.5rem !important;
        font-size: 1rem !important;
    }

    /* Tighter Spacing */
    section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* Smaller Typography */
    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }
}

/* ===================================
   MOBILE IMAGE ENHANCEMENTS
   =================================== */

@media (max-width: 768px) {

    /* Parallax-like Effect for Background Images */
    section[style*="background-image"] {
        background-attachment: scroll;
        background-position: center center;
        background-size: cover;
        position: relative;
        overflow: hidden;
    }

    section[style*="background-image"]::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: inherit;
        transform: scale(1.1);
        z-index: -1;
    }

    /* Image Grid Improvements */
    .lg\:w-1\/2 img {
        width: 100%;
        height: auto;
        aspect-ratio: 4/3;
        object-fit: cover;
        border-radius: 1.5rem;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    }

    /* Creative Image Masks */
    .image-hover-zoom img {
        clip-path: none;
        border-radius: 1.5rem;
    }
}

/* ===================================
   MOBILE CONTENT LAYOUTS
   =================================== */

@media (max-width: 768px) {

    /* Zigzag Content Layout */
    .flex-col:nth-child(odd) {
        animation: slideInLeft 0.8s ease-out both;
    }

    .flex-col:nth-child(even) {
        animation: slideInRight 0.8s ease-out both;
    }

    /* Card Stack Effect */
    .grid>div {
        position: relative;
        margin-bottom: 1.5rem;
    }

    /* Floating Action Buttons */
    a[href="#contact"] {
        position: relative;
        overflow: visible;
    }

    a[href="#contact"]::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 100%;
        height: 100%;
        background: inherit;
        border-radius: inherit;
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.3;
        animation: pulseRing 2s infinite;
    }

    @keyframes pulseRing {
        0% {
            transform: translate(-50%, -50%) scale(0.8);
            opacity: 0.5;
        }

        50% {
            transform: translate(-50%, -50%) scale(1.2);
            opacity: 0;
        }

        100% {
            transform: translate(-50%, -50%) scale(0.8);
            opacity: 0;
        }
    }

    /* Mobile Section Dividers */
    section+section {
        position: relative;
    }

    section+section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 4px;
        background: linear-gradient(90deg, #00b4a6, #f4b3ce);
        border-radius: 2px;
    }
}

/* ===================================
   MOBILE TOUCH INTERACTIONS
   =================================== */

@media (max-width: 768px) {

    /* Touch Feedback */
    button,
    a,
    .card-hover {
        -webkit-tap-highlight-color: rgba(0, 180, 166, 0.2);
        touch-action: manipulation;
    }

    /* Active States for Touch */
    button:active,
    a:active {
        transform: scale(0.97);
        transition: transform 0.1s ease;
    }

    .card-hover:active {
        transform: scale(0.98) translateY(2px);
    }

    /* Swipe Indicators */
    .distorted-gallery__controls-wrapper {
        position: relative;
    }

    .distorted-gallery__controls-wrapper::before {
        content: '← Swipe →';
        position: absolute;
        top: -30px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.875rem;
        color: rgba(0, 0, 0, 0.4);
        animation: fadeInOut 3s infinite;
    }

    @keyframes fadeInOut {

        0%,
        100% {
            opacity: 0.3;
        }

        50% {
            opacity: 0.7;
        }
    }
}

/* ===================================
   MOBILE PERFORMANCE OPTIMIZATIONS
   =================================== */

@media (max-width: 768px) {
    /* Reduce Motion for Performance */
    @media (prefers-reduced-motion: reduce) {

        *,
        *::before,
        *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }

    /* Hardware Acceleration */
    .card-hover,
    .btn-primary,
    img {
        transform: translateZ(0);
        backface-visibility: hidden;
    }

    /* Optimize Shadows for Mobile */
    .shadow-lg,
    .shadow-2xl {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    }
}

/* ===================================
   MOBILE NAVIGATION ENHANCEMENTS
   =================================== */

@media (max-width: 768px) {

    /* Animated Mobile Menu */
    #mobile-menu {
        background: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), url('images/shop1/image2.jpg') !important;
        background-size: cover;
        background-position: center;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    }

    #mobile-menu nav ul li {
        opacity: 0;
        transform: translateX(-30px);
    }

    #mobile-menu.flex nav ul li {
        animation: slideInFromLeft 0.4s ease-out forwards;
    }

    #mobile-menu nav ul li:nth-child(1) {
        animation-delay: 0.1s;
    }

    #mobile-menu nav ul li:nth-child(2) {
        animation-delay: 0.2s;
    }

    #mobile-menu nav ul li:nth-child(3) {
        animation-delay: 0.3s;
    }

    /* Mobile Menu Links */
    #mobile-menu a {
        position: relative;
        display: inline-block;
        padding: 0.5rem 0;
    }

    #mobile-menu a::after {

        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 3px;
        background: linear-gradient(90deg, #00b4a6, #f4b3ce);
        transition: width 0.3s ease;
    }

    #mobile-menu a:active::after {
        width: 100%;
    }
}