/* ===== БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #8B5CF6;
    --primary-dark: #7a00df;
    --secondary: #64748b;
    --text: #1A202C;
    --text-light: #64748b;
    --bg: #ffffff;
    --bg-gray: #F8F9FA;
    --border: #E2E8F0;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-narrow {
    max-width: 800px;
    margin: 0 auto;
}

/* ===== HEADER ===== */
.header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.logo a {
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 24px;
}

.nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.2s;
}

.nav a:hover,
.nav a.active {
    color: var(--primary);
}

/* ===== HERO ===== */
.hero {
    padding: 60px 0 40px;
    background: #ffffff;
    color: var(--text);
    text-align: center;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
}


.hero-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text);
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 32px;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto 32px;
    display: flex;
    gap: 8px;
}

.hero-search-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    transition: border-color 0.2s;
}

.hero-search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.hero-search-btn {
    padding: 14px 32px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.hero-search-btn:hover {
    background: var(--primary-dark);
}

.hero-label {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 24px;
}

.hero-label strong {
    color: var(--text);
    font-weight: 600;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    margin-top: 48px;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.hero-stat-label {
    display: block;
    font-size: 14px;
    color: var(--text-light);
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat strong {
    font-size: 42px;
    font-weight: 700;
    color: var(--text);
}

.stat span {
    font-size: 16px;
    color: var(--text-light);
}

/* Большой счетчик нейросетей */
.hero-counter {
    font-size: 64px;
    font-weight: 700;
    color: var(--primary);
    margin: 24px 0;
}

.hero-counter-label {
    font-size: 20px;
    color: var(--text-light);
    margin-bottom: 32px;
}

/* ===== CHIPS SECTION ===== */
.chips-section {
    padding: 24px 0;
    background: white;
    border-bottom: 1px solid var(--border);
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-gray);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.chip:hover {
    background: #E0E7FF;
    border-color: var(--primary);
    color: var(--primary);
}

/* Кнопка "Все категории" */
.all-categories-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
}

.all-categories-btn:hover {
    background: var(--bg-gray);
    border-color: var(--primary);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-block {
    width: 100%;
    text-align: center;
}

/* ===== SECTIONS ===== */
.section {
    padding: 80px 0;
}

.section-gray {
    background: var(--bg-gray);
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
}

.section-description {
    font-size: 18px;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 48px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.section-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.section-link {
    color: var(--primary);
    font-weight: 600;
    transition: opacity 0.2s;
}

.section-link:hover {
    opacity: 0.8;
}

.section-cta {
    text-align: center;
    margin-top: 48px;
}

/* ===== ALL SERVICES COLUMNS ===== */
.all-services-columns {
    background: var(--bg-gray);
}

.columns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.service-column {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.column-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
    border-bottom: 2px solid var(--border);
    padding-bottom: 12px;
}

.column-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.column-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.column-item:hover {
    background: var(--bg-gray);
}

.item-number {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    min-width: 24px;
}

.item-logo {
    font-size: 24px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-name {
    font-size: 14px;
    font-weight: 500;
}

.column-btn {
    display: block;
    text-align: center;
    padding: 12px 16px;
    margin-top: 16px;
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.column-btn:hover {
    background: var(--primary);
    color: white;
}

/* ===== CATEGORIES ===== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.category-card {
    background: white;
    padding: 32px;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.category-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.category-card p {
    font-size: 14px;
    color: var(--text-light);
}

.category-card-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.category-card-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

.category-card-description {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 12px;
    display: block;
}

.category-card-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    display: block;
}

/* Варианты сетки категорий */
.categories-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.categories-grid--full {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Большая карточка категории */
.category-card--large {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
}

.category-emoji {
    font-size: 40px;
    flex-shrink: 0;
}

.category-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.category-info {
    flex: 1;
}

.category-count {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 2px;
}

/* ===== SERVICES GRID ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.service-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    border-color: var(--border);
}

.service-logo {
    width: 48px;
    height: 48px;
    background: var(--bg-gray);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 12px;
}

.service-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 16px;
}

.service-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.service-card-description {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 16px;
    flex-grow: 1;
    line-height: 1.5;
}

.service-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tag {
    background: #E0E7FF;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    color: #5B21B6;
    font-weight: 500;
}

.badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.badge-price {
    background: #dcfce7;
    color: #15803d;
    font-weight: 600;
}

.badge-type {
    background: #E0E7FF;
    color: #5B21B6;
    font-weight: 600;
}

.badge-api {
    background: #dbeafe;
    color: #1e40af;
}

.badge-telegram {
    background: #dbeafe;
    color: #0088cc;
}

.badge-russian {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-opensource {
    background: #d1fae5;
    color: #047857;
}

.badge-nocode {
    background: #fef3c7;
    color: #b45309;
}

/* ===== IN-SCALE STYLE SERVICE CARDS ===== */
.service-card-inscale {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s;
    text-decoration: none;
    color: var(--text);
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.service-card-inscale:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.service-card-logo {
    width: 80px;
    height: 80px;
    min-width: 80px;
    background: var(--bg-gray);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border);
}

.service-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.service-logo-placeholder {
    font-size: 36px;
    opacity: 0.6;
}

.service-card-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.service-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    flex: 1;
}

.service-card-stats {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 13px;
    white-space: nowrap;
}

.service-views {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-light);
}

.service-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #f59e0b;
    font-weight: 600;
}

.service-description-short {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}

.service-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.service-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-small {
    background: #E0E7FF;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    color: #5B21B6;
    font-weight: 500;
}

.service-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.badge-small {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.badge-small.badge-price {
    background: #dcfce7;
    color: #15803d;
}

.badge-small.badge-feature {
    background: #dbeafe;
    color: #1e40af;
}

/* ===== SERVICE PAGE SPECIFIC ===== */

/* Hero секция страницы сервиса */
.service-hero {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    margin-bottom: 40px;
}

.service-hero-main {
    flex: 1;
}

.service-hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Большая карточка сервиса */
.service-card-large {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
}

/* Верхняя строка мета-информации */
.service-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}

.service-card-left-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.service-card-right-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Pill / Badge стили */
.pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: var(--bg-gray);
    color: var(--text);
}

.pill-green {
    background: #d1fae5;
    color: #065f46;
}

.pill-orange {
    background: #fef3c7;
    color: #92400e;
}

/* Meta text */
.meta {
    font-size: 14px;
    color: var(--text-light);
}

.meta strong {
    color: var(--primary);
    font-weight: 600;
}

/* Stats в правой части */
.service-card-right-meta .stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-light);
}

.service-card-right-meta .stars {
    color: #fbbf24;
    font-size: 14px;
}

/* Скриншот / медиа блок */
.service-media {
    margin-bottom: 20px;
}

.service-screenshot {
    width: 100%;
    height: 250px;
    background: var(--bg-gray);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.service-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-screenshot #service-logo {
    font-size: 48px;
    color: var(--text-light);
}

/* Основной контент карточки */
.service-card-body {
    display: flex;
    gap: 24px;
}

.service-summary {
    flex: 1;
}

/* Ряд с оценкой */
.rating-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    font-size: 14px;
    color: var(--text-light);
}

