/**
 * Scientific Library of Osh State University (ОшМУ Илимий китепканасы)
 * Authentic Colors & Design from http://library.oshsu.kg/
 * Primary brand color: #f78960 (Warm Coral / Terracotta Orange)
 * Secondary / Deep Accent: #9a2929 / #800020
 * Dark tone: #151515 / #2c2c2c
 * Background: #f9f9f9
 */

:root {
  --oshsu-primary: #f78960;
  --oshsu-primary-hover: #e67246;
  --oshsu-primary-dark: #d95e34;
  --oshsu-secondary: #9a2929;
  --oshsu-accent: #ff6600;
  --oshsu-dark: #151515;
  --oshsu-dark-soft: #2c2c2c;
  --oshsu-light: #f9f9f9;
  --oshsu-card-bg: #ffffff;
  --oshsu-border: #e2e8f0;
  --oshsu-border-light: #eeeeee;
  --oshsu-muted: #666666;
  --font-heading: 'Montserrat', Georgia, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  font-family: var(--font-body);
  background-color: var(--oshsu-light);
  color: #2c2c2c;
  line-height: 1.6;
}

a {
  color: var(--oshsu-primary);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

a:hover {
  color: var(--oshsu-primary-hover);
}

h1, h2, h3, h4, h5, h6,
.font-heading {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--oshsu-dark-soft);
}

/* ============================================================
   TOPBAR & NAVBAR
   ============================================================ */
.topbar {
  background: var(--oshsu-dark);
  color: #cbd5e1;
  font-size: 0.85rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar a {
  color: #e2e8f0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.topbar a:hover {
  color: var(--oshsu-primary);
}

.topbar .lang-switch .btn-lang {
  color: #f1f5f9;
  font-size: 0.8rem;
  padding: 2px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-decoration: none;
  transition: all 0.2s;
}

.topbar .lang-switch .btn-lang.active,
.topbar .lang-switch .btn-lang:hover {
  background-color: var(--oshsu-primary);
  color: #ffffff;
  border-color: var(--oshsu-primary);
  font-weight: 600;
}

.navbar-main {
  background-color: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 0.65rem 0;
  transition: all 0.3s ease;
}

.navbar-brand-logo {
  height: 54px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
}

.navbar-brand-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--oshsu-dark-soft);
  display: block;
}

.navbar-brand-sub {
  font-size: 0.75rem;
  color: var(--oshsu-muted);
  font-weight: 500;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  color: #2c2c2c !important;
  padding: 0.5rem 0.85rem !important;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--oshsu-primary) !important;
  background-color: rgba(247, 137, 96, 0.09);
}

.dropdown-menu {
  border: 1px solid var(--oshsu-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 0.5rem;
  animation: fadeIn 0.2s ease;
}

.dropdown-item {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  color: #2c2c2c;
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background-color: rgba(247, 137, 96, 0.12);
  color: var(--oshsu-primary-dark);
}

.dropdown-header {
  color: var(--oshsu-secondary) !important;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   HERO BANNER
   ============================================================ */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, rgba(21, 21, 21, 0.88) 0%, rgba(44, 44, 44, 0.8) 100%),
              url('/static/img/fon/fffon.jpeg') center/cover no-repeat;
  color: #ffffff;
  padding: 4.5rem 0 3.5rem 0;
  border-radius: 0 0 24px 24px;
}

.hero-search-box {
  background: #ffffff;
  border-radius: 50px;
  padding: 6px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
}

.hero-search-box input {
  border: none;
  outline: none;
  padding: 0.6rem 1.25rem;
  font-size: 1rem;
  width: 100%;
  border-radius: 50px;
  color: #2c2c2c;
}

.hero-search-box input:focus {
  box-shadow: none;
}

.hero-search-box .btn-search {
  border-radius: 50px;
  padding: 0.6rem 1.6rem;
  font-weight: 600;
  background: var(--oshsu-primary);
  color: #ffffff;
  border: none;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.15s ease;
}

