/* ==========================================
   📋 OFFERS-BASE.CSS - CZYSTE PODSTAWOWE STYLE OFERT
   ========================================== */

/* Variables są ładowane przez functions.php jako zależność */

/* ==========================================
   🔧 RESET ASTRY I POPRAWKA CENTROWANIA (WYSOKIE PRIORYTET)
   ========================================== */

/* Reset globalnych stylów Astry - używamy wyższej specyficzności zamiast !important */
body.page-template-oferty-pracy,
body.page-id-oferty-pracy,
body.page-template-default.page,
body.page {
    overflow-x: hidden;
}

/* Główny wrapper strony */
body.page-template-oferty-pracy #page,
body.page-template-oferty-pracy .site,
#page,
.site {
    overflow-x: hidden;
    max-width: 100%;
    margin: 0;
}

/* Reset kontenerów Astry - CRITICAL - używamy wyższej specyficzności */
body.page-template-oferty-pracy .ast-container,
body.page-template-oferty-pracy #content,
body.page-template-oferty-pracy .site-content,
body.page-template-oferty-pracy #primary,
body.page-template-oferty-pracy .content-area,
body.page-template-oferty-pracy .ast-separate-container .ast-container,
body.page-template-oferty-pracy .ast-plain-container .ast-container,
body.page-template-oferty-pracy .ast-page-builder-template .ast-container,
body.page-template-oferty-pracy .ast-box-layout.ast-separate-container .ast-container {
    max-width: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Usuń padding z entry-content */
body.page-template-oferty-pracy .entry-content {
    margin: 0;
    padding: 0;
    max-width: 100%;
}

/* Wyłącz box layout Astry */
body.page-template-oferty-pracy.ast-box-layout #page {
    max-width: 100%;
    margin: 0;
    box-shadow: none;
}

/* Ukryj sidebar - wysokie priorytet */
body.page-template-oferty-pracy #secondary,
body.page-template-oferty-pracy .ast-sidebar-wrap,
body.page-template-oferty-pracy .widget-area,
.page-template-oferty-pracy #secondary,
.page-template-oferty-pracy .ast-sidebar-wrap,
.page-template-oferty-pracy .widget-area {
    display: none;
}

/* ==========================================
   🏗️ PODSTAWY
   ========================================== */

/* Box sizing */
.portal-offers-container *,
.portal-offers-container *::before,
.portal-offers-container *::after {
    box-sizing: border-box;
}

/* ==========================================
   📦 GŁÓWNY KONTENER
   ========================================== */

.portal-offers-container {
    width: 100%;
    max-width: var(--container-max-width); /* 1400px - Global Container System */
    margin-left: auto;
    margin-right: auto;
    /* margin-bottom dziedziczony z .portal-page-container (Footer Spacing System v1.0) */
    padding: var(--container-padding); /* 20px - Global Container System */
    min-height: 100vh;
    position: relative;
    box-sizing: border-box;
}

/* Base styles (width, max-width, margin, padding, box-sizing) dziedziczone z .portal-page-container */
/* Margin-top automatycznie zarządzany przez Page Container System v1.0 */
/* Margin-bottom automatycznie zarządzany przez Footer Spacing System v1.0 (60px → responsive) */

/* ==========================================
   🎯 NAGŁÓWEK STRONY
   ========================================== */

/* Nagłówek dziedziczony z .hero-section w style.css (linia 206-274) */
/* Duplikaty usunięte - struktura ujednolicona */

.header-stats {
    display: flex;
    gap: var(--grid-gap-lg); /* 32px - Section Spacing System v1.0 */
    flex-wrap: wrap;
    align-items: center;
}

.stat-item {
    text-align: center;
    background: var(--bg-hover);
    padding: var(--card-padding-md); /* 20px - Shape & Sizing System v4.0 */
    border-radius: var(--radius-card); /* 12px */
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    min-width: 120px;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-inverse);
    margin-bottom: 5px;
}

