/*
 Theme Name: kadence-child
 Description: Дочерняя тема для Kadence
 Author: Kseniya Kiso
 Template: kadence
 Version: 1.0.0
*/
/* == От сохранения  == */
img[src*="brend-video"] {
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-drag: none !important;
}
/* ============================================================
   === ПРИОРИТЕТНЫЕ СТИЛИ ДЛЯ ШРИФТОВ (ПЕРЕБИВАЕМ KADENCE) ===
   ============================================================ */

/* Принудительно применяем Space Grotesk ко всем заголовкам */
.xm-morph-container .xm-word,
.xm-fg-metr,
.xm-podcast-metr,
h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif !important;
}

/* Сохраняем объемные тени для всех слов морфинга */
.xm-word {
    text-shadow: 0 1px 0 #999, 0 2px 0 #888, 0 3px 0 #777, 0 4px 0 #666, 0 5px 0 #555, 0 6px 1px rgba(0,0,0,0.1), 0 0 5px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.3), 0 3px 5px rgba(0,0,0,0.2), 0 5px 10px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.2), 0 20px 20px rgba(0,0,0,0.15) !important;
    -webkit-text-stroke: 1px rgba(0,0,0,0.1) !important; /* Дополнительная обводка для объема */
}

/* Для вишневого стиля */
.xm-word-cherry {
    text-shadow: 0 1px 0 #C82040, 0 2px 0 #A01830, 0 3px 0 #7A0C20, 0 4px 0 #5C0610, 0 5px 0 #4A050D, 0 6px 0 #3A040A, 0 7px 0 #2A0307, 0 8px 15px rgba(0,0,0,0.4), 0 0 10px rgba(200,32,64,0.5), 0 1px 3px rgba(0,0,0,0.5), 0 3px 5px rgba(0,0,0,0.4), 0 5px 10px rgba(0,0,0,0.3), 0 10px 15px rgba(0,0,0,0.25), 0 20px 25px rgba(0,0,0,0.2) !important;
}

/* Запрещаем Kadence переопределять наши стили */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.kadence-text-color,
.wp-block-heading {
    font-family: 'Space Grotesk', sans-serif !important;
}

/* === КОНТЕЙНЕР С ОТСТУПАМИ === */
.xm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .xm-container {
        padding: 0 1rem;
    }
}

/* ============================================================
   === ПК ШАПКА ДЛЯ ВН.СТР (ВИШНЕВАЯ) ===
   ============================================================ */

.xm-simple-header {
    position: relative;
    width: 100%;
    background-color: #050505;
    padding: 2.5rem 1rem 3.5rem 1rem !important;
    text-align: center;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 0 !important;
    min-height: auto !important; 
    height: auto !important;
}

/* --- СЛОЙ 1: ОБЪЕМНЫЙ X С БЛИКАМИ (НА ЗАДНЕМ ПЛАНЕ) --- */
.xm-bg-x {
    position: absolute;
    top: 58%;
    left: 50%;
    transform: translate(-50%, -50%) scaleX(1.2);
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(14rem, 40vw, 30rem);
    font-weight: 900;
    line-height: 1;
    color: #2a0000;
    z-index: 1;
    
    text-shadow: 
        -2px -2px 0 #500, 
         2px -2px 0 #500,
        -2px  2px 0 #500,
         2px  2px 0 #500,
        0 0 15px rgba(255, 50, 50, 0.6),
        0 0 30px rgba(200, 0, 0, 0.8),
        0 0 60px rgba(100, 0, 0, 0.9),
        0 20px 50px rgba(0,0,0,1);
        
    pointer-events: none;
    user-select: none;
    opacity: 0.95;
}

