/*
Theme Name: Astra Child
Template: astra
*/

/* Main Container */
.custom-search-page {
    width: 100%;
    background: #ffffff;
    min-height: 584px;
    padding: 100px 200px 60px 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin: 0 auto;
}

/* Thêm vào CSS */
.search .site-content,
.search #primary,
.search #page,
.custom-search-page {
    flex-grow: 0 !important; /* Không tự động kéo dãn */
    flex-shrink: 0;
    min-height: auto !important;
}



.custom-search-container {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* Page Title */
.custom-search-title {
    font-size: 36px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    margin: 0 0 40px 0;
    line-height: 1.2;
}

/* Search Form */
.custom-search-form-wrapper {
    margin-bottom: 0;
}

.custom-search-form {
    max-width: 1040px;
    margin: 0 auto;
    width: 100%;
}

.custom-search-input-group {
    max-width: 100%;
    position: relative;
    display: flex;
    align-items: center;

}

.custom-search-icon {
    position: absolute;
    left: 20px;
    color: #999;
    pointer-events: none;
    z-index: 2;
}

.custom-search-input {
    width: 100%;
    height: 50px;
    padding: 0 20px 0 55px;
    padding-left: 50px !important;
    font-size: 15px;
    color: #333;
    background: #ffffff;
    border: 1px solid #D9D9D9;
    border-radius: 20px !important;
    outline: none;
    transition: all 0.3s ease;
}

.custom-search-input:focus {
    border-color: #e0e0e0;
    border-style: solid;
    box-shadow: none;
}

/* Results Container */
.custom-search-results {
    max-width: 1040px;
    margin-top: 30px;
    margin: 0 auto;
}

/* Result Item */
.custom-result-item {
    display: flex;
    gap: 22px;
    padding: 28px 0;
    border-bottom: 1px solid #e5e5e5;
}

.custom-result-item:first-child {
    padding-top: 10px;
}

.custom-result-item:last-child {
    border-bottom: none;
}

/* Result Image */
.custom-result-image {
    flex-shrink: 0;
    width: 200px;
    height: 140px;
    overflow: hidden;
    border-radius: 6px;
    background: #f5f5f5;
}

.custom-result-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.custom-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.custom-result-image:hover img {
    transform: scale(1.05);
}

/* Result Content */
.custom-result-content {
    flex: 1;
    min-width: 0;
}

.custom-result-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.custom-result-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.custom-result-title a:hover {
    color: #0066cc;
}

.custom-result-excerpt {
    font-size: 15px;
    line-height: 1.65;
    color: #666;
    margin-bottom: 10px;
}

.custom-result-link {
    margin-top: 8px;
}

.custom-result-link a {
    font-size: 14px;
    color: #0066cc;
    text-decoration: none;
    word-break: break-all;
}

.custom-result-link a:hover {
    text-decoration: underline;
}

/* No Results */
.custom-no-results {
    text-align: center;
    padding: 50px 20px;
}

.custom-no-results-text {
    font-size: 17px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.custom-no-results-hint {
    font-size: 15px;
    color: #666;
    margin: 0;
}

/* Pagination */
.custom-search-pagination {
    margin-top: 50px;
    text-align: center;
}

.custom-search-pagination .pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.custom-search-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    color: #666;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.custom-search-pagination .page-numbers:hover {
    background: #0066cc;
    color: #ffffff;
    border-color: #0066cc;
}

.custom-search-pagination .page-numbers.current {
    background: #0066cc;
    color: #ffffff;
    border-color: #0066cc;
}

/* Hide default Astra elements */
.search .site-content > .ast-container {
    max-width: 100% !important;
    padding: 0;
}

.search #primary {
    width: 100%;
    margin: 0;
    padding: 0;
}

.search .ast-archive-description,
.search .page-header {
    display: none !important;
}


