/* ==========================================================================
   КАЛЬКУЛЯТОР ПОТРЕБИТЕЛЬСКОГО КРЕДИТА + СТИЛИ СТРАНИЦЫ
   Правильные цвета и контрастность
   ========================================================================== */


/* ========== HERO СЕКЦИЯ ========== */
.hero-section {
    background: var(--nd-surface);
    padding: 60px 0 40px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 50px;
}

.hero-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-section h1 {
    color: var(--text-dark);
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 20px 0;
    line-height: 1.2;
    text-align: center;
}

.hero-section .lead {
    color: var(--nd-text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

/* ========== ОБЁРТКА КАЛЬКУЛЯТОРА ========== */
.credit-calculator-wrapper {
    max-width: 1400px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

/* ========== ДВУХКОЛОНОЧНАЯ РАСКЛАДКА ========== */
.calculator-offers-layout {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 30px;
    align-items: start;
    margin-bottom: 40px;
}

/* ========== КАРТОЧКА КАЛЬКУЛЯТОРА ========== */
.calculator-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 35px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.calculator-card h2 {
    font-size: 1.75rem;
    color: var(--text-dark);
    margin: 0 0 10px 0;
    font-weight: 700;
    line-height: 1.3;
}

.subtitle {
    color: var(--text-gray);
    margin-bottom: 30px;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ========== СТРОКА СО СЛАЙДЕРАМИ ========== */
.calc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 20px;
}

.calc-row.single-column {
    grid-template-columns: 1fr;
}

.calc-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.calc-input-group label {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 5px;
}

/* ========== SELECT DROPDOWN ========== */




/* ========== RANGE СЛАЙДЕРЫ ========== */
.calc-input-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--border-color) 0%);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: background 0.3s;
}

.calc-input-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(47, 191, 113, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 3px solid white;
}

.calc-input-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(47, 191, 113, 0.5);
}

.calc-input-group input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(47, 191, 113, 0.4);
}

/* ========== ЧИСЛОВЫЕ ИНПУТЫ ========== */
.calc-input-group input[type="number"] {
    width: 120px;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: center;
    margin: 0 auto;
    transition: all 0.3s;
    color: var(--text-dark);
    background: var(--bg-white);
}

.calc-input-group input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(47, 191, 113, 0.1);
}

/* ========== ДАТА ========== */
.calc-date-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
    color: var(--text-dark);
    background: var(--bg-white);
}

.calc-date-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(47, 191, 113, 0.1);
}

/* ========== ОТОБРАЖЕНИЕ СРОКА С ПЕРЕКЛЮЧАТЕЛЕМ ========== */
.term-display {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.term-display input[type="number"] {
    width: 80px;
    margin: 0;
}

.term-unit-select {
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--bg-white);
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-dark);
}

.term-unit-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(47, 191, 113, 0.1);
}

/* ========== ТИП ПЛАТЕЖА (КНОПКИ) ========== */
.payment-type-group {
    grid-column: 1 / -1;
}

.payment-type-buttons {
    display: flex;
    gap: 10px;
}

.payment-type-btn {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-white);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s;
}

.payment-type-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
}

.payment-type-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(47, 191, 113, 0.3);
}

/* ========== ПАНЕЛЬ С РЕЗУЛЬТАТАМИ ========== */
.result-panel {
    background: var(--success-bg);
    padding: 25px 20px;
    border-radius: 16px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
    border: 1px solid var(--success-border);
}

.result-item {
    text-align: center;
}

.result-item span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-bottom: 6px;
    font-weight: 500;
}

.result-item strong {
    font-size: 1.15rem;
    color: #07513A;
    display: block;
    font-weight: 700;
}

.result-item .total {
    font-size: 1.5rem;
    color: #063B2B;
    font-weight: 800;
}

/* Tooltip */
.tooltip {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: var(--text-gray);
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
    text-align: center;
    line-height: 16px;
    cursor: help;
    margin-left: 4px;
}

