/* Mobile-First Base Styles */
html {
  position: relative;
  min-height: 100%;
  font-size: 14px;
}

body {
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* Typography - Mobile First */
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* Focus Styles */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Form Styles */
.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Navbar dropdown toggle rengi düzeltmesi */
.navbar-dark .nav-link.dropdown-toggle {
  color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-dark .nav-link.dropdown-toggle:hover,
.navbar-dark .nav-link.dropdown-toggle:focus {
  color: rgba(255, 255, 255, 1) !important;
}

.navbar-dark .nav-link.dropdown-toggle.show {
  color: rgba(255, 255, 255, 1) !important;
}

/* Mobile-First Responsive Utilities */
/* Navbar - Mobile Optimizations */
@media (max-width: 991.98px) {
  .navbar-nav {
    margin-top: 0.5rem;
  }
  
  .navbar-nav .nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .navbar-nav .nav-item:last-child {
    border-bottom: none;
  }
  
  .navbar-text {
    padding: 0.5rem 0;
    display: block;
  }
}

/* Tables - Mobile Responsive */
.table-responsive {
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 767.98px) {
  .table {
    font-size: 0.875rem;
  }
  
  .table th,
  .table td {
    padding: 0.5rem;
    vertical-align: middle;
  }
  
  /* Stack buttons vertically on mobile */
  .btn-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .btn-group .btn {
    width: 100%;
    margin: 0;
  }
}

/* Cards - Mobile Optimizations */
@media (max-width: 767.98px) {
  .card {
    margin-bottom: 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
}

/* Forms - Mobile Optimizations */
@media (max-width: 767.98px) {
  .form-label {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
  }
  
  .form-control,
  .form-select {
    font-size: 1rem; /* Prevents zoom on iOS */
  }
  
  .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .btn:last-child {
    margin-bottom: 0;
  }
  
  /* Stack form groups vertically */
  .row.g-3 > [class*="col-"] {
    margin-bottom: 1rem;
  }
}

/* Pagination - Mobile */
@media (max-width: 575.98px) {
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .page-item {
    margin: 0.25rem;
  }
  
  .page-link {
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
  }
}

/* Badges - Mobile */
@media (max-width: 575.98px) {
  .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
  }
}

/* Images - Responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Container adjustments for mobile */
@media (max-width: 575.98px) {
  .container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Footer - Mobile */
@media (max-width: 767.98px) {
  .footer {
    font-size: 0.875rem;
    padding: 1rem 0;
  }
}

/* Utility Classes for Mobile */
.d-mobile-none {
  display: none !important;
}

@media (min-width: 768px) {
  .d-mobile-none {
    display: block !important;
  }
  
  .d-desktop-none {
    display: none !important;
  }
}

/* Button Groups - Responsive */
@media (max-width: 575.98px) {
  .btn-group-vertical-mobile {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  
  .btn-group-vertical-mobile .btn {
    width: 100%;
    margin-bottom: 0.25rem;
  }
  
  .btn-group-vertical-mobile .btn:last-child {
    margin-bottom: 0;
  }
}