/* ========== BASE STYLES & MODERN DESIGN SYSTEM ========== */
:root {
  --primary: #4361ee;
  --primary-dark: #002147;
  --primary-light: #8c9eff;
  --secondary: #00b4d8;
  --accent: #ef476f;
  --text-dark: #2b2d42;
  --text-medium: #546e7a;
  --text-light: #8d99ae;
  --bg-light: #f9fafc;
  --bg-white: #ffffff;
  --border-light: #e9ecef;
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 15px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 15px 35px rgba(67, 97, 238, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 50px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Add padding to body to prevent content from hiding under fixed navbar */
body {
  padding-top: 80px;
}

/* ========== MODERNIZED NAVBAR STYLES ========== */
.navbar {
  font-size: 16px;
  background-color: var(--bg-white);
  box-shadow: var(--shadow-md);
  z-index: 1050;
  padding: 15px 0;
  transition: var(--transition);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  border-bottom: 1px solid rgba(230, 230, 230, 0.5);
}

/* Adding scroll behavior for navbar */
.navbar.scrolled {
  padding: 10px 0;
  box-shadow: var(--shadow-lg);
}

.navbar .navbar-brand {
  font-size: 24px;
  color: var(--primary-dark);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.5px;
}

.navbar .navbar-brand i {
  color: var(--primary);
  transform: translateY(-1px);
}

.navbar .navbar-nav .nav-item a {
  color: var(--text-dark);
  font-weight: 500;
  transition: var(--transition);
  padding: 8px 15px;
  border-radius: var(--radius-sm);
}

.navbar .navbar-nav .nav-item a:hover {
  color: var(--primary);
  background-color: rgba(67, 97, 238, 0.05);
}

.navbar .navbar-nav .nav-item .dropdown-menu {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  min-width: 220px;
  margin-top: 15px;
  z-index: 1051;
  background: var(--bg-white);
  border: 1px solid rgba(230, 230, 230, 0.7);
}

.navbar .navbar-nav .nav-item .dropdown-menu a {
  color: var(--text-dark);
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  transition: var(--transition);
}

.navbar .navbar-nav .nav-item .dropdown-menu a:hover {
  background-color: rgba(67, 97, 238, 0.05);
  color: var(--primary);
  transform: translateX(3px);
}

.navbar.sticky {
  top: 0;
}

.navbar .navbar-nav .icon_kategori {
  display: none;
}

.navbar .search-form {
  margin: 0 auto;
  position: relative;
}

.navbar .search-form .form-control {
  width: 520px;
  border-radius: var(--radius-full);
  padding-left: 20px;
  border: 1px solid var(--border-light);
  background-color: #f8f9fa;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  height: 45px;
  font-size: 15px;
}

.navbar .search-form .form-control:focus {
  border-color: var(--primary);
  background-color: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.user_show .showForm {
  display: none;
}

.navbar .search-form button {
  border: none;
  background-color: transparent;
  color: var(--text-light);
  font-size: 18px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 15px;
  transition: var(--transition);
}

.navbar .search-form button:hover {
  color: var(--primary);
}

.dropdown .dropdown-toggle {
  color: var(--primary-dark);
  text-decoration: none;
}

.dropdown .dropdown-menu {
  position: absolute;
  left: -20px;
  z-index: 1051;
}

/* Updated user icon styles - removed background on desktop */
.user_show a {
  padding: 8px;
  color: var(--text-dark);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.user_show a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.user_show a i {
  font-size: 18px;
}

/* ========== ENHANCED NOTIFICATION BAR WITH MEGAPHONE ICON ========== */
.notification-bar {
  position: relative;
  width: 100%;
  background: linear-gradient(to right, rgba(67, 97, 238, 0.08) 0%, rgba(0, 180, 216, 0.05) 50%, rgba(67, 97, 238, 0.08) 100%);
  padding: 10px 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(67, 97, 238, 0.15);
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  z-index: 1000;
}

.notification-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

.notification-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--primary);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(67, 97, 238, 0.25);
  animation: pulse 2s infinite;
  z-index: 10;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.5);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(67, 97, 238, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(67, 97, 238, 0);
  }
}

.notification-wrapper {
  padding-left: 50px; /* Space for the icon */
  overflow: hidden;
  width: 100%;
}

.notification-text {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 25s linear infinite;
  color: var(--primary-dark);
  font-weight: 500;
  padding-left: 100%;
  font-size: 15px;
}

.notification-text span {
  display: inline-block;
  margin-right: 30px;
  position: relative;
}

.notification-text span:after {
  content: "•";
  position: absolute;
  right: -18px;
  color: var(--primary);
}

.notification-text span:last-child:after {
  content: "";
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* ========== ENHANCED HEADER STYLES ========== */
.page-header {
  position: relative;
  margin-bottom: 30px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(to right, #4361ee, #3a0ca3);
  padding: 30px;
  color: white;
  box-shadow: 0 10px 30px rgba(67, 97, 238, 0.2);
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: url('data:image/svg+xml,%3Csvg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z" fill="%23ffffff" fill-opacity="0.1" fill-rule="evenodd"/%3E%3C/svg%3E');
  opacity: 0.3;
}

.page-header-content {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-header h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  padding-bottom: 10px;
}

.page-header h1::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 2px;
}

.page-header p {
  margin: 5px 0 0;
  font-size: 16px;
  opacity: 0.9;
  max-width: 600px;
}

.page-header-link {
  color: white;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  padding: 6px 15px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.page-header-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* ========== ELEGANT BACKGROUND STYLES ========== */
section {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-light);
  padding: 20px 0 90px 0;
  position: relative;
  overflow: hidden;
}

/* Subtle pattern overlay */
section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(140, 158, 255, 0.08) 0%, transparent 20%),
    radial-gradient(circle at 85% 60%, rgba(67, 97, 238, 0.05) 0%, transparent 30%);
  z-index: 0;
  opacity: 0.7;
}