.rating-row .stars {
    color: #fbbf24;
    font-size: 18px;
    cursor: pointer;
}

/* Sidebar Panel */
.sidebar-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.sidebar-panel h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

/* Контент сервиса (текст) */
.service-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin-top: 40px;
}

.service-content h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 32px 0 16px;
    color: var(--text);
}

.service-content h2:first-child {
    margin-top: 0;
}

.service-content p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 16px;
}

.feature-list {
    padding-left: 20px;
    margin-bottom: 24px;
}

.feature-list li {
    margin-bottom: 8px;
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.6;
}

/* CTA блок */
.service-cta {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* Рекламные карточки */
.service-ads {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ad-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.ad-label {
    background: var(--bg-gray);
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ad-body {
    padding: 16px;
}

.ad-body h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.ad-body p {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.ad-image {
    width: 60px;
    height: 60px;
    background: var(--bg-gray);
    border-radius: 8px;
    margin-bottom: 12px;
}

/* Responsive для страницы сервиса */
@media (max-width: 1024px) {
    .service-hero {
        grid-template-columns: 1fr;
    }

    .service-hero-sidebar {
        order: 2;
    }

    .service-content {
        grid-template-columns: 1fr;
    }

    .service-ads {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .ad-card {
        flex: 1;
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .service-card-large {
        padding: 16px;
    }

    .service-card-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .service-card-body {
        flex-direction: column;
    }

    .service-screenshot {
        height: 180px;
    }
}

.service-icon-large {
    font-size: 48px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Счетчик просмотров */
.stat-dot {
    color: var(--primary);
    font-size: 18px;
    margin-right: 4px;
}

/* Дата обновления */
.service-updated {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 16px;
}

/* Tagline сервиса */
.service-tagline {
    font-size: 18px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 32px;
}

/* Кнопки сортировки */
.sort-btn {
    background: white;
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
    transition: all 0.2s;
}

.sort-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.sort-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== CATALOG PAGE ===== */
.catalog-page {
    background: white;
}

.catalog-hero {
    text-align: center;
    padding: 40px 0;
}

.catalog-hero h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.catalog-subtitle {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 32px;
}

/* Фильтры каталога */
.filters-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 32px;
}

.filters-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-select {
    background: white;
    cursor: pointer;
}

.catalog-section-title {
    font-size: 28px;
    font-weight: 700;
    margin: 40px 0 32px;
    text-align: center;
}

/* Сетка категорий (карточки с списками) */
.catalog-categories-grid,
.catalog-categories-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.category-card-catalog {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}

.category-card-catalog:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.category-header-link {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s;
}

.category-header-link:hover {
    color: var(--primary);
}

.category-header-link:hover h3 {
    color: var(--primary);
}

.category-header-link h3,
.category-card-catalog h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: var(--text);
    cursor: pointer;
}

.category-services-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-service-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
}

.category-service-item:hover {
    color: var(--primary);
}

.category-view-all {
    display: block;
    text-align: center;
    padding: 12px;
    margin-top: 12px;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    border-top: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.category-view-all:hover {
    background: var(--bg-gray);
}

.category-service-number {
    color: var(--text-light);
    font-size: 13px;
    min-width: 20px;
}

.category-service-icon {
    font-size: 18px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* .category-view-all уже определен выше */

.search-box {
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 16px 24px;
    border: 2px solid var(--primary);
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.1);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2);
}

.search-input::placeholder {
    color: var(--text-light);
}

/* ===== FILTERS DROPDOWN BAR ===== */
.filters-dropdown-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.filter-dropdown {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text);
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-dropdown:hover {
    border-color: var(--primary);
}

.filter-dropdown:focus {
    outline: none;
    border-color: var(--primary);
}

.filters-dropdown-bar .btn {
    padding: 12px 24px;
    white-space: nowrap;
}

/* ===== SERVICE PAGE ===== */
.breadcrumbs {
    padding: 20px 0;
    font-size: 14px;
    color: var(--text-light);
}

.breadcrumbs a {
    color: var(--text-light);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs span {
    margin: 0 8px;
}

.service-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    margin-bottom: 64px;
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 24px;
}

.service-badges {
    display: flex;
    gap: 8px;
}

.service-meta {
    color: var(--text-light);
    margin-bottom: 24px;
}

.service-description {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 24px;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.service-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.service-info-grid {
    display: grid;
    gap: 24px;
}

.info-card {
    background: var(--bg-gray);
    padding: 24px;
    border-radius: var(--radius);
}

.info-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.info-card p, .info-card ul {
    color: var(--text-light);
    font-size: 14px;
}

.info-card ul {
    padding-left: 20px;
}

.info-card li {
    margin-bottom: 8px;
}

/* Sidebar */
.sidebar-card {
    background: white;
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.sidebar-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 8px;
}

.sidebar-card p {
    font-size: 16px;
    font-weight: 600;
}

/* Sidebar List */
.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s;
}

.sidebar-item:hover {
    background: var(--bg-gray);
}

.sidebar-item-number {
    font-size: 12px;
    color: var(--text-light);
    min-width: 16px;
}

.sidebar-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 16px;
}

.sidebar-item-icon img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: contain;
}

.sidebar-item-name {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ad-block {
    background: var(--bg-gray);
    border: 2px dashed var(--border);
    padding: 60px 20px;
    border-radius: var(--radius);
    text-align: center;
    color: var(--text-light);
}

/* Related services */
.related-services {
    margin-top: 64px;
}

.related-services h2 {
    font-size: 28px;
    margin-bottom: 32px;
}

/* ===== FIND TOOLS SECTION ===== */
.find-tools-section {
    background: var(--bg-gray);
}

.find-tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.find-tools-column {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.find-tools-column h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

.find-tools-column ul {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.find-tools-column ul li {
    margin-bottom: 12px;
}

.find-tools-column ul li a {
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    display: block;
    padding: 4px 0;
}

.find-tools-column ul li a:hover {
    color: var(--primary);
}

.show-all-link {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin-top: 8px;
    width: 100%;
}

.show-all-link:hover {
    color: var(--primary-dark);
}

.quick-filters-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.quick-filter-btn {
    background: var(--primary);
    color: white;
    padding: 12px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s;
}

.quick-filter-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== TEXT INFO BLOCKS ===== */
.text-info-blocks {
    background: white;
}

.text-info-item {
    display: flex;
    align-items: center;
    gap: 48px;
    margin-bottom: 64px;
    padding: 32px 0;
}

.text-info-item.full-width {
    background: var(--bg-gray);
    padding: 48px;
    border-radius: var(--radius);
    justify-content: space-between;
}

.text-info-item.with-icon-left {
    flex-direction: row;
}

.text-info-item.with-icon-right {
    flex-direction: row-reverse;
}

.text-info-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
    line-height: 1.3;
}

.text-info-content p {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 16px;
}

.text-info-content-right,
.text-info-content-left {
    flex: 1;
}

.text-info-content-right h2,
.text-info-content-left h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.text-info-content-right p,
.text-info-content-left p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.7;
}

.text-info-icon,
.text-info-icon-left,
.text-info-icon-right {
    flex-shrink: 0;
}

.text-info-icon svg,
.text-info-icon-left svg,
.text-info-icon-right svg {
    opacity: 0.8;
}

/* ===== SEO CONTENT ===== */
.seo-content {
    background: var(--bg-gray);
}

.seo-content h2 {
    font-size: 32px;
    margin-bottom: 16px;
}

.seo-content h3 {
    font-size: 24px;
    margin-top: 32px;
    margin-bottom: 12px;
}

.seo-content p {
    margin-bottom: 16px;
    color: var(--text-light);
}

.seo-content ul {
    margin-bottom: 24px;
    padding-left: 24px;
}

.seo-content li {
    margin-bottom: 12px;
    color: var(--text-light);
}

/* ===== NO RESULTS ===== */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
}

.no-results p:first-child {
    font-size: 48px;
    margin-bottom: 16px;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 48px;
    padding: 32px 0;
}

.pagination-btn {
    padding: 10px 20px;
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-info {
    color: var(--text-light);
    font-size: 14px;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--text);
    color: white;
    padding: 48px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 32px;
}

.footer-section h4 {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 700;
}

.footer-section p {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

.footer-section ul {
    list-style: none;
}

/* Footer Brand Section */
.footer-brand .footer-logo h4 {
    font-size: 20px;
    margin-bottom: 12px;
}

.footer-tagline {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    text-decoration: none;
    font-size: 20px;
    transition: all 0.2s;
}

.social-icon:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* Footer Categories Section */
.footer-categories ul {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-counter {
        font-size: 48px;
    }

    .hero-label, .hero-counter-label {
        font-size: 16px;
    }

    .catalog-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-box {
        width: 100%;
    }

    .filters-dropdown-bar {
        flex-direction: column;
    }

    .filter-dropdown {
        width: 100%;
    }

    .filters-dropdown-bar .btn {
        width: 100%;
    }

    .service-layout {
        grid-template-columns: 1fr;
    }

    .service-actions {
        flex-direction: column;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .columns-grid {
        grid-template-columns: 1fr;
    }

    .chips-container {
        justify-content: flex-start;
    }

    .find-tools-grid {
        grid-template-columns: 1fr;
    }

    .text-info-item,
    .text-info-item.full-width,
    .text-info-item.with-icon-left,
    .text-info-item.with-icon-right {
        flex-direction: column !important;
        text-align: center;
    }

    .text-info-icon svg,
    .text-info-icon-left svg,
    .text-info-icon-right svg {
        width: 120px;
        height: 120px;
    }

    .text-info-content h2 {
        font-size: 22px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .quick-filters-buttons {
        flex-direction: column;
    }

    .quick-filter-btn {
        width: 100%;
    }
}

/* ===== CATEGORIES PAGE ===== */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 0;
    font-size: 14px;
    color: var(--text-light);
}

.breadcrumbs a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs span:last-child {
    color: var(--text);
    font-weight: 500;
}

.categories-hero {
    text-align: center;
    margin: 40px 0;
}

.categories-hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
}

.category-filter-tabs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 32px 0;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 12px 24px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text);
}

.filter-tab:hover {
    border-color: var(--primary);
    background: #f8f9ff;
}

.filter-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.categories-section-title {
    font-size: 28px;
    font-weight: 700;
    margin: 40px 0 32px;
    text-align: center;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 60px;
}

.category-item-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-item-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.category-item-icon {
    font-size: 32px;
    min-width: 40px;
}

.category-item-info {
    flex: 1;
}

.category-item-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.category-item-count {
    font-size: 13px;
    color: var(--text-light);
}

/* ===== CATEGORIES LIST PAGE ===== */
.categories-page {
    padding: 40px 0;
}

.categories-page h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
}

