/* ============================================
   ОБЩИЕ СТИЛИ
============================================ */

.card {
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card:last-child {
    margin-bottom: 0;
}

/* ============================================
   КНОПКИ-ПИЛЮЛИ (БАЗОВЫЙ СТИЛЬ)
============================================ */

.btn-pill {
    border-radius: 30px !important;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
    display: inline-block;
    width: 100%;
    text-decoration: none;
}

/* ============================================
   ИЗ index.css / works_detail.css
============================================ */

.play-triangle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-40%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 30px 0 30px 50px;
    border-color: transparent transparent transparent white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

#videoModal .modal-content,
#paintingModal .modal-content,
#galleryModal .modal-content {
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: none;
}

#galleryModal .modal-dialog {
    margin: 0;
}

#galleryModal .carousel-item {
    text-align: center;
    background-color: transparent;
}

#galleryModal .carousel-item img {
    max-height: 90vh;
    max-width: 90%;
    width: auto;
    margin: 0 auto;
    object-fit: contain;
}

#galleryModal .carousel-inner {
    height: 100vh;
    display: flex;
    align-items: center;
}

#galleryModal .carousel-control-prev,
#galleryModal .carousel-control-next {
    width: 10%;
}

.gallery-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
}

.post-text-container {
    position: relative;
}

.post-text {
    max-height: 100px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.post-text.expanded {
    max-height: none;
}

.expand-btn {
    background-color: #212529;
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.expand-btn:hover {
    background-color: #000000;
}

/* ============================================
   ТЕГИ (чёрные прямоугольники)
============================================ */

#tagsCheckboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-checkbox-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    background: #212529;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    border: 1px solid #212529;
    min-height: 36px;
    white-space: nowrap;
}

/* Невыбранный тег при наведении — чуть светлее */
.tag-checkbox-label:hover {
    background: #343a40;
    border-color: #343a40;
}

/* Выбранный тег */
.tag-checkbox-label.active {
    background: #28a745;
    border-color: #28a745;
    color: #ffffff;
}

/* Выбранный тег при наведении — чуть темнее зелёного */
.tag-checkbox-label.active:hover {
    background: #218838;
    border-color: #218838;
}

.tag-checkbox {
    display: none;
}

/* ============================================
   НОВЫЙ ТЕГ (input + кнопка)
============================================ */

.input-group {
    display: flex;
    align-items: center;
    gap: 0;
}

.input-group .form-control {
    flex: 1;
    border-radius: 6px 0 0 6px !important;
    padding: 8px 14px;
    font-size: 0.9rem;
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
}

.input-group .form-control:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
}

.input-group .btn {
    border-radius: 0 6px 6px 0 !important;
    padding: 8px 18px;
    font-size: 0.9rem;
    background: #212529;
    color: #fff;
    border: 1px solid #212529;
    cursor: pointer;
    transition: background 0.2s;
}

.input-group .btn:hover {
    background: #343a40;
}


/* Общие стили для полей ввода (не трогаем) */
input,
select,
textarea {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px 15px;
    font-size: 15px;
    transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #218838;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
}

label {
    font-weight: 500;
    margin-bottom: 6px;
    color: #333;
    font-size: 14px;
}

/* ============================================
   ИЗ service_detail.css
============================================ */

#serviceCarousel .carousel-control-prev-icon,
#serviceCarousel .carousel-control-next-icon {
    background-size: 60% 60%;
}

.carousel-item {
    text-align: center;
    background-color: #f5f5f0;
}

/* ============================================
   ИЗ gallery.html / works.html
============================================ */

.filter-divider {
    width: 1px;
    height: 40px;
    background-color: #dee2e6;
    margin: 0 15px;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c757d;
    margin-right: 10px;
    letter-spacing: 0.5px;
}

.price-tag {
    font-size: 1.5rem;
    font-weight: bold;
    color: #000000;
}

@media (max-width: 992px) {
    .filter-divider {
        display: none;
    }

    .filter-row {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .price-tag {
        font-size: 1.2rem;
    }
}

/* ============================================
   ИЗ calendar.html
============================================ */

.calendar-table {
    table-layout: fixed;
    width: 100%;
}

.calendar-table td {
    width: 14.28%;
    height: 100px;
    vertical-align: top;
    overflow: hidden;
}

.event-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
}

/* ============================================
   ИЗ orders.html
============================================ */

.editable-note {
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: break-word;
    max-width: 100%;
}

.editable-note textarea {
    width: 100%;
    box-sizing: border-box;
}

.order-card {
    width: 100%;
    overflow-x: hidden;
}

