/* ===== MOBILE RESPONSIVE STYLES ===== */
@media screen and (max-width: 768px) {
    /* ===== GENERAL MOBILE ADJUSTMENTS ===== */
    .navbar {
        padding: 1rem 5%;
        flex-direction: column;
        align-items: stretch;
    }

    .nav-toggle { display: block; }

    .nav-links { display: none; flex-direction: column; width: 100%; gap: 15px; margin-top: 10px; }
    .nav-links.show { display: flex; }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .hero {
        padding: 0 5%;
        min-height: 90vh;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
        max-width: 100%;
    }
    
    .hero-btns {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
        padding: 1rem 2rem;
    }
    
    .socials {
        gap: 1rem;
        margin-top: 2rem;
    }
    
    .socials a {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
    
    section {
        padding: 80px 5%;
    }
    
    section h2 {
        font-size: 2rem;
        margin-bottom: 2.5rem;
    }
    
    /* ===== ABOUT SECTION MOBILE ===== */
    .about {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .material-tile {
        padding: 25px;
    }
    
    /* ===== SERVICES MOBILE ===== */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .service-block {
        padding: 30px;
    }
    
    /* ===== PORTFOLIO MOBILE ===== */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .portfolio-item {
        aspect-ratio: 1 / 1;
    }
    
    /* ===== FEEDBACK MOBILE ===== */
    .feedback-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* ===== CONTACT MOBILE ===== */
    .contact {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    /* ===== MODAL - INSTAGRAM POST STYLE FOR MOBILE ===== */
    .modal-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        width: 95%;
        height: 95vh;
        max-width: 500px;
        max-height: 90vh;
        gap: 0;
        padding: 0;
        overflow: auto;
        border-radius: 0;
    }
    
    /* Top bar like Instagram */
    .modal::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 50px;
        background: var(--dark-rgba-95);
        z-index: 1001;
        border-bottom: 1px solid var(--glass-border);
    }
    
    /* Instagram-like header */
    .modal-header {
        position: sticky;
        top: 0;
        display: flex;
        align-items: center;
        padding: 1rem;
        background: var(--dark-rgba-95);
        border-bottom: 1px solid var(--glass-border);
        z-index: 1000;
        min-height: 50px;
    }
    
    .modal-user {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        flex: 1;
    }
    
    .modal-avatar {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: var(--gradient-accent);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: bold;
    }
    
    .modal-user-info h4 {
        font-size: 0.9rem;
        color: var(--light);
        margin: 0;
    }
    
    .modal-user-info span {
        font-size: 0.75rem;
        color: var(--medium);
    }
    
    .modal-more {
        background: none;
        border: none;
        color: var(--light);
        font-size: 1.2rem;
        cursor: pointer;
        padding: 0.5rem;
    }
    
    /* Image/video container - Instagram style */
    .modal-left {
        border-right: none;
        border-bottom: 1px solid var(--primary-rgba-20);
        padding: 0;
        height: auto;
        min-height: 300px;
        max-height: 60vh;
    }
    
    .modal-media-container {
        aspect-ratio: 1 / 1;
        min-height: 300px;
        max-height: 60vh;
        background: var(--darker);
    }
    
    .modal-left img,
    .modal-left video {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 0;
    }
    
    /* Instagram-like action buttons */
    .modal-actions {
        display: flex;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        background: var(--dark-medium);
        border-bottom: 1px solid var(--glass-border);
    }
    
    .modal-actions-left {
        display: flex;
        gap: 1rem;
    }
    
    .modal-action-btn {
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--light);
        cursor: pointer;
        transition: transform 0.2s ease;
    }
    
    .modal-action-btn:hover {
        transform: scale(1.1);
    }
    
    .like-btn.liked {
        color: var(--error);
    }
    
    .save-btn.saved {
        color: var(--warning);
    }
    
    /* Likes and comments section */
    .modal-stats {
        padding: 0.75rem 1rem;
        background: var(--dark-medium);
        border-bottom: 1px solid var(--glass-border);
    }
    
    .modal-likes {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
        color: var(--light);
        font-weight: 600;
        font-size: 0.9rem;
    }
    
    .modal-likes i {
        color: var(--error);
    }
    
    /* Description with timestamp */
    .modal-right {
        padding: 1rem;
        text-align: left;
        overflow-y: visible;
        background: var(--dark-medium);
    }
    
    .modal-project-title {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
        text-align: left;
        width: 100%;
    }
    
    .modal-description {
        font-size: 0.95rem;
        color: var(--light-medium);
        line-height: 1.5;
        margin-bottom: 1rem;
    }
    
    .modal-timestamp {
        font-size: 0.8rem;
        color: var(--medium);
        opacity: 0.7;
        margin-top: 0.5rem;
    }
    
    /* Close button repositioned */
    .modal-close {
        top: 5px;
        right: 5px;
        background: transparent;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        z-index: 1002;
    }
    
    /* Navigation buttons smaller */
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .prev { left: 10px; }
    .next { right: 10px; }
    
    /* Modal meta moved to Instagram-like position */
    .modal-meta {
        position: static;
        padding: 0.75rem 1rem;
        margin: 0;
        border-top: none;
        border-bottom: 1px solid var(--glass-border);
        background: var(--dark-medium);
        text-align: left;
    }
    
    .modal-meta h3 {
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }
    
    .modal-meta p {
        font-size: 0.85rem;
    }
    
    /* Add comment input (optional Instagram feature) */
    .modal-comment-input {
        position: sticky;
        bottom: 0;
        display: flex;
        padding: 0.75rem 1rem;
        background: var(--dark-medium);
        border-top: 1px solid var(--glass-border);
    }
    
    .modal-comment-input input {
        flex: 1;
        background: var(--form-bg);
        border: 1px solid var(--glass-border);
        border-radius: 50px;
        padding: 0.75rem 1rem;
        color: var(--light);
        font-size: 0.9rem;
    }
    
    .modal-comment-input button {
        background: var(--primary);
        color: white;
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        margin-left: 0.5rem;
        cursor: pointer;
        transition: transform 0.2s ease;
    }
    
    .modal-comment-input button:hover {
        transform: scale(1.1);
    }
    
    /* Fullscreen modals for mobile */
    .image-view-modal img,
    .video-view-modal video {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .image-view-close,
    .video-view-close {
        top: 10px;
        right: 15px;
        font-size: 2rem;
    }
    
    /* Hide scroll indicator on mobile */
    .scroll-indicator {
        display: none;
    }
    
    /* Adjust cursor for mobile */
    .cursor,
    .cursor-follower {
        display: none;
    }
    
    /* Footer adjustments */
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
}

/* Additional mobile-specific improvements */
@media screen and (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    nav .nav-links a { font-size: 1.2rem; } /* Increased from 0.9rem */
    
    .hero p {
        font-size: 1rem;
    }
    
    section h2 {
        font-size: 1.8rem;
    }
    
    .modal-content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .modal-media-container {
        min-height: 250px;
        max-height: 50vh;
    }
    
    .modal-project-title {
        font-size: 1.2rem;
    }
    
    .modal-description {
        font-size: 0.9rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .portfolio-item .portfolio-overlay {
        transform: translateY(0);
        background: linear-gradient(transparent, var(--dark-rgba-80));
        opacity: 0.9;
    }
    
    .portfolio-item:hover {
        transform: none;
    }
    
    .service-block:hover,
    .material-tile:hover {
        transform: none;
    }
    
    .btn:hover,
    .socials a:hover {
        transform: scale(1.05);
    }
    
    /* Larger touch targets */
    .nav-btn,
    .modal-action-btn,
    .modal-comment-input button {
        min-width: 44px;
        min-height: 44px;
    }
    
    .portfolio-item {
        cursor: pointer;
    }
}

/* Mobile landscape mode */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .modal-content {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr;
        max-height: 100vh;
    }
    
    .modal-left {
        max-height: 100vh;
    }
    
    .modal-media-container {
        max-height: 100vh;
    }
    
    .modal-right {
        max-height: 100vh;
        overflow-y: auto;
    }
}

/* Tablet-specific adjustments */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .modal-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        width: 95%;
        max-width: 700px;
        height: auto;
        max-height: 90vh;
    }
    
    .modal-left {
        border-right: none;
        border-bottom: 1px solid var(--primary-rgba-20);
        height: auto;
        min-height: 400px;
    }
    
    .modal-media-container {
        min-height: 400px;
    }
    
    .modal-right {
        padding: 2rem;
        overflow-y: auto;
        max-height: 300px;
    }
}


