/* ============================================
   MFO CITY DIRECTORY STYLES
   ============================================ */

.mfo-city-directory {
    padding: 2rem 0 4rem;
}

.page-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.page-description {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.city-section {
    margin-bottom: 3rem;
}

.city-section .section-title {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-200);
    color: var(--gray-800);
}

.city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.city-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    text-decoration: none;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    display: block;
}

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

.city-card-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.city-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.city-count {
    font-size: 0.9rem;
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

/* Специальные города */
.special-cities {
    background: linear-gradient(135deg, rgba(0, 93, 239, 0.05) 0%, rgba(0, 72, 196, 0.02) 100%);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    margin-bottom: 2rem;
}

.special-cities .city-card {
    background: var(--white);
}

/* Блок эксперта (адаптация из loans.css) */
.expert-section {
    margin-bottom: 3rem;
}

.expert-card-wide {
    background: linear-gradient(135deg, rgba(0, 93, 239, 0.05) 0%, rgba(0, 72, 196, 0.02) 100%);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    border: 1px solid var(--gray-200);
}

.expert-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.expert-section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.expert-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.expert-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.expert-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.expert-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.expert-name {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
    color: var(--gray-900);
}

.expert-title {
    color: var(--gray-600);
    font-size: 0.95rem;
}

.expert-experience {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

.expert-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--gray-700);
    padding: 1rem 0;
    border-top: 1px solid var(--gray-200);
    margin-top: 0.5rem;
}

.expert-text p {
    margin-bottom: 1rem;
}

.expert-text p:last-child {
    margin-bottom: 0;
}

.expert-date-info {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--gray-500);
    text-align: right;
    border-top: 1px solid var(--gray-200);
    padding-top: 1rem;
}

/* Список МФО */
.mfos-list-section {
    margin-top: 2rem;
}

.mfos-list-section .section-title {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    color: var(--gray-800);
}

.mfos-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Карточка МФО */
.mfo-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: all 0.3s ease;
}

.mfo-card:hover {
    box-shadow: var(--box-shadow);
    border-color: var(--primary-color);
}

.mfo-card-header {
    display: flex;
    padding: 1.5rem;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.mfo-logo {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    background: var(--gray-100);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.mfo-info {
    flex: 1;
    min-width: 200px;
}

.mfo-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.mfo-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.cbr-license-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cbr-license-badge:hover {
    background: #c8e6c9;
    color: #1b5e20;
}

.cbr-license-badge i {
    font-size: 0.75rem;
}

.mfo-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.rating-stars {
    display: flex;
    gap: 0.125rem;
}

.rating-stars i {
    color: #ffc107;
    font-size: 0.875rem;
}

.rating-value {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.9rem;
}

.rating-count {
    color: var(--gray-500);
    font-size: 0.8rem;
}

.mfo-address {
    color: var(--gray-600);
    font-size: 0.85rem;
    margin: 0.25rem 0 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mfo-address i {
    color: var(--primary-color);
    width: 16px;
}

.mfo-card-header .btn {
    flex-shrink: 0;
    min-width: 160px;
}

/* Детальная информация */
.mfo-card-details {
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    padding-top: 1rem;
}

.detail-item {
    padding: 0.75rem;
    background: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
}

.detail-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-label i {
    color: var(--primary-color);
    width: 20px;
}

.detail-value {
    color: var(--gray-800);
    font-size: 0.9rem;
    line-height: 1.5;
}

.phones-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.phone-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.phone-link:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: var(--gray-100);
    border-radius: 20px;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.social-link:hover {
    background: var(--gray-200);
    color: var(--primary-color);
}

.social-link i {
    font-size: 0.9rem;
}

.cbr-data .detail-value p {
    margin: 0.25rem 0;
    font-size: 0.85rem;
}

.cbr-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
}

.cbr-link:hover {
    text-decoration: underline;
}

.cbr-link i {
    font-size: 0.7rem;
}

/* Кнопка показать еще */
.show-more-container {
    text-align: center;
    margin-top: 2rem;
}

.btn-large {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

/* Пустые результаты */
.no-results {
    text-align: center;
    padding: 3rem;
    background: var(--gray-50);
    border-radius: var(--border-radius-lg);
    color: var(--gray-600);
}

.no-results i {
    font-size: 3rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.no-results p {
    margin: 0.5rem 0;
}

/* Адаптивность */
@media (max-width: 992px) {
    .city-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mfo-card-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mfo-logo {
        width: 60px;
        height: 60px;
        align-self: center;
    }
    
    .mfo-info {
        text-align: center;
    }
    
    .mfo-name-row {
        justify-content: center;
    }
    
    .mfo-rating {
        justify-content: center;
    }
    
    .mfo-address {
        justify-content: center;
    }
    
    .mfo-card-header .btn {
        width: 100%;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .expert-card-wide {
        padding: 1.5rem;
    }
    
    .expert-section-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 576px) {
    .city-grid {
        grid-template-columns: 1fr;
    }
    
    .city-name {
        font-size: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
}
.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: var(--gray-100);
    border-radius: 20px;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    width: fit-content;
}

.social-link:hover {
    background: var(--gray-200);
    color: var(--primary-color);
}

/* Отступы внутри детальной карточки */
.detail-item {
    margin-bottom: 0.75rem;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-value .phones-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-value i {
    margin-right: 0.5rem;
    width: 16px;
    color: var(--primary-color);
}

/* Кнопка "Подобрать займ" в блоке эксперта */
.expert-button-wrapper {
    margin-top: 1.5rem;
    text-align: center;
}

/* Отступ снизу перед футером */
.mfo-city-directory {
    margin-bottom: 3rem;
}