/*
Theme Name: Freelans Theme
Theme URI: https://grabovecv.ru/
Author: Vladimir Grabovetz
Author URI: https://grabovecv.ru/
Description: Тема маркетплейса фриланс-услуг
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: freelans-theme
*/

/* ===== Базовые стили ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== Хедер ===== */
.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header__logo {
    flex-shrink: 0;
}

.logo__text {
    font-size: 24px;
    font-weight: 700;
    color: #00aa66;
    text-decoration: none;
}

.header__nav {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
    justify-content: flex-end;
}

.header__menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 25px;
}

.header__menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
    white-space: nowrap;
}

.header__menu a:hover {
    color: #00aa66;
}

.header__actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.header__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.header__toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #333;
    transition: all 0.3s;
    border-radius: 3px;
}

.header__toggle.is-active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.header__toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.header__toggle.is-active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Поиск */
.search-form {
    flex: 1;
    max-width: 500px;
    margin: 0 30px;
    display: flex;
}

.search-form input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #00aa66;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.search-form button {
    background: #00aa66;
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 600;
}

/* Кнопки */
.btn {
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn--primary {
    background: #00aa66;
    color: #fff;
}

.btn--primary:hover {
    background: #009955;
}

.btn--outline {
    background: transparent;
    color: #00aa66;
    border: 2px solid #00aa66;
}

.btn--outline:hover {
    background: #00aa66;
    color: #fff;
}

.btn--block {
    width: 100%;
    display: block;
    text-align: center;
}

/* Герой секция */
.hero {
    background: linear-gradient(135deg, #e0f7e9 0%, #f0f9f4 100%);
    padding: 80px 0;
    text-align: center;
}

.hero__title {
    font-size: 42px;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.hero__subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
}

.hero__search {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
}

.hero__search input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #00aa66;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.hero__search button {
    background: #00aa66;
    color: #fff;
    border: none;
    padding: 15px 35px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
}

/* Категории */
.categories {
    padding: 60px 0;
}

.section-title {
    font-size: 32px;
    text-align: center;
    margin-bottom: 40px;
}

.categories__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: #333;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.category-card__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: #f0f9f4;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.category-card__title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.category-card__count {
    color: #999;
    font-size: 14px;
}

/* Кворки */
.kworks {
    padding: 60px 0;
    background: #fff;
}

.kworks__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.kwork-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s;
    border: 1px solid #e0e0e0;
}

.kwork-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.kwork-card__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.kwork-card__content {
    padding: 20px;
}

.kwork-card__title {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
    text-decoration: none;
    display: block;
}

.kwork-card__title:hover {
    color: #00aa66;
}

.kwork-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
}

.kwork-card__seller {
    color: #666;
}

.kwork-card__rating {
    color: #ffa500;
}

.kwork-card__price {
    font-size: 20px;
    font-weight: 700;
    color: #00aa66;
}

/* Подвал */
.footer {
    background: #2c2c2c;
    color: #fff;
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer__col h4 {
    margin-bottom: 20px;
    font-size: 18px;
}

.footer__menu {
    list-style: none;
}

.footer__menu li {
    margin-bottom: 10px;
}

.footer__menu a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer__menu a:hover {
    color: #fff;
}

.footer__copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444;
    color: #999;
}

/* ===== Страница кворка ===== */
.kwork-single {
    margin-bottom: 40px;
}

.kwork-single__header {
    margin-bottom: 30px;
}

.kwork-single__title {
    font-size: 32px;
    margin-bottom: 15px;
    line-height: 1.3;
    color: #1a1a1a;
}

.kwork-single__seller {
    display: flex;
    align-items: center;
    gap: 15px;
}

.kwork-single__seller a {
    font-weight: 600;
    color: #00aa66;
    text-decoration: none;
    transition: color 0.3s;
}

.kwork-single__seller a:hover {
    color: #008855;
}

.seller-meta {
    color: #999;
    font-size: 14px;
}

.kwork-single__grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.kwork-single__gallery {
    margin-bottom: 30px;
}

.kwork-single__gallery img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.kwork-single__description {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.kwork-single__description h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #1a1a1a;
}

.kwork-single__description p,
.kwork-single__description li {
    line-height: 1.7;
    color: #555;
    margin-bottom: 15px;
}

.kwork-single__description ul,
.kwork-single__description ol {
    padding-left: 20px;
}

.kwork-single__sidebar {
    position: relative;
}

.kwork-card--order {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 100px;
}

