/* ===== UNIVERSITY OF EL OUED - CENTRAL LIBRARY OPAC ===== */

/* --- Header --- */
#header-region {
  background: #0F3D35 !important;
  border-bottom: 2px solid #C8A45D;
  padding: 0 !important;
}
#header-region .navbar {
  background: #0F3D35 !important;
  padding: 5px 15px !important;
  min-height: 60px;
  display: flex;
  align-items: center;
}
#header-region #logo .navbar-brand {
  color: #fff !important;
  font-size: 1.3em;
  font-weight: 700;
  padding: 8px 0 !important;
}
#header-region #logo .navbar-brand:hover {
  color: #C8A45D !important;
}
#header-region #members .nav-link,
#header-region #cart-list-nav .nav-link {
  color: rgba(255,255,255,0.9) !important;
  font-weight: 600;
  padding: 12px 16px !important;
  font-size: 0.9em;
  border-bottom: 3px solid transparent;
  transition: all 0.3s;
}
#header-region #members .nav-link:hover,
#header-region #cart-list-nav .nav-link:hover {
  color: #fff !important;
  border-bottom-color: #C8A45D;
}
#header-region .divider-vertical {
  border-left: 1px solid rgba(200,164,93,0.3);
  height: 24px;
  margin: 0 8px;
}
#header-region .fa-icon-black {
  color: #C8A45D;
}

/* --- Hero --- */
.hero-section {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #092a24;
}
.hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.35;
}
.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(9,42,36,0.95) 0%, rgba(15,61,53,0.88) 50%, rgba(46,107,91,0.75) 100%);
  z-index: 1;
}
.hero-section .hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
  padding: 60px 20px;
  text-align: center;
}
.hero-section .hero-logo {
  width: 90px; height: 90px;
  border-radius: 50%;
  border: 3px solid #C8A45D;
  margin: 0 auto 20px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  display: block;
}
.hero-section .hero-badge {
  display: inline-block;
  background: rgba(200,164,93,0.25);
  border: 1px solid rgba(200,164,93,0.5);
  color: #dabf7a;
  padding: 6px 20px;
  border-radius: 30px;
  font-size: 0.88em;
  font-weight: 700;
  margin-bottom: 20px;
}
.hero-section h1 {
  font-size: 2.8em;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  text-shadow: 0 3px 15px rgba(0,0,0,0.4);
  line-height: 1.3;
}
.hero-section .hero-subtitle {
  font-size: 1.25em;
  color: rgba(255,255,255,0.9);
  margin-bottom: 35px;
  font-weight: 400;
}