.stat-label {
    font-size: var(--fs-sm);
    color: var(--text-inverse);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================
   🔍 SEKCJA WYSZUKIWANIA
   ========================================== */

.portal-search-section {
    background: var(--bg-card);
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    padding: var(--card-padding-lg); /* 30px */
    margin: 0 0 var(--section-spacing-md) 0; /* 32px - Section Spacing System v1.0 */
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.portal-search-section .container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.search-section-fullwidth {
    width: 100%;
}

.search-section-fullwidth h4 {
    margin: 0 0 var(--component-spacing-xs) 0; /* 8px - Section Spacing System v1.0 */
    color: var(--text-primary);
    font-size: var(--fs-lg);
    font-weight: 600;
}

.search-hint {
    margin: 0 0 var(--section-spacing-xs) 0; /* 16px - Section Spacing System v1.0 */
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    line-height: 1.5;
}

.search-input-container {
    position: relative;
    margin-bottom: var(--component-spacing-sm); /* 12px - Section Spacing System v1.0 */
}

.search-input-fullwidth {
    width: 100%;
    padding: var(--input-padding-y) 50px var(--input-padding-y) var(--card-padding-md); /* 10px 50px 10px 20px - Shape & Sizing System v4.0 */
    border: 2px solid var(--border-color);
    border-radius: var(--radius-input); /* 4px */
    font-size: var(--fs-base);
    background: var(--bg-input);
    color: var(--text-primary);
    transition: var(--transition);
}

.search-input-fullwidth:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.clear-search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: var(--fs-lg);
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full); /* Circle - Shape & Sizing System v4.0 */
    transition: var(--transition);
}

.clear-search-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.search-history,
.favorite-searches {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-input); /* 4px - Shape & Sizing System v4.0 */
    margin-top: var(--component-spacing-xs); /* 8px - Section Spacing System v1.0 */
    overflow: hidden;
}

.search-history-header,
.favorite-searches-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) var(--space-4); /* 8px 16px - Shape & Sizing System v4.0 */
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.clear-history-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: var(--fs-xs);
    cursor: pointer;
    text-decoration: underline;
}

.clear-history-btn:hover {
    color: var(--danger-color);
}

.search-history-items,
.favorite-searches-items {
    padding: 10px; /* Custom - Small list items padding */
}

.search-section {
    background: var(--bg-card);
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    padding: var(--card-padding-lg); /* 30px - Shape & Sizing System v4.0 */
    margin: -30px 20px 30px 20px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 10;
    border: 1px solid var(--border-color);
}

.search-form {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: var(--component-spacing-sm); /* 12px - Section Spacing System v1.0 */
    align-items: end;
}

.search-input-group {
    position: relative;
}

.search-input {
    width: 100%;
    padding: var(--input-padding-y) 50px var(--input-padding-y) var(--card-padding-md); /* 10px 50px 10px 20px - Shape & Sizing System v4.0 */
    border: 2px solid var(--border-color);
    border-radius: var(--radius-input); /* 4px */
    font-size: var(--fs-base);
    background: var(--bg-input);
    color: var(--text-primary);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: var(--fs-lg);
}

.btn-search {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: var(--btn-padding-lg); /* 16px 32px - Shape & Sizing System v4.0 */
    border-radius: var(--radius-button); /* 8px */
    font-size: var(--fs-base);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-search:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-filters {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: var(--btn-padding-lg); /* 16px 32px - Shape & Sizing System v4.0 */
    border-radius: var(--radius-button); /* 8px */
    font-size: var(--fs-base);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-filters:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-filters.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ==========================================
   📊 LAYOUT GŁÓWNY
   ========================================== */

.portal-offers-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    align-items: start;
    margin-top: 30px;
}

/* .portal-filters-sidebar base styles są zarządzane przez .portal-sidebar w components.css
   Offer-specific styles dla sidebara są w media queries poniżej (np. order: -1) */

.portal-offers-main {
    min-height: 600px;
}

.offers-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    align-items: start;
}