/* Elegant gradient accent top */
section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 250px;
  background: linear-gradient(to bottom, 
              rgba(249, 250, 252, 0.8) 0%, 
              rgba(249, 250, 252, 0) 100%);
  z-index: 0;
}

section .container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Remove the floating elements for cleaner design */
.background-decor, .floating-bubble {
  display: none;
}

/* Modern content grid with better spacing */
section .content {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  position: relative;
  z-index: 2;
}

/* Section styling */
.section-card {
  margin-bottom: 45px;
  position: relative;
  z-index: 2;
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modern header styling */
.header-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  border-bottom: 1px solid rgba(67, 97, 238, 0.1);
  padding-bottom: 10px;
}

.header-text h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary-dark);
  position: relative;
  margin-bottom: 0;
  letter-spacing: -0.5px;
}

.header-text h1::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  border-radius: 3px;
}

.header-text a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 500;
  font-size: 15px;
  transition: var(--transition);
  padding: 6px 15px;
  border-radius: var(--radius-sm);
}

.header-text a:hover {
  background-color: rgba(67, 97, 238, 0.08);
  transform: translateX(3px);
}

/*============================================================ MODERN CARD DESIGN ============================================================*/
.card-home {
  width: 100%;
  height: 360px; /* Fixed taller height for cards */
  border-radius: var(--radius-md);
  overflow: hidden;
  border: none;
  background-color: var(--bg-white);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Elegant top border on hover */
.card-home::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  opacity: 0;
  transition: var(--transition);
}

.card-home:hover::before {
  opacity: 1;
}

.card-home img {
  width: 100%;
  height: 200px; /* Fixed height for image */
  object-fit: cover;
  transition: var(--transition);
}

/* Improved card body layout */
.card-home .card-body {
  position: relative; /* Changed from absolute to relative */
  padding: 15px;
  background-color: var(--bg-white);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  z-index: 2;
  transform: none; /* Reset transform */
  border-top-left-radius: 0; /* Reset radius */
}

/* Author name styling */
.card-home .card-text {
  font-size: 13px;
  color: var(--text-medium);
  margin-bottom: 8px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Book title styling */
.card-home .card-title {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary-dark);
  margin-bottom: 15px;
  line-height: 1.4;
  height: 42px; /* Fixed height to show 2 lines */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Button styling */
.card-home .btn-primary,
.card-home .btn-sm {
  margin-top: auto; /* Push button to bottom */
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(67, 97, 238, 0.25);
  transition: var(--transition);
  text-decoration: none;
  display: block;
  text-align: center;
  width: 100%;
}

.card-home .btn-primary:hover,
.card-home .btn-sm:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(67, 97, 238, 0.35);
}

/* Card hover effects */
.card-home:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}

.card-home:hover img {
  transform: scale(1.05);
}

/* Reset hover card body */
.card-home:hover .card-body {
  background-color: var(--bg-white);
  height: auto;
  padding: 15px;
  bottom: auto;
}

/* Reset hover text color */
.card-home:hover .label {
  color: var(--text-light);
}

/* Reset hover image blur */
.card-home:hover img {
  filter: none;
}

/* Detail card styling */
.card-detail {
  width: 250px;
  height: 350px;
  border-radius: var(--radius-md);
  border: none;
  background-color: var(--bg-white);
  box-shadow: var(--shadow-md);
  padding: 15px;
  transition: var(--transition);
}

