/* Global Design Unification - Master Redesign V2 */

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography Consistency */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--color-slate-900);
}

/* Modern Card Component */
.card-modern {
    background: #fff;
    border-radius: var(--radius-base);
    border: 1px solid var(--border-base);
    transition: var(--transition-smooth);
    overflow: hidden;
    height: 100%;
    box-shadow: var(--shadow-soft);
}

/* .card-modern:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-elevated);
    border-color: var(--color-primary-200);
} */

/* Sidebar: cards fit content height, no stretch */
.company-sidebar .card-modern {
    height: auto;
}

/* Company info: description font slightly larger */
.company-info-description {
    font-size: 0.95rem;
    word-break: break-word;
}

/* Profile header: иконки в одном стиле с отзывами (Font Awesome, цвет) */
.profile-header-v3 .stars-amber i {
    color: var(--color-amber-500);
}
.profile-header-icon-btn i,
.profile-header-share-btn i {
    color: var(--color-slate-700);
}
.profile-header-icon-btn:hover i,
.profile-header-share-btn:hover i {
    color: var(--brand-primary);
}

/* Кнопка «Поделиться»: круглая, по высоте как соседняя синяя кнопка */
.profile-header-actions .btn-modern {
    height: 2.75rem;
    padding-top: 0;
    padding-bottom: 0;
}
.profile-header-share-btn {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-base);
    background: #fff;
}

/* Звёзды в шапке: на 10% меньше, надпись справа выровнена по вертикали */
.profile-header-rating .stars-amber {
    font-size: 0.9em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}
.profile-header-rating .profile-header-rating-text {
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

/* Primary Action Button */
.btn-modern,
.btn-ghost-modern {
    cursor: pointer;
}
.btn-modern {
    background: var(--brand-primary);
    color: #fff !important;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: var(--radius-large);
    transition: var(--transition-smooth);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px 0 rgba(14, 165, 233, 0.39);
}

.btn-modern:hover {
    background: var(--brand-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.23);
}
.btn-modern:disabled,
.btn-ghost-modern:disabled {
    cursor: not-allowed;
}

.btn-sm-modern {
    padding: 8px 18px;
    font-size: 0.9rem;
}

.btn-ghost-modern {
    background: #fff;
    color: var(--color-slate-900) !important;
    border: 1px solid var(--color-slate-100);
    box-shadow: var(--shadow-soft);
}

.btn-ghost-modern:hover {
    background: var(--color-slate-50);
    color: var(--brand-primary) !important;
    border-color: var(--color-slate-200);
}

/* Header logout button - compact pill */
.header-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-slate-600);
    background: transparent;
    border: 1px solid var(--color-slate-200);
    border-radius: 9999px;
    transition: var(--transition-smooth);
    cursor: pointer;
}
.header-logout-btn:hover {
    color: var(--brand-primary);
    border-color: var(--color-primary-200);
    background: var(--color-primary-50);
}
.header-logout-btn i {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Modern Input Fields */
.input-modern {
    border-radius: var(--radius-base);
    border: 2px solid var(--color-slate-100);
    padding: 14px 20px;
    transition: var(--transition-smooth);
    font-family: var(--font-main);
}

.input-modern:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px var(--color-primary-100);
    outline: none;
}

/* Select with single centered chevron (no duplicate icons) */
.select-modern {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 12px !important;
    padding-right: 44px !important;
    height: 48px !important;
    line-height: 1.5;
}
.select-modern:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230ea5e9' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
}

/* Navigation Refinement */
.navbar-nav .nav-link {
    font-size: 1rem;
    color: var(--color-slate-900) !important;
}

.navbar-nav .nav-link:hover {
    color: var(--brand-primary) !important;
}

/* Navigation Overrides */
.site-header {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-base);
}

.hover-primary:hover {
    color: var(--color-primary-600) !important;
    text-decoration: none;
}

.transition-smooth {
    transition: var(--transition-smooth);
}

.logo-icon-v2 {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-400));
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 22px;
    box-shadow: var(--shadow-soft);
}

.logo-text-v2 {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.05em;
}

/* Hero V2 Background - Muted Photo Version */
.hero-v2-bg {
    background-image: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.5)),
        url("https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80&w=2070&auto=format&fit=crop");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
    padding-top: 100px;
    padding-bottom: 150px;
}