/* ========== CTA КНОПКА ========== */
.cta-button {
    width: 100%;
    padding: 18px;
    background: #0D7654;
    color: white;
    border: none;
    border-radius: 9px;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(32, 151, 90, 0.22);
    transition: background 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.cta-button:hover {
    background: #07513A;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(32, 151, 90, 0.28);
}

.cta-button:active {
    transform: translateY(0);
}

.disclaimer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 15px;
    margin-bottom: 0;
    line-height: 1.5;
}

/* ========== САЙДБАР С ОФФЕРАМИ ========== */
.calculator-sidebar-offers {
    background: var(--bg-light);
    border: 1px solid var(--nd-line);
    border-radius: 20px;
    padding: 30px;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
}

.sidebar-offers-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--nd-line);
}

.sidebar-offers-title span {
    color: var(--primary-color);
    font-weight: 800;
}









.sidebar-offers-list {
    margin-bottom: 20px;
}

.view-all-offers-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--secondary-color);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.view-all-offers-btn:hover {
    background: #0A6347;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px $113,118,84, 0.4);
}

/* Скроллбар */
.calculator-sidebar-offers::-webkit-scrollbar {
    width: 6px;
}

.calculator-sidebar-offers::-webkit-scrollbar-track {
    background: #eef3f1;
    border-radius: 10px;
}

.calculator-sidebar-offers::-webkit-scrollbar-thumb {
    background: #c7cfcc;
    border-radius: 10px;
}

.calculator-sidebar-offers::-webkit-scrollbar-thumb:hover {
    background: #8f9c97;
}

/* ========== ГРАФИК ПОГАШЕНИЯ ========== */
.payment-schedule-section {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 35px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.schedule-header h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 0;
    font-weight: 700;
}

.schedule-legend {
    display: flex;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-gray);
    font-weight: 500;
}

.legend-color {
    display: inline-block;
    width: 20px;
    height: 12px;
    border-radius: 3px;
}

.legend-color.principal {
    background: #0A6347;
}

.legend-color.interest {
    background: #0D7654;
}

.schedule-chart-wrapper {
    margin-bottom: 25px;
    height: 300px;
}

.show-schedule-btn {
    width: 100%;
    padding: 14px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.show-schedule-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.schedule-table-wrapper {
    overflow-x: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.schedule-table thead {
    background: var(--bg-light);
}

.schedule-table th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.schedule-table td {
    padding: 12px;
    border-bottom: 1px solid #eef3f1;
    color: var(--text-gray);
}

.schedule-table tbody tr:hover {
    background: var(--primary-light);
}

.schedule-table tbody tr.separator-row td {
    text-align: center;
    padding: 8px;
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-gray);
}

/* ========== РАЗДЕЛ С ОФФЕРАМИ ========== */
.credit-offers-section {
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 20px;
}

.credit-offers-section h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin: 0 0 15px 0;
    font-weight: 700;
    text-align: center;
}