.page-subtitle {
    font-size: 16px;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 48px;
}

/* ===== CATEGORY PAGE ===== */
.category-page {
    padding: 40px 0;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}

.category-header-emoji {
    font-size: 48px;
}

.category-header-info h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.category-count {
    font-size: 14px;
    color: var(--text-light);
}

/* ===== CATEGORY PAGE NEUROFOLDER STYLE ===== */
.category-page-neurofolder {
    padding: 0 0 60px;
}

.category-hero {
    text-align: center;
    margin: 40px 0;
}

.category-hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
}

.category-hero p {
    font-size: 16px;
    color: var(--text-light);
}

/* Фильтры сверху */
.category-filters-top {
    margin: 32px 0 24px;
    padding: 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.filters-checkboxes-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.filter-checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
    white-space: nowrap;
}

.filter-checkbox-inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.filter-checkbox-inline:hover {
    color: var(--primary);
}

/* Сортировка и поиск в одну строку */
.category-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    gap: 24px;
}

.sort-buttons-inline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-buttons-inline span {
    font-size: 14px;
    color: var(--text-light);
}

.sort-btn-inline {
    padding: 8px 16px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text);
    position: relative;
}

.sort-btn-inline:hover {
    color: var(--primary);
}

.sort-btn-inline.active {
    color: var(--primary);
    font-weight: 600;
}

