/* ios-fix.css */

/* 1. iOS Safari'de smooth scroll için */
html {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* 2. Hero section için iPhone düzeltmeleri */
.hero-section {
    min-height: 100vh;
    min-height: -webkit-fill-available; /* iPhone notchu sorunu */
}

.hero-container {
    display: flex;
    flex-direction: column;
    padding-top: env(safe-area-inset-top); /* iPhone X+ için güvenli alan */
}

/* 3. iOS'ta fixed elementler için düzeltme */
.navbar,
.whatsapp-float,
.back-to-top {
    position: fixed;
    -webkit-transform: translateZ(0); /* Hardware acceleration */
    transform: translateZ(0);
}

/* 4. Safari'de image rendering iyileştirme */
img, 
.project-image img,
.about-image img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* 5. Safari'de flexbox gap sorunu */
.hero-buttons,
.partner-logos,
.stats-grid {
    gap: 1rem;
}

@supports (-webkit-touch-callout: none) {
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
}

/* 6. Safari'de sticky hover sorunu */
@media (hover: none) and (pointer: coarse) {
    .nav-link:hover,
    .btn-primary:hover,
    .btn-secondary:hover {
        opacity: 1;
        transform: none;
    }
    
    .nav-link:active,
    .btn-primary:active,
    .btn-secondary:active {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

/* 7. iPhone'da input zoom sorunu */
@media screen and (max-width: 767px) {
    input,
    select,
    textarea {
        font-size: 16px !important; /* iOS zoom'u engelle */
    }
}

/* 8. Safari'de position: sticky düzeltmesi */
.section-header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* 9. iPhone'da safe area support */
.footer,
.navbar {
    padding-bottom: env(safe-area-inset-bottom);
}

/* 10. Safari'de animasyon performansı */
.floating-element,
.pulse-radar {
    will-change: transform;
    -webkit-backface-visibility: hidden;
}

/* 11. iOS'ta buton ve link highlight rengi */
* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

/* 12. Safari'de font smoothing */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 13. iPhone X+ için corner radius düzeltmesi */
@media screen and (max-width: 768px) {
    .project-card,
    .about-image,
    .coming-soon-card {
        border-radius: 12px;
        overflow: hidden;
    }
}

/* 14. Safari'de fixed background sorunu */
.hero-section {
    background-attachment: scroll; /* Fixed yerine scroll */
}

/* 15. iPhone'da map container düzeltmesi */
.map-container iframe {
    height: 400px;
    -webkit-overflow-scrolling: touch;
}
/* iphone16-fix.css */

/* 1. iPhone 16 Pro/Max için ekran boyutları */
@media only screen and (device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3),
       only screen and (device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) {
    
    /* Dynamic Island için safe area */
    .navbar {
        padding-top: calc(env(safe-area-inset-top) + 10px);
    }
    
    .hero-section {
        padding-top: env(safe-area-inset-top);
    }
    
    /* Hero section optimizasyonu */
    .hero-title {
        font-size: 2.8rem !important;
        line-height: 1.15 !important;
    }
    
    .title-line {
        display: block;
        margin-bottom: 0.5rem;
    }
    
    .title-rotating {
        display: inline-block;
        margin-left: 0.5rem;
    }
    
    /* Butonlar için daha iyi tap target */
    .btn-primary, 
    .btn-secondary {
        min-height: 50px;
        padding: 15px 25px !important;
        font-size: 1rem !important;
    }
    
    /* Social proof düzenlemesi */
    .partner-logos {
        gap: 8px !important;
    }
    
    .partner-logo {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
}

/* 2. Dynamic Island ve kamera kesimi için */
@supports (padding: max(0px)) {
    .hero-section,
    .navbar {
        padding-left: max(env(safe-area-inset-left), 1rem);
        padding-right: max(env(safe-area-inset-right), 1rem);
    }
    
    .hero-container {
        padding-left: max(env(safe-area-inset-left), 1rem);
        padding-right: max(env(safe-area-inset-right), 1rem);
    }
}

/* 3. iPhone 16'da görüntü sorunları için */
.hero-visual {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    margin-top: 1rem;
}

.security-animation {
    position: relative;
    width: 100%;
    height: 300px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    overflow: hidden;
}

/* 4. Grid lines düzeltmesi */
.grid-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
}

/* 5. Floating element'ler için iPhone 16 optimizasyonu */
.floating-element {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 1.5rem;
    z-index: 10;
}

/* 6. Pulse radar düzeltmesi */
.pulse-radar {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 2px solid rgba(255, 0, 0, 0.3);
}

.pulse-radar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 0, 0, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* 7. Products section iPhone 16 düzeltmesi */
.products-section {
    padding-top: 2rem !important;
}

.coming-soon-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 2rem;
    margin: 1rem;
}

/* 8. Countdown timer iPhone 16 optimizasyonu */
.countdown-timer {
    gap: 10px !important;
}

.time-unit {
    min-width: 70px;
    padding: 15px 10px;
}

.number {
    font-size: 2rem !important;
    font-weight: 800;
}

/* 9. Projects section mobil görünüm */
.projects-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 2rem !important;
    padding: 1rem !important;
}

.project-card {
    width: 100% !important;
    margin: 0 !important;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 10. About section stat'lar */
.stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

/* 11. Contact section iPhone 16 düzenlemesi */
.contact-container {
    flex-direction: column !important;
    gap: 2rem !important;
    padding: 1rem !important;
}

.map-container {
    height: 350px !important;
    border-radius: 20px;
    overflow: hidden;
    margin-top: 1rem;
}

/* 12. WhatsApp float butonu iPhone 16 için */
.whatsapp-float {
    bottom: max(env(safe-area-inset-bottom), 1rem) !important;
    right: max(env(safe-area-inset-right), 1rem) !important;
    width: 60px;
    height: 60px;
    border-radius: 30px;
    font-size: 1.8rem;
}

/* 13. Back to top butonu */
.back-to-top {
    bottom: max(env(safe-area-inset-bottom), 1rem) !important;
    right: calc(max(env(safe-area-inset-right), 1rem) + 70px) !important;
    width: 50px;
    height: 50px;
}

/* 14. Footer iPhone 16 düzenlemesi */
.footer {
    padding-bottom: max(env(safe-area-inset-bottom), 2rem) !important;
}

/* 15. Safari özel düzeltmeler */
@supports (-webkit-touch-callout: none) {
    .hero-section {
        min-height: -webkit-fill-available;
    }
    
    .security-animation {
        -webkit-mask-image: -webkit-radial-gradient(white, black);
    }
    
    /* iPhone 16'da blur performansı */
    .coming-soon-card,
    .stat-item {
        -webkit-backdrop-filter: blur(20px);
    }
}

/* 16. Dark mode iPhone 16 optimizasyonu */
@media (prefers-color-scheme: dark) {
    .coming-soon-card,
    .stat-item {
        background: rgba(30, 30, 30, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .floating-element {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
    }
}

/* 17. Landscape mod iPhone 16 */
@media only screen and (orientation: landscape) and (max-height: 500px) {
    .navbar {
        padding-top: env(safe-area-inset-top);
        position: sticky;
    }
    
    .hero-container {
        flex-direction: row;
        gap: 2rem;
        padding-top: 1rem;
    }
    
    .hero-text {
        flex: 1;
    }
    
    .hero-visual {
        flex: 1;
        height: 250px;
    }
    
    .hero-buttons {
        flex-direction: row !important;
        flex-wrap: wrap;
    }
}