/*
 Theme Name:   Pakistan History Bibliography 
 Author:       HUf
 Version:      1.0.0
*/

body {
  font-family: 'Poppins', sans-serif;
}

h1, h2, h3 {
  font-family: 'Poppins', sans-serif; 
}
body {
    margin: 0px;
    background-image: url(https://habib.edu.pk/pakistanhistorybibliography/wp-content/uploads/2025/09/Bg-image-1.jpg);
    background-size: cover;
    background-repeat: no-repeat;
}
body.page-id-1263 {
    background-color: #fff !important;
    background-image: none;
}
/* ========== HEADER ========== */
#primary {
    max-width: 1366px;
    margin: 20px auto;
}
.custom-header {
  background: #F5F5F5;
  border-bottom: 1px solid #CDA8CF;
  /* padding: 13px 250px; */
}
.custom-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1366px;
  margin: auto;
  padding: 10px 20px;
}
.custom-header .logo {
  max-height: 50px;
}
.custom-header .btn {
background: #fff;
    color: #5E2568;
    border: 2px solid #5E2568;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.support-btn {
  background: #6a0dad;
  color: #fff;
}
.share-btn {
  background: #ff9800;
  color: #fff;
}

/* ========== Home page ========== */
.phb-banner {
    max-width: 1440px;
    margin: auto;
}
.phb-banner-img {
    width: 100%;
}
.homepage-hero {
  /* background-image: url('https://habib.edu.pk/pakistanhistorybibliography/wp-content/uploads/2025/09/Bg-image-1.jpg');
  background-size: cover;
  background-repeat: no-repeat; */
  /* min-height: 100vh;  */
  display: flex;
  justify-content: center;
  text-align: center;
  position: relative;
  padding-bottom: 20px;
}

.homepage-hero h1.main-title {
  font-family: 'Arno Pro', serif; 
  font-weight: 700;
  font-style: normal; 
  font-size: 64px;
  line-height: 68px;
  letter-spacing: 0; 
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 15px;
  color: #5E2568; 
}

.homepage-hero h2.subtitle {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  text-align: center;
  color: #616161;
  margin: 0px auto 16px;
  max-width: 65rem;
}

.homepage-hero p.subtitle {
  font-family: Poppins;
  font-weight: 600;
  font-size: 16px;
  line-height: 130%;
  text-align: center;
  color: #5E2568;
  margin: 0px auto;
  max-width: 47rem;
}

.homepage-hero .search-section {
  margin-bottom: 20px;
}

.homepage-hero .categories a {
  margin: 0 10px;
  font-weight: bold;
  text-decoration: none;
  color: #fff;
}
header.entry-header {
    display: none;
}
.form-page-header {
    padding: 0px 40px;
    max-width: 1000px;
    margin: auto;
}
/* ========== HERO SECTION ========== */

.hero {
  background: #f8f4ff;
  padding: 50px 20px;
  text-align: center;
}
.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #4b0082;
}
.hero p {
  font-size: 1.1rem;
  color: #444;
}

.borderline {
  border-bottom: 1px solid #5E2568;
  padding-bottom: 15px;
  margin-bottom: 0px;
}

.subtitle-container h2 {
  border-bottom: 1px solid #5E2568;
  padding-bottom: 10px;
  margin-bottom: 15px; 
}

.search-bar {
  margin-top: 30px;
}

/* ========== SEARCH BAR ========== */
.search-bar {
  text-align: center;
  margin: 30px auto;
}
.search-bar-wapper {
    display: flex;
    align-items: flex-start;
    width: 80%;
    justify-content: center;
    margin: auto;
    position: relative;
    padding-bottom: 20px;
}
.search-bar .search-form {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0px auto 0px;
  max-width: 60rem;
  width: 75%;
  background: #fff;
  border: 2px solid #5E2568;
  border-radius: 40px;
  padding: 5px 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.search-bar .search-icon {
  font-size: 18px;
  color: #5E2568;
  margin-right: 10px;
}

.search-bar input[type="text"] {
  flex: 1;
  padding: 10px;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: 'Poppins', sans-serif;
  color: #333;
  background: transparent;
}

.search-bar button[type="submit"] {
  background: #5E2568;
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-bar button[type="submit"]:hover {
  background: #7a3490;
}

/* Advance Search Button */
#advance-search-btn {
  background: #fff;
  color: #5E2568;
  border: 2px solid #5E2568;
  padding: 16px 15px;
  border-radius: 30px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  width: 20%;
  justify-content: center;
}

#advance-search-btn:hover {
  background: #5E2568;
  color: #fff;
}
#advance-search-btn img.btn-icon {
    padding-right: 5px;
}
.advance-filter-clear-btn {
    position: absolute;
    top: 45px;
    right: 0px;
    text-decoration: underline;
    cursor: pointer;
    font-size: 13px;
}
/* ========== CATEGORY FILTERS ========== */

.category-checkbox {
  display: none;
}

.category-filters label span {
  background: #fff;
  color: #616161;
  border: 2px solid #BEBEBE;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
}

