/* iOS Cihazlar için Özel Stil Ayarları */

/* iOS Safari'de -webkit- önekli özellikler ve düzeltmeler */
/* Genel iOS düzeltmeleri */
html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    font-smoothing: antialiased;
    -webkit-font-smoothing: antialiased;
}

/* iOS cihazlarda buton ve form elemanları için düzeltmeler */
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0.25rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea,
select {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0.25rem;
    font-size: 16px; /* iOS'ta otomatik yakınlaştırmayı önlemek için */
}

/* iOS'ta sabit başlık çubuğu düzeltmesi */
.main-header {
    -webkit-backdrop-filter: blur(10px);
}

/* iOS Safari'de scroll davranışı iyileştirmeleri */
.smooth-scroll {
    -webkit-overflow-scrolling: touch;
}

/* iPhone kesikli ekran (notch) düzeltmeleri */
@supports (padding: max(0px)) {
    .page-header, 
    .logo-notch {
        padding-top: max(120px, env(safe-area-inset-top)) !important;
    }
    
    .footer-nav,
    .mobile-footer-nav {
        padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
    }
    
    /* iPhone X ve üzerindeki modeller için sabit alt çubuğa sahip elemanlar */
    .fixed-bottom,
    .footer-nav {
        padding-bottom: env(safe-area-inset-bottom) !important;
    }
}

/* iOS'ta karanlık mod desteği */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: light dark;
    }
}

/* iOS'ta ekran yükseklikleri (iPhone 5/SE, 6/7/8, X/XS/11 Pro, XR/XS Max/11/11 Pro Max, 12/12 Pro, 12 mini, 12 Pro Max) */

/* iPhone 5/SE (1. Nesil) - 320x568 */
@media only screen 
    and (device-width: 320px) 
    and (device-height: 568px) 
    and (-webkit-device-pixel-ratio: 2) {
    .logo-notch {
        margin-bottom: 20px !important;
        height: 80px !important;
    }
    
    .logo-img {
        height: 45px !important;
    }
    
    .logo-text {
        margin-top: 2px !important;
    }
    
    .logo-text-top, .logo-text-bottom {
        font-size: 12px !important;
    }
    
    .navbar {
        height: 45px !important;
    }
    
    .carousel-caption h2 {
        font-size: 1.5rem !important;
    }
    
    .service-card {
        min-height: 180px !important;
    }
}

/* iPhone 6/7/8 - 375x667 */
@media only screen 
    and (device-width: 375px) 
    and (device-height: 667px) 
    and (-webkit-device-pixel-ratio: 2) {
    .logo-notch {
        margin-bottom: 20px !important;
    }
    
    .service-card {
        min-height: 200px !important;
    }
}

/* iPhone X/XS/11 Pro - 375x812 */
@media only screen 
    and (device-width: 375px) 
    and (device-height: 812px) 
    and (-webkit-device-pixel-ratio: 3) {
    
    
    /* Mobil Haber sliderı düzeltmeleri */
    .mobile-news-slider {
        margin-bottom: 15px !important;
    }
}

/* iPhone XR/XS Max/11/11 Pro Max - 414x896 */
@media only screen 
    and (device-width: 414px) 
    and (device-height: 896px) 
    and (-webkit-device-pixel-ratio: 2),
    only screen 
    and (device-width: 414px) 
    and (device-height: 896px) 
    and (-webkit-device-pixel-ratio: 3) 
    {
    .main-header.scrolled .logo-notch {
        width: 140px !important;
        height: 55px !important;
    }
}


/* iPhone 12/12 Pro - 390x844 */
@media only screen 
    and (device-width: 390px) 
    and (device-height: 844px) 
    and (-webkit-device-pixel-ratio: 3) {
}

/* iPhone 12 mini - 375x812 */
@media only screen 
    and (device-width: 360px) 
    and (device-height: 780px) 
    and (-webkit-device-pixel-ratio: 3) {
    .service-card {
        min-height: 195px !important;
    }
}

/* iPhone 12 Pro Max - 428x926 */
@media only screen 
    and (device-width: 428px) 
    and (device-height: 926px) 
    and (-webkit-device-pixel-ratio: 3) {
    .main-header.scrolled .logo-img {
        height: 48px !important;
    }
    
    .carousel-caption {
        bottom: 25% !important;
    }
}

