/**
 * Mobile Responsive Fixes
 * Mobile cihazlar için ek responsive düzeltmeler
 */

/* Touch-friendly improvements */
@media (max-width: 768px) {
    /* Minimum touch target size */
    button, 
    .btn, 
    a.btn, 
    input[type="submit"], 
    input[type="button"] {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 20px;
    }
    
    /* Form improvements */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 15px;
        border-radius: 8px;
    }
    
    /* Better spacing for mobile */
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    /* Hero section mobile fixes */
    .hero {
        min-height: 60vh;
        padding: 100px 0 40px;
    }
    
    .hero-content .section-title h1 {
        font-size: 28px;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .hero-content .section-title h2 {
        font-size: 24px;
        line-height: 1.4;
    }
    
    /* Navigation improvements */
    .navbar-toggler {
        border: none;
        padding: 8px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 6px;
    }
    
    /* Card layouts mobile optimization */
    .service-box,
    .project-box,
    .blog-box {
        margin-bottom: 25px;
    }
    
    /* Image responsive fixes */
    img {
        height: auto;
        max-width: 100%;
    }
    
    /* Table responsive */
    .table-responsive {
        border: none;
        margin-bottom: 0;
    }
    
    table {
        font-size: 14px;
    }
    
    /* Modal mobile fixes */
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    /* Footer mobile improvements */
    .footer-box {
        text-align: center;
        margin-bottom: 30px;
    }
    
    .footer-links ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    /* Contact form mobile */
    .contact-form .form-control {
        margin-bottom: 15px;
    }
    
    /* Gallery mobile fixes */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Team cards mobile */
    .team-card {
        max-width: 280px;
        margin: 0 auto 25px;
    }
    
    /* Statistics mobile */
    .statistic-item {
        margin-bottom: 25px;
        text-align: center;
    }
    
    /* Blog mobile improvements */
    .blog-meta {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    /* Pagination mobile */
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .pagination .page-link {
        padding: 8px 12px;
        margin: 2px;
    }
}

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575px) {
    /* Typography adjustments */
    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    h3 { font-size: 18px; }
    h4 { font-size: 16px; }
    
    /* Container padding */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Hero mobile */
    .hero {
        padding: 80px 0 30px;
        min-height: 50vh;
    }
    
    .hero-content .section-title h1 {
        font-size: 22px;
    }
    
    /* Button adjustments */
    .btn {
        font-size: 14px;
        padding: 10px 16px;
    }
    
    /* Gallery single column */
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    /* Services grid */
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    /* Projects grid */
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    /* Team grid */
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact info stack */
    .contact-info {
        text-align: center;
    }
    
    /* Footer single column */
    .footer-content {
        text-align: center;
    }
    
    .footer-links ul {
        flex-direction: column;
        align-items: center;
    }
}

/* Landscape phone orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 60px 0 30px;
        min-height: 70vh;
    }
    
    .modal-dialog {
        max-height: 90vh;
        overflow-y: auto;
    }
}

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

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e0e0e0;
        --bg-color: #121212;
        --primary-color: #ffffff;
    }
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .modal,
    .sidebar {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}

/* Focus improvements for keyboard navigation */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
    outline: 2px solid var(--accent-color, #DCF763);
    outline-offset: 2px;
}

/* Loading states */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Better text selection */
::selection {
    background-color: var(--accent-color, #DCF763);
    color: var(--bg-color, #161616);
}

::-moz-selection {
    background-color: var(--accent-color, #DCF763);
    color: var(--bg-color, #161616);
}
