/*
  Digital library redesign layer.
  This file intentionally sits after the original template styles.
*/

:root {
  --lib-bg: #f4f8fb;
  --lib-surface: rgba(255, 255, 255, 0.88);
  --lib-surface-solid: #ffffff;
  --lib-border: rgba(50, 84, 96, 0.14);
  --lib-text: #10262d;
  --lib-muted: #5d7178;
  --lib-primary: #0b6f73;
  --lib-primary-2: #0e9aa7;
  --lib-blue: #2867c9;
  --lib-amber: #d89a20;
  --lib-rose: #c44f7f;
  --lib-green: #178c62;
  --lib-shadow: 0 22px 50px rgba(25, 54, 63, 0.12);
  --lib-shadow-soft: 0 14px 34px rgba(25, 54, 63, 0.08);
  --lib-radius: 18px;
  --lib-radius-sm: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--lib-text);
  background:
    radial-gradient(circle at 12% 18%, rgba(14, 154, 167, 0.08), transparent 28rem),
    linear-gradient(180deg, #e9f4f6 0, #f4fafb 34rem, #eef6f7 100%);
}

main#main {
  background:
    linear-gradient(180deg, rgba(8, 31, 38, 0.035), rgba(14, 154, 167, 0.035)),
    #eef6f7;
}

main#main > section,
.section-bg,
.NewBooks,
.get-started {
  background: transparent !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(11, 111, 115, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40, 103, 201, 0.055) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(180deg, #000 0, transparent 70%);
}

a {
  color: var(--lib-primary);
}

a:hover {
  color: var(--lib-primary-2);
}

.header {
  top: 16px;
  right: auto;
  left: 50%;
  width: min(calc(100% - 40px), 1260px);
  min-height: 74px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 22px;
  background: rgba(8, 31, 38, 0.76);
  box-shadow: 0 20px 54px rgba(5, 22, 27, 0.22);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.header.scrolled {
  background: rgba(7, 33, 39, 0.92);
}

#header.header {
  top: 16px;
  right: auto;
  left: 50%;
  width: min(calc(100% - 40px), 1260px);
  padding: 0;
  background: rgba(8, 31, 38, 0.76);
  transform: translateX(-50%);
}

#header.header.scrolled {
  background: rgba(7, 33, 39, 0.92);
}

.header .container-xl {
  min-height: 74px;
}

.header .logo {
  gap: 12px;
}

.header .logo h1 {
  max-width: 340px;
  color: #fff;
  font-family: "Cairo", sans-serif;
  font-size: 22px;
  white-space: nowrap;
}

.header .logo img {
  max-height: 46px;
  padding: 5px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
}

.navbar a,
.navbar a:focus {
  padding: 10px 8px;
  color: rgba(255, 255, 255, 0.82);
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.navbar > ul {
  gap: 2px;
}

.navbar a:hover,
.navbar .active,
.navbar .active:focus,
.navbar li:hover > a {
  color: #fff;
}

.navbar > ul > li > a {
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.navbar > ul > li > a:hover,
.navbar > ul > li > a.active {
  background: rgba(255, 255, 255, 0.12);
}

.navbar .dropdown ul {
  padding: 10px;
  border: 1px solid rgba(32, 66, 76, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 52px rgba(10, 35, 42, 0.16);
  backdrop-filter: blur(14px);
}

.navbar .dropdown ul a {
  padding: 10px 14px;
  border-radius: 11px;
  color: #193640;
}

.navbar .dropdown ul a:hover {
  background: #eef8f8;
  color: var(--lib-primary);
}

.hero {
  min-height: 100vh;
  background: #061a22;
}

.hero .carousel,
.hero .carousel-item {
  min-height: 100vh;
}

.hero .carousel-item::before {
  background:
    linear-gradient(90deg, rgba(4, 21, 28, 0.92), rgba(4, 27, 36, 0.72) 42%, rgba(5, 27, 36, 0.34)),
    linear-gradient(180deg, rgba(5, 20, 28, 0.24), rgba(5, 20, 28, 0.88));
}

.hero .info {
  z-index: 4;
}

.hero .carousel-control-prev,
.hero .carousel-control-next {
  z-index: 8;
  pointer-events: auto;
}

.hero .info h2 {
  max-width: 950px;
  margin-inline: auto;
  color: #fff;
  font-family: "Cairo", sans-serif;
  font-size: clamp(38px, 5.3vw, 76px);
  font-weight: 800;
  line-height: 1.18;
  text-shadow: 0 24px 54px rgba(0, 0, 0, 0.32);
}

.hero .info h2::after {
  width: 96px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lib-primary-2), #ffffff, var(--lib-amber));
}

.hero .info p {
  max-width: 900px;
  margin: 0 auto 24px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 17px;
  line-height: 2;
}

.library-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 26px 0 18px;
}

.library-hero-btn,
.hero .info .library-hero-btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0;
  padding: 12px 24px;
  border-radius: 999px;
  font-family: "Cairo", sans-serif;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.library-hero-btn--primary,
.hero .info .library-hero-btn--primary {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, var(--lib-primary-2), var(--lib-blue));
  color: #fff;
  box-shadow: 0 18px 40px rgba(14, 154, 167, 0.26);
}

