/* Reset and base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    color: #333;
    line-height: 1.5;
}

/* Header */
.site-header {
    background: #2d2d2d;
    padding: 16px 24px;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo-accent {
    color: #2a9dce;
    font-weight: 600;
}

/* Burger button — скрыт на десктопе */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    margin-left: auto;
}

.burger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}

.burger-btn[aria-expanded="true"] .burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.burger-btn[aria-expanded="true"] .burger-line:nth-child(2) {
    opacity: 0;
}
.burger-btn[aria-expanded="true"] .burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

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

.nav-link {
    color: #9ca3af;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
    color: #2a9dce;
}

/* Мобильное меню (выпадающее под шапкой) */
.mobile-nav {
    display: none;
    flex-direction: column;
    background: #252525;
    padding: 12px 24px 20px;
    gap: 4px;
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav-link {
    color: #9ca3af;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 12px 0;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #2a9dce;
}

@media (max-width: 768px) {
    .burger-btn {
        display: flex;
    }

    .main-nav {
        display: none;
    }
}

/* Hero */
.hero {
    position: relative;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 48px 48px 56px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.35) 100%);
    pointer-events: none;
}

.hero-title {
    position: relative;
    z-index: 1;
    font-size: 2.25rem;
    font-weight: 300;
    color: #1a365d;
    text-align: right;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
    margin: 0;
}

@media (max-width: 768px) {
    .hero {
        display: none;
    }
}

/* Main content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.section {
    margin-bottom: 48px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2d2d2d;
    text-align: center;
    margin-bottom: 24px;
}

/* Filter box */
.filter-box {
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 40px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.filter-box-inline {
    padding: 20px 24px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 32px;
    margin-bottom: 24px;
}

.filter-row-inline {
    margin-bottom: 0;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
}

@media (max-width: 900px) {
    .filter-row-inline {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .filter-row-inline {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    .filter-item-compact {
        width: 100%;
    }
}

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

.filter-item-compact {
    min-width: 0;
    flex: 0 0 auto;
}

@media (min-width: 769px) {
    .filter-item-compact {
        width: 200px;
    }
}

.filter-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.filter-label {
    display: block;
    font-weight: 500;
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.filter-item-compact .filter-label {
    margin-bottom: 0;
}

.range-value-inline {
    font-weight: 600;
    color: #e67e22;
    font-size: 0.95rem;
    white-space: nowrap;
}

.range-value-above {
    display: block;
    font-weight: 600;
    color: #e67e22;
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.filter-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
}

.filter-item-compact .filter-range-labels {
    margin-top: 2px;
}

.range-min,
.range-max {
    font-size: 0.75rem;
    color: #6b7280;
}

.filter-item-compact .range-min,
.filter-item-compact .range-max {
    font-size: 0.7rem;
}

.range-value {
    font-weight: 600;
    color: #e67e22;
    font-size: 1rem;
}

.range-slider-compact {
    width: 100%;
    min-width: 80px;
}

/* Range sliders */
.range-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #2a9dce;
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2a9dce;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2a9dce;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.filter-checkbox {
    display: flex;
    align-items: center;
    min-width: auto;
}

.filter-checkbox-inline {
    flex: 0 0 auto;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #2d2d2d;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2a9dce;
    cursor: pointer;
}

.filter-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-actions-inline {
    flex: 0 0 auto;
    margin-left: auto;
}

.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #2a9dce;
    color: white;
}

.btn-primary:hover {
    background: #238ab8;
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: #6b7280;
    border: 1px solid #93c5fd;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #2a9dce;
    color: #374151;
}

/* Products grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

.product-card {
    background: #e8e8e8;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s;
    cursor: pointer;
}

.product-card:hover {
    background: #e0e0e0;
    border-color: #2a9dce;
    box-shadow: 0 4px 12px rgba(42, 157, 206, 0.15);
}

.company-info {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.company-logo {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 6px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    overflow: hidden;
}

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

.company-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d2d2d;
}

.approval-badge {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.approval-text {
    color: #e67e22;
    font-size: 1.2rem;
    font-weight: 500;
}

.product-card .amount {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d2d2d;
    margin-bottom: 12px;
}

.product-details {
    margin-bottom: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 4px 0;
    color: #555;
}

.detail-label {
    color: #666;
}

.detail-value {
    font-weight: 500;
    color: #2d2d2d;
}

.product-license {
    margin-top: auto;
    padding-top: 10px;
    font-size: 0.72rem;
    color: #a8a8a8;
    line-height: 1.3;
}

.detail-value.highlight {
    color: #e74c3c;
}

.detail-value.success {
    color: #27ae60;
}

.advantages {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.advantage-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    background: #2a9dce;
    color: white;
}

.advantage-badge[data-code="top-product"] { background: #e67e22; }
.advantage-badge[data-code="first-loan-0"] { background: #27ae60; }
.advantage-badge[data-code="get-0"] { background: #27ae60; }
.advantage-badge[data-code="3-minutes"] { background: #9b59b6; }
.advantage-badge[data-code="top-speed"] { background: #e74c3c; }
.advantage-badge[data-code="card-money"] { background: #2a9dce; }
.advantage-badge[data-code="interest-free"] { background: #27ae60; }
.advantage-badge[data-code="free-subscription"] { background: #16a085; }

.action-btn {
    width: 100%;
    padding: 12px;
    background: #2a9dce;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #238ab8;
    transform: translateY(-1px);
}

/* Loading & No results */
.loading,
.no-results {
    text-align: center;
    padding: 48px 20px;
    color: #666;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #2a9dce;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.site-footer {
    background: #2d2d2d;
    padding: 32px 24px;
    margin-top: 40px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 48px;
    flex-wrap: wrap;
}

.logo-footer {
    color: white;
}

.footer-nav {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col-title {
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.footer-col a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: #2a9dce;
}

/* Logo variants for cards */
.logo-webbankir { background: #e67e22 !important; }
.logo-moneyman { background: #27ae60 !important; }
.logo-oneclick { background: #d35400 !important; }
.logo-cashtoyou { background: #2a9dce !important; }
.logo-zaimer { background: #27ae60 !important; }
.logo-bystrodengi { background: #2a9dce !important; }
.logo-boostra { background: #34495e !important; }
.logo-lime { background: #27ae60 !important; }
.logo-yukki { background: #e74c3c !important; }
.logo-payps { background: #2a9dce !important; }

/* Lead Modal */
.lead-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.lead-modal.show {
    display: flex;
}

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

.lead-modal-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
}

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

.lead-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.lead-modal-close:hover {
    color: #333;
}

.lead-modal-content h2 {
    font-size: 1.5rem;
    color: #2d2d2d;
    margin-bottom: 12px;
    text-align: center;
}

.lead-modal-text {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 24px;
    text-align: center;
}

.lead-modal-content .form-group {
    margin-bottom: 16px;
}

.lead-modal-content label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.lead-modal-content input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}

.lead-modal-content input[type="text"]:focus {
    outline: none;
    border-color: #2a9dce;
}

.lead-modal-content .checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 400;
}

.lead-modal-content .checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2a9dce;
}

.lead-submit-btn {
    width: 100%;
    padding: 14px;
    background: #2a9dce;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
}

.lead-submit-btn:hover:not(:disabled) {
    background: #238ab8;
}

.lead-submit-btn:disabled {
    background: #aaa;
    cursor: not-allowed;
}