.sort-btn-inline.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.search-box-inline {
    flex-shrink: 0;
}

/* Services Grid - 4 колонки */
.services-grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.service-card-neurofolder {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    position: relative;
}

.service-card-neurofolder:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-4px);
    border-color: var(--primary);
}

/* Номер рейтинга */
.service-rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1;
}

/* Изображение сервиса */
.service-card-image-large {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-gray);
    display: block;
}

/* Контент карточки */
.service-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.service-card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--text);
    line-height: 1.3;
}

.service-card-description-full {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}

/* Статистика (просмотры, рейтинг) */
.service-card-stats-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.service-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-light);
}

.service-rating-stars {
    color: #fbbf24;
    font-size: 14px;
}

/* Теги на карточке */
.service-card-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-gray);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.2s;
}

.tag-link:hover {
    background: var(--primary);
    color: white;
}

/* Бейджи (Бесплатно, VPN, и т.д.) */
.service-card-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.badge-neurofolder {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-free {
    background: #d1fae5;
    color: #065f46;
}

.badge-trial {
    background: #dbeafe;
    color: #1e40af;
}

.badge-vpn {
    background: #fef3c7;
    color: #92400e;
}

.badge-telegram {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-api {
    background: #f3e8ff;
    color: #6b21a8;
}

.badge-russian {
    background: #fee2e2;
    color: #991b1b;
}

/* Mobile */
@media (max-width: 1024px) {
    .services-grid-4col {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-controls-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-box-inline {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .category-hero h1 {
        font-size: 28px;
    }

    .services-grid-4col {
        grid-template-columns: 1fr;
    }

    .filters-checkboxes-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .category-filters-top {
        padding: 16px;
    }

    .categories-hero h1 {
        font-size: 28px;
    }

    .category-filter-tabs {
        flex-direction: column;
    }

    .filter-tab {
        width: 100%;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== ADVERTISING BLOCKS ===== */

/* Нижний рекламный блок */
.ad-bottom-section {
    margin: 40px 0;
    padding: 20px 0;
}

.ad-bottom-block {
    background: var(--bg-gray);
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    min-height: 100px;
}

.ad-bottom-placeholder {
    color: var(--text-light);
    font-size: 14px;
}

/* Sticky блок справа (Яндекс.Директ) */
.ad-sticky-container {
    position: fixed;
    right: 20px;
    top: 120px;
    width: 160px;
    z-index: 50;
}

.ad-sticky-placeholder {
    background: var(--bg-gray);
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 20px 10px;
    text-align: center;
    color: var(--text-light);
    font-size: 12px;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Скрыть sticky на маленьких экранах */
@media (max-width: 1400px) {
    .ad-sticky-container {
        display: none;
    }
}

/* Боковые рекламные карточки */
.ads-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Адаптивность рекламы */
@media (max-width: 768px) {
    .ad-bottom-block {
        padding: 16px;
    }
}

/* ===== FAVORITES (ИЗБРАННОЕ) ===== */

/* Кнопка избранного на карточках */
.favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    color: #9ca3af;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.favorite-btn:hover {
    transform: scale(1.1);
    color: #ef4444;
}

.favorite-btn.active {
    color: #ef4444;
    background: #fef2f2;
}

.favorite-btn.active:hover {
    background: #fee2e2;
}

/* Большая кнопка на странице сервиса */
.favorite-btn-large {
    width: 48px;
    height: 48px;
    font-size: 24px;
}

/* Счётчик избранного в навигации */
.favorites-link {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.favorites-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
}

/* Уведомление */
.favorites-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1f2937;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.favorites-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Страница избранного */
.favorites-page {
    padding: 40px 0;
}

.favorites-page h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.favorites-page .subtitle {
    color: var(--text-light);
    margin-bottom: 32px;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Пустое избранное */
.favorites-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
}

.favorites-empty-icon {
    font-size: 64px;
    color: #e5e7eb;
    margin-bottom: 16px;
}

.favorites-empty h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.favorites-empty p {
    color: var(--text-light);
    margin-bottom: 24px;
}

/* Контейнер для кнопки избранного на странице сервиса */
#favorite-btn-container {
    display: inline-flex;
    margin-left: 16px;
}

/* Адаптивность избранного */
@media (max-width: 768px) {
    .favorite-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .favorites-grid {
        grid-template-columns: 1fr;
    }

    .favorites-empty {
        padding: 40px 16px;
    }
}

/* ===== SERVICE PAGE NEUROFOLDER STYLE ===== */

/* Основной layout страницы */
.service-page-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}

.service-main-content {
    min-width: 0;
}

/* Карточка сервиса */
.service-card-nf {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
}

/* Верхняя панель с мета-информацией */
.service-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.service-top-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.service-top-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Бейдж рейтинга */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

/* Ссылка на категорию */
.category-link {
    font-size: 14px;
    color: var(--text-light);
}

.category-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.category-link a:hover {
    text-decoration: underline;
}

/* Бейджи цены */
.price-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.price-badge.price-free {
    background: #d1fae5;
    color: #065f46;
}

.price-badge.price-freemium {
    background: #dbeafe;
    color: #1e40af;
}

.price-badge.price-paid {
    background: #fef3c7;
    color: #92400e;
}

/* Бейдж VPN */
.vpn-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #fee2e2;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #991b1b;
}

/* Статистика в правой части */
.views-count {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--text-light);
}

.rating-stars {
    color: #fbbf24;
    font-size: 16px;
}

.rating-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

/* Заголовок с логотипом */
.service-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.service-logo-small {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gray);
    flex-shrink: 0;
}

.service-logo-small img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-placeholder {
    font-size: 28px;
}

.service-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    flex: 1;
}