/* --- СЛОЙ 2: СЕРЕБРЯНЫЙ METR --- */
.xm-fg-metr {
    position: relative;
    z-index: 10;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(4rem, 11vw, 8rem);
    font-weight: 900;
    letter-spacing: 0.02em;
    margin: 0;
    line-height: 0.9;
    color: #e8eef2; 
    
    text-shadow: 
        0 1px 0 #ffffff,
        0 2px 0 #f0f4f8,
        0 3px 0 #c0c8d0,
        0 4px 0 #a0aab5,
        0 5px 0 #707a85,
        0 6px 0 #404a55,
        0 0 10px rgba(200, 230, 255, 0.6),
        0 0 25px rgba(150, 190, 230, 0.4),
        0 15px 35px rgba(0, 0, 0, 0.9);
}

/* --- СЛОЙ 3: КИНОПРОДАКШН / МОРФИНГ --- */
.xm-sub-text {
    position: relative;
    z-index: 10;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.9rem, 2.5vw, 1.8rem);
    font-weight: 500;
    letter-spacing: 0.25em;
    margin-top: 0.2rem;
    color: #b0b8c0;
    
    text-shadow: 
        0 1px 0 #e0e5ea,
        0 2px 0 #8090a0,
        0 0 8px rgba(200, 230, 255, 0.3),
        0 5px 10px rgba(0, 0, 0, 0.7);
        
    text-transform: uppercase;
}

/* --- СЛОЙ 4: ВИШЕНКА --- */
.xm-cherry-img {
    position: absolute;
    z-index: 20;
    top: 49%;      
    right: 27%;    
    width: clamp(80px, 12vw, 140px);
    height: auto;
    filter: drop-shadow(0 8px 12px rgba(0,0,0,0.8));
    pointer-events: none;
    transform: rotate(-10deg);
}

/* --- ПОДЗАГОЛОВОК (ЯРКИЙ И ЧЕТКИЙ) --- */
.xm-simple-subtitle {
    position: relative;
    z-index: 10;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.75rem, 1.8vw, 1.1rem);
    text-transform: uppercase;
    letter-spacing: 0.35em;
    color: #a0a0a0;
    margin-top: 2rem;
    opacity: 1;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* ============================================================
   === МОРФИНГ ДЛЯ ВНУТРЕННИХ СТРАНИЦ ===
   ============================================================ */