.category-checkbox:checked + span {
  background: #5E2568;
  color: #fff;
  border-color: #5E2568;
}

.category-filters-wrapper {
    display: flex;
    align-items: center;
    margin: auto;
    display: inline-flex;
    padding: 15px 0px;
}
.category-filters {
    width: 1000px;
    display: flex;
    overflow: hidden;
/*     overflow-x: scroll; */
}
.category-filters label span {
    width: max-content;
}
.separator {
    width: 2px;
    height: 20px;
    background: #5E2568;
    margin: 0px 10px;
}

/* result wrapper */
.results-wrapper {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 1200px;
  margin: auto;
  padding-bottom: 20px;
}

.biblio-card {
  background: #fff;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.biblio-title {
  font-size: 16px;
  font-weight: 500;
  color: #141414;
  margin: 0;
  text-align: left;
}

.biblio-meta {
  display: flex;
  align-items: center;
  /* gap: 30px; */
  font-size: 14px;
  color: #808080;
}
a.biblio_author_ {
    background: #fff;
    color: #808080;
    padding: 0px 1px;
    border-radius: 30px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}
a.biblio_author_:hover {
    color: #5e2568;
}
.author-icon {
  font-size: 16px;
  color: #6a1b9a; 
}

.biblio-subject {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.subject-badge-main {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  color: #808080;
}
.subject-badge {
 background: #fff;
    color: #808080;
/*     border: 1px solid #DECA95; */
    padding: 0px 1px;
    border-radius: 30px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}
.subject-badge:hover {
    color: #5e2568;
}
.biblio-subject strong {
    font-size: 14px;
    color: #808080;
	padding-right: 3px;
}
.biblio-btn {
  align-self: flex-end;
  margin-top: 10px;
  background: #5E2568;
  color: #fff;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 25px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.3s ease;
}
.biblio-btn:hover {
  background: #4a0072;
}

/* ========== MODAL ========== */
/* Modal background */
.advance-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Hide modal by default */
.advance-modal.hidden {
  display: none;
}

/* Modal box */
.advance-modal-content {
  background: #fff;
  width: 80%;
  max-width: 900px;
  padding: 20px;
  border-radius: 12px;
  position: relative;
}

/* Close button */
.advance-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  border: none;
  background: none;
  font-size: 24px;
  cursor: pointer;
}

/* Tabs */
.advance-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
  border-bottom: 2px solid #ccc;
}
.advance-tabs .tab-btn {
  background: none;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: 600;
}
.advance-tabs .tab-btn.active {
  border-bottom: 3px solid purple;
  color: purple;
  font-family: 'Poppins';
}

/* Tab Content */
.tab-content {
  display: none;
  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.tab-content.active {
  display: grid;
}

/* Checkbox list */

.checkbox-list label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
}

/* Footer */
.advance-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 15px;
  gap: 12px;
}
.advance-footer button {
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}
#clear-filters {
  background: #f1f1f1;
}
#apply-filters {
  background: #5E2568;
  color: white;
}

.advance-modal.hidden {
  display: none;
}
.advance-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.advance-modal-content {
  background: #fff;
  padding: 20px;
  width: 600px;
  border-radius: 10px;
}
.advance-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}
.tab-btn.active {
  font-weight: bold;
  border-bottom: 2px solid #000;
}
.tab-content { display: none; }
.tab-content.active { display: block; }
.checkbox-list {
    /* max-height: 200px;
    min-height: 200px; */
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  /* align-content: center; */
  justify-items: start;
}

/* ========== SEARCH RESULTS ========== */
.search-bar {
  position: relative;
}

.pop-search-results {
  position: absolute;
  top: 57px;
  left: 13%;
  right: 0;
  background: #fff;
  border: 2px solid #5E2568;
  border-top: none;
  border-radius: 0 0 15px 15px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  width: 57%;
}

.pop-search-results.hidden {
  display: none;
}

.pop-search-results-wrapper {
  padding: 10px;
}