.favorite-btn-inline {
    position: relative;
    top: auto;
    right: auto;
    flex-shrink: 0;
}

/* Двухколоночный грид: скриншот + инфо */
.service-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Колонка со скриншотом */
.service-screenshot-col {
    min-width: 0;
}

.service-screenshot-wrapper {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--bg-gray);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

.service-screenshot-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-screenshot-wrapper img.screenshot-logo {
    object-fit: contain;
    padding: 20px;
}

.screenshot-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.screenshot-placeholder span {
    font-size: 64px;
    opacity: 0.5;
}

/* Колонка с информацией */
.service-info-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Секция оценки */
.rating-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rating-label {
    font-size: 14px;
    color: var(--text-light);
}

.stars-interactive {
    font-size: 20px;
    color: #e5e7eb;
    cursor: pointer;
    letter-spacing: 2px;
}

.stars-interactive:hover {
    color: #fbbf24;
}

/* Краткое описание */
.service-short-desc {
    font-size: 16px;
    color: var(--text);
    line-height: 1.6;
    margin: 0;
}

/* Кнопка перехода на сайт */
.btn-visit-site {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    width: 100%;
    text-align: center;
}

.btn-visit-site:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.icon-external {
    font-size: 18px;
}

/* Дата обновления */
.service-updated-date {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
    text-align: center;
}

/* Секция перевода */
.translate-section {
    margin-bottom: 16px;
}

.translate-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.translate-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Блок описания */
.service-description-block {
    background: #faf5ff;
    border-radius: 16px;
    padding: 32px;
}

.service-intro {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 24px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.service-description-block h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin: 32px 0 16px;
}

.service-description-block h2:first-of-type {
    margin-top: 0;
}

.service-description-block p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 16px;
}

.features-list {
    padding-left: 24px;
    margin-bottom: 24px;
}

.features-list li {
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.6;
}

.service-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Сайдбар */
.service-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 100px;
}

.sidebar-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
}

.sidebar-panel h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.sidebar-services-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-service-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.sidebar-service-item:hover {
    background: var(--bg-gray);
}

.sidebar-service-item.active {
    background: #f3e8ff;
    color: var(--primary);
}

.sidebar-number {
    font-size: 13px;
    color: var(--text-light);
    min-width: 20px;
}

.sidebar-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.sidebar-icon img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: contain;
}

.sidebar-name {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-view-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    margin-top: 12px;
    background: white;
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.sidebar-view-all:hover {
    background: var(--primary);
    color: white;
}

/* Рекламный блок рекомендаций */
.ad-recommendation {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.ad-label-star {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
}

.ad-images-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 8px;
}

.ad-images-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
}

.ad-service-info {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid var(--border);
}

.ad-service-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-gray);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.ad-service-details h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--text);
}

.ad-service-details p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}

