/* Base */
body {
  background-color: #f8f9fa;
}

/* =====================
   TOP SEARCH BAR
===================== */
.top-search-bar {
  background-color: #2f2e45;
  padding: 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.top-search-bar input,
.top-search-bar select {
  height: 38px;
  border-radius: 6px;
  border: none;
  padding: 0 10px;
  font-size: 0.9rem;
}
.top-search-bar select{
  width: 200px;
}

/* Prevent width jump */
.top-search-bar input {
  flex: 1;
  min-width: 220px;
}

.search-btn {
  background-color: #be201c;
  color: #fff;
  width: 42px;
  height: 38px;
  border-radius: 6px;
  border: none;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.search-btn:hover {
  background-color: #a81815;
}

/* =====================
   FILTER SIDEBAR
===================== */
.filter-sidebar {
  background-color: #2f2e45;
  color: #fff;
  border-radius: 10px;
}

/* Clear button */
.btn-clear {
  background-color: #1c1b2e;
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 20px;
  border: none;
}

/* Filter cards */
.filter-section {
  background-color: #fff;
  color: #333;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.filter-title {
  border-bottom: 1px solid #d9a758;
  margin-bottom: 8px;
  padding-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.filter-section label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
}

/* Chevron animation */
.filter-title i {
  transition: transform 0.25s ease;
  transform: rotate(180deg);
}
.filter-title.collapsed i {
  transform: rotate(0deg);
}

/* =====================
   JOB CARDS
===================== */
.job-card-custom {
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.job-card-custom:hover {
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.job-card-custom h5 {
  font-size: 1.15rem;
}

.job-card-custom .collapse {
  font-size: 0.9rem;
  color: #333;
}

.job-card-custom .toggle-details {
  font-weight: 500;
  font-size: 0.85rem;
}

/* Normalize buttons inside cards */
.job-card-custom .btn {
  padding: 4px 12px;
  font-size: 0.8rem;
  line-height: 1.2;
}

/* =====================
   SHARE CARD
===================== */
.job-share-card {
  background-color: #fff;
  border-left: 4px solid #be201c;
  border-radius: 10px;
  transition: box-shadow 0.25s ease;
}

.job-share-card:hover {
  box-shadow: 0 0 1rem rgba(0, 0, 0, 0.1);
}

.job-share-card h6 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.job-share-card p {
  margin: 0.4rem 0;
}

#shareFallbackContainer .btn {
  font-size: 0.8rem;
  padding: 5px 10px;
}

/* =====================
   COPY FEEDBACK
===================== */
.copy-confirmation {
  font-size: 0.75rem;
  color: #28a745;
}
p, .job-card-custom li {
    text-align: justify;
    margin-left: 20px;
}
.modal-dialog-scrollable {
    height: calc(78% - var(--bs-modal-margin) * 2);
}
/* =====================
   MOBILE
===================== */
@media (max-width: 768px) {
  .top-search-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .top-search-bar input,
  .top-search-bar select {
    width: 100%;
    font-size: 0.9rem;
  }
  .top-search-bar input {
    flex: none;
  }

  /* IMPORTANT: no full-width search button */
  .search-btn {
    width: 42px;
    align-self: flex-end;
  }

  .job-card-custom h5 {
    font-size: 1rem;
  }

  /* .job-card-custom .text-end {
    text-align: left !important;
    margin-top: 8px;
  } */

  #activeFilters {
    font-size: 0.8rem;
    gap: 4px;
  }
}
/* =====================
   BASE STYLES
===================== */
body {
  background-color: #f8f9fa;
}

/* =====================
   FILTER SECTION STYLES
===================== */
.filter-section {
  background-color: #fff;
  padding: 15px;
  margin-bottom: 16px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Light shadow */
  transition: box-shadow 0.3s ease;
}

.filter-section:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Darker shadow on hover */
}

.filter-title {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #312f45; /* Bottom border for separation */
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: color 0.3s ease;
}

.filter-title i {
  transition: transform 0.3s ease, color 0.3s ease;
}

.filter-title[aria-expanded="true"] i {
  transform: rotate(180deg); /* Rotate chevron when expanded */
  color: #be201c;
}

/* Filter input label styling */
.filter-section label {
  font-size: 0.9rem;
  margin-bottom: 6px;
  display: block;
  cursor: pointer;
}

.filter-count {
  font-size: 0.75rem;
  color: #888;
}

/* =====================
   BUTTON STYLES
===================== */
.clear-filters-btn {
  background-color: #be201c;
  color: white;
  
  padding: 12px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.3s ease;
  border: none;
}

.clear-filters-btn:hover {
  background-color: #a81815; /* Darker color on hover */
}

.btn-close {
  background-color: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
}

/* =====================
   MODAL STYLES
===================== */
#filterModal .modal-content {
  height: 75vh !important;
  border-radius: 10px;
  background-color: #312f45;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1); /* Modal shadow */
}

#filterModal .modal-header {
  background: linear-gradient(135deg, #be201c, #d9a758); /* Gradient header */
  color: white;
  border-bottom: 2px solid #fff;
}

#filterModal .modal-body {
  overflow-y: auto;
  padding: 15px;
  background-color: #fafafa;
}

#filterModal .modal-title {
  font-size: 1.25rem;
  font-weight: bold;
}

#filterModal .modal-dialog {
  margin-top: 10% !important;
  margin-bottom: 10% !important;
  width: 95% !important;
  height: 80% !important;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (max-width: 768px) {
  #filterModal .modal-dialog {
    margin-top: 10% !important;
    margin-bottom: 10% !important;
  }

  .filter-section {
    padding: 10px;
    margin-bottom: 16px;
  }

  .filter-title {
    font-size: 1rem;
  }

  .filter-title i {
    font-size: 1.2rem;
  }

  .clear-filters-btn {
    padding: 10px;
    width: 70%;
  }
}
/* Chevron Icon Rotation */
.filter-title i {
    transition: transform 0.3s ease, color 0.3s ease;
    transform: rotate(0deg); /* Chevron points right when collapsed */
    color: #6c757d; /* Default color when collapsed */
}

.filter-title[aria-expanded="true"] i {
    transform: rotate(180deg); /* Chevron points down when expanded */
    color: #be201c; /* Color when expanded */
}

/* Collapsible Behavior */
.collapse {
    display: none; /* Hidden by default */
}

.collapse.show {
    display: block; /* Display when expanded */
}

/* Ensure the chevron points right when the section is collapsed by default */
.filter-title[aria-expanded="false"] i {
    transform: rotate(0deg);
    color: #6c757d;
}



/* ===== Pagination Container ===== */
.pagination {
    display: flex;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* ===== Page Items ===== */
.pagination .page-item {
    margin: 0;
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2f2e45;
    background-color: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* ===== Hover Effect ===== */
.pagination .page-item:not(.disabled):not(.active) .page-link:hover {
    color: #fff;
    background-color: #be201c;
    border-color: #be201c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(190, 32, 28, 0.3);
}

/* ===== Active Page ===== */
.pagination .page-item.active .page-link {
    color: #fff;
    background: linear-gradient(135deg, #be201c 0%, #a81815 100%);
    border-color: #be201c;
    box-shadow: 0 4px 16px rgba(190, 32, 28, 0.4);
    transform: scale(1.05);
    z-index: 2;
}

/* ===== Disabled State ===== */
.pagination .page-item.disabled .page-link {
    color: #adb5bd;
    background-color: #f8f9fa;
    border-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}

/* ===== Navigation Arrows ===== */
.pagination .page-link i {
    font-size: 0.875rem;
}

/* Prev/Next buttons get special styling */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.pagination .page-item:first-child:not(.disabled) .page-link:hover,
.pagination .page-item:last-child:not(.disabled) .page-link:hover {
    background-color: #2f2e45;
    border-color: #2f2e45;
    color: #fff;
}

/* ===== Focus State (Accessibility) ===== */
.pagination .page-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(190, 32, 28, 0.25);
    z-index: 3;
}

/* ===== Ripple Effect on Click ===== */
.pagination .page-link::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.pagination .page-link:active::after {
    width: 100px;
    height: 100px;
}

/* ===== Page Info Text ===== */
.pagination-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.pagination-info strong {
    color: #2f2e45;
    margin: 0 4px;
}

/* ===== Mobile Responsiveness ===== */
@media (max-width: 767.98px) {
    .pagination {
        gap: 6px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination .page-link {
        min-width: 36px;
        height: 36px;
        padding: 6px 10px;
        font-size: 0.875rem;
    }

    /* Hide some page numbers on mobile, keep only a few */
    .pagination .page-item:not(.active):not(:first-child):not(:last-child):not(:nth-child(2)):not(:nth-last-child(2)) {
        display: none;
    }
}

@media (max-width: 576px) {
    .pagination {
        gap: 4px;
    }

    .pagination .page-link {
        min-width: 32px;
        height: 32px;
        padding: 4px 8px;
        font-size: 0.8rem;
        border-radius: 6px;
    }

    .pagination .page-link i {
        font-size: 0.75rem;
    }
}

/* ===== Desktop Pagination Specific ===== */
#pagination-desktop .pagination {
    margin-bottom: 2rem;
}

/* ===== Load More Button (Mobile) ===== */
#pagination .load-more-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 1.5rem auto;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #be201c 0%, #a81815 100%);
    border: none;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(190, 32, 28, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

#pagination .load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(190, 32, 28, 0.4);
    background: linear-gradient(135deg, #a81815 0%, #8f1412 100%);
}

#pagination .load-more-btn:active {
    transform: translateY(0);
}

#pagination .load-more-btn:disabled {
    background: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
    box-shadow: none;
}

/* ===== Animation ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pagination .page-item {
    animation: fadeIn 0.3s ease;
}

/* ===== Ellipsis for skipped pages ===== */
.pagination .page-item.ellipsis {
    pointer-events: none;
}

.pagination .page-item.ellipsis .page-link {
    background: transparent;
    border: none;
    color: #6c757d;
    cursor: default;
}

.pagination .page-item.ellipsis .page-link:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
}