.library-hero-btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  backdrop-filter: blur(12px);
}

.library-hero-btn:hover {
  transform: translateY(-3px);
}

.library-hero-search {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  width: min(760px, 100%);
  margin: 16px auto 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.library-hero-search i {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.library-hero-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-family: "Cairo", sans-serif;
  font-weight: 600;
}

.library-hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.library-hero-search button {
  min-height: 42px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #12323a;
  font-family: "Cairo", sans-serif;
  font-weight: 800;
}

main#main {
  background: transparent;
}

main#main > section {
  overflow: hidden;
  padding: 82px 0;
}

.section-header {
  max-width: 980px;
  margin-bottom: 12px;
}

.section-header h2 {
  color: #10262d;
  font-family: "Cairo", sans-serif;
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 800;
}

.section-header h2::before,
.section-header h2::after {
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lib-primary-2), var(--lib-blue));
}

.section-header p,
.library-section-intro {
  color: var(--lib-muted);
  font-size: 16px;
}

.section-bg {
  background:
    linear-gradient(135deg, rgba(233, 246, 248, 0.86), rgba(255, 255, 255, 0.94)),
    #fff;
}

.breadcrumbs {
  min-height: 360px;
  padding-top: 140px;
  background-position: center;
}

.breadcrumbs:before,
.breadcrumbs::before {
  background:
    linear-gradient(135deg, rgba(4, 23, 31, 0.88), rgba(7, 64, 70, 0.64)),
    linear-gradient(180deg, rgba(5, 26, 35, 0.35), rgba(5, 26, 35, 0.72));
}

.breadcrumbs h2 {
  font-family: "Cairo", sans-serif;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 800;
}

.breadcrumbs ol {
  border-radius: 999px;
}

.Category-counter .Category-item,
.services .service-item,
.library-book-card,
.library-news-card,
.College .College-item,
.team .member,
.contact .info-item,
.features .tab-pane,
.library-message-card,
.library-about-home,
.library-news-details__article,
.book-details-page .book-overview,
.book-details-page .book-section,
.library-filter-panel {
  border: 1px solid var(--lib-border) !important;
  border-radius: var(--lib-radius) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(232, 247, 249, 0.82)) !important;
  box-shadow: var(--lib-shadow-soft) !important;
  backdrop-filter: blur(16px);
}