.card-detail:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}

.card-detail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* Registration card styling */
.card-daftar {
  margin: 0 auto;
  position: relative;
  background-color: var(--bg-white);
  border: none;
  padding: 25px;
  border-radius: var(--radius-lg);
  width: 500px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.card-daftar:hover {
  box-shadow: var(--shadow-hover);
}

/* Input field styling */
.input-box {
  position: relative;
  margin-top: 20px;
}

.input-box .form-label {
  position: absolute;
  left: 0.8rem;
  top: 0.6rem;
  padding: 0 0.5rem;
  transition: all 200ms;
  background-color: var(--bg-white);
  font-size: 15px;
  color: var(--text-medium);
}

.input-box #toggle-icon {
  position: absolute;
  right: 0.8rem;
  top: 0.8rem;
  padding: 0 0.5rem;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.input-box #toggle-icon:hover {
  color: var(--primary);
}

.form-control {
  height: 48px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  padding-left: 15px;
  font-size: 15px;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  box-shadow: none;
  border-color: var(--primary);
}

.form-control:focus~.form-label,
.form-control:not(:placeholder-shown).form-control:not(:focus)~.form-label {
  top: -0.7rem;
  left: 0.8rem;
  font-size: 12px;
  color: var(--primary);
  font-weight: 500;
}

/*=========================================================== PINJAM BUKU STYLES ===========================================================*/
.alert-pinjam-buku {
  margin: 0 auto;
  width: 420px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: none;
}

.listings-container {
  margin: 0;
  padding: 30px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.card-pinjam-buku {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background-color: var(--bg-white);
  border: none;
  transition: var(--transition);
  overflow: hidden;
}

.card-pinjam-buku:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.card-pinjam-buku .img-thumbnail {
  max-width: 50px;
  border-radius: var(--radius-sm);
  border: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.pinjam_buku .rak-position {
  float: right;
  margin-top: -15px;
  font-size: 13px;
  color: var(--primary-light);
  font-weight: 500;
}

.card_pinjam_buku {
  width: 450px;
  height: 100%;
  position: relative;
  transition: var(--transition);
  transform-style: preserve-3d;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background-color: var(--bg-white);
  border: none;
  overflow: hidden;
}

.mobile-title {
  margin-top: 15px;
  padding: 0;
  margin-left: 10px;
  margin-bottom: 0;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 500;
}

.sell,
.statusTgl {
  margin-top: 25px;
  padding-top: 25px;
  border-top: 2px dashed #e9ecef;
  position: relative;
}

.sell::after,
.statusTgl::after {
  content: " ";
  width: 20px;
  height: 12px;
  position: absolute;
  top: -7px;
  right: -21px;
  background-color: var(--bg-white);
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  border: 1.5px solid #e9ecef;
  border-bottom: 0;
  transform: rotate(-90deg);
}

.sell::before,
.statusTgl::before {
  content: " ";
  width: 20px;
  height: 12px;
  position: absolute;
  top: -7px;
  left: -21px;
  background-color: var(--bg-white);
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  border: 1.5px solid #e9ecef;
  border-bottom: 0;
  transform: rotate(90deg);
}

.ref {
  padding: 8px 0;
  font-size: 18px;
  display: flex;
  justify-content: center;
  color: var(--text-light);
  margin-bottom: 15px;
  margin-top: -10px;
  border-bottom: 1.5px dashed #e9ecef;
  font-weight: 500;
}

.head {
  display: flex;
  justify-content: space-between;
  text-align: end;
  gap: 10px;
}

.head-c .rak {
  float: right;
  font-size: 12px;
  margin-top: -20px;
  color: var(--primary-light);
  font-weight: 500;
}

.title {
  font-size: 13px;
  width: 25%;
  color: var(--text-dark);
  font-weight: 500;
}

/* Button styling */
.btn {
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-weight: 500;
  font-size: 15px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  border: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

section .button-seeall {
  position: relative;
  left: 50%;
  top: 20px;
  transform: translate(-50%);
  background-color: var(--primary);
  color: white;
  border-radius: var(--radius-full);
  padding: 10px 25px;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.2);
  border: none;
  transition: var(--transition);
}

section .button-seeall:hover {
  background-color: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(67, 97, 238, 0.3);
  transform: translate(-50%, -3px);
}

/* ========== MODERNIZED FOOTER STYLES ========== */
footer {
  background-color: var(--bg-white);
  padding: 40px 0 30px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
  color: var(--text-dark);
  margin-top: 60px;
  position: relative;
}

/* Elegant footer top border */
footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--primary-light));
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo i {
  font-size: 24px;
  color: var(--primary);
}

