:root {
    --primary: #0a192f;
    --accent: #007bff;
    --transition: all 0.4s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Montserrat', sans-serif; line-height: 1.6; color: #333; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Navigasyon & Dil Seçici */
#main-nav { position: fixed; width: 100%; z-index: 1000; padding: 20px 0; transition: var(--transition); }
#main-nav.scrolled { background: var(--primary); padding: 12px 0; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.nav-right { display: flex; align-items: center; }
.logo { color: white; font-size: 24px; font-weight: 800; }
.logo span { color: var(--accent); }


.lang-switcher { margin-right: 20px; margin-left: 20px; display: flex; gap: 5px; }
.lang-switcher button { 
    background: transparent; border: 1px solid #fff; color: #fff; 
    padding: 2px 8px; cursor: pointer; font-size: 11px; border-radius: 3px;
}
.lang-switcher button:hover { background: var(--accent); border-color: var(--accent); }

/*dil bolumu */
/* Dil Seçici Ana Kapsayıcı */
.lang-switcher-v2 {
    position: relative;
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    z-index: 1001; /* Navbar'daki diğer elemanların üstünde durması için */
}

/* Görünen Seçili Dil Butonu */
.lang-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: #fff !important; /* Yazı rengini garantiye aldık */
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    user-select: none; /* Mobilde uzun basınca metin seçilmesini engeller */
}

.lang-selected:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

/* Açılır Menü (Dropdown) Kutusu */
.lang-options {
    position: absolute;
    top: 100%;
    right: 0;
    /* margin-top: 15px;  <-- Bu boşluk fare kopmasına neden olur, siliyoruz */
    padding-top: 15px; /* Boşluğu padding ile veriyoruz ki fare takibi kesilmesin */
    background-color: transparent !important; /* Arka planı transparan yapıyoruz */
    min-width: 160px;
    display: none; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    z-index: 1002;
}

/* Bilgisayarda Mouse ile Geçişi Sağlayan Görünmez Köprü */
.lang-options::before {
    content: "";
    position: absolute;
    /* Menünün üzerinden butonun altına kadar uzanan görünmez bir alan */
    top: -20px; /* Buton ile menü arasındaki boşluğu yukarı doğru kapatır */
    left: 0;
    right: 0;
    height: 30px;
    background: transparent;
}


/* Web'de Hover Durumu */
@media (min-width: 769px) {
    .lang-switcher-v2:hover .lang-options,
    .lang-switcher-v2.is-open .lang-options {
        display: block;
        animation: fadeIn 0.2s ease-out;
    }
}
/* Mobil ve Genel: Tıklandığında (.active class) mutlaka göster */
.lang-switcher-v2.active .lang-options {
    display: block !important;
}

/* Menü İçindeki Dil Linkleri */
.lang-options a {
    display: block;
    padding: 12px 20px;
    color: #333333 !important; /* Mobilde beyaz kalmaması için siyah/koyu gri yaptık */
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    text-align: left;
    background-color: #ffffff;
}

/* Arapça (RTL) Hizalaması */
html[dir="rtl"] .lang-options {
    right: auto;
    left: 0;
}

html[dir="rtl"] .lang-options a {
    text-align: right;
}