.Category-counter .Category-item,
.services .service-item,
.library-book-card,
.library-news-card,
.College .College-item,
.team .member,
.contact .info-item {
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.Category-counter .Category-item:hover,
.services .service-item:hover,
.library-book-card:hover,
.library-news-card:hover,
.College .College-item:hover,
.team .member:hover,
.contact .info-item:hover {
  border-color: rgba(14, 154, 167, 0.38) !important;
  box-shadow: var(--lib-shadow) !important;
  transform: translateY(-7px);
}

.Category-counter .Category-item {
  min-height: 150px;
  padding: 26px;
}

.Category-counter .Category-item i,
.services .service-item .icon,
.contact .info-item i {
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.Category-counter .Category-item span {
  font-size: 42px;
  font-weight: 900;
}

.Category-counter .Category-item p,
.services .service-item p,
.library-book-card__author,
.library-news-card__summary {
  color: var(--lib-muted);
}

.library-about-home {
  align-items: stretch !important;
  padding: 30px;
}

.library-about-home__logo {
  height: 100%;
  min-height: 360px;
  border-radius: var(--lib-radius);
  background:
    linear-gradient(135deg, rgba(14, 154, 167, 0.14), rgba(40, 103, 201, 0.1)),
    #fff;
}

.library-about-home .our-story {
  height: 100%;
  padding: 34px;
  background: transparent;
}

.library-about-home .our-story h4,
.book-details-page .book-eyebrow {
  color: var(--lib-primary-2);
  letter-spacing: 0;
}

.library-about-home .our-story h3,
.services .service-item h3,
.library-book-card__title,
.library-news-card__title {
  color: var(--lib-text);
  font-family: "Cairo", sans-serif;
}

.services .service-item {
  min-height: 300px;
  padding: 34px;
}

.services .service-item .readmore,
.library-book-card__link,
.library-news-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lib-primary);
  font-weight: 800;
}

.library-book-card {
  min-height: 258px;
  overflow: hidden;
}

.library-book-card__cover {
  flex: 0 0 176px;
  background:
    linear-gradient(135deg, rgba(14, 154, 167, 0.14), rgba(216, 154, 32, 0.12)),
    #eef6f8;
}

.library-book-card__cover img {
  width: 176px;
  height: 258px;
  object-fit: cover;
}

.library-book-card__badge,
.library-news-card__category,
.library-news-details__category {
  border: 1px solid rgba(14, 154, 167, 0.18);
  border-radius: 999px;
  background: rgba(14, 154, 167, 0.1);
  color: var(--lib-primary);
  font-weight: 800;
}

.library-book-card__badge--muted {
  background: rgba(40, 103, 201, 0.09);
  color: var(--lib-blue);
}

.library-news-card {
  overflow: hidden;
}

.library-news-card__image,
.library-news-card__image img {
  height: 245px;
}

.library-news-card__source {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: var(--lib-muted);
  font-size: 13px;
  font-weight: 800;
}

.library-news-card__source i {
  color: var(--lib-primary);
}

.Gallery .portfolio-content {
  border-radius: var(--lib-radius);
  box-shadow: var(--lib-shadow-soft);
}

.library-gallery-page .library-gallery-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--lib-border);
  background: rgba(255, 255, 255, 0.78);
}

.library-empty-state {
  max-width: 620px;
  margin: 0 auto;
  padding: 44px 28px;
  border: 1px solid var(--lib-border);
  border-radius: var(--lib-radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(232, 247, 249, 0.82));
  box-shadow: var(--lib-shadow-soft);
  text-align: center;
}

.library-empty-state i {
  display: inline-grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin-bottom: 18px;
  border-radius: 22px;
  background: rgba(14, 154, 167, 0.12);
  color: var(--lib-primary);
  font-size: 32px;
}

.library-empty-state h3 {
  color: var(--lib-text);
  font-weight: 900;
}

.library-empty-state p {
  margin: 0;
  color: var(--lib-muted);
}

.Gallery .portfolio-content .portfolio-info {
  background: linear-gradient(180deg, transparent, rgba(4, 23, 31, 0.88));
}

.College .College-item {
  min-height: 190px;
  padding: 26px 18px;
}

.College .College-item .College-img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  padding: 10px;
  border-radius: 20px;
  background: rgba(14, 154, 167, 0.08);
}

.library-filter-panel {
  position: relative;
  overflow: hidden;
  padding: 30px !important;
}

.library-catalog-page {
  padding-top: 58px;
}

.library-catalog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 28px;
  align-items: start;
  direction: ltr;
}

.library-catalog-sidebar {
  min-width: 0;
  direction: inherit;
  position: sticky;
  top: 112px;
  z-index: 5;
  align-self: start;
  max-height: none;
  overflow: visible;
}