.kwork-card--order__price {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.kwork-card--order__price .price {
    font-size: 32px;
    font-weight: 700;
    color: #00aa66;
}

.kwork-card--order__features {
    list-style: none;
    margin: 0 0 25px;
    padding: 0;
}

.kwork-card--order__features li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    color: #555;
    font-size: 15px;
}

.kwork-card--order__features li:last-child {
    border-bottom: none;
}

.kwork-card--order__features strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.order-note {
    margin-top: 15px;
    font-size: 13px;
    color: #999;
    text-align: center;
}

/* Отзывы */
.reviews-section {
    margin-top: 40px;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.reviews-section h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #1a1a1a;
}

.rating-display {
    font-size: 24px;
    color: #ffa500;
    margin-bottom: 30px;
    font-weight: 600;
}

#review-form {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

#review-form h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

#review-form select,
#review-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 15px;
    box-sizing: border-box;
}

#review-form select {
    cursor: pointer;
}

#review-form textarea {
    resize: vertical;
    min-height: 100px;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.review-author {
    font-weight: 600;
    color: #333;
}

.review-rating {
    color: #ffa500;
    font-weight: 600;
}

.review-text {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* ===== Стандартная страница записи ===== */
.single-post {
    padding: 60px 0;
}

.post-header {
    margin-bottom: 40px;
}

.post-title {
    font-size: 36px;
    margin-bottom: 20px;
    line-height: 1.3;
    color: #1a1a1a;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #999;
    font-size: 14px;
    margin-bottom: 30px;
}

.post-meta a {
    color: #00aa66;
    text-decoration: none;
}

.post-meta a:hover {
    text-decoration: underline;
}

.post-thumbnail {
    margin-bottom: 30px;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-content {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    line-height: 1.8;
    color: #555;
    font-size: 16px;
    margin-bottom: 40px;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    color: #1a1a1a;
    margin-top: 30px;
    margin-bottom: 15px;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px 0;
}

.post-content ul,
.post-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.post-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.post-tags {
    margin-bottom: 20px;
    color: #555;
}

.post-tags a {
    display: inline-block;
    background: #f0f9f4;
    color: #00aa66;
    padding: 5px 12px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 14px;
    margin: 5px 5px 5px 0;
    transition: background 0.3s;
}

.post-tags a:hover {
    background: #00aa66;
    color: #fff;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 20px;
}

.post-navigation a {
    color: #00aa66;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.post-navigation a:hover {
    color: #008855;
    text-decoration: underline;
}

/* ===== Страница архива/блога ===== */
.archive-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #00aa66;
}

.archive-title {
    font-size: 36px;
    color: #1a1a1a;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.post-card__thumbnail {
    display: block;
    overflow: hidden;
}

.post-card__thumbnail img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-card:hover .post-card__thumbnail img {
    transform: scale(1.05);
}

.post-card__content {
    padding: 25px;
}

.post-card__title {
    font-size: 22px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-card__title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s;
}

.post-card__title a:hover {
    color: #00aa66;
}

.post-card__meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #999;
}

.post-card__excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: #00aa66;
    color: #fff;
    border-color: #00aa66;
}

/* ===== Панель модерации ===== */
.admin-grid {
    display: grid;
    gap: 30px;
    margin-top: 30px;
}

.moderation-section {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.moderation-section h2 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #00aa66;
}

.moderation-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.moderation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #00aa66;
}

.moderation-item__info h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.moderation-item__info p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.moderation-item__info .preview-link {
    color: #00aa66;
    text-decoration: none;
    font-size: 13px;
}

.moderation-item__actions {
    display: flex;
    gap: 10px;
}

.empty-message {
    text-align: center;
    color: #999;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 8px;
}

.btn--success {
    background: #4caf50;
    color: #fff;
}

.btn--success:hover {
    background: #45a049;
}

.btn--danger {
    background: #f44336;
    color: #fff;
}

.btn--danger:hover {
    background: #da190b;
}

/* ===== Биржа заказов ===== */
.orders-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-top: 30px;
}

.jobs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.job-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.job-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.job-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.job-card__title {
    font-size: 18px;
    margin: 0;
    flex: 1;
}

.job-card__title a {
    color: #1a1a1a;
    text-decoration: none;
}

.job-card__title a:hover {
    color: #00aa66;
}

.job-card__category {
    background: #f0f9f4;
    color: #00aa66;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    white-space: nowrap;
}

.job-card__excerpt {
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 14px;
}

.job-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.job-card__budget {
    font-size: 18px;
    font-weight: 700;
    color: #00aa66;
}

.job-card__deadline {
    font-size: 13px;
    color: #999;
}

.job-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #666;
}