.note-text {
    display: block;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ============================================
   ИЗ services.html
============================================ */

.service-card {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.service-image-wrapper {
    height: 180px;
    overflow: hidden;
    border-radius: 12px;
}

.service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .service-image-wrapper {
        height: 120px;
    }
}

/* ============================================
   КНОПКИ НАВИГАЦИИ (левая панель)
============================================ */

.btn-nav {
    background: rgba(20, 10, 40, 0.45) !important;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 215, 215, 0.15) !important;
    color: #f0e6ff !important;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 30px !important;
    transition: all 0.25s ease;
    text-align: center;
    display: block;
    width: 100%;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-nav:hover {
    background: rgba(255, 215, 215, 0.12) !important;
    border-color: rgba(255, 215, 215, 0.35) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.btn-nav:active {
    transform: translateY(0px);
    background: rgba(255, 215, 215, 0.08) !important;
}

/* ============================================
   ДИНАМИЧЕСКИЕ КНОПКИ УПРАВЛЕНИЯ
============================================ */

.btn-ctrl {
    background: rgba(20, 10, 40, 0.45) !important;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 215, 215, 0.15) !important;
    color: #f0e6ff !important;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 30px !important;
    transition: all 0.25s ease;
    text-align: center;
    display: block;
    width: 100%;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-ctrl:hover,
.btn-ctrl:focus,
.btn-ctrl:active {
    background: rgba(34, 197, 94, 0.6) !important;
    border-color: #4ade80 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3);
}

.btn-ctrl-danger {
    background: rgba(20, 10, 40, 0.45) !important;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 215, 215, 0.15) !important;
    color: #f0e6ff !important;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 30px !important;
    transition: all 0.25s ease;
    text-align: center;
    display: block;
    width: 100%;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-ctrl-danger:hover {
    background: rgba(220, 50, 50, 0.6) !important;
    border-color: #ff6b6b !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 50, 50, 0.3);
}

.btn-ctrl-cancel {
    background: rgba(20, 10, 40, 0.45) !important;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 215, 215, 0.15) !important;
    color: #f0e6ff !important;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 30px !important;
    transition: all 0.25s ease;
    text-align: center;
    display: block;
    width: 100%;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-ctrl-cancel:hover {
    background: rgba(255, 215, 215, 0.12) !important;
    border-color: rgba(255, 215, 215, 0.35) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* ============================================
   ЛОГОТИП
============================================ */

.logo-link {
    display: block;
    width: 100%;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    color: #6a5a8a;
    font-size: 2.5rem;
    letter-spacing: 2px;
    text-decoration: none;
}

/* ============================================
   ОГРАНИЧЕНИЕ ШИРИНЫ КОНТЕНТА
============================================ */

@media (min-width: 992px) {
    .container {
        max-width: 960px;
        margin: 0 auto;
    }
}

@media (min-width: 768px) {
    .col-md-9 {
        padding-top: 65px;
    }
}

/* ============================================
   КНОПКА-ВОРОНКА И ФИЛЬТРЫ
============================================ */

.filter-toggle {
    background: rgba(20, 10, 40, 0.45);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 215, 215, 0.15);
    color: #f0e6ff;
    border-radius: 30px;
    padding: 6px 14px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
    border: none;
}

.filter-toggle:hover {
    background: rgba(255, 215, 215, 0.12);
    border-color: rgba(255, 215, 215, 0.35);
    color: #ffffff;
}

.filter-content {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin-top: 16px;
    padding: 16px;
    background: rgba(20, 10, 40, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 215, 215, 0.15);
    border-radius: 16px;
}

.filter-content.show {
    display: flex;
}

@media (min-width: 768px) {
    .filter-content {
        display: none;
        flex-wrap: wrap;
        align-items: center;
        gap: 16px;
        width: 100%;
        margin-top: 16px;
    }

    .filter-content.show {
        display: flex;
    }
}

/* ============================================
   КНОПКА-ВОРОНКА (квадратная, без фона)
============================================ */

.filter-toggle-icon {
    background: transparent !important;
    border: none !important;
    padding: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f0e6ff;
    transition: color 0.2s ease;
    width: 56px;
    height: 56px;
    border-radius: 8px;
}

.filter-toggle-icon:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08) !important;
}

.filter-toggle-icon svg {
    stroke: currentColor;
}

/* ============================================
   ФИЛЬТРЫ (десктоп + мобилка)
============================================ */

.filter-content {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px;
    background: rgba(20, 10, 40, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 215, 215, 0.15);
    border-radius: 16px;
    margin-top: 8px;
}

.filter-content.show {
    display: flex;
}

/* Группа фильтров (на десктопе — в строку) */
.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-group .filter-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #a89bc0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Кнопки внутри групп */
.filter-group .btn-group .btn {
    font-size: 0.75rem;
    padding: 4px 12px;
}

/* ===== МОБИЛЬНАЯ ВЕРСИЯ ===== */
@media (max-width: 768px) {
    .filter-content {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 4px;
    }

    .filter-group .filter-label {
        font-size: 0.65rem;
        white-space: normal;
    }

    .filter-group .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        width: 100%;
    }

    .filter-group .btn-group .btn {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        font-size: 0.7rem;
        padding: 4px 8px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Кнопки Применить / Сбросить */
    .filter-content .d-flex.gap-2 {
        flex-direction: row;
        width: 100%;
    }

    .filter-content .d-flex.gap-2 .btn {
        flex: 1 1 50%;
        font-size: 0.8rem;
        padding: 8px 12px;
    }
}

/* ============================================
   СЕТКА КАРТИН В ФОРМЕ ПОСТА
============================================ */

.paintings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding: 4px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
}

.painting-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: rgba(0,0,0,0.02);
}

.painting-option:hover {
    background: rgba(0,0,0,0.05);
}

.painting-option input[type="checkbox"] {
    display: none;
}

.painting-option img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 6px;
}

.painting-option .painting-title {
    font-size: 0.8rem;
    text-align: center;
    color: #333;
    word-break: break-word;
}

.painting-option:has(input:checked) {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.08);
}
/* ============================================
   ПРЕВЬЮ КАРТИН В ЛЕНТЕ ПОСТОВ
============================================ */

.paintings-preview-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.painting-preview-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    width: 100px;
    transition: transform 0.2s ease;
}

.painting-preview-card:hover {
    transform: translateY(-2px);
    color: #28a745;
}

.painting-preview-card img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 4px;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.painting-preview-card:hover img {
    border-color: #28a745;
}

.painting-preview-title {
    font-size: 0.75rem;
    text-align: center;
    line-height: 1.2;
    word-break: break-word;
}