html[dir="rtl"] .library-catalog-sidebar,
html[dir="rtl"] .library-catalog-results {
  direction: rtl;
}

.library-filter-panel--sticky {
  position: relative;
  max-height: none;
  overflow: hidden;
  padding: 18px !important;
}

.library-filter-panel--sticky .section-header h2 {
  margin-bottom: 4px;
  font-size: 21px;
}

.library-filter-panel--sticky .section-header p {
  display: none;
}

.library-filter-panel--sticky .section-header {
  padding: 0 0 8px !important;
}

.library-filter-panel--sticky .row {
  --bs-gutter-y: 0.65rem;
}

.library-filter-panel--sticky .form-label {
  margin-bottom: 4px !important;
  font-size: 12px !important;
}

.library-filter-panel--sticky .form-control,
.library-filter-panel--sticky .form-select {
  min-height: 40px !important;
  padding: 7px 12px !important;
  border-radius: 12px !important;
}

.library-filter-panel--sticky .btn {
  min-height: 40px !important;
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

.library-filter-panel--sticky .row > .col-12:last-child {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.library-filter-panel--sticky .row > .col-12:last-child .btn {
  margin-top: 0 !important;
  padding-inline: 10px !important;
}

.library-catalog-results {
  min-width: 0;
}

.library-results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  padding: 16px 18px;
  border: 1px solid var(--lib-border);
  border-radius: var(--lib-radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(235, 249, 250, 0.9));
  box-shadow: var(--lib-shadow-soft);
  backdrop-filter: blur(14px);
}

.library-results-toolbar div {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--lib-muted);
  font-weight: 800;
}

.library-results-toolbar strong {
  display: inline-flex;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--lib-primary), var(--lib-blue));
  color: #fff;
  font-size: 18px;
}

.library-keyword-chip {
  display: inline-flex;
  max-width: min(430px, 100%);
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid rgba(14, 154, 167, 0.2);
  border-radius: 999px;
  background: rgba(14, 154, 167, 0.1);
  color: var(--lib-primary);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.library-empty-state {
  padding: 54px 24px;
  border: 1px solid var(--lib-border);
  border-radius: var(--lib-radius);
  background:
    linear-gradient(135deg, rgba(14, 154, 167, 0.08), rgba(40, 103, 201, 0.06)),
    rgba(255, 255, 255, 0.88);
  box-shadow: var(--lib-shadow-soft);
  text-align: center;
}

.library-empty-state i {
  display: inline-flex;
  width: 68px;
  height: 68px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--lib-primary), var(--lib-blue));
  color: #fff;
  font-size: 30px;
}

.library-empty-state h3 {
  margin-bottom: 8px;
  color: var(--lib-text);
  font-family: "Cairo", sans-serif;
  font-weight: 900;
}

.library-empty-state p {
  margin: 0;
  color: var(--lib-muted);
}

.library-filter-panel::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, var(--lib-primary-2), var(--lib-blue), var(--lib-amber));
}

.search-form .section-header {
  padding-bottom: 10px;
}

.search-form .form-label {
  margin-bottom: 8px;
  color: #183941;
  font-size: 13px;
  font-weight: 800 !important;
}

.search-form .form-control,
.search-form .form-select {
  min-height: 52px;
  border: 1px solid rgba(45, 76, 86, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--lib-text);
  font-weight: 700;
}

.search-form .form-control:focus,
.search-form .form-select:focus {
  border-color: rgba(14, 154, 167, 0.58);
  box-shadow: 0 0 0 4px rgba(14, 154, 167, 0.12);
}

.search-form .btn-primary {
  min-height: 50px;
  border: 0;
  background: linear-gradient(135deg, var(--lib-primary), var(--lib-blue));
  box-shadow: 0 16px 34px rgba(14, 154, 167, 0.2);
  font-weight: 900;
}

.search-form .btn-outline-secondary {
  min-height: 50px;
  border-color: rgba(45, 76, 86, 0.18);
  background: #fff;
  color: var(--lib-text);
  font-weight: 800;
}

