/* === FILTERS === */
.hrappka-filters {
  display: flex;
  gap: 32px;
  margin: 36px 0 68px 0;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.hrappka-filter-job,
.hrappka-filter-city {
  position: relative;
  width: 340px;
  min-width: 220px;
}

/* === INPUTS & SELECTS === */
.hrappka-input {
  width: 100%;
  font-size: 1.25em;
  padding: 16px 45px 16px 25px;
  border-radius: 52px;
  border: 2.2px solid #e5e7ea;
  outline: none;
  color: #242a35;
  background: #fff;
  font-weight: 400;
  line-height: 1.15;
  box-sizing: border-box;
  transition: border .18s, box-shadow .13s;
  appearance: none;
}
.hrappka-input:focus {
  border-color: #153e7e;
  box-shadow: 0 0 0 3px #153e7e21;
}
.hrappka-input::placeholder {
  color: #b3b3b3;
  font-weight: 400;
  opacity: 1;
  font-style: normal;
  letter-spacing: .01em;
}
.hrappka-input option[value=""][disabled] {
  display: none !important;
}
.hrappka-input:required:invalid {
  color: #b3b3b3 !important;
}
.hrappka-input option {
  color: #06377B !important;
}
.hrappka-input[type="select"],
.hrappka-filter-city select.hrappka-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: none!important;
  background: #fff;
  padding-right: 52px;
}

/* === CLEAR BUTTON === */
.hrappka-clear-btn {
  display: none;
  position: absolute;
  right: 18px;
  top: 45%;
  transform: translateY(-48%);
  background: none;
  border: none;
  color: #cfd2d9;
  font-size: 2em;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  z-index: 10;
}
.hrappka-filter-job:not(.empty) .hrappka-clear-btn,
.hrappka-filter-city:not(.empty) .hrappka-clear-btn {
  display: block;
}

/* === FILTER BUTTON === */
.hrappka-filter-btn {
  border-radius: 52px;
  background: #123874;
  color: #fff;
  font-size: 1.11em;
  font-weight: 500;
  padding: 17px 56px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 1px 6px #2253a029;
  transition: background .16s;
  margin-left: 12px;
  width: 200px;
}
.hrappka-filter-btn:hover {
  /* background: #176cd9; */
}

/* === RESET BUTTON === */
.hrappka-reset-btn {
  border-radius: 52px;
  background: #fff;
  color: #123874;
  font-size: 1.06em;
  font-weight: 500;
  padding: 16px 40px;
  border: 2.5px solid #123874;
  /* margin-left: 22px; */
  cursor: pointer;
  font-family: inherit;
  transition: background .14s, color .19s;
  width: 200px;
}
.hrappka-reset-btn:hover {
  /* background: #f3f6fa; */
  /* color: #176cd9; */
}

/* === AUTOCOMPLETE === */
.hrappka-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e4e4e4;
  box-shadow: 0 2px 12px #12342409;
  z-index: 20;
  display: none;
  max-height: 240px;
  overflow-y: auto;
}
.hrappka-autocomplete .ac-opt {
  padding: 13px 22px;
  cursor: pointer;
  font-size: 1.08em;
  border-bottom: 1px solid #f2f2f2;
  transition: background .12s;
}
.hrappka-autocomplete .ac-opt:last-child {
  border-bottom: none;
}
.hrappka-autocomplete .ac-opt:hover {
  background: #f3f6fa;
}

/* === OFFER LIST === */
.hrappka-offers {
  display: flex;
  flex-direction: column;
  gap: 32px;
  justify-content: flex-start;
  background: #f5f6f8;
  margin: 0;
  padding-bottom: 44px;
  box-sizing: border-box;
}

