/* ====================
   СТРАНИЦА АДРЕСОВ (address.html)
   В стиле основного сайта
   ==================== */

/* Hero секция - только поиск и популярные города */
.address-hero {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 3px solid #800020;
    padding: 30px 0 40px;
}

/* Поиск */
.address-search-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.address-search-input {
    width: 100%;
    padding: 14px 20px 14px 45px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s;
    background: white;
}

.address-search-input:focus {
    border-color: #800020;
    box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.1);
}

.address-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
}

.address-search-clear {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px;
    border-radius: 50%;
}

.address-search-clear:hover {
    background: #f3f4f6;
    color: #4b5563;
}

.address-results-count {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    margin-top: 8px;
}

/* Популярные города */
.popular-cities {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}

.popular-city {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 30px;
    color: #1f2937;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.popular-city:hover {
    background: #800020;
    border-color: #800020;
    color: white;
    transform: translateY(-2px);
}

.popular-city i {
    color: #800020;
    font-size: 12px;
}

.popular-city:hover i {
    color: white;
}

/* Навигация по буквам - липкая с отступом под флаги */
.letter-nav {
    position: sticky;
    top: 105px;  /* универсальное значение, работает и на десктопе, и на мобилке */
    z-index: 99;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 0;
}

/* На мобильных устройствах увеличиваем отступ ещё больше */
@media (max-width: 768px) {
    .letter-nav {
        top: 140px; /* Флаги на мобилке занимают больше места */
        padding: 10px 0;
    }
    
    .letter-nav-link {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

.letter-nav-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.letter-nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f8f9fa;
    color: #1f2937;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.letter-nav-link:hover {
    background: #800020;
    color: white;
}

.letter-nav-top {
    background: #1f2937;
    color: white;
}

.letter-nav-top:hover {
    background: #800020;
}

/* Секция с городами */
.cities-section {
    scroll-margin-top: 130px;
}

.letter-block {
    margin-bottom: 48px;
}

.letter-title {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.letter-title h2 {
    font-size: 32px;
    font-weight: 800;
    color: #800020;
    margin: 0;
    background: linear-gradient(135deg, #800020, #4a0012);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.letter-title hr {
    flex: 1;
    border: none;
    height: 1px;
    background: linear-gradient(90deg, #e5e7eb 0%, transparent 100%);
}

/* Сетка городов */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Карточка города */
.city-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.city-card:hover {
    transform: translateY(-3px);
    border-color: #800020;
    box-shadow: 0 8px 24px rgba(128, 0, 32, 0.12);
}

.city-card-icon {
    width: 40px;
    height: 40px;
    background: rgba(128, 0, 32, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.city-card-icon i,
.city-card-icon svg {
    color: #800020;
    font-size: 20px;
}

.city-card-info {
    flex: 1;
}

.city-card-name {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.city-card-region {
    font-size: 13px;
    color: #6b7280;
}

.city-card-arrow {
    color: #d1d5db;
    font-size: 14px;
    transition: all 0.2s;
}

.city-card:hover .city-card-arrow {
    color: #800020;
    transform: translateX(4px);
}

/* Сообщение "ничего не найдено" */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f8fafc;
    border-radius: 24px;
    border: 1px solid #e5e7eb;
}

.no-results-icon {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border: 1px solid #e5e7eb;
}

.no-results-icon i {
    font-size: 32px;
    color: #800020;
}

.no-results h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.no-results p {
    color: #6b7280;
}

/* Рекламный блок */
.address-ads {
    margin: 40px 0;
}

/* Адаптив */
@media (max-width: 768px) {
    .letter-nav {
        top: 100px; /* На мобилках header меньше */
        padding: 10px 0;
    }
    
    .letter-nav-link {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .letter-title h2 {
        font-size: 26px;
    }
    
    .cities-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .city-card {
        padding: 14px 16px;
    }
    
    .city-card-icon {
        width: 44px;
        height: 44px;
    }
    
    .city-card-icon i {
        font-size: 20px;
    }
    
    .city-card-name {
        font-size: 16px;
    }
    
    .popular-city {
        padding: 6px 14px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .letter-nav {
        top: 90px;
    }
    
    .letter-nav-link {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
    
    .letter-title h2 {
        font-size: 22px;
    }
}