/* Delniki test — светлый интерфейс, акцент как на Biz (жёлтый / золотой градиент) */

:root {
    /* Акцент бренда (Biz: --accent) */
    --brand-accent: #ffd700;
    --brand-accent-hover: #e6c200;
    --brand-accent-active: #d4ad00;
    --brand-accent-light: #fff4b8;
    --brand-accent-muted: #fff9db;
    --brand-accent-gradient: linear-gradient(135deg, #ffd700 0%, #f5a623 100%);
    --brand-on-accent: #1a1a1a;

    /* Текст и ссылки — не жёлтые (читаемость на белом) */
    --brand-ink: #0f172a;
    --brand-ink-muted: #475569;
    --link-color: #1e293b;
    --link-hover-color: #0f172a;

    /* Нейтрали и фон */
    --light-color: #f3f2ef;
    --dark-color: var(--brand-ink);
    --gray-color: #86888a;
    --secondary-color: #057642;
    --success-color: #057642;
    --danger-color: #cb2431;
    --warning-color: #f5a623;

    /* Совместимость со старыми правилами */
    --primary-color: var(--brand-accent);
    --primary-color-hover: var(--brand-accent-hover);
    --primary-color-rgb: 255, 215, 0;

    /* Bootstrap 5 */
    --bs-primary: var(--brand-accent);
    --bs-primary-rgb: 255, 215, 0;
    --bs-link-color: var(--link-color);
    --bs-link-hover-color: var(--link-hover-color);
    --bs-link-decoration: none;
    --bs-link-hover-decoration: none;
    --bs-focus-ring-color: rgba(255, 215, 0, 0.35);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.5;
}

a:not(.btn):not(.nav-link):not(.nav-item):not(.dropdown-item):not(.page-link):not(.post-like-count) {
    color: var(--link-color);
    text-decoration: none;
}

a:not(.btn):not(.nav-link):not(.nav-item):not(.dropdown-item):not(.page-link):not(.post-like-count):hover,
a:not(.btn):not(.nav-link):not(.nav-item):not(.dropdown-item):not(.page-link):not(.post-like-count):focus,
a:not(.btn):not(.nav-link):not(.nav-item):not(.dropdown-item):not(.page-link):not(.post-like-count):focus-visible {
    color: var(--link-hover-color);
    text-decoration: none;
}

a:hover,
a:focus,
a:focus-visible {
    text-decoration: none;
}

.text-primary {
    color: var(--brand-accent-hover) !important;
}

.border-primary {
    border-color: var(--brand-accent) !important;
}

/* Кнопки: жёлтый фон, тёмный текст (как «Опубликовать» на Biz) */
.btn-primary {
    --bs-btn-color: var(--brand-on-accent);
    --bs-btn-bg: var(--brand-accent);
    --bs-btn-border-color: var(--brand-accent-hover);
    --bs-btn-hover-color: var(--brand-on-accent);
    --bs-btn-hover-bg: var(--brand-accent-hover);
    --bs-btn-hover-border-color: var(--brand-accent-active);
    --bs-btn-active-color: var(--brand-on-accent);
    --bs-btn-active-bg: var(--brand-accent-active);
    --bs-btn-active-border-color: var(--brand-accent-active);
    --bs-btn-focus-shadow-rgb: 255, 215, 0;
    color: var(--brand-on-accent);
    background-color: var(--brand-accent);
    border-color: var(--brand-accent-hover);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    color: var(--brand-on-accent);
    background-color: var(--brand-accent-hover);
    border-color: var(--brand-accent-active);
}

.btn-outline-primary {
    --bs-btn-color: var(--brand-ink);
    --bs-btn-border-color: var(--brand-accent-hover);
    --bs-btn-hover-color: var(--brand-on-accent);
    --bs-btn-hover-bg: var(--brand-accent);
    --bs-btn-hover-border-color: var(--brand-accent-hover);
    color: var(--brand-ink);
    border-color: var(--brand-accent-hover);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: var(--brand-on-accent);
    background-color: var(--brand-accent);
    border-color: var(--brand-accent-hover);
}

.btn-link {
    color: var(--link-color);
}

.btn-link:hover,
.btn-link:focus {
    color: var(--link-hover-color);
    text-decoration: none;
}

/* Шапка: светлая, акцент только в логотипе и CTA */
.navbar-light .navbar-brand {
    color: var(--brand-ink);
}

.navbar-brand .brand-mark {
    color: var(--brand-accent-hover);
}

.navbar-light .nav-link {
    color: var(--brand-ink-muted);
}

.navbar-light .nav-link:hover,
.navbar-light .nav-link:focus {
    color: var(--brand-ink);
}

.card-header.bg-primary {
    background: var(--brand-accent-gradient) !important;
    color: var(--brand-on-accent) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Отчёты */
.btn-download {
    background-color: var(--brand-accent) !important;
    border-color: var(--brand-accent-hover) !important;
    color: var(--brand-on-accent) !important;
}

.btn-download:hover {
    background-color: var(--brand-accent-hover) !important;
    border-color: var(--brand-accent-active) !important;
    color: var(--brand-on-accent) !important;
}

/* Лайки и интерактив ленты */
.post-like-count:not(:disabled):hover,
.post-likes-count:not(.post-likes-count--empty):hover,
.post-like-btn.active,
.post-like-btn:hover {
    color: var(--brand-accent-active) !important;
}

.feed-filter-active.btn-primary {
    background: var(--brand-accent-gradient);
    border-color: var(--brand-accent-hover);
}

/* Card Styles */
.card {
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Profile Card */
.profile-card {
    position: relative;
}

.profile-cover {
    height: 200px;
    background-color: var(--primary-color);
    background-size: cover;
    background-position: center;
}

.profile-picture {
    width: 150px;
    height: 150px;
    border: 5px solid white;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 125px;
    z-index: 1;
    background-color: white;
    object-fit: cover;
}

.profile-info {
    padding-top: 85px;
    text-align: center;
}

/* Post Card */
.post-card {
    margin-bottom: 20px;
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.post-media {
    max-width: 100%;
    border-radius: 5px;
    margin: 10px 0;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.post-action {
    display: flex;
    align-items: center;
    color: var(--gray-color);
    cursor: pointer;
    transition: color 0.2s ease;
}

.post-action:hover {
    color: var(--primary-color);
}

.post-action i {
    margin-right: 5px;
}

/* Comment Styles */
.comment {
    display: flex;
    margin-bottom: 15px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.comment-content {
    background-color: #f0f2f5;
    padding: 10px 15px;
    border-radius: 18px;
    flex-grow: 1;
}

.comment-author {
    font-weight: bold;
    margin-bottom: 5px;
}

/* Job Card */
.job-card {
    margin-bottom: 20px;
}

.job-title {
    color: var(--link-color);
    font-weight: bold;
}

.job-title:hover {
    color: var(--brand-accent-active);
}

.job-company {
    font-weight: 500;
}

.job-location, .job-posted-date {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Connection Card */
.connection-card {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 10px;
    background-color: white;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.connection-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

.connection-info {
    flex-grow: 1;
}

.connection-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.connection-headline {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

/* Group Card */
.group-card {
    margin-bottom: 20px;
}

.group-cover {
    height: 120px;
    background-color: var(--primary-color);
    background-size: cover;
    background-position: center;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.group-name {
    color: var(--link-color);
    font-weight: bold;
}

.group-member-count {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Notification Item */
.notification-item {
    padding: 15px;
    border-radius: 10px;
    background-color: white;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
}

.notification-unread {
    background-color: var(--brand-accent-muted);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--brand-accent);
    color: var(--brand-on-accent);
    margin-right: 15px;
}

.notification-content {
    flex-grow: 1;
}

.notification-time {
    color: var(--gray-color);
    font-size: 0.8rem;
}

.notification-actions {
    position: absolute;
    top: 15px;
    right: 15px;
}

/* Form Styles */
.form-control:focus {
    border-color: var(--brand-accent-hover);
    box-shadow: 0 0 0 0.25rem rgba(255, 215, 0, 0.28);
}

/* Premium Badge */
.premium-badge {
    display: inline-flex;
    align-items: center;
    background-color: #e7a600;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-left: 5px;
}

.premium-badge i {
    margin-right: 3px;
}

.profile-pic {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
}

.user-pic {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
}

.post-avatar {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 10px;
}

.post-avatar div {
    width: 48px;
    height: 48px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-avatar i {
    font-size: 24px;
    color: #6c757d;
}

.post-media {
    max-width: 100%;
    margin-top: 10px;
}

.post-card {
    border: none;
    border-radius: 8px;
}

.post-actions .btn {
    font-size: 14px;
}

.post-stats {
    font-size: 14px;
}

.post-content p {
    margin-bottom: 0;
}

.post-header {
    display: flex;
    align-items: center;
}

.post-header .dropdown {
    margin-left: auto;
}

/* Responsive Sidebar */
@media (min-width: 992px) {
    .sidebar-sticky {
        position: sticky;
        top: 5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate-slide-up {
    animation: slideUp 0.5s ease-in-out;
}

/* Transition for hover effects */
.btn, .nav-link, .card, .dropdown-item {
    transition: all 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c7c7c7;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Admin panel — см. public/css/admin.css */
#articleEditor:empty::before {
    content: attr(data-placeholder);
    color: #6c757d;
}
#articleEditor img { max-width: 100%; height: auto; border-radius: 8px; margin: 12px 0; }
#articleToolbar { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-media-preview img { max-height: 320px; object-fit: contain; background: #f8f9fa; }

/* Лента: изображение и длинный текст */
.post-feed-image.feed-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: #f3f2ef;
}
.post-feed-image.feed-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.post-feed-image.feed-image.cropped img {
    object-position: top;
}
.post-feed-image.feed-image.expanded {
    aspect-ratio: auto;
}
.post-feed-image.feed-image.expanded img {
    height: auto;
    object-fit: contain;
}
.feed-image-expand-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    display: none;
}
.post-feed-image.feed-image.cropped .feed-image-expand-btn {
    display: block;
}
.post-feed-text-preview {
    line-height: 1.5;
    color: #333;
}
.post-feed-text-full {
    line-height: 1.6;
}
.post-feed-text-full img {
    max-width: 100%;
    height: auto;
}

/* Профиль пользователя (VK-style) */
.profile-page {
    max-width: 960px;
    margin: 0 auto;
}
.profile-cover {
    height: 180px;
    background-size: cover;
    background-position: center;
}
.profile-cover--empty {
    display: none;
}
.profile-header-card:has(.profile-cover--empty) {
    background: linear-gradient(135deg, var(--brand-accent-light), #e8e0c8);
}
.profile-header-card:not(:has(.profile-cover--empty)) .profile-cover {
    display: block;
}
.profile-header-body {
    margin-top: 0;
    padding-top: 1.25rem;
    position: relative;
    z-index: 1;
    background: transparent;
}
.profile-header-card:not(:has(.profile-cover--empty)) .profile-header-body {
    margin-top: -48px;
}
.profile-header-avatar {
    width: 96px;
    height: 96px;
    flex-shrink: 0;
}
.profile-header-avatar img,
.profile-header-avatar-ph {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 4px solid #fff;
    object-fit: cover;
    background: #f3f2ef;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.profile-header-avatar-ph i {
    font-size: 2rem;
    color: #6c757d;
}
.profile-wall-tabs .profile-wall-tab {
    color: #6c757d;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.profile-wall-tabs .profile-wall-tab.active {
    color: var(--brand-accent-active);
    border-bottom-color: var(--brand-accent-hover);
    font-weight: 600;
}
.profile-wall-tabs .profile-wall-tab:disabled {
    opacity: .6;
}
.profile-wall-loader {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.profile-post-body .post-feed-text-full p,
.profile-post-body .post-feed-text-preview {
    margin-bottom: 0.5rem;
}
.profile-about {
    white-space: pre-wrap;
    word-break: break-word;
}
@media (max-width: 991px) {
    .profile-page .order-1 { order: 1 !important; }
    .profile-page .order-2 { order: 2 !important; }
}