/* === OFFER CARD + NEW TEMPLATE === */
.hrappka-offer-card {
    border-radius: 18px !important;
    box-shadow: 0 7px 7px #2e405f1a !important;
    border: none !important;
    background: #fff;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 24px 0 !important;
    box-sizing: border-box !important;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.18s, transform 0.13s;
}
.hrappka-offer-card-inner {
    padding: 34px 32px 30px 32px; 
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

/* === OFFER CARD TITLE === */
.hrappka-offer-title {
    font-size: 1.36em;
    font-weight: 700;
    color: #153e7e;
    margin-bottom: 8px;
}

/* === OFFER CARD SALARY === */
.hrappka-offer-salary {
    font-size: 1.1em;
    font-weight: 600;
    color: #18397c;
    margin-bottom: 22px;
}
.hrappka-offer-divider {
    margin: 19px 0 16px 0;
    border: none;
    border-top: 2px solid #e6e9ef;
    width: 100%;
}

/* === OFFER CARD DETAILS ROW === */
.hrappka-offer-details-row {
    display: flex;
    flex-direction: row;
    gap: 32px;
    align-items: center;
    margin-bottom: 25px;
}
.hrappka-offer-details-el {
    display: flex;
    align-items: center;
    font-size: 1.09em;
    color: #26356a;
    gap: 6px;
}
.hrappka-offer-details-icon {
    font-size: 1.35em;
    color: #153e7e;
    margin-right: 3px;
    display: flex;
    align-items: center;
}
.hrappka-offer-details-label {
    font-weight: 500;
}

/* === OFFER CARD BUTTONS ROW === */
.hrappka-offer-bottom-row, .hrappka-btn-row {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-top: 24px;
    justify-content: flex-start;
}
.hrappka-btn,
.hrappka-btn-main {
    border-radius: 38px;
    background: #11387c !important;
    color: #fff !important;
    font-size: 1.08em;
    font-weight: normal !important;
    padding: 15px 0;
    border: none;
    margin-right: 14px;
    box-shadow: 0 2px 6px #1e326c0f;
    transition: background .15s;
    width: 200px;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.hrappka-btn-main:hover {
    background: #FFF !important;
    outline: 2px solid #06377B;
    color: #06377B !important;
}
.hrappka-btn-outline {
    border-radius: 38px;
    background: #fff !important;
    color: #11387c !important;
    border: 2px solid #11387c !important;
    font-size: 1.06em;
    font-weight: 600;
    padding: 15px 0;
    width: 200px;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background .16s, color .15s;
}
.hrappka-btn-outline:hover {
    background: #06377B !important;
    color: #FFF !important;
}

/* === MOBILE OFFER CARD === */
@media (max-width: 700px) {
    .hrappka-offer-card-inner {
        padding: 26px 11px 26px 11px; 
    }
    .hrappka-offer-details-row {
        flex-direction: column;
        gap: 13px;
        align-items: flex-start;
        margin-bottom: 22px;
    }
    .hrappka-offer-bottom-row, .hrappka-btn-row {
        flex-direction: column;
        gap: 12px;
        margin-top: 20px;
    }
    .hrappka-btn, .hrappka-btn-main, .hrappka-btn-outline {
        width: 90% !important;
        padding: 15px 0;
        box-sizing: border-box;
        font-size: 1em;
    }
}

/* === PAGINATION === */
.hrappka-pagination {
    display: flex;
}
.hrappka-pagination ul .page-item {
    margin: 0 5px;
}
.hrappka-pagination ul .page-item a,
.hrappka-pagination ul .page-item .pg-ellipsis {
    border: none;
    border-radius: 25%;
    width: 32px;
    height: 32px;
    padding: 0;
    text-align: center;
    color: #06377B;
    background-color: #f7f7f7;
}
.hrappka-pagination ul .page-item .pg-ellipsis {
    border: none;
    background: none;
}
.hrappka-pagination ul .page-item.is-active a {
    background-color: #FFF;
    color: #06377B;
    border: 1px solid #06377B;
}
.hrappka-pagination-btn.pg-nav {
    border-radius: 50% !important;
    background-color: #06377B !important;
    width: 50px !important;
    height: 50px !important;
    margin-top: -10px;
    margin-left: 20px !important;
    margin-right: 20px !important;
}
.hrappka-pagination-btn.pg-nav:hover {
    border: 1px solid #06377B !important;
}

/* === SVG ARROWS FOR PAGINATION === */
.hrappka-pg-svg, .hrappka-pg-svg-left, .hrappka-pg-svg-right {
    display: inline-block;
    width: 34px;
    height: 34px;
    background: none !important;
}
.hrappka-pg-svg-left::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(135deg);
    position: absolute;
    top: 20px;
    right: 18px;
}
.hrappka-pg-svg-right::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg);
    position: absolute;
    top: 20px;
    left: 18px;
}