.footer-logo span {
  font-weight: 700;
  font-size: 20px;
  color: var(--primary-dark);
  letter-spacing: -0.5px;
}

.footer-links {
  display: flex;
  gap: 25px;
}

.footer-links a {
  color: var(--text-medium);
  text-decoration: none;
  transition: var(--transition);
  font-size: 15px;
  position: relative;
}

/* Animated underline for footer links */
.footer-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-links a:hover::after {
  width: 100%;
}

footer .copyright {
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
  border-top: 1px solid #f0f4f7;
  padding-top: 25px;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 767px) {
  /* Tambahkan kode ini untuk menyembunyikan tulisan "DESA" */
  .navbar-brand .wave-letter[style*="--i:1"],
  .navbar-brand .wave-letter[style*="--i:2"],
  .navbar-brand .wave-letter[style*="--i:3"],
  .navbar-brand .wave-letter[style*="--i:4"],
  .navbar-brand .wave-letter[style*="--i:5"] {
      display: none;
  }

  /* Pastikan wave-letter untuk DAWUNG terlihat semua */
  .navbar-brand .wave-letter[style*="--i:6"],
  .navbar-brand .wave-letter[style*="--i:7"],
  .navbar-brand .wave-letter[style*="--i:8"],
  .navbar-brand .wave-letter[style*="--i:9"],
  .navbar-brand .wave-letter[style*="--i:10"],
  .navbar-brand .wave-letter[style*="--i:11"] {
      display: inline-block;
  }

  .navbar .navbar-nav {
      position: absolute;
      right: 45px;
      top: 15px;
  }

  .navbar .navbar-nav .dropdown-menu {
      left: -140px;
      z-index: 1051;
  }

  .navbar .kategori_name {
      display: none;
  }

  .navbar .navbar-nav .icon_kategori {
      display: block;
      mask-position: absolute;
      left: 0;
  }

  /* UPDATED: Show search form button in mobile */
  .user_show .showForm {
      display: block;
  }

  .search-form {
      width: 100%;
      display: none;
  }

  .search-form.active {
      display: block;
      z-index: 1052;
  }

  .navbar .search-form .form-control {
      position: absolute;
      left: 0;
      top: -2.5em;
      width: 280px;
  }

  .navbar .search-form button {
      position: absolute;
      top: -2em;
      right: 5.5em;
  }

  /* UPDATED: Remove oval background from mobile nav icons */
  .navbar .user_show {
      position: absolute;
      right: 15px;
      top: 20px;
  }
  
  .user_show a {
      padding: 8px;
      background-color: transparent;
      border-radius: 0;
  }
  
  .user_show a:hover {
      background-color: transparent;
  }

  /* Page header mobile styles */
  .page-header {
      padding: 20px;
  }
  
  .page-header-content {
      flex-direction: column;
      align-items: flex-start;
      gap: 15px;
  }
  
  .page-header h1 {
      font-size: 24px;
  }
  
  .page-header p {
      font-size: 14px;
  }

  section .content,
  .viewAll {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 15px;
  }

  .card-home {
      width: 100%;
      height: 330px; /* Smaller height for mobile */
  }

  .card-home img {
      height: 170px; /* Smaller image height for mobile */
  }

  .card-home .card-title {
      font-size: 14px;
  }

  .card-home .card-text {
      font-size: 12px;
  }

  .card-home .btn-primary,
  .card-home .btn-sm {
      font-size: 13px;
      padding: 8px 0;
  }

  .section-detail {
      grid-template-columns: repeat(1, auto);
  }

  .card-detail {
      width: 100%;
      height: 100%;
  }

  /* daftar/masuk area */
  .card-daftar {
      width: 100%;
      padding: 20px;
  }

  /* pinjam buku area */
  .card-pinjam-buku {
      width: 100%;
  }

  .card-pinjam-buku .img-thumbnail {
      max-width: 80px;
  }

  .pinjam_buku {
      width: 100%;
      padding: 15px;
  }

  .pinjam_buku .rak-position {
      float: left;
  }

  .card_pinjam_buku {
      width: 100%;
  }
  
  /* Footer mobile styles */
  .footer-content {
      flex-direction: column;
      text-align: center;
  }
  
  .footer-logo {
      justify-content: center;
  }
  
  .footer-links {
      justify-content: center;
      flex-wrap: wrap;
      gap: 15px;
  }
  
  section {
      padding: 30px 0 70px;
  }
  
  .header-text {
      flex-direction: column;
      align-items: flex-start;
      gap: 10px;
  }
  
  .header-text h1 {
      font-size: 22px;
  }
  
  /* Notification bar mobile adjustments */
  .notification-icon {
      width: 30px;
      height: 30px;
      left: 15px;
  }
  
  .notification-wrapper {
      padding-left: 40px;
  }
  
  .notification-text {
      font-size: 14px;
  }
}

