/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Lucida Grande", Verdana, Arial, sans-serif;
    background: #040404;
    color: #777777;
    font-size: 11px;
}

#page {
    max-width: 1201px;
    width: 100%;
    margin: 0 auto;
    background: #080808;
}

#page_bot {
    background: #080808;
}

#page_top {
    min-height: 726px;
}

#page_cnt {
    max-width: 1023px;
    width: 100%;
    margin: 0 auto;
    background: #080808;
    padding: 20px;
}

/* Header */
header {
    margin-bottom: 30px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 2px solid #910707;
}

.header-top h1 {
    margin: 0;
}

.header-top h1 a {
    color: #910707;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

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

.main-nav a {
    color: #777777;
    text-decoration: none;
    font-size: 14px;
}

.main-nav a:hover {
    color: #910707;
}

.header-bottom {
    padding: 15px 0;
}

.city-selector h4 {
    color: #910707;
    margin-bottom: 10px;
}

.city-selector ul {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.city-selector li {
    display: flex;
    align-items: center;
    gap: 5px;
}

.city-selector a {
    color: #777777;
    text-decoration: none;
}

.city-selector a.active {
    color: #910707;
    font-weight: bold;
}

.city-selector span {
    color: #999;
}

/* Профили */
.profiles-section {
    margin-top: 20px;
}

.profiles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    align-items: stretch;
}

.profile-box {
    background: #151515;
    border: 1px solid #333;
    border-radius: 5px;
    padding: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 600px;
}

.profile-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(145, 7, 7, 0.3);
}

.profile-box.profile-updated {
    border: 2px solid #28a745;
}

.profile-header {
    margin-bottom: 15px;
    flex-shrink: 0;
}

.profile-name {
    color: #910707;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    vertical-align: middle;
}

.profile-name:hover {
    text-decoration: underline;
}

.profile-id {
    color: #999;
    font-size: 12px;
}

.profile-photo {
    position: relative;
    width: 100%;
    height: 350px;
    min-height: 350px;
    overflow: hidden;
    border-radius: 5px;
    margin-bottom: 15px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    text-align: center;
    flex-shrink: 0;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.profile-photo:hover img {
    transform: scale(1.05);
}

.photo-count-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
}

.profile-info {
    margin-bottom: 15px;
    flex-shrink: 0;
}

.profile-info-item {
    margin-bottom: 8px;
    color: #ccc;
    font-size: 13px;
}

.profile-info-item strong {
    color: #910707;
}

.profile-services {
    flex-shrink: 0;
    margin-bottom: 15px;
}

.profile-services ul {
    list-style: none;
    margin-bottom: 15px;
}

.profile-services li {
    padding: 5px 0;
    color: #ccc;
    font-size: 12px;
    border-bottom: 1px solid #333;
}

.profile-prices {
    flex-shrink: 0;
    margin-bottom: 15px;
}

.profile-prices table {
    width: 100%;
    margin-bottom: 15px;
    font-size: 12px;
    color: #ccc;
}

.profile-prices td {
    padding: 5px;
}

.profile-phone {
    margin-bottom: 15px;
    flex-shrink: 0;
}

.profile-phone a {
    color: #910707;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
}

.profile-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #999;
    margin-top: auto;
    flex-shrink: 0;
}

/* Бейджи */
.updated-badge {
    display: inline-block;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
    animation: pulse 2s infinite;
    white-space: nowrap;
    flex-shrink: 0;
}

.verified-badge {
    display: inline-block;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
    white-space: nowrap;
}

.verified-badge:hover {
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

/* VIP бейджи */
.vip-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.vip-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.vip-top-vip {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.5);
    animation: vip-glow 2s infinite;
}

