/* =========================================
   AI PAMAGATOR: FRONTEND STYLES (FINAL-V3)
   ========================================= */

/* --- 1. ГЛОБАЛЬНІ БЛОКИ (КАРТКИ) --- */
.aip-table-wrapper, .aip-price-table-wrapper, .aip-related-prices-wrapper,
.aip-accent-block, .aip-related-posts-block, .aip-author-box {
    background: #fff; border: 1px solid #f0f0f0; border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06); margin: 30px 0; overflow: hidden; padding: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* ВАЖЛИВО ДЛЯ МОБІЛЬНИХ: Горизонтальний скрол */
    overflow-x: auto; 
}
.aip-table-wrapper:hover, .aip-price-table-wrapper:hover, .aip-related-prices-wrapper:hover,
.aip-accent-block:hover, .aip-related-posts-block:hover, .aip-author-box:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.12); transform: translateY(-4px); border-color: #e0e0e0;
}

/* --- 2. ТАБЛИЦІ --- */
table.aip-table, table.aip-price-table, table.aip-related-prices-table {
    width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: none; margin: 0;
    
}
/* Виняток для таблиці в сайдбарі - їй скрол не потрібен */
table.aip-related-prices-table { min-width: 0; }

/* --- 3. КОМІРКИ (ОНОВЛЕНО v2) --- */
/* Основні таблиці - просторі */
.aip-table th, .aip-table td, 
.aip-price-table th, .aip-price-table td {
    padding: 15px 20px !important; text-align: left; border-bottom: 1px solid #f0f0f0; color: #333; vertical-align: middle;
}
/* Таблиця в сайдбарі (Related) - дуже компактна */
.aip-related-prices-table th, .aip-related-prices-table td {
    padding: 4px 0 !important; /* Мінімальні відступи всередині рядка */
    border: none !important; /* Прибираємо внутрішні лінії */
    vertical-align: middle;
}

/* --- 4. ШАПКА (INTELLIGENT HEADER) --- */
/* 1. Стандартний thead */
.aip-table thead th, .aip-price-table thead th {
    background-color: #4CAF50 !important; color: #fff !important; font-weight: 700; text-transform: uppercase; border-bottom: none; border-radius: 0;
}

/* 2. Перший рядок ТІЛЬКИ якщо немає thead І це не вертикальна таблиця */
.aip-simple-table:not(.shop_attributes):not(.woocommerce-product-attributes) > tbody > tr:first-child > td {
    background-color: #4CAF50 !important; color: #fff !important; font-weight: 700; text-transform: uppercase;
}

/* 3. ВЕРТИКАЛЬНІ ТАБЛИЦІ (Характеристики) */
/* Робимо першу колонку жирною, але без зеленого фону */
table.shop_attributes th, table.woocommerce-product-attributes th,
table.shop_attributes td:first-child, table.woocommerce-product-attributes td:first-child {
    background-color: #0a1128 !important; color: #333 !important; font-weight: 700 !important; width: 30%;
}

/* --- 5. ЕФЕКТИ (ЗЕБРА + ХОВЕР - ОНОВЛЕНО) --- */
/* Зебра */
.aip-table tbody tr:nth-child(even), 
.aip-price-table tbody tr:nth-child(even),
.aip-related-prices-table tbody tr:nth-child(even) {
    background-color: #fbfbfb;
}

/* ХОВЕР ЕФЕКТ (ПОВЕРНУЛИ ДЛЯ ВСІХ ТАБЛИЦЬ) */
.aip-table tbody tr:hover td, 
.aip-price-table tbody tr:hover td,
.aip-related-prices-table tbody tr:hover td { /* Додано сюди */
    background-color: #e8f5e9 !important; /* Світло-зелений при наведенні */
    transition: background-color 0.2s ease;
    cursor: default;
}

/* --- 6. ТАБИ FLATSOME & WOOCOMMERCE (FINAL FIX) --- */