/* Tablet Styles */
@media screen and (min-width:768px) and (max-width:1023px) {
  .navbar .navbar-nav {
      position: absolute;
      right: 45px;
      top: 15px;
  }

  .navbar .navbar-nav .dropdown-menu {
      left: -140px;
      z-index: 1051;
  }

  .navbar .kategori_name {
      display: none;
  }

  .navbar .navbar-nav .icon_kategori {
      display: block;
  }

  .search-form {
      width: 100%;
      display: none;
  }

  .search-form.active {
      display: block;
      z-index: 1052;
  }

  .user_show .showForm {
      display: block;
  }

  .navbar .search-form .form-control {
      position: absolute;
      left: 0;
      top: -2.5em;
      width: 640px;
  }

  .navbar .search-form button {
      position: absolute;
      top: -2em;
      right: 3.4em;
  }

  .navbar .user_show {
      position: absolute;
      right: 15px;
      top: 20px;
  }

  section .content,
  .viewAll {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 15px;
  }

  .card-home {
      height: 350px; /* Adjusted for tablet */
  }

  .card-home img {
      height: 180px; /* Adjusted for tablet */
  }

  /* pinjam buku area */
  .pinjam_buku {
      width: 100%;
      padding: 15px;
  }

  .pinjam_buku .rak-position {
      float: left;
  }

  .card_pinjam_buku {
      width: 100%;
  }
}

/* Fix untuk modal Bootstrap */
.modal {
  background-color: rgba(0, 0, 0, 0.4);
  padding-right: 0 !important;
}

.modal-backdrop {
  display: none !important;
}

.modal-open {
  overflow: auto !important;
  padding-right: 0 !important;
}

body {
  overflow: auto !important;
  padding-right: 0 !important;
}

.modal-dialog {
  margin: 1.75rem auto;
}

.modal-content {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.modal-header {
  border-bottom: 1px solid #f0f4f7;
  padding: 20px 25px;
}

.modal-body {
  padding: 25px;
}

.modal-footer {
  border-top: 1px solid #f0f4f7;
  padding: 15px 25px;
}

.modal-title {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 20px;
}

.close {
  font-size: 28px;
  color: var(--text-light);
  opacity: 0.7;
  transition: var(--transition);
}

.close:hover {
  opacity: 1;
  color: var(--primary);
}

.flatpickr-calendar {
  z-index: 10000 !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12) !important;
  border: none !important;
  font-family: 'Segoe UI', Roboto, sans-serif;
}

/* Fix untuk datepicker */
.ui-datepicker {
  z-index: 10000 !important;
  border-radius: var(--radius-md);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
  border: none;
  padding: 15px;
  font-family: 'Segoe UI', Roboto, sans-serif;
}

/* Additional modern touches */
/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #c5cae9;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* Text selection styling */
::selection {
  background-color: rgba(67, 97, 238, 0.2);
  color: var(--primary-dark);
}

/* Additional animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fadeUp {
  animation: fadeUp 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}



/* WhatsApp Live Chat Icon */
.whatsapp-chat {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1060;
}

.whatsapp-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  text-decoration: none;
  position: relative;
}

.whatsapp-icon i {
  font-size: 32px;
}

.whatsapp-icon:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.35);
}

.whatsapp-icon:hover .tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

/* Tooltip */
.whatsapp-icon .tooltip {
  position: absolute;
  top: -45px;
  right: 0;
  background-color: var(--bg-white);
  color: var(--text-dark);
  padding: 8px 15px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.whatsapp-icon .tooltip::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 25px;
  width: 16px;
  height: 16px;
  background-color: var(--bg-white);
  transform: rotate(45deg);
}

/* Pulse animation */
.whatsapp-icon::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #25D366;
  z-index: -1;
  animation: pulse-whatsapp 2s infinite;
}

@keyframes pulse-whatsapp {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  70% {
    transform: scale(1.3);
    opacity: 0;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

/* Mobile adjustments */
@media screen and (max-width: 767px) {
  .whatsapp-chat {
    bottom: 20px;
    right: 20px;
  }
  
  .whatsapp-icon {
    width: 50px;
    height: 50px;
  }
  
  .whatsapp-icon i {
    font-size: 28px;
  }
}