.xm-morph-wrapper {
    position: relative;
    z-index: 10;
    height: clamp(1.2rem, 3vw, 2rem);
    margin-top: 0.3rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.xm-morph-word {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: clamp(0.9rem, 2.5vw, 1.8rem) !important;
    font-weight: 500 !important;
    letter-spacing: 0.2em !important;
    text-transform: uppercase !important;
    color: #b0b8c0 !important;
    
    text-shadow: 
        0 1px 0 #e0e5ea,
        0 2px 0 #8090a0,
        0 0 8px rgba(200, 230, 255, 0.3),
        0 5px 10px rgba(0, 0, 0, 0.7) !important;
        
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    width: max-content;
}

.xm-word-1 {
    animation: xm-fade-out 6s infinite ease-in-out !important;
}

.xm-word-2 {
    animation: xm-fade-in 6s infinite ease-in-out !important;
}

@keyframes xm-fade-out {
    0%, 40% { opacity: 1; filter: blur(0); }
    50%, 90% { opacity: 0; filter: blur(5px); }
    100% { opacity: 1; filter: blur(0); }
}

@keyframes xm-fade-in {
    0%, 40% { opacity: 0; filter: blur(5px); }
    50%, 90% { opacity: 1; filter: blur(0); }
    100% { opacity: 0; filter: blur(5px); }
}

/* ============================================================
   === МОБИЛЬНАЯ ВЕРСИЯ ШАПКИ ПРОДАКШН (до 768px) ===
   ============================================================ */
@media (max-width: 768px) {
    .xm-simple-header {
        padding: 3rem 1rem 2rem 1rem !important;
        min-height: auto !important;
        overflow: visible !important;
    }

    .xm-bg-x {
        top: 60% !important;
        font-size: 20rem !important;
        transform: translate(-50%, -50%) scaleX(1.2);
    }

    .xm-fg-metr {
        font-size: 3.5rem !important;
        margin-bottom: 0.2rem !important;
    }

    .xm-sub-text {
        font-size: 1rem !important;
        letter-spacing: 0.15em !important;
    }

    .xm-cherry-img {
        top: 52% !important;
        right: 15% !important;
        width: 70px !important;
        transform: rotate(-20deg) !important;
    }

    .xm-simple-subtitle {
        font-size: 0.7rem !important;
        letter-spacing: 0.15em !important;
        margin-top: 1.5rem !important;
        line-height: 1.4 !important;
    }
}

/* ============================================================
   === ШАПКА СТУДИИ: ЖЕЛТЫЙ X + МЕТАЛЛИЧЕСКИЙ METR (ФИНАЛ) ===
   ============================================================ */

.xm-podcast-header {
    position: relative;
    width: 100%;
    background-color: #12100E;
    
    /* Устанавливаем фиксированную минимальную высоту, как у вишневой шапки */
    /* Подберите значение, чтобы оно совпадало с высотой вишневой шапки (примерно 350-400px) */
    min-height: 380px !important; 
    
    padding: 0 1rem !important; /* Убираем вертикальные паддинги, пусть работает min-height */
    margin-top: 0 !important;
    
    text-align: center;
    overflow: visible !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    
    /* ВОЗВРАЩАЕМ ЦЕНТРИРОВАНИЕ! */
    justify-content: center !important; 
    
    border: none !important;
}

/* --- СЛОЙ 1: ОБЪЕМНЫЙ ЖЕЛТЫЙ X (ФОН) --- */
.xm-podcast-x {
    position: absolute;
    top: 63%; /* Центр буквы смещен вниз */
    left: 50%;
    transform: translate(-50%, -50%) scaleX(1.2);
    
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(16rem, 40vw, 32rem);
    font-weight: 900;
    line-height: 1;
    color: #B8860B;
    z-index: 1;
    
    text-shadow: 
        -2px -2px 0 #DAA520, 
         2px -2px 0 #DAA520,
        -2px  2px 0 #DAA520,
         2px  2px 0 #DAA520,
        0 0 20px rgba(244, 196, 48, 0.6),
        0 0 40px rgba(218, 165, 32, 0.8),
        0 0 80px rgba(184, 134, 11, 0.9),
        0 20px 50px rgba(0,0,0,0.9);
        
    pointer-events: none;
    user-select: none;
    opacity: 0.9;
}

/* --- СЛОЙ 2: МЕТАЛЛИЧЕСКИЙ METR --- */
.xm-podcast-metr {
    position: relative;
    z-index: 10;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(3.5rem, 11vw, 8rem);
    font-weight: 900;
    letter-spacing: 0.02em;
    
    /* Полный сброс отступов заголовка */
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0.9;
    
    color: #e8eef2; 
    
    text-shadow: 
        0 1px 0 #ffffff,
        0 2px 0 #f0f4f8,
        0 3px 0 #c0c8d0,
        0 4px 0 #a0aab5,
        0 5px 0 #707a85,
        0 6px 0 #404a55,
        0 0 15px rgba(200, 230, 255, 0.5),
        0 15px 35px rgba(0, 0, 0, 0.9);
}

/* --- НОВЫЙ УНИКАЛЬНЫЙ КЛАСС ДЛЯ ПОДКАСТ СТУДИЯ --- */
/* Используем xm-ps-subtitle чтобы точно не было дублей */
.xm-ps-subtitle {
    position: relative;
    z-index: 10;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    font-weight: 500;
    letter-spacing: 0.25em;
    
    /* Агрессивное прижатие */
    margin-top: 0.1rem !important; 
    margin-bottom: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    
    color: #F4C430;
    
    text-shadow: 
        0 1px 0 #ffeaa0,
        0 2px 0 #cfa020,
        0 0 10px rgba(244, 196, 48, 0.4),
        0 5px 15px rgba(0, 0, 0, 0.8);
        
    text-transform: uppercase;
    display: block !important; /* Гарантируем блочность */
}

/* --- НИЖНЯЯ ФРАЗА: ПРОСТРАНСТВО... --- */
.xm-podcast-tagline {
    position: relative;
    z-index: 10;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.8rem, 1.8vw, 1.2rem);
    font-weight: 400;
    letter-spacing: 0.3em;
    
    /* Отступ именно от ПОДКАСТ СТУДИЯ */
    margin-top: 2rem !important; 
    
    color: #E0D5C0;
    
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    text-transform: uppercase;
    opacity: 0.9;
}
/* ============================================================
   === МОБИЛЬНАЯ ВЕРСИЯ ШАПКИ ПОДКАСТ-СТУДИИ (до 768px) ===
   ============================================================ */
