/* Custom CSS for App Craft Services */

/* CSS Variables for dynamic color changes */
:root {
    --navy-color: #1e3a8a;
    --electric-blue-color: #3b82f6;
    --light-gray-color: #f8fafc;
}

/* Text-based logo fallback */
.text-logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--navy-color), var(--electric-blue-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    font-family: 'Arial', sans-serif;
}

.text-logo-small {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--navy-color);
    font-family: 'Arial', sans-serif;
}

/* Smooth transitions for all elements */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--electric-blue-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--navy-color);
}

/* Project Slider Styles - Fixed Version */
#projects-slider {
    width: 200% !important; /* 2 slides × 100% each */
    transition: transform 0.5s ease-in-out !important;
    display: flex !important;
}

.project-slide {
    width: 25% !important; /* Each project takes 25% (4 projects per slide) */
    flex-shrink: 0 !important;
}

.slider-indicator {
    transition: all 0.3s ease;
    cursor: pointer;
}

.slider-indicator:hover {
    transform: scale(1.2);
}

/* Navigation button styles */
#prev-btn, #next-btn {
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    cursor: pointer;
}

#prev-btn:hover, #next-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Project card hover effects */
.project-card {
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-2px);
}

/* CAPTCHA styles */
#captcha-question {
    min-width: 80px;
    text-align: center;
    font-family: 'Courier New', monospace;
}

#captcha-answer {
    font-family: 'Courier New', monospace;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .project-slide {
        width: 50%; /* Show 2 slides on mobile */
    }
    
    #projects-slider {
        width: 400%; /* 4 slides × 100% each for mobile */
    }
    
    #prev-btn, #next-btn {
        transform: translateX(0);
        position: relative;
        margin: 0 10px;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--electric-blue-color);
    outline-offset: 2px;
}

/* Custom button hover effects */
.btn-primary {
    background-color: var(--electric-blue-color);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--navy-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Loading animation for form submission */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Admin panel specific styles */
#admin-panel {
    backdrop-filter: blur(5px);
}

