/*
Theme Name: Putivnyk Chimera Theme
Author: Denis Galperin
Description: Тема для альманаху "Путівник химерними світами"
Version: 1.0
*/

/* --- Твої унікальні стилі --- */

/* Кастомний золотий скролбар */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #00050a; }
::-webkit-scrollbar-thumb { background: #c19b67; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #b28e5d; }

/* --- Фікс для вирівнювання тексту в WordPress --- */
.has-text-align-center { text-align: center !important; }
.has-text-align-right { text-align: right !important; }
.has-text-align-left { text-align: left !important; }

/* Текстура луски на фоні */
.texture-overlay { 
    background-image: url('https://www.transparenttextures.com/patterns/black-scales.png'); 
    opacity: 0.1; 
    mix-blend-mode: overlay; 
}

/* Оформлення тексту статей */
.article-content p { margin-bottom: 1.75rem; line-height: 1.8; color: rgba(232, 232, 232, 0.85); font-weight: 300; }
.article-content blockquote { border-left: 4px solid #c19b67; padding-left: 1.5rem; font-style: italic; color: #d4bc96; margin: 2.5rem 0; background: rgba(193, 155, 103, 0.05); padding: 1.5rem; border-radius: 0 0.5rem 0.5rem 0; }
.article-content h3 { font-family: 'Playfair Display', serif; font-size: 1.75rem; font-weight: 700; color: #c19b67; margin-top: 3rem; margin-bottom: 1.5rem; }
.article-content ul { margin-bottom: 1.5rem; color: rgba(232, 232, 232, 0.8); font-weight: 300; }
.article-content li { margin-bottom: 0.5rem; }
/* --- Фікс для Галерей WordPress --- */
.article-content .wp-block-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 2.5rem 0;
    padding: 0;
}
.article-content .wp-block-gallery .wp-block-image {
    flex-grow: 1;
    /* Базова ширина: 3 колонки (33% мінус відступи) */
    flex-basis: calc(33.333% - 1rem); 
    margin: 0;
}
.article-content .wp-block-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
    /* Робимо рамку товщою (2px), яскравішою (0.4) і ставимо !important */
    border: 2px solid rgba(193, 155, 103, 0.4) !important; 
    transition: all 0.5s ease;
}
.article-content .wp-block-gallery img:hover {
    transform: scale(1.03); 
    border-color: rgba(193, 155, 103, 0.9) !important; /* Майже чисте золото при наведенні */
    box-shadow: 0 0 20px rgba(193, 155, 103, 0.4);
}

/* Адаптивність: на телефонах робимо 1 колонку */
@media (max-width: 768px) {
    .article-content .wp-block-gallery .wp-block-image {
        flex-basis: 100%; 
    }
}
/* --- Фікси для поодиноких картинок (округлення, розмір, центрування) --- */

/* Робимо заокруглення для стилю "Закруглений" */
.wp-block-image.is-style-rounded img,
.wp-block-image .is-style-rounded img {
    border-radius: 50% !important; /* Робить ідеальне коло або овал */
}

/* Дозволяємо картинкам слухатися ручного зменшення в редакторі */
.wp-block-image img {
    height: auto;
    max-width: 100%;
}

/* Центрування картинок, якщо ти вибрав це в редакторі */
.wp-block-image.aligncenter {
    display: flex;
    justify-content: center;
    margin-left: auto !important;
    margin-right: auto !important;
}

.wp-block-image.aligncenter img {
    margin: 0 auto;
}

/* Відступи знизу, щоб текст не прилипав до фото */
figure.wp-block-image {
    margin-bottom: 2rem;
}