.offers-sidebar {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.offers-main {
    min-height: 600px;
}

/* ==========================================
   🎯 FILTRY SIDEBAR
   ========================================== */

.portal-filters-form {
    background: var(--bg-card);
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    padding: var(--card-padding-compact); /* 25px */
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.filters-header h3 {
    margin: 0;
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--text-primary);
}

.btn-reset {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: var(--fs-sm);
    cursor: pointer;
    text-decoration: underline;
    transition: var(--transition);
}

.btn-reset:hover {
    color: var(--danger-color);
}

.live-filtering-info {
    background: var(--info-bg);
    border: 1px solid var(--info-color);
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    padding: 12px; /* Custom - Info box compact padding */
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-icon {
    font-size: var(--fs-base);
    flex-shrink: 0;
}

.info-text {
    flex: 1;
}

.info-text strong {
    display: block;
    color: var(--text-primary);
    font-size: var(--fs-sm);
    margin-bottom: 2px;
}

.info-text small {
    color: var(--text-secondary);
    font-size: var(--fs-xs);
}

.active-filters-container {
    margin-bottom: 20px;
}

.save-filter-section {
    margin-bottom: 20px;
    text-align: center;
}

.save-filter-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.save-filter-btn:hover {
    background: var(--success-color-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.filter-section {
    margin-bottom: 25px;
}

.filter-section h4 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-size: var(--fs-base);
    font-weight: 600;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
}

.filter-field {
    margin-bottom: 15px;
}

.filter-field label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-primary);
    font-size: var(--fs-sm);
    font-weight: 500;
}

.filter-field input,
.filter-field select {
    width: 100%;
    padding: 10px 12px; /* Custom - Form input compact padding */
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: var(--fs-sm);
    transition: var(--transition);
    min-height: 44px;
    line-height: 1.5;
}

.filter-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.filter-field input:focus,
.filter-field select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.city-autocomplete {
    position: relative;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 0; /* Custom - Vertical-only spacing */
    transition: var(--transition);
}

.checkbox-label:hover {
    background: var(--bg-hover);
    border-radius: var(--radius-sm); /* 4px - Shape & Sizing System v4.0 */
    padding-left: 8px;
    margin-left: -8px;
    padding-right: 8px;
    margin-right: -8px;
}

.checkbox-box {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 3px; /* Custom - checkbox (między xs 2px a sm 4px) */
    background: var(--bg-input);
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-box {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-box::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
        font-size: var(--fs-xs);
    font-weight: bold;
}

.checkbox-label span:last-child {
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    transition: var(--transition);
}

.checkbox-label:hover span:last-child {
    color: var(--text-primary);
}

.salary-range {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
        gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.salary-range span {
    text-align: center;
    color: var(--text-muted);
    font-weight: 600;
}

.salary-type-section {
    margin-top: 15px;
}

.salary-type-label {
    margin: 0 0 10px 0;
    color: var(--text-primary);
    font-size: var(--fs-sm);
    font-weight: 500;
}

.salary-type-checkboxes {
    display: flex;
    gap: 15px;
}

.advanced-filters {
    margin-top: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    overflow: hidden;
}

.advanced-filters summary {
    background: var(--bg-secondary);
    padding: var(--input-padding-x); /* 15px */
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.advanced-filters summary:hover {
    background: var(--bg-hover);
}

.advanced-filters[open] summary {
    border-bottom: 1px solid var(--border-color);
}

#advanced-filters {
    padding: var(--card-padding-md); /* 20px - Shape & Sizing System v4.0 */
    background: var(--bg-card);
}

.tooltip-wrapper {
    position: relative;
}

.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-dark);
    color: white;
    padding: 8px 12px; /* Custom - Tooltip compact spacing */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    font-size: var(--fs-xs);
    white-space: nowrap;
        opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    margin-bottom: 5px;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--bg-dark);
}

.tooltip-wrapper:hover .tooltip {
        opacity: 1;
    visibility: visible;
}

.filters-container {
    background: var(--bg-card);
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    padding: var(--card-padding-compact); /* 25px */
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.filters-header h3 {
    margin: 0;
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--text-primary);
}

