/* Genel overflow kontrolü - Zoom ve taşma sorunlarını önler */
html, body {
  overflow-x: hidden;
  width: 100%;
}

/* Container'ların taşmasını önle */
.container,
.max-w-7xl {
  box-sizing: border-box;
  padding-left: 2rem !important;
  padding-right: 2rem !important;
}

@media (max-width: 768px) {
  .container,
  .max-w-7xl {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}

@media (max-width: 480px) {
  .container,
  .max-w-7xl {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Resimlerin taşmasını önle */
img {
  max-width: 100%;
  height: auto;
}

/* Logo boyutunu sınırla */
.bg-white.shadow-sm img.h-16,
.bg-white.shadow-sm img[alt="Efix Logo"] {
  max-width: 200px;
  height: auto;
  object-fit: contain;
}

@media (max-width: 768px) {
  .bg-white.shadow-sm img.h-16,
  .bg-white.shadow-sm img[alt="Efix Logo"] {
    max-width: 150px;
  }
}

@media (max-width: 480px) {
  .bg-white.shadow-sm img.h-16,
  .bg-white.shadow-sm img[alt="Efix Logo"] {
    max-width: 120px;
  }
}

/* Responsive tablolar için */
table {
  max-width: 100%;
  overflow-x: auto;
  display: block;
}

/* Header ana wrapper için mobil düzenleme */
@media (max-width: 768px) {
  .bg-white.shadow-sm .flex.justify-between.items-center {
    flex-wrap: wrap;
  }
  
  .bg-white.shadow-sm .flex.justify-between.items-center > div:first-child {
    order: 1;
    flex: 0 0 auto;
  }
  
  .bg-white.shadow-sm .flex.justify-between.items-center > div:nth-child(2) {
    order: 3;
    width: 100%;
    margin-top: 0.5rem;
    justify-content: center;
  }
  
  .bg-white.shadow-sm .flex.justify-between.items-center > div:last-child {
    order: 2;
    margin-left: auto;
  }
}

/* Mobilde header butonları */
@media (max-width: 768px) {
  .header-buttons {
    gap: 0.25rem !important;
  }
  
  .header-buttons a {
    font-size: 9px !important;
    padding: 6px 8px !important;
    margin-left: 0 !important;
  }
}

/* Küçük mobil ekranlarda */
@media (max-width: 480px) {
  .bg-white.shadow-sm .flex.justify-between.items-center > div:nth-child(2) {
    display: none;
  }
  
  .header-buttons {
    gap: 0.15rem !important;
  }
  
  .header-buttons a {
    font-size: 8px !important;
    padding: 5px 6px !important;
  }
}

/* Çok küçük ekranlarda */
@media (max-width: 380px) {
  .header-buttons {
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
  }
  
  .header-buttons a {
    font-size: 10px !important;
    padding: 6px 10px !important;
    width: 100%;
  }
}

/* Dropdown menülerin ekran dışına taşmaması */
@media (max-width: 768px) {
  .dropdown-menu {
    max-width: calc(100vw - 4rem);
    right: 0;
    left: auto !important;
  }
  
  .sub-dropdown-menu {
    max-width: calc(100vw - 4rem);
    right: 0 !important;
    left: auto !important;
    margin-left: 0 !important;
  }
}

@media (max-width: 480px) {
  .dropdown-menu {
    max-width: calc(100vw - 2rem);
  }
  
  .sub-dropdown-menu {
    max-width: calc(100vw - 2rem);
  }
}

/* Footer ve diğer section'lar için overflow kontrolü */
section, 
footer {
  overflow-x: hidden;
  max-width: 100%;
}

/* Top Header için padding */
.text-white.py-3 .max-w-7xl {
  padding-left: 2rem !important;
  padding-right: 2rem !important;
}

/* Top Header responsive - sadece çok küçük ekranlarda */
@media (max-width: 768px) {
  .text-white.py-3 .max-w-7xl {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}

@media (max-width: 640px) {
  .text-white.py-3 .flex.justify-between.items-center {
    font-size: 11px;
  }
  
  .text-white.py-3 .space-x-8 {
    gap: 0.25rem;
  }
  
  .text-white.py-3 .space-x-6 {
    gap: 0.5rem;
  }
  
  .text-white.py-3 .max-w-7xl {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Navigation bar için padding */
nav.bg-gray-100 .max-w-7xl {
  padding-left: 2rem !important;
  padding-right: 2rem !important;
}

@media (max-width: 768px) {
  nav.bg-gray-100 .max-w-7xl {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}

@media (max-width: 480px) {
  nav.bg-gray-100 .max-w-7xl {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Bootstrap satırları için */
.row {
  margin-left: 0;
  margin-right: 0;
}

/* Yönetim Kurulu sayfası - Grid layout responsive */
@media (max-width: 768px) {
  .grid.grid-cols-2 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .grid.grid-cols-2 > div.col-span-2 {
    grid-column: 1;
  }
}

/* Rapor indirme butonları - mobil uyumlu */
@media (max-width: 640px) {
  .report-item {
    flex-direction: column !important;
    gap: 0.75rem;
    text-align: center;
  }
  
  .report-item span {
    width: 100%;
  }
  
  .report-item .btn {
    width: 100%;
    text-align: center;
  }
}

/* Şirket bilgileri kartları - mobil uyumlu */
@media (max-width: 768px) {
  .info-card {
    margin-bottom: 1.5rem !important;
  }
  
  .col-md-6 {
    margin-bottom: 1rem;
  }
}

/* Organizasyon şeması mobil */
@media (max-width: 768px) {
  .organizasyon-image {
    padding: 15px !important;
  }
}

/* Sidebar ve içerik mobil düzenleme */
@media (max-width: 768px) {
  .col-md-4 {
    width: 100%;
    margin-bottom: 2rem;
  }
  
  .col-md-8 {
    width: 100%;
  }
  
  .sidebar {
    text-align: center;
  }
  
  .sidebar .widget ul li {
    display: inline-block;
    margin: 0 10px;
  }
}
