:root {
    color-scheme: light !important;
}

body {
    background-color: #ffffff !important;
    color: #333333 !important;
    transition: none;
}

.container, .section, .card, .card-content, .footer, .level, .notification {
    background-color: #ffffff !important;
    color: #333333 !important;
    border-color: #dbdbdb !important;
}

.title, .subtitle, h1, h2, h3, .page-title, .header-subtitle {
    color: #333333 !important;
}

.description { color: #222222 !important; }
.date, .has-text-grey { color: #999999 !important; }
.company { color: #374151 !important; }
.label { color: #555555 !important; }
.value { color: #333333 !important; }
.meta { color: #666666 !important; }

.button {
    background-color: #f5f5f5 !important;
    color: #333333 !important;
    border-color: #dbdbdb !important;
}

.button.is-success {
    background-color: #10b981 !important;
    color: #ffffff !important;
}

.field.is-grouped {
    color: #333333 !important;
}

/* ОРИГИНАЛЬНЫЙ СТИЛЬ ДЛЯ INDUSTRY И MODE (как в твоем старом style-bulma.css, без borders/overrides) */
.industry { color: #10b981 !important; font-weight: 600; }  /* Зеленый текст, Bulma default bg, без border */
.mode { 
    color: #065f46 !important; 
    background: #d1fae5 !important;  /* Светло-зеленый фон */
    padding: 4px 12px; 
    border-radius: 12px; 
    font-size: 0.9em; 
    /* Нет display/flex/white-space — Bulma tag handles it; нет border */
}

.page-title {
    font-size: 2.2em;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin: 40px 0 20px;
    line-height: 1.2;
}

@media (max-width: 600px) {
    .page-title {
        font-size: 1.8em;
        margin: 30px 0 15px;
    }
}

.header-subtitle {
    opacity: 0.95;
    font-size: 1.1em;
    text-align: center;
    margin: 8px 0 40px 0;
    line-height: 1.4;
    color: #333;
    width: 100%;
    display: block;
}

@media (max-width: 600px) {
    .header-subtitle {
        font-size: 1em;
        margin: 6px 0 30px 0;
    }
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 1rem 0.75rem;
}

@media (max-width: 600px) {
    .container {
        padding: 0.5rem 0.25rem;
    }
    .section {
        padding: 1rem 0rem;
    }
}

.resume-card, .job-card {
    transition: box-shadow 0.2s;
    position: relative; /* Добавлено для позиционирования иконки */
}
.resume-card:hover, .job-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.card-header-custom {
    display: flex; flex-direction: column; padding: 1rem;
    border-bottom: 1px solid #dbdbdb; text-align: left;
}
.verticals { margin-top: 0.25rem; word-break: break-word; }

.column.resume-column, .column.job-column { min-width: 0; }
@media (min-width: 1024px) {
    .resume-single-visible .resume-column, .job-single-visible .job-column { flex: 0 0 50%; max-width: 50%; }
}

.meta {
    color: #666; font-size: 0.95em; margin-bottom: 16px;
    font-weight: 500; display: flex; flex-wrap: wrap; gap: 8px;
}
.company { color: #374151 !important; font-weight: 600; }
/* Industry и Mode уже выше — оригинал */
.mode {
    color: #065f46 !important; background: #d1fae5 !important;
    padding: 4px 12px; border-radius: 12px; font-size: 0.9em;
    display: inline-block;
    flex-shrink: 1;
    min-width: 0;
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
}  /* Полный .mode как в оригинале, без border */
.salary {
    color: #28a745 !important; font-weight: bold;
    font-size: 1.2em; margin-bottom: 16px;
}

.description {
    color: #222; margin-bottom: 20px; line-height: 1.7;
    font-size: 1.05em;
}
.description-line {
    font-size: 0.875rem; color: #363636; margin-bottom: 0.25rem;
    line-height: 1.4;
}
.field {
    margin-bottom: 6px; display: flex; align-items: baseline;
    flex-wrap: wrap;
}
.label {
    color: #555; font-weight: 500; min-width: 80px; margin-right: 8px;
}
.value {
    color: #333; font-size: 0.95em; flex: 1; line-height: 1.4;
    word-break: break-word; overflow-wrap: break-word;
    hyphens: auto; max-width: 100%;
}

/* Override Bulma subtitle in cards (company) — оставляю, так как не трогаем остальное */
.subtitle.is-6 { color: #374151 !important; } /* Company color */

.stack-list {
    display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px;
    align-items: flex-start; word-break: break-word; max-width: 100%;
}
.stack-list .stack, .skills-tags .stack {
    background: #e9f7ef; padding: 4px 8px; border-radius: 6px;
    font-size: 0.9em; white-space: normal; word-break: break-word;
    hyphens: auto; max-width: 100%; line-height: 1.3;
    color: #065f46; font-weight: 500;
}

.contact-section { margin-top: 20px; }
.contact-btn {
    background: #10b981; color: white; border: none;
    padding: 12px 24px; border-radius: 12px; cursor: pointer;
    font-weight: 600; font-size: 1em; transition: background 0.2s;
    width: auto !important; max-width: 100%; white-space: nowrap;
    display: inline-block;
}
.contact-btn:hover { background: #059669; }
.contact-btn[data-contact] {
    padding: 12px 20px; min-width: 140px;
}
.contact {
    color: #10b981 !important; font-weight: 600; font-size: 1.1em;
    margin-top: 12px; line-height: 1.7;
}
.contact.hidden { display: none; }

@media (max-width: 600px) {
    .contact-btn { width: 100%; }
    .contact { font-size: 1em; line-height: 1.5; }
}

a[href*="t.me"], .post a[href*="t.me"], .card a[href*="t.me"] {
    color: #10b981 !important; text-decoration: underline;
    font-weight: 500;
}
a[href*="t.me"]:hover, .post a[href*="t.me"]:hover, .card a[href*="t.me"]:hover {
    color: #059669 !important;
}

.date {
    color: #999; font-size: 0.85em; position: absolute;
    bottom: 12px; right: 24px;
}

@media (max-width: 600px) {
    .date { position: static; text-align: right; margin-top: 8px; }
}

footer {
    text-align: center; margin-top: 60px; padding: 24px 0;
    color: #666; border-top: 1px solid #e5e7eb; font-size: 0.9em;
}
footer a { color: #10b981; }

@media (max-width: 600px) {
    .card-header-title, .post h2, h2 {
        font-size: 1.3em; line-height: 1.4; margin-bottom: 8px;
        display: -webkit-box; -webkit-line-clamp: 2;
        -webkit-box-orient: vertical; overflow: hidden;
        text-overflow: ellipsis; hyphens: none;
    }

    .field {
        margin-bottom: 3px; flex-direction: column;
        align-items: flex-start;
    }
    .field .label {
        min-width: auto; margin-right: 0; margin-bottom: 2px;
        font-size: 0.9em;
    }
    .field .value {
        font-size: 0.85em; line-height: 1.3; max-height: 4em;
        overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2;
        -webkit-box-orient: vertical; text-overflow: ellipsis;
        hyphens: none;
    }

    .stack-list {
        gap: 4px; flex-direction: column;
    }
    .stack-list .stack {
        padding: 4px 6px; font-size: 0.8em; width: 100%;
        max-width: none;
    }

    .description {
        max-height: 300px; overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .meta { gap: 4px; font-size: 0.9em; }

    .card-content, .post {
        padding: 0.35rem !important; margin-bottom: 0.35rem;
    }

    .field.is-grouped {
        flex-wrap: nowrap !important; overflow-x: auto;
        -webkit-overflow-scrolling: touch; gap: 0.25rem;
    }
    .field.is-grouped .tag {
        font-size: 0.8em; padding: 0.25em 0.5em;
        white-space: nowrap; flex-shrink: 0;
    }
    .field.is-grouped .mr-2 { margin-right: 0.25rem !important; }

    .apply-toggle, .details-toggle {
        width: 100%; text-align: left; margin-top: 4px; padding: 10px;
    }
    .contact-text { font-size: 1.1em; }

    /* Для mode в mobile — оригинал без border */
    .mode {
        border: none !important;  /* Ensure no border */
    }
}

.pagination-level {
    width: 100%; max-width: 100%; overflow: hidden;
}
@media (min-width: 769px) {
    .pagination-level { display: flex; justify-content: space-between; align-items: center; }
}
@media (max-width: 768px) {
    .pagination-level { flex-direction: column; align-items: center; gap: 0.5rem; text-align: center; }
    .level-left { order: 1; width: 100%; margin: 0; }
    .level-right { order: 2; width: 100%; display: flex; flex-direction: row; justify-content: space-between; align-items: center; margin: 0; padding: 0 0.5rem; max-width: 100%; overflow: hidden; }
    .pagination { display: flex; flex: 1; justify-content: center; align-items: center; flex-wrap: wrap; gap: 0.1rem; max-width: 100%; overflow: hidden; margin: 0; padding: 0; }
    .pagination-previous, .pagination-next { flex-shrink: 0; padding: 0.25rem 0.4rem; font-size: 0.75rem; white-space: nowrap; min-width: auto; max-width: 40%; text-overflow: ellipsis; overflow: hidden; }
    .pagination-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.1rem; flex: 1; margin: 0 0.5rem; max-width: 60%; }
    .pagination-link { padding: 0.25rem 0.4rem; font-size: 0.75rem; min-width: 1.5rem; text-align: center; white-space: nowrap; flex-shrink: 1; }
    .level-item { margin: 0; }
    .pagination-list li { flex: 0 0 auto; }
}

.contact-text {
    color: #10b981 !important; font-weight: 600; font-size: 1em;
    margin-top: 8px; line-height: 1.5; transition: opacity 0.3s ease;
}
.contact-text.hidden { display: none; opacity: 0; }
.contact-text.visible { display: block; opacity: 1; }

.short-desc {
    line-height: 1.6; max-height: 4em; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 3;
    -webkit-box-orient: vertical; text-overflow: ellipsis;
    transition: max-height 0.3s ease;
}
.full-desc {
    line-height: 1.6; max-height: none; overflow: visible;
    transition: opacity 0.3s ease;
}
.full-desc.hidden { display: none; opacity: 0; }

.apply-toggle, .details-toggle {
    background: transparent; border: none; color: #10b981 !important;
    font-weight: 500; padding: 8px 12px; border-radius: 6px;
    cursor: pointer; transition: background 0.2s, color 0.2s;
    text-decoration: underline;
}
.apply-toggle:hover, .details-toggle:hover {
    background: rgba(16, 185, 129, 0.1); color: #059669 !important;
}
.apply-toggle.hidden, .details-toggle.hidden { display: none; }

.card, .job-card, .resume-card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.12) !important;
    background: #ffffff !important;
}

.card:hover, .job-card:hover, .resume-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.card-content {
    background: #ffffff !important;
    padding: 1.5rem !important; /* Override Bulma p-4 if needed */
}

/* Card footer без бордера на item (оригинал Bulma, без left/top borders) */
.card-footer {
    background-color: #ffffff !important;
    border-top-color: #dbdbdb !important;
}

.card-footer-item {
    border-left-color: #dbdbdb !important;
    /* Нет дополнительных borders — как в оригинале */
}

.card-footer-item:first-child {
    border-left: none !important;
}

@media (prefers-color-scheme: dark) {
    .card, .job-card, .resume-card {
        box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
        background: #ffffff !important;
    }
    .card:hover, .job-card:hover, .resume-card:hover {
        box-shadow: 0 8px 16px rgba(0,0,0,0.25) !important;
    }
    .card-content {
        background: #ffffff !important;
    }

    .card-footer {
        background-color: #ffffff !important;
        border-top-color: #dbdbdb !important;
    }

    .card-footer-item {
        border-left-color: #dbdbdb !important;
    }

    .card-footer-item:first-child {
        border-left: none !important;
    }
}

@supports (forced-colors: active) {
    .card { border: 1px solid CanvasText !important; }
    .job-card, .resume-card { border: 1px solid CanvasText !important; }
}

.field.is-grouped {
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .field.is-grouped {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.25rem;
    }
    
    .field.is-grouped .mode {
        flex-shrink: 1;
        min-width: 0;
        max-width: none;
        white-space: nowrap;
        /* Нет border — оригинал */
    }
}