@media (max-width: 768px) {
    .custom-search-page {
        padding: 30px 0 50px;
    }
    
    .custom-search-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .custom-search-input {
        height: 48px;
        padding: 0 20px 0 48px;
        font-size: 15px;
    }
    
    .custom-search-icon {
        left: 18px;
        width: 16px;
        height: 16px;
    }
    
    .custom-result-item {
        flex-direction: column;
        gap: 15px;
        padding: 20px 0;
    }
    
    .custom-result-image {
        width: 100%;
        height: 200px;
    }
    
    .custom-result-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .custom-search-container {
        padding: 40px 20px 40px 20px;
    }
    
    .custom-search-title {
        font-size: 24px;
    }
    
    .custom-search-input {
        height: 44px;
        font-size: 14px;
    }
    
    .custom-result-title {
        font-size: 17px;
    }
    
    .custom-result-excerpt {
        font-size: 14px;
    }
}


/*   =============  CSS PAGE 404 ===================*/
/* Wrapper chính chiếm toàn bộ trang */
.error404 .site-content{
    width: 100%;
    max-width: 100%;
}
.error404 .site-content .ast-container{
    width: 100%;
    max-width: 100%;
    padding-left: 0px;
    padding-right: 0px;
}
.custom-404-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  justify-content: center;
  position: relative;
}

/* Nền và bố cục */
.custom-404-background {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 80px 100px;
  background: url('https://c.animaapp.com/mhoadtkxzmzXN8/img/frame-1000002465.png') center center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hình ảnh minh hoạ */
.custom-404-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Lớp phủ mờ */
.custom-404-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
}

/* Nội dung chính */
.custom-404-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
}

/* Văn bản */
.custom-404-text {
  text-align: center;
  color: white;
  max-width: 800px;
}

.custom-404-code {
  font-size: 120px;
  font-weight: 700;
  letter-spacing: -2.4px;
  line-height: 1.1;
  font-family: 'Poppins';
}

.custom-404-title {
  font-size: 36px;
  font-weight: 700;
  margin-top: 10px;
  font-family: 'Poppins';
}

.custom-404-description {
  font-size: 16px;
  font-weight: 400;
  margin-top: 10px;
  font-family: 'Poppins';
}

/* Nút trở về */
.custom-404-button {
  background: white;
  border: 1px solid #0f4173;
  border-radius: 20px;
  padding: 10px 20px;
}

.custom-404-button a {
  color: #0f4173;
  font-weight: 600;
  text-decoration: none;
  font-size: 16px;
  font-family: 'Poppins';
}
@media (max-width: 1024px) {
    .error404 .site-content .ast-container{
        padding-left: 0px;
        padding-right: 0px;
   }
  .custom-404-background {
    padding: 60px 60px;
  }

  .custom-404-code {
    font-size: 96px;
  }

  .custom-404-title {
    font-size: 30px;
  }

  .custom-404-description {
    font-size: 15px;
  }

  .custom-404-button {
    padding: 8px 18px;
  }

  .custom-404-button a {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
   .error404 .site-content .ast-container{
      padding-left: 0px !important;
      padding-right: 0px !important;
   }
  .custom-404-background {
    padding: 40px 30px;
    flex-direction: column;
  }

  .custom-404-code {
    font-size: 72px;
  }

  .custom-404-title {
    font-size: 24px;
  }

  .custom-404-description {
    font-size: 14px;
  }

  .custom-404-button {
    padding: 8px 16px;
  }

  .custom-404-button a {
    font-size: 14px;
  }
}
@media (max-width: 544px) {
    .error404 .site-content .ast-container{
      padding-left: 0px;
      padding-right: 0px;
   }
}

@media (max-width: 480px) {
   .error404 .site-content .ast-container{
      padding-left: 0px;
      padding-right: 0px;
   }
  .custom-404-background {
    padding: 30px 20px;
  }

  .custom-404-code {
    font-size: 56px;
  }

  .custom-404-title {
    font-size: 20px;
  }

  .custom-404-description {
    font-size: 13px;
  }

  .custom-404-button {
    padding: 6px 14px;
  }

  .custom-404-button a {
    font-size: 13px;
  }
}
/*   ============= END CSS PAGE 404 ===================*/