.job-card__author {
    display: flex;
    gap: 10px;
    align-items: center;
}

.job-card__author-rating {
    color: #ffa500;
}

.job-card__proposals {
    color: #00aa66;
    font-weight: 600;
}

/* Страница заказа */
.job-single__header {
    margin-bottom: 30px;
}

.job-single__meta-top {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.job-single__category {
    background: #f0f9f4;
    color: #00aa66;
    padding: 5px 12px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 13px;
}

.job-single__title {
    font-size: 32px;
    margin-bottom: 20px;
}

.job-single__author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.job-single__author a {
    font-weight: 600;
    color: #00aa66;
    text-decoration: none;
}

.job-single__author-meta {
    color: #999;
    font-size: 14px;
}

.job-single__grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

.job-single__description {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.job-single__description h2 {
    margin-bottom: 20px;
    font-size: 22px;
}

.job-single__description p,
.job-single__description li {
    line-height: 1.7;
    color: #555;
    margin-bottom: 15px;
}

.job-info-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 100px;
}

.job-info-card__row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.job-info-card__row:last-child {
    border-bottom: none;
}

.job-info-card__label {
    color: #999;
    font-size: 14px;
}

.job-info-card__value {
    font-weight: 600;
    color: #333;
}

/* Отклики */
.proposal-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.proposal-form h3 {
    margin-bottom: 20px;
}

.proposal-form .form-group {
    margin-bottom: 15px;
}

.proposal-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.proposal-form input,
.proposal-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.proposals-list {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.proposal-item {
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
}

.proposal-item__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.proposal-item__rating {
    color: #ffa500;
}

.proposal-item__price {
    font-weight: 700;
    color: #00aa66;
}

.proposal-item__message {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.proposal-item__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Форма публикации заказа */
.add-order-page {
    max-width: 800px;
    margin: 40px auto;
}

.add-order-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.add-order-form .form-group {
    margin-bottom: 20px;
}

.add-order-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.add-order-form input,
.add-order-form select,
.add-order-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ===== Поддержка ===== */
.support-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.support-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.support-card__title {
    margin-bottom: 25px;
    font-size: 22px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.support-form .form-group {
    margin-bottom: 20px;
}

.support-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.support-form input,
.support-form select,
.support-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 15px;
}

.support-form textarea {
    resize: vertical;
    min-height: 120px;
}

.form-note {
    display: block;
    margin-top: 8px;
    color: #999;
    font-size: 13px;
}

/* Список тикетов */
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ticket-item {
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.ticket-item:hover {
    border-color: #00aa66;
}

.ticket-item__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.ticket-item__title {
    font-size: 17px;
    margin: 0;
    flex: 1;
}

.ticket-item__title a {
    color: #1a1a1a;
    text-decoration: none;
}

.ticket-item__title a:hover {
    color: #00aa66;
}

.ticket-item__meta {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
}

.ticket-item__priority {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.priority--low { background: #e3f2fd; color: #1976d2; }
.priority--normal { background: #f0f9f4; color: #00aa66; }
.priority--high { background: #fff3cd; color: #ff9800; }
.priority--critical { background: #ffebee; color: #f44336; }

.ticket-item__date {
    color: #999;
}

.ticket-item__excerpt {
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

.ticket-item__replies {
    color: #00aa66;
    font-size: 13px;
    font-weight: 600;
}

/* Статусы тикетов */
.ticket-status {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.ticket-status--open { background: #e3f2fd; color: #1976d2; }
.ticket-status--progress { background: #fff3cd; color: #ff9800; }
.ticket-status--resolved { background: #e8f5e9; color: #4caf50; }
.ticket-status--closed { background: #f5f5f5; color: #9e9e9e; }

/* Просмотр тикета */
.ticket-view {
    margin-top: 40px;
}

.ticket-view__header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.ticket-view__header h2 {
    margin: 15px 0;
    font-size: 26px;
}

.ticket-view__meta {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.ticket-view__content {
    margin-bottom: 30px;
}

.ticket-message,
.ticket-reply {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ticket-message {
    background: #f9f9f9;
}

.ticket-reply {
    background: #fff;
    border: 1px solid #eee;
}

.ticket-reply--support {
    background: #f0f9f4;
    border-color: #00aa66;
}

.ticket-message__header,
.ticket-reply__header {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.ticket-reply__badge {
    background: #00aa66;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.ticket-message__body,
.ticket-reply__body {
    line-height: 1.7;
    color: #555;
}

.ticket-reply-form {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.ticket-reply-form h3 {
    margin-bottom: 15px;
}

.ticket-reply-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    resize: vertical;
    min-height: 100px;
    box-sizing: border-box;
}

/* ===== Каталог кворков ===== */
.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-top: 30px;
}

.page-header {
    margin: 40px 0 30px;
}

.page-subtitle {
    color: #666;
    margin-top: 10px;
}

.filters {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: fit-content;
}

.filters__title {
    margin-bottom: 20px;
    font-size: 20px;
}

.filters__search input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group__title {
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 15px;
}

.filter-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.filter-price {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-price input {
    width: 45%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.filter-price__sep {
    color: #999;
}

.filter-reset {
    margin-top: 10px;
}

.kworks-list {
    min-height: 400px;
}

.kwork-card__image--placeholder {
    background: #eee;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.empty-results {
    text-align: center;
    padding: 60px;
    color: #999;
    background: #fff;
    border-radius: 8px;
}

/* ===== Заказы ===== */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.order-card__body {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.order-card__info {
    flex: 1;
    min-width: 300px;
}

.order-card__title {
    margin-bottom: 10px;
    font-size: 20px;
}

.order-card__title a {
    color: #333;
    text-decoration: none;
}

.order-card__title a:hover {
    color: #00aa66;
}

.order-card__meta {
    color: #666;
    font-size: 14px;
}

.order-card__meta p {
    margin: 5px 0;
}

.order-card__summary {
    text-align: right;
}

.order-card__price {
    font-size: 24px;
    font-weight: 700;
    color: #00aa66;
    margin-bottom: 10px;
}

.order-status {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.status--new { background: #2196f3; }
.status--progress { background: #ff9800; }
.status--completed { background: #4caf50; }
.status--cancelled { background: #f44336; }
.status--pending { background: #9e9e9e; }
.status--paid { background: #00aa66; }
.status--unknown { background: #999; }

.order-card__actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.empty-state {
    text-align: center;
    padding: 60px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.empty-state p {
    font-size: 18px;
    color: #999;
    margin-bottom: 20px;
}

/* ===== Чат ===== */
.chat-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-height: 600px;
    overflow: hidden;
}

.chat-sidebar {
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.chat-sidebar__header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 18px;
}

.chat-sidebar__list {
    overflow-y: auto;
    max-height: calc(100vh - 300px);
}

.chat-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.3s;
}

.chat-item:hover {
    background: #f5f7fa;
}

.chat-item--active {
    background: #f0f9f4;
}

.chat-item__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-item__info {
    flex: 1;
    min-width: 0;
}

.chat-item__name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item__last {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item__date {
    font-size: 11px;
    color: #999;
}

.chat-window {
    display: flex;
    flex-direction: column;
}

.chat-window__header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 18px;
}

.chat-window__messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f9f9f9;
    min-height: 400px;
}

.chat-window__input {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.chat-window__input input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.chat-window__empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.chat-empty__icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.chat-empty {
    padding: 20px;
    color: #999;
    text-align: center;
}

/* ===== Страница регистрации ===== */
.register-page {
    max-width: 500px;
    margin: 60px auto;
    padding: 0 15px;
}

.register-card {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.register-page .page-title {
    text-align: center;
    margin-bottom: 10px;
    font-size: 32px;
}

.register-page .page-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.register-page .alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.register-page .alert--error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.register-page .alert--success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

.register-page .form-group {
    margin-bottom: 25px;
}

.register-page .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.register-page .role-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 10px;
}

.register-page .role-option {
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}

.register-page .role-option input {
    display: none;
}

.register-page .role-option:hover {
    border-color: #00aa66;
}

.register-page .role-option input:checked + .role-option__icon {
    background: #00aa66;
    color: #fff;
}

.register-page .role-option:has(input:checked) {
    border-color: #00aa66;
    background: #f0f9f4;
}

.register-page .role-option__icon {
    display: block;
    font-size: 32px;
    margin-bottom: 10px;
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    background: #f5f5f5;
    margin: 0 auto 10px;
    transition: all 0.3s;
}

.register-page .role-option__title {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.register-page .role-option__desc {
    font-size: 12px;
    color: #666;
}

.register-page input[type="text"],
.register-page input[type="email"],
.register-page input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.register-page input[type="text"]:focus,
.register-page input[type="email"]:focus,
.register-page input[type="password"]:focus {
    outline: none;
    border-color: #00aa66;
}

.register-page .form-note {
    display: block;
    margin-top: 6px;
    color: #999;
    font-size: 13px;
}

.register-page .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.register-page .checkbox-label input {
    margin-top: 3px;
}

.register-page .checkbox-label a {
    color: #00aa66;
    text-decoration: none;
}

.register-page .checkbox-label a:hover {
    text-decoration: underline;
}

.register-page .btn--large {
    padding: 15px;
    font-size: 16px;
}

.register-page .register-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #eee;
    color: #666;
}

.register-page .register-footer a {
    color: #00aa66;
    text-decoration: none;
    font-weight: 600;
}

.register-page .register-footer a:hover {
    text-decoration: underline;
}

/* ===== Страница входа ===== */
.login-page {
    max-width: 450px;
    margin: 60px auto;
    padding: 0 15px;
}

.login-card {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.login-page .page-title {
    text-align: center;
    margin-bottom: 10px;
    font-size: 32px;
}

.login-page .page-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.login-page .alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.login-page .alert--error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.login-page .form-group {
    margin-bottom: 25px;
}

.login-page .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.login-page input[type="text"],
.login-page input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.login-page input[type="text"]:focus,
.login-page input[type="password"]:focus {
    outline: none;
    border-color: #00aa66;
}

.login-page .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.login-page .checkbox-label input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.login-page .btn--large {
    padding: 15px;
    font-size: 16px;
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.login-footer p {
    margin: 10px 0;
    color: #666;
}

.login-footer a {
    color: #00aa66;
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ===== Устранение горизонтального скролла ===== */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== Адаптивность ===== */
@media (max-width: 992px) {
    .categories__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .kworks__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .catalog-layout {
        grid-template-columns: 1fr;
    }
    
    .kwork-single__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .kwork-single__sidebar {
        order: -1;
    }
    
    .kwork-card--order {
        position: static;
    }
    
    .kwork-single__title {
        font-size: 26px;
    }
    
    .orders-layout,
    .job-single__grid {
        grid-template-columns: 1fr;
    }
    
    .jobs-grid {
        grid-template-columns: 1fr;
    }
    
    .job-info-card {
        position: static;
    }
    
    .support-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header__container {
        padding: 10px 15px;
        flex-wrap: wrap;
    }
    
    .header__toggle {
        display: flex;
        order: 2;
        margin-left: auto;
    }
    
    .header__nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        order: 3;
        width: 100%;
        z-index: 1000;
    }
    
    .header__nav.is-active {
        display: flex;
    }
    
    .header__menu {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }
    
    .header__menu a {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid #eee;
    }
    
    .header__actions {
        width: 100%;
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
    }
    
    .header__actions .btn {
        width: 100%;
        text-align: center;
    }
    
    .search-form {
        order: 3;
        width: 100%;
        margin: 15px 0 0;
    }
    
    .hero__title {
        font-size: 32px;
    }
    
    .categories__grid,
    .kworks__grid {
        grid-template-columns: 1fr;
    }
    
    .footer__grid {
        grid-template-columns: 1fr;
    }
    
    .post-title {
        font-size: 28px;
    }
    
    .post-content {
        padding: 20px;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .role-switch {
        grid-template-columns: 1fr;
    }
    
    .register-card {
        padding: 30px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .job-card__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .chat-layout {
        grid-template-columns: 1fr;
    }
    
    .chat-sidebar {
        max-height: 300px;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .kwork-single__header {
        margin-bottom: 20px;
    }
    
    .kwork-single__title {
        font-size: 22px;
    }
    
    .kwork-single__seller {
        gap: 10px;
    }
    
    .kwork-single__description {
        padding: 20px;
    }
    
    .kwork-card--order {
        padding: 20px;
    }
    
    .kwork-card--order__price .price {
        font-size: 26px;
    }
    
    .reviews-section {
        padding: 20px;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .order-card__body {
        flex-direction: column;
    }
    
    .order-card__summary {
        text-align: left;
    }
    
    .container {
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .logo__text {
        font-size: 18px;
    }
    
    .header__actions .btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .page-title {
        font-size: 22px !important;
        word-wrap: break-word;
    }
    
    .btn {
        padding: 12px 15px;
        font-size: 14px;
        white-space: normal;
        word-wrap: break-word;
    }
    
    .kwork-card--order__price .price {
        font-size: 24px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px;
        max-width: 100%;
    }
    
    .kwork-single__gallery img,
    .post-thumbnail img {
        width: 100%;
        height: auto;
    }
    
    .login-page {
        margin: 40px auto;
    }
    
    .login-card {
        padding: 30px 20px;
    }
    
    .login-page .page-title {
        font-size: 26px;
    }
}

@media (max-width: 360px) {
    .header__actions .btn {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .kwork-card--order {
        padding: 15px !important;
    }
}