#admin-panel input,
#admin-panel textarea,
#admin-panel select {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#admin-panel input:focus,
#admin-panel textarea:focus,
#admin-panel select:focus {
    border-color: var(--electric-blue-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Mobile-first responsive design enhancements */
/* Base styles are mobile-first, then enhanced for larger screens */

/* Mobile optimizations */
@media (max-width: 768px) {
    /* Hero section mobile optimization */
    .hero-section h1 {
        font-size: 2.5rem;
        line-height: 1.2;
        padding: 0 1rem;
    }
    
    .hero-section p {
        font-size: 1.125rem;
        padding: 0 1rem;
    }
    
    /* Navigation mobile improvements */
    .mobile-menu-open {
        max-height: 100vh;
        overflow-y: auto;
    }
    
    /* Form mobile optimization */
    .mobile-form-container {
        padding: 1rem;
    }
    
    .mobile-form-input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.875rem;
        border-radius: 0.5rem;
    }
    
    /* Button mobile optimization */
    .mobile-button {
        min-height: 44px; /* iOS touch target minimum */
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        border-radius: 0.5rem;
    }
    
    /* Card mobile optimization */
    .mobile-card {
        margin: 0.5rem;
        border-radius: 0.75rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    /* Grid mobile optimization */
    .mobile-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Text mobile optimization */
    .mobile-text-lg {
        font-size: 1.125rem;
        line-height: 1.6;
    }
    
    .mobile-text-xl {
        font-size: 1.25rem;
        line-height: 1.5;
    }
    
    /* Spacing mobile optimization */
    .mobile-spacing {
        padding: 1rem;
        margin: 0.5rem 0;
    }
    
    /* Admin panel mobile */
    #admin-panel .grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact form mobile optimization */
    .contact-form-mobile {
        padding: 1rem;
    }
    
    .contact-form-mobile .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Review cards mobile optimization */
    .review-card-mobile {
        margin-bottom: 1rem;
        padding: 1rem;
        border-radius: 0.75rem;
    }
    
    /* Stats grid mobile */
    .stats-grid-mobile {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    /* Footer mobile */
    .footer-mobile {
        text-align: center;
        padding: 2rem 1rem;
    }
    
    .footer-mobile .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .tablet-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tablet-text-balance {
        text-wrap: balance;
    }
}

/* Click-to-call functionality styles */
.click-to-call {
    color: var(--electric-blue-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.click-to-call:hover {
    color: var(--navy-color);
    text-decoration: underline;
}

.click-to-call-button {
    display: inline-flex;
    align-items: center;
    background-color: var(--electric-blue-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    min-height: 44px; /* iOS touch target */
}

.click-to-call-button:hover {
    background-color: var(--navy-color);
    transform: translateY(-1px);
}

.click-to-call-button svg {
    margin-right: 0.5rem;
    width: 1.25rem;
    height: 1.25rem;
}

/* Mobile-specific touch improvements */
@media (max-width: 768px) {
    /* Larger touch targets for mobile */
    button, 
    .btn, 
    a[role="button"],
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem 1rem;
    }
    
    /* Improved form controls for mobile */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.875rem;
        border-radius: 0.5rem;
        border: 2px solid #e5e7eb;
        transition: border-color 0.3s ease;
    }
    
    input[type="text"]:focus,
    input[type="email"]:focus,
    input[type="tel"]:focus,
    input[type="password"]:focus,
    textarea:focus,
    select:focus {
        border-color: var(--electric-blue-color);
        outline: none;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
    
    /* Mobile navigation improvements */
    .mobile-nav-item {
        padding: 1rem;
        border-bottom: 1px solid #f3f4f6;
        font-size: 1.125rem;
    }
    
    .mobile-nav-item:last-child {
        border-bottom: none;
    }
    
    /* Mobile card spacing */
    .mobile-card-container {
        padding: 0.5rem;
    }
    
    .mobile-card-container > * {
        margin-bottom: 1rem;
    }
    
    /* Mobile hero adjustments */
    .mobile-hero-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .mobile-hero-buttons a {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* Print styles */
@media print {
    nav,
    footer,
    #admin-panel-trigger,
    #admin-panel {
        display: none !important;
    }
    
    .bg-navy,
    .bg-electric-blue {
        background: #000 !important;
        color: #fff !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #000 !important;
    }
    
    .text-blue-100 {
        color: #fff !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Custom utility classes */
.shadow-custom {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.gradient-text {
    background: linear-gradient(135deg, var(--navy-color), var(--electric-blue-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Form validation styles */
.form-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.form-success {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background-color: #10b981;
}

.notification.error {
    background-color: #ef4444;
}

.notification.info {
    background-color: var(--electric-blue-color);
}

/* Performance optimizations */

/* Image lazy loading styles */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

/* Progressive loading styles */
.progressive-load {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.progressive-load.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Reduce motion for performance */
.reduce-motion * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

/* GPU acceleration for smooth animations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Optimize font loading */
@font-face {
    font-family: 'system-ui';
    src: local('system-ui'), local('-apple-system'), local('BlinkMacSystemFont');
    font-display: swap;
}

/* Critical CSS inlining optimization */
.critical-content {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Mobile performance optimizations */
@media (max-width: 768px) {
    /* Reduce box-shadows on mobile for better performance */
    .mobile-performance .shadow-lg {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-performance .shadow-xl {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    /* Optimize gradients for mobile */
    .mobile-performance .bg-gradient-to-br {
        background: var(--electric-blue-color);
    }
    
    /* Reduce border-radius for better performance */
    .mobile-performance .rounded-lg {
        border-radius: 0.5rem;
    }
    
    .mobile-performance .rounded-xl {
        border-radius: 0.75rem;
    }
    
    /* Optimize transforms */
    .mobile-performance .transform {
        transform: none;
    }
    
    /* Reduce backdrop filters on mobile */
    .mobile-performance .backdrop-blur {
        backdrop-filter: none;
        background-color: rgba(255, 255, 255, 0.95);
    }
}

/* Content loading states */
.content-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* Optimize images for different screen densities */
.responsive-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Lazy loading placeholder */
.image-placeholder {
    background-color: #f3f4f6;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23d1d5db' viewBox='0 0 24 24'%3E%3Cpath d='M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 3rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Performance-optimized animations */
@media (prefers-reduced-motion: no-preference) {
    .animate-fade-in {
        animation: fadeIn 0.5s ease-out;
    }
    
    .animate-slide-up {
        animation: slideUp 0.5s ease-out;
    }
}

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

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile-specific touch optimizations */
@media (max-width: 768px) {
    /* Improve touch targets */
    .touch-target {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem;
    }
    
    /* Optimize scrolling performance */
    .scroll-container {
        -webkit-overflow-scrolling: touch;
        overflow-scrolling: touch;
    }
    
    /* Reduce motion on mobile for better performance */
    .mobile-reduce-motion {
        animation: none !important;
        transition: none !important;
    }
    
    /* Optimize text rendering */
    .mobile-text-optimize {
        text-rendering: optimizeSpeed;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Project Portfolio Modal Styles */
.project-card {
    position: relative;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.project-card * {
    pointer-events: none;
}

.project-card {
    pointer-events: auto;
}

/* Ensure modal is properly positioned */
#project-modal {
    z-index: 9999;
}

#project-modal.hidden {
    display: none !important;
}

#project-modal:not(.hidden) {
    display: flex !important;
}

/* Modal animation */
#project-modal .bg-white {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Close button styling */
#close-modal {
    transition: all 0.2s ease;
}

#close-modal:hover {
    background-color: #f3f4f6;
    transform: scale(1.1);
}

/* Project card hover effects */
.project-card:hover {
    transform: translateY(-2px);
}

.project-card:active {
    transform: translateY(0);
}

/* Debug styles for troubleshooting */
.debug-project-card {
    border: 2px solid red !important;
}

.debug-modal {
    border: 3px solid blue !important;
}
/* Project Logo Styling */
.project-card img {
    transition: transform 0.3s ease;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.project-card:hover img {
    transform: scale(1.05);
}

/* Modal logo styling */
#modal-logo-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Ensure images load properly */
.project-card img[src*=".png"] {
    background-color: transparent;
}

/* Loading state for images */
.project-card img {
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-card img.loaded,
.project-card img[complete] {
    opacity: 1;
}

/* Fallback for broken images */
.project-card img[alt]:after {
    content: attr(alt);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    white-space: nowrap;
}
/* Large Modal Logo Styling */
#modal-large-logo {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

#modal-large-logo:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

#modal-large-logo img {
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

#modal-large-logo:hover img {
    transform: scale(1.05);
}

/* Enhanced Modal Styling */
#project-modal .bg-white {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Modal content improvements */
#modal-content h4 {
    position: relative;
    padding-bottom: 0.5rem;
}

#modal-content h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 3rem;
    height: 2px;
    background: linear-gradient(90deg, var(--electric-blue-color), var(--navy-color));
    border-radius: 1px;
}

/* Feature list improvements */
#modal-features ul li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

#modal-features ul li:last-child {
    border-bottom: none;
}

/* Tech stack improvements */
#modal-tech-list span {
    transition: all 0.2s ease;
}

#modal-tech-list span:hover {
    background-color: var(--electric-blue-color);
    color: white;
    transform: translateY(-1px);
}

/* Responsive modal adjustments */
@media (max-width: 768px) {
    #project-modal .max-w-4xl {
        max-width: 95vw;
        margin: 1rem;
    }
    
    #modal-large-logo img {
        width: 120px !important;
        height: 120px !important;
    }
    
    #project-modal .p-6 {
        padding: 1rem;
    }
}

/* Modal animation improvements */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#project-modal:not(.hidden) .bg-white {
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Logo loading animation */
#modal-large-logo img {
    opacity: 0;
    animation: logoFadeIn 0.6s ease-out 0.2s forwards;
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* Enhanced logo presentation */
#modal-large-logo {
    position: relative;
}

#modal-large-logo::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--electric-blue-color), var(--navy-color), var(--electric-blue-color));
    border-radius: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

#modal-large-logo:hover::before {
    opacity: 0.1;
}

/* Project title styling */
#modal-project-title {
    background: linear-gradient(135deg, var(--navy-color), var(--electric-blue-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleSlideUp 0.5s ease-out 0.3s both;
}

@keyframes titleSlideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Decorative elements animation */
#modal-large-logo .absolute {
    animation: decorativeFloat 3s ease-in-out infinite;
}

#modal-large-logo .absolute:nth-child(2) {
    animation-delay: 1s;
}

#modal-large-logo .absolute:nth-child(3) {
    animation-delay: 2s;
}

@keyframes decorativeFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-5px) rotate(180deg);
    }
}

