/* Departments Page Styles */

/* Page Header */
.page-header-area {
  background: linear-gradient(rgba(23, 121, 186, 0.9), rgba(23, 121, 186, 0.9)), url('../images/page-header/page-header-bg.jpg');
  background-size: cover;
  background-position: center;
  padding: 120px 0 80px;
  position: relative;
}

.page-header-content {
  text-align: center;
  color: #fff;
}

.page-header-content h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #fff;
}

.breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
  justify-content: center;
}

.breadcrumb-item {
  font-size: 16px;
}

.breadcrumb-item a {
  color: #fff;
  text-decoration: none;
}

.breadcrumb-item.active {
  color: #ffd700;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: ">";
  color: #fff;
  padding: 0 8px;
}

/* Alphabet Navigation */
.alphabet-nav-area {
  background: #f8f9fa;
  padding: 20px 0;
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

/* Department Search Box */
.department-search-area {
  margin-bottom: 40px;
}

.department-search-box {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.department-search-box:focus-within {
  border-color: #1779ba;
  box-shadow: 0 8px 30px rgba(23, 121, 186, 0.2);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.department-search-input {
  flex: 1;
  padding: 18px 60px 18px 25px;
  border: none;
  font-size: 16px;
  color: #333;
  background: transparent;
  outline: none;
  font-family: inherit;
}

.department-search-input::placeholder {
  color: #999;
  font-style: italic;
}

.department-search-btn {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  background: #1779ba;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.department-search-btn:hover {
  background: #155a8a;
  transform: translateY(-50%) scale(1.1);
}

.clear-search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: #dc3545;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.clear-search-btn:hover {
  background: #c82333;
  transform: translateY(-50%) scale(1.1);
}

.search-suggestions {
  padding: 20px 25px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
}

.suggestions-title {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
  font-weight: 600;
}

.suggestion-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suggestion-tag {
  display: inline-block;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  transition: all 0.3s ease;
}

.suggestion-tag:hover {
  background: #1779ba;
  color: #fff;
  border-color: #1779ba;
  transform: translateY(-2px);
}

/* Search results highlight */
.search-active .department-card {
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

.search-active .department-card.match {
  opacity: 1;
  border-color: #1779ba;
  box-shadow: 0 8px 25px rgba(23, 121, 186, 0.15);
}

.search-highlight {
  background: linear-gradient(120deg, #ffd700 0%, #ffed4e 100%);
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 600;
}

.alphabet-nav {
  text-align: center;
}

.alphabet-letters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.alphabet-link {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background: #fff;
  color: #333;
  text-decoration: none;
  border-radius: 50%;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  border: 2px solid #e9ecef;
}

.alphabet-link:hover,
.alphabet-link.active {
  background: #1779ba;
  color: #fff;
  border-color: #1779ba;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(23, 121, 186, 0.3);
}

/* Letter Sections */
.letter-section {
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 2px solid #e9ecef;
}

.letter-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.letter-title {
  font-size: 36px;
  font-weight: 700;
  color: #1779ba;
  margin-bottom: 30px;
  padding-left: 20px;
  border-left: 5px solid #1779ba;
  position: relative;
}

.letter-title::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(45deg, #1779ba, #4a90e2);
}

/* Department Cards */
.department-card {
  background: #fff;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  margin-bottom: 30px;
  border: 1px solid #e9ecef;
  position: relative;
  overflow: hidden;
}

.department-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(45deg, #1779ba, #4a90e2);
}

.department-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  border-color: #1779ba;
}

.department-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(45deg, #1779ba, #4a90e2);
  border-radius: 50%;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.department-icon i {
  font-size: 36px;
  color: #fff;
}

.department-card:hover .department-icon {
  transform: scale(1.1) rotate(5deg);
}

.department-content h4 {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin-bottom: 15px;
  transition: color 0.3s ease;
}

.department-card:hover .department-content h4 {
  color: #1779ba;
}

.department-content p {
  color: #666;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.department-features {
  list-style: none;
  padding: 0;
  margin: 0 0 25px 0;
}

.department-features li {
  display: flex;
  align-items: center;
  padding: 8px 0;
  color: #555;
  font-size: 15px;
}

.department-features li i {
  color: #28a745;
  margin-right: 10px;
  font-size: 16px;
}

.department-link {
  display: inline-flex;
  align-items: center;
  color: #1779ba;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  padding: 12px 20px;
  border: 2px solid #1779ba;
  border-radius: 25px;
  background: transparent;
}

.department-link:hover {
  background: #1779ba;
  color: #fff;
  transform: translateX(5px);
  text-decoration: none;
}

.department-link i {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.department-link:hover i {
  transform: translateX(3px);
}

/* Back to Top Button */
.back-to-top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  background: linear-gradient(45deg, #1779ba, #4a90e2);
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(23, 121, 186, 0.3);
}

.back-to-top-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(23, 121, 186, 0.4);
  color: #fff;
  text-decoration: none;
}

.back-to-top-btn i {
  margin-right: 8px;
  font-size: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .page-header-content h1 {
    font-size: 36px;
  }
  
  .department-search-input {
    padding: 15px 55px 15px 20px;
    font-size: 15px;
  }
  
  .department-search-input::placeholder {
    font-size: 14px;
  }
  
  .department-search-btn {
    width: 35px;
    height: 35px;
    right: 45px;
  }
  
  .clear-search-btn {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
  
  .suggestion-tags {
    gap: 6px;
  }
  
  .suggestion-tag {
    padding: 5px 10px;
    font-size: 12px;
  }
  
  .alphabet-letters {
    gap: 5px;
  }
  
  .alphabet-link {
    width: 35px;
    height: 35px;
    line-height: 35px;
    font-size: 14px;
  }
  
  .letter-title {
    font-size: 28px;
    padding-left: 15px;
  }
  
  .department-card {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .department-icon {
    width: 60px;
    height: 60px;
  }
  
  .department-icon i {
    font-size: 28px;
  }
  
  .department-content h4 {
    font-size: 20px;
  }
  
  .department-content p {
    font-size: 14px;
  }
  
  .department-features li {
    font-size: 14px;
  }
  
  .department-link {
    font-size: 14px;
    padding: 10px 16px;
  }
  
  .no-results-content i {
    font-size: 48px;
  }
  
  .no-results-content h3 {
    font-size: 20px;
  }
  
  .no-results-content p {
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  .page-header-area {
    padding: 100px 0 60px;
  }
  
  .page-header-content h1 {
    font-size: 28px;
  }
  
  .breadcrumb-item {
    font-size: 14px;
  }
  
  .department-search-area {
    margin-bottom: 30px;
  }
  
  .department-search-input {
    padding: 12px 50px 12px 15px;
    font-size: 14px;
  }
  
  .department-search-input::placeholder {
    font-size: 13px;
  }
  
  .department-search-btn {
    width: 32px;
    height: 32px;
    right: 40px;
  }
  
  .clear-search-btn {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }
  
  .search-suggestions {
    padding: 15px 20px;
  }
  
  .suggestions-title {
    font-size: 13px;
  }
  
  .suggestion-tags {
    gap: 5px;
  }
  
  .suggestion-tag {
    padding: 4px 8px;
    font-size: 11px;
  }
  
  .alphabet-nav-area {
    padding: 15px 0;
  }
  
  .alphabet-link {
    width: 30px;
    height: 30px;
    line-height: 30px;
    font-size: 13px;
  }
  
  .letter-title {
    font-size: 24px;
  }
  
  .department-card {
    padding: 15px;
  }
  
  .department-icon {
    width: 50px;
    height: 50px;
  }
  
  .department-icon i {
    font-size: 24px;
  }
  
  .department-content h4 {
    font-size: 18px;
  }
  
  .no-results-message {
    padding: 40px 15px;
  }
  
  .no-results-content i {
    font-size: 40px;
  }
  
  .no-results-content h3 {
    font-size: 18px;
  }
  
  .no-results-content p {
    font-size: 13px;
  }
  
  .clear-search-btn-inline {
    padding: 10px 20px;
    font-size: 13px;
  }
}

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Section spacing adjustments */
.departments-area {
  padding-top: 60px;
  padding-bottom: 40px;
}

.section-title.mb-60 {
  margin-bottom: 60px;
}

/* Animation effects */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.department-card {
  animation: fadeInUp 0.6s ease-out;
}

/* Highlight effect for active section */
.letter-section.active {
  background: rgba(23, 121, 186, 0.02);
  padding: 30px;
  border-radius: 15px;
  margin: 20px 0;
}

.letter-section.active .letter-title {
  color: #1779ba;
  transform: scale(1.05);
}

/* Search and filter styles */
.alphabet-link.has-content {
  background: #fff;
  border-color: #1779ba;
}

.alphabet-link.no-content {
  opacity: 0.3;
  cursor: not-allowed;
}

.department-card.highlight {
  background: rgba(255, 215, 0, 0.1);
  border-color: #ffd700;
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(255, 215, 0, 0.3);
}

.department-link.clicked {
  transform: scale(0.95);
  background: #1779ba;
  color: #fff;
}

/* Loading indicator */
.loading-indicator {
  text-align: center;
  padding: 40px;
  font-size: 18px;
  color: #666;
  font-style: italic;
}

/* In viewport animation */
.department-card.in-viewport {
  animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Accessibility improvements */
.alphabet-link:focus {
  outline: 3px solid #ffd700;
  outline-offset: 2px;
}

.department-link:focus {
  outline: 3px solid #ffd700;
  outline-offset: 2px;
}

/* Search highlight */
.search-highlight {
  background: linear-gradient(120deg, #ffd700 0%, #ffed4e 100%);
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 600;
}

/* No results message */
.no-results-message {
  text-align: center;
  padding: 60px 20px;
  background: #f8f9fa;
  border-radius: 15px;
  margin: 40px 0;
}

.no-results-content {
  max-width: 400px;
  margin: 0 auto;
}

.no-results-content i {
  font-size: 64px;
  color: #ddd;
  margin-bottom: 20px;
}

.no-results-content h3 {
  font-size: 24px;
  color: #333;
  margin-bottom: 15px;
  font-weight: 600;
}

.no-results-content p {
  color: #666;
  font-size: 16px;
  margin-bottom: 25px;
  line-height: 1.6;
}

.clear-search-btn-inline {
  background: #1779ba;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.clear-search-btn-inline:hover {
  background: #155a8a;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(23, 121, 186, 0.3);
}
