/*
 Theme Name:   Bricks Child
 Description:  Custom child theme for tamdedim.com
 Author:       Your Name
 Template:     bricks
 Version:      1.0.0
*/
/* ==========================================================================
   0. ГЛОБАЛЬНІ ЗМІННІ
   ========================================================================== */
:root {
    --color-accent: #9f6f3d;
}
/* ==========================================================================
   1. СИСТЕМНІ ТА АНІМАЦІЇ
   ========================================================================== */

/* Анімація каскадної появи карток */
@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.animate-card {
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}



/* ==========================================================================
   2. КАРТКИ ЖК ТА ПРОЄКТІВ (УНІВЕРСАЛЬНІ КЛАСИ)
   ========================================================================== */

.zhk-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background-color: #fff;
    border-radius: 24px;
}

/* Стилізація акцентної (2-ї) картки в сітці */
.project-grid .zhk-card:nth-child(2) { 
    background: #1d1d20 !important; 
    color: #ffffff !important; 
}
.project-grid .zhk-card:nth-child(2) h4 { 
    color: #ffffff !important; 
}
.project-grid .zhk-card:nth-child(2) .card-button { 
    border: 1px solid #4c4c52 !important; 
    color: #ffffff !important; 
}
.project-grid .zhk-card:nth-child(2) .card-button:hover { 
    border-color: #ffffff !important; 
}
.project-grid .zhk-card:nth-child(2) .card-item-price { 
    color: #9f6f3d !important; 
}

/* Зображення та обгортки */
.card-image-wrapper { 
    padding: 8px; 
}

.card-image-wrapper-box { 
    padding: 0 5px; 
}

.card-image {
    width: 100%;
    height: 220px;
    border-radius: 24px;
    object-fit: cover;
}

