/* Custom CSS for Library Website */

:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #17a2b8;
  --purple-color: #6f42c1;
  --orange-color: #fd7e14;
  --dark-color: #343a40;
  --light-color: #f8f9fa;
}

/* General Styles */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--secondary-color);
  max-width: 600px;
  margin: 0 auto;
}

/* Header Styles */
.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Navbar Styles */
.navbar {
  transition: all 0.3s ease;
  background-color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--dark-color) !important;
  transition: all 0.3s ease;
  position: relative;
  padding: 1rem 1.2rem !important;
  margin: 0 0.2rem;
  border-radius: 8px;
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color) !important;
  background-color: rgba(0, 123, 255, 0.05);
}

.navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
  font-weight: 600;
  background-color: rgba(0, 123, 255, 0.1);
}

/* Dropdown Styles */
.navbar-nav .dropdown {
  position: relative;
}

.dropdown-menu {
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 0.75rem 0;
  margin-top: 0.5rem;
  min-width: 250px;
  background-color: #ffffff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  color: var(--dark-color);
  transition: all 0.3s ease;
  border-radius: 0;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.dropdown-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary-color), rgba(0, 123, 255, 0.8));
  transition: width 0.3s ease;
  z-index: -1;
}

.dropdown-item:hover::before {
  width: 100%;
}

.dropdown-item:hover {
  background-color: transparent;
  color: white;
  transform: translateX(5px);
}

