@import url('https://fonts.googleapis.com/css2?family=Quicksand&display=swap');
:root {
    --primary-color: #ffffff;
    --text-color: #003366;
    --card-border: #ffa500;
    --shadow-card: #ffe0b3;
  }

  @keyframes rainbow {
0% { background-position: 0% 50%; } /* Bắt đầu từ vị trí 0% */
100% { background-position: 200% 50%; } /* Di chuyển đến vị trí 200% để tạo vòng lặp mượt mà */
}
/* -------Body Chính------- */
  body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: url('https://i.pinimg.com/736x/0c/a3/51/0ca351d3116d63d1009e88cb52cd5413.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
  }
/* ------Đầu trang------- */
  header {
    text-align: center;
    margin: 2rem 0 1rem;
    font-size: 2rem;
    font-weight: bold;
      font-family: "Mitr", sans-serif;
font-weight: 600;
font-style: normal;
    background: linear-gradient(270deg, red, rgb(237, 205, 147), yellow, green, blue, rgb(1, 213, 255), rgb(10, 245, 170), red);
    background-size: 200% 200%;
    animation: rainbow 5s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
  }
/* --------Mạng xã hội------ */
  .socials {
    margin-top: 0.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
  }

  .socials a img {
    width: 30px;
    height: 30px;
  }
  .social-container {
display: inline-block;
padding: 2px;
border-radius: 10px;
background: linear-gradient(270deg, red, orange, yellow, rgb(107, 107, 255), rgb(241, 248, 46), violet, red);
background-size: 400% 400%;
animation: rainbow 5s linear infinite;
}

.social-link {
display: flex;
align-items: center;
gap: 0.6rem;
background: white; /* Nền trắng */
padding: 0.5rem 1rem;
border-radius: 8px;
transition: transform 0.2s ease, box-shadow 0.2s ease;
text-decoration: none;
border: 1.5px solid white; /* Viền trắng ban đầu để cách biệt */
}

.social-container:hover .social-link {
transform: translateY(-4px);
box-shadow: 0 6px 20px rgba(255, 140, 0, 0.3); /* bóng phía dưới */
}

.social-link img {
width: 30px;
height: 30px;
}

.social-title {
font-family: "Varela Round", sans-serif;
font-style: normal;
font-weight: bold;
color: #ff6600; /* Màu chữ cam */
font-size: 1rem;
display: flex;
align-items: center;
gap: 0.3rem;
text-shadow:
  0 1px 1px rgba(255, 140, 0, 0.4),  /* bóng nhạt gần */
  0 2px 3px rgba(255, 102, 0, 0.8); /* bóng đậm xa hơn */
}
/* -------Thẻ--------- */
.card-wrapper {
position: relative;
margin: 3rem 1rem;
max-width: 720px;
width: 95%;
overflow: hidden; /* ✅ sửa từ visible thành hidden */
border-radius: 10px; /* để bóng không lộ ra góc */
}
@keyframes rainbow {
0% { background-position: 0% 50%; }
100% { background-position: 200% 50%; }
}
.rainbow-arrow {
background: linear-gradient(270deg, red, orange, yellow, green, blue, indigo, violet, red);
background-size: 200% 200%;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
color: transparent;
animation: rainbow 3s linear infinite;
font-weight: bolder;
}
.card {
font-family: "Rowdies", sans-serif;
font-weight: 400;
font-style: normal;
display: flex;
flex-direction: column;
justify-content: space-between;
background-color: var(--primary-color);
border: 1.2px solid #ffa500b3;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 0 0 1px #ff8c00, 0 4px 12px rgba(0,0,0,0.3);
cursor: pointer;
z-index: 1;
position: relative; /* ✅ ĐÃ SỬA */
transition: transform 0.2s ease;
}
.card:hover {
transform: translateY(-6px);
}
.card img {
width: 100%;
height: auto;
object-fit: cover;
}
@keyframes rainbow-run {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}

.card-content {
display: flex;
justify-content: center;
align-items: center;
text-align: center;
min-height: 80px;
padding: 1.5rem 1rem 2rem;
font-family: "Rowdies", sans-serif;
font-size: 1.2rem;
font-weight: bold;
background: linear-gradient(90deg, rgb(178, 150, 150), rgb(223, 99, 22));
background-size: 200% 200%;
background-position: 0% 50%;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
color: transparent;
}

