/* style.css */
:root {
    --bg-color: #f8f9fa;
    --text-color: #343a40;
    --card-bg-color: #ffffff;
    --card-border-color: #e9ecef;
    --header-bg-color: #ffffff;
    --header-shadow-color: rgba(0,0,0,0.08);
    --category-title-color: #212529;
    --category-border-color: #e9ecef;
    --link-title-color: #2c3e50;
    --link-description-color: #6c757d;
    --hover-border-color: #3498db;
    --mark-bg-color: #fff3cd;
    --input-border-color: #dee2e6;
    --input-icon-color: #aaa;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0; /* Üst çubuk için padding'i kaldır */
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.top-bar {
    background-color: var(--header-bg-color);
    padding: 0 40px; /* Sağdan ve soldan boşluk */
    box-shadow: 0 2px 5px var(--header-shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: padding 0.3s ease; /* Üst çubuk yüksekliği için yumuşak geçiş */
}

.top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between; /* Öğeleri iki yana yasla */
    align-items: center;
    transition: padding 0.3s ease; /* İç boşluk için yumuşak geçiş */
    padding: 10px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: none; /* Konteynerin kendi arka planını kaldır */
    padding: 30px 40px;
    border-radius: 0;
    box-shadow: none; /* Konteynerin gölgesini kaldır */
}

.top-bar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-bar-brand h1 {
    font-size: 1.5rem;
    color: var(--link-title-color);
    margin: 0;
    transition: font-size 0.3s ease; /* Yazı boyutu için yumuşak geçiş */
}

.logo {
    width: 75px;
    height: 75px;
    border-radius: 8px; /* Daha modern, köşeli yuvarlak */
    box-shadow: none; /* Logo gölgesini kaldır */
    transition: width 0.3s ease, height 0.3s ease; /* Logo boyutu için yumuşak geçiş */
}

.ataturk-logo {
    height: 90px; /* Yüksekliği ayarla */
    width: auto; /* Genişlik otomatik ayarlansın */
    transition: height 0.3s ease; /* Yumuşak geçiş */
}

/* Sayfa aşağı kaydırıldığında uygulanacak stiller */
.top-bar.scrolled .top-bar-inner {
    padding: 5px 0; /* Üst çubuğun iç boşluğunu azalt */
}

.top-bar.scrolled .logo {
    width: 40px; /* Logoyu küçült */
    height: 40px;
}

.top-bar.scrolled .top-bar-brand h1 {
    font-size: 1.2rem; /* Yazıyı da logoyla orantılı küçült */
}

.top-bar.scrolled .ataturk-logo {
    height: 40px; /* Küçültülmüş yükseklik */
}

.category-section h2 {
    font-size: 1.1rem; /* Büyük harf kullanımı için boyutu ayarladık */
    font-weight: 700; /* Yazı tipini daha kalın yaptık */
    color: #3498db; /* Tema rengiyle uyumlu mavi */
    text-transform: uppercase; /* Tüm harfleri büyük harfe çevirir */
    letter-spacing: 0.5px; /* Harfler arasına hafif boşluk ekler */
    background: none; /* Arka plan rengini kaldır */
    padding-bottom: 10px;
    border-bottom: 2px solid var(--category-border-color); /* Sade bir alt çizgi */
    display: block;
    margin-top: 40px;
    margin-bottom: 25px;
    box-shadow: none; /* Gölgeyi kaldır */
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.link-card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--card-border-color); /* Renkli kenarlık yerine ince bir çerçeve */
    border-radius: 8px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease;
    display: block;
    box-shadow: none; /* Varsayılan gölgeyi kaldır */
}

.link-card:hover {
    transform: translateY(-5px);
    border-color: var(--hover-border-color); /* Üzerine gelince çerçeve rengini değiştir */
}

.link-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--link-title-color);
    word-break: break-word;
    display: flex;
    align-items: center;
}

.link-title i {
    margin-right: 10px;
    font-size: 1.2rem; /* İkonu küçült */
    width: 20px;
    color: var(--link-description-color); /* İkon rengini daha soluk yap */
}

.link-description {
    font-size: 0.9rem;
    color: var(--link-description-color);
    margin-top: 8px;
    word-break: break-word;
}

/* Login Sayfası Logosu */
.login-logo {
    display: block;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
}

/* Mobil Cihazlar İçin Duyarlılık */
@media (max-width: 768px) {
    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Arama Vurgulama Stili */
mark {
    background-color: var(--mark-bg-color); /* Vurgu için yumuşak sarı renk */
    color: inherit;
}

.no-links {
    text-align: center;
    font-size: 1.2rem;
    color: #888;
    padding: 50px;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.9rem;
    color: #777;
}

footer a {
    color: #007bff;
    text-decoration: none;
}

/* Tema Değiştirme Butonu */
/* Yüzen Eylem Butonu Konteyneri */
.fab-container {
    position: fixed; /* Sayfaya göre sabitlenir */
    bottom: 30px;    /* Alttan 30px boşluk */
    right: 30px;     /* Sağdan 30px boşluk */
    z-index: 1001;   /* Diğer öğelerin üzerinde kalması için */
}

.social-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column; /* Butonları yukarı doğru sırala */
    gap: 15px;
}

