/* ===========================================
   MODERN CSS FOR BOARD.MP.KG
   Версия 2.1 - Унифицированная и оптимизированная
   =========================================== */

/* ===== 1. БАЗОВЫЕ СТИЛИ ===== */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --gray-color: #7f8c8d;
    --light-gray: #f8f9fa;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.15);
    --radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== 2. УТИЛИТЫ ===== */
.clear {
    clear: both;
}

.dgray {
    color: var(--gray-color);
}

.myDiv {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    margin: 20px 0;
    box-shadow: var(--shadow);
}

/* Алерты и сообщения */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin: 15px 0;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    border-color: var(--success-color);
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border-color: var(--accent-color);
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-color: var(--warning-color);
    color: #856404;
}

/* ===== 3. СОВРЕМЕННЫЙ ХЕДЕР С КАТЕГОРИЯМИ-СЛАЙДЕРОМ ===== */
.modern-header {
    background: white;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1000;
    border-bottom: 1px solid #f0f0f0;
}

/* Верхняя навигация */
.header-top-nav {
    background: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
    padding: 10px 0;
    font-size: 14px;
}

.header-top-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Левый блок: Главная */
.header-nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-home-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-home-btn:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.nav-home-btn i {
    color: #3498db;
    font-size: 16px;
}

/* Правый блок: Город + авторизация */
.header-nav-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.auth-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.login-btn, .register-btn, .logout-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 14px;
}

.login-btn i {
    color: #3498db;
}

.register-btn i {
    color: #27ae60;
}

.logout-btn i {
    color: #e74c3c;
}

.login-btn:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #2980b9;
}

.register-btn:hover {
    background: rgba(39, 174, 96, 0.1);
    color: #219653;
}

.logout-btn:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #c0392b;
}

/* Селектор города */
.city-selector {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(224, 224, 224, 0.7);
    border-radius: 6px;
    padding: 4px 8px;
    transition: all 0.2s ease;
    height: 36px;
}

.city-selector:hover {
    border-color: #3498db;
    background: white;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.1);
}

.city-icon {
    color: #3498db;
    font-size: 14px;
    opacity: 0.8;
}

.city-select {
    border: none;
    background: transparent;
    font-size: 13px;
    color: #2c3e50;
    cursor: pointer;
    padding: 0;
    margin: 0;
    min-width: 140px;
    max-width: 160px;
    outline: none;
    font-weight: 500;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237f8c8d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    background-size: 12px;
    padding-right: 16px;
}

.city-select option {
    font-size: 13px;
    padding: 6px 8px;
}

/* Основная часть хедера: Поиск + Кнопка */
.header-main {
    padding: 20px 0;
    background: white;
}

.header-main .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    gap: 30px;
}

/* Поиск (центрированный) */
.search-container {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
}

.search-form {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 15px 55px 15px 20px;
    border: 2px solid #3498db;
    border-radius: 10px 0 0 10px;
    font-size: 16px;
    background: white;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.1);
    height: 52px;
    border-right: none;
}

.search-input:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.search-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 0 10px 10px 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    border: 2px solid #3498db;
    border-left: none;
}

.search-button:hover {
    background: #2980b9;
    border-color: #2980b9;
}

.search-button i {
    margin-right: 8px;
    font-size: 16px;
}

/* Кнопка добавления объявления */
.add-button-container {
    flex-shrink: 0;
}

.add-button {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #27ae60 0%, #219653 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.2);
    white-space: nowrap;
}

.add-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
    color: white;
}

.add-button i {
    font-size: 18px;
}

/* Категории-слайдер */
.categories-slider-section {
    background: #f8f9fa;
    border-top: 1px solid #eaeaea;
    padding: 15px 0;
    position: relative;
    overflow: hidden;
}

.categories-slider-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
}

.categories-slider-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 40px;
}

/* Кнопки навигации слайдера */
.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    color: #2c3e50;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.slider-nav-btn:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
    transform: translateY(-50%) scale(1.1);
}

.slider-nav-btn.prev {
    left: 0;
}

.slider-nav-btn.next {
    right: 0;
}

.slider-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%) scale(1);
}

.slider-nav-btn:disabled:hover {
    background: white;
    color: #2c3e50;
    border-color: #e0e0e0;
    transform: translateY(-50%) scale(1);
}

/* Слайдер категорий */
.categories-slider {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE и Edge */
    padding: 10px 0;
    flex: 1;
}

.categories-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.category-slide {
    flex: 0 0 auto;
    min-width: 140px;
}

