/* KararSistem Search - Custom Styles */

/* ? Sticky Footer - Sayfa kısa olunca bile en altta */
html, body {
height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

main {
    flex: 1 0 auto; /* Footer'ı aşağı iter */
}

footer {
    flex-shrink: 0; /* Footer boyutu sabit kalır */
}

/* Global Styles */
.container {
    max-width: 1200px;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.4rem;
}

.navbar-dark .navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

/* Search Components */
.search-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
 box-shadow: 0 0 20px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.search-input {
    font-size: 16px !important; /* Mobile zoom prevention */
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.search-btn {
    padding: 12px 30px;
  font-size: 1.1rem;
    border-radius: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 25px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline-primary:hover {
background: #667eea;
    border-color: #667eea;
  transform: translateY(-1px);
}

/* Forms - Mobile Optimized */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 10px 15px;
    transition: all 0.3s ease;
    font-size: 16px !important; /* Prevents mobile zoom on iOS/Android */
}

.form-control:focus {
    border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
}

/* Input group for password toggle */
.input-group .form-control {
    border-top-right-radius: 0 !important;
 border-bottom-right-radius: 0 !important;
}

.input-group .btn-outline-secondary {
 border: 2px solid #e9ecef;
    border-left: none;
    color: #6c757d;
    border-top-right-radius: 8px;
 border-bottom-right-radius: 8px;
}

.input-group .btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    color: #495057;
}

.input-group .btn-outline-secondary:focus {
    box-shadow: none;
  border-color: #667eea;
}

.input-group:focus-within .btn-outline-secondary {
    border-color: #667eea;
}

/* Search Results */
.search-result-item {
  background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
 border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.search-result-title {
    color: #2d3748;
    font-weight: 600;
  font-size: 1.2rem;
    margin-bottom: 8px;
    text-decoration: none;
}

.search-result-title:hover {
    color: #667eea;
}

.search-result-meta {
    font-size: 0.9rem;
    color: #718096;
 margin-bottom: 10px;
}

.search-result-snippet {
    color: #4a5568;
    line-height: 1.6;
}

/* History Page */
.history-item {
    transition: all 0.3s ease;
}

.history-item:hover {
    transform: translateY(-2px);
}

.search-status i {
    font-size: 1.2rem;
}

.search-meta {
    font-size: 0.85rem;
}

.error-message {
    background-color: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 6px;
    padding: 8px 12px;
}

/* Stats Cards */
.search-stats {
  background: white;
    border-radius: 10px;
 border: 1px solid #e2e8f0;
}

.search-stats h5 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2px;
}

/* Empty States */
.empty-state {
    background: white;
    border-radius: 10px;
    padding: 3rem;
}

.empty-icon {
    opacity: 0.3;
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.alert-info {
    background: linear-gradient(135deg, #4299e1, #3182ce);
 color: white;
}

/* Footer */
footer {
  border-top: 1px solid #e2e8f0;
    background: white !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-container {
     padding: 1.5rem;
   margin: 1rem;
    }
  
    .container {
    padding: 0 1rem;
    }
    
    .search-btn {
      width: 100%;
      margin-top: 10px;
    }
 
    .navbar-brand {
        font-size: 1.2rem;
    }
    
  .search-result-item {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }

    /* Mobile form optimizations */
    .form-control {
     font-size: 16px !important; /* Critical for preventing zoom */
    }

    .form-label {
  font-size: 14px;
    }

    .btn {
        font-size: 14px;
        padding: 10px 16px;
    }

    h1 {
      font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
     font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .search-container {
  margin: 0.5rem;
     padding: 1rem;
    }
    
    .search-stats .row {
        text-align: center;
    }
    
    .search-stats .col-md-4 {
        margin-bottom: 1rem;
    }

    .form-control {
        font-size: 16px !important;
        padding: 10px 12px;
    }

    .btn-lg {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 2rem;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animations */
@keyframes fadeInUp {
    from {
   opacity: 0;
    transform: translateY(30px);
    }
    to {
    opacity: 1;
        transform: translateY(0);
  }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

/* Print Styles */
@media print {
    .navbar, footer, .btn, .dropdown, .alert-dismissible .btn-close {
  display: none !important;
}
    
    body {
        background: white !important;
    }
    
  .card, .search-container {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}