.card:hover .card-content {
background: linear-gradient(270deg, rgb(43, 200, 224), rgb(206, 85, 137), rgb(213, 213, 53), rgb(154, 221, 154), rgb(229, 155, 155));
background-size: 400% 400%;
background-position: 0% 50%; /* ← PHẢI CÓ */
animation: rainbow-run 4s linear infinite;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
color: transparent;
}

  .separator {
    font-family: "Varela Round", sans-serif;
    font-weight: 400;
    font-style: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
    width: 100%;
    font-size: 1.5rem;
    color: white;
    text-shadow: 0 0 8px #fff, 0 0 15px #ffd700, 0 0 20px #ffec8b;
  }

  .separator::before,
  .separator::after {
    content: '';
    flex: 1;
    border-top: 2px solid #fff;
    margin: 0 10px;
  }
  footer {
    font-family: "Varela Round", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 30px;
    margin: 2rem 0;
    color: #ffffff;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgb(253, 169, 0);
  }
a {
text-decoration: none;
color: #000000; /* Hoặc màu bạn muốn */
}
/* Navbar chính */
.navbar {
font-family: "Varela Round", sans-serif;
font-weight: 400;
font-style: normal;
position: fixed;
top: 0;
width: 100%;
margin: 0 auto; /* căn giữa */
background-color: white;
padding: 0.4rem 1rem;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
display: flex;
justify-content: space-between;
align-items: center;
z-index: 1000;
border-bottom: 3px dashed orange;
}