.hero-v2-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

/* Category Section - Accented Gradient Background */
.bg-subtle-light {
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    border-top: 1px solid var(--color-slate-100);
    border-bottom: 1px solid var(--color-slate-100);
}

/* Category card - updated to match trust items */
.popular-slide-v2 {
    padding: 32px 24px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--color-slate-100);
    transition: var(--transition-smooth);
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.popular-slide-v2:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-elevated);
    border-color: var(--color-primary-100);
}

.icon-pill-sm {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--color-primary-50);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.extra-small {
    font-size: 0.75rem;
}

.last-no-border:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Profile V3 Structural Styles */
.profile-header-v3 {
    position: relative;
}

.profile-banner {
    width: 100%;
    height: 300px;
    position: relative;
    overflow: hidden;
}

.profile-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(15, 23, 42, 0.4));
}

/* Декоративный фон в стиле CTA — правые 30% белой карточки (кнопки «Написать отзыв» / Поделиться) */
.profile-branding__deco {
    position: absolute;
    top: 0;
    right: 0;
    width: 30%;
    max-width: 320px;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    display: block;
    border-radius: 0 var(--radius-base) var(--radius-base) 0;
    overflow: hidden;
}

.profile-branding__deco-svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-branding .row {
    position: relative;
    z-index: 1;
}

/* ========== Review Summary (саммари отзывов в стиле Play Market) ========== */
.review-summary-card {
    max-height: 200px;
    border-radius: var(--radius-base);
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f0f9ff 100%);
    border: 1px solid var(--border-base);
}

.review-summary-card__inner {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.review-summary-card__main {
    display: flex;
    align-items: stretch;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.review-summary-card__rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    padding-right: 1rem;
    border-right: 1px solid var(--color-slate-200);
}

.review-summary-card__number {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--color-slate-900);
    line-height: 1;
}

.review-summary-card__stars {
    color: var(--color-amber-500);
    font-size: 1rem;
    margin-top: 0.25rem;
    letter-spacing: 1px;
}

.review-summary-card__count {
    font-size: 0.8rem;
    color: var(--color-slate-500);
    margin-top: 0.25rem;
}

.review-summary-card__bars {
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.35rem;
}

.review-summary-card__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.review-summary-card__star-label {
    width: 28px;
    color: var(--color-slate-600);
}

.review-summary-card__bar-wrap {
    flex: 1;
    height: 8px;
    background: var(--color-slate-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.review-summary-card__bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary-400), var(--brand-primary));
    border-radius: var(--radius-full);
    transition: width 0.35s ease;
}

.review-summary-card__bar-count {
    width: 20px;
    text-align: right;
    color: var(--color-slate-500);
    font-weight: 600;
}

.review-summary-card__snippet {
    font-size: 0.9rem;
    color: var(--color-slate-700);
    line-height: 1.45;
    margin: 0;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-slate-100);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.review-summary-card__empty {
    text-align: center;
    padding: 0.5rem 0;
}

.review-summary-card__empty-text {
    font-size: 0.95rem;
    color: var(--color-slate-600);
}

/* Компактный виджет "Внести исправления" (красная зона в сайдбаре) */
.sidebar-correction-widget.sidebar-correction-widget--compact {
    padding: 0.75rem 1rem !important;
    margin-bottom: 1rem !important;
}

.sidebar-correction-widget--compact .sidebar-correction-widget__body {
    flex: 1;
}

.sidebar-correction-widget--compact .sidebar-correction-widget__body h6 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem !important;
}

.sidebar-correction-widget--compact .sidebar-correction-widget__body p {
    font-size: 0.8rem;
    margin-bottom: 0.5rem !important;
    line-height: 1.35;
}

.sidebar-correction-widget--compact .icon-pill-sm {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    margin-right: 0.75rem !important;
}

.sidebar-correction-widget--compact .btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
}

/* Share dropdown must not be clipped by the card */
.profile-branding.card-modern {
    overflow: visible;
}

.profile-branding {
    margin-top: -60px;
    background: #fff;
    z-index: 5;
    position: relative;
    border-radius: var(--radius-base);
}

.profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: 20px;
    border: 5px solid #fff;
    object-fit: cover;
    background: #fff;
}