@media (max-width: 768px) {
    .xm-podcast-header {
        padding: 3rem 1rem 2rem 1rem !important;
        min-height: auto !important;
    }

    .xm-podcast-x {
        top: 57% !important;
        font-size: 18rem !important;
        transform: translate(-50%, -50%) scaleX(1.2);
    }

    .xm-podcast-metr {
        font-size: 3.5rem !important;
        margin-bottom: 0.2rem !important;
    }

    .xm-ps-subtitle {
        font-size: 1rem !important;
        letter-spacing: 0.15em !important;
    }

    .xm-podcast-tagline {
        font-size: 0.7rem !important;
        letter-spacing: 0.15em !important;
        margin-top: 1.5rem !important;
        line-height: 1.4 !important;
    }
}

/* === ПОДВАЛ === */

/* Виджеты */
.xm-footer-widget-left,
.xm-footer-widget-center,
.xm-footer-widget-right {
    padding: 1rem 0 !important;
}



.xm-footer-brand {
color: #F4C430 !important;
}

/* === ССЫЛКИ В ЦЕНТРЕ (TELEGRAM, YOUTUBE, RUTUBE) === */
.xm-footer-widget-center a {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 0.75rem !important;
    color: #e8eef2 !important;
    text-decoration: none !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    transition: color 0.3s ease !important;
    display: inline-block !important;
    margin: 0 1rem !important;
}

.xm-footer-widget-center a:hover {
    color: #F4C430 !important;
}

/* Телефон */
.xm-footer-widget-center a[href^="tel:"] {
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
}

/* Адрес */
.xm-footer-widget-center {
    font-family: 'Inter', sans-serif !important;
    font-size: 0.85rem !important;
    color: #e8eef2 !important;
    line-height: 1.6 !important;
}

/* Виджет справа */
.xm-footer-widget-right a {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    color: #F4C430 !important;
    border: 1px solid #F4C430 !important;
    padding: 0.8rem 1.5rem !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    background: transparent !important;
}

.xm-footer-widget-right a:hover {
    background: #F4C430 !important;
    color: #0a0a0a !important;
}

/* === COPYRIGHT И ЮР. ССЫЛКИ === */
.xm-footer-copyright {
    text-align: center !important;
    padding: 1.5rem 0 1rem 0 !important;
    border-top: 1px solid rgba(244, 196, 48, 0.1) !important;
    margin-top: 1rem !important;
}

/* Обёртка для ссылок - принудительно в строку */
.xm-footer-copyright > div,
.xm-footer-copyright p,
.xm-footer-copyright .xm-legal-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.8rem !important;
    flex-wrap: wrap !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Сами ссылки */
.xm-footer-copyright a {
    font-family: 'Inter', sans-serif !important;
    font-size: 0.7rem !important;
    color: #888 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
    transition: color 0.3s ease !important;
    white-space: nowrap !important;
    margin: 0 !important;
}

.xm-footer-copyright a:hover {
    color: #F4C430 !important;
}