/* Адаптивность страницы сервиса */
@media (max-width: 1024px) {
    .service-page-layout {
        grid-template-columns: 1fr;
    }

    .service-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar-panel,
    .ad-recommendation {
        flex: 1;
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .service-card-nf {
        padding: 16px;
    }

    .service-top-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .service-top-right {
        width: 100%;
        justify-content: flex-start;
    }

    .service-title-row {
        flex-wrap: wrap;
    }

    .service-title {
        font-size: 24px;
        flex-basis: 100%;
        order: 2;
        margin-top: 12px;
    }

    .favorite-btn-inline {
        order: 1;
        margin-left: auto;
    }

    .service-content-grid {
        grid-template-columns: 1fr;
    }

    .service-description-block {
        padding: 20px;
    }

    .sidebar-panel,
    .ad-recommendation {
        min-width: 100%;
    }
}

/* ===== REVIEWS SECTION ===== */
.reviews-section {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 24px;
    border: 1px solid var(--border);
}

.reviews-section h2 {
    margin-bottom: 20px;
    font-size: 20px;
}

/* Review Form */
.review-form-wrapper {
    margin-bottom: 24px;
}

.review-form {
    background: var(--bg-gray);
    border-radius: var(--radius);
    padding: 16px;
}

.review-form-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.review-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.review-user-name {
    font-weight: 600;
    color: var(--text);
}

.review-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
}

.review-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.review-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.char-counter {
    font-size: 12px;
    color: var(--text-light);
}

.btn-submit-review {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit-review:hover {
    background: var(--primary-dark);
}

.btn-submit-review:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Login to Review */
.login-to-review {
    background: var(--bg-gray);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}

.login-to-review p {
    margin-bottom: 16px;
    color: var(--text-light);
}

.btn-google-login {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-google-login:hover {
    background: var(--bg-gray);
    border-color: var(--text-light);
}

.google-icon {
    flex-shrink: 0;
}

/* Reviews List */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.reviews-loading,
.reviews-empty,
.reviews-error {
    text-align: center;
    padding: 32px;
    color: var(--text-light);
}

.review-item {
    background: var(--bg-gray);
    border-radius: var(--radius);
    padding: 16px;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.review-meta {
    flex: 1;
}

.review-author {
    display: block;
    font-weight: 600;
    color: var(--text);
}

.review-date {
    font-size: 12px;
    color: var(--text-light);
}

.review-delete-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.review-delete-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

.review-text {
    line-height: 1.6;
    color: var(--text);
    white-space: pre-wrap;
}

/* Interactive Stars */
.stars-interactive {
    display: inline-flex;
    gap: 2px;
}

.stars-interactive .star {
    font-size: 20px;
    color: #d1d5db;
    transition: all 0.15s;
}

.stars-interactive .star.active,
.stars-interactive .star.highlighted {
    color: #fbbf24;
}

.stars-interactive .star:hover {
    transform: scale(1.1);
}

/* Notification */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 14px 24px;
    border-radius: 8px;
    background: var(--text);
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification-success {
    background: #10b981;
}

.notification-error {
    background: #ef4444;
}

/* User menu in header */
.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 20px;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.user-name {
    font-weight: 500;
    font-size: 14px;
}

.btn-logout {
    font-size: 13px;
    color: var(--text-light);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
}

.btn-logout:hover {
    color: var(--text);
}

.btn-login {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-login:hover {
    background: var(--bg-gray);
}

@media (max-width: 768px) {
    .reviews-section {
        padding: 16px;
    }

    .review-form-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .btn-submit-review {
        width: 100%;
    }

    .user-name {
        display: none;
    }
}

/* ===== LANGUAGE SWITCHER ===== */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 16px;
}

.lang-option {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.2s;
}

.lang-option:hover {
    background: var(--bg-gray);
    color: var(--text);
}

.lang-option.active {
    background: var(--primary);
    color: white;
}

@media (max-width: 768px) {
    .lang-switcher {
        position: absolute;
        top: 16px;
        right: 60px;
    }
}


/* ========================================================================
   АДАПТИВНЫЙ ДИЗАЙН (MOBILE-FIRST ПОДХОД)

   Описание стратегии:
   - Базовые стили оптимизированы для мобильных устройств (320px-768px)
   - Используем min-width для добавления стилей на больших экранах
   - Breakpoints основаны на реальных устройствах и контенте

   Breakpoints:
   - Mobile: 320px-767px (базовые стили, без media query)
   - Tablet: 768px-1023px (@media min-width: 768px)
   - Desktop: 1024px-1439px (@media min-width: 1024px)
   - Large Desktop: 1440px+ (@media min-width: 1440px)

   Принципы:
   - Touch-friendly элементы на мобильных (min 44px кнопки)
   - Fluid typography с использованием clamp()
   - Responsive grid с CSS Grid auto-fill
   - Hamburger menu на мобильных, полная навигация на десктопе

   Автор: Generated for Airobco AI Catalog
   Дата: 2026-02-08
   ======================================================================== */


/* ========================================================================
   БАЗОВЫЕ RESPONSIVE ПЕРЕМЕННЫЕ
   Используются для consistent breakpoints во всём проекте
   ======================================================================== */
:root {
    /* Breakpoints для использования в JS (если нужно) */
    --breakpoint-tablet: 768px;
    --breakpoint-desktop: 1024px;
    --breakpoint-large: 1440px;

    /* Mobile-first размеры контейнеров */
    --container-mobile: 100%;
    --container-tablet: 720px;
    --container-desktop: 1140px;
    --container-large: 1200px;

    /* Responsive spacing (используем для padding/margin) */
    --spacing-mobile: 16px;
    --spacing-tablet: 24px;
    --spacing-desktop: 32px;
}


/* ========================================================================
   МОБИЛЬНЫЕ БАЗОВЫЕ СТИЛИ (320px-767px)
   Эти стили применяются по умолчанию без media query
   ======================================================================== */

/* Контейнер: на мобильных отступы меньше для экономии места */
.container {
    padding: 0 var(--spacing-mobile);
}

/* Hero секция: уменьшаем padding на мобильных */
.hero {
    padding: 32px 0 24px;
}

/* Hero заголовок: адаптивный размер шрифта через clamp()
   Формула: clamp(мин, предпочитаемый, макс)
   - На 320px: ~24px
   - На 768px+: плавно растёт до 36px */
.hero-title {
    font-size: clamp(24px, 5vw, 36px);
    line-height: 1.2;
}

/* Hero подзаголовок: меньше на мобильных */
.hero-subtitle {
    font-size: clamp(14px, 3.5vw, 18px);
}

/* Hero счётчик: огромный размер масштабируется */
.hero-counter {
    font-size: clamp(42px, 10vw, 64px);
}

/* Hero поиск: на мобильных вертикальный стек */
.hero-search {
    flex-direction: column;
    gap: 12px;
}

.hero-search-input,
.hero-search-btn {
    width: 100%;
}

/* Hero статистика: вертикальный стек на маленьких экранах */
.hero-stats {
    flex-direction: column;
    gap: 24px;
}

/* Hero кнопки: вертикальный стек */
.hero-buttons {
    flex-direction: column;
    gap: 12px;
}

.hero-buttons .btn {
    width: 100%;
    text-align: center;
}

/* Секции: уменьшаем padding на мобильных (80px → 40px) */
.section {
    padding: 40px 0;
}

/* Заголовки секций: адаптивный размер */
.section-title {
    font-size: clamp(24px, 5vw, 36px);
}

.section-description {
    font-size: clamp(14px, 3.5vw, 18px);
}

/* Header секция: убираем sticky на мобильных для экономии места */
.header {
    position: relative;
}

/* Header container: на мобильных flexbox с wrap для переноса nav */
.header .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
}

/* Logo: растягивается чтобы кнопка была справа */
.logo {
    flex: 1;
}

/* Навигация: скрываем на мобильных, показываем hamburger menu */
.nav {
    display: none; /* Скрыто на мобильных, покажем через JS hamburger */
    flex-basis: 100%; /* На мобильных занимает всю ширину */
    order: 5; /* Перемещаем nav вниз (после logo, lang-switcher, user-menu, button) */
}

/* Когда мобильное меню открыто (класс добавляется через JS) */
.nav.mobile-menu-open {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 0;
    margin-top: 16px;
    border-top: 1px solid var(--border);
}

.nav.mobile-menu-open a {
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--bg-gray);
    transition: background 0.2s;
}

.nav.mobile-menu-open a:hover {
    background: #E0E7FF;
}

/* Мобильное меню (hamburger button) - кнопка с 3 полосками */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10;
    order: 4; /* После logo, lang, user */
}