.book-details-page .book-cover-wrap {
  background:
    linear-gradient(145deg, rgba(14, 154, 167, 0.12), rgba(40, 103, 201, 0.11)),
    #fff;
}

.book-details-page .book-primary-btn {
  border: 0;
  background: linear-gradient(135deg, var(--lib-primary), var(--lib-blue));
  box-shadow: 0 16px 34px rgba(14, 154, 167, 0.22);
}

.book-details-page .book-secondary-btn {
  border-color: rgba(45, 76, 86, 0.16);
  background: #fff;
}

.features .nav-link {
  border: 1px solid rgba(45, 76, 86, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
}

.features .nav-link.active {
  border-color: rgba(14, 154, 167, 0.32);
  background: linear-gradient(135deg, rgba(14, 154, 167, 0.13), rgba(40, 103, 201, 0.1));
}

.overview-feature-logo {
  border-radius: 24px;
}

.alt-services .icon-box,
.library-structure-frame,
.library-contact-map {
  border-radius: var(--lib-radius);
}

.footer {
  background:
    radial-gradient(circle at 22% 0%, rgba(18, 140, 128, 0.28), transparent 34%),
    radial-gradient(circle at 82% 24%, rgba(45, 116, 207, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(3, 18, 24, 0.98), rgba(6, 42, 47, 0.96)),
    url("../img/footer-bg.jpg") center / cover no-repeat;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer .footer-content {
  padding: 58px 0 30px;
}

.footer .footer-content .row {
  align-items: stretch;
  gap: 14px 0;
}

.footer .footer-content .footer-info,
.footer .footer-content .footer-links {
  height: 100%;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.045));
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
}

.footer .footer-content .footer-info {
  background:
    linear-gradient(135deg, rgba(13, 112, 106, 0.22), rgba(255, 255, 255, 0.055));
}

.footer .footer-content .footer-info h3 {
  margin-bottom: 18px;
  font-size: clamp(24px, 2vw, 32px);
  line-height: 1.35;
}

.footer .footer-content .footer-info p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.95;
}