@media (max-width: 768px) {
    .profile-banner {
        height: 180px;
    }

    .profile-branding {
        margin-top: -40px;
        text-align: center;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
        margin-top: -20px;
    }

    /* Убрать голубой эффект на мобильных — карточка чисто белая */
    .profile-branding__deco {
        display: none;
    }
}


.category-icon-bg {
    width: 64px;
    height: 64px;
    background: var(--color-primary-50);
    color: var(--brand-primary);
    border-radius: var(--radius-base);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
}

/* Footer Overrides */
.site-footer {
    background: var(--color-slate-900);
}

/* Footer: переключатель языка — аккуратный вид на тёмном фоне */
.site-footer .language-selector-modern .language-dropdown-toggle {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-base);
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    gap: 0.5rem;
    transition: background 0.2s, border-color 0.2s;
}
.site-footer .language-selector-modern .language-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}
.site-footer .language-selector-modern .language-dropdown-toggle .flag-icon {
    font-size: 1.1rem;
}
.site-footer .language-selector-modern .language-dropdown-toggle .dropdown-arrow {
    font-size: 0.65rem;
    opacity: 0.8;
}
.site-footer .language-selector-modern .language-dropdown-menu {
    background: #fff;
    border: 1px solid var(--border-base);
    border-radius: var(--radius-base);
    box-shadow: var(--shadow-elevated);
    padding: 0.25rem 0;
}
.site-footer .language-selector-modern .language-dropdown-item {
    padding: 0.5rem 1rem;
    color: var(--color-slate-700);
    font-size: 0.9rem;
}
.site-footer .language-selector-modern .language-dropdown-item:hover {
    background: var(--color-primary-50);
    color: var(--brand-primary);
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 16px;
}

.gap-4 {
    gap: 24px;
}

/* Utilities & Layout Helpers */
.section-padding {
    padding: 80px 0;
}

.max-w-2xl {
    max-width: 42rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.bg-slate-50 {
    background-color: var(--bg-page);
}

.min-vh-100 {
    min-height: 100vh;
}

/* Redefined Shadows for Depth */
.shadow-soft {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.shadow-elevated {
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.shadow-inner {
    box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
}

/* Specialized Soft Alerts */
.ring-success-50 {
    background-color: #f0fdf4 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0 !important;
}

.ring-danger-50 {
    background-color: #fef2f2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca !important;
}

.ring-primary-50 {
    background-color: #eff6ff !important;
    color: #1e40af !important;
    border: 1px solid #bfdbfe !important;
}

.ring-warning-50 {
    background-color: #fffbeb !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}

/* V3 Image Upload UI */
.image-upload-v3 {
    border: 2px dashed var(--color-slate-200);
    border-radius: 16px;
    cursor: pointer;
    background: var(--color-slate-50);
    transition: var(--transition-smooth);
}

.image-upload-v3:hover {
    border-color: var(--brand-primary);
    background: #f0f7ff;
}

.image-upload-v3.has-file {
    border-style: solid;
    border-color: var(--brand-primary);
    background: #ffffff;
}

.image-preview-v3 {
    max-height: 180px;
    border-radius: 12px;
    display: block;
}

/* Captcha Polish */
.captcha-img-v3 img {
    height: 48px;
    width: auto;
    cursor: pointer;
    display: block;
}

/* Empty state icon (no search results) */
.empty-state-icon {
    color: var(--color-slate-400);
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Gaps */
@media (max-width: 768px) {
    .section-padding {
        padding: 40px 0;
    }
}

/* Global Nice-Select Refinement */
.nice-select {
    border-radius: var(--radius-base) !important;
    border: none !important;
}

.nice-select .list {
    background: #fff !important;
    border-radius: var(--radius-base) !important;
    box-shadow: var(--shadow-elevated) !important;
    border: 1px solid var(--border-base) !important;
    padding: 8px 0 !important;
}

.nice-select .option {
    line-height: normal !important;
    padding: 10px 20px !important;
    min-height: auto !important;
    transition: var(--transition-smooth) !important;
    color: var(--color-slate-700) !important;
}

.nice-select .option:hover,
.nice-select .option.focus,
.nice-select .option.selected.focus {
    background-color: var(--color-primary-50) !important;
    color: var(--brand-primary) !important;
}

.nice-select .option.selected {
    font-weight: 700 !important;
    color: var(--brand-primary) !important;
    background-color: transparent !important;
}

/* Editorial Layout & Hierarchy */
.editorial-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 32px;
}

.feature-col {
    grid-column: span 7;
}

.list-col {
    grid-column: span 5;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (max-width: 991px) {

    .feature-col,
    .list-col {
        grid-column: span 12;
    }
}

/* Feature Card - Balanced Accent */
.card-feature {
    height: 100%;
    min-height: 400px;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}

.card-feature:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-elevated);
}

.card-feature .feature-img {
    height: 100%;
    width: 100%;
    object-fit: contain;
}

.card-feature .feature-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0) 60%);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
}