/* --- Search --- */
.hero-search { max-width: 700px; margin: 0 auto; }
.hero-search .search-wrapper {
  display: flex;
  background: #fff;
  border-radius: 50px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  overflow: hidden;
  height: 60px;
  border: 2px solid transparent;
  transition: all 0.3s;
}
.hero-search .search-wrapper:focus-within {
  border-color: #C8A45D;
  box-shadow: 0 10px 30px rgba(200,164,93,0.2);
}
.hero-search .search-wrapper input {
  flex: 1;
  border: none;
  padding: 0 30px;
  font-size: 17px;
  color: #1D2B27;
  outline: none;
  background: transparent;
}
.hero-search .search-wrapper button {
  background: linear-gradient(135deg, #C8A45D 0%, #a8853d 100%);
  color: #fff;
  border: none;
  padding: 0 35px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}
.hero-search .search-wrapper button:hover {
  background: linear-gradient(135deg, #dabf7a 0%, #C8A45D 100%);
  box-shadow: -4px 0 15px rgba(0,0,0,0.1);
}

/* --- Stats --- */
.stats-bar {
  display: flex;
  justify-content: center;
  background: #fff;
  border-bottom: 1.5px solid #d8e0db;
  flex-wrap: wrap;
  box-shadow: 0 2px 8px rgba(15,61,53,0.06);
}
.stat-item {
  text-align: center;
  padding: 25px 35px;
  border-right: 1px solid #d8e0db;
  min-width: 150px;
  transition: all 0.3s;
}
.stat-item:last-child { border-right: none; }
.stat-item:hover { background: #F5F7F4; transform: translateY(-2px); }
.stat-item .stat-icon { font-size: 1.8em; margin-bottom: 6px; display: block; }
.stat-item .stat-num { font-size: 1.8em; font-weight: 800; color: #0F3D35; line-height: 1.2; }
.stat-item .stat-label { font-size: 0.82em; color: #6F7D78; margin-top: 4px; font-weight: 600; }

/* --- Services --- */
.services-section { padding: 60px 40px 45px; background: #F5F7F4; }
.services-section .section-header h2 {
  color: #0F3D35;
  font-weight: 800;
  font-size: 1.8em;
  margin-bottom: 12px;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 35px auto 0;
}
.service-card {
  background: #fff;
  border-radius: 12px;
  padding: 30px 20px 25px;
  box-shadow: 0 2px 8px rgba(15,61,53,0.06);
  border: 1px solid #d8e0db;
  transition: all 0.3s;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(15,61,53,0.2);
  border-color: #C8A45D;
}
.service-card .svc-icon {
  width: 58px; height: 58px;
  border-radius: 16px;
}
.service-card .svc-icon.green { background: rgba(15,61,53,0.06); color: #0F3D35; }
.service-card .svc-icon.gold { background: rgba(200,164,93,0.1); color: #a8853d; }
.service-card .svc-icon.teal { background: rgba(46,107,91,0.08); color: #2E6B5B; }
.service-card .svc-title { font-size: 0.95em; font-weight: 700; margin-top: 12px; }

/* --- Login Page --- */
#opac-auth {
  position: relative;
  background: #092a24 !important;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
#opac-auth::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: url("/img/library-interior.jpg") no-repeat center center;
  background-size: cover;
  opacity: 0.3;
  z-index: 1;
}
#opac-auth .navbar { display: none !important; }
#opac-auth .main {
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  max-width: 440px;
  margin: 30px auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.4);
}
#opac-auth .login-header {
  background: linear-gradient(135deg, #0F3D35 0%, #092a24 100%);
  color: #fff;
  border-bottom: 3px solid #C8A45D;
  padding: 40px 30px 30px;
}
#opac-auth .login-header .login-icon-wrap {
  width: 70px; height: 70px;
  background: rgba(255,255,255,0.1);
  border: 2px solid #C8A45D;
  border-radius: 50%;
  font-size: 2em;
  margin-bottom: 15px;
}
#opac-auth .login-body { padding: 35px 35px 20px; }
#opac-auth .form-control {
  height: 50px;
  background: #f8faf8;
  border: 1.5px solid #d8e0db;
  border-radius: 8px;
}
#opac-auth .form-control:focus {
  background: #fff;
  border-color: #2E6B5B;
}
#opac-auth .btn-primary {
  height: 50px;
  background: linear-gradient(135deg, #2E6B5B 0%, #0F3D35 100%) !important;
  border: none !important;
  font-weight: 700;
}
#opac-auth .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(15,61,53,0.3);
}

/* --- Login Logo --- */
.library-login-header {
  text-align: center;
  padding: 30px 20px 20px;
  background: linear-gradient(135deg, #0F3D35 0%, #1a5c4f 100%);
  color: #fff;
  border-radius: 20px 20px 0 0;
  margin: -20px -20px 20px;
}
.library-login-logo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px solid #C8A45D;
  background: #fff;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  margin-bottom: 15px;
}
.library-login-header h2 {
  font-size: 1.5em;
  font-weight: 800;
  margin: 0 0 5px;
  color: #fff;
}
.library-login-header p {
  font-size: 0.9em;
  margin: 0;
  color: rgba(255,255,255,0.9);
}

/* --- Footer --- */
#footer {
  background: #092a24 !important;
  border-top: 4px solid #C8A45D !important;
}

/* --- RTL --- */
[dir="rtl"] .hero-search .search-wrapper { flex-direction: row-reverse; }
[dir="rtl"] .stat-item { border-right: none; border-left: 1px solid #d8e0db; }
[dir="rtl"] .stat-item:last-child { border-left: none; }
[dir="rtl"] .hours-table td:last-child { text-align: left; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero-section { min-height: 380px; }
  .hero-section h1 { font-size: 2em; }
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
  .stat-item { padding: 18px 20px; min-width: 110px; }
  .stat-item .stat-num { font-size: 1.4em; }
  #opac-auth .main { margin: 20px 15px; }
}
