/* Mobil Uyumluluk Düzeltmeleri */

/* Hero Background Pattern Düzeltmesi - Tüm Sayfalar */
.hero-bg-pattern {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0.1;
    z-index: 1 !important;
    pointer-events: none;
}

.page-hero {
    position: relative;
    overflow: hidden !important;
}

.page-hero .container {
    position: relative;
    z-index: 10 !important;
}

.hero-content {
    position: relative;
    z-index: 10 !important;
}

/* Preloader Düzeltmesi - Menü Altında Başlaması */
.preloader {
    position: fixed !important;
    top: 120px !important;
    left: 0;
    width: 100%;
    height: calc(100vh - 120px) !important;
    z-index: 999 !important;
}

/* Genel Container */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    /* Preloader Mobil */
    .preloader {
        top: 80px !important;
        height: calc(100vh - 80px) !important;
    }
    
    .preloader-spinner {
        width: 40px !important;
        height: 40px !important;
        margin: 0 auto 15px !important;
    }
    
    .preloader-content h3 {
        font-size: 1.2rem !important;
        margin: 0 0 8px 0 !important;
    }
    
    .preloader-content p {
        font-size: 0.9rem !important;
        margin: 0 !important;
    }
    
    /* Hero Pattern Mobil */
    .hero-bg-pattern {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
    }
    
    .page-hero {
        overflow: hidden !important;
    }
    
    .page-hero .container {
        z-index: 10 !important;
    }
    
    /* BiKEM Eğitim Modeli - 3 sütun */
    section > .container > div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Kampüsler - 2 sütun */
    .campus-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Eğitim Kademeleri - 6 sütun */
    section > .container > div[style*="grid-template-columns: repeat(6, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    
    section > .container > div[style*="grid-template-columns: repeat(6, 1fr)"] a {
        padding: 20px 15px !important;
        font-size: 0.9rem !important;
    }
    
    section > .container > div[style*="grid-template-columns: repeat(6, 1fr)"] a div[style*="font-size: 2.5rem"] {
        font-size: 2rem !important;
        margin-bottom: 10px !important;
    }
    
    section > .container > div[style*="grid-template-columns: repeat(6, 1fr)"] a h3 {
        font-size: 1rem !important;
        margin-bottom: 8px !important;
    }
    
    section > .container > div[style*="grid-template-columns: repeat(6, 1fr)"] a p {
        font-size: 0.8rem !important;
    }
    
    /* Hızlı Erişim - 2 sütun */
    .hizli-erisim-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Haberler */
    section > .container > div[style*="grid-template-columns: repeat(auto-fit, minmax(320px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }
    
    /* LGS Burs - 2 sütun */
    section > .container > div[style*="display: grid; grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Başlıklar */
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.8rem !important;
    }
    
    h3 {
        font-size: 1.3rem !important;
    }
    
    /* Section Padding */
    section {
        padding: 40px 0 !important;
    }
    
    /* Section Header */
    .section-header h2 {
        font-size: 1.8rem !important;
    }
    
    .section-header p {
        font-size: 1rem !important;
    }
    
    /* Kartlar */
    .campus-card,
    .hizli-erisim-card {
        padding: 25px !important;
    }
    
    /* CTA Butonlar */
    section[style*="background: linear-gradient(45deg"] .container > div {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    section[style*="background: linear-gradient(45deg"] h2 {
        font-size: 1.8rem !important;
    }
    
    section[style*="background: linear-gradient(45deg"] p {
        font-size: 1rem !important;
    }
    
    /* About Section */
    .about-content {
        flex-direction: column !important;
    }
    
    .about-image {
        margin-top: 30px;
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Çok Küçük Ekranlar */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    /* Preloader Çok Küçük Mobil */
    .preloader {
        top: 70px !important;
        height: calc(100vh - 70px) !important;
    }
    
    .preloader-spinner {
        width: 35px !important;
        height: 35px !important;
        margin: 0 auto 12px !important;
    }
    
    .preloader-content h3 {
        font-size: 1rem !important;
        margin: 0 0 6px 0 !important;
    }
    
    .preloader-content p {
        font-size: 0.85rem !important;
    }
    
    /* Hero Pattern Çok Küçük Mobil */
    .hero-bg-pattern {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
    }
    
    .page-hero {
        overflow: hidden !important;
    }
    
    .page-hero .container {
        z-index: 10 !important;
    }
    
    /* Eğitim Kademeleri - Tek sütun */
    section > .container > div[style*="grid-template-columns: repeat(6, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
    
    h1 {
        font-size: 1.5rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    section {
        padding: 30px 0 !important;
    }
    
    /* Butonlar */
    .btn-primary,
    .btn-secondary,
    .action-btn {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
    
    /* Section Badge */
    .section-badge {
        font-size: 12px !important;
        padding: 6px 15px !important;
    }
}

/* Ekstra Küçük Ekranlar */
@media (max-width: 375px) {
    .preloader {
        top: 65px !important;
        height: calc(100vh - 65px) !important;
    }
    
    .hero-bg-pattern {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
    }
    
    .page-hero {
        overflow: hidden !important;
    }
    
    .page-hero .container {
        z-index: 10 !important;
    }
}

/* Yatay Kaydırma Önleme */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
}

* {
    box-sizing: border-box;
}

/* Grid Container Overflow Fix */
[style*="display: grid"] {
    max-width: 100%;
    overflow: hidden;
}

/* Image Overflow Fix */
img {
    max-width: 100%;
    height: auto;
}

/* Flex Container Fix */
[style*="display: flex"] {
    flex-wrap: wrap;
}

/* Tablet Görünüm */
@media (max-width: 1024px) and (min-width: 769px) {
    /* Eğitim Kademeleri - 3 sütun */
    section > .container > div[style*="grid-template-columns: repeat(6, 1fr)"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    /* BiKEM - 2 sütun */
    section > .container > div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Padding ve Margin Düzeltmeleri */
@media (max-width: 768px) {
    /* Tüm section'ların padding'ini azalt */
    section[style*="padding: 80px 0"] {
        padding: 40px 0 !important;
    }
    
    /* Büyük fontları küçült */
    [style*="font-size: 2.5rem"] {
        font-size: 1.8rem !important;
    }
    
    [style*="font-size: 3rem"] {
        font-size: 2rem !important;
    }
    
    [style*="font-size: 4rem"] {
        font-size: 2.5rem !important;
    }
    
    /* Padding'leri azalt */
    [style*="padding: 40px"] {
        padding: 25px !important;
    }
    
    [style*="padding: 30px"] {
        padding: 20px !important;
    }
    
    /* Gap'leri azalt */
    [style*="gap: 30px"] {
        gap: 20px !important;
    }
    
    [style*="gap: 40px"] {
        gap: 25px !important;
    }
}