/* Phần trái navbar */
.nav-left {
display: flex;
gap: 1rem;
}
/* Link trong navbar */
.nav-link {
text-decoration: none;
font-family: 'Varela Round', sans-serif;
color: #333;
padding: 0.3rem 0;
position: relative;
font-size: 0.95rem;
transition: color 0.3s ease;
}
/* Gạch dưới (mặc định ẩn) */
.nav-link::after {
content: "";
position: absolute;
left: 0;
bottom: 0; /* đưa lên gần chữ hơn (từ -4px -> 0) */
height: 3px;
width: 0%;
background: linear-gradient(90deg, orange, pink, lightgreen);
border-radius: 6px;
transition: width 0.3s ease, bottom 0.3s ease;
}
/* Hover: hiện underline mở rộng mượt mà */
.nav-link:hover::after {
width: 100%;
}
.nav-link:hover{
color: orange;
}
/* Active: underline luôn hiện, màu nhạt */
.nav-link.active::after {
width: 100%;
background: linear-gradient(90deg, orange, pink, lightgreen);
opacity: 0.5; /* nhạt hơn khi active */
border-radius: 6px;
}
/* Logo giữa navbar */
.nav-left .logo {
height: 30px;       /* hoặc 24px nếu muốn nhỏ hơn nữa */
width: auto;
margin-right: 0.8rem; /* cách chữ kế bên một chút */
vertical-align: middle;
 text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  margin-left: 12px; /* đẩy logo xa mép trái */
}
.nav-link.active {
color: orange;
}
/* Để phần nội dung không bị đè lên navbar */
body {
padding-top: 80px; /* khoảng cách đẩy nội dung xuống */
}
/* ------Trang Sách cô Sương Mai------ */
.book-box {
display: flex;
gap: 30px;
padding: 30px;
border-radius: 20px;
border: 2px solid transparent;
background: white;
background-clip: padding-box;
position: relative;
z-index: 0;
width: 600px;         /* Chiều rộng tăng */
min-height: 200px;     /* Chiều cao tăng */
margin: 0 auto;
align-items: center
}
.book-box::before {
content: "";
position: absolute;
z-index: -1;
inset: 0;
border-radius: 16px;
padding: 2px;
background: linear-gradient(90deg, #a6e9ee, #96a9ee, #3ee2ffb3, #a6e9ee, blue);
background-size: 300% 300%;
animation: gradient-border 6s ease infinite;
-webkit-mask: 
  linear-gradient(#fff 0 0) content-box, 
  linear-gradient(#fff 0 0);
-webkit-mask-composite: destination-out;
mask-composite: exclude;
}
@keyframes gradient-border {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
.book-image {
flex-shrink: 0;         /* 🔒 không cho hình bị thu nhỏ khi thiếu chỗ */
width: 240px;           /* 👈 tuỳ chỉnh chiều rộng ảnh */
height: 320px;          /* 👈 tuỳ chỉnh chiều cao ảnh */
border-radius: 12px;
overflow: hidden;
background: #f0f0f0;
}
.book-image img {
width: 100%;
height: 100%;
object-fit: cover;      /* ⚠️ Cắt cho vừa khung nếu muốn */
display: block;
border-radius: 12px;
}
.thong-tin-sach-nkrrbn{
font-family: "Mitr", sans-serif;
font-size: 14px;
padding-left: -1px;
}
/* ==== Sách Ngoài Kia Rực Rỡ Bao Nhiêu?*/
.book-box-1{
  display: flex;
gap: 30px;
padding: 30px;
border-radius: 20px;
border: 2px solid transparent;
background: white;
background-clip: padding-box;
position: relative;
z-index: 0;
width: 600px;         /* Chiều rộng tăng */
min-height: 200px;     /* Chiều cao tăng */
margin: 0 auto;
align-items: center
}
.book-box-1::before {
content: "";
position: absolute;
z-index: -1;
inset: 0;
border-radius: 16px;
padding: 2px;
background: linear-gradient(90deg, #a6e9ee, #96a9ee, #3ee2ffb3, #a6e9ee, blue);
background-size: 300% 300%;
animation: gradient-border 6s ease infinite;
-webkit-mask: 
  linear-gradient(#fff 0 0) content-box, 
  linear-gradient(#fff 0 0);
-webkit-mask-composite: destination-out;
mask-composite: exclude;
}
.thong-tin-nkrrbn{
padding-left: 60px;
}
.nxb-sach-nkrrbn{
padding: 80px;
}
/* ===Sách ngoài kia rực rỡ bao nhiêu*/
.book-info {
flex: 2;
font-family: 'Varela Round', sans-serif;
font-size: 16px;
color: #333;
line-height: 1.6;
align-self: center;
display: flex;
flex-direction: column;
justify-content: center;
padding-left: 20px;   /* ✅ Thêm dòng này để đẩy chữ cách mép trái */
/* hoặc padding: 10px nếu muốn có đệm đều mọi phía */
}
.book-info .thong-tin{
padding-left: 40px; 
font-family: 'Varela Round', sans-serif;
}
.book-info .thong-tin-2{
padding-left: 80px;
font-family: 'Varela Round', sans-serif;
}
.nxb-sach{
font-family: "Mitr", sans-serif;
padding-left: 45px;
}
.thong-tin-sach{
font-family: "Mitr", sans-serif;
font-size: 15px;
padding-left: 20px;
}
.book-info p {
margin-bottom: 12px;
}
.pdf-button {
display: inline-block;
padding: 10px 24px;
background-color: #42d6f7;          /* Giữ nguyên màu nền */
color: rgb(5, 72, 241);                       /* Màu chữ ban đầu */
border-radius: 8px;
text-decoration: none;
font-weight: bold;
text-align: center;
transition: all 0.4s ease;
position: relative;
overflow: hidden;
transform: translateY(0);
}
/* Nút nảy lên khi hover */
.pdf-button:hover {
transform: translateY(-4px);
cursor: url('https://files.catbox.moe/n3733u.cur'), pointer;
}
/* Gradient chỉ áp dụng cho phần span bên trong */
.pdf-button span {
display: inline-block;
transition: all 0.4s ease;
}
/* Hover: gradient chữ, gạch chân */
.pdf-button:hover {
  cursor: url('https://files.catbox.moe/n3733u.cur'), pointer;
background-color: #dc2626;  /* ✅ Nền khi hover (ví dụ: đỏ) */
color: white;               /* ✅ Màu chữ khi hover (ví dụ: trắng) */
text-decoration: underline; /* ✅ Gạch chân khi hover */
}

/* -------Học văn----------- */
/* Gradient chuyển động */
.cover-box {
  font-family: 'Ubuntu', sans-serif;
  background-color: white;
  color: blue;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
  overflow: hidden;
  padding: 20px;
  width: 500px;
  height: auto;
  border: 4px solid transparent;
  transition: transform 0.8s cubic-bezier(0.25, 1.25, 0.5, 1), 
              box-shadow 0.8s ease, 
              border-color 0.8s ease;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}
/* Khi class 'show' được thêm vào */
.cover-box.show {
  opacity: 1;
  transform: translateY(0);
}
.cover-link {
  text-decoration: none;
  display: inline-block;
  margin: 9px; /* 👈 Bạn chỉnh số này để tạo khoảng cách */
}
.cover-box {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.cover-box.show {
  opacity: 1;
  transform: translateY(0);
}

.cover-box img {
  width: 100%;
  height: auto;
  object-fit: cover; /* Cắt ảnh hoặc căn chỉnh tùy theo tỷ lệ */
  display: block;
  border-radius: 12px;
}

.cover-text {
  font-family: 'Quicksand', sans-serif;
  margin-top: 12px;
  font-size: 1.2rem;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}
a.cover-link {
  text-decoration: none;
  display: inline-block;
}
.cover-link:hover .cover-box {
  transform: translateY(-6px) scale(1.02);
  border-color: #00aaff;
  box-shadow: 0 18px 36px rgba(0, 170, 255, 0.45);
  cursor: url('https://files.catbox.moe/n3733u.cur'), pointer;
}
html, body, * {
  cursor: url('https://files.catbox.moe/49xu5z.cur'), auto;
}
a:hover {
  cursor: url('https://files.catbox.moe/n3733u.cur'), pointer;
}
/* -------Thẻ lọc và Search---------- */
    .filter-search-wrapper {
      display: flex;
      gap: 20px;
      align-items: center;
      margin-bottom: 20px;
      flex-wrap: wrap;
    }

    /* Custom Select */
    .custom-select {
      position: relative;
      width: 200px;
    }

    .selected {
      background: white;
      padding: 10px 14px;
      border: 1.5px solid #ffab91;
      border-radius: 10px;
      color: #ff5722;
      cursor: pointer;
      cursor: url('https://files.catbox.moe/n3733u.cur'), pointer;
    }

    .dropdown {
      position: absolute;
      top: 110%;
      left: 0;
      width: 100%;
      background: white;
      border-radius: 10px;
      border: 1px solid #ccc;
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
      display: none;
      z-index: 10;
      cursor: url('https://files.catbox.moe/n3733u.cur'), pointer;
    }

    .dropdown div {
      padding: 10px;
      cursor: pointer;
      border-bottom: 1px solid #eee;
      color: #ff5722;
    }

    .dropdown div:last-child {
      border-bottom: none;
      cursor: url('https://files.catbox.moe/n3733u.cur'), pointer;
    }

    .dropdown div:hover {
      background-color: #ffe0b2;
      border-radius: 10px;
      cursor: url('https://files.catbox.moe/n3733u.cur'), pointer;
    }

    /* Search box */
    /* Wrapper có viền gradient */
.search-border-wrapper {
  display: inline-block;
  padding: 2px; /* Độ dày viền */
  border-radius: 22px;
  background: transparent;
  transition: all 0.3s ease;
}

/* Khi hover vào wrapper -> hiển thị viền gradient */
.search-border-wrapper:hover {
  background: linear-gradient(90deg, orange, pink, lightgreen);
  transform: translateY(-3px); /* Nảy lên */
}
    .search-box {
      display: flex;
      align-items: center;
      border: 1.5px solid #ffab91;
      border-radius: 20px;
      padding: 8px 12px;
      width: 240px;
      background: white;
    }
    .search-box input {
      border: none;
      outline: none;
      font-size: 14px;
      flex: 1;
      padding: 4px;
      color: black;
      background: white;
      cursor: url('https://files.catbox.moe/s4ww9e.cur'), text;
    }

    .search-box input:focus {
      color: #ff5722;
      background: white;
      cursor: url('https://files.catbox.moe/s4ww9e.cur'), text;
    }

    .search-icon {
      color: #ff5722;
      margin-right: 6px;
    }

    .card {
      padding: 10px;
      border: 1px solid #ccc;
      border-radius: 10px;
      margin-bottom: 10px;
    }
/* Layout dạng 2x2 */
.cover-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 cột đều nhau */
  gap: 20px 32px; /* dọc, ngang */
  justify-content: center; /* căn giữa toàn bộ grid */
  max-width: 1080px; /* giới hạn chiều rộng */
  margin: 0 auto; /* căn giữa khối */
}

.cover-link {
  width: 100%; /* tự giãn theo cột */
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
}

.pagination button {
  width: 40px;
  height: 40px;
  border-radius: 140px;
  border: 2px solid orange;
  background-color: white;
  color: orange;
  font-size: 20px;
  font-weight: bold;
  margin: 0 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination button.disabled {
  background-color: #ccc;
  border-color: #ccc;
  color: white;
  cursor: default;
}

#currentPageIndicator {
  width: 50px;
  height: 40px;
  background-color: white;
  color: orange;
  border: 2px solid orange;
  border-radius: 140px;
  font-weight: bold;
  font-size: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
}
button.disabled {
  background-color: #ccc;
  color: white;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.6;
}
/* PC (>= 769px): ẩn hamburger và mobile menu */
@media (min-width: 769px) {
  .hamburger,
  .mobile-menu {
    display: none;
  }
}
/* Mobile navbar */
@media (max-width: 768px) {
  .nav-left .nav-link {
    display: none;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    cursor: pointer;
    margin-right: 16px;
  }

  .hamburger span {
    height: 3px;
    border-radius: 2px;
    background-color: orange;
    transition: all 0.3s ease;
  }

  .hamburger span:nth-child(2) {
    background-color: pink;
  }

  .hamburger span:nth-child(3) {
    background-color: lightgreen;
  }

  .mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background-color: white;
    border-top: 1px solid orange;
    z-index: 999;
    flex-direction: column;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  }

  .mobile-menu a {
    padding: 12px 16px;
    border-bottom: 1px solid orange;
    color: orange;
    text-decoration: none;
    font-weight: bold;
  }

  .mobile-menu a:last-child {
    border-bottom: none;
  }

  .mobile-menu.show {
    display: flex;
  }
}
.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(3px, 3px);
  background-color: red;
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(3px, -3px);
  background-color: red;
}
.hamburger span {
  transform-origin: center;
}

@media screen and (max-width: 768px) {
 .cover-grid {
    grid-template-columns: 1fr;
    justify-items: center; /* Căn giữa trong grid */
  }

  .cover-box {
    width: 75vw;        /* 👈 nhỏ hơn nữa */
    max-width: 360px;   /* 👈 giảm kích thước tối đa */
    margin-left: 5px;/* 👈 tạo khoảng cách lề phải */
  }

  .cover-link {
    text-align: center;
  }

  .filter-search-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .custom-select {
    margin-left: 0;
  }

  .pagination {
    justify-content: center;
    margin-left: 0;
  }
}
@media (max-width: 768px) {
  .book-box,
  .book-box-1 {
    flex-direction: column;   /* 👉 Dọc thay vì ngang */
    width: 90%;               /* 👉 Nhỏ lại so với desktop */
    max-width: 400px;         /* 👉 Giới hạn tối đa chiều rộng */
    margin: 20px auto;        /* 👉 Canh giữa màn hình và tạo khoảng cách */
    padding: 20px;
    gap: 20px;
    align-items: center;
  }

  .book-image {
    width: 200px;   /* 👈 Ảnh nhỏ hơn cho vừa màn hình */
    height: auto;   /* 👉 Tự điều chỉnh theo tỉ lệ ảnh */
  }

  .book-image img {
    height: auto;
  }

  .book-info {
    padding-left: 0;
    text-align: center;       /* 👈 Cho đẹp và gọn */
    align-items: center;
  }

  .book-info .thong-tin,
  .book-info .thong-tin-2,
  .thong-tin-nkrrbn {
    padding-left: 0;          /* ❌ Bỏ thụt lề */
  }

  .nxb-sach,
  .nxb-sach-nkrrbn {
    padding: 0;
  }

  .thong-tin-sach,
  .thong-tin-sach-nkrrbn {
    padding-left: 0;
  }

  .pdf-button {
    width: 100%;
    text-align: center;
  }
}