.vip-super-vip {
    background: linear-gradient(135deg, #C0C0C0 0%, #808080 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(192, 192, 192, 0.5);
}

.vip-vip {
    background: linear-gradient(135deg, #8B4513 0%, #654321 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(139, 69, 19, 0.5);
}

@keyframes vip-glow {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 2px 8px rgba(255, 215, 0, 0.8);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Детальная страница профиля */
.profile-detail {
    max-width: 900px;
    margin: 0 auto;
}

.profile-detail-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #910707;
}

.profile-detail-name {
    color: #910707;
    font-size: 28px;
    margin-bottom: 10px;
}

.profile-detail-photos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.profile-detail-photo {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    border-radius: 5px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-detail-photo:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.profile-detail-photo img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-detail-info {
    margin-bottom: 30px;
}

.profile-detail-services h2,
.profile-detail-prices h2,
.profile-detail-description h2 {
    color: #910707;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.profile-detail-services ul {
    list-style: none;
}

.profile-detail-services li {
    padding: 8px 0;
    border-bottom: 1px solid #333;
    color: #ccc;
}

.profile-detail-prices table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.profile-detail-prices th,
.profile-detail-prices td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.profile-detail-prices th {
    background: #910707;
    color: #fff;
}

.profile-detail-prices td {
    color: #ccc;
}

.profile-detail-description p {
    color: #ccc;
    line-height: 1.6;
}

.profile-detail-stats {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    color: #999;
    font-size: 14px;
}

.stat-item strong {
    color: #910707;
    font-size: 18px;
}

/* Модальное окно для фото */
.photo-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.photo-modal.active {
    display: flex;
}

.photo-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-modal-content img {
    max-width: 100%;
    max-height: 100vh;
    display: block;
    object-fit: contain;
}

.photo-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.photo-modal-close:hover,
.photo-modal-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.photo-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 24px;
    user-select: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.photo-modal-nav:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.photo-modal-prev {
    left: 20px;
}

.photo-modal-next {
    right: 20px;
}

.photo-modal-info {
    position: absolute;
    bottom: 20px;
    color: #fff;
    font-size: 16px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
}

/* Фильтры */
.filters-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.vip-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 15px;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.filter-btn:hover {
    background: #555;
    border-color: #910707;
}

.filter-btn.active {
    background: #910707;
    border-color: #ff0000;
    box-shadow: 0 2px 4px rgba(145, 7, 7, 0.5);
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 8px 15px;
    background: #151515;
    color: #ccc;
    text-decoration: none;
    border: 1px solid #333;
    border-radius: 3px;
    transition: all 0.3s;
    display: inline-block;
}

.pagination a:hover {
    background: #910707;
    color: #fff;
    border-color: #910707;
}

.pagination .active,
.pagination-link.active {
    background: #910707;
    color: #fff;
    border-color: #910707;
}

.pagination-link {
    padding: 8px 15px;
    background: #151515;
    color: #ccc;
    text-decoration: none;
    border: 1px solid #333;
    border-radius: 3px;
    transition: all 0.3s;
}

.pagination-link:hover {
    background: #910707;
    color: #fff;
    border-color: #910707;
}

/* Адаптивность */
@media (max-width: 1200px) {
    #page {
        width: 100%;
    }
    
    #page_cnt {
        width: 95%;
        padding: 15px;
    }
    
    .profiles-list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* Планшеты */
@media (max-width: 768px) {
    body {
        font-size: 12px;
    }
    
    #page_cnt {
        padding: 10px;
    }
    
    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-top h1 a {
        font-size: 20px;
    }
    
    .main-nav {
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
    }
    
    .main-nav a {
        font-size: 12px;
    }
    
    .profiles-list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .profile-box {
        min-height: 500px;
        padding: 12px;
    }
    
    .profile-photo {
        height: 250px;
        min-height: 250px;
    }
    
    .profile-name {
        font-size: 16px;
    }
    
    .filters-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }
    
    .filter-group span {
        margin-bottom: 5px;
        display: block;
    }
    
    .filter-btn {
        font-size: 12px;
        padding: 6px 12px;
        display: inline-block;
    }
    
    .profiles-section h2 {
        font-size: 20px;
    }
    
    .profile-detail-photos {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .profile-detail-info {
        font-size: 13px;
    }
    
    .profile-detail-services h2,
    .profile-detail-prices h2,
    .profile-detail-description h2 {
        font-size: 18px;
    }
}

/* Мобильные устройства */
@media (max-width: 480px) {
    body {
        font-size: 11px;
    }
    
    #page_cnt {
        padding: 8px;
    }
    
    .header-top {
        padding: 10px 0;
    }
    
    .header-top h1 a {
        font-size: 18px;
    }
    
    .main-nav {
        flex-direction: column;
        gap: 8px;
    }
    
    .main-nav a {
        font-size: 11px;
        padding: 5px 0;
    }
    
    .city-selector ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .profiles-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .profile-box {
        min-height: auto;
        padding: 10px;
    }
    
    .profile-photo {
        height: 200px;
        min-height: 200px;
    }
    
    .profile-name {
        font-size: 15px;
    }
    
    .profile-info-item {
        font-size: 12px;
    }
    
    .profile-services li {
        font-size: 11px;
    }
    
    .profile-prices table {
        font-size: 11px;
    }
    
    .profile-phone a {
        font-size: 14px;
    }
    
    .profile-stats {
        font-size: 11px;
        gap: 10px;
    }
    
    .filters-container {
        gap: 15px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-btn {
        font-size: 11px;
        padding: 5px 10px;
        white-space: nowrap;
    }
    
    .profile-detail-photos {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .profile-detail-photo {
        padding-bottom: 100%;
    }
    
    .profile-detail-info {
        font-size: 12px;
    }
    
    .profile-detail-services h2,
    .profile-detail-prices h2,
    .profile-detail-description h2 {
        font-size: 16px;
    }
    
    /* Модальное окно для фото на мобильных */
    .photo-modal {
        padding: 10px;
    }
    
    .photo-modal-content {
        max-width: 100%;
        max-height: 90vh;
    }
    
    .photo-modal-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
    }
    
    .photo-modal-prev,
    .photo-modal-next {
        font-size: 20px;
        padding: 10px;
    }
    
    /* Пагинация на мобильных */
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
        justify-content: center;
    }
    
    .pagination a,
    .pagination span,
    .pagination-link {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 40px;
        text-align: center;
    }
    
    /* Заголовки секций на мобильных */
    .profiles-section h2 {
        font-size: 18px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .header-top h1 a {
        font-size: 16px;
    }
    
    .profile-photo {
        height: 180px;
        min-height: 180px;
    }
    
    .profile-name {
        font-size: 14px;
    }
    
    .filter-btn {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .profile-detail-photos {
        grid-template-columns: 1fr;
    }
}
