/* Custom CSS untuk Perpustakaan SMA N1 Stabat */
:root {
  --primary-blue: #0d6efd;
  --secondary-blue: #0b5ed7;
  --light-blue: #e7f1ff;
  --dark-blue: #052c65;
  --accent-blue: #0dcaf0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

/* Navbar Custom */
.navbar-custom {
  background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-custom .navbar-brand {
  color: white !important;
  font-weight: bold;
  font-size: 1.5rem;
}

.navbar-custom .nav-link {
  color: rgba(255,255,255,0.9) !important;
  transition: all 0.3s ease;
}

.navbar-custom .nav-link:hover {
  color: white !important;
  transform: translateY(-2px);
}

.navbar-custom .nav-link.active {
  color: white !important;
  background-color: rgba(255,255,255,0.1);
  border-radius: 5px;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
  color: white;
  padding: 100px 0;
  margin-top: 76px;
}

.hero-section h1 {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.hero-section p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Card Custom */
.card-custom {
  border: none;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.card-custom:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card-custom .card-header {
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
  color: white;
  border: none;
  padding: 1.5rem;
}

.card-custom .card-body {
  padding: 2rem;
}

/* Button Custom */
.btn-custom-primary {
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
  border: none;
  border-radius: 25px;
  padding: 12px 30px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-custom-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(13, 110, 253, 0.4);
}

.btn-custom-secondary {
  background: linear-gradient(135deg, var(--accent-blue), #0aa2c0);
  border: none;
  border-radius: 25px;
  padding: 12px 30px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-custom-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(13, 202, 240, 0.4);
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  color: var(--dark-blue);
  font-weight: bold;
  margin-bottom: 1rem;
}

.section-header p {
  color: #6c757d;
  font-size: 1.1rem;
}

/* Feature Boxes */
.feature-box {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  height: 100%;
}

.feature-box:hover {
  transform: translateY(-5px);
}

.feature-box i {
  font-size: 3rem;
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.feature-box h4 {
  color: var(--dark-blue);
  font-weight: bold;
  margin-bottom: 1rem;
}

/* Footer */
.footer-custom {
  background: linear-gradient(135deg, var(--dark-blue), var(--primary-blue));
  color: white;
  padding: 3rem 0 1rem;
}

.footer-custom h5 {
  color: var(--accent-blue);
  font-weight: bold;
  margin-bottom: 1rem;
}

.footer-custom a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-custom a:hover {
  color: white;
}

.footer-bottom {
  background: rgba(0,0,0,0.2);
  padding: 1rem 0;
  margin-top: 2rem;
  text-align: center;
}

.footer-bottom a {
  margin: 0 8px;
  display: inline-block;
}

/* Carousel Custom */
.carousel-custom .carousel-item {
  height: 500px;
  background-size: cover;
  background-position: center;
}

.carousel-custom .carousel-caption {
  background: rgba(0,0,0,0.5);
  border-radius: 15px;
  padding: 2rem;
}

/* Table Custom */
.table-custom {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.table-custom thead {
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
  color: white;
}

/* Form Custom */
.form-custom .form-control {
  border-radius: 10px;
  border: 2px solid #e9ecef;
  padding: 12px 15px;
  transition: border-color 0.3s ease;
}

.form-custom .form-control:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Stats Section */
.stats-section {
  background: var(--light-blue);
  padding: 4rem 0;
}

.stat-item {
  text-align: center;
  padding: 2rem;
}

.stat-item .number {
  font-size: 3rem;
  font-weight: bold;
  color: var(--primary-blue);
}

.stat-item .label {
  color: var(--dark-blue);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .hero-section p {
    font-size: 1rem;
  }
  
  .feature-box {
    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;
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Modal Fixes */
.modal-backdrop {
  z-index: 1040;
}

.modal {
  z-index: 1050;
}

.modal-dialog {
  z-index: 1055;
}

/* Ensure modal closes properly */
.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translate(0, -50px);
}

.modal.show .modal-dialog {
  transform: none;
}

/* Fix for modal backdrop issues */
body.modal-open {
  overflow: hidden;
}

/* Remove backdrop when modal is hidden */
.modal-backdrop.show {
  opacity: 0.5;
}

.modal-backdrop.fade {
  opacity: 0;
}

/* Modal content styling */
.modal-content {
  border-radius: 15px;
  border: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
  border-bottom: 2px solid var(--light-blue);
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
  color: white;
  border-radius: 15px 15px 0 0;
}

.modal-header .btn-close {
  filter: invert(1);
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  border-top: 2px solid var(--light-blue);
  padding: 1rem 2rem;
}

/* Book Filter Animation */
.book-row {
  transition: all 0.3s ease;
}

.book-row.fade-in {
  animation: fadeInUp 0.5s ease forwards;
}

.book-row[style*="display: none"] {
  animation: none;
}

/* Filter Section */
.filter-section {
  background: var(--light-blue);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.filter-section .form-control,
.filter-section .form-select {
  border: 2px solid #e9ecef;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.filter-section .form-control:focus,
.filter-section .form-select:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* No Results Message */
#noResultsMessage {
  animation: fadeInUp 0.5s ease;
}

#noResultsMessage .alert {
  border: none;
  border-radius: 15px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

#noResultsMessage .btn {
  border-radius: 25px;
  padding: 10px 25px;
} 