/* Compact Card - Minimalist List */
.card-compact {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 16px;
    border-radius: 24px;
    transition: var(--transition-smooth);
    border: 1px solid var(--color-slate-50);
}

.card-compact:hover {
    border-color: var(--brand-primary);
    background: var(--color-primary-50);
    transform: translateX(8px);
}

.card-compact .compact-img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: contain;
    margin-right: 20px;
}

.card-compact .compact-info {
    flex: 1;
    min-width: 0;
}

/* Premium Stars Styling */
.stars-amber {
    color: var(--color-amber-500) !important;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.stars-amber i {
    font-size: 1.1em;
    filter: drop-shadow(0 0 1px rgba(245, 158, 11, 0.2));
}

/* Trust Section Redesign - Integrated Editorial Style */
.trust-section {
    background: transparent;
    padding: 20px 0 60px;
    margin: 60px 0;
}

.trust-card {
    background: #fff;
    padding: 32px;
    border-radius: 24px;
    border: 1px solid var(--color-slate-100);
    height: 100%;
    transition: var(--transition-smooth);
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.trust-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-elevated);
    border-color: var(--color-primary-100);
}

.trust-icon-pill {
    width: 56px;
    height: 56px;
    background: var(--color-primary-50);
    color: var(--brand-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
}

.trust-card h5 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-slate-900);
    margin-bottom: 12px;
}

.trust-card p {
    color: var(--color-slate-500);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Premium SEO Section - Glass & Accent Style */
.seo-section-wrapper {
    background: transparent;
    padding: 20px 0 80px;
    position: relative;
    overflow: hidden;
}

.seo-card-premium {
    background: #fff;
    border-radius: 24px;
    padding: 40px;
    border: 1px solid var(--color-slate-100);
    box-shadow: var(--shadow-soft);
    position: relative;
    transition: var(--transition-smooth);
}

.seo-card-premium::before {
    content: '';
    position: absolute;
    left: 0;
    top: 40px;
    bottom: 40px;
    width: 4px;
    background: linear-gradient(to bottom, var(--color-primary-400), var(--color-primary-600));
    border-radius: 0 4px 4px 0;
}

.seo-content-grid {
    column-count: 2;
    column-gap: 40px;
    max-height: 280px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.seo-content-grid.expanded {
    max-height: 3000px;
}

.seo-content-grid::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
    pointer-events: none;
    transition: opacity 0.3s;
}

.seo-content-grid.expanded::after {
    opacity: 0;
}

.seo-title-accent {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-slate-900);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.seo-title-accent i {
    color: var(--brand-primary);
    font-size: 1.2rem;
}

.seo-text-body {
    color: var(--color-slate-600);
    font-size: 0.95rem;
    line-height: 1.7;
}

.seo-text-body h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 12px;
    color: var(--color-slate-800);
    break-inside: avoid;
}

.seo-text-body ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.seo-text-body li {
    margin-bottom: 8px;
    position: relative;
}

.seo-text-body li::marker {
    color: var(--brand-primary);
}