/* Полоски hamburger menu */
.mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Анимация hamburger → X при открытии */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/* Language switcher: порядок на мобильных */
.lang-switcher {
    order: 2;
    margin-left: auto; /* Прижимаем к правому краю */
    margin-right: 12px;
}

/* User menu: порядок на мобильных */
.user-menu {
    order: 3;
    margin-right: 12px;
}

/* Grid: на мобильных 1 колонка */
.services-grid,
.services-grid-3col,
.services-grid-4col,
.columns-grid {
    grid-template-columns: 1fr;
    gap: 16px;
}

/* Service cards: увеличиваем padding для touch targets */
.service-card,
.service-card-large,
.service-card-nf {
    padding: 16px;
}

/* Кнопки: минимум 44px высота для touch-friendly (Apple HIG) */
.btn,
.hero-search-btn,
.chip {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Footer: вертикальный стек на мобильных */
.footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
}

/* Section header: вертикальный стек на мобильных */
.section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

/* Chips: меньший размер на мобильных, но достаточно большой для тапа */
.chip {
    font-size: 13px;
    padding: 10px 14px;
}

/* Service hero (страница сервиса): 1 колонка на мобильных */
.service-hero,
.service-page-layout {
    grid-template-columns: 1fr;
}

/* Sidebar: убираем sticky на мобильных */
.service-sidebar {
    position: static;
}

/* Категории: на мобильных показываем меньше chips */
.chips-container {
    justify-content: flex-start;
}

/* Reviews section: меньше padding */
.reviews-section {
    padding: 16px;
}

.review-form-footer {
    flex-direction: column;
    gap: 12px;
}

.btn-submit-review {
    width: 100%;
}

/* Language switcher: компактная позиция на мобильных */
.lang-switcher {
    gap: 2px;
}

.lang-option {
    padding: 6px 10px;
    font-size: 12px;
}

/* Ad blocks: скрываем sticky ads на мобильных */
.ad-sticky-container {
    display: none;
}

.ad-bottom-block {
    padding: 16px;
}

/* Favorite button: меньше на мобильных */
.favorite-btn {
    width: 36px;
    height: 36px;
}

/* User profile: скрываем имя на очень маленьких экранах */
.user-name {
    display: none;
}


/* ========================================================================
   ПЛАНШЕТЫ (768px и больше)
   Улучшения для планшетов и средних экранов
   ======================================================================== */