/* Logo container glow effect */
#modal-large-logo img {
    position: relative;
    z-index: 10;
}

#modal-large-logo img:hover {
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.3));
}
/* Projects Slider Styles */
.projects-slider-container {
    position: relative;
    overflow: hidden;
}

#projects-slider {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.project-slide {
    flex: 0 0 25%; /* Show 4 projects at once */
    padding: 0 0.5rem;
}

/* Navigation buttons */
#prev-btn, #next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--navy-color);
}

#prev-btn {
    left: -24px;
}

#next-btn {
    right: -24px;
}

#prev-btn:hover, #next-btn:hover {
    background: var(--electric-blue-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

#prev-btn:disabled, #next-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f3f4f6;
    color: #9ca3af;
}

#prev-btn:disabled:hover, #next-btn:disabled:hover {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: #f3f4f6;
    color: #9ca3af;
}

/* Slider indicators */
.slider-indicator {
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-indicator:hover {
    transform: scale(1.2);
}

.slider-indicator.bg-electric-blue {
    background-color: var(--electric-blue-color) !important;
}

.slider-indicator.bg-gray-300 {
    background-color: #d1d5db !important;
}

/* Mobile responsive adjustments */
@media (max-width: 1024px) {
    .project-slide {
        flex: 0 0 33.333%; /* Show 3 projects on tablet */
    }
}

@media (max-width: 768px) {
    .project-slide {
        flex: 0 0 50%; /* Show 2 projects on mobile */
    }
    
    #prev-btn, #next-btn {
        width: 40px;
        height: 40px;
        left: -20px;
        right: -20px;
    }
    
    #prev-btn {
        left: -20px;
    }
    
    #next-btn {
        right: -20px;
    }
}