/* --- 7. ЦІНИ ТА КНОПКИ --- */
.aip-price-table td:last-child, .aip-related-prices-table td:last-child {
    text-align: right; font-weight: 700; white-space: nowrap;
}
.aip-price-table del { color: #bbb; font-size: 0.9em; margin-right: 8px; font-weight: normal; }
.aip-price-table ins { text-decoration: none; color: #e53935; font-size: 1.1em; }

.aip-price-btn {
    display: inline-flex; align-items: center; justify-content: flex-end;
    text-decoration: none !important; color: #333; font-weight: 700; transition: color 0.2s ease;
}
.aip-price-btn .dashicons { font-size: 18px; margin-left: 5px; color: #ccc; transition: transform 0.2s ease, color 0.2s ease; margin-top: 3px; }
.aip-price-btn:hover { color: #e53935; }
.aip-price-btn:hover .dashicons { color: #e53935; transform: translateX(4px); }


/* --- 8. БЕЙДЖІ (CANDY) --- */
table .aip-badge {
    display: inline-block; font-size: 10px; font-weight: 800; padding: 4px 10px;
    border-radius: 20px; margin-left: 8px; color: #fff !important;
    text-transform: uppercase; line-height: 1.2; vertical-align: middle;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2); border: none; text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.3);
    background-image: linear-gradient(to bottom, rgba(255,255,255,0.15), rgba(0,0,0,0.05));
    transition: transform 0.2s ease, box-shadow 0.2s ease; white-space: nowrap;
}
table .aip-badge:hover { transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.3); }

table .aip-badge.badge-price   { background-color: #43a047 !important; background: linear-gradient(135deg, #66bb6a, #43a047) !important; }
table .aip-badge.badge-popular { background-color: #ffa000 !important; background: linear-gradient(135deg, #ffca28, #ffa000) !important; color: #fff !important; }
table .aip-badge.badge-new     { background-color: #1976d2 !important; background: linear-gradient(135deg, #42a5f5, #1976d2) !important; }
table .aip-badge.badge-premium { background-color: #7b1fa2 !important; background: linear-gradient(135deg, #ab47bc, #7b1fa2) !important; }
table .aip-badge.badge-sale    { background-color: #d32f2f !important; background: linear-gradient(135deg, #ef5350, #d32f2f) !important; }
table .aip-badge.badge-rating  { background-color: #00796b !important; background: linear-gradient(135deg, #26a69a, #00796b) !important; }


/* --- 9. АКЦЕНТНІ БЛОКИ --- */
.aip-accent-block { border-left: 6px solid; border-top: 1px solid transparent; border-right: 1px solid transparent; border-bottom: 1px solid transparent; padding: 10px; }
.aip-accent-block:hover { border-top-color: #e0e0e0; border-right-color: #e0e0e0; border-bottom-color: #e0e0e0; }

.aip-tip-block { border-left-color: #0073aa; background: #f4faff; }
.aip-tip-block strong { color: #0073aa; }
.aip-tip-block:hover { border-left-color: #005a87; }

.aip-warning-block { border-left-color: #ffb900; background: #fffbf0; }
.aip-warning-block strong { color: #d59600; }
.aip-warning-block:hover { border-left-color: #e5a600; }

.aip-fact-block { border-left-color: #826eb4; background: #fbfaff; }
.aip-fact-block strong { color: #826eb4; }
.aip-fact-block:hover { border-left-color: #6b549e; }


/* --- 10. ПІДСУМОК ТА ІНШЕ --- */

/* --- 11. СПОРІДНЕНІ КАТЕГОРІЇ --- */
.aip-related-terms-wrapper { margin: 0 20px; padding-top: 20px; border-top: 1px solid #eee; overflow: hidden; }
.aip-related-terms-list { 
    display: flex; flex-wrap: nowrap; gap: 10px; overflow-x: auto; 
    padding: 5px 5px 15px 5px; margin: -5px -5px 0 -5px; 
    -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: #ccc transparent; 
}
.aip-related-terms-list::-webkit-scrollbar { height: 4px; }
.aip-related-terms-list::-webkit-scrollbar-track { background: transparent; }
.aip-related-terms-list::-webkit-scrollbar-thumb { background-color: #ddd; border-radius: 4px; }

.aip-related-term-button {
    flex: 0 0 auto; display: inline-block; padding: 8px 16px; font-size: 13px; font-weight: 500; 
    text-decoration: none !important; color: #555; background-color: #f5f5f5; 
    border-radius: 20px; transition: all 0.2s ease; border: 1px solid transparent; white-space: nowrap;
}
.aip-related-term-button:hover { background-color: #2196F3; color: #fff; border-color: #2196F3; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(33, 150, 243, 0.3); }


/* --- 12. ДОДАТКОВІ БЛОКИ --- */
.aip-related-posts-block { padding: 25px; border-left: 6px solid #3498db; background: #f8f9fa; border-top: 1px solid transparent; border-right: 1px solid transparent; border-bottom: 1px solid transparent; }
.aip-related-posts-block:hover { border-top-color: #e0e0e0; border-right-color: #e0e0e0; border-bottom-color: #e0e0e0; border-left-color: #217dbb; }
.aip-related-posts-block .aip-related-title { border-bottom: 2px solid #eee; padding-bottom: 15px; margin-bottom: 20px; font-size: 1.3em; margin-top: 0; color: #2c3e50; }
.aip-related-posts-block .aip-related-list { list-style: none; padding: 0; margin: 0; }
.aip-related-posts-block .aip-related-list li { margin-bottom: 15px; padding-left: 30px; position: relative; }
.aip-related-posts-block .aip-related-list li::before { content: "\1F4C4"; position: absolute; left: 0; top: 2px; font-size: 1.2em; filter: grayscale(100%); transition: filter 0.3s ease, transform 0.3s ease; }
.aip-related-posts-block .aip-related-list li:hover::before { filter: grayscale(0%); transform: scale(1.2); }

/* --- БЛОК "ПРО АВТОРА" (FIXED AVATAR) --- */
.aip-author-box { 
    gap: 25px; 
    align-items: flex-start; /* Вирівнюємо по верху, а не по центру */
    border-left: 6px solid #2196F3; 
    background: #0a1128; 
    border-top: 1px solid transparent; 
    border-right: 1px solid transparent; 
    border-bottom: 1px solid transparent; 
    padding-left: 20px;
    padding-right: 20px;
}
.aip-author-box:hover {
    border-top-color: #e0e0e0;
    border-right-color: #e0e0e0;
    border-bottom-color: #e0e0e0;
    border-left-color: #1976D2;
}
.aip-author-box .aip-author-avatar { 
    border-radius: 50% !important; 
    width: 90px !important; 
    height: 90px !important; 
    min-width: 90px !important; /* Забороняємо стискання */
    object-fit: cover !important; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
    border: 3px solid #fff;
    flex: 0 0 90px !important; /* Забороняємо flex-стискання */
    margin: 0 !important; /* Прибираємо можливі відступи lazy load */
}
.aip-author-box .aip-author-name { margin-top: 0; margin-bottom: 8px; color: #333; }
@media (max-width: 600px) { .aip-author-box { flex-direction: column; align-items: center; text-align: center; } }


/* --- 13. ТАБИ FLATSOME & WOOCOMMERCE (FINAL FIX) --- */

/* 1. Кнопки табів (Universal Fix) */

/* Стилізуємо посилання всередині будь-яких табів WooCommerce */
.woocommerce-tabs ul.tabs li a,
.tabbed-content .nav-pills li a {
    border-radius: 25px !important;
    padding: 10px 25px !important;
    font-weight: 700 !important;
    margin-right: 10px !important;
    transition: all 0.3s ease !important;
    background-color: #f5f5f5 !important; 
    border: 1px solid transparent !important;
    color: #555 !important;
    text-transform: uppercase !important;
    font-size: 13px !important;
}

/* Активна кнопка (Коли LI має клас active) */
.woocommerce-tabs ul.tabs li.active a,
.tabbed-content .nav-pills li.active a {
    background-color: #4CAF50 !important;
    color: #fff !important;
    border-color: #4CAF50 !important;
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.3) !important;
}

/* Прибираємо стандартні стилі контейнера кнопок */
.woocommerce-tabs ul.tabs {
    border-bottom: none !important;
    margin-bottom: 0px !important;
    padding: 2px !important;
    overflow: visible !important; /* Щоб тінь не обрізалася */
}

/* Прибираємо стандартні рамки та фони у li */
.woocommerce-tabs ul.tabs li {
    border: none !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Прибираємо псевдоелементи (трикутники тощо) */
.woocommerce-tabs ul.tabs li:before,
.woocommerce-tabs ul.tabs li:after,
.woocommerce-tabs ul.tabs li a:before,
.woocommerce-tabs ul.tabs li a:after {
    display: none !important;
}

/* 2. КОНТЕЙНЕР ТАБІВ (Скидаємо ВСЕ) */
.woocommerce-tabs,
.tabbed-content,
.woocommerce-tabs .tab-panels, /* Додатковий рівень в Flatsome */
.tabbed-content .tab-panels {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 30px 0 !important;
}

/* 3. ПАНЕЛЬ КОНТЕНТУ (Тут живе "Картка") */
.woocommerce-tabs .panel,
.tabbed-content .tab-panels .panel {
    background: #fff !important;
    border: 1px solid #f0f0f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06) !important;
    padding: 30px !important;
    margin-top: 0px !important; /* Відступ від кнопок */
    animation: fadeIn 0.4s ease-in-out;
}
.tabbed-content .tab-panels .panel:not(.active) { display: none !important; }

/* 4. ТАБЛИЦЯ ВСЕРЕДИНІ (Краса) */
.woocommerce-tabs .panel table,
.tabbed-content .panel table {
    width: 100%; border-collapse: separate; border-spacing: 0;
    border: 1px solid #eee; border-radius: 12px; overflow: hidden;
    margin-top: 20px; background: #fff;
}
.woocommerce-tabs .panel table th, .woocommerce-tabs .panel table td {
    padding: 12px 15px !important; border-bottom: 1px solid #f0f0f0;
}

/* Шапка таблиці (Тільки ПЕРШИЙ рядок таблиці, якщо немає thead) */
.woocommerce-tabs .panel table tr:first-child td,
.woocommerce-tabs .panel table tr:first-child th {
    background-color: #4CAF50 !important;
    color: #fff !important;
    font-weight: 700;
    text-transform: uppercase;
}

/* ФІКС ПОДВІЙНОЇ ШАПКИ: Якщо є thead, то стилізуємо його, а перший рядок тіла - ні */
.woocommerce-tabs .panel table thead th {
    background-color: #4CAF50 !important;
    color: #fff !important;
}
.woocommerce-tabs .panel table thead + tbody tr:first-child td {
    background-color: #fff !important; /* Скидаємо зелений */
    color: #333 !important;
    font-weight: normal;
}

/* AIP Table Wrapper Fix */
.woocommerce-tabs .panel .aip-table-wrapper {
    box-shadow: none !important; border: none !important; background: transparent !important; padding: 0 !important; margin: 0 !important;
}


/* ==========================================================================
   ЧАСТИНА 14: ГЛОБАЛЬНИЙ "CANDY" СТИЛЬ (REFACTORED FIX)
   Розділення логіки: Контейнер тримає простір, Картка (Box) робить красу.
   ========================================================================== */

/* 1. КОНТЕЙНЕР (ОБОЛОНКА) */
/* Він має бути прозорим і дозволяти вихід за межі */
.product-small .col-inner, 
.post-item .col-inner {
    background-color: transparent !important; 
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 5px;
    height: 100%;
    overflow: visible !important; /* !ВАЖЛИВО: Дозволяє тіні і руху виходити за межі */
    position: relative;
    z-index: 1; /* Базовий рівень */
    transition: z-index 0s linear 0s; /* Миттєва зміна шару */
}

/* 2. КАРТКА (ВІЗУАЛ) */
/* Вся краса переноситься сюди. box - це те, що ми бачимо */
.product-small .box, 
.post-item .box,
.box-blog-post .box {
    background-color: #fff; 
    border-radius: 16px; 
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04); 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
    overflow: hidden; /* !ВАЖЛИВО: Обрізає кути картинки всередині картки */
    height: 100%;
    position: relative;
}

/* 3. ЕФЕКТ ПРИ НАВЕДЕННІ (HOVER) */
@media (min-width: 1024px) {
    /* Піднімаємо пріоритет контейнера, щоб він перекрив сусідів */
    .product-small:hover .col-inner, 
    .post-item:hover .col-inner {
        z-index: 100 !important; 
    }

    /* Рухаємо саму картку всередині */
    .product-small:hover .box, 
    .post-item:hover .box,
    .box-blog-post:hover .box {
        transform: translateY(-5px); 
        box-shadow: 0 15px 30px rgba(0,0,0,0.12); 
        border-color: #e0e0e0; 
    }
}

/* Виправлення внутрішніх відступів тексту */
.product-small .box-text, .post-item .box-text { padding: 15px 15px 20px 15px !important; }

/* 
   ⚠️ ГЛОБАЛЬНИЙ ФІКС ДЛЯ СЛАЙДЕРІВ (Щоб "голови" не різало в каруселях)
   Дозволяє елементам вилазити за межі рядка слайдера.
*/
.flickity-viewport,
.row-slider {
    overflow: visible !important;
}


/* --- КАРТКИ У ВІДЖЕТАХ (САЙДБАР/ФУТЕР) --- */
/* Тут лишаємо стару логіку, бо вони не в сітці */
.widget_recently_viewed_products li, 
.product_list_widget li, 
.widget_flatsome_recent_posts li {
    background-color: #fff; border-radius: 12px; border: 1px solid #f0f0f0; padding: 10px;
    margin-bottom: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.03); transition: all 0.3s ease; display: flex; align-items: center;
}
.widget_recently_viewed_products li:hover, .product_list_widget li:hover, .widget_flatsome_recent_posts li:hover {
    transform: translateX(5px); box-shadow: 0 4px 10px rgba(0,0,0,0.08); border-color: #e0e0e0;
}
.widget_recently_viewed_products li img, .product_list_widget li img {
    border-radius: 8px; width: 60px; height: 60px; object-fit: cover; margin-right: 10px; border: 1px solid #eee;
}
.widget_flatsome_recent_posts .badge-inner img, .widget_flatsome_recent_posts img { border-radius: 8px; }

/* --- КНОПКИ ТА ПОЛЯ --- */
#wrapper .button, 
#wrapper button.submit, 
#wrapper input[type="submit"] { 
    border-radius: 25px !important; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    transition: all 0.3s ease; 
    font-weight: 700; 
}
#wrapper .button:hover, 
#wrapper button.submit:hover, 
#wrapper input[type="submit"]:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 6px 15px rgba(0,0,0,0.15); 
}
#wrapper input[type='text'], 
#wrapper input[type='email'], 
#wrapper textarea, 
#wrapper select { 
    border-radius: 8px !important; 
    border: 1px solid #e0e0e0; 
    padding: 10px; 
}
#wrapper input:focus, #wrapper textarea:focus { 
    border-color: #4CAF50 !important; 
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1) !important; 
}

/* --- БЕЙДЖІ ТЕМИ --- */
.badge-container .badge, 
.badge-container .badge-circle { 
    border-radius: 8px !important; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.2); 
    font-weight: 800; 
    letter-spacing: 0.5px; 
    padding: 4px 10px !important; 
    height: auto !important; 
    min-height: 24px; 
    line-height: 1.2 !important; 
    width: auto !important; 
}
.badge-inner { display: inline-block; vertical-align: middle; }

/* Фінальний штрих */
table tr:last-child td { border-bottom: none; }

/* =========================================
   FINAL TOUCHES: GLOBAL CANDY EXTENSION
   ========================================= */

/* --- 1. КАРТИНКИ В СТАТТЯХ (LAZY LOAD FRIENDLY) --- */
/* Стилізуємо будь-який figure або img всередині контенту */
.entry-content figure,
.wp-caption,
.entry-content img:not(.emoji) {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    padding: 10px;
    margin: 30px auto !important;
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: table; /* Центрування для figure */
}

/* Якщо img всередині figure, прибираємо подвійну рамку з img */
.entry-content figure img,
.wp-caption img {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 12px;
}

/* Ефект при наведенні */
.entry-content figure:hover,
.wp-caption:hover,
.entry-content img:not(.emoji):hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

/* Підпис */
figcaption, .wp-caption-text {
    font-family: inherit;
    font-size: 0.95em;
    color: #555;
    margin-top: 12px;
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid #f5f5f5;
    display: block; /* Гарантуємо показ */
}
figcaption::before, .wp-caption-text::before { content: '📷'; margin-right: 5px; opacity: 0.7; }


/* --- 2. БЛОК КОМЕНТАРІВ (comment-respond) --- */
#respond {
    background: #0a1128; /* Легкий фон */
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    margin-top: 40px;
    transition: all 0.3s ease;
}

#respond:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
    border-color: #e0e0e0;
    /* transform: translateY(-2px); - Для форми коментарів краще не рухати, щоб не збивати фокус */
}

#reply-title {
    font-size: 1.4em;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    display: block;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* Поля форми коментарів */
#respond textarea, 
#respond input[type="text"], 
#respond input[type="email"] {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}
#respond textarea:focus, 
#respond input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}



/* ==========================================================================
   ЧАСТИНА 15 (FIXED V5): ФІНАЛЬНИЙ ПОЛІШИНГ
   ========================================================================== */

/* --- 1. ГЛОБАЛЬНІ КОНТЕЙНЕРИ --- */
.aip-price-table-wrapper, 
.aip-related-prices-wrapper {
    display: block; 
    border-radius: 16px; 
    overflow: hidden !important; 
    border: 1px solid #f0f0f0;
}

/* --- 2. ШАПКА (CAPTION - FIXED FORCE) --- */
/* Застосовуємо стилі конкретно до елемента caption всередині наших обгорток */
.aip-price-table-wrapper caption,
.aip-related-prices-wrapper caption,
.aip-price-table-caption,
.aip-related-prices-caption {
    background-color: #4CAF50 !important; /* Яскраво-зелений фон */
    color: #ffffff !important; /* Білий текст */
    
    padding: 15px 20px !important; 
    margin: 0 !important;
    border: none !important;
    
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
    caption-side: top;
}

/* СПЕЦІАЛЬНИЙ ФІКС ДЛЯ САЙДБАРУ */
/* Робимо так, щоб буква "П" не різалася і виглядало як на мобільному */
.aip-related-prices-wrapper caption,
.aip-related-prices-caption {
    text-align: left !important; /* Вирівнювання вліво */
    padding-left: 25px !important; /* Великий відступ зліва для безпеки літери "П" */
    font-size: 13px !important; /* Акуратний розмір шрифту */
    line-height: 1.4 !important;
}

/* Вирівнювання для основної таблиці - по центру */
.aip-price-table-caption {
    text-align: center !important;
}

/* --- 3. ОСНОВНА ТАБЛИЦЯ ЦІН (ПК - Таблиця, Моб - Картки) --- */
@media (min-width: 769px) {
    table.aip-price-table { display: table; width: 100%; }
    .aip-price-table thead { display: table-header-group; }
    /* Стиль шапки thead підлаштований під caption */
    .aip-price-table thead th { background: #0a1128 !important; color: #555 !important; border-bottom: 2px solid #eee; }
    
    .aip-price-table tr { display: table-row; }
    .aip-price-table td { display: table-cell; }
    .aip-price-desktop { display: inline; } .aip-price-mobile { display: none; }
    .aip-price-table .aip-summary-block {
    order: 10; margin: 0 !important; border-radius: 0 0 16px 16px !important; 
    border-top: 1px solid #eee; background: #f4fcf4; border-left: none;
    padding: 15px; font-size: 0.9em;
}
    .aip-price-table:not(:has(.aip-summary-block)) tr:last-child {
    border-radius: 0 0 16px 16px; border-bottom: none !important;
}
}

@media (max-width: 768px) {
    /* FIX ДЛЯ ЗЕЛЕНОГО БЛОКУ */
    .aip-price-table-wrapper { 
        display: flex; 
        flex-direction: column; 
        align-items: stretch; /* 👈 Розтягує елементи на всю ширину */
    }
    
    .aip-price-table-caption { 
        order: -1; 
        display: block !important;
        width: 100% !important; /* 👈 ПРИМУСОВА ШИРИНА */
        min-width: 100%;
        box-sizing: border-box; /* Враховуємо відступи */
        border-radius: 16px 16px 0 0; 
        text-align: center; /* На мобільному гарніше по центру */
    }
    
    table.aip-price-table, .aip-price-table tbody, .aip-price-table tr, .aip-price-table td { 
        display: block; width: 100%; border: none !important; 
    }
    .aip-price-table thead { display: none; }
    
    .aip-price-table tr {
        padding: 15px; padding-bottom: 45px; background: #fff; border-bottom: 1px solid #eee !important; position: relative;
    }
    .aip-price-table tr:last-child { border-radius: 0 0 16px 16px; }
    
    .aip-price-table td:first-child { padding: 0 !important; margin-bottom: 5px; }
    .aip-price-table td:first-child a { font-size: 15px; font-weight: 600; }
    
    .aip-price-table td:last-child {
        position: absolute; bottom: 15px; right: 15px; text-align: right; width: auto !important;
    }
    .aip-price-table .aip-badge { position: absolute; bottom: 15px; left: 15px; margin: 0 !important; }
    
    .aip-price-desktop { display: none; } .aip-price-mobile { display: inline; font-weight: 700; font-size: 15px; }
}
/* ПІДСУМОК */
.aip-price-table-wrapper .aip-summary-block {
    order: 10; margin: 0 !important; border-radius: 0 0 16px 16px !important; 
    border-top: 1px solid #eee; background: #f4fcf4; border-left: none;
    padding: 15px; font-size: 0.9em;
}
.aip-price-table-wrapper:not(:has(.aip-summary-block)) tr:last-child {
    border-radius: 0 0 16px 16px; border-bottom: none !important;
}

/* --- 4. ТАБЛИЦЯ "ПОРІВНЯЙТЕ" (САЙДБАР - SMART LIST) --- */
.aip-related-prices-wrapper {
    display: flex; flex-direction: column; height: auto !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}
.aip-related-prices-table thead { display: none; }
.aip-related-prices-table tbody { display: block; width: 100%; }

/* РЯДОК */
.aip-related-prices-table tr {
    display: flex; 
    flex-direction: column; 
    padding: 12px 15px; 
    border-bottom: 1px solid #f0f0f0 !important;
    background: #fff;
    transition: all 0.2s ease;
}

/* ХОВЕР */
.aip-related-prices-table tr:hover {
    background-color: #e8f5e9 !important;
    transform: translateX(3px);
    border-left: 3px solid #4CAF50;
    padding-left: 12px;
}

/* Назва */
.aip-related-prices-table td:first-child {
    display: block; width: 100%;
    font-size: 14px; font-weight: 600; line-height: 1.3; color: #333;
    margin-bottom: 6px;
}
.aip-related-prices-table td:first-child a {
    text-decoration: none; color: #333; transition: color 0.2s;
}
.aip-related-prices-table tr:hover td:first-child a { color: #2e7d32; }

/* Ціна */
.aip-related-prices-table td:last-child {
    display: block; width: 100%;
    text-align: right; 
    font-size: 13px; color: #777; font-weight: 500;
    background: #fcfcfc; 
    padding: 4px 8px !important;
    border-radius: 6px;
    align-self: flex-end; 
    width: auto !important;
    transition: background-color 0.2s ease;
}

/* Прибираємо фон ціни при наведенні */
.aip-related-prices-table tr:hover td:last-child {
    background-color: transparent !important;
    color: #2e7d32;
}

.aip-related-prices-table td:last-child .dashicons {
    font-size: 14px; vertical-align: middle; width: 14px; height: 14px; opacity: 0.7;
}

/* ПІДСУМОК */
.aip-related-prices-wrapper .aip-summary-block {
    order: 10; margin: 0 !important; border-radius: 0 0 16px 16px !important; 
    border-top: 1px solid #eee; background: #f4fcf4; border-left: none;
    padding: 15px; font-size: 0.9em;
}
.aip-related-prices-wrapper:not(:has(.aip-summary-block)) tr:last-child {
    border-radius: 0 0 16px 16px; border-bottom: none !important;
}


/* --- МОБІЛЬНА АДАПТАЦІЯ ВІДСТУПІВ (FINAL) --- */
@media (max-width: 768px) {
    
    /* Зменшуємо відступи всередині карток-табів */
    .woocommerce-tabs .panel,
    .tabbed-content .tab-panels .panel {
        padding: 10px !important; /* Було 30px */
        border-radius: 12px !important; /* Трохи менше закруглення */
        margin-top: 15px !important;
    }

    /* Якщо це таблиця всередині таба - даємо їй максимум місця */
    .woocommerce-tabs .panel table.aip-table,
    .tabbed-content .panel table.aip-table {
        margin-top: 10px !important;
        border-radius: 8px;
    }
    
    /* Зменшуємо шрифт в комірках */
    .aip-table th, .aip-table td {
        padding: 10px !important;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .woocommerce-tabs ul.tabs li a {
        padding: 8px 15px !important;
        font-size: 11px !important;
        white-space: nowrap;
    }
}

/* ==========================================================================
   💎 sewerin EDITORIAL SYSTEM v2.3 (OPTIMIZED & CLEAN)
   ========================================================================== */

/* 1. Глобальні змінні */
:root {
    --ed-black: #111;
    --ed-gray: #bbb;
    --ed-line: rgba(0,0,0,0.08);
    --ed-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* 2. Ізоляція всього редакційного контенту */
.sewerin-scope {
    /* Обгортка гарантує відсутність конфліктів зі стилями теми */
}

/* 3. Приховування зайвого (лише критичні !important) */
.sewerin-scope .meta-comments,
.sewerin-scope .meta-divider,
.sewerin-scope .badge-post-comments,
.sewerin-scope .from_the_blog_comments,
.sewerin-scope .from_the_blog_date,
.sewerin-scope .blog-archive .read-more-button,
.sewerin-scope .is-divider,
.sewerin-scope .entry-divider,
.sewerin-scope .absolute-footer,
.sewerin-scope .footer-primary,
.sewerin-scope .hero-dynamic-wrapper .post-meta,
.sewerin-scope .dd-dynamic-card .post-meta,
.sewerin-scope .dd-dynamic-card .from_the_blog_excerpt {
    display: none !important; /* Flatsome часто використовує !important для цих елементів */
}

/* 4. Header & Navigation */
.sewerin-scope #masthead,
.sewerin-scope .header-main {
    height: 70px;
    line-height: 70px;
}
.sewerin-scope .header-wrapper {
    padding-top: 0;
}
.sewerin-scope .header-nav > li > a {
    font-size: 13px;
    letter-spacing: 1px;
}

/* 5. Editorial Menu */
.sewerin-scope .menu-editorial {
    font-family: var(--ed-font);
}
.sewerin-scope .editorial-col {
    padding: 0 40px;
}
.sewerin-scope .menu-editorial .col-narrow {
    flex: 0 0 22%;
    max-width: 22%;
}
.sewerin-scope .menu-editorial .col-wide {
    flex: 0 0 34%;
    max-width: 34%;
}

.sewerin-scope .editorial-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    position: relative;
}
.sewerin-scope .editorial-header::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: #000;
    opacity: 0.15;
    transition: opacity 0.3s ease;
}
.sewerin-scope .editorial-header:hover::after {
    opacity: 1;
}

.sewerin-scope .editorial-index {
    font-size: 10px;
    font-weight: 700;
    color: #ccc;
    letter-spacing: 1px;
}
.sewerin-scope .editorial-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--ed-black);
    text-decoration: none;
    line-height: 1;
}

.sewerin-scope .editorial-icon {
    width: 14px;
    height: 14px;
    stroke: var(--ed-black);
    stroke-width: 1.2;
    fill: none;
    opacity: 0.6;
    transition: stroke-width 0.3s ease;
}
.sewerin-scope .editorial-header:hover .editorial-icon {
    stroke-width: 1.6;
    opacity: 1;
}

/* Links & Hover */
.sewerin-scope .editorial-link {
    font-size: 15px;
    line-height: 2.0;
    color: #333;
    display: block;
    position: relative;
    text-decoration: none;
    width: fit-content;
    transition: 0.2s;
}
.sewerin-scope .editorial-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 2px;
    width: 0;
    height: 1px;
    background: #000;
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.sewerin-scope .editorial-link:hover::after {
    width: 100%;
}

@media (hover: hover) {
    .sewerin-scope .menu-editorial:has(a:hover) a:not(:hover) {
        color: #e0e0e0;
    }
    .sewerin-scope .menu-editorial:has(a:hover) .editorial-icon,
    .sewerin-scope .menu-editorial:has(a:hover) .editorial-index {
        opacity: 0.2;
    }
    .sewerin-scope .menu-editorial:has(a:hover) .editorial-header::after {
        opacity: 0.05;
    }
    .sewerin-scope .menu-editorial a:hover {
        color: #000;
        opacity: 1;
    }
}

/* 6. Feature & Deep Dive Cards */
.sewerin-scope .editorial-feature-wrapper .box {
    box-shadow: none;
    background: transparent;
    border: none;
}
.sewerin-scope .editorial-feature-wrapper .box-image {
    margin-bottom: 15px;
    border-radius: 0;
}
/* --- Виправлення відступів для картки "Вибір редакції" --- */

.sewerin-scope .editorial-feature-wrapper .box-text {
    padding-top: 20px !important;    /* Відступ від картинки зверху */
    padding-bottom: 15px !important; /* Відступ знизу */
    padding-left: 0 !important;      /* З боків залишаємо 0, щоб рівнялось по картинці */
    padding-right: 0 !important;
    text-align: left;
}

/* Додатково: відступ самого заголовка, щоб не злипався з іншим текстом */
.sewerin-scope .editorial-feature-wrapper h5.post-title {
    margin-bottom: 10px !important;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
    margin-top: 0;
    text-transform: none;
    color: #000;
    letter-spacing: -0.3px;
}
.sewerin-scope .editorial-feature-wrapper h5.post-title {
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
    margin-top: 0;
    text-transform: none;
    color: #000;
    letter-spacing: -0.3px;
}

.sewerin-scope .dd-dynamic-card .box {
    border-radius: 0;
    overflow: hidden;
    height: 100%;
}
.sewerin-scope .dd-dynamic-card .box-image {
    height: 500px;
    position: relative;
}
.sewerin-scope .dd-dynamic-card .box-image::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    z-index: 1;
}
.sewerin-scope .dd-dynamic-card .box-text {
    z-index: 2;
    padding: 0 0 30px 20px;
}
.sewerin-scope .dd-dynamic-card .post-title {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* =========================================
   7. HERO SYSTEM (MIDNIGHT BOUTIQUE EDIT)
   ========================================= */

.sewerin-scope .hero-immersive {
    position: relative;
    overflow: hidden;
}

.sewerin-scope .hero-dynamic-wrapper .box-text {
    text-align: left;
    padding-left: 10%;
}

.sewerin-scope .hero-dynamic-wrapper .post-title {
    font-family: 'Playfair Display', serif; /* Преміальний шрифт */
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -1px;
    color: #f8e29c; /* Заголовок на фото завжди білий */
    text-shadow: 0 2px 30px rgba(0,0,0,0.8); /* Глибша тінь для читабельності */
    max-width: 85%;
    margin-bottom: 10px;
}

.sewerin-scope .hero-dynamic-wrapper .is-xsmall {
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.95);
    border-left: 3px solid #c9a554; /* Золота лінія (Brushed Gold) */
    padding-left: 15px;
    margin-bottom: 15px;
    display: inline-block;
}

/* --- Hero Nav Dock (ПАНЕЛЬ НАВІГАЦІЇ) --- */
.sewerin-scope .hero-nav-dock {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    /* ТЕМНИЙ ФОН замість білого */
    background: rgba(10, 17, 40, 0.95); 
    border-top: 1px solid rgba(255,255,255,0.1); /* Тонка світла лінія зверху */
    backdrop-filter: blur(10px); /* Ефект матового скла */
}

.sewerin-scope .hero-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    height: auto;
    transition: all 0.3s ease;
    /* Розділювачі ледь помітні */
    border-right: 1px solid rgba(255,255,255,0.05); 
    text-decoration: none;
}

/* Ховер ефект */
.sewerin-scope .hero-nav-item:hover {
    background: rgba(255, 255, 255, 0.05); /* Легке висвітлення фону */
    box-shadow: inset 0 -3px 0 #f8e29c; /* Золота лінія знизу */
}

.sewerin-scope .hero-nav-title {
    margin-top: 8px;
    font-size: 10px;
    font-weight: 800;
    color: #e0e0e0; /* Срібний текст (був чорний) */
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.sewerin-scope .hero-nav-item:hover .hero-nav-title {
    color: #fff; /* Білий при наведенні */
}

.sewerin-scope .hero-nav-icon {
    width: 24px;
    height: 24px;
    stroke: #c9a554; /* Золоті іконки (були чорні) */
    stroke-width: 1.5;
    fill: none;
    opacity: 1;
    transition: all 0.3s ease;
}

.sewerin-scope .hero-nav-item:hover .hero-nav-icon {
    stroke: #f8e29c; /* Яскраве золото при наведенні */
    transform: translateY(-3px); /* Підскакує */
}

/* Спеціальна іконка (залита) */
.sewerin-scope .hero-nav-item.editorial .hero-nav-icon {
    fill: #c9a554;
    stroke: none;
}
.sewerin-scope .hero-nav-item.editorial:hover .hero-nav-icon {
    fill: #f8e29c;
}

/* =========================================
   8. BLOG ARCHIVE (MIDNIGHT BOUTIQUE EDIT)
   ========================================= */

/* Приховує стандартний заголовок та опис рубрики (Flatsome) */
.archive .page-title-wrapper {
    display: none;
}

/* 1. ЗАГОЛОВОК КАТЕГОРІЇ (H1) */
.page-title-inner .page-title-heading h1 {
    font-family: 'Playfair Display', serif !important; /* Преміальний шрифт */
    font-size: 3.5rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: #f8e29c !important; /* Яскраве золото */
    margin-bottom: 10px !important;
    text-align: center;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5); /* Глибока тінь */
}

/* Прибираємо зайві відступи у контейнера */
.page-title-inner {
    padding-bottom: 10px !important;
    background: transparent !important;
}

/* 2. КНОПКИ ПІДКАТЕГОРІЙ (ФІЛЬТР) */
.sewerin-subcat-nav {
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important; /* Тонка лінія */
    padding-bottom: 20px;
}

.category-filter-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Стиль кнопок (Ghost Style) */
.category-filter-row a {
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 25px;
    
    /* Темний стиль */
    background-color: rgba(255,255,255,0.05) !important; /* Ледь помітний фон */
    border: 1px solid rgba(255,255,255,0.2) !important; /* Тонка рамка */
    border-radius: 50px; /* Овальні */
    color: #e0e0e0 !important; /* Срібний текст */
    
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Ховер та Активна кнопка (Золото) */
.category-filter-row a:hover,
.category-filter-row a.active {
    background: linear-gradient(135deg, #c9a554 0%, #d4af37 100%) !important; /* Золотий градієнт */
    color: #050814 !important; /* Темний текст для контрасту */
    border-color: #c9a554 !important;
    box-shadow: 0 0 15px rgba(201, 165, 84, 0.4); /* Світіння */
    transform: translateY(-2px);
}

/* 3. ОПИС ЗНИЗУ (Типографіка) */
.archive-description-bottom {
    background-color: #0a1128 !important; /* Темний фон (дублюємо для надійності) */
    border-top: 1px solid rgba(255,255,255,0.05) !important;
}

.archive-description-bottom .entry-content,
.editorial-text-block {
    font-family: 'Lato', sans-serif !important;
    font-size: 1.1rem !important;
    line-height: 1.8 !important;
    color: #e0e0e0 !important; /* Срібний текст */
    text-align: center; 
}

.archive-description-bottom p {
    margin-bottom: 20px;
    color: #e0e0e0 !important;
}

/* Якщо в описі є заголовки - робимо їх золотими */
.archive-description-bottom h2, 
.archive-description-bottom h3 {
    color: #f8e29c !important;
    font-family: 'Playfair Display', serif !important;
}/* =========================================
   9. SINGLE POST META (MIDNIGHT FIX)
   ========================================= */

.sewerin-meta-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 15px !important;
    margin: 0 auto 25px auto !important;
    padding-bottom: 20px !important;
    /* Тонка напівпрозора лінія замість сірої #eee */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important; 
    width: 100%;
    max-width: 600px;
}

/* Елементи всередині */
.sewerin-meta-container .meta-item {
    display: flex !important;
    align-items: center !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: #a0a0a0 !important; /* Тьмяне срібло */
    line-height: 1 !important;
}

/* Іконки (i class="icon-...") */
.sewerin-meta-container i,
.sewerin-meta-container .meta-icon {
    font-size: 16px !important;
    margin-right: 6px !important;
    color: #c9a554 !important; /* Золото */
    stroke: #c9a554 !important; /* Для SVG */
}

/* Розділювач */
.sewerin-meta-container .meta-sep {
    color: rgba(255, 255, 255, 0.2) !important; /* Майже непомітний */
    font-size: 14px;
}

/* =========================================
   10. FOOTER & MOBILE NAV (MIDNIGHT FIX)
   ========================================= */

/* Сайдбар (Мобільне меню) */
.sewerin-scope .nav-sidebar > li > a {
    font-weight: 800;
    text-transform: uppercase;
    color: #fff !important; /* Білий текст */
    border-bottom: 1px solid rgba(255,255,255,0.05) !important; /* Темний розділювач */
    padding: 15px 20px;
}
.sewerin-scope .nav-sidebar ul.children li a {
    font-size: 14px;
    font-weight: 600;
    color: #a0a0a0 !important; /* Срібний для підпунктів */
    padding-left: 30px;
}

/* Заголовки футера */
.sewerin-scope .footer-title {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    color: #f8e29c !important; /* Золото */
    opacity: 1 !important;
    margin-bottom: 20px;
    display: block;
    letter-spacing: 1px;
}

/* Посилання в футері */
.sewerin-scope ul.footer-links a {
    font-size: 14px;
    color: #b0b0b0 !important; /* Світло-сірий */
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.sewerin-scope ul.footer-links a:hover {
    color: #fff !important; /* Білий при наведенні */
}

/* Ефект підкреслення (Золота лінія) */
.sewerin-scope ul.footer-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: #c9a554 !important; /* Золото */
    transition: 0.3s;
}
.sewerin-scope ul.footer-links a:hover::after {
    width: 100%;
}

/* Форма підписки (Темна тема) */
.sewerin-scope .footer-form input[type="email"] {
    background: #131b33 !important; /* Темно-синій фон поля */
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #fff !important; /* Білий текст, що вводиться */
    border-radius: 4px;
    height: 45px;
}

.sewerin-scope .footer-form input[type="email"]:focus {
    border-color: #c9a554 !important; /* Золота рамка при фокусі */
    box-shadow: 0 0 5px rgba(201, 165, 84, 0.3) !important;
}

.sewerin-scope .footer-form button {
    background: linear-gradient(135deg, #c9a554 0%, #d4af37 100%) !important; /* Золотий градієнт */
    color: #000 !important; /* Чорний текст */
    border-radius: 4px;
    height: 45px;
    text-transform: uppercase;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.sewerin-scope .footer-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 165, 84, 0.3);
}

.sewerin-scope .row-dashed > .col {
    border-right: 1px solid rgba(255,255,255,0.05) !important; /* Ледь помітний розділювач колонок */
}

/* =========================================
   11. MOBILE MEDIA QUERIES (ADAPTED)
   ========================================= */
@media (max-width: 768px) {
    .sewerin-scope .hero-immersive .flickity-viewport,
    .sewerin-scope .hero-dynamic-wrapper .box-image {
        height: 500px;
    }
    
    .sewerin-scope .hero-dynamic-wrapper .post-title {
        font-size: 1.8rem; /* Збільшив для читабельності */
        color: #f8e29c !important;
    }
    
    .sewerin-scope .hero-dynamic-wrapper .box-text {
        padding-left: 20px;
        padding-right: 20px;
        bottom: 25%;
        background: linear-gradient(to top, rgba(10,17,40,0.9), transparent); /* Градієнт для читабельності на моб */
    }
    
    /* Мобільна навігація Hero */
    .sewerin-scope .hero-nav-item {
        flex-direction: row;
        gap: 10px;
        height: 60px;
        justify-content: flex-start;
        padding-left: 20px;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1) !important; /* Темний розділювач */
    }
    
    .sewerin-scope .hero-nav-title {
        margin-top: 0;
        font-size: 11px;
        color: #e0e0e0 !important;
    }
    
    .sewerin-scope .hero-nav-icon {
        width: 20px;
        height: 20px;
        stroke: #c9a554 !important;
    }
    
    .sewerin-scope .hero-immersive .flickity-prev-next-button {
        display: none;
    }

    .sewerin-scope body.single-post h1.entry-title {
        font-size: 1.8rem !important;
        color: #f8e29c !important; /* Золото на мобільному */
    }
    
    .sewerin-scope .menu-editorial,
    .sewerin-scope .editorial-col {
        padding-left: 20px;
        padding-right: 20px;
        background-color: #0a1128 !important; /* Фон меню */
    }
    
    .sewerin-scope .dd-dynamic-card .box-image {
        height: 350px;
    }
    
    .sewerin-scope .aip-weekly-title {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
/* =========================================
   9. SINGLE POST FIX (MIDNIGHT BOUTIQUE EDIT)
   ========================================= */

/* 1. ЗАГОЛОВОК СТАТТІ (H1) */
body.single-post h1.entry-title,
body.single-post .entry-header h1 {
    font-family: 'Playfair Display', serif !important; /* Преміальний шрифт */
    font-size: 2.5rem !important; /* Трохи збільшив для статусності */
    line-height: 1.1 !important;
    font-weight: 800 !important;
    text-transform: none !important; /* Лишаємо природний регістр */
    color: #f8e29c !important; /* Золото */
    text-align: center !important;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5); /* Глибока тінь */
    max-width: 900px;
    margin: 30px auto 30px auto !important;
}

/* =========================================
   💎 2. НОВИЙ КОНТЕЙНЕР МЕТА-ДАНИХ (LUXURY)
   ========================================= */

.sewerin-meta-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 20px !important; /* Більше повітря */
    margin: 0 auto 30px auto !important;
    padding-bottom: 25px !important;
    /* Тонка напівпрозора лінія замість сірої */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important; 
    width: 100%;
    max-width: 600px;
    line-height: 1 !important;
}

/* Елементи (Кожен блок: іконка + текст) */
.sewerin-meta-container .meta-item {
    display: inline-flex !important;
    align-items: center !important;
    height: 20px !important;
    font-family: 'Lato', sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important; /* Ширший інтервал */
    color: #a0a0a0 !important; /* Тьмяне срібло */
}

/* Іконки (i class="icon-...") */
.sewerin-meta-container i,
.sewerin-meta-container .meta-icon {
    font-size: 16px !important;
    margin-right: 8px !important;
    color: #c9a554 !important; /* Темне золото */
    stroke: #c9a554 !important;
}

/* Розділювач */
.sewerin-meta-container .meta-sep {
    color: rgba(255, 255, 255, 0.2) !important;
    font-size: 14px;
}

/* Прибираємо зайві відступи всередині */
.sewerin-meta-container span, 
.sewerin-meta-container p,
.sewerin-meta-container div,
.post-views-count {
    display: inline-block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    position: relative;
    top: 1px !important;
}

/* =========================================
   💎 FEATURED SLIDER FIX (READABILITY)
   ========================================= */

/* 1. Затемнення картинки (Overlay) */
.featured-posts .box-image .image-cover::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Градієнт, щоб білий текст читався */
    background: linear-gradient(to top, rgba(10,17,40,0.9) 0%, rgba(10,17,40,0.3) 50%, rgba(10,17,40,0.1) 100%) !important;
    pointer-events: none;
}

/* 2. Текст: Тінь і Позиція */
.featured-posts .box-text {
    text-shadow: 0 2px 15px rgba(0,0,0,0.9); /* Сильна тінь */
}

.featured-posts .post-title {
    font-family: 'Playfair Display', serif !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    color: #fff !important; /* Білий заголовок на слайдері */
    letter-spacing: 1px !important;
}

/* 3. Кнопка "Читати далі" (Примарна кнопка) */
.featured-posts .button {
    background: transparent !important;
    border: 1px solid rgba(255,255,255,0.5) !important;
    color: #fff !important;
    box-shadow: none !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

/* Ховер кнопки */
.featured-posts .button:hover {
    background: #f8e29c !important; /* Золотий фон */
    color: #000 !important; /* Чорний текст */
    border-color: #f8e29c !important;
    box-shadow: 0 0 15px rgba(248, 226, 156, 0.4) !important;
}


/* =========================================
   💎 CATEGORY FILTER (SUB-CATEGORIES)
   Кнопки під рубриками в Архіві
   ========================================= */

/* Контейнер кнопок */
.category-filter-row {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    margin: 20px 0 40px 0 !important;
    padding: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Самі кнопки (Ghost Style) */
.category-filter-row a,
.nav-filters a {
    display: inline-block !important;
    padding: 8px 24px !important;
    margin: 5px !important;
    
    /* Темний стиль */
    background-color: rgba(255,255,255,0.03) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    color: #d0d0d0 !important; /* Світло-сірий текст */
    
    border-radius: 50px !important; /* Овальні */
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

/* Активна кнопка і Ховер (Золото) */
.category-filter-row a:hover,
.category-filter-row a.active,
.nav-filters a:hover,
.nav-filters a.active {
    background: linear-gradient(135deg, #c9a554 0%, #d4af37 100%) !important; /* Градієнт */
    color: #050814 !important; /* Темний текст */
    border-color: #c9a554 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 165, 84, 0.3) !important;
}
/* 
 * 💎 FIX: HIDE TOP DESCRIPTION
 * Приховуємо стандартний опис зверху, бо ми вже додали свій знизу.
 */
.archive-page-header .taxonomy-description {
    display: none !important;
}

/* =========================================
   8. BLOG ARCHIVE FIX (MIDNIGHT BOUTIQUE EDIT)
   ========================================= */

/* Приховує стандартний заголовок та опис рубрики */
.archive .page-title-wrapper {
    display: none;
}

/* 1. ЗАГОЛОВОК КАТЕГОРІЇ (H1) */
.page-title-inner .page-title-heading h1,
.archive-page-header h1,
.page-title h1 {
    font-family: 'Playfair Display', serif !important; /* Преміальний шрифт */
    font-size: 3.5rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: #f8e29c !important; /* Золото */
    margin-top: 20px !important;
    margin-bottom: 15px !important;
    text-align: center !important;
    line-height: 1 !important;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5); /* Тінь */
}

/* Прибираємо зайві відступи у контейнера */
.page-title-inner {
    padding-bottom: 10px !important;
    background: transparent !important;
}

/* Мобільна адаптація заголовка */
@media (max-width: 768px) {
    .page-title-inner .page-title-heading h1,
    .archive-page-header h1,
    .page-title h1 {
        font-size: 2.2rem !important;
    }
}

/* 2. ОПИС ЗНИЗУ (SEO Text) */
.archive-description-bottom {
    background-color: #0a1128 !important; /* Темно-синій фон */
    border-top: 1px solid rgba(255,255,255,0.05) !important;
    padding: 80px 20px !important;
    margin-top: 60px !important;
}

.archive-description-bottom .col {
    max-width: 740px !important;
    margin: 0 auto !important;
    float: none !important;
    width: 100% !important;
}

/* Типографіка опису */
.archive-description-bottom .entry-content,
.editorial-text-block {
    font-family: 'Lato', sans-serif !important;
    font-size: 1.15rem !important;
    line-height: 1.8 !important;
    color: #e0e0e0 !important; /* Срібний текст */
    text-align: left !important;
}

.archive-description-bottom p {
    margin-bottom: 20px;
    color: #e0e0e0 !important;
}

/* Заголовки в описі */
.archive-description-bottom h2, 
.archive-description-bottom h3 {
    margin-top: 40px !important;
    margin-bottom: 20px !important;
    font-weight: 700 !important;
    color: #f8e29c !important; /* Золото */
    font-family: 'Playfair Display', serif !important;
}

/* Перший абзац (Lead) */
.archive-description-bottom p:first-of-type {
    font-size: 1.25rem !important;
    color: #fff !important; /* Білий для вступу */
    margin-bottom: 30px !important;
}

/* =========================================
   💎 SMART TAGS BAR (CHIPS)
   Теги під заголовком архіву
   ========================================= */

.sewerin-tags-bar {
    margin-bottom: 30px;
    margin-top: -20px;
}

.tags-scroll-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.tags-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #888; /* Тьмяний */
    margin-right: 10px;
    letter-spacing: 0.5px;
}

/* Самі чіпси (Ghost Style) */
.tag-chip {
    display: inline-flex;
    align-items: center;
    font-family: 'Lato', sans-serif;
    font-size: 11px;
    font-weight: 600;
    
    background-color: rgba(255,255,255,0.05); /* Прозорий фон */
    border: 1px solid rgba(255,255,255,0.1);
    color: #ccc; /* Світло-сірий */
    
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag-chip .hash {
    color: #666; /* Темний хештег */
    margin-right: 3px;
    font-weight: 400;
}

/* Ховер */
.tag-chip:hover {
    background-color: #f8e29c; /* Золотий фон */
    border-color: #f8e29c;
    color: #000; /* Чорний текст */
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(248, 226, 156, 0.2);
}

/* Мобільна адаптація тегів */
@media (max-width: 768px) {
    .tags-scroll-container {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
        padding-left: 20px;
        padding-right: 20px;
        margin-left: -20px;
        margin-right: -20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .tags-scroll-container::-webkit-scrollbar { display: none; }
    .tags-label { display: none; }
    
    .tag-chip {
        flex: 0 0 auto;
        font-size: 12px;
        padding: 8px 16px;
        background-color: rgba(255,255,255,0.1); /* Трохи яскравіше на моб */
    }
}

/* =========================================
   💎 SINGLE POST TAGS (BOTTOM)
   Теги в кінці статті
   ========================================= */

.sewerin-post-tags-container {
    margin-top: 50px !important;
    margin-bottom: 30px !important;
    padding-top: 30px !important;
    border-top: 1px solid rgba(255,255,255,0.1) !important; /* Тонка лінія */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.sewerin-post-tags-container .tags-label {
    font-family: 'Lato', sans-serif;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-right: 10px;
}

.sewerin-post-tags-container .tags-list {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Приховуємо стандартні теги */
.entry-meta .tags, 
.article-tags {
    display: none !important;
}

@media (max-width: 768px) {
    .sewerin-post-tags-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* =========================================
   🎬 VIDEO CARDS STYLES (SMOOTH ANIMATION)
   ========================================= */

/* 1. БАЗА: Коло (Фон кнопки) */
.type-aip_video .box-image::after,
.video-overlay div {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1); /* Початковий розмір */
    width: 60px;
    height: 60px;
    border: 2px solid #fff;
    border-radius: 50%;
    z-index: 9;
    background: rgba(0,0,0,0.4); /* Напівпрозорий чорний */
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    
    /* 🔥 МАГІЯ ТУТ: Плавний перехід для всіх властивостей */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important; 
}

/* 2. БАЗА: Трикутник (Стрілка) */
.type-aip_video .box-image::before,
.video-overlay div div {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-45%, -50%); /* Центрування трикутника */
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #fff;
    z-index: 25;
    pointer-events: none;
    transition: all 0.3s ease !important;
}

/* 3. ЕФЕКТ ПРИ НАВЕДЕННІ (HOVER) */
/* Коли наводимо на всю картку - кнопка оживає */
.type-aip_video:hover .box-image::after,
.box:hover .video-overlay div {
    background: #ff0000 !important; /* YouTube Червоний (або зміни на свій #d2a964) */
    border-color: #ff0000 !important;
    transform: translate(-50%, -50%) scale(1.15) !important; /* Плавне збільшення */
    box-shadow: 0 10px 25px rgba(255, 0, 0, 0.4) !important; /* Світіння */
}

/* Трикутник теж трохи рухається для динаміки */
.type-aip_video:hover .box-image::before,
.box:hover .video-overlay div div {
    transform: translate(-40%, -50%);
}

/* 
 * 🎥 CLEAN VIDEO STYLE (FIXED)
 * Гарантує, що відео займає 100% ширини і стоїть по центру
 */
.video-container-clean iframe,
.video-container-clean video,
.wp-block-embed__wrapper iframe {
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 16/9;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: block;
    margin: 0 auto;
}

/* =========================================
   🎬 VIDEO CONTENT STYLES (MIDNIGHT MODE)
   ========================================= */

/* 1. Загальний текст */
.video-styled-text {
    font-family: 'Lato', sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e0e0e0; /* Срібло */
}

/* 2. Заголовки всередині тексту (Інсайти, Таймкоди) */
.video-styled-text h3, 
.video-styled-text h4, 
.video-styled-text strong {
    color: #f8e29c; /* Яскраве золото */
    font-weight: 700;
    margin-top: 30px;
    display: block;
    font-family: 'Playfair Display', serif; /* Преміальний шрифт */
}

/* 3. Списки (Інсайти) - Стильні темні блоки */
.video-styled-text ul {
    background: rgba(255, 255, 255, 0.03); /* Ледь помітний фон */
    border-left: 3px solid #c9a554; /* Золота лінія зліва */
    padding: 20px 20px 20px 30px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
    list-style: none;
}

.video-styled-text ul li {
    margin-bottom: 10px;
    position: relative;
    color: #d0d0d0;
}

/* Іконка списку (Золота галочка) */
.video-styled-text ul li::before {
    content: "✦"; /* Зірочка замість галочки для бутіка */
    color: #c9a554;
    font-weight: bold;
    position: absolute;
    left: -20px;
    top: 0;
}

/* 4. Вердикт / Висновок (Акцентний блок) */
.video-styled-text p:last-of-type {
    background: linear-gradient(to right, rgba(201, 165, 84, 0.1), transparent); /* Золотий градієнт */
    border: 1px solid rgba(201, 165, 84, 0.3); /* Тонка рамка */
    padding: 25px;
    border-radius: 8px;
    font-weight: 500;
    color: #fff; /* Білий текст для акценту */
    margin-top: 40px;
    font-style: italic;
}

/* 5. Таймкоди та посилання */
.video-styled-text a {
    color: #f8e29c; /* Золото */
    text-decoration: none;
    border-bottom: 1px solid rgba(248, 226, 156, 0.3);
    transition: all 0.3s ease;
}

.video-styled-text a:hover {
    background-color: rgba(248, 226, 156, 0.1);
    border-color: #f8e29c;
    color: #fff;
}

/* =========================================
   🎬 CINEMA FILTERS STYLE (Ghost Buttons)
   ========================================= */

.video-filter-row .filter-btn {
    display: inline-block;
    padding: 8px 24px;
    
    /* Ghost Style */
    border: 1px solid rgba(255,255,255,0.2);
    background-color: transparent;
    color: #a0a0a0; /* Тьмяний */
    
    border-radius: 50px;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.video-filter-row .filter-btn:hover {
    border-color: #c9a554;
    color: #fff;
    background: rgba(201, 165, 84, 0.1); /* Легке золото */
    transform: translateY(-2px);
}

/* Активна кнопка (для "Всі") */
.video-filter-row .filter-btn.active {
    background: #c9a554; /* Повне золото */
    color: #050814; /* Темний текст */
    border-color: #c9a554;
    box-shadow: 0 0 15px rgba(201, 165, 84, 0.4);
}

/* =========================================
   📱 VIDEO PAGE MOBILE FIX
   ========================================= */
@media (max-width: 768px) {
    .video-hero-section {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
    
    .video-hero-section .entry-title {
        font-size: 1.8rem !important;
        margin-bottom: 15px !important;
        color: #f8e29c !important;
    }
    
    .video-hero-section .row .col {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .video-styled-text {
        font-size: 1rem !important;
    }
}

/* =========================================
   💎 FIX: HOME VIDEO SLIDER TEXT COLOR
   ========================================= */

/* Заголовок відео в слайдері */
.section.dark .type-aip_video .box-text h5.post-title {
    color: #fff !important; /* Білий на темному */
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.5px;
}

/* Напис "Дивитись" */
.section.dark .type-aip_video .box-text .is-xsmall {
    color: #888 !important; /* Сірий */
    transition: color 0.3s ease;
}

/* При наведенні */
.section.dark .type-aip_video .box:hover .box-text .is-xsmall {
    color: #f8e29c !important; /* Золото */
}

/* =========================================
   💎 FIX: JOURNAL SECTIONS ROUNDING
   Повертаємо заокруглення для блоку "Розділи журналу" (Deep Dive)
   ========================================= */

/* 1. Заокруглюємо саму картку */
.dd-dynamic-card .box {
    border-radius: 16px !important;
    overflow: hidden !important; /* Обрізає все, що виходить за межі радіусу */
    transform: translateZ(0); /* Фікс для Safari, щоб кути не мерехтіли */
}

/* 2. Заокруглюємо контейнер картинки */
.dd-dynamic-card .box-image, 
.dd-dynamic-card .image-cover {
    border-radius: 16px !important;
}

/* 3. Гарантуємо, що при наведенні тінь працює (перестраховка) */
.dd-dynamic-card .col-inner {
    overflow: visible !important; 
    border-radius: 0 !important; /* Зовнішній контейнер має бути без рамки, щоб не різати тінь */
}

/* =========================================
   🚫 HIDE DUPLICATE VIDEO (CONTENT AREA FIX)
   Приховуємо відеоплеєри всередині тексту, 
   щоб залишити тільки головне відео зверху.
   ========================================= */

/* 1. Ховаємо YouTube iframe та стандартні відео */
.video-styled-text iframe,
.video-styled-text video,
.video-styled-text .wp-video {
    display: none !important;
}

/* 2. Ховаємо блоки WordPress Embed (Гутенберг) */
.video-styled-text .wp-block-embed,
.video-styled-text .wp-block-embed-youtube {
    display: none !important;
}

/* 3. Ховаємо контейнери Flatsome Video */
.video-styled-text .video-fit,
.video-styled-text .ux-video {
    display: none !important;
}

/* =========================================
   💎 FIX: ARCHIVE HERO & BANNERS (MIDNIGHT EDIT)
   ========================================= */

/* 1. ХОВАЄМО СТАНДАРТНИЙ ЗАГОЛОВОК (Дубль Flatsome) */
.blog-archive .page-title, 
.blog-archive .page-title-inner {
    display: none !important;
}

/* Позиціонуємо текст поверх картинки (PERFECT CENTER FIX) */
.featured-posts .box-text,
.sewerin-archive-hero .box-text,
.sewerin-archive-master-header .box-text {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important; /* Додано: розтягує від краю до краю */
    width: 100% !important;
    height: 100% !important; /* Додано: займає всю висоту для центрування */
    
    padding: 20px 40px 40px 40px !important;
    
    /* FLEXBOX МАГІЯ */
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important; /* Притискаємо до низу */
    align-items: center !important;     /* Центруємо по горизонталі */
    
    text-align: center !important;
    z-index: 10;
    pointer-events: none;
}

/* Гарантуємо, що сам заголовок теж центрується */
.featured-posts .post-title,
.sewerin-archive-hero .post-title,
.sewerin-archive-master-header .post-title {
    color: #fff !important;
    font-family: 'Playfair Display', serif !important;
    font-size: 2.2rem !important;
    font-weight: 800 !important;
    text-shadow: 0 4px 30px rgba(0,0,0,0.9) !important;
    margin-bottom: 10px !important;
    line-height: 1.1 !important;
    
    /* Центрування блоку заголовка */
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 900px; /* Обмеження ширини, щоб рядки були гарними */
}

/* 3. ЗАТЕМНЕННЯ (Градієнт для читабельності) */
/* Це створює "кінематографічний" ефект знизу картинки */
.featured-posts .box-image::after,
.sewerin-archive-hero .box-image::after,
.sewerin-archive-master-header .box-image::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Градієнт від прозорого до темно-синього */
    background: linear-gradient(to top, rgba(10, 17, 40, 0.95) 0%, rgba(10, 17, 40, 0.4) 40%, rgba(10, 17, 40, 0) 100%) !important;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.3s ease;
}

/* =========================================
   💎 FIX: PREVENT BLACK TEXT ON HOVER
   Забороняємо тексту ставати чорним при наведенні
   ========================================= */

.hero-dynamic-wrapper .box:hover .post-title,
.hero-dynamic-wrapper .box:hover .box-text h5,
.hero-dynamic-wrapper .box:hover .is-xsmall,
.featured-posts .box:hover .post-title {
    color: #fff !important; /* Тримаємо білий */
    text-shadow: 0 4px 40px rgba(0,0,0,1) !important; /* Посилюємо тінь */
}

/* При наведенні градієнт стає трохи темнішим для контрасту */
.hero-dynamic-wrapper .box:hover .box-image::after,
.featured-posts .box:hover .box-image::after {
    opacity: 1 !important;
    background: linear-gradient(to top, rgba(10, 17, 40, 1) 0%, rgba(10, 17, 40, 0.5) 50%, rgba(10, 17, 40, 0) 100%) !important;
}

/* =========================================
   📱 MOBILE HERO FIX (COMPACT & STYLISH)
   ========================================= */

@media (max-width: 768px) {

    /* 1. Контейнер картки */
    .hero-dynamic-wrapper .box,
    .hero-dynamic-wrapper .box-text,
    .sewerin-archive-hero .box-text {
        background-color: transparent !important;
        box-shadow: none !important;
        border: none !important;
    }

    /* 2. Текст на мобільному */
    .hero-dynamic-wrapper .box-text,
    .sewerin-archive-hero .box-text {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        padding: 15px 20px 30px 20px !important; /* Компактні відступи */
        
        /* Сильний градієнт для мобільного */
        background: linear-gradient(to top, rgba(10,17,40,1) 0%, rgba(10,17,40,0.8) 60%, transparent 100%) !important;
    }

    /* 3. Шрифт */
    .hero-dynamic-wrapper .post-title,
    .sewerin-archive-hero .post-title {
        font-size: 1.6rem !important; /* Оптимально */
        line-height: 1.2 !important;
        margin-bottom: 5px !important;
    }
    
    /* 4. Висота картинки */
    .hero-dynamic-wrapper .box-image,
    .hero-dynamic-wrapper .flickity-viewport {
        height: 450px !important; /* Високий вертикальний кадр */
        border-radius: 0 !important; /* На мобільному краще на всю ширину */
    }
    
    .hero-dynamic-wrapper .box-image img {
        height: 100% !important;
        object-fit: cover !important;
    }
}

/* =========================================
   📱 MOBILE HOME HERO FIX (TEXT UP)
   Піднімаємо текст на головній, щоб кнопки навігації його не перекривали
   ========================================= */

@media (max-width: 768px) {
    /* Додаємо відступ знизу для тексту, рівний висоті кнопок (70px) + повітря */
    .hero-immersive .hero-dynamic-wrapper .box-text {
        padding-bottom: 100px !important; 
    }
}

/* =========================================
   🚑 ARCHIVE VIDEO BUTTON: THE PHP FIX
   ========================================= */

/* 1. ВБИВАЄМО ВСІ СТАРІ КНОПКИ (Дублі) */
.video-overlay, 
.icon-play, 
.play-button {
    display: none !important;
}

/* 2. СТИЛІЗУЄМО НОВУ КНОПКУ (.sewerin-play-icon) */
/* Це порожній div, який ми розтягуємо на всю картинку для центрування */
.sewerin-play-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    pointer-events: none;
}

/* Малюємо КОЛО */
.sewerin-play-icon::after {
    content: "";
    width: 60px;
    height: 60px;
    background: rgba(0,0,0,0.5);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Малюємо ТРИКУТНИК */
.sewerin-play-icon::before {
    content: "";
    position: absolute;
    /* Центруємо трикутник */
    top: 50%;
    left: 50%;
    transform: translate(-40%, -50%); 
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #fff;
    z-index: 20; /* Поверх кола */
}

/* 3. ЕФЕКТ ПРИ НАВЕДЕННІ */
.post-item:hover .sewerin-play-icon::after,
.col-inner:hover .sewerin-play-icon::after {
    background: #ff0000;
    border-color: #ff0000;
    transform: scale(1.15);
}

/* =========================================
   💎 TEAM PAGE STYLES
   ========================================= */

/* Сітка */
.sewerin-team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 в ряд */
    gap: 30px;
    margin-top: 40px;
}

/* Мобільна адаптація сітки */
@media (max-width: 1024px) { .sewerin-team-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .sewerin-team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .sewerin-team-grid { grid-template-columns: 1fr; } }

/* Картка */
.team-member-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.team-member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-color: #e0e0e0;
}

/* Аватар */
.member-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
.team-member-card:hover .member-avatar {
    transform: scale(1.05);
}

/* Ім'я */
.member-name {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.member-name a {
    text-decoration: none;
}

/* Мета (кількість статей) */
.member-meta {
    font-size: 11px;
    color: #999;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

/* Біо */
.member-bio {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
}

/* Посилання */
.member-link {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #ddd;
    padding-bottom: 2px;
    transition: all 0.2s;
}
.member-link:hover {
    color: #d2a964;
    border-color: #d2a964;
}

/* =========================================
   💎 AUTHOR ARCHIVE HERO (CENTERED)
   ========================================= */

.sewerin-author-header {
    padding: 60px 0 50px;
    background-color: #fcfcfc;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 50px;
}

/* Центрування аватарки */
.author-hero-avatar {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.author-hero-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.author-hero-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #999;
    margin-bottom: 10px;
}

.author-hero-name {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    text-transform: none; /* За бажанням можна uppercase */
    margin-bottom: 20px;
    line-height: 1.1;
}

.author-hero-bio {
    font-size: 1.15rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 25px;
    max-width: 700px; /* Обмежуємо ширину тексту для зручності */
    margin-left: auto;
    margin-right: auto;
}

.author-hero-meta span {
    display: inline-block;
    padding: 6px 18px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #333;
}
/* =========================================
   🚫 GHOST VIDEO FIX (Прибираємо дубль)
   ========================================= */

/* Ховаємо контейнер відео всередині тексту */
.video-styled-text .video-container,
.video-styled-text .video-resize-container,
.video-styled-text .ux-video {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Ховаємо сам iframe (плеєр), якщо він виліз без контейнера */
.video-styled-text iframe {
    display: none !important;
}

/* =========================================
   💎 FOOTER FORM: OUTLINE STYLE (MIDNIGHT)
   ========================================= */

/* 1. Налаштування контейнера форми */
.footer-form form {
    display: flex !important;
    gap: 10px !important;
}

/* 2. Поле вводу (Темне) */
.footer-form input[type="email"] {
    background-color: rgba(255, 255, 255, 0.05) !important; /* Напівпрозорий */
    border: 1px solid rgba(255, 255, 255, 0.1) !important; /* Тонка рамка */
    border-radius: 50px !important;
    height: 45px !important;
    padding-left: 20px !important;
    color: #fff !important; /* Білий текст */
    transition: all 0.3s ease;
}

/* Фокус на полі */
.footer-form input[type="email"]:focus {
    background-color: #131b33 !important; /* Трохи світліший фон */
    border-color: #c9a554 !important; /* Золота рамка */
    box-shadow: 0 0 10px rgba(201, 165, 84, 0.2) !important;
}

/* 3. Кнопка (Золотий контур/Заливка) */
.footer-form button {
    border-radius: 50px !important;
    background: transparent !important;
    border: 1px solid #c9a554 !important; /* Золота рамка */
    color: #c9a554 !important; /* Золотий текст */
    
    font-weight: 800 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    height: 45px !important;
    padding: 0 30px !important;
    min-width: auto !important;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* 4. Ефект при наведенні (Заливка золотом) */
.footer-form button:hover {
    background: #c9a554 !important;
    color: #050814 !important; /* Темний текст */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 165, 84, 0.3);
}

/* =========================================
   💎 AUTHOR HERO STYLING (LUXURY PROFILE)
   ========================================= */

/* Аватарка: Золота рамка */
.author-hero-img {
    width: 220px !important;
    height: 220px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #c9a554; /* Золото */
    box-shadow: 0 15px 40px rgba(0,0,0,0.5); /* Глибока тінь */
    display: inline-block;
    background-color: #131b33; 
    transition: transform 0.3s ease;
}

.author-hero-img:hover {
    transform: scale(1.03);
    border-color: #f8e29c; /* Світліше золото */
}

/* Виділення жирного тексту в біографії */
.author-hero-bio strong {
    color: #f8e29c; /* Золото */
    font-weight: 700;
}

/* Мобільна адаптація */
@media (max-width: 768px) {
    .author-hero-name {
        font-size: 2.2rem !important;
        color: #f8e29c !important;
    }
    .author-hero-bio {
        font-size: 1rem !important;
        padding: 0 15px;
        color: #e0e0e0 !important;
    }
    .author-hero-img {
        width: 160px !important; 
        height: 160px !important;
        border-width: 3px;
    }
}

/* Рекламні картки форматів */
.hover-up {
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background-color: rgba(255,255,255,0.02);
}
.hover-up:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-color: #c9a554 !important;
}

/* =========================================
   📱 MOBILE TYPOGRAPHY FIX (ABOUT PAGE)
   ========================================= */

@media (max-width: 768px) {
    .section-content h1,
    .col-inner h1 {
        font-size: 2rem !important;
        line-height: 1.1 !important;
        letter-spacing: 0 !important;
        word-wrap: break-word;
        color: #f8e29c !important; /* Золото на моб */
    }
}

/* =========================================
   💎 404 PAGE STYLES (MIDNIGHT)
   ========================================= */

/* 1. Гігантська цифра */
.error-code {
    font-family: 'Playfair Display', serif !important;
    letter-spacing: -5px;
    user-select: none;
    color: rgba(255,255,255,0.05); /* Ледь помітна */
    text-shadow: 0 0 30px rgba(201, 165, 84, 0.2); /* Світіння */
}

/* 2. Стилізація Пошуку */
.search-404-wrapper .search-field {
    background-color: #131b33 !important; /* Темний */
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 50px !important;
    height: 55px !important;
    padding-left: 25px !important;
    font-size: 16px !important;
    color: #fff !important; /* Білий текст */
    transition: all 0.3s ease;
}

.search-404-wrapper .search-field:focus {
    border-color: #c9a554 !important;
    box-shadow: 0 0 15px rgba(201, 165, 84, 0.2) !important;
}

.search-404-wrapper .search-submit {
    background: linear-gradient(135deg, #c9a554 0%, #d4af37 100%) !important;
    color: #000 !important;
    border-radius: 50px !important;
    height: 45px !important;
    width: 45px !important;
    min-width: 45px !important;
    margin: 5px !important;
}

@media (max-width: 768px) {
    .error-code {
        font-size: 6rem !important;
        margin-bottom: -20px !important;
    }
    .search-404-wrapper {
        max-width: 100% !important;
    }
}    

/* =========================================
   💬 VIDEO COMMENTS STYLING (DARK MODE)
   ========================================= */

/* Контейнер коментарів */
.video-comments-wrapper #respond {
    background: rgba(255,255,255,0.03) !important; /* Прозорий темний */
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05) !important;
}

/* Список коментарів */
.video-comments-wrapper .comment-list {
    margin-bottom: 40px;
}

.video-comments-wrapper .comment-body {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    color: #e0e0e0;
}

/* Аватарки коментаторів */
.video-comments-wrapper .comment-author img {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    border: 2px solid #c9a554; /* Золота рамка */
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Ім'я автора */
.video-comments-wrapper .fn {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: #f8e29c !important; /* Золото */
}

/* Текст коментаря */
.video-comments-wrapper .comment-content p {
    color: #d0d0d0;
}

/* Кнопка "Відправити" */
.video-comments-wrapper #submit {
    background: linear-gradient(135deg, #c9a554 0%, #d4af37 100%) !important;
    color: #000 !important;
    border-radius: 30px;
    padding: 10px 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    border: none;
}

.video-comments-wrapper #submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(201, 165, 84, 0.4);
    background: #fff !important; /* Білий при наведенні */
}

/* =========================================
   ⚡ MOBILE PERFORMANCE FIX (NO LAG)
   ========================================= */

@media (max-width: 768px) {
    /* 1. Вимикаємо анімацію зуму в Hero */
    .hero-dynamic-wrapper .box-image, 
    .hero-dynamic-wrapper .image-cover,
    .hero-dynamic-wrapper .bg {
        animation: none !important;
        transform: none !important;
        transition: none !important;
    }
    
    /* 2. Примусова апаратна акселерація для плавності свайпу */
    .hero-immersive .flickity-slider,
    .hero-dynamic-wrapper .flickity-slider {
        will-change: transform;
    }
    
    .hero-nav-item {
        display: flex !important;
        justify-content: center !important; /* Центр по горизонталі */
        align-items: center !important;     /* Центр по вертикалі */
        text-align: center !important;
       
        padding: 0 10px !important;
    
    .hero-nav-title {
        font-size: 11px !important;
        line-height: 1.2 !important;
        margin: 0 !important; /* Прибираємо зайві відступи */
        color: #e0e0e0 !important;
    }
    
}

/* =========================================
   👑 MENU BAR STYLING (ATELIER STYLE)
   ========================================= */

/* 1. Налаштування шрифту меню */
.header-bottom-nav > li > a {
    font-family: 'Lato', sans-serif !important;
    font-weight: 700 !important;
    font-size: 12px !important; /* Менший, акуратніший шрифт */
    letter-spacing: 2px !important; /* "Повітря" між буквами */
    text-transform: uppercase !important;
    color: #e0e0e0 !important; /* Срібло */
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}

/* 2. Ефект при наведенні (Тільки колір, без фону) */
.header-bottom-nav > li > a:hover,
.header-bottom-nav > li.active > a {
    color: #c9a554 !important; /* Золото */
    background: transparent !important;
    box-shadow: none !important;
}

/* 3. Прибираємо стрілочку випадання (вона здешевлює) */
.nav-dropdown-toggle:after {
    display: none !important;
}

/* 4. Налаштування випадаючого блоку (Якщо не використовуєш UX Block) */
.nav-dropdown {
    background-color: #0a1128 !important; /* Темний фон */
    border: 1px solid rgba(201, 165, 84, 0.3) !important; /* Золота рамка */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
}

.nav-dropdown li a {
    color: #b0b0b0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    font-size: 13px !important;
    padding: 10px 15px !important;
}

.nav-dropdown li a:hover {
    color: #fff !important;
    padding-left: 20px !important; /* Ефект зсуву */
    background: rgba(255,255,255,0.02) !important;
}

/* =========================================
   👑 GOLD CTA BUTTON IN MENU
   Робимо пункт "Ательє" кнопкою
   ========================================= */

/* Знаходимо останній пункт меню (або дай йому клас .menu-item-calculator) */
.header-bottom-nav > li:last-child > a {
    border: 1px solid #c9a554 !important; /* Золота рамка */
    border-radius: 30px !important;       /* Пігулка */
    padding: 5px 25px !important;         /* Відступи всередині кнопки */
    margin-left: 20px !important;         /* Відступ від інших пунктів */
    color: #f8e29c !important;            /* Золотий текст */
    transition: all 0.3s ease;
    margin-top: 15px !important;          /* Вирівнювання по висоті */
    margin-bottom: 15px !important;
}

/* Ховер ефект для кнопки */
.header-bottom-nav > li:last-child > a:hover {
    background: linear-gradient(135deg, #c9a554 0%, #d4af37 100%) !important;
    color: #050814 !important; /* Темний текст */
    box-shadow: 0 0 15px rgba(201, 165, 84, 0.4);
}

/* =========================================
   📚 RELATED POSTS BLOCK (MIDNIGHT BOUTIQUE)
   ========================================= */

.aip-related-posts-block.midnight-theme {
    background: rgba(255, 255, 255, 0.03); /* Напівпрозорий темний */
    border: 1px solid rgba(201, 165, 84, 0.2); /* Золота рамка */
    border-left: 4px solid #c9a554; /* Акцент зліва */
    border-radius: 8px;
    padding: 30px;
    margin: 40px 0;
}

/* Заголовок блоку */
.aip-related-posts-block h3.aip-related-title {
    font-family: 'Playfair Display', serif;
    color: #f8e29c; /* Золото */
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.aip-related-posts-block h3 .dashicons {
    color: #c9a554;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Список (Grid) */
.aip-related-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Картка статті */
a.aip-related-item {
    display: block;
    text-decoration: none;
    padding: 15px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

a.aip-related-item:hover {
    background: rgba(201, 165, 84, 0.1); /* Золоте підсвічування */
    border-color: rgba(201, 165, 84, 0.4);
    transform: translateX(5px);
}

/* Заголовок статті */
.aip-related-item-title {
    display: block;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 5px;
}

a.aip-related-item:hover .aip-related-item-title {
    color: #f8e29c; /* Золотіє при наведенні */
}

/* Тизер (опис) */
.aip-related-item-teaser {
    display: block;
    font-size: 0.95rem;
    color: #a0a0a0;
    line-height: 1.5;
    font-style: italic;
}
    