@media (min-width: 768px) {
    /* Контейнер: увеличиваем padding */
    .container {
        padding: 0 var(--spacing-tablet);
        max-width: var(--container-tablet);
    }

    /* Hero: увеличиваем padding */
    .hero {
        padding: 48px 0 32px;
    }

    /* Hero поиск: горизонтальный на планшетах */
    .hero-search {
        flex-direction: row;
    }

    .hero-search-input {
        flex: 1;
    }

    .hero-search-btn {
        width: auto;
        padding: 14px 32px;
    }

    /* Hero статистика: горизонтальная на планшетах */
    .hero-stats {
        flex-direction: row;
        gap: 48px;
    }

    /* Hero кнопки: горизонтальные */
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .hero-buttons .btn {
        width: auto;
    }

    /* Секции: увеличиваем padding */
    .section {
        padding: 60px 0;
    }

    /* Header: делаем sticky для удобной навигации */
    .header {
        position: sticky;
        top: 0;
    }

    /* Header container: на планшетах возвращаем normal flexbox */
    .header .container {
        flex-wrap: nowrap;
    }

    /* Навигация: показываем горизонтальную навигацию */
    .nav {
        display: flex !important; /* !important чтобы override mobile-menu-open */
        flex-direction: row;
        flex-basis: auto;
        order: 0;
        padding: 0;
        margin-top: 0;
        border-top: none;
        gap: 20px;
    }

    .nav a {
        padding: 0;
        background: transparent;
    }

    /* Hamburger: скрываем на планшетах */
    .mobile-menu-btn {
        display: none;
    }

    /* Logo: убираем flex-grow */
    .logo {
        flex: 0;
    }

    /* Language switcher: убираем margin auto */
    .lang-switcher {
        order: 0;
        margin-left: 16px;
        margin-right: 0;
    }

    /* User menu: нормальный order */
    .user-menu {
        order: 0;
        margin-right: 0;
        margin-left: 16px;
    }

    /* Grid: 2 колонки на планшетах */
    .services-grid,
    .services-grid-3col {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .services-grid-4col {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Columns grid: 2 колонки */
    .columns-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Section header: горизонтальный */
    .section-header {
        flex-direction: row;
        align-items: center;
    }

    /* Footer: 2 колонки на планшетах */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        text-align: left;
    }

    /* Chips: средний размер */
    .chip {
        font-size: 14px;
        padding: 8px 16px;
    }

    /* Reviews: показываем горизонтальные формы */
    .review-form-footer {
        flex-direction: row;
        align-items: center;
    }

    .btn-submit-review {
        width: auto;
    }

    /* User name: показываем на планшетах */
    .user-name {
        display: inline;
    }

    /* Language switcher: нормальный размер */
    .lang-option {
        padding: 6px 12px;
        font-size: 13px;
    }

    /* Favorite button: нормальный размер */
    .favorite-btn {
        width: 40px;
        height: 40px;
    }
}


/* ========================================================================
   ДЕСКТОП (1024px и больше)
   Полноценный desktop experience
   ======================================================================== */
@media (min-width: 1024px) {
    /* Контейнер: desktop размер */
    .container {
        padding: 0 var(--spacing-desktop);
        max-width: var(--container-desktop);
    }

    /* Hero: полный padding */
    .hero {
        padding: 60px 0 40px;
    }

    /* Секции: полный padding */
    .section {
        padding: 80px 0;
    }

    /* Навигация: увеличиваем gap */
    .nav {
        gap: 24px;
    }

    /* Grid: 3-4 колонки на desktop */
    .services-grid,
    .services-grid-3col {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    .services-grid-4col {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }

    /* Columns grid: 3-4 колонки */
    .columns-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 24px;
    }

    /* Service hero: 2 колонки (контент + sidebar) */
    .service-hero {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .service-page-layout {
        grid-template-columns: 2fr 1fr;
        gap: 32px;
    }

    /* Sidebar: делаем sticky для удобства */
    .service-sidebar {
        position: sticky;
        top: 100px;
    }

    /* Footer: 4 колонки на больших экранах */
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Ad blocks: показываем sticky ads */
    .ad-sticky-container {
        display: block;
    }

    /* Service cards: увеличиваем padding */
    .service-card,
    .service-card-large,
    .service-card-nf {
        padding: 20px;
    }
}


/* ========================================================================
   БОЛЬШИЕ ДЕСКТОПЫ (1440px и больше)
   Дополнительные улучшения для wide screens
   ======================================================================== */
@media (min-width: 1440px) {
    /* Контейнер: максимальный размер */
    .container {
        max-width: var(--container-large);
    }

    /* Services grid 4col: действительно 4 колонки на wide screens */
    .services-grid-4col {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Увеличенные отступы для комфорта */
    .section {
        padding: 100px 0;
    }
}


/* ========================================================================
   UTILITY RESPONSIVE КЛАССЫ
   Хелперы для быстрого скрытия/показа на разных экранах
   ======================================================================== */

/* Скрыть на мобильных */
.hidden-mobile {
    display: none;
}

@media (min-width: 768px) {
    .hidden-mobile {
        display: block;
    }
}

/* Скрыть на планшетах */
@media (min-width: 768px) and (max-width: 1023px) {
    .hidden-tablet {
        display: none;
    }
}

/* Скрыть на desktop */
@media (min-width: 1024px) {
    .hidden-desktop {
        display: none;
    }
}

/* Показать только на мобильных */
.visible-mobile {
    display: block;
}

@media (min-width: 768px) {
    .visible-mobile {
        display: none;
    }
}


/* ========================================================================
   PRINT STYLES (Бонус)
   Оптимизация для печати
   ======================================================================== */
@media print {
    /* Скрываем навигацию и интерактивные элементы при печати */
    .header,
    .nav,
    .hero-search,
    .hero-buttons,
    .footer,
    .ad-sticky-container,
    .ad-bottom-block,
    .favorite-btn,
    .lang-switcher {
        display: none !important;
    }

    /* Убираем цветные фоны для экономии чернил */
    body,
    .section,
    .service-card {
        background: white !important;
        color: black !important;
    }

    /* Показываем URL ссылок при печати */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 12px;
        color: #666;
    }
}