.search-result-item {
  padding: 5px 10px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-result-item:hover {
  background-color: #f8f4ff;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: #5E2568;
  font-weight: 600;
}

.search-result-item-dec {
    display: flex;
    justify-content: space-evenly;
}

.search-result-item p {
  margin: 4px 0;
  font-size: 14px;
  color: #666;
  text-align: left;
}

.view-details-link {
display: inline-block;
    margin-top: 0px;
    /* border: 1px solid #5E2568;
    padding: 5px 7px; */
    border-radius: 20px;
    color: #5E2568;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    /* display: none; */
    text-decoration: none !important;
}

.view-details-link:hover {
  text-decoration: underline;
}
/* ========== Archive Style ========== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.page-title {
    font-size: 26px;
    color: #5e2568;
    text-transform: capitalize;
}

/* ========== Footer Style ========== */
  .error-container {
    text-align: center;
  }
  .error-gif {
    width: 180px;
    height: 180px;
    margin-bottom: 20px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  }

    .error-gif img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
        .home-btn {
      background: #5E2568;
      color: #fff;
      padding: 12px 30px;
      border-radius: 30px;
      text-decoration: none;
      font-weight: 600;
      transition: all 0.3s ease;
      display: inline-flex;
      align-items: center;
      gap: 10px;
    }

    .home-btn:hover {
      background: #6a2b75;
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(26, 115, 232, 0.3);
    }

    .home-btn svg {
      width: 20px;
      height: 20px;
    }

/* ========== Footer Style ========== */
.footer {
    display: flex;
    justify-content: space-between;
        padding: 20px 20px;
}
.footer_left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.powered-by {
    margin: 0px;
}
.footer_left .fa::before {
    color: #5d2568;
}
.footer_left a {
    text-decoration: none;
}
.footer p {
    color: #5d2568;
}
.powered-by a {
    font-weight: 600;
    color: #5e2568;
}
/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .custom-header .logo {
      max-height: 80px;
  }
  .custom-header .container {
    flex-direction: column;
  }
  .custom-header .btn {
    padding: 5px 10px;
    text-decoration: none;
  }
.page-header {
    flex-direction: column;
}
.biblio-btn.home-btn {
    align-self: center;
}
  .custom-header {
    padding: 13px 20px;
  }
  
  .homepage-hero h1.main-title {
    font-size: 2.5rem;
    line-height: 1.2;
  }
  
  .homepage-hero h2.subtitle,
  .homepage-hero p.subtitle {
    font-size: 14px;
    max-width: 90%;
    margin: 0 auto 15px;
  }
  .homepage-hero {
    padding-bottom: 0px;
  }
  .borderline {
    margin-bottom: 0px;
  }
  
  .search-bar .search-form {
    flex-direction: row;
    padding: 0px 10px;
    margin: 0 auto 10px;
    width: 90%; 
  }
  
  .search-bar input[type="text"] {
    width: 100%;
    margin-bottom: 10px;
  }
  .search-bar {
    margin: 30px auto 0px auto;
  }
  .search-bar-wapper {
    width: 100%;
    flex-direction: column;
    padding-bottom: 0px;
  }
.pop-search-results {
    left: 0;
    right: 0;
    margin: auto;
    width: 80%;
  }
  #advance-search-btn{
    width: 75%;
    justify-content: center;
    margin: auto;

  }
  .advance-filter-clear-btn {
    position: relative;
    top: 0px;
    right: 0;
    left: 0;
    margin: auto;
  }

  .category-filters-wrapper {
    margin: 0 0px;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
  }
  
  .separator {
    width: 100%;
    height: 1px;
    margin: 0px 0;
  }
  
  .category-filters {
    display: flex;
    gap: 8px;
    max-width: 100%;
    flex-wrap: nowrap;
    overflow: hidden;
    overflow-x: scroll;
  }
  .category-filters label span {
    width: max-content;
  }
  #category-filter {
    overflow: hidden;
  }
  .biblio-card {
    padding: 15px;
    margin: 0 0px;
  }
  
  .biblio-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .biblio-subject {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .subject-badge-main {
    flex-wrap: wrap;
  }
  .advance-modal-content {
    width: 90%;
    margin: 20px;
  }
  
  .checkbox-list {
    grid-template-columns: 1fr;
  }
  
  .results-wrapper {
    margin: 20px 10px;
  }
  
  .pagination {
    text-align: center;
    margin: 20px 0;
  }

/*  */
  .footer {
      flex-direction: column;
      align-content: center;
      flex-wrap: wrap;
  }
  .footer_left {
      padding-bottom: 20px;
  }
}


/* new blog */
section#category-post-list-section {
    text-align: center;
}
.pagination ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 0px;
    margin: 0px;
}
.pagination li {
    list-style: none;
}
.pagination li .page-numbers.current {
    background: #5e2568;
    color: #ffffff;
    border: 2px solid #5e2568;
}
.pagination li .page-numbers {
    color: #000;
    text-decoration: none;
    border: 1px solid #000;
    background: #fff;
    color: #616161;
    border: 2px solid #BEBEBE;
    padding: 0px 15px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.pagination ul i {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    /* padding: 10px 0px; */
    margin: 0px;
}


#blog_home_loader {
  /* position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  backdrop-filter: blur(5px); */
}

/* Dancing dots */
.dots-loader {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    top: 50%;
    position: relative;
    margin: auto;
}

.dots-loader span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: block;
  animation: bounce 1s infinite ease-in-out;
}

/* Different colors for each dot */
.dots-loader span:nth-child(1) { background: #e74c3c; animation-delay: 0s; }
.dots-loader span:nth-child(2) { background: #f1c40f; animation-delay: 0.15s; }
.dots-loader span:nth-child(3) { background: #2ecc71; animation-delay: 0.3s; }
.dots-loader span:nth-child(4) { background: #3498db; animation-delay: 0.45s; }

@keyframes bounce {
  0%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-15px);
  }
}

#blog_home_loader p {
  margin-top: 18px;
  font-size: 16px;
  font-weight: 500;
  color: #333;
  letter-spacing: 0.5px;
  text-align: center;
}