/* === FILTERS RESPONSIVE === */
@media (max-width: 700px) {
    .hrappka-filters {
        flex-direction: column;
        gap: 24px;
        margin: 18px 0 30px 0;
        align-items: stretch;
    }
    .hrappka-pagination { margin-top: 18px; }
    .hrappka-filter-btn,
    .hrappka-reset-btn,
    .hrappka-filter-job,
    .hrappka-filter-city {
        width: 90%;
        margin: 0 auto;
    }
}

/* === SLIDER === */
.hrappka-slider-root {
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    width: 95%;
    margin: 0 auto;
}
.hrappka-slider-track {
    display: flex;
    gap: 10px;
    box-sizing: border-box;
    padding-left: 5px;
    padding-right: 5px;
    transition: transform 1s cubic-bezier(.44,.09,.57,.96);
    will-change: transform;
}
.hrappka-slider-card {
    flex: 0 0 calc(50% - 5px);  /* desktop: idealnie, bo (50% - gap/2) + (50% - gap/2) + gap = 100% */
    max-width: calc(50% - 5px);
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
}

.hrappka-slider-card > .hrappka-offer-card {
    margin: 0 !important;
    box-sizing: border-box !important;
}

@media (max-width: 700px) {
    .hrappka-slider-track {
        gap: 5;
        padding-left: 2.5;
        padding-right: 2.5;
    }
    .hrappka-slider-card {
        flex: 0 0 100%;
        max-width: 100%;
        min-width: 0;
    }
}

.hrappka-slider-bottom-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 34px;
    width: 95%;
    margin: 36px auto 0 auto;
}
.hrappka-slider-progress-wrap {
    flex: 1 1 60%;
    position: relative;
    height: 7px;
    margin: 0;
    background: #e4e8fa;
    border-radius: 3px;
    overflow: hidden;
    min-width: 120px;
    max-width: 650px;
}
.hrappka-slider-progress {
    position: absolute;
    top: 0; left: 0;
    height: 7px;
    background: #153e7e;
    border-radius: 3px;
    width: 0%;
    transition: left 1s, width .22s;
}
.hrappka-slider-nav {
    display: flex;
    flex-direction: row;
    gap: 36px;
    align-items: center;
    justify-content: flex-end;
}
.hrappka-slider-nav button {
    border-radius: 50% !important;
    background-color: #06377B;
    width: 50px !important;
    height: 50px !important;
    margin-top: -10px;
    margin-left: 20px !important;
    margin-right: 20px !important;
    border: none;
    color: #fff;
    font-size: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s, border .15s;
    cursor: pointer;
    position: relative;
}

.hrappka-slider-nav button:hover {
    border: 1px solid #06377B !important;
}
.hrappka-slider-nav button:disabled {
    opacity: 1;
    color: #c2c2c2;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
}

/* Centrowanie strzałki tylko w sliderze */
.hrappka-slider-nav .hrappka-slider-arrow {
    display: block;
    width: 34px;
    height: 34px;
    position: relative;
    color: inherit;
    font-size: 2rem;
    pointer-events: none;
}