.footer .footer-content .footer-info p a,
.footer .footer-content .footer-links ul a {
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer .footer-content .footer-info p a:hover,
.footer .footer-content .footer-links ul a:hover {
  color: #6ee7dc;
}

.footer .footer-content h4 {
  position: relative;
  margin-bottom: 22px;
  padding-bottom: 13px;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.footer .footer-content h4::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 42px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f766e, #38bdf8);
}

.footer .footer-content .footer-links ul {
  display: grid;
  gap: 12px;
}

.footer .footer-content .footer-links ul li {
  padding: 0;
}

.footer .footer-content .footer-links ul a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.footer .footer-content .footer-links ul a::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(110, 231, 220, 0.72);
  opacity: 0.65;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.footer .footer-content .footer-links ul a:hover {
  transform: translateX(-3px);
}

.footer .footer-content .footer-links ul a:hover::before {
  opacity: 1;
  transform: scale(1.35);
}

.footer .footer-content .social-links {
  gap: 10px;
  flex-wrap: wrap;
}

.footer .footer-content .social-links a {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.footer .footer-content .social-links a:hover {
  transform: translateY(-3px);
  border-color: rgba(110, 231, 220, 0.55);
  background: linear-gradient(135deg, #0f766e, #2563eb);
}

.footer .footer-legal {
  padding: 22px 0 34px;
}

.footer .footer-legal .container {
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer .footer-legal .copyright {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

@media (max-width: 1279px) {
  #header.header,
  .header {
    left: 12px;
    right: 12px;
    width: auto;
    transform: none;
    z-index: 10000;
  }

  .navbar ul {
    border-radius: 22px;
    background: rgba(7, 33, 39, 0.97);
  }

  .navbar {
    position: fixed;
    top: 0;
    right: -100vw;
    bottom: 0;
    left: auto;
    width: min(88vw, 390px);
    max-width: min(88vw, 390px);
    height: 100vh;
    z-index: 10001;
    overflow: visible;
    transform: none;
    transition: right 0.28s ease;
  }

  .navbar ul {
    position: fixed;
    top: 0;
    right: -100vw;
    bottom: 0;
    left: auto;
    width: min(88vw, 390px);
    height: 100vh;
    display: block;
    padding: 82px 14px 22px;
    margin: 0;
    border-radius: 0;
    overflow-y: auto;
    background:
      linear-gradient(180deg, rgba(8, 38, 45, 0.98), rgba(4, 22, 28, 0.98));
    box-shadow: -28px 0 70px rgba(0, 0, 0, 0.35);
    transition: right 0.28s ease;
    z-index: 10001;
  }

  .mobile-nav-hide,
  .mobile-nav-show {
    z-index: 10002;
  }

  .mobile-nav-active #navbar,
  .mobile-nav-active .navbar,
  .mobile-nav-active #navbar > ul,
  .mobile-nav-active .navbar > ul {
    right: 0;
  }

  .mobile-nav-active .navbar:before {
    z-index: -1;
  }

  .navbar li {
    width: 100%;
  }

  .navbar a,
  .navbar a:focus {
    min-height: 48px;
    margin-bottom: 4px;
    padding: 12px 14px;
    border-radius: 14px;
    white-space: normal;
  }

  .navbar .dropdown ul,
  .navbar .dropdown .dropdown ul {
    position: static;
    width: auto;
    height: auto;
    display: none;
    padding: 8px;
    margin: 4px 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
  }

  .navbar .dropdown > .dropdown-active,
  .navbar .dropdown .dropdown > .dropdown-active {
    display: block;
  }

  .navbar .dropdown ul a {
    color: rgba(255, 255, 255, 0.84);
  }

  .navbar .dropdown ul a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 991.98px) {
  .library-catalog-layout {
    grid-template-columns: 1fr;
  }

  .library-catalog-sidebar {
    order: -1;
    position: relative;
    top: auto;
    max-height: none;
    overflow: visible;
  }

  .library-filter-panel--sticky {
    position: relative;
    top: auto;
    max-height: none;
  }

  .footer .footer-content {
    padding: 42px 0 24px;
  }

  .footer .footer-content .footer-info,
  .footer .footer-content .footer-links {
    padding: 22px;
  }
}

@media (max-width: 767.98px) {
  #header.header,
  .header {
    top: 8px;
    left: 8px;
    right: 8px;
    width: auto;
    transform: none;
    min-height: 66px;
    border-radius: 18px;
  }

  .header .container-xl {
    min-height: 66px;
  }

  .header .logo h1 {
    max-width: 230px;
    font-size: 17px;
  }

  .header .logo img {
    max-height: 38px;
  }

  .hero .info {
    padding: 98px 16px 26px;
  }

  .hero .info h2 {
    font-size: 34px;
  }

  .hero .info p {
    font-size: 14px;
    line-height: 1.85;
  }

  .library-hero-search {
    grid-template-columns: 1fr;
    border-radius: 22px;
    padding: 14px;
  }

  .library-hero-search i {
    display: none;
  }

  .library-hero-search input,
  .library-hero-search button {
    width: 100%;
    min-height: 46px;
    text-align: center;
  }

  main#main > section {
    padding: 58px 0;
  }

  .breadcrumbs {
    min-height: 280px;
    padding-top: 112px;
  }

  .library-book-card {
    min-height: 0;
  }

  .library-book-card__cover,
  .library-book-card__cover img {
    width: 132px;
    flex-basis: 132px;
    height: 220px;
  }

  .library-news-card__image,
  .library-news-card__image img {
    height: 190px;
  }

  .library-filter-panel {
    padding: 20px !important;
  }

  .library-catalog-page {
    padding-top: 46px;
  }

  .library-results-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .library-keyword-chip {
    border-radius: 16px;
  }

  .footer .footer-content .footer-info,
  .footer .footer-content .footer-links {
    border-radius: 18px;
  }

  .footer .footer-content .footer-info h3 {
    font-size: 23px;
  }

  .footer .footer-content h4 {
    margin-bottom: 16px;
  }

  .footer .footer-content .footer-links ul {
    gap: 9px;
  }

  .footer .footer-content .social-links a {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