/* Разделитель */
.xm-footer-copyright .xm-divider,
.xm-footer-copyright span {
    color: #555 !important;
    font-size: 0.7rem !important;
    margin: 0 0.8rem !important;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .xm-footer-widget-left,
    .xm-footer-widget-center,
    .xm-footer-widget-right {
        text-align: center !important;
        padding: 0.8rem 0 !important;
    }
    
    .xm-footer-widget-center a {
        display: block !important;
        margin: 0.5rem 0 !important;
        font-size: 0.7rem !important;
    }
    
    .xm-footer-widget-right a {
        padding: 0.7rem 1.2rem !important;
        font-size: 0.7rem !important;
    }
    
    /* Юр.ссылки на мобильном - в столбик */
    .xm-footer-copyright > div,
    .xm-footer-copyright p,
    .xm-footer-copyright .xm-legal-row {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .xm-footer-copyright .xm-divider,
    .xm-footer-copyright span {
        display: none !important;
    }
}

/* ============================================================
   === ДЛЯ НАЗВАНИЙ СТАТЕЙ H1===
   ============================================================ */

h1.entry-title {
  color: #2a0000 !important;
  font-weight: 800;
  font-size: 2.2em;
  line-height: 1.6;
  margin-top: 20px;
  text-shadow:
    0 0 10px rgba(244, 196, 48, 0.2),
    0 0 40px rgba(244, 196, 48, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.6);
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}

h1.entry-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, rgba(244, 196, 48, 0.6), transparent);
  border-radius: 1px;
}


.entry-content h2,
.post-content h2,
article h2 {
  color: #050505;
  font-weight: 700;
  font-size: 1.9em;
  line-height: 1.3;
  margin-top: 40px;
  margin-bottom: 16px;
  text-shadow: 0 0 12px rgba(244, 196, 48, 0.15);
  position: relative;
  z-index: 1;
}

/* H3 — чёрная плашка с золотой обводкой */
.entry-content h3,
.post-content h3,
article h3 {
  display: inline-block;
  background: #141414;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 1.1em;
  line-height: 1.4;
  padding: 6px 16px;
  border: 1px solid #F4C430;
  border-radius: 4px;
  margin-top: 30px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
/* Курсивом с цветом */
.entry-content em,
.entry-content i,
.post-content em,
.post-content i,
article em,
article i {
  font-style: italic;
  color: #F4C430;
}

/* ============================================
   ФОРМА-КОНТЕЙНЕР (чек-лист + форма отправки)
   ============================================ */

.xmetr-form {
  background: #141414;
  border: 1px solid #1F1F1F;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
}

/* Заголовок формы */
.xmetr-section-title {
  font-size: 22px;
  color: #FFFFFF;
  margin-bottom: 24px;
  line-height: 1.3;
}

/* Список пунктов чек-листа */
.xmetr-form-list {
  text-align: left;
  list-style: none;
  margin-bottom: 24px;
  padding: 0;
}

.xmetr-form-list li {
  font-size: 14px;
  color: #B0B0B0;
  padding: 6px 0 6px 22px;
  position: relative;
  line-height: 1.5;
}

.xmetr-form-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: #C9A96E;
}

/* Строка с input и кнопкой */
.xmetr-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-bottom: 14px;
}

/* Поле email */
.xmetr-form-input {
  flex: 0 0 260px;
  max-width: 100%;
  height: 45px;
  padding: 0 16px;
  background: #0D0D0D;
  border: 1px solid #2A2A2A;
  border-radius: 4px;
  color: #FFFFFF;
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
  line-height: 45px;
  transition: border-color 0.3s;
}

.xmetr-form-input::placeholder {
  color: #606060;
}

.xmetr-form-input:focus {
  border-color: #F4C430;
}

/* Кнопка */
.xmetr-btn {
  height: 45px;
  padding: 0 28px;
  background: #F4C430;
  color: #050505;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.5px;
  box-sizing: border-box;
  line-height: 45px;
  transition: all 0.3s;
}

.xmetr-btn:hover {
  background: #2a0000;
  color: #FFFFFF;
  border: 1px solid #FFFFFF;
}

/* Галочка согласия */
.xmetr-form-note {
  font-size: 13px;
  color: #707070;
  margin-top: 14px;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
}