/* Yüzen butonların ortak stili */
.social-links a,
#search-fab,
#theme-toggle {
    background: none;
    border: 1px solid var(--input-border-color);
    color: var(--link-description-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Yüzen butonların üzerine gelme efekti */
.social-links a:hover,
#search-fab:hover,
#theme-toggle:hover {
    transition: background-color 0.3s, color 0.3s;
    background-color: #f1f1f1;
}

body.dark-mode .social-links a:hover,
body.dark-mode #search-fab:hover,
body.dark-mode #theme-toggle:hover {
    background-color: #4a5568;
}
/* Dark Mode Stilleri */
body.dark-mode {
    --bg-color: #121212; /* Daha koyu bir ana arka plan */
    --text-color: #e0e0e0; /* Genel metin rengi */
    --card-bg-color: #1e1e1e; /* Kartlar için biraz daha açık bir arka plan */
    --card-border-color: #333333; /* Daha belirgin bir çerçeve rengi */
    --header-bg-color: #1e1e1e; /* Başlık çubuğu arka planı */
    --header-shadow-color: rgba(0,0,0,0.5); /* Daha belirgin gölge */
    --category-title-color: #e0e0e0;
    --category-border-color: #333333;
    --link-title-color: #ffffff; /* Başlıklar için tam beyaz */
    --link-description-color: #888888; /* Açıklamalar için daha soluk gri */
    --hover-border-color: #3498db; /* Vurgu rengi aynı kalabilir */
    --mark-bg-color: #D29922; /* Arama vurgusu için sarı tonu */
    --input-border-color: #333333;
    --input-icon-color: #888888;
}

body.dark-mode .fa-moon { display: none; }
body:not(.dark-mode) .fa-sun { display: none; }

/* Arama Overlay Stilleri */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Tam ekran yüksekliği */
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 15vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.close-search-btn {
    position: absolute;
    top: 40px;
    right: 40px;
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
}

.search-overlay-content {
    position: relative;
    width: 100%;
    max-width: 600px;
    padding: 0 15px; /* Mobil cihazlarda kenar boşluğu */
}

.search-input-wrapper {
    position: relative; /* İkonun buna göre konumlanmasını sağlar */
}

#searchInput {
    width: 100%;
    padding: 20px 60px 20px 20px;
    font-size: 1.5rem;
    border-radius: 8px;
    border: none;
    box-sizing: border-box; /* Padding'in genişliğe dahil olmasını sağlar */
    outline: none;
    background-color: var(--card-bg-color); /* Arama kutusu arka planı */
    color: var(--text-color); /* Arama kutusu metin rengi */
}

.search-overlay-content .fa-search {
    position: absolute;
    right: 25px; /* Wrapper'ın padding'ine göre ayarlandı */
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--input-icon-color);
}

/* AJAX Arama Sonuçları Stilleri */
#search-results-container {
    margin-top: 25px;
    max-height: 60vh;
    overflow-y: auto;
    background-color: var(--card-bg-color); /* Sonuçlar için arka plan */
    border-radius: 8px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-color);
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--card-border-color); /* Ayırıcı çizgi */
}

.search-result-item:last-child {
    border-bottom: none; /* Son elemanın alt çizgisini kaldır */
}

.search-result-item:hover {
    background-color: var(--bg-color); /* Üzerine gelince hafif renk değişimi */
}

.search-result-icon {
    font-size: 1.2rem; /* İkonu biraz küçültelim */
    color: var(--link-description-color);
    margin-right: 20px;
    width: 20px; /* Sabit genişlik */
    text-align: center;
    flex-shrink: 0; /* İkonun sıkışmasını engelle */
}

.search-result-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Mevcut tüm boş alanı doldur */
    overflow: hidden; /* Taşan metinleri gizle */
}

.search-result-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--link-title-color);
    white-space: nowrap; /* Başlığın tek satırda kalmasını sağla */
    overflow: hidden;
    text-overflow: ellipsis; /* Taşarsa ... ile bitir */
}

.no-ajax-results {
    color: #ccc;
    text-align: center;
    padding: 40px 20px;
    font-size: 1.2rem;
}

.loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-left-color: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Yönetici Paneli Stilleri */
.admin-container { padding: 20px; padding-top: 80px; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.admin-table th, .admin-table td { border: 1px solid #ddd; padding: 12px; text-align: left; }
.admin-table th { background-color: #f2f2f2; }
.admin-table tr:nth-child(even) { background-color: #f9f9f9; }
.admin-table a { margin-right: 10px; }

/* Modern Form Elements */
.form-group { margin-bottom: 20px; }

.form-group label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: 500;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group textarea,
.form-group select { 
    width: 100%; 
    padding: 12px 15px; 
    border: 1px solid var(--input-border-color); 
    border-radius: 0 !important; 
    box-sizing: border-box;
    background-color: var(--card-bg-color);
    color: var(--text-color);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

/* Bootstrap override for admin panel inputs */
.form-control {
    border-radius: 0 !important;
}

/* Custom Select Arrow */
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23555' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

body.dark-mode .form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23ccc' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
}

/* Buttons */
.btn { 
    padding: 12px 24px; 
    color: #fff; 
    text-decoration: none; 
    border-radius: 0 !important; 
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    font-size: 1rem;
    line-height: 1.5;
    font-family: inherit;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary { background-color: #3498db; }
.btn-primary:hover { background-color: #2980b9; }

.btn-edit { background-color: #f39c12; color: #fff; }
.btn-edit:hover { background-color: #d35400; }

.btn-delete { background-color: #e74c3c; color: #fff; }
.btn-delete:hover { background-color: #c0392b; }

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    margin-right: 5px !important;
}

/* File Input */
.form-group input[type="file"] {
    padding: 10px;
    background-color: var(--bg-color);
    border: 1px dashed var(--input-border-color);
    height: auto;
}

/* Color Input */
.form-group input[type="color"] {
    padding: 2px;
    height: 45px;
    cursor: pointer;
}

/* Range Input */
.form-group input[type="range"] {
    border: none;
    padding: 0;
    background: transparent;
}

/* En çok tıklanan linkleri vurgulama stili */
.table tr.top-link {
    background-color: #fffbe6 !important; /* Açık sarı arka plan */
}

/* Tablo Hover Efekti - Daha belirgin */
.table-hover > tbody > tr:hover {
    background-color: #e8f4fc !important;
}

/* Boş kategorileri vurgulama stili */
.table tr.empty-category {
    background-color: #f8f9fa !important;
    font-style: italic;
}

/* Mobil Cihazlar İçin Duyarlılık */
@media (max-width: 768px) {
    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === Yeni Minimalist Dashboard Stilleri === */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.stat-card .icon {
    font-size: 1.5rem;
    color: #3498db;
}

.stat-card .info {
    text-align: left;
}

.stat-card h3 {
    margin: 0 0 2px 0;
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 500;
}

.stat-card p {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
}

.dashboard-main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.dashboard-right {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.dashboard-chart, .dashboard-list {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
}

.dashboard-chart h3, .dashboard-list h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.dashboard-chart h3 a, .dashboard-list h3 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.dashboard-chart h3 a:hover, .dashboard-list h3 a:hover {
    color: #3498db;
}

.dashboard-list ul { list-style: none; padding: 0; margin: 0; }
.dashboard-list li { padding: 12px 0; border-bottom: 1px solid #f5f5f5; display: flex; justify-content: space-between; font-size: 0.9rem; }
.dashboard-list li:last-child { border-bottom: none; }
.dashboard-list li span { color: #7f8c8d; font-weight: 500; }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Bootstrap Navbar Customization */
.navbar-brand { position: relative; z-index: 2; }

.navbar-nav.navbar-right .btn { position: relative; z-index: 2; padding: 4px 20px; margin: 10px auto; }

.navbar .navbar-collapse { position: relative; }
.navbar .navbar-collapse .navbar-right > li:last-child { padding-left: 22px; }

.navbar .nav-collapse { position: absolute; z-index: 1; top: 0; left: 0; right: 0; bottom: 0; margin: 0; padding-right: 120px; padding-left: 80px; width: 100%; }
.navbar.navbar-default .nav-collapse { background-color: #f8f8f8; }
.navbar.navbar-inverse .nav-collapse { background-color: #222; }
.navbar .nav-collapse .navbar-form { border-width: 0; box-shadow: none; }
.nav-collapse>li { float: right; }

.btn.btn-circle { border-radius: 50px; }
.btn.btn-outline { background-color: transparent; }

@media screen and (max-width: 767px) {
    .navbar .navbar-collapse .navbar-right > li:last-child { padding-left: 15px; padding-right: 15px; } 
    
    .navbar .nav-collapse { margin: 7.5px auto; padding: 0; }
    .navbar .nav-collapse .navbar-form { margin: 0; }
    .nav-collapse>li { float: none; }
    
    .navbar .nav-collapse { position: relative; padding: 0; width: auto; }
}

/* Admin Panel Minimal Bootstrap Stilleri */
.panel { border: none; border-radius: 8px; box-shadow: 0 2px 15px rgba(0,0,0,0.05); margin-bottom: 30px; background-color: #fff; }
.panel-heading { background-color: #fff; border-bottom: 1px solid #f8f9fa; border-radius: 8px 8px 0 0; padding: 20px; }
.panel-title { font-size: 16px; font-weight: 600; color: #34495e; margin: 0; }
.panel-body { padding: 30px; }
.panel-default > .panel-heading { color: #333; background-color: #fff; border-color: #f8f9fa; }