.dropdown-item i {
  width: 20px;
  margin-right: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.dropdown-item:hover i {
  transform: scale(1.1);
}

.dropdown-divider {
  margin: 0.5rem 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Dropdown Arrow */
.dropdown-toggle::after {
  transition: transform 0.3s ease;
}

.dropdown-toggle.show::after {
  transform: rotate(180deg);
}

/* Mobile Dropdown Styles */
@media (max-width: 991px) {
  .navbar-nav {
    padding: 1rem 0;
  }

  .navbar-nav .nav-link {
    padding: 0.75rem 1rem !important;
    margin: 0.2rem 0;
    border-radius: 8px;
  }

  .dropdown-menu {
    border: none;
    box-shadow: none;
    background-color: rgba(0, 123, 255, 0.05);
    margin-top: 0.5rem;
    border-radius: 8px;
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .dropdown-item {
    padding: 0.6rem 1.5rem;
    border-left: 3px solid transparent;
    margin: 0.1rem 0.5rem;
    border-radius: 6px;
  }

  .dropdown-item::before {
    display: none;
  }

  .dropdown-item:hover {
    background-color: var(--primary-color);
    border-left-color: var(--warning-color);
    transform: none;
    color: white;
  }

  .navbar-toggler {
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
  }

  .navbar-toggler:focus {
    box-shadow: none;
  }
}

/* Navbar Brand */
.navbar-brand {
  font-weight: 700;
  color: var(--dark-color) !important;
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  color: var(--primary-color) !important;
  transform: scale(1.02);
}

/* Navbar Buttons */
.navbar .btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.navbar .btn-outline-primary {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.navbar .btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

.navbar .btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.navbar .btn-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.hero-bg {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  padding: 100px 0;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-buttons .btn {
  padding: 12px 30px;
  font-weight: 600;
  border-radius: 50px;
}

/* Stats Section */
.stat-icon {
  width: 80px;
  height: 80px;
  background: rgba(0, 123, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.stat-icon i {
  font-size: 2rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--secondary-color);
  font-weight: 500;
}

/* Service Cards */
.service-card {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.service-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.service-icon i {
  font-size: 2rem;
}

.service-card h5 {
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

.service-card p {
  color: var(--secondary-color);
  margin-bottom: 0;
}

/* News Cards */
.news-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.news-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
  transform: scale(1.05);
}

.news-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.news-content {
  padding: 1.5rem;
}

.news-meta {
  color: var(--secondary-color);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.news-content h5 {
  margin-bottom: 1rem;
}

.news-content h5 a {
  color: var(--dark-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.news-content h5 a:hover {
  color: var(--primary-color);
}

.news-content p {
  color: var(--secondary-color);
  margin-bottom: 0;
}

/* Contact Section */
.contact-section {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.contact-item i {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
}

.contact-form-wrapper {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 15px;
}

.contact-form-wrapper .form-control {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
}

.contact-form-wrapper .form-control::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.contact-form-wrapper .form-control:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: var(--warning-color);
  box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
  color: white;
}

/* Book Cards */
.book-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.book-image {
  position: relative;
  height: 250px;
  background: var(--light-color);
  overflow: hidden;
}

.book-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.book-card:hover .book-image img {
  transform: scale(1.05);
}

.book-status {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.book-content {
  padding: 1.5rem;
}

.book-meta {
  display: flex;
  align-items: center;
  justify-content: between;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--secondary-color);
}

.book-rating {
  display: flex;
  align-items: center;
}

.book-rating i {
  color: var(--warning-color);
  margin-right: 0.25rem;
}

/* Document Cards */
.document-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 1.5rem;
  transition: box-shadow 0.3s ease;
}

.document-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.document-type {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--primary-color);
  color: white;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

/* Utility Classes */
.bg-purple {
  background-color: var(--purple-color) !important;
}

.bg-orange {
  background-color: var(--orange-color) !important;
}

.text-purple {
  color: var(--purple-color) !important;
}

.text-orange {
  color: var(--orange-color) !important;
}

.min-vh-75 {
  min-height: 75vh;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .hero-buttons .btn {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
  }

  .service-card,
  .news-card,
  .book-card {
    margin-bottom: 2rem;
  }
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Search and Filter Styles */
.search-filter-section {
  background: white;
  border-radius: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin-bottom: 2rem;
}

.filter-btn {
  border: 1px solid #dee2e6;
  background: white;
  color: var(--dark-color);
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Pagination */
.pagination .page-link {
  color: var(--primary-color);
  border: 1px solid #dee2e6;
}

.pagination .page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.pagination .page-link:hover {
  color: var(--primary-color);
  background-color: #e9ecef;
  border-color: #dee2e6;
}

/* Sidebar Styles */
.sidebar-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.sidebar-card .card-header {
  background: var(--light-color);
  border-bottom: 1px solid #dee2e6;
  font-weight: 600;
}

/* Gallery Styles */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 2rem;
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: white;
  padding: 1rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

/* Staff Cards */
.staff-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  height: 100%;
}

.staff-card:hover {
  transform: translateY(-5px);
}

.staff-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 4px solid var(--light-color);
}

.staff-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.staff-position {
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 1rem;
}

.staff-info {
  font-size: 0.9rem;
  color: var(--secondary-color);
}

/* Department Cards */
.department-card {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
  height: 100%;
}

.department-card:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.department-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 1rem;
}

.department-info {
  display: flex;
  justify-content: between;
  align-items: center;
  margin-top: 1rem;
}

/* Progress Bars */
.progress-custom {
  height: 8px;
  border-radius: 10px;
  background-color: #e9ecef;
}

.progress-custom .progress-bar {
  border-radius: 10px;
  transition: width 0.6s ease;
}

/* Alert Styles */
.alert-custom {
  border: none;
  border-radius: 10px;
  padding: 1rem 1.5rem;
}

.alert-success-custom {
  background-color: rgba(40, 167, 69, 0.1);
  color: var(--success-color);
  border-left: 4px solid var(--success-color);
}

.alert-info-custom {
  background-color: rgba(23, 162, 184, 0.1);
  color: var(--info-color);
  border-left: 4px solid var(--info-color);
}

/* Form Styles */
.form-custom .form-control {
  border-radius: 10px;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
  transition: border-color 0.3s ease;
}

.form-custom .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-custom .btn {
  border-radius: 10px;
  padding: 0.75rem 2rem;
  font-weight: 600;
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Print Styles */
@media print {
  .navbar,
  .footer,
  .btn,
  .pagination {
    display: none !important;
  }

  .container {
    max-width: none !important;
  }
}