.btn-clear-filters {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: var(--fs-sm);
    cursor: pointer;
    text-decoration: underline;
    transition: var(--transition);
}

.btn-clear-filters:hover {
    color: var(--danger-color);
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: var(--fs-sm);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0; /* Custom - Vertical-only spacing */
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.filter-option label {
    flex: 1;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    margin: 0;
}

.filter-count {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: var(--badge-padding-xs); /* 2px 6px - Shape & Sizing System v4.0 */
    border-radius: var(--radius-badge); /* Pill shape - Shape & Sizing System v4.0 */
}

/* ==========================================
   📊 SEKCJA WYNIKÓW
   ========================================== */

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 20px; /* Custom - Header responsive padding */
    background: var(--bg-card);
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 15px;
}

.results-info {
    color: var(--text-secondary);
    font-size: var(--fs-sm);
}

#liczba-ofert {
    font-weight: 600;
    color: var(--text-primary);
}

.view-controls {
    display: flex;
    gap: 10px;
}

.tryb-btn {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: var(--btn-padding-sm); /* 8px 16px - Shape & Sizing System v4.0 */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    font-size: var(--fs-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.tryb-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.tryb-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ==========================================
   📋 LISTA OFERT
   ========================================== */

.offers-list {
    display: flex;
    flex-direction: column;
        gap: 20px;
    }

#oferty-lista {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.offer-card {
    background: var(--bg-card);
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    padding: var(--card-padding-compact); /* 25px */
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.offer-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.offer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 20px;
}

.offer-title {
    flex: 1;
}

.offer-title h3 {
    margin: 0 0 8px 0;
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--text-primary);
}

.offer-title h3 a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.offer-title h3 a:hover {
    color: var(--accent-color);
}

.offer-company {
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    margin-bottom: 5px;
}

.offer-location {
    color: var(--text-muted);
    font-size: var(--fs-sm);
    display: flex;
    align-items: center;
    gap: 5px;
}

.offer-salary {
    text-align: right;
    background: var(--info-bg);
    padding: 15px 20px; /* Custom - Salary box responsive padding */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    border: 1px solid var(--info-color);
    min-width: 180px;
}

.salary-amount {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 3px;
}

.salary-details {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.offer-meta {
    display: flex;
    flex-wrap: wrap;
        gap: 15px;
    margin-bottom: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: var(--fs-sm);
    color: var(--text-secondary);
}

.offer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 4px 10px; /* Custom - Tag compact spacing */
    border-radius: var(--radius-sm); /* 4px - Shape & Sizing System v4.0 */
    font-size: var(--fs-xs);
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.offer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
}

.offer-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-muted);
}

.offer-buttons {
    display: flex;
    gap: 10px;
}

.btn-details {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px; /* Custom - Button responsive padding */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
        font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-details:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    color: white;
}

.btn-favorite {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: var(--input-padding) /* 10px 15px - Shape & Sizing System v5.0 */;
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    cursor: pointer;
    transition: var(--transition);
    font-size: var(--fs-md);
}

