/* Ogloszenia i Rekrutacja - v1.4.1 */

.ogloszenia-container,
.rekrutacja-container {
    max-width: 100%;
    margin: 20px 0;
}

/* Single view - reset */
.ogloszenia-container.single-view,
.rekrutacja-container.single-view {
    margin: 0;
}
.single-view .ogloszenie-item,
.single-view .rekrutacja-item {
    margin-bottom: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

/* Karty */
.ogloszenie-item,
.rekrutacja-item {
    margin-bottom: 30px;
    padding: 24px;
    border: 1px solid #d5d5e0;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 1px 3px rgba(46, 45, 99, 0.08);
    position: relative;
    overflow: hidden;
}

/* Tytuly */
.ogloszenie-title,
.rekrutacja-title {
    color: #2E2D63;
    font-size: 24px !important;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2E2D63;
    font-family: inherit;
}

/* Header - tytul + przycisk w linii */
.ogloszenie-header,
.rekrutacja-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.rekrutacja-header .rekrutacja-title {
    margin-bottom: 0;
    padding-bottom: 10px;
    flex: 1;
}

/* Przycisk APLIKUJ */
.aplikuj-btn-small {
    display: inline-block;
    background: #2E2D63;
    color: #fff !important;
    text-decoration: none !important;
    padding: 8px 20px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s ease, border-color 0.2s ease;
    border: 2px solid #2E2D63;
    margin-left: 15px;
    flex-shrink: 0;
}
.aplikuj-btn-small:hover {
    background: #3d3c7a;
    border-color: #3d3c7a;
    color: #fff !important;
    text-decoration: none !important;
}

/* Tresc */
.ogloszenie-content,
.rekrutacja-content {
    line-height: 1.6;
    margin-bottom: 15px;
    font-family: inherit;
}
.content-preview {
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.content-preview.collapsed {
    position: relative;
}
.content-preview.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(transparent, #fff);
    pointer-events: none;
}
.content-preview.expanded::after {
    display: none;
}

/* Zalaczniki */
.ogloszenie-attachments,
.rekrutacja-attachments,
.tassel-attachments {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #d5d5e0;
}
.single-view .ogloszenie-attachments,
.single-view .rekrutacja-attachments {
    margin-top: 30px;
    padding: 20px 0;
    border-top: 2px solid #2E2D63;
}
.ogloszenie-attachments h4,
.rekrutacja-attachments h4,
.tassel-attachments h4 {
    color: #2E2D63;
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 700;
    font-family: inherit;
}
.ogloszenie-attachments p,
.rekrutacja-attachments p,
.tassel-attachments p {
    margin: 5px 0;
}
.ogloszenie-attachments a,
.rekrutacja-attachments a,
.tassel-attachments a {
    color: #2E2D63;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}
.ogloszenie-attachments a:hover,
.rekrutacja-attachments a:hover,
.tassel-attachments a:hover {
    border-bottom-color: #4CAF50;
    color: #2E2D63;
}

/* Attachment file type icons */
.att-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
}
.att-link::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 24px;
    flex-shrink: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}
.att-link.file-pdf::before {
    content: '';
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32' fill='none'%3E%3Cpath d='M0 2a2 2 0 012-2h14l8 8v22a2 2 0 01-2 2H2a2 2 0 01-2-2V2z' fill='%23E53E3E'/%3E%3Cpath d='M14 0l8 8h-6a2 2 0 01-2-2V0z' fill='%23FC8181'/%3E%3Ctext x='12' y='23' text-anchor='middle' fill='white' font-size='9' font-weight='700' font-family='sans-serif'%3EPDF%3C/text%3E%3C/svg%3E");
}
.att-link.file-word::before {
    content: '';
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32' fill='none'%3E%3Cpath d='M0 2a2 2 0 012-2h14l8 8v22a2 2 0 01-2 2H2a2 2 0 01-2-2V2z' fill='%232B6CB0'/%3E%3Cpath d='M14 0l8 8h-6a2 2 0 01-2-2V0z' fill='%2390CDF4'/%3E%3Ctext x='12' y='23' text-anchor='middle' fill='white' font-size='8' font-weight='700' font-family='sans-serif'%3EDOC%3C/text%3E%3C/svg%3E");
}
.att-link.file-excel::before {
    content: '';
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32' fill='none'%3E%3Cpath d='M0 2a2 2 0 012-2h14l8 8v22a2 2 0 01-2 2H2a2 2 0 01-2-2V2z' fill='%23276749'/%3E%3Cpath d='M14 0l8 8h-6a2 2 0 01-2-2V0z' fill='%2368D391'/%3E%3Ctext x='12' y='23' text-anchor='middle' fill='white' font-size='8' font-weight='700' font-family='sans-serif'%3EXLS%3C/text%3E%3C/svg%3E");
}
.att-link.file-ppt::before {
    content: '';
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32' fill='none'%3E%3Cpath d='M0 2a2 2 0 012-2h14l8 8v22a2 2 0 01-2 2H2a2 2 0 01-2-2V2z' fill='%23C05621'/%3E%3Cpath d='M14 0l8 8h-6a2 2 0 01-2-2V0z' fill='%23FBD38D'/%3E%3Ctext x='12' y='23' text-anchor='middle' fill='white' font-size='8' font-weight='700' font-family='sans-serif'%3EPPT%3C/text%3E%3C/svg%3E");
}
.att-link.file-image::before {
    content: '';
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32' fill='none'%3E%3Cpath d='M0 2a2 2 0 012-2h14l8 8v22a2 2 0 01-2 2H2a2 2 0 01-2-2V2z' fill='%236B46C1'/%3E%3Cpath d='M14 0l8 8h-6a2 2 0 01-2-2V0z' fill='%23D6BCFA'/%3E%3Ctext x='12' y='23' text-anchor='middle' fill='white' font-size='8' font-weight='700' font-family='sans-serif'%3EIMG%3C/text%3E%3C/svg%3E");
}
.att-link.file-archive::before {
    content: '';
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32' fill='none'%3E%3Cpath d='M0 2a2 2 0 012-2h14l8 8v22a2 2 0 01-2 2H2a2 2 0 01-2-2V2z' fill='%23718096'/%3E%3Cpath d='M14 0l8 8h-6a2 2 0 01-2-2V0z' fill='%23CBD5E0'/%3E%3Ctext x='12' y='23' text-anchor='middle' fill='white' font-size='8' font-weight='700' font-family='sans-serif'%3EZIP%3C/text%3E%3C/svg%3E");
}
.att-link.file-audio::before,
.att-link.file-video::before {
    content: '';
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32' fill='none'%3E%3Cpath d='M0 2a2 2 0 012-2h14l8 8v22a2 2 0 01-2 2H2a2 2 0 01-2-2V2z' fill='%23D69E2E'/%3E%3Cpath d='M14 0l8 8h-6a2 2 0 01-2-2V0z' fill='%23FEFCBF'/%3E%3Ctext x='12' y='23' text-anchor='middle' fill='white' font-size='7' font-weight='700' font-family='sans-serif'%3EMEDIA%3C/text%3E%3C/svg%3E");
}
.att-link.file-text::before,
.att-link.file-default::before {
    content: '';
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32' fill='none'%3E%3Cpath d='M0 2a2 2 0 012-2h14l8 8v22a2 2 0 01-2 2H2a2 2 0 01-2-2V2z' fill='%234A5568'/%3E%3Cpath d='M14 0l8 8h-6a2 2 0 01-2-2V0z' fill='%23A0AEC0'/%3E%3Ctext x='12' y='23' text-anchor='middle' fill='white' font-size='8' font-weight='700' font-family='sans-serif'%3EFILE%3C/text%3E%3C/svg%3E");
}
.att-ext {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: #717186;
    background: #f0f0f5;
    padding: 1px 6px;
    margin-left: 4px;
    font-family: inherit;
    vertical-align: middle;
    letter-spacing: 0.3px;
}

/* Przycisk Pokaz wiecej */
.show-more-btn {
    background: #2E2D63;
    color: #fff;
    border: 2px solid #2E2D63;
    padding: 10px 24px;
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    margin-top: 15px;
    transition: background 0.2s ease;
    outline: none;
}
.show-more-btn:hover {
    background: #3d3c7a;
    border-color: #3d3c7a;
}
.show-more-btn:active {
    background: #23224e;
    border-color: #23224e;
}

/* Tresc - typografia */
.ogloszenie-content p,
.rekrutacja-content p {
    margin-bottom: 12px;
}
.ogloszenie-content ul,
.rekrutacja-content ul,
.ogloszenie-content ol,
.rekrutacja-content ol {
    margin: 15px 0;
    padding-left: 30px;
}
.ogloszenie-content li,
.rekrutacja-content li {
    margin-bottom: 8px;
}
.ogloszenie-content strong,
.rekrutacja-content strong {
    color: #2E2D63;
}

/* Puste stany */
.ogloszenia-container:empty::before,
.rekrutacja-container:empty::before {
    content: 'Brak ogloszen do wyswietlenia.';
    display: block;
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}
.rekrutacja-container:empty::before {
    content: 'Brak ofert rekrutacyjnych do wyswietlenia.';
}

/* Responsywnosc */
@media (max-width: 768px) {
    .ogloszenie-item,
    .rekrutacja-item {
        padding: 16px;
        margin-bottom: 20px;
    }
    .ogloszenie-title,
    .rekrutacja-title {
        font-size: 18px !important;
    }
    .ogloszenie-header,
    .rekrutacja-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .rekrutacja-header .rekrutacja-title {
        width: 100%;
    }
    .aplikuj-btn-small {
        margin-left: 0;
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .ogloszenie-item,
    .rekrutacja-item {
        padding: 12px;
        margin-bottom: 15px;
    }
    .show-more-btn {
        width: 100%;
        padding: 12px;
    }
    .aplikuj-btn-small {
        padding: 8px 16px;
        font-size: 12px;
    }
}