.seo-expand-btn {
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(14, 165, 233, 0.2);
    padding: 10px 24px;
    border-radius: 99px;
    font-weight: 700;
    color: var(--brand-primary);
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.seo-expand-btn:hover {
    background: var(--brand-primary);
    color: #fff;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.3);
}

.seo-expand-wrapper {
    position: relative;
    padding-bottom: 60px;
}

@media (max-width: 991px) {
    .seo-content-grid {
        column-count: 1;
    }
}

/* Listings Page Redesign Styles */
.listings-mini-header {
    background: #fff;
    padding: 60px 0 40px;
    border-bottom: 1px solid var(--color-slate-100);
    margin-bottom: 0;
}

.horizontal-filters-wrapper {
    background: #fff;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-slate-100);
    position: sticky;
    top: 72px;
    /* Adjusted for header height */
    z-index: 100;
}

.filter-bar-v2 {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-item-v2 {
    flex: 1;
    min-width: 150px;
}

.filter-item-v2 .input-modern,
.filter-item-v2 .nice-select {
    padding: 8px 16px;
    font-size: 0.85rem;
    height: 40px;
    width: 100%;
    display: flex;
    align-items: center;
    line-height: 1.5;
}

.filter-item-v2 select.input-modern {
    padding: 8px 16px;
}

.filter-btn-group .btn-modern,
.filter-btn-group .btn-ghost-modern {
    height: 40px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    line-height: 1;
}

.filter-btn-group .btn-ghost-modern i {
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

/* Центрирование иконки-шеврона в nice-select (фильтры) */
.filter-item-v2 .nice-select::after {
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.filter-item-v2 .nice-select.open::after {
    top: 50% !important;
    transform: translateY(-50%) rotate(-180deg) !important;
}

.listings-grid-v2 {
    padding: 60px 0;
    background-color: var(--bg-page);
}

.col-card-v2 {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 12px;
    margin-bottom: 24px;
}

@media (max-width: 1200px) {
    .col-card-v2 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
}

@media (max-width: 991px) {
    .col-card-v2 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 20px;
    }

    .horizontal-filters-wrapper {
        top: 0;
    }

    .filter-item-v2 {
        min-width: 100%;
    }
}

@media (max-width: 767px) {
    /* Фильтры не sticky на моб — иначе теряются под шапкой */
    .horizontal-filters-wrapper {
        position: static;
    }

    /* Карточки листинга — меньше по высоте на 25% */
    .card-feature {
        min-height: 300px;
    }
}

@media (max-width: 576px) {
    .col-card-v2 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.pagination-v3 .page-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--color-slate-100);
    font-weight: 700;
    margin: 0 4px;
    transition: var(--transition-smooth);
}

.pagination-v3 .active .page-link {
    background: var(--brand-primary) !important;
    color: #fff !important;
    border-color: var(--brand-primary);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* ========== Call-to-Action Block (после «Похожие компании») ========== */
.cta-block__row {
    display: flex;
    border-radius: var(--radius-large);
    overflow: visible;
    box-shadow: var(--shadow-elevated);
}
.cta-block .cta-block__row .col-md-6 {
    padding: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
}
.cta-card {
    display: flex;
    flex-direction: column;
    position: relative;
    flex: 1 1 auto;
    min-height: 220px;
    padding: 2rem 1.75rem;
    text-decoration: none !important;
    color: inherit;
    border: 1px solid var(--border-base);
    transition: var(--transition-smooth);
    overflow: hidden;
}
.cta-block__row .col-md-6:first-child .cta-card {
    border-right: none;
    border-radius: var(--radius-large) 0 0 var(--radius-large);
}
.cta-block__row .col-md-6:last-child .cta-card {
    border-radius: 0 var(--radius-large) var(--radius-large) 0;
}
.cta-card--search {
    overflow: visible;
}
.cta-card__btn:hover {
    transform: translateX(4px);
}
.cta-card__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.cta-card__svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cta-card__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 180px;
}
.cta-card__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-base);
    background: rgba(255, 255, 255, 0.9);
    color: var(--brand-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}
.cta-card__title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--color-slate-900);
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}
.cta-card__text {
    font-size: 0.95rem;
    color: var(--color-slate-600);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    flex: 1;
}
.cta-card__btn {
    align-self: flex-start;
    margin-top: auto;
    transition: var(--transition-smooth);
}