/* iPhone 13/13 Pro/14/14 Pro - 390x844 */
/* iPhone 13 mini - 375x812 */
/* iPhone 13 Pro Max/14 Plus - 428x926 */
/* iPhone 14 Pro - 393x852 */
/* iPhone 14 Pro Max - 430x932 */
@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) 
    {
    
    .main-header.scrolled .logo-notch {
        width: 145px !important;
        height: 58px !important;
    }
    
    /* Dynamic Island telefonlar için özel düzenleme */
    .page-header {
        padding-top: calc(80px + env(safe-area-inset-top)) !important;
    }
    
    .logo-notch {
        margin-top: env(safe-area-inset-top) !important;
        margin-bottom: 20px !important;
    }
}

/* iPhone 15/15 Pro - 393x852 */
/* iPhone 15 Plus/15 Pro Max - 430x932 */
@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) {
    
    .main-header.scrolled .logo-notch {
        width: 145px !important;
        height: 58px !important;
    }
    
    /* Dynamic Island telefonlar için özel düzenleme */
    .page-header {
        padding-top: calc(80px + env(safe-area-inset-top)) !important;
    }
    
    .logo-notch {
        margin-top: env(safe-area-inset-top) !important;
        margin-bottom: 20px !important;
    }
    
    /* Hero section için özel düzenleme */
    .hero-section,
    .council-hero {
        margin-top: 120px !important;
    }
    
    /* Action Button ve Dynamic Island desteği */
    .action-button-area {
        margin-top: 10px !important;
    }
    
    /* Face ID algılayıcısı çevresindeki alanları iyileştirme */
    .main-header {
        padding-top: env(safe-area-inset-top) !important;
    }
    
    /* iPhone 15 Pro'da USB-C çevresi için alt kenarda ek boşluk */
    .footer-bottom, .copyright {
        padding-bottom: calc(10px + env(safe-area-inset-bottom)) !important;
    }
    
    /* iPhone 15 için ekran kenarlarındaki inset'ler */
    .container {
        padding-left: max(15px, env(safe-area-inset-left)) !important;
        padding-right: max(15px, env(safe-area-inset-right)) !important;
    }
}

/* iPad Pro'lar için */
@media only screen 
    and (min-device-width: 768px) 
    and (max-device-width: 1024px) 
    and (-webkit-device-pixel-ratio: 2) {
    .logo-notch {
        margin-bottom: 38px !important;
        height: 110px !important;
    }
    
    .logo-img {
        height: 55px !important;
    }
}

/* iOS'ta dokunmatik elementi iyileştirme */
a, button, .nav-link, .dropdown-item {
    touch-action: manipulation;
}

/* iOS'ta klavye görünümünde sabit alt çubuğun pozisyonunu düzenleme */
@media (max-height: 400px) {
    .fixed-bottom, 
    .footer-nav {
        position: relative !important;
    }
}

/* Swiping işlemleri için iOS'a özel düzenlemeler */
.carousel-item {
    -webkit-transition: -webkit-transform 0.6s ease-in-out;
    transition: -webkit-transform 0.6s ease-in-out;
}

/* iOS Safari'de focus outline düzeltmesi */
:focus {
    outline: none !important;
}

/* iOS'ta input alanları için otomatik stil düzeltmeleri */
input::-webkit-datetime-edit { padding: 0; }
input::-webkit-datetime-edit-fields-wrapper { background: transparent; }
input::-webkit-datetime-edit-text { color: inherit; }
input::-webkit-datetime-edit-month-field { color: inherit; }
input::-webkit-datetime-edit-day-field { color: inherit; }
input::-webkit-datetime-edit-year-field { color: inherit; }
input::-webkit-calendar-picker-indicator { background: transparent; }
input::-webkit-inner-spin-button { display: none; }

/* iOS'ta select elementi için özel stil */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%23333' d='M0 2l4 4 4-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 8px 8px;
    padding-right: 1.5rem;
}

/* iOS'ta genel düzeltmeler */
.ios-specific {
    /* iOS'ta görsel düzeltmeleri */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    /* iOS'ta animasyon performansını arttırma */
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
    -o-transform: translateZ(0);
    transform: translateZ(0);
} 