.card-image img {
    border-radius: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    animation: fadeIn 0.4s ease-in;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-img {
    animation: fadeIn 0.4s ease-in;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);    
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.zhk-card:hover .card-image img {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Анімація для нових карток, що з'являються через AJAX */
.zhk-card, .archive-card {
    animation: cardAppear 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) backwards;
}

/* Ефект "каскадної" появи для перших 8 карток */
.zhk-card:nth-child(1n) { animation-delay: 0.1s; }
.zhk-card:nth-child(2n) { animation-delay: 0.2s; }
.zhk-card:nth-child(3n) { animation-delay: 0.3s; }
.zhk-card:nth-child(4n) { animation-delay: 0.4s; }

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Текстові елементи картки */
.card-title { 
    font-size: 24px; 
}

.card-address { 
    font-size: 12px; 
}

.card-item-price { 
    font-size: 12px; 
    font-weight: 600; 
    color: var(--color-accent); 
}

.card-item-status {
    padding: 0 5px;
    color: #8a909b;
    font-size: 12px;
    font-weight: 600;
    background-color: #f1f2f3;
    border-radius: 5px;
}

.card-content-trigger { 
    padding: 0 10px 12px 10px; 
}

/* Статус-лейбл поверх картинки (плашка) */
.card-image-wrapper-label {
    position: absolute !important;
    top: 20px; 
    left: 20px; 
    z-index: 10;
    background-color: #2d344a; 
    border-radius: 50px;
    padding: 2px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.card-image-wrapper-label span,
.card-image-wrapper-label a {
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   3. КНОПКИ ТА ІНТЕРАКТИВ
   ========================================================================== */

/* Кнопка "Переглянути" (всередині картки) */
.card-button {
    width: 100% !important;
    margin-top: 10px !important;
    border: 1px solid #cfd0d2 !important;
    border-radius: 12px !important;
    padding: 5px 0 !important;
    background-color: transparent !important;
    color: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.card-button:hover {
    color: #9f6f3d !important;
    border-color: #9f6f3d !important;
    background-color: rgba(159, 111, 61, 0.05) !important;
}

/* Кнопка "Показати ще" (пагінація) */
.custom-buttom {
    position: relative !important;
    padding: 13px 28px;
    cursor: pointer;
    align-self: center;
    color: #1d1d1f;
    background-color: #ffffff;
    border: 1px solid #cfd0d2;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.custom-buttom:hover { 
    color: var(--color-accent); 
    border: 1px solid var(--color-accent); 
}

/* Анімація завантаження для кнопок */
.custom-buttom.custom-loading, 
.custom-buttom.waiting { 
    color: transparent !important; 
    pointer-events: none; 
}

.custom-buttom.custom-loading::after,
.custom-buttom.waiting::after {
    content: "";
    position: absolute;
    top: 50%; 
    left: 50%;
    width: 20px; 
    height: 20px;
    border: 2px solid rgba(59, 91, 219, 0.2);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: custom-spin 0.8s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes custom-spin {
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Базові стилі кнопки */
.est-navi-block, 
#est-navi__opener {
    display: none !important;
}
.est-navi__button {    
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    background-color: var(--color-accent);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 97, 255, 0.2);
}

/* Анімація при наведенні */
.est-navi__button:hover {
    background-color: #9f6f3d;
    transform: translateY(-3px); /* Легке підняття вгору */
    box-shadow: 0 8px 25px rgba(143, 90, 36, 0.4);
}

/* Кнопка проєктів з ефектом "блиску" (Shine effect) */
.est-navi__button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.est-navi__button:hover::after {
    left: 100%;
}

/* Анімація при натисканні */
.est-navi__button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 97, 255, 0.2);
}
/* Неактивна шахівниця */
.est-navi__button-deactive {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    background-color: #aaaaaa;
    color: #818181;
    font-weight: 600;
    font-size: 16px;
    border-radius: 12px;
    border: none;
    text-decoration: none;
    position: relative;
    overflow: visible;
    cursor: not-allowed;
}
/* Tooltip */
.est-navi__button-deactive::after {
    content: "Планування відсутнє";
    position: absolute;
    left: 50%;
    bottom: calc(100% + 16px);

    padding: 10px 16px;
    border-radius: 12px;

    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    color: #1a1a1a;
    font-size: 13px;
    font-weight: 500;

    border: 1px solid rgba(0,0,0,0.06);

    box-shadow:
        0 10px 30px rgba(0,0,0,0.08),
        0 4px 12px rgba(0,0,0,0.04);

    transform: translateX(-50%) translateY(10px) scale(0.92);
    opacity: 0;
    filter: blur(6px);

    pointer-events: none;
    z-index: 99999;

    transition:
        transform 0.35s cubic-bezier(.16,1,.3,1),
        opacity 0.25s ease,
        filter 0.3s ease;
}

.est-navi__button-deactive:hover::after {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 1;
    filter: blur(0);
}

.est-navi__button-deactive:hover::before {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}


/* Плеєр-кнопка (для відео/турів) */
.player-button {
    position: absolute;
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px; 
    height: 60px;
    border-radius: 50%;
    background-color: #2d56da;
    color: #ffffff;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    z-index: 5;
    border: none;
}

.player-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: #1a41c2;
    box-shadow: 0 0 20px rgba(45, 86, 218, 0.4);
}

.player-button i, 
.player-button svg { 
    font-size: 24px; 
    margin-left: 3px; 
}

/* Скляна кнопка (Glassmorphism) */
.glass-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    color: white;
    padding: 10px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.glass-btn:hover { 
    background: rgba(255, 255, 255, 0.3); 
    box-shadow: 0 6px 40px rgba(0, 0, 0, 0.2); 
}

.glass-label-gradient {
  background: linear-gradient(
    90deg,
    #0d58f7 0%,
    #5d31d1 100%
  );

  padding: 3px 8px;
  border-radius: 10px;

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.glass-label {
    /* 1. Напівпрозорий білий фон (налаштуйте останню цифру 0.2 для прозорості) */
    background: rgba(255, 255, 255, 0.2);
  	padding: 3px 8px;
  	border-radius: 10px;
    
    /* 2. Ефект розмиття заднього фону (Ключовий момент) */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Для підтримки Safari */
}

/* ==========================================================================
   4. СЛУЖБОВІ КЛАСИ
   ========================================================================== */

.single-word-city {
    font-weight: 800;
    color: #9f6f3d;
    border-bottom: 5px solid #9f6f3d;
}

/* =========================================================
   СТИЛІ ДЛЯ POPUP ВІКОН
   ========================================================= */
/* =========================================================
   1. ФОН ТА ОСНОВНА ОБГОРОТКА (BACKDROP)
   ========================================================= */

.brx-popup-backdrop {
    transition: opacity 0.4s ease-in-out !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.popup-section {
    padding: 0 !important;	
}

.brx-popup-content {
    padding: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    pointer-events: none;
}

@keyframes popupFadeIn {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--color-accent); 
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

/* Коректний розмір хрестика всередині */
.modal-close.brxe-icon,
.modal-close svg,
.modal-close i {
    font-size: 20px;
    width: 40px;
    height: 40px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    box-shadow: 0 10px 15px -5px rgba(0, 0, 0, 0.3);
}

/* --- НАЛАШТУВАННЯ ФУТЕРА --- */

/* --- ЗАГАЛЬНІ СТИЛІ СЕКЦІЇ --- */
.tdd-footer {
    background-color: #fff;
    padding: 80px 0 40px;
    border-top: 1px solid #eee;
}

/* --- CTA КАРТКИ (ВЕРХНЯ ЧАСТИНА) --- */
.footer-cta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.cta-card {
    background: #f8f9fb;
    padding: 24px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    transition: all 0.3s ease;
}

.cta-card:hover {
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.cta-text { font-size: 15px; color: #1a1a1a; font-weight: 500; line-height: 1.4; }
.cta-actions { display: flex; gap: 10px; width: 100%; }

.btn-action {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    background: #fff !important;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #1a1a1a;
    text-decoration: none;
}

.btn-action:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* --- ГОЛОВНА СІТКА НАВІГАЦІЇ (ДЕСКТОП) --- */
.footer-nav-grid {
    display: grid;
    grid-template-columns: 4fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-nav-grid-child {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* --- СТИЛІ КОЛОНОК ТА АКОРДЕОНІВ --- */
.footer-column {
    display: flex;
    flex-direction: column;
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.column-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
}

/* Списки посилань */
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links .title {
    color: #666;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-block;
}
.footer-links li:hover .title {
    color: var(--color-accent);
    transform: translateX(5px);
}

/* --- СПЕЦІАЛЬНІ КАРТКИ (ПРАВА ЧАСТИНА) --- */
.special-links { display: flex; flex-direction: column; gap: 15px; width: 100%; }

.special-item {
    background: var(--color-accent);
    padding: 24px;
    border-radius: 24px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.special-item h5 { color: #fff; }
.special-item:last-child { background: #1a1a1a; } /* Камера Live */

.special-item:hover {
    transform: translateY(-5px);
}

.special-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.special-header h5 { margin: 0; font-size: 16px; font-weight: 700; }
.special-desc { font-size: 13px; opacity: 0.9; line-height: 1.4; }

.dot-live { color: #93ff30; font-size: 8px; animation: blink 1.5s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* --- ФУТЕР БОТТОМ (КОНТАКТИ ТА ЛОГО) --- */
.footer-bottom {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    margin-bottom: 40px;
    padding-top: 10px;
}

.contact-info { display: flex; flex-direction: column; gap: 5px; }
.contact-label { font-size: 12px; color: #666; }
.contact-phone { font-size: 20px; font-weight: 700; color: #1a1a1a; text-decoration: none; }

/* --- СОЦІАЛЬНІ МЕРЕЖІ --- */
.social-list {
    display: flex;
    flex-direction: row;
    gap: 12px; 
    align-items: center;
    justify-content: flex-end; /* Вирівнювання вправо на десктопі */
}

.social-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: #f5f7fa; 
    border-radius: 12px; 
    color: #1a1a1a;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.social-icon {
    font-size: 20px;
    transition: all 0.3s ease;
}

.social-item:hover {
    background-color: var(--color-accent);
    color: #ffffff;
    transform: translateY(-4px);
}

.social-item:hover .social-icon {
    transform: scale(1.1);
}

.social-item:active {
    transform: translateY(-1px);
}

.footer-legal { display: flex; flex-direction: row; gap: 20px; margin-top: 20px; align-items: center; justify-content: center; }
.logo-footer { height: 45px; width: auto; }
.legal-text { font-size: 13px; color: #999; line-height: 1.6; }


/* ============================================================
   МЕДІА-ЗАПИТИ (АДАПТИВНІСТЬ)
   ============================================================ */

/* --- ДЛЯ ВЕЛИКИХ ЕКРАНІВ (> 992px) --- */
@media (min-width: 992px) {
    .column-header {
        margin-bottom: 20px;
        cursor: default;
    }
    .column-header i { display: none !important; }
    .column-content { display: block !important; }
}

/* --- ДЛЯ МОБІЛЬНИХ ПРИСТРОЇВ (< 991px) --- */
@media (max-width: 991px) {
    .footer-cta-grid { grid-template-columns: 1fr; }
    
    .footer-nav-grid {
        display: flex;
        flex-direction: column;
        gap: 30px;
        margin-bottom: 20px;
    }

    /* Вигляд карти для акордеонів */
    .footer-nav-grid-child {
        display: flex;
        flex-direction: column;
        background: #fff;
        border: 1px solid #eef0f2;
        border-radius: 24px;
        overflow: hidden;
        width: 100%;
        gap: 0px;
    }

    .footer-column { border-bottom: 1px solid #eef0f2; }
    .footer-column:last-child { border-bottom: none; }

    .column-header {
        padding: 20px 24px !important;
        cursor: pointer;
        user-select: none;
    }

    .column-header h4, .column-header i { pointer-events: none; }
    .column-header h4 { font-size: 16px; font-weight: 600; }

    .column-header i {
        display: block !important;
        font-size: 18px;
        color: #999;
        transition: all 0.3s ease;
    }

    /* Анімація розгортання */
    .column-content {
        display: grid !important;
        grid-template-rows: 0fr;
        transition: all 0.3s ease;
        overflow: hidden;
    }

    .footer-links-inner {
        min-height: 0;
        padding: 0 24px;
        opacity: 0;
        transition: all 0.3s ease;
    }

    /* Стан при відкритті */
    .footer-column.is-open .column-content { grid-template-rows: 1fr; }
    .footer-column.is-open .footer-links-inner { padding-bottom: 24px; opacity: 1; }
    .footer-column.is-open h4, .footer-column.is-open i { color: var(--color-accent); }
    .footer-column.is-open i { transform: rotate(90deg); }

    .social-list {
        justify-content: center;
        margin-top: 10px;
    }

    .footer-bottom { flex-direction: column; text-align: center; gap: 10px; margin-bottom: 20px; }
    .footer-legal { flex-direction: row; flex-wrap: nowrap; align-items: center; }
}


/* ==========================================================================

	5. СИСТЕМА ФІЛЬТРАЦІЇ

	========================================================================== */
.my-filtre {
	 display: inline-flex !important;
	 flex-wrap: nowrap !important;
	 background-color: #ffffff;
	 padding: 4px;
	 border-radius: 12px;
	 box-shadow: 0 4px 12px rgba(0,0,0,0.08);
	 list-style: none !important;
	 margin: 0;
	 gap: 5px;

}
.my-filtre li {
	 margin: 0 !important;
	 padding: 0 !important;
	 display: flex !important;
}
.my-filtre label {
	 display: flex;
	 align-items: center;
	 justify-content: center;
	 padding: 10px 24px;
	 cursor: pointer;
	 border-radius: 10px;
	 font-size: 15px;
	 font-weight: 500;
	 color: #666;
	 background: transparent;
	 white-space: nowrap;
	 user-select: none;
	 -webkit-tap-highlight-color: transparent;
	 transition: all 0.2s ease-in-out;
}
/* Ховаємо інпути */
.my-filtre input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.my-filtre .brx-input-indicator {
  display: none !important;
}
/* Ефект при наведенні на неактивні елементи */
.my-filtre label:hover {
	 background-color: #f3f3f3;
	 color: #333;
}
/* --- АКТИВНИЙ СТАН (Виправлено) --- */
/* Bricks додає клас .brx-option-active до li або використовує :checked */
.my-filtre li.brx-option-active label,
.my-filtre input:checked + label {
	 background-color: #2d344a !important;
	 color: #ffffff !important;
	 font-weight: 600;
	 box-shadow: 0 2px 6px rgba(143, 90, 36, 0.2);
}
/* Вимикаємо ховер для активного стану, щоб не блимало */
.my-filtre li.brx-option-active label:hover,
.my-filtre input:checked + label:hover {
	 background-color: var(--color-accent) !important;
	 color: #ffffff !important;
	 cursor: default;
}
