/* Custom: See motifs button hover style */
.see-motifs-btn:hover, .see-motifs-btn:focus {
  background-color: #e3f0ff !important;
  color: #0d6efd !important;
  border-color: #0d6efd !important;
  text-decoration: none;
}
/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  align-items: center;
  padding-left: 0;
  margin: 0;
  list-style: none;
}

.pagination .page-item {
  display: inline-block;
  margin: 0;
}

.pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .35rem .6rem;
  min-width: 2.1rem;
  height: 2.1rem;
  line-height: 1;
  font-size: .95rem;
  border-radius: .4rem;
  color: #333;
  background-color: #fff;
  border: 1px solid #bbb;
}

.pagination .page-item.active .page-link {
  font-weight: 600;
  color: #fff;
  background-color: #444;
  border-color: #444;
  box-shadow: none;
}

.pagination .page-link:hover {
  color: #fff;
  background-color: #888;
  border-color: #888;
}

/* Arrow icons */
.pagination .page-link svg {
  display: none;
}

.pagination .page-link[aria-label="Previous"],
.pagination .page-link[aria-label="Next"] {
  padding-left: .5rem;
  padding-right: .5rem;
  font-size: .95rem;
}

@media (max-width: 480px) {
  .pagination .page-link {
    padding: .25rem .45rem;
    min-width: 1.9rem;
    height: 1.9rem;
    font-size: .9rem;
  }
}

/* ===== NAVBAR ===== */
.navbar,
.navbar.fixed-top,
.navbar.sticky-top,
.navbar-sticky,
.navbar-expand-lg {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,250,250,0.9));
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.03);
  z-index: 1030;
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.navbar.transparent,
.navbar.bg-transparent {
  background-color: #f8f9fa !important;
  opacity: 1 !important;
}

.navbar.sticky-top {
  position: sticky;
  top: 0;
}

.navbar-brand img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.navbar.scrolled .navbar-brand img {
  width: 80px;
  height: 80px;
}

.brand-text {
  font-weight: 700;
  color: #222;
  font-size: 1rem;
}

/* Main navbar links */
.navbar .nav-link {
  position: relative;
  display: inline-block;
  padding: .5rem 1rem;
  margin: 0 .125rem;
  font-weight: 500;
  color: #495057 !important;
  transition: color .2s ease, transform .15s ease, background-color .2s ease, box-shadow .15s ease;
  border-radius: .5rem;
  text-decoration: none !important;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: #0d6efd !important;
  background-color: rgba(13,110,253,0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13,110,253,0.15);
  text-decoration: none !important;
}

.navbar .nav-link.active {
  background-color: rgba(13,110,253,0.12);
  color: #0d6efd !important;
  box-shadow: inset 0 -3px 0 rgba(13,110,253,0.3);
}

/* Protein page navbar variant: styled menu items */
.navbar.protein-navbar .nav-link {
  color: #495057 !important;
  font-weight: 500;
  font-size: 1.1rem;
}

.navbar.protein-navbar .nav-link.active,
.navbar.protein-navbar .nav-link:focus,
.navbar.protein-navbar .nav-link:hover {
  color: #000 !important;
  background: #f5f5f5;
  transform: none;
  box-shadow: none;
}

.navbar.protein-navbar .nav-item:not(:last-child) {
  border-right: 1px solid #bbb;
  margin-right: 0.5rem;
  padding-right: 0.5rem;
}

.navbar.protein-navbar .nav-link span.menu-bold {
  font-weight: bold;
  font-size: 1.08em;
}

/* Searchbar */
.searchbar-inline {
  gap: .5rem;
  align-items: center;
}

.searchbar-inline .form-control {
  min-width: 160px;
  max-width: 320px;
  height: calc(1.5em + .9rem + 2px);
}

/* ===== SEARCH FORMS ===== */
.search-form-compact {
  min-width: 240px;
  width: 100%;
  max-width: 280px;
}

.search-form-compact .form-control {
  border-radius: 0.375rem;
  border: 1.5px solid #ced4da;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
}

.search-form-compact .form-control::placeholder {
  font-size: 0.75rem;
  color: #6c757d;
  opacity: 0.8;
}

.search-form-compact .form-control:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.search-form-compact .btn {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.search-form-compact .btn-outline-primary:hover {
  background-color: #0d6efd;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.25);
}

.search-form-compact .btn-primary:hover {
  background-color: #0b5ed7;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

.search-form-compact .btn-outline-secondary:hover {
  background-color: #6c757d;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(108, 117, 125, 0.25);
}

.search-divider {
  width: 1px;
  background: linear-gradient(to bottom, transparent, #dee2e6 20%, #dee2e6 80%, transparent);
  margin: 0 0.5rem;
  align-self: stretch;
}

@media (max-width: 991.98px) {
  .search-form-compact {
    max-width: 100%;
  }
  .search-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, #dee2e6 20%, #dee2e6 80%, transparent);
    margin: 0.5rem 0;
  }
  .searchbar-inline {
    width: 100%;
  }
  .searchbar-inline .form-control {
    max-width: 100%;
  }
  .navbar .collapse {
    padding-top: .5rem;
  }
}

/* ===== AUTOCOMPLETE ===== */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% - 2.5rem);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ced4da;
  border-top: none;
  border-radius: 0 0 0.375rem 0.375rem;
  max-height: 250px;
  overflow-y: auto;
  z-index: 1050;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.autocomplete-dropdown.show {
  display: block;
}

.autocomplete-item {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
  transition: background-color 0.15s, color 0.15s;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background-color: #0d6efd;
  color: white;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

/* ===== WIDE SCREEN LAYOUT (> 1500px) ===== */
@media (min-width: 1500px) {
  .search-form-compact {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.5rem !important;
    min-width: auto !important;
    max-width: none !important;
  }
  
  .search-form-compact .form-control {
    margin-bottom: 0 !important;
    width: 280px !important;
    flex-shrink: 0 !important;
  }
  
  .search-form-compact .d-flex {
    margin-bottom: 0 !important;
    flex-shrink: 0 !important;
  }
  
  .navbar-collapse > .d-flex {
    flex-direction: row !important;
  }
  
  .search-divider {
    height: 2.5rem !important;
    margin: 0 1rem !important;
  }
  
  .autocomplete-dropdown {
    top: 100% !important;
    width: 280px !important;
  }
}