/* Стили для одиночных страниц (новости, блог, услуги, недвижимость) */

.single-post {
    padding: 80px 0;
    background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100%);
    min-height: calc(100vh - 200px);
}

.post-header {
    text-align: center;
    margin-bottom: 60px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e5e7eb;
    position: relative;
}

.post-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.post-header h1 {
    font-size: clamp(32px, 5vw, 48px);
    color: var(--text-dark);
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--text-dark) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-header time {
    color: var(--text-light);
    font-size: 15px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 20px;
}

.post-image {
    margin-bottom: 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.post-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.post-image:hover::before {
    opacity: 1;
}

.post-image img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 0;
}

.post-image:hover img {
    transform: scale(1.02);
}

.post-content {
    background-color: #FFFFE0;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.9;
    color: #374151;
}

.post-content h2 {
    font-size: clamp(26px, 4vw, 36px);
    margin-top: 50px;
    margin-bottom: 24px;
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.3;
    position: relative;
    padding-bottom: 12px;
}

.post-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.post-content h3 {
    font-size: clamp(22px, 3vw, 28px);
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.4;
}

.post-content p {
    margin-bottom: 24px;
    color: #4b5563;
    text-align: justify;
}

.post-content p:first-of-type {
    font-size: 20px;
    line-height: 1.8;
    color: var(--text-dark);
    font-weight: 400;
}

.post-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.post-content a:hover {
    color: var(--secondary-color);
    border-bottom-color: var(--primary-color);
}

.post-content ul, .post-content ol {
    margin-bottom: 28px;
    padding-left: 32px;
    color: #4b5563;
}

.post-content ul li, .post-content ol li {
    margin-bottom: 12px;
    line-height: 1.8;
}

.post-content ul li::marker {
    color: var(--primary-color);
}

.post-content strong {
    color: var(--text-dark);
    font-weight: 600;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 24px;
    margin: 32px 0;
    font-style: italic;
    color: #6b7280;
    background: rgba(37, 99, 235, 0.05);
    padding: 20px 24px;
    border-radius: 0 8px 8px 0;
}

.post-content code {
    background: rgba(37, 99, 235, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--primary-color);
}

.post-content img:not([src*="whatsapp"]):not([src*="viber"]):not([src*="telegram"]):not([src*="facebook"]):not([src*="150x150"]):not([src*="24-247373"]) {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
}

/* Большие изображения в ссылках (фото объектов) - исключаем иконки мессенджеров */
.post-content a img:not([src*="whatsapp"]):not([src*="viber"]):not([src*="telegram"]):not([src*="facebook"]):not([src*="150x150"]),
.post-content p a img:not([src*="whatsapp"]):not([src*="viber"]):not([src*="telegram"]):not([src*="facebook"]):not([src*="150x150"]) {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Исключаем иконки из общего правила для изображений */
.post-content a[href*="whatsapp"] img,
.post-content a[href*="viber"] img,
.post-content a[href*="telegram"] img,
.post-content a[href*="facebook"] img,
.post-content a[href*="messenger"] img {
    display: inline-block !important;
}

/* Стили для небольших иконок/маркеров в контенте (только конкретные иконки) */
.post-content p img[src*="24-247373"],
.post-content img[src*="24-247373"] {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    display: inline-block !important;
    vertical-align: middle;
    margin: 0 4px !important;
    object-fit: contain;
}

/* Иконки мессенджеров - всегда маленькие */
.post-content p a[href*="whatsapp"] img,
.post-content p a[href*="viber"] img,
.post-content p a[href*="telegram"] img,
.post-content p a[href*="facebook"] img,
.post-content p a[href*="messenger"] img,
.post-content a[href*="whatsapp"] img,
.post-content a[href*="viber"] img,
.post-content a[href*="telegram"] img,
.post-content a[href*="facebook"] img,
.post-content a[href*="messenger"] img,
.post-content img[src*="whatsapp"],
.post-content img[src*="viber"],
.post-content img[src*="telegram"],
.post-content img[src*="facebook"],
.post-content img[src*="150x150"] {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    display: inline-block !important;
    vertical-align: middle;
    margin: 0 8px !important;
    object-fit: contain;
}

/* Специальные стили для страницы недвижимости */
.section-description img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
}

.section-description a img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.section-description img[src*="24-247373"] {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    display: inline-block !important;
    vertical-align: middle;
    margin: 0 4px !important;
    object-fit: contain;
}

/* Адаптивность */
@media (max-width: 768px) {
    .single-post {
        padding: 40px 0;
    }
    
    .post-header {
        margin-bottom: 40px;
        padding-bottom: 20px;
    }
    
    .post-content {
        font-size: 16px;
        line-height: 1.8;
        padding: 20px;
    }
    
    .post-image {
        margin-bottom: 30px;
        border-radius: 12px;
    }
    
    .post-image img {
        border-radius: 12px;
    }
    
    .post-navigation {
        margin-top: 50px;
        padding-top: 30px;
    }
    
    .post-navigation .btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}