.btn-favorite:hover {
    color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-favorite.favorited {
    color: var(--danger-color);
    background: var(--error-bg);
    border-color: var(--danger-color);
}

/* ==========================================
   📄 PAGINACJA
   ========================================== */

.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination a,
.pagination span {
    padding: 12px 16px; /* Custom - Pagination button spacing */
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    transition: var(--transition);
    font-weight: 500;
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ==========================================
   📱 RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 1200px) {
    .portal-offers-container {
        max-width: 95%; /* Global Responsive Pattern - zgodne z front-page */
        padding: 0; /* Pełna szerokość - zgodne z navbar/footer pattern */
        /* margin dziedziczony z .portal-page-container (Page Container + Footer Spacing System) */
    }
    
    .offers-layout {
        grid-template-columns: 300px 1fr;
        gap: 25px;
    }
    
    .search-section {
        margin: -25px 15px 25px 15px;
        padding: var(--card-padding-compact); /* 25px */
    }
}

/* Tablet landscape - zgodność z Global Responsive Pattern */
@media (max-width: 1024px) {
    .portal-offers-container {
        max-width: 96%; /* Global Responsive Pattern - zgodne z front-page */
    }
}

@media (max-width: 992px) {
    .portal-offers-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .portal-filters-sidebar {
        /* position: static i max-height: none są zarządzane przez .portal-sidebar w components.css */
        order: -1; /* Offer-specific: sidebar pojawia się przed ofertami w layout */
    }
    
    .offers-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .offers-sidebar {
        position: static;
        max-height: none;
    }
    
    .filters-container {
        margin-bottom: 20px;
    }
    
    .search-form {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .btn-search,
    .btn-filters {
        width: 100%;
        justify-content: center;
    }
    
    .header-stats {
        justify-content: center;
        width: 100%;
    }
    
    .results-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .view-controls {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .portal-offers-container {
        max-width: 98%; /* Global Responsive Pattern - zgodne z front-page */
        padding: 0; /* Pełna szerokość - zgodne z navbar/footer pattern */
        /* margin dziedziczony z .portal-page-container (Page Container + Footer Spacing System) */
    }
    
    .portal-offers-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .portal-offers-header {
        padding: 40px 20px;
    }
    
    .portal-action-bar {
        padding: 15px 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .portal-breadcrumbs {
        font-size: 13px;
    }
    
    .portal-user-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .portal-filters-sidebar {
        /* margin-bottom jest zarządzany przez .portal-sidebar w components.css */
        order: -1; /* Offer-specific: sidebar pojawia się przed ofertami w layout */
    }
    
    .results-header {
        flex-direction: column;
        gap: 15px;
        padding: var(--input-padding-x);
    }
    
    .view-controls {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .portal-offers-container {
        max-width: 100%; /* Global Responsive Pattern - pełna szerokość na mobile */
        padding: 0; /* Pełna szerokość - zgodne z navbar/footer pattern */
    }
    
    .portal-offers-header {
        padding: 30px 15px;
    }
    
    .portal-offers-header h1 {
        font-size: 24px;
    }
}

@media (max-width: 380px) {
    .portal-offers-container {
        max-width: 100%; /* Global Responsive Pattern - pełna szerokość */
        padding: 0; /* Pełna szerokość - zgodne z navbar/footer pattern */
    }
    
    .portal-offers-header h1 {
        font-size: 22px;
    }
    
    .btn-add-offer,
    .btn-panel,
    .btn-login,
    .btn-register {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* ==========================================
   🎨 LOADING STATES
   ========================================== */

.offers-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    flex-direction: column;
    gap: 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: var(--radius-full); /* Circle - Shape & Sizing System v4.0 */
    animation: spin 1s linear infinite;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: var(--radius-full); /* Circle - Shape & Sizing System v4.0 */
    animation: spin 1s linear infinite;
}

.loading-spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: var(--radius-full); /* Circle - Shape & Sizing System v4.0 */
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-secondary);
        font-size: var(--fs-base);
}

#loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px; /* Custom - Large vertical spacing for loading */
    flex-direction: column;
    gap: 15px;
}

#loading-spinner p {
    color: var(--text-secondary);
        font-size: var(--fs-sm);
    margin: 0;
}

.infinite-end {
    text-align: center;
    padding: 40px 20px; /* Custom - Large vertical spacing for end message */
    color: var(--text-secondary);
}

.infinite-end p {
    margin-bottom: 20px;
    font-size: var(--fs-base);
}

.btn-back-top {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: var(--btn-padding-md); /* 12px 24px - Shape & Sizing System v4.0 */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-back-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.error-message {
    text-align: center;
    padding: 40px 20px; /* Custom - Large vertical spacing for error */
    color: var(--danger-color);
    background: var(--error-bg);
    border: 1px solid var(--danger-color);
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    margin: 20px 0;
}

.error-message p {
    margin-bottom: 20px;
    font-size: var(--fs-base);
}

.btn-retry {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: var(--btn-padding-md); /* 12px 24px - Shape & Sizing System v4.0 */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-retry:hover {
    background: var(--danger-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-load-more {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 30px; /* Custom - Load more button larger padding */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    font-size: var(--fs-base);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: block;
    margin: 30px auto;
    min-width: 200px;
}

.btn-load-more:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#filter-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    padding: 20px 30px; /* Custom - Loading modal balanced padding */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--border-color);
}

#filter-loading span {
    color: var(--text-primary);
    font-size: var(--fs-sm);
    font-weight: 500;
}

/* ==========================================
   ❌ EMPTY STATES
   ========================================== */

.offers-empty {
    text-align: center;
    padding: 60px 20px; /* Custom - Hero section large vertical spacing */
    color: var(--text-secondary);
}

.offers-empty h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: var(--fs-h3);
}

.offers-empty p {
    margin-bottom: 30px;
    font-size: var(--fs-base);
    line-height: 1.6;
}

.btn-clear-all-filters {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: var(--btn-padding-md); /* 12px 24px - Shape & Sizing System v4.0 */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    font-size: var(--fs-base);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-clear-all-filters:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==========================================
   🗺️ SEKCJA MAPY
   ⚠️ MAP STYLES MOVED TO offers-map.css
   All .portal-map-section, .map-header, .map-actions styles
   are now in offers-map.css to avoid conflicts.
   Only side panel styles remain below.
   ========================================== */

.offer-side-panel {
    position: absolute;
    top: 0;
    right: -350px;
    width: 350px;
    min-height: 600px;
    max-height: 100vh;
    background: var(--bg-card);
    box-shadow: -4px 0 20px rgba(0,0,0,0.2);
    z-index: 1001;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: var(--radius-card) 0 0 var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    overflow: hidden;
    pointer-events: none;
}

.offer-side-panel.open {
    right: 0;
    pointer-events: auto;
}

.panel-header {
    padding: 15px 20px; /* Custom - Panel header responsive padding */
    background: var(--primary-gradient);
    color: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    margin: 0;
    font-size: var(--fs-base);
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-header h3::before {
    content: '📋';
    font-size: var(--fs-md);
}

.close-panel-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: var(--fs-md);
    cursor: pointer;
    padding: 8px 12px; /* Custom - Close button compact spacing */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    transition: var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-panel-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: scale(1.1);
}

.panel-content {
    padding: var(--input-padding-x); /* 15px */
    height: calc(100% - 60px);
    overflow-y: auto;
    color: var(--text-primary);
}

/* ==========================================
   📋 ZAWARTOŚĆ PANELU BOCZNEGO
   ========================================== */

.offer-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.offer-details h4 {
    margin: 0 0 10px 0;
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.offer-details h4 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.offer-details h4 a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.offer-detail-section {
    background: var(--bg-secondary);
    padding: 12px; /* Custom - Detail section compact padding */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    border: 1px solid var(--border-color);
}

.offer-detail-section h5 {
    margin: 0 0 8px 0;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.offer-detail-section p {
    margin: 0;
    font-size: var(--fs-sm);
    color: var(--text-primary);
    font-weight: 500;
}

.driving-license {
    background: var(--info-bg);
    color: var(--primary-color);
    padding: 8px 12px; /* Custom - Badge compact spacing */
    border-radius: var(--radius-sm); /* 4px - Shape & Sizing System v4.0 */
    font-weight: 600;
    display: inline-block;
}

.salary {
    background: var(--success-bg);
    color: var(--success-color);
    padding: 6px 10px; /* Custom - Salary badge compact */
    border-radius: var(--radius-sm); /* 4px - Shape & Sizing System v4.0 */
    font-weight: 600;
    font-size: var(--fs-base);
    display: inline-block;
}

.location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.location::before {
    content: '📍';
    font-size: var(--fs-base);
}

.company {
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 5px;
}

.offer-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.offer-actions .btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 16px; /* Custom - Action button balanced spacing */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.offer-actions .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    color: white;
}

.offer-actions .btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 16px; /* Custom - Secondary button balanced spacing */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.offer-actions .btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.panel-placeholder {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 20px; /* Custom - Placeholder large vertical spacing */
}

.panel-placeholder i {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.panel-placeholder p {
    margin: 0;
    font-size: var(--fs-base);
}

.map-controls {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    padding: var(--card-padding-md); /* 20px - Shape & Sizing System v4.0 */
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.map-controls-left,
.map-controls-center,
.map-controls-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.map-controls-center {
    justify-content: center;
}

.map-controls-right {
    justify-content: flex-end;
}

.map-controls-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: var(--fs-sm);
    color: var(--text-primary);
}

.checkbox-box {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-radius: 3px; /* Custom - checkbox (między xs 2px a sm 4px) */
    background: var(--bg-input);
    position: relative;
    transition: var(--transition);
}

.control-help {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin: 0;
}

.area-mode-btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: var(--btn-padding-sm); /* 8px 16px - Shape & Sizing System v4.0 */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    font-size: var(--fs-sm);
    cursor: pointer;
    transition: var(--transition);
}

.area-mode-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-strong);
}

.offers-map {
    position: relative;
    min-height: 500px;
    background: var(--bg-tertiary);
}

.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-secondary);
}

.map-loading .spinner {
    margin: 0 auto 15px auto;
}

.map-loading p {
    margin: 0;
    font-size: var(--fs-sm);
}

.filter-save-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-save-modal.show {
    display: flex;
    opacity: 1;
}

.filter-save-content {
    background: var(--bg-card);
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    padding: var(--card-padding-lg); /* 30px - Shape & Sizing System v4.0 */
    max-width: 400px;
    width: 90%;
    position: relative;
    border: 1px solid var(--border-color);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    font-size: var(--fs-lg);
    cursor: pointer;
    color: var(--text-primary);
    padding: 8px 12px; /* Custom - Modal close button compact */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    transition: var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.close-modal:hover {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
    transform: scale(1.1);
}

.filter-save-content h3 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: var(--fs-lg);
    font-weight: 600;
}

.filter-save-content input {
    width: 100%;
    padding: 12px 15px; /* Custom - Modal input balanced padding */
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: var(--fs-base);
    margin-bottom: 20px;
    transition: var(--transition);
}

.filter-save-content input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-save-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.filter-save-cancel,
.filter-save-confirm {
    padding: 10px 20px; /* Custom - Modal button responsive padding */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-save-cancel {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.filter-save-cancel:hover {
    background: var(--bg-hover);
}

.filter-save-confirm {
    background: var(--success-color);
    color: white;
    border: 1px solid var(--success-color);
}

.filter-save-confirm:hover {
    background: var(--success-color-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* ==========================================
   🌙 DARK MODE COMPATIBILITY
   ========================================== */

/* Wszystkie style używają zmiennych CSS więc automatycznie obsługują dark mode */

/* Sekcja informacyjna */
.portal-info-section {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: var(--transition-theme);
}

.portal-info-section h2 {
    color: var(--text-primary);
}

.info-card {
    transition: var(--transition-theme);
}

.info-card:hover {
    background: var(--bg-hover);
}

.info-text {
    color: var(--text-secondary);
}

/* Mapa */
.offers-map {
    border-color: var(--border-color);
    background: var(--bg-tertiary);
}

.map-controls {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

/* Zapisane filtry */
.saved-filter-item {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: var(--transition-theme);
}

.saved-filter-item:hover {
    background: var(--bg-hover);
}

/* ==========================================
   📝 UWAGA: Style dla strony DLA-FIRM przeniesione
   ========================================== */

/* Style dla strony dla-firm.php zostały przeniesione do:
 * assets/css/company-page.css
 * 
 * Powód: Strona dla-firm będzie przerabiana w przyszłości
 * i potrzebuje dedykowanego, niezależnego CSS.
 */