.xmetr-form-note input[type="checkbox"] {
  margin-top: 2px;
  cursor: pointer;
  accent-color: #F4C430;
}

.xmetr-form-note a {
  color: #F4C430;
  text-decoration: underline;
}

.xmetr-form-note a:hover {
  color: #2a0000;
}

/* Сообщение об ошибке/успехе */
.xmetr-form-message {
  margin-top: 14px;
  font-size: 14px;
  display: none;
}

.xmetr-form-message.error {
  color: #ff4444;
  display: block;
}

.xmetr-form-message.success {
  color: #4CAF50;
  display: block;
}

/* ============================================
   АДАПТИВ
   ============================================ */

@media (max-width: 768px) {
  .xmetr-section-title {
    font-size: 19px;
  }
  
  .xmetr-form-row {
    flex-direction: column;
  }
  
  .xmetr-form-input,
  .xmetr-btn {
    width: 100%;
    flex: 1 1 100%;
  }
}

@media (max-width: 480px) {
  .xmetr-form {
    padding: 20px 15px;
  }
  
  .xmetr-section-title {
    font-size: 17px;
  }
  
  .xmetr-form-list li {
    font-size: 13px;
  }
}

/* ============================================
   ДЛЯ СТАТЕЙ-РАМКА ДЛЯ НАЗВАНИЙ
   ============================================ */
.guide-title-box {
  border: 1px solid rgba(244, 196, 48, 0.5);
  padding: 12px 20px;
  border-radius: 6px;
  background: rgba(244, 196, 48, 0.05);
}


/* ==========================================================================
   КОНТАКТНЫЕ ИКОНКИ (УНИВЕРСАЛЬНЫЕ: ХЕДЕР, ГЛАВНАЯ, ВНУТРЕННИЕ)
   ========================================================================== */

/* 1. Контейнер для хедера (прижат вправо) */
.xm-contact-icons-center {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    z-index: 100;
    margin: 0;
    padding: 0 10px;
    box-sizing: border-box;
}

/* 2. Контейнер для внутренних страниц (прижат влево) */
.xm-contact-links.xm-contact-icons-body {
    display: flex !important;
    flex-direction: row !important;
    gap: 15px !important;
    justify-content: flex-start !important;
    align-items: center !important;
    margin-top: 15px;
}

/* 3. Центрирование для главной страницы */
.entry-content .xm-contact-icons-center, 
.xm-hero-section .xm-contact-icons-center {
    justify-content: center !important;
    padding: 0 !important;
    margin-top: 15px;
}

/* 4. Обертка каждой иконки (ВАЖНО: column, чтобы попап был ПОД кнопкой) */
.xm-contact-item {
    position: relative;
    display: flex;
    flex-direction: column; 
    align-items: center;
}

/* 5. Сама кнопка-кружок */
.xm-contact-btn {
    width: 45px;
    height: 45px;
    border: 1px solid rgba(212, 175, 55, 0.6) !important;
    background: rgba(10, 10, 10, 0.95) !important;
    border-radius: 50% !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease;
    padding: 0;
    backdrop-filter: blur(4px);
    flex-shrink: 0;
    font-size: 20px !important;
    line-height: 1 !important;
    color: #d4af37 !important;
}

/* 6. Ссылка "Домой" */
.xm-home-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border: 1px solid rgba(212, 175, 55, 0.6);
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.95);
    font-size: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* 7. Иконка Telegram (SVG фоном) */
.xm-contact-btn[data-contact="telegram"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d4af37'%3E%3Cpath d='M9.78 18.65l.28-4.23 7.68-6.92c.34-.31-.07-.46-.52-.19L7.74 13.3 3.64 12c-.88-.25-.89-.86.2-1.3l15.97-6.16c.73-.33 1.43.18 1.15 1.3l-2.72 12.81c-.19.91-.74 1.13-1.5.71L12.6 16.3l-1.99 1.93c-.23.23-.42.42-.83.42z'/%3E%3C/svg%3E") !important;
    background-size: 55% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    color: transparent !important;
}