/* CTA search (autocomplete) — left card */
.cta-card--search .cta-card__content {
    min-height: 180px;
}
.cta-search {
    position: relative;
    margin-top: auto;
    width: 100%;
    align-self: stretch;
    margin-left: 0;
    margin-right: 0;
}
.cta-search__input,
.cta-card--search .cta-search__input.form-control {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 1rem;
    font-size: 1rem;
    border-radius: var(--radius-base) !important;
    border: 1px solid var(--border-base);
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-slate-900);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.cta-search__input::placeholder {
    color: var(--color-slate-500);
}
.cta-search__input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}
.cta-search__dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: #fff;
    border-radius: var(--radius-base);
    box-shadow: var(--shadow-elevated);
    border: 1px solid var(--border-base);
    max-height: 280px;
    overflow-y: auto;
    z-index: 10;
    display: none;
}
.cta-search__dropdown[aria-hidden="false"] {
    display: block;
}
.cta-search__state {
    padding: 0.75rem 1rem;
    color: var(--color-slate-600);
    font-size: 0.95rem;
}
.cta-search__item {
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--color-slate-800);
    border-bottom: 1px solid var(--color-slate-100);
    transition: background 0.15s;
}
.cta-search__item:last-of-type {
    border-bottom: none;
}
.cta-search__item:hover,
.cta-search__item.cta-search__item--active {
    background: var(--color-primary-50);
    color: var(--color-slate-900);
}
.cta-search__footer {
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--border-base);
    background: var(--color-slate-50);
}
.cta-search__all {
    font-size: 0.9rem;
    color: var(--brand-primary);
    text-decoration: none;
}
.cta-search__all:hover {
    text-decoration: underline;
}

/* Hero search select — chevron vertically centered */
.hero-search-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px !important;
    padding-right: 36px !important;
}

/* Hero search autocomplete */
.hero-search-autocomplete {
    position: relative;
}
.hero-search-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: #fff;
    border-radius: var(--radius-base);
    box-shadow: var(--shadow-elevated);
    border: 1px solid var(--border-base);
    max-height: 280px;
    overflow-y: auto;
    z-index: 20;
    display: none;
}
.hero-search-dropdown[aria-hidden="false"] {
    display: block;
}
.hero-search__state {
    padding: 0.75rem 1rem;
    color: var(--color-slate-600);
    font-size: 0.95rem;
}
.hero-search__item {
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--color-slate-800);
    border-bottom: 1px solid var(--color-slate-100);
    transition: background 0.15s;
}
.hero-search__item:last-of-type {
    border-bottom: none;
}
.hero-search__item:hover,
.hero-search__item.hero-search__item--active {
    background: var(--color-primary-50);
    color: var(--color-slate-900);
}
.hero-search__footer {
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--border-base);
    background: var(--color-slate-50);
}
.hero-search__all {
    font-size: 0.9rem;
    color: var(--brand-primary);
    text-decoration: none;
}
.hero-search__all:hover {
    text-decoration: underline;
}

@media (max-width: 767px) {
    /* Hero: убрать border между полем поиска и категориями (категории скрыты на моб) */
    .hero-modern .search-box-v2 .col-md-6.border-right {
        border-right: none !important;
    }

    .cta-block__row {
        overflow: hidden;
    }
    .cta-block__row .col-md-6:first-child .cta-card {
        border-right: 1px solid var(--border-base);
        border-bottom: none;
        border-radius: var(--radius-large) var(--radius-large) 0 0;
    }
    .cta-card {
        border-bottom: 1px solid var(--border-base);
        min-height: 200px;
    }
    .cta-block__row .col-md-6:last-child .cta-card {
        border-bottom: 1px solid var(--border-base);
        border-radius: 0 0 var(--radius-large) var(--radius-large);
    }

    /* Footer: 2 columns, compact */
    .site-footer .row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem 1.25rem;
    }
    .site-footer .row > .col-lg-4 {
        grid-column: 1 / -1;
    }
    .site-footer .row > .col-lg-4 .footer-logo,
    .site-footer .row > .col-lg-4 .text-slate-400.small {
        margin-bottom: 0.5rem !important;
    }
    .site-footer .row > .col-lg-4 .social-links {
        margin-top: 0.75rem !important;
    }
    .site-footer .row > .col-lg-2 h6,
    .site-footer .row > .col-lg-3 h6 {
        margin-bottom: 0.5rem !important;
    }
    .site-footer .row > .col-lg-2 .mb-2,
    .site-footer .row > .col-lg-3 .mb-2 {
        margin-bottom: 0.35rem !important;
    }
    .site-footer .row > .col-lg-3 .language-selector-modern {
        margin-bottom: 0.5rem !important;
    }
    .site-footer .py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    .site-footer .border-top.mt-5.pt-4 {
        margin-top: 1.25rem !important;
        padding-top: 1rem !important;
    }
}