/* ===== MOBILE RESPONSIVE STYLES ===== */
@media screen and (max-width: 768px) {
    /* ... existing mobile styles ... */
    
    /* ===== IMPROVED MODAL CLOSE BUTTON FOR MOBILE ===== */
    .modal-close {
        position: fixed;
        top: 15px;
        right: 15px;
        background: transparent;
        backdrop-filter: blur(10px);
        border: 2px solid var(--glass-border);
        color: var(--light);
        font-size: 1.8rem;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 1002;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }
    
    .modal-close:hover {
        transform: scale(1.1);
        box-shadow: 0 0 20px var(--red-rgba-30);
    }
    
    .modal-close:active {
        transform: scale(0.95);
    }
    
    /* Alternative: Add a swipe-down-to-close indicator */
    .modal::after {
        content: '';
        position: fixed;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: var(--medium);
        border-radius: 2px;
        opacity: 0.6;
        z-index: 1001;
    }
    
    /* Alternative: Add a bottom close button as well */
    .modal-bottom-close {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: var(--primary-rgba-80);
        color: var(--light);
        border: none;
        padding: 12px 40px;
        border-radius: 25px;
        font-weight: 600;
        font-size: 1rem;
        cursor: pointer;
        z-index: 1002;
        box-shadow: 0 4px 20px var(--shadow-dark);
        display: none; /* Enable if needed */
    }
    
    /* Alternative: Make entire top area close-able */
    .modal-top-close-area {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        z-index: 1001;
        background: transparent;
        cursor: pointer;
    }
    
    /* Alternative: Swipe down to close - add visual feedback */
    .modal.swipe-down {
        transition: transform 0.3s ease;
    }
    
    .modal.swipe-down.swiping {
        transform: translateY(var(--swipe-distance, 0));
    }
    
    /* Alternative: Add a "X Close" text button */
    .modal-text-close {
        position: fixed;
        top: 20px;
        left: 20px;
        background: var(--dark-rgba-80);
        color: var(--light);
        border: none;
        padding: 10px 20px;
        border-radius: 20px;
        font-weight: 600;
        font-size: 0.9rem;
        cursor: pointer;
        z-index: 1002;
        display: none; /* Enable if needed */
    }
    
    /* ===== IMPROVED MODAL NAVIGATION BUTTONS ===== */
    .nav-btn {
        position: fixed;
        top: 50%;
        transform: translateY(-50%);
        background: var(--dark-rgba-80);
        backdrop-filter: blur(10px);
        border: 2px solid var(--glass-border);
        color: var(--light);
        font-size: 1.5rem;
        border-radius: 50%;
        width: 55px;
        height: 55px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 1001;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }
    
    .nav-btn:hover {
        background: var(--primary);
        transform: translateY(-50%) scale(1.1);
    }
    
    .nav-btn:active {
        transform: translateY(-50%) scale(0.95);
    }
    
    .prev {
        left: 10px;
        padding-right: 3px; /* Visual adjustment */
    }
    
    .next {
        right: 10px;
        padding-left: 3px; /* Visual adjustment */
    }
    
    /* Hide nav buttons when no siblings exist */
    .nav-btn:disabled {
        opacity: 0.3;
        pointer-events: none;
    }
    
    /* ===== IMPROVED MODAL ACTION BUTTONS ===== */
    .modal-actions {
        padding: 1rem;
        background: var(--dark-rgba-95);
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    
    .modal-action-btn {
        width: 44px;
        height: 44px;
        min-width: 44px; /* Minimum touch target size */
        min-height: 44px;
        background: none;
        border: none;
        font-size: 1.8rem;
        color: var(--light);
        cursor: pointer;
        transition: transform 0.2s ease;
        -webkit-tap-highlight-color: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .modal-action-btn:active {
        transform: scale(0.9);
    }
    
    /* ===== IMPROVED MODAL STRUCTURE ===== */
    .modal-content {
        touch-action: pan-y; /* Allow vertical scrolling */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
    
    /* Make sure modal is properly positioned */
    .modal {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 999;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal.active {
        display: block;
    }
    
    /* Prevent body scroll when modal is open */
    body.modal-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
    
    /* ===== SMALL PHONE OPTIMIZATIONS ===== */
    @media screen and (max-width: 380px) {
        .modal-close {
            width: 45px;
            height: 45px;
            font-size: 1.6rem;
            top: 10px;
            right: 10px;
        }
        
        .nav-btn {
            width: 50px;
            height: 50px;
            font-size: 1.3rem;
        }
        
        .modal-action-btn {
            width: 40px;
            height: 40px;
            font-size: 1.6rem;
        }
    }
    
    /* ===== LANDSCAPE ORIENTATION ===== */
    @media screen and (max-width: 768px) and (orientation: landscape) {
        .modal-close {
            top: 10px;
            right: 10px;
            width: 45px;
            height: 45px;
        }
        
        .nav-btn {
            top: 50%;
            width: 50px;
            height: 50px;
        }
        
        .modal::after {
            top: 8px;
            width: 30px;
            height: 3px;
        }
    }
}

/* ===== ADDITIONAL JAVASCRIPT-ENHANCED STYLES ===== */
/* For swipe-down-to-close functionality */
.modal-swipe-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 20px;
}

.modal-swipe-indicator span {
    background: var(--medium);
    color: var(--dark);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.modal.swiping .modal-swipe-indicator span {
    opacity: 1;
    transform: translateY(0);
}

/* For better touch feedback */
.modal * {
    -webkit-tap-highlight-color: transparent;
}

/* Prevent text selection on modal */
.modal-content {
    user-select: none;
    -webkit-user-select: none;
}

/* Optional: Add vibration feedback class */
.modal-tap-feedback:active {
    animation: tapFeedback 0.2s ease;
}

@keyframes tapFeedback {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    .modal-close,
    .nav-btn,
    .modal-action-btn {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .modal-close {
        background: var(--dark);
    }
    
    .nav-btn {
        background: var(--dark);
    }
}


/* ===== MOBILE MODAL STYLES ===== */
@media screen and (max-width: 768px) {
    /* Make modal full screen */
    .modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--dark);
        z-index: 1000;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal.active {
        display: block;
    }
    
    /* Instagram-style layout */
    .modal-content {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100%;
        background: var(--dark);
        position: relative;
        gap: 0;
        padding: 0;
        border-radius: 0;
    }
    
    /* ===== IMPROVED CLOSE BUTTON ===== */
    .modal-close {
        position: fixed;
        top: 15px;
        right: 15px;
        width: 44px;
        height: 44px;
        background: transparent;
        backdrop-filter: blur(10px);
        border-radius: 50%;
        color: white;
        font-size: 24px;
        font-weight: 300;
        cursor: pointer;
        z-index: 1002;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }
    
    .modal-close:hover,
    .modal-close:active {
        transform: scale(1.1);
        border-color: rgba(255, 82, 82, 0.5);
    }
    
    /* Alternative: Add swipe down indicator */
    .modal::before {
        content: '';
        position: fixed;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.5);
        border-radius: 2px;
        z-index: 1001;
    }
    
    /* ===== LEFT SECTION - IMAGE/VIDEO ===== */
    .modal-left {
        order: 1;
        width: 100%;
        position: relative;
        background: var(--darker);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .modal-media-container {
        position: relative;
        width: 100%;
        aspect-ratio: 1 / 1;
        max-height: 70vh;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--darker);
    }
    
    .image-container,
    .video-container {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .image-container img,
    .video-container video {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    /* Instagram-like image actions overlay */
    .modal-left::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), transparent);
        pointer-events: none;
        z-index: 2;
    }
    
    /* ===== NAVIGATION BUTTONS ===== */
    .nav-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 44px;
        height: 44px;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(5px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        color: white;
        font-size: 18px;
        cursor: pointer;
        z-index: 3;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }
    
    .nav-btn.prev {
        left: 10px;
        padding-right: 3px;
    }
    
    .nav-btn.next {
        right: 10px;
        padding-left: 3px;
    }
    
    .nav-btn:active {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-50%) scale(0.95);
    }
    
    /* Hide nav buttons when there's only one item */
    .nav-btn.hidden {
        opacity: 0;
        pointer-events: none;
    }
    
    /* ===== CAPTION (MODAL META) ===== */
    .modal-meta {
        order: 2;
        padding: 15px;
        background: var(--dark);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .modal-meta h3 {
        font-size: 16px;
        font-weight: 600;
        color: white;
        margin-bottom: 5px;
        background: none;
        -webkit-background-clip: unset;
        background-clip: unset;
        color: white;
    }
    
    .modal-meta p {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.8);
        line-height: 1.4;
    }
    
    /* ===== RIGHT SECTION - PROJECT DETAILS ===== */
    .modal-right {
        order: 3;
        padding: 20px 15px;
        background: var(--dark);
        overflow-y: auto;
        flex: 1;
    }
    
    .modal-project-title {
        font-size: 20px;
        font-weight: 700;
        color: white;
        margin-bottom: 15px;
        background: var(--gradient-accent);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        line-height: 1.3;
    }
    
    .modal-description {
        font-size: 15px;
        color: rgba(255, 255, 255, 0.9);
        line-height: 1.5;
    }
    
    .modal-description p {
        margin-bottom: 15px;
    }
    
    /* ===== INSTAGRAM-LIKE ACTION BUTTONS ===== */
    /* Add these elements to your HTML for full Instagram experience */
    .modal-actions {
        order: 4;
        padding: 15px;
        background: var(--dark);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .modal-actions-left {
        display: flex;
        gap: 15px;
    }
    
    .modal-action-btn {
        background: none;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
        padding: 8px;
        transition: transform 0.2s ease;
    }
    
    .modal-action-btn:active {
        transform: scale(0.9);
    }
    
    .like-btn.active {
        color: #ff5252;
    }
    
    /* ===== MOBILE-SPECIFIC ENHANCEMENTS ===== */
    
    /* Prevent body scroll when modal is open */
    body.modal-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
    
    /* Double tap to zoom image */
    .image-container {
        cursor: pointer;
    }
    
    .image-container:active {
        opacity: 0.9;
    }
    
    /* Video controls */
    .video-container video {
        cursor: pointer;
    }
    
    /* Make everything touch-friendly */
    .modal * {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Long press menu prevention */
    .modal img,
    .modal video {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* ===== SMALL PHONE OPTIMIZATIONS ===== */
    @media screen and (max-width: 380px) {
        .modal-close {
            width: 40px;
            height: 40px;
            font-size: 20px;
            top: 10px;
            right: 10px;
        }
        
        .nav-btn {
            width: 40px;
            height: 40px;
            font-size: 16px;
        }
        
        .modal-project-title {
            font-size: 18px;
        }
        
        .modal-description {
            font-size: 14px;
        }
    }
    
    /* ===== LANDSCAPE MODE ===== */
    @media screen and (max-width: 768px) and (orientation: landscape) {
        .modal-content {
            flex-direction: row;
            height: 100vh;
        }
        
        .modal-left {
            width: 60%;
            height: 100vh;
            border-right: 1px solid rgba(255, 255, 255, 0.1);
            border-bottom: none;
        }
        
        .modal-media-container {
            aspect-ratio: unset;
            max-height: 100vh;
            height: 100%;
        }
        
        .modal-meta {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
            border-bottom: none;
        }
        
        .modal-right {
            width: 40%;
            height: 100vh;
            overflow-y: auto;
            padding: 60px 15px 15px 15px;
        }
        
        .modal-close {
            top: 10px;
            right: 10px;
            background: rgba(0, 0, 0, 0.8);
        }
        
        .modal::before {
            top: 15px;
            width: 30px;
            height: 3px;
        }
    }
}

/* ===== ADD TO YOUR EXISTING JAVASCRIPT ===== */
/* Add this CSS for JavaScript-enhanced features */
.modal-image-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1003;
    cursor: zoom-out;
}

.modal-image-fullscreen img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-video-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1003;
}

.modal-video-fullscreen video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fullscreen-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 20px;
    cursor: pointer;
    z-index: 1004;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading spinner */
.modal-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
    z-index: 1;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Swipe down to close animation */
.modal.swipe-down {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.swipe-down.swiping {
    transform: translateY(var(--swipe-distance, 0));
}


/* ===== MODAL BUTTONS: NO BACKGROUND, NO BORDER ===== */
.modal-close,
.nav-btn,
.modal-action-btn,
.modal-bottom-close,
.modal-text-close,
.fullscreen-close {
    background: none !important; /* Remove background */
    border: none !important;     /* Remove border */
    box-shadow: none !important; /* Remove shadows */
    color: var(--light);         /* Keep text/icon color */
}

/* Optional: Keep hover/active scaling but remove background change */
.modal-close:hover,
.nav-btn:hover,
.modal-action-btn:hover,
.modal-bottom-close:hover,
.modal-text-close:hover,
.fullscreen-close:hover,
.modal-close:active,
.nav-btn:active,
.modal-action-btn:active {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}