/* 8. Эффекты при наведении */
.xm-contact-btn:hover,
.xm-home-link:hover {
    background: rgba(212, 175, 55, 0.15) !important;
    border-color: #F4C430 !important;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5) !important;
    transform: scale(1.1);
}

.xm-contact-btn[data-contact="telegram"]:hover,
.xm-contact-btn[data-contact="telegram"].active {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23F4C430'%3E%3Cpath d='M9.78 18.65l.28-4.23 7.68-6.92c.34-.31-.07-.46-.52-.19L7.74 13.3 3.64 12c-.88-.25-.89-.86.2-1.3l15.97-6.16c.73-.33 1.43.18 1.15 1.3l-2.72 12.81c-.19.91-.74 1.13-1.5.71L12.6 16.3l-1.99 1.93c-.23.23-.42.42-.83.42z'/%3E%3C/svg%3E") !important;
}

/* 9. Активное состояние (попап открыт) */
.xm-contact-btn.active {
    background: rgba(212, 175, 55, 0.25) !important;
    border-color: #F4C430 !important;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.7) !important;
}

/* 10. Сам попап (скрыт по умолчанию) */
.xm-contact-popup {
    position: absolute;
    top: 55px;
    right: 0;
    left: auto;
    transform: translateY(-10px);
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.6);
    border-radius: 8px;
    padding: 14px 20px;
    opacity: 0 !important;              
    visibility: hidden !important;    
    pointer-events: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.7);
    z-index: 200;
    min-width: 160px;
    text-align: center;
}

/* 11. Попап при открытии (добавляется через JS) - ЖЕЛЕЗОБЕТОННЫЙ ВАРИАНТ */
.xm-contact-popup.show {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
    display: block !important; /* На случай, если тема пытается сделать display: none */
}

/* 12. Ссылка внутри попапа */
.xm-contact-link {
    color: #d4af37;
    text-decoration: none;
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    padding: 0 !important;
    border-bottom: none !important;
}

.xm-contact-link:hover {
    color: #ffffff;
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.7);
}

/* 13. Адаптив для мобильных */
@media (max-width: 768px) {
    .xm-contact-icons-center,
    .xm-contact-links.xm-contact-icons-body {
        gap: 12px;
        padding: 0 5px;
    }
    
    .xm-contact-btn,
    .xm-home-link {
        width: 40px;
        height: 40px;
        font-size: 18px !important;
    }
    
    .xm-contact-popup {
        padding: 12px 16px;
        min-width: 140px;
    }
}
/* Горизонтальное расположение кнопок в блоке контактов */
.xm-contact-links.xm-contact-icons-body {
    display: flex !important;
    flex-direction: row !important;
    gap: 15px !important;
    justify-content: flex-start !important;
    align-items: center !important;
    margin-top: 15px;
}


/* Блок в черном */
.xm-contact-info {
    background: #12100E !important; /* Или #0a0a0a для более черного */
    padding: 2.5rem 2rem;
    border: 1px solid rgba(244, 196, 48, 0.2);
    max-width: 600px;
}

/* ==========================================================================
   ПОЗИЦИОНИРОВАНИЕ ПОПАПА ДЛЯ ВНУТРЕННИХ СТРАНИЦ
   ========================================================================== */

/* Для блока контактов на внутренних страницах */
.xm-contact-links.xm-contact-icons-body .xm-contact-item {
    position: relative !important;
}

.xm-contact-links.xm-contact-icons-body .xm-contact-popup {
    position: absolute !important;
    top: 55px !important;
    left: 50% !important;  /* Центрируем по горизонтали */
    right: auto !important;
    transform: translateX(-50%) translateY(-10px) !important;
    z-index: 9999 !important;
}

.xm-contact-links.xm-contact-icons-body .xm-contact-popup.show {
    transform: translateX(-50%) translateY(0) !important;
}

/* Убедимся, что родители не обрезают попап */
.xm-contact-info,
.xm-contact-block,
.xm-contact-links {
    overflow: visible !important;
}