.hero-search-box .btn-search:hover {
  background: var(--oshsu-primary-hover);
  transform: scale(1.02);
}

/* ============================================================
   BUTTONS & BADGES
   ============================================================ */
.btn-primary {
  background-color: var(--oshsu-primary) !important;
  border-color: var(--oshsu-primary) !important;
  color: #ffffff !important;
  font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--oshsu-primary-hover) !important;
  border-color: var(--oshsu-primary-hover) !important;
  color: #ffffff !important;
}

.btn-outline-primary {
  color: var(--oshsu-primary) !important;
  border-color: var(--oshsu-primary) !important;
  font-weight: 600;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--oshsu-primary) !important;
  border-color: var(--oshsu-primary) !important;
  color: #ffffff !important;
}

.bg-primary {
  background-color: var(--oshsu-primary) !important;
}

.text-primary {
  color: var(--oshsu-primary) !important;
}

.border-primary {
  border-color: var(--oshsu-primary) !important;
}

/* ============================================================
   CARDS & SECTIONS
   ============================================================ */
.section-title {
  position: relative;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  color: var(--oshsu-dark-soft);
  font-family: Georgia, 'Montserrat', serif;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--oshsu-primary);
  border-radius: 2px;
}

.section-title.text-center::after {
  left: 50%;
  transform: translateX(-50%);
}

.section-subtitle {
  color: var(--oshsu-secondary);
  font-size: 1.05rem;
}

.library-card {
  background: var(--oshsu-card-bg);
  border: 1px solid var(--oshsu-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.library-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(247, 137, 96, 0.15);
  border-color: var(--oshsu-primary);
}

.card-img-wrapper {
  position: relative;
  overflow: hidden;
  height: 200px;
  background-color: #e2e8f0;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.library-card:hover .card-img-wrapper img {
  transform: scale(1.05);
}

/* Book Specific Card */
.book-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--oshsu-border);
  padding: 1rem;
  transition: all 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(247, 137, 96, 0.18);
  border-color: var(--oshsu-primary);
}

.book-cover {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 8px;
  background: #f1f5f9;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.book-cover-placeholder {
  width: 100%;
  height: 240px;
  border-radius: 8px;
  background: linear-gradient(135deg, #151515, #2c2c2c);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
}

/* Announcements Column item */
.announcement-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.announcement-item:hover {
  border-color: var(--oshsu-primary);
  box-shadow: 0 4px 16px rgba(247, 137, 96, 0.12);
}

.announcement-title {
  color: var(--oshsu-dark-soft);
  font-weight: 700;
  font-size: 1.05rem;
}

/* ============================================================
   TABLES & BADGES
   ============================================================ */
.library-table {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--oshsu-border);
}

.library-table thead th {
  background: var(--oshsu-dark);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  padding: 0.9rem 1rem;
  border: none;
}

.library-table tbody td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-color: #f1f5f9;
  font-size: 0.92rem;
}

.library-table tbody tr:hover {
  background-color: rgba(247, 137, 96, 0.05);
}

/* ============================================================
   FOOTER (Exact match with http://library.oshsu.kg/)
   ============================================================ */
.footer-main {
  background: var(--oshsu-dark);
  color: #cbd5e1;
  padding: 3.5rem 0 1.5rem 0;
  font-size: 0.92rem;
}

.footer-main h5 {
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-main h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 2px;
  background: var(--oshsu-primary);
}

.footer-main a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-main a:hover {
  color: var(--oshsu-primary);
}

.footer-main .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
  margin-top: 2.5rem;
  font-size: 0.85rem;
}

/* ============================================================
   RESPONSIVE & UTILITY
   ============================================================ */
@media (max-width: 991.98px) {
  .hero-section {
    padding: 3rem 0 2rem 0;
  }
  .navbar-brand-title {
    font-size: 1rem;
  }
}