.section-description {
    color: var(--text-gray);
    font-size: 1.05rem;
    line-height: 1.6;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

.offers-grid {
    display: grid;
    gap: 25px;
    margin-top: 30px;
}

.no-offers {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-light);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.no-offers p {
    color: var(--text-gray);
    font-size: 1.1rem;
    margin: 10px 0;
}

/* ========== SEO КОНТЕНТ ========== */
.seo-content {
    max-width: 1200px;
    margin: 60px auto;
    padding: 40px 20px;
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.seo-content h2 {
    font-size: 1.75rem;
    color: var(--text-dark);
    margin: 0 0 20px 0;
    font-weight: 700;
}

.seo-content h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin: 30px 0 15px 0;
    font-weight: 600;
}

.seo-content p {
    color: var(--nd-text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 15px;
}

.seo-content ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.seo-content ul li {
    color: var(--nd-text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 12px;
    padding-left: 30px;
    position: relative;
}

.seo-content ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

.seo-content ul li strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 1200px) {
    .calculator-offers-layout {
        grid-template-columns: 1fr 400px;
        gap: 25px;
    }
}

@media (max-width: 968px) {
    .calculator-offers-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .calc-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .calculator-sidebar-offers {
        position: relative;
        max-height: none;
    }
    
    .result-panel {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ========== КОМПАКТНАЯ МОБИЛЬНАЯ ВЕРСИЯ ========== */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0 30px;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .hero-section .lead {
        font-size: 0.95rem;
    }
    
    .credit-calculator-wrapper {
        padding: 0 12px;
        margin-bottom: 40px;
    }
    
    .calculator-card {
        padding: 20px 15px;
        border-radius: 16px;
    }
    
    .calculator-card h2 {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }
    
    .subtitle {
        font-size: 0.8rem;
        margin-bottom: 20px;
        line-height: 1.5;
    }
    
    .calc-row {
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .calc-input-group {
        gap: 8px;
    }
    
    .calc-input-group label {
        font-size: 0.8rem;
        margin-bottom: 3px;
    }
    
    
    
    .calc-input-group input[type="number"] {
        width: 100px;
        padding: 8px 10px;
        font-size: 0.95rem;
    }
    
    .term-display input[type="number"] {
        width: 70px;
    }
    
    .term-unit-select {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .calc-date-input {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .payment-type-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .result-panel {
        padding: 15px 12px;
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .result-item span {
        font-size: 0.7rem;
        margin-bottom: 4px;
    }
    
    .result-item strong {
        font-size: 1rem;
    }
    
    .result-item .total {
        font-size: 1.2rem;
    }
    
    .cta-button {
        padding: 14px;
        font-size: 1rem;
    }
    
    .disclaimer {
        font-size: 0.7rem;
        margin-top: 12px;
    }
    
    .calculator-sidebar-offers {
        padding: 18px 15px;
        border-radius: 16px;
    }
    
    .sidebar-offers-title {
        font-size: 1.1rem;
        margin-bottom: 15px;
        padding-bottom: 12px;
    }
    
    
    
    
    
    .view-all-offers-btn {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .payment-schedule-section {
        padding: 20px 15px;
        border-radius: 16px;
    }
    
    .schedule-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .schedule-header h3 {
        font-size: 1.2rem;
    }
    
    .schedule-legend {
        gap: 15px;
    }
    
    .legend-item {
        font-size: 0.8rem;
    }
    
    .schedule-chart-wrapper {
        height: 250px;
        margin-bottom: 20px;
    }
    
    .show-schedule-btn {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .schedule-table {
        font-size: 0.75rem;
    }
    
    .schedule-table th,
    .schedule-table td {
        padding: 8px 6px;
    }
    
    .credit-offers-section h2 {
        font-size: 1.5rem;
    }
    
    .section-description {
        font-size: 0.95rem;
    }
    
    .seo-content {
        padding: 30px 15px;
    }
    
    .seo-content h2 {
        font-size: 1.4rem;
    }
    
    .seo-content h3 {
        font-size: 1.2rem;
    }
    
    .seo-content p,
    .seo-content ul li {
        font-size: 0.9rem;
    }
}

/* ========== ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ ========== */
@media (max-width: 480px) {
    .hero-section {
        padding: 30px 0 20px;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .hero-section .lead {
        font-size: 0.9rem;
    }
    
    .credit-calculator-wrapper {
        padding: 0 10px;
    }
    
    .calculator-card {
        padding: 15px 12px;
    }
    
    .calculator-card h2 {
        font-size: 1.15rem;
    }
    
    .subtitle {
        font-size: 0.75rem;
    }
    
    .calc-input-group label {
        font-size: 0.75rem;
    }
    
    .calc-input-group input[type="number"] {
        width: 85px;
        padding: 7px 8px;
        font-size: 0.85rem;
    }
    
    .term-display {
        gap: 6px;
    }
    
    .term-display input[type="number"] {
        width: 60px;
    }
    
    .term-unit-select {
        padding: 7px 8px;
        font-size: 0.8rem;
    }
    
    .payment-type-btn {
        padding: 9px 10px;
        font-size: 0.8rem;
    }
    
    .result-panel {
        padding: 12px 10px;
        gap: 8px;
    }
    
    .result-item span {
        font-size: 0.65rem;
    }
    
    .result-item strong {
        font-size: 0.9rem;
    }
    
    .result-item .total {
        font-size: 1.1rem;
    }
    
    .cta-button {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    .calculator-sidebar-offers {
        padding: 15px 12px;
    }
    
    .sidebar-offers-title {
        font-size: 1rem;
    }
    
    .payment-schedule-section {
        padding: 15px 12px;
    }
    
    .schedule-header h3 {
        font-size: 1.1rem;
    }
    
    .schedule-chart-wrapper {
        height: 200px;
    }
    
    .credit-offers-section h2 {
        font-size: 1.3rem;
    }
    
    .seo-content {
        padding: 20px 12px;
    }
}

/* ========== ТЕМНАЯ ТЕМА (ОПЦИОНАЛЬНО) ========== */
@media (prefers-color-scheme: dark) {
    /* Раскомментируйте если нужна темная тема
    */
}

/* ========== СТИЛИ ДЛЯ КОМПАКТНОГО СПИСКА В САЙДБАРЕ ========== */
.listing-compact-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.listing-compact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--nd-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s;
}

.listing-compact-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(47, 191, 113, 0.1);
}

.listing-compact-left {
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 1;
}

.listing-compact-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
}

.listing-compact-info {
    flex: 1;
    min-width: 0;
}

.listing-compact-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listing-compact-rating {
    font-size: 0.75rem;
    color: #f59e0b;
    font-weight: 600;
    margin-bottom: 4px;
}

.listing-compact-conditions {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin: 0;
    line-height: 1.3;
}

.listing-compact-right {
    flex-shrink: 0;
}

.listing-btn-compact {
    display: inline-block;
    padding: 8px 16px;
    background: #0D7654;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.18s, transform 0.15s;
}

.listing-btn-compact:hover {
    background: #07513A;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .listing-compact-item {
        padding: 10px;
    }
    
    .listing-compact-logo {
        width: 40px;
        height: 40px;
    }
    
    .listing-compact-name {
        font-size: 0.85rem;
    }
    
    .listing-btn-compact {
        padding: 7px 12px;
        font-size: 0.8rem;
    }
}

/* ---- CTA-блок «Готовы оформить кредит?» (credits.php) ---- */
.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 13px 24px;
    border: 1px solid var(--nd-emerald-900);
    border-radius: var(--nd-r-lg);
    background: linear-gradient(180deg, var(--nd-emerald-700) 0%, var(--nd-emerald-900) 100%);
    color: #FFFFFF;
    font-size: var(--nd-fs-base);
    font-weight: 700;
    letter-spacing: -.01em;
    text-decoration: none;
    box-shadow: 0 16px 30px -18px rgba(6,59,43,.95);
    transition:
        transform var(--nd-t) var(--nd-ease),
        box-shadow var(--nd-t) var(--nd-ease),
        filter var(--nd-t) var(--nd-ease);
}
.cta-link::after { content: '\2192'; transition: transform var(--nd-t) var(--nd-ease); }
.cta-link:hover {
    color: #FFFFFF;
    filter: brightness(1.06);
    transform: translateY(-2px);
    box-shadow: 0 22px 38px -18px rgba(6,59,43,.95);
}
.cta-link:hover::after { transform: translateX(3px); }
.cta-link:focus-visible { outline: 2px solid var(--nd-accent); outline-offset: 3px; }

@media (max-width: 560px) {
    .cta-link { display: flex; width: 100%; justify-content: center; }
}