@media (max-width: 480px) {
    .project-slide {
        flex: 0 0 100%; /* Show 1 project on small mobile */
    }
    
    #prev-btn, #next-btn {
        width: 36px;
        height: 36px;
    }
    
    #prev-btn {
        left: -18px;
    }
    
    #next-btn {
        right: -18px;
    }
}

/* Smooth scrolling for touch devices */
.projects-slider-container {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Project card enhancements for slider */
.project-slide .project-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-slide .project-card > div {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-slide .project-card .aspect-square {
    flex: 1;
}

/* Animation for slide transitions */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.project-slide {
    animation: slideIn 0.6s ease-out;
}

/* Hover effects for slider navigation */
.projects-slider-container:hover #prev-btn,
.projects-slider-container:hover #next-btn {
    opacity: 1;
}

#prev-btn, #next-btn {
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

/* Focus styles for accessibility */
#prev-btn:focus, #next-btn:focus {
    outline: 2px solid var(--electric-blue-color);
    outline-offset: 2px;
}

.slider-indicator:focus {
    outline: 2px solid var(--electric-blue-color);
    outline-offset: 2px;
}

/* Loading state for slider */
.slider-loading {
    opacity: 0.6;
    pointer-events: none;
}

.slider-loading #projects-slider {
    transition: none;
}

/* Auto-slide pause indicator */
.slider-paused::after {
    content: '⏸️';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 20;
}

/* Gradient fade edges for better visual flow */
.projects-slider-container::before,
.projects-slider-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    z-index: 5;
    pointer-events: none;
}

.projects-slider-container::before {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.8), transparent);
}

.projects-slider-container::after {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.8), transparent);
}

/* Enhanced project card styling for slider */
.project-slide .project-card .bg-white {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.project-slide .project-card:hover .bg-white {
    border-color: var(--electric-blue-color);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

/* Slider progress indicator */
.slider-progress {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: #e5e7eb;
    border-radius: 1px;
    overflow: hidden;
}

.slider-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--electric-blue-color);
    border-radius: 1px;
    transition: width 0.3s ease;
}

/* Touch feedback for mobile */
@media (max-width: 768px) {
    .project-slide .project-card:active {
        transform: scale(0.98);
    }
    
    .project-slide .project-card:active .bg-white {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
}

/* Reduced motion support for slider */
@media (prefers-reduced-motion: reduce) {
    #projects-slider {
        transition: none !important;
    }
    
    .project-slide {
        animation: none !important;
    }
    
    #prev-btn, #next-btn {
        transition: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #prev-btn, #next-btn {
        border: 2px solid #000;
        background: #fff;
        color: #000;
    }
    
    .slider-indicator {
        border: 1px solid #000;
    }
}

/* Print styles - hide slider controls */
@media print {
    #prev-btn, #next-btn, .slider-indicator {
        display: none !important;
    }
    
    .project-slide {
        flex: 0 0 25% !important;
    }
}