/* Alnoor - Main Stylesheet */

/* Global Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

/* Navigation */
.navbar-brand {
  font-weight: bold;
}

.nav-profile-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 5px;
}

/* Hero Section */
.search-box {
  margin: 2rem auto;
  max-width: 700px;
}

/* Cards & Content */
.card {
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-img-top {
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  height: 200px;
  object-fit: cover;
}

/* Premium Badge */
.badge.bg-warning {
  color: #212529;
}

/* Footer */
footer {
  margin-top: 5rem;
}

footer h5 {
  font-weight: 600;
  margin-bottom: 1rem;
}

footer a {
  color: #495057;
  text-decoration: none;
}

footer a:hover {
  color: #0d6efd;
  text-decoration: underline;
}

.social-icons a {
  font-size: 1.5rem;
  margin-right: 1rem;
}

/* Image Grid */
.search-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

/* Dashboard */
.stats-card {
  text-align: center;
  padding: 1.5rem;
}

.stats-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #0d6efd;
}

/* Admin Panel */
.admin-table th,
.admin-table td {
  vertical-align: middle;
}

/* Responsive */
@media (max-width: 768px) {
  .card-img-top {
    height: 150px;
  }
  
  .search-result-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
  }
}

/* Form Styles */
.form-control:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loading-overlay .spinner-border {
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
}

.loading-text {
  font-size: 1.2rem;
  font-weight: 500;
  color: #333;
  margin-top: 1rem;
}

/* Search Loading State */
.search-loading {
  position: relative;
  min-height: 200px;
}

.search-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3rem;
  height: 3rem;
  border: 0.25rem solid rgba(13, 110, 253, 0.2);
  border-top-color: #0d6efd;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 10;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}
