/* ===== GENERAL STYLES ===== */
* {
  box-sizing: border-box;
}

body {
  font-family: "abdo", sans-serif;
  color: #ffffff;
  background: url("../images/back_dark_1.jpg") no-repeat center fixed;
  background-size: cover;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* ===== NAVIGATION STYLES ===== */
nav {
  background-image: url("../images/c.png");
  box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.8);
  font-family: "abdo", sans-serif;
  color: #cccccc;
  font-size: larger;
  vertical-align: middle;
}

.navbar {
  padding: 0px;
}

.nav-item {
  vertical-align: middle;
  display: flex;
  align-items: center;
}

/* ===== NAVBAR SEARCH INPUT FIX ===== */
.navbar .header-search .form-control,
.navbar .header-search input[type="text"],
#search_text {
  padding: 0.4rem 0.8rem !important;
  font-size: 0.9rem !important;
  height: 38px !important;
  max-height: 38px !important;
  border-radius: 4px !important;
}

.navbar .header-search .btn,
.navbar .header-search .dropdown-toggle {
  padding: 0.4rem 0.8rem !important;
  font-size: 0.9rem !important;
  height: 38px !important;
  border-radius: 4px !important;
}

.navbar .header-search .input-group {
  align-items: center !important;
  flex-wrap: nowrap !important;
}

.navbar .header-search .input-group .form-control {
  height: 38px !important;
  border-top-right-radius: 4px !important;
  border-bottom-right-radius: 4px !important;
}

.navbar .header-search .input-group .btn-group .dropdown-toggle {
  border-top-left-radius: 4px !important;
  border-bottom-left-radius: 4px !important;
}

.navbar .header-search .dropdown-menu {
  font-size: 0.9rem !important;
  min-width: 150px !important;
}

/* ===== LAYOUT CONTAINERS ===== */
.container {
  background-image: url("../images/c.png");
  margin-top: 50px;
  border-radius: 10px;
  padding: 10px;
}

.container-div {
  background-image: url("../images/b.png");
  margin: 50px auto;
  border-radius: 10px;
  padding: 1%;
  width: 95%;
  max-width: 1800px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ===== BUTTON STYLES ===== */
.fav {
  background: #006699;
  color: white;
  border: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.fav:hover {
  background: #005079;
  color: white;
  transform: translateY(-1px);
}

/* ===== SEARCH COMPONENTS ===== */
.search-div {
  border-radius: 10px;
  padding: 2%;
  width: 100%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
}

/* ===== EMPLOYEE DATA CARDS ===== */

/* ===== EMPLOYEE DATA CARDS ===== */
#empsData .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

#empsData .card-img-top {
  height: 280px;
  object-fit: fill;
  width: 100%;
  flex-shrink: 0;
}

#empsData .card-body {
  direction: rtl;
  text-align: right;
  padding: 10px;
  flex-grow: 1; /* Allow card body to take remaining space */
  display: flex;
  flex-direction: column;
}

#empsData .card-title {
  font-family: "abdo", sans-serif;
  text-align: right;
  font-size: 13pt;
  font-weight: bold;
  color: #003366;
  margin-bottom: 0.5rem;
}

#empsData .card-text {
  flex-grow: 1; /* Allow text content to expand */
}

#empsData .info-block {
  font-family: "abdo", sans-serif;
  text-align: right;
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: 1fr 2fr; /* Label takes 1 part, value takes 2 parts */
  gap: 10px;
  align-items: start;
}

#empsData .info-label {
  font-family: "abdo", sans-serif;
  font-weight: bold;
  text-align: right;
  color: #333;
  font-size: 11pt;
  word-break: keep-all; /* Keep label text together */
}

#empsData .info-value {
  font-family: "abdo", sans-serif;
  font-size: 11pt;
  color: #555;
  text-align: right;
  word-break: break-word;
}

#empsData .card-subtitle {
  font-family: "abdo", sans-serif;
  text-align: right;
  font-size: 12pt;
  color: #555;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

/* ===== SPECIAL SECTIONS ===== */
.special-section-card {
  background-color: #cae5f7;
  border: 2px solid #b4b4b4;
  border-radius: 10px;
}

.emp_info_title_color {
  color: #000000;
  font-weight: 600;
}

/* ===== UTILITY CLASSES ===== */
.date-shape {
  direction: ltr;
  unicode-bidi: embed;
}

.pt-6 {
  padding-top: 4rem;
}

.modal_label {
  color: #006699;
  font-weight: bold;
  font-size: 16pt;
  margin-bottom: 0.5rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .container {
    margin-top: 30px;
    padding: 8px;
  }

  .container-div {
    margin: 30px auto;
    width: 98%;
    padding: 2%;
  }

  .search-div {
    padding: 3%;
  }

  #empsData .card-title {
    font-size: 12pt;
  }

  #empsData .card-subtitle {
    font-size: 11pt;
  }

  #empsData .info-block {
    flex-direction: column;
    align-items: flex-start;
  }

  #empsData .info-label,
  #empsData .info-value {
    min-width: auto;
    width: 100%;
    text-align: right;
  }

  .modal_label {
    font-size: 14pt;
  }

  .navbar .header-search .form-control,
  .navbar .header-search input[type="text"],
  #search_text {
    padding: 0.35rem 0.7rem !important;
    font-size: 0.85rem !important;
    height: 36px !important;
  }
}

@media (max-width: 576px) {
  body {
    font-size: 14px;
  }

  nav {
    font-size: 1rem;
  }

  .container {
    margin-top: 20px;
  }

  .container-div {
    margin: 20px auto;
  }

  .modal_label {
    font-size: 13pt;
  }

  .pt-6 {
    padding-top: 3rem;
  }

  .navbar .header-search .input-group {
    flex-direction: column;
    gap: 0.5rem;
  }

  .navbar .header-search .input-group .form-control,
  .navbar .header-search .input-group .btn-group {
    width: 100% !important;
    border-radius: 4px !important;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  .fav {
    transition: none;
  }

  .fav:hover {
    transform: none;
  }
}

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible,
.form-control:focus-visible {
  outline: 2px solid #006699;
  outline-offset: 2px;
}

/* ===== PAGINATION STYLES ===== */
.pagination {
  margin: 0;
  padding: 0;
  display: flex;
  gap: 5px;
  list-style: none;
  justify-content: center;
  flex-wrap: wrap;
}

.pagination li {
  list-style: none;
}

.pagination .page-link {
  padding: 8px 14px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  color: #495057;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  background-color: #fff;
  display: inline-block;
  min-width: 40px;
  text-align: center;
}

.pagination .page-link:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
  color: #212529;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination .active .page-link {
  background-color: #007bff;
  border-color: #007bff;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
}

.pagination .active .page-link:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  transform: translateY(-1px);
}

.pagination .disabled .page-link {
  color: #6c757d;
  pointer-events: none;
  background-color: #fff;
  border-color: #dee2e6;
  opacity: 0.5;
}

.pagination .page-link:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
  z-index: 2;
}

/* Dark mode pagination */
body[data-theme="dark"] .pagination .page-link,
@media (prefers-color-scheme: dark) {
  .pagination .page-link {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
  }

  .pagination .page-link:hover {
    background-color: #4a5568;
    border-color: #718096;
    color: #fff;
  }

  .pagination .active .page-link {
    background-color: #3182ce;
    border-color: #3182ce;
    color: #fff;
  }

  .pagination .active .page-link:hover {
    background-color: #2c5aa0;
    border-color: #2c5aa0;
  }

  .pagination .disabled .page-link {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #718096;
  }
}

/* RTL Support for Arabic */
[dir="rtl"] .pagination {
  direction: rtl;
}

/* Responsive pagination */
@media (max-width: 576px) {
  .pagination {
    gap: 3px;
  }

  .pagination .page-link {
    padding: 6px 10px;
    font-size: 14px;
    min-width: 35px;
  }
}

/* Print styles */
@media print {
  .container {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }

  .fav {
    background: #f0f0f0 !important;
    color: black !important;
    border: 1px solid #000 !important;
  }

  .navbar {
    display: none !important;
  }

  .pagination {
    display: none !important;
  }
}