.lang-options a:first-child { 
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.lang-options a:last-child { 
	border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    border-bottom: none;
}

.lang-options a:hover {
    background: #f8f9fa !important;
    color: var(--accent) !important;
}

/* Mobil için özel ayarlar (Ekran 768px'den küçükse) */
@media (max-width: 768px) {
    /* Yazıları ve oku gizle, sadece dünya ikonunu bırak */
    #active-lang, 
    .lang-selected .arrow-down {
        display: none;
    }

    /* Butonu yuvarlak yap ve içeriği ortala */
    .lang-selected {
        padding: 8px; /* Eşit boşluk */
        width: 35px;  /* Sabit genişlik */
        height: 35px; /* Sabit yükseklik */
        justify-content: center;
        border-radius: 50%; /* Tam yuvarlak */
    }

    .lang-selected .globe-icon {
        margin: 0;
        font-size: 16px; /* İkonu biraz büyütebilirsin */
    }

    /* Menü açıldığında mobilde çok sola veya sağa taşmaması için */
    .lang-options {
        right: 0;
        min-width: 140px;
        margin-top: 15px; /* Parmakla dokunurken biraz daha boşluk iyi olur */
    }
}

/* Giriş Animasyonu */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/*dil bolumu end*/

.nav-links { list-style: none; display: flex; align-items: center; }
.nav-links li { margin-left: 25px; }
.nav-links a { color: white; text-decoration: none; font-size: 13px; font-weight: 600; }
.btn-quote { background: var(--accent); padding: 8px 18px; border-radius: 4px; }

/* Hero */
.hero-section {
    min-height: 100vh; /* Yüksekliği sabitlemek yerine en az ekran kadar yapıyoruz */
    position: relative; 
    display: flex; 
    align-items: center; 
    color: white;
    padding-top: 80px; /* Navbar'ın altında kalmaması için boşluk ekledik */
    background: url('photo-1517976384346-3136801d605d1.jpg') center/cover;
}

/* Tarayıcı AVIF destekliyorsa bunu uygula */
@supports (background-image: url('photo-1517976384346-3136801d605d1.avif')) {
    .hero-section {
        background-image: url('photo-1517976384346-3136801d605d1.avif');
    }
}

.hero-overlay { 
    position: absolute; 
    inset: 0; 
    background: rgba(10, 25, 47, 0.6); 
}

.hero-content { 
    position: relative; 
    z-index: 2; 
    padding: 2rem 5%; 
    max-width: 800px; 
    width: 100%;
}

.hero-content h1 { 
    font-size: clamp(2rem, 8vw, 3.5rem); /* Dinamik yazı boyutu: Ekran küçüldükçe küçülür */
    margin-bottom: 20px; 
    line-height: 1.2;
}

.hero-content p {
    font-size: clamp(1rem, 4vw, 1.2rem);
    margin-bottom: 30px;
}

.hero-btns {
    display: flex;
    flex-wrap: wrap; /* Butonların alt alta düşmesini sağlar */
    gap: 15px;
}

.hero-btns a { 
    text-decoration: none; 
    padding: 12px 30px; 
    border-radius: 4px; 
    font-weight: 700; 
    display: inline-block;
    transition: transform 0.3s ease;}
.hero-btns a:hover {transform: translateY(-3px);}
.btn-primary { background: var(--accent); color: white; }
.btn-secondary { border: 2px solid white; color: white; }


/* Stats & Cards */
.stats-bar { background: var(--primary); padding: 30px 0; color: white; text-align: center; }
.stats-flex { display: flex; justify-content: space-around; }
.stat-item strong { display: block; font-size: 28px; color: var(--accent); }

.solutions { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
/*
.card { border-radius: 10px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.1); transition: 0.3s; }
.card:hover { transform: translateY(-10px); }
.card-img { height: 200px; background-size: cover; }
*/
.card-body { padding: 25px; }
.read-more { color: var(--accent); text-decoration: none; font-weight: 700; display: block; margin-top: 10px; }


.card-img {
    width: 100%;
    height: 260px; /* Sabit yükseklik */
    
    /* KRİTİK AYARLAR: */
    background-size: cover;    /* Görseli alanı kaplayacak şekilde ölçekler (boşluk bırakmaz) */
    background-position: center center; /* Görselin en önemli orta kısmını odaklar */
    background-repeat: no-repeat;
    
    /* Estetik Dokunuşlar */
    border-radius: 12px 12px 0 0; /* Sadece üst köşeleri yuvarla */
    transition: transform 0.5s ease;
}

.card:hover .card-img {
    transform: scale(1.05); /* Üzerine gelince görsel hafifçe büyüsün */
}

.card {
    overflow: hidden; /* Görsel büyüdüğünde kartın dışına taşmasın */
}


/* Search & Footer */
.inventory-search { background: #f8f9fa; padding: 60px 0; text-align: center; }
.input-group { display: flex; max-width: 500px; margin: 20px auto; border: 1px solid #ddd; }
.input-group input { flex: 1; padding: 15px; border: none; }
.input-group button { padding: 0 25px; background: var(--accent); color: white; border: none; cursor: pointer; }

.main-footer { background: var(--primary); color: #ccc; padding: 60px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 50px; }
.footer-bottom { text-align: center; margin-top: 40px; border-top: 1px solid #333; padding-top: 20px; font-size: 12px; }

/* Mobile */
/* Butonun mobilde görünmesini sağla */
@media screen and (max-width: 768px) {
    .mobile-menu-btn {
        display: flex !important; /* Görünürlüğü zorla */
        flex-direction: column;
        gap: 5px;
        z-index: 1100; /* Menüden daha üstte olmalı */
        cursor: pointer;
        padding: 10px;
    }

    .mobile-menu-btn span {
        display: block;
        width: 30px;
        height: 3px;
        background-color: white; /* Arka plan koyuysa beyaz kalsın */
        transition: 0.3s;
    }

    /* Menü listesinin mobil hali */
    .nav-links {
        display: flex; /* Gizli değil, konumlandırılmış olacak */
        position: fixed;
        right: -100%; /* Başlangıçta ekranın dışında */
        top: 0;
        width: 80%; /* Ekranın %80'ini kaplasın */
        height: 100vh;
        background: var(--primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease-in-out;
        z-index: 1050;
    }

    /* Menü aktif olduğunda içeri çek */
    .nav-links.active {
        right: 0;
    }
    
    /* Hamburger Çizgilerinin Dönüşümü */
	.mobile-menu-btn.toggle span:nth-child(1) {
	    transform: rotate(-45deg) translate(-5px, 6px);
	}
	
	.mobile-menu-btn.toggle span:nth-child(2) {
	    opacity: 0; /* Ortadaki çizgiyi gizle */
	}
	
	.mobile-menu-btn.toggle span:nth-child(3) {
	    transform: rotate(45deg) translate(-5px, -7px);
	}
	
	/* Çizgilerin yumuşak hareket etmesi için geçiş hızı (span'lara ekle) */
	.mobile-menu-btn span {
	    transition: transform 0.4s ease, opacity 0.4s ease;
	}
	
}

/* --- RESPONSIVE FIXES (Sayfanın altına ekle) --- */

@media screen and (max-width: 768px) {
    /* 1. Hero başlığının ekrandan taşmasını engelle */
    .hero-content h1 {
        font-size: 2.2rem !important; /* iPhone SE için ideal boyut */
        line-height: 1.1;
    }

    /* 2. Stats (İstatistik) barını dikey yap */
    .stats-flex {
        flex-direction: column;
        gap: 30px;
    }

    /* 3. Çözümler (Solutions) kartlarını tek sütuna düşür */
    .card-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    /* 4. Footer yapısını alt alta getir */
    .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
    }

    /* 5. Arama çubuğunu (Inventory) mobilde düzelt */
    .input-group {
        flex-direction: column;
        border: none !important;
    }
    .input-group input {
        width: 100%;
        margin-bottom: 10px;
        border: 1px solid #ddd !important;
        border-radius: 4px;
    }
    .input-group button {
        width: 100%;
        padding: 15px;
        border-radius: 4px;
    }

    /* 6. Logo ve Navigasyon hizalaması */
    .nav-container {
        padding: 0 15px;
    }
    
    /* 7. Dil seçiciyi mobilde gizlemek ya da küçültmek istersen */
    .lang-switcher {
        margin-right: 10px;
    }
    .lang-switcher button {
        padding: 4px 6px;
        font-size: 10px;
    }
}

/* Ekstra küçük ekranlar için (iPhone SE / 320px) */
@media screen and (max-width: 380px) {
    .hero-content h1 {
        font-size: 1.8rem !important;
    }
    .hero-btns a {
        display: block;
        width: 100%;
        margin-bottom: 10px;
        text-align: center;
    }
}

/* Mobil Düzenlemeler */
@media (max-width: 768px) {
    .hero-section {
        justify-content: center;
        text-align: center;
        padding-top: 100px; /* Mobilde navbar daha kalınsa pay bırakır */
    }
    
    .hero-btns {
        justify-content: center;
    }
}