.category-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    background: white;
    border-radius: 10px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
    border: 1px solid #eaeaea;
    min-width: 100px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.category-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
    color: #3498db;
}

.category-link.active {
    background: rgba(52, 152, 219, 0.1);
    border-color: #3498db;
    color: #3498db;
}

.category-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    margin-bottom: 5px;
}

/* Цвета иконок для разных категорий */
.category-icon.house { background: linear-gradient(135deg, #3498db, #2980b9); }
.category-icon.car { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.category-icon.phone { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.category-icon.electronics { background: linear-gradient(135deg, #34495e, #2c3e50); }
.category-icon.work { background: linear-gradient(135deg, #f39c12, #d35400); }
.category-icon.services { background: linear-gradient(135deg, #1abc9c, #16a085); }
.category-icon.fashion { background: linear-gradient(135deg, #e91e63, #c2185b); }
.category-icon.real-estate { background: linear-gradient(135deg, #795548, #5d4037); }

.category-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.category-count {
    font-size: 11px;
    color: #7f8c8d;
    background: #f1f3f4;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

/* ===== 4. ОСНОВНОЙ КОНТЕНТ ===== */
.main-content {
    padding: 30px 0;
    background: #f5f7fa;
    min-height: calc(100vh - 200px);
}

.content-wrapper {
    display: flex;
    gap: 30px;
}

.sidebar {
    flex: 0 0 270px;
}

.content-column {
    flex: 1;
}

/* Хлебные крошки */
.breadcrumbs {
    margin-bottom: 20px;
    padding: 10px 0;
    font-size: 14px;
    color: #7f8c8d;
}

.breadcrumbs a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    color: #2c3e50;
}

#page-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ===== 5. СОВРЕМЕННЫЙ РУБРИКАТОР ===== */
#left_block {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.block-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-color);
}

.block-header i {
    color: var(--secondary-color);
    font-size: 18px;
}

.block-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

/* Категории */
.modern-categories {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.category-item {
    margin-bottom: 8px;
    border-radius: 6px;
    transition: var(--transition);
}

.category-item:hover {
    background: var(--light-gray);
}

.category-item.active {
    background: var(--light-color);
    border-left: 3px solid var(--secondary-color);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    cursor: pointer;
}

.toggle-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-color);
    transition: var(--transition);
}

.toggle-icon:hover {
    color: var(--secondary-color);
}

.toggle-icon.empty {
    visibility: hidden;
}

.toggle-icon i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.category-link {
    flex: 1;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
}

.category-link:hover {
    color: var(--secondary-color);
}

.category-count {
    background: var(--light-color);
    color: var(--gray-color);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

/* Подкатегории */
.subcategories {
    margin-left: 25px;
    margin-top: 5px;
    margin-bottom: 10px;
    border-left: 2px solid var(--border-color);
    padding-left: 15px;
}

.subcategory-level {
    margin-bottom: 5px;
}

.subcategory-item {
    margin-bottom: 6px;
    padding: 3px 0;
}

.subcategory-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 4px;
    transition: var(--transition);
}

.subcategory-header:hover {
    background: rgba(52, 152, 219, 0.1);
}

.subcategory-item.active .subcategory-header {
    background: rgba(52, 152, 219, 0.15);
    font-weight: 600;
}

.subcategory-link {
    flex: 1;
    color: var(--dark-color);
    font-size: 13px;
    text-decoration: none;
    transition: var(--transition);
}

.subcategory-link:hover {
    color: var(--secondary-color);
}

.subsubcategories {
    margin-left: 25px;
    margin-top: 5px;
    border-left: 1px dashed var(--border-color);
    padding-left: 15px;
}

/* ===== 6. СТРАНИЦА ОБЪЯВЛЕНИЯ ===== */
.single-ad-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.ad-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eef1f6;
}

.ad-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.ad-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.ad-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.ad-date.active {
    background: #e8f7ef;
    color: #27ae60;
}

.ad-date.expired {
    background: #fdeaea;
    color: #e74c3c;
}

.ad-category {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.ad-category:hover {
    text-decoration: underline;
}

.ad-price {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 24px;
    font-weight: 700;
    margin: 20px 0;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.ad-description {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    margin: 25px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.ad-gallery {
    margin: 30px 0;
    padding: 25px 0;
    border-top: 1px solid #eef1f6;
    border-bottom: 1px solid #eef1f6;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.ad-contacts {
    background: #f8fafc;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    border: 1px solid #e1e8f0;
}

.contacts-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.phone-button {
    background: linear-gradient(135deg, #27ae60, #219653);
    color: white;
    border: none;
    padding: 16px 35px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.phone-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.4);
}

.contact-buttons {
    display: flex;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 25px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
    min-width: 200px;
}

.contact-btn.call {
    background: #3498db;
    color: white;
}

.contact-btn.whatsapp {
    background: #25D366;
    color: white;
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    color: white;
}

.ad-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid #eef1f6;
}

.action-btn {
    padding: 10px 20px;
    background: #f8fafc;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* ===== 7. СПИСКИ ОБЪЯВЛЕНИЙ ===== */
.ads-container {
    margin-bottom: 30px;
}

.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.ad-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

.ad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.ad-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.ad-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ad-card:hover .ad-image {
    transform: scale(1.05);
}

.ad-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ad-price {
    font-size: 18px;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 10px;
}

.ad-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.ad-title-link {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s;
}

.ad-title-link:hover {
    color: #3498db;
}

/* ===== 8. ФУТЕР ===== */
.main-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ecf0f1;
    padding: 50px 0 20px;
    margin-top: 40px;
    position: relative;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    position: relative;
}

.footer-title:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: #e74c3c;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* ===== 9. ФОРМЫ ===== */
input[type='text'],
input[type='email'],
input[type='number'],
input[type='password'],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
    margin-bottom: 15px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

input[type='submit'],
input[type='button'],
button[type='submit'] {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

input[type='submit']:hover,
input[type='button']:hover,
button[type='submit']:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* ===== 10. WHATSAPP WIDGET ===== */
.whatsapp-contact-widget {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
    color: white;
    font-family: 'Inter', Arial, sans-serif;
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.whatsapp-contact-widget.collapsed {
    padding: 15px 25px;
    cursor: pointer;
    min-height: 60px;
    height: 60px;
    display: flex;
    align-items: center;
}

.whatsapp-contact-widget.collapsed .widget-expanded-content {
    display: none !important;
}

.whatsapp-contact-widget.collapsed .widget-collapsed-content {
    display: flex !important;
}

.whatsapp-contact-widget.expanded {
    max-height: 1000px;
    cursor: default;
    display: block;
    min-height: auto;
    height: auto;
}

.whatsapp-contact-widget.expanded .widget-collapsed-content {
    display: none !important;
}

.whatsapp-contact-widget.expanded .widget-expanded-content {
    display: flex !important;
}

/* Свернутый контент */
.widget-collapsed-content {
    display: none;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

.whatsapp-collapsed-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    height: 100%;
}

.whatsapp-collapsed-icon {
    position: relative;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    animation: whatsapp-pulse 2s infinite;
    flex-shrink: 0;
}

.whatsapp-collapsed-icon img {
    width: 22px;
    height: 22px;
    display: block;
}

.online-status {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 8px;
    height: 8px;
    background: #25D366;
    border: 2px solid white;
    border-radius: 50%;
}

.whatsapp-collapsed-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.whatsapp-collapsed-text h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
    line-height: 1.2;
}

.whatsapp-collapsed-text p {
    margin: 3px 0 0 0;
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.3;
    display: none;
}

.whatsapp-toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.whatsapp-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Развернутый контент */
.widget-expanded-content {
    display: none;
    flex-direction: column;
    gap: 25px;
    animation: slideDown 0.5s ease;
}

.whatsapp-expanded-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    padding-right: 40px;
}

.whatsapp-expanded-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 300px;
}

.whatsapp-expanded-icon {
    position: relative;
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: whatsapp-pulse 2s infinite;
    flex-shrink: 0;
}

.whatsapp-expanded-icon img {
    width: 40px;
    height: 40px;
    display: block;
}

.whatsapp-expanded-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.whatsapp-expanded-text h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.whatsapp-expanded-text p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.4;
}

.whatsapp-expanded-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    flex: 1;
    min-width: 300px;
}

.phone-section {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.phone-label {
    font-size: 14px;
    margin-bottom: 5px;
    opacity: 0.9;
}

.phone-number {
    color: white;
    text-decoration: none;
    font-size: 28px;
    font-weight: 700;
    display: inline-block;
    transition: all 0.3s ease;
    line-height: 1.2;
}

.phone-number:hover {
    transform: scale(1.05);
}

.whatsapp-main-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: white;
    color: #25D366;
    text-decoration: none;
    padding: 14px 30px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    line-height: 1;
}

.whatsapp-main-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    color: #25D366;
}

.whatsapp-quick-messages {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.quick-message-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.3);
    white-space: nowrap;
    line-height: 1.4;
}

.quick-message-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* Анимации */
@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 11. АДАПТИВНОСТЬ ===== */
@media (max-width: 992px) {
    .header-main .container {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-container {
        width: 100%;
        max-width: 100%;
    }
    
    .search-form {
        width: 100%;
    }
    
    .add-button-container {
        align-self: flex-end;
    }
    
    .content-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        display: none;
    }
    
    .ads-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .categories-slider-wrapper {
        padding: 0 30px;
    }
    
    .slider-nav-btn {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 768px) {
    .header-top-nav .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-nav-left, .header-nav-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .auth-links {
        order: 1;
        margin-top: 5px;
    }
    
    .city-selector {
        order: 2;
    }
    
    .login-btn span, .register-btn span, .logout-btn span, .nav-home-btn span {
        font-size: 12px;
    }
    
    .search-button span {
        display: none;
    }
    
    .search-button {
        min-width: 60px;
        padding: 0 15px;
    }
    
    .search-button i {
        margin-right: 0;
    }
    
    .add-button {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .add-button span {
        font-size: 14px;
    }
    
    .category-slide {
        min-width: 160px;
    }
    
    .category-link {
        padding: 10px 12px;
        min-width: 85px;
    }
    
    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .category-name {
        font-size: 12px;
    }
    
    .whatsapp-contact-widget.collapsed {
        padding: 12px 20px;
        min-height: 100px;
        height: 100px;
    }
    
    .whatsapp-collapsed-icon {
        width: 35px;
        height: 35px;
    }
    
    .whatsapp-collapsed-icon img {
        width: 20px;
        height: 20px;
    }
    
    .whatsapp-collapsed-text h4 {
        font-size: 14px;
    }
    
    .whatsapp-collapsed-text p {
        font-size: 12px;
        display: block;
    }
    
    .whatsapp-toggle-btn {
        width: 28px;
        height: 28px;
    }
    
    .whatsapp-expanded-top {
        flex-direction: column;
        text-align: center;
        padding-right: 0;
    }
    
    .whatsapp-expanded-left,
    .whatsapp-expanded-right {
        min-width: 100%;
        align-items: center;
        text-align: center;
    }
    
    .whatsapp-expanded-text h3 {
        font-size: 20px;
    }
    
    .whatsapp-expanded-text p {
        font-size: 15px;
    }
    
    .phone-section {
        text-align: center;
        align-items: center;
    }
    
    .phone-number {
        font-size: 24px;
    }
    
    .whatsapp-main-button {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .whatsapp-quick-messages {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .quick-message-btn {
        width: 100%;
        text-align: center;
        padding: 8px 15px;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }
}

@media (max-width: 480px) {
    .header-nav-right {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .auth-links {
        order: 2;
    }
    
    .city-selector {
        order: 1;
        margin-bottom: 5px;
        padding: 3px 6px;
        height: 32px;
        gap: 4px;
    }
    
    .city-select {
        font-size: 12px;
        min-width: 100px;
        max-width: 120px;
    }
    
    .city-icon {
        font-size: 12px;
    }
    
    .search-input {
        padding: 12px 50px 12px 15px;
        font-size: 14px;
        height: 48px;
    }
    
    .search-button {
        height: 48px;
        min-width: 50px;
        padding: 0 12px;
    }
    
    .add-button {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .categories-slider-wrapper {
        padding: 0 25px;
    }
    
    .slider-nav-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .category-slide {
        min-width: 130px;
    }
    
    .category-link {
        padding: 8px 10px;
        min-width: 75px;
    }
    
    .category-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .whatsapp-contact-widget {
        border-radius: 10px;
        margin: 15px 0;
    }
    
    .whatsapp-contact-widget.collapsed {
        padding: 10px 15px;
        min-height: 48px;
        height: 48px;
    }
    
    .whatsapp-collapsed-icon {
        width: 32px;
        height: 32px;
    }
    
    .whatsapp-collapsed-icon img {
        width: 18px;
        height: 18px;
    }
    
    .whatsapp-collapsed-text h4 {
        font-size: 13px;
    }
    
    .whatsapp-collapsed-text p {
        font-size: 11px;
    }
    
    .whatsapp-expanded-text h3 {
        font-size: 18px;
    }
    
    .whatsapp-expanded-text p {
        font-size: 14px;
    }
    
    .phone-number {
        font-size: 20px;
    }
    
    .whatsapp-expanded-icon {
        width: 60px;
        height: 60px;
    }
    
    .whatsapp-expanded-icon img {
        width: 32px;
        height: 32px;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}