/* Lewa strzałka */
.hrappka-slider-nav .hrappka-slider-arrow-left::before {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%) rotate(135deg);
    width: 10px; height: 10px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    display: block;
}
/* Prawa strzałka */
.hrappka-slider-nav .hrappka-slider-arrow-right::before {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    width: 10px; height: 10px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    display: block;
}

/* Disabled arrows kolor */
.hrappka-slider-nav button:disabled .hrappka-slider-arrow-left::before,
.hrappka-slider-nav button:disabled .hrappka-slider-arrow-right::before {
    border-right: 2px solid #c2c2c2 !important;
    border-bottom: 2px solid #c2c2c2 !important;
}

/* === SLIDER MOBILE === */
@media (max-width: 700px) {
    .hrappka-slider-bottom-row { gap: 0; justify-content: center;}
    .hrappka-slider-progress-wrap, .hrappka-slider-progress, .hrappka-slider-bottom-row .hrappka-slider-progress-wrap {
        display: none !important;
        visibility: hidden;
        height: 0;
        width: 0;
    }
}

/* === OFFER DETAILS === */
.hrappka-offer-details * {
    font-family: 'Outfit', sans-serif;
    color: #06377B;
}

.hrappka-offer-details p .hrappka-btn {
    margin-top: 50px;
    color: #FFF;
    margin-left: 15px;
}

.hrappka-offer-details h2,
.hrappka-offer-details h1
{
    margin: 20px 0;
}

/* === MODAL === */
.hrappka-modal {
  position: fixed;
  z-index: 2000;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 600px;
  height: 100vh;
  background: #fff;
  box-shadow: -2px 0 24px rgba(0,0,0,.12);
  transform: translateX(100%);
  transition: transform 0.4s ease;
  display: flex;
  flex-direction: column;
}

.hrappka-modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.33); /* półprzezroczyste zaciemnienie */
  z-index: 1999; /* tuż pod modalem */
  pointer-events: auto;
}

.hrappka-modal.active {
  transform: translateX(0);
}

.hrappka-modal-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 100vh;
  padding: 100px 30px 0 30px;
  /* Dodajemy scroll wewnątrz modalu zamiast blokować cały body */
  overflow-y: auto;
}

.hrappka-modal-close {
  position: absolute;
  top: 14px;
  left: 24px;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  z-index: 2;
}

.hrappka-modal-iframe-wrap {
  flex: 1;
  /* Gwarantuje że iframe nigdy nie wychodzi poza modal, zawsze jest przewijalne razem z modalem */
  min-height: 400px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hrappka-modal-iframe-wrap iframe {
  flex: 1;
  width: 100%;
  min-height: 600px;
  border: none;
  /* Możesz dodać: */
  /* max-height: calc(100vh - 120px); */
}

.hrappka-modal-open {
  /* USUŃ overflow: hidden; jeśli chcesz scrollować body w tle, inaczej zostaw dla desktop */
  overflow: hidden;
}

@media (max-width: 800px) {
  .hrappka-modal {
    max-width: 100vw;
    width: 100vw;
    height: 100vh;
  }
  .hrappka-modal-content {
    padding: 100px 10px;
    min-height: 100vh;
  }
  .hrappka-modal-iframe-wrap iframe {
    min-height: 400px;
    height: 100vh;
  }
}

/* ========================================
   LOADER GIF
   ======================================== */

/* Loader container */
.hrappka-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    min-height: 300px;
}

.hrappka-loader img {
    width: 60px;
    height: 60px;
    display: block;
}

.hrappka-loader p {
    margin-top: 20px;
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

/* Ukryj loader po załadowaniu */
.hrappka-loader.hidden {
    display: none;
}

/* Efekt fade podczas ładowania ofert */
.hrappka-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Animacja fade-in dla ofert */
#hrappka-offers-container,
.hrappka-slider-container,
.hrappka-details-container {
    opacity: 0;
    transition: opacity 0.4s ease;
}

#hrappka-offers-container.loaded,
.hrappka-slider-container.loaded,
.hrappka-details-container.loaded {
    opacity: 1;
}