/*
Theme Name: Morfay Child
Theme URI: https://morfay.com/
Author: Morfay Team
Template: blocksy
Version: 1.0.0
*/

/* Імпорт стилів батьківської теми */
@import url("../blocksy/style.css");

.morfay-404 {
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.morfay-404-inner {
    max-width: 680px;
}

.morfay-404 h1 {
    margin-bottom: 1rem;
}

.morfay-404-text {
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.morfay-404-search {
    margin-bottom: 2rem;
}

.morfay-404-search input[type="search"] {
    width: 100%;
    max-width: 420px;
}

.morfay-404-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}


/* ========================================================
   MORFAY DESIGN SYSTEM
   Акцентний колір: #4F6B63 (sage green)
   ======================================================== */

/* ========================================================
   HEADER STYLES (Smart Header & Mobile Menu)
   ======================================================== */

/* 1. ГЛОБАЛЬНІ НАЛАШТУВАННЯ */
body, .site-title, .mobile-menu-list a {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}
body { padding-top: 0 !important; }

/* 2. ГОЛОВНИЙ КОНТЕЙНЕР ХЕДЕРА */
.morfay-smart-header {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    z-index: 9999;
    background-color: transparent;
    transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1), background-color 0.4s ease;
    padding: 15px 0;
}

.header-container {
    max-width: 1000px; 
    margin: 0 auto; 
    padding: 0 30px;
    display: flex; 
    align-items: center; 
    justify-content: space-between;
}

/* 3. СІТКА (ЛІВО - ЦЕНТР - ПРАВО) */
.header-left, .header-right {
    flex: 1; 
    display: flex;
}
.header-left { justify-content: flex-start; }
.header-right { justify-content: flex-end; }
.header-center {
    flex: 0 0 auto; 
    display: flex; 
    justify-content: center;
}

/* 4. ЛОГОТИП */
.logo-link {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    text-decoration: none !important;
    gap: 15px; 
}

.logo-img { 
    height: 40px; 
    width: auto; 
}

/* Кольори логотипу */
.logo-primary {
    fill: #4F6B63; /* sage green для головного елемента */
}

.logo-dark {
    fill: #333; /* темний для других елементів */
}

.site-title {
    color: #4F6B63 !important; /* sage green для назви */
    font-size: 24px !important;
    font-weight: 900 !important;
    letter-spacing: -1px;
    line-height: 1;
    text-transform: uppercase;
    text-decoration: none !important;
}

/* 5. БУРГЕР (ПРАВОРУЧ) */
.header-burger {
    background: transparent; 
    border: none; 
    cursor: pointer;
    display: flex; 
    flex-direction: column; 
    gap: 6px; 
    padding: 5px;
}
.burger-line {
    width: 30px; 
    height: 3px; 
    background-color: #333; 
    border-radius: 2px;
    transition: all 0.3s ease;
}
.header-burger:hover .burger-line { 
    background-color: #4F6B63; /* sage green на hover */
}

/* 6. СТАНИ ХЕДЕРА (СКРОЛ І ПРИХОВУВАННЯ) */
.morfay-smart-header.scrolled {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid rgba(79, 107, 99, 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    padding: 10px 0;
}

.morfay-smart-header.hidden {
    transform: translateY(-100%);
}

/* ========================================================
   ВІДЖЕТ КОНТАКТІВ
   ======================================================== */

/* Контейнер віджету */
.contact-widget {
    position: relative;
}

/* Кнопка-тригер з анімованими іконками */
.contact-trigger {
    background: transparent;
    border: 2px solid rgba(79, 107, 99, 0.3); /* sage green */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-trigger:hover {
    border-color: #4F6B63;
    background-color: rgba(79, 107, 99, 0.1);
    transform: scale(1.05);
}

/* Стек іконок */
.icon-stack {
    position: relative;
    width: 24px;
    height: 24px;
}

.contact-icon {
    position: absolute;
    top: 0;
    left: 0;
    color: #4F6B63; /* sage green */
    opacity: 0;
    transform: scale(0.8) rotate(-20deg);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.contact-icon.active {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Пульсуюча анімація для кнопки */
@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 107, 99, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(79, 107, 99, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(79, 107, 99, 0);
    }
}

.contact-trigger {
    animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

/* ========================================================
   МОДАЛЬНЕ ВІКНО КОНТАКТІВ
   ======================================================== */

.contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.contact-modal.active {
    opacity: 1;
    pointer-events: all;
}

.contact-modal-content {
    background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid rgba(79, 107, 99, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.contact-modal.active .contact-modal-content {
    transform: scale(1) translateY(0);
}

/* Кнопка закриття */
.contact-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.contact-modal-close:hover {
    background-color: rgba(79, 107, 99, 0.1);
    color: #4F6B63;
    transform: rotate(90deg);
}

/* Заголовок модального вікна */
.contact-modal-title {
    color: #4F6B63; /* sage green */
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 30px 0;
    text-align: center;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

/* Опції контактів */
.contact-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    text-decoration: none !important;
    transition: all 0.3s ease;
    cursor: pointer;
}

.contact-option:hover {
    background: rgba(79, 107, 99, 0.1);
    border-color: #4F6B63;
    transform: translateX(5px);
}

/* Іконки контактів */
.contact-option-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(79, 107, 99, 0.1);
    color: #4F6B63;
    transition: all 0.3s ease;
}

.contact-option:hover .contact-option-icon {
    transform: scale(1.1);
    background: rgba(79, 107, 99, 0.2);
}

/* Кольорові іконки для месенджерів */
.contact-option-icon.telegram {
    background: rgba(36, 161, 222, 0.15);
    color: #24a1de;
}

.contact-option:hover .contact-option-icon.telegram {
    background: rgba(36, 161, 222, 0.25);
}

.contact-option-icon.whatsapp {
    background: rgba(37, 211, 102, 0.15);
    color: #25d366;
}

.contact-option:hover .contact-option-icon.whatsapp {
    background: rgba(37, 211, 102, 0.25);
}

/* Текст контактів */
.contact-option-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.contact-option-label {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

.contact-option-action {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

.contact-option:hover .contact-option-action {
    color: #4F6B63;
}

/* ========================================================
   МОБІЛЬНЕ МЕНЮ (ШТОРКА)
   ======================================================== */

.mobile-menu {
    position: fixed; 
    top: 0; 
    right: -100%;
    width: 100%; 
    max-width: 400px; 
    height: 100vh;
    background-color: #0d0d0d; 
    z-index: 99999;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex; 
    flex-direction: column; 
    border-left: 1px solid #333;
}
.mobile-menu.active { right: 0; }

.mobile-menu-inner { 
    padding: 40px; 
    overflow-y: auto; 
    height: 100%; 
}

.menu-close { 
    background: none; 
    border: none; 
    cursor: pointer; 
    margin-bottom: 30px; 
    display: block; 
    margin-left: auto; 
}

.mobile-menu-list { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}

.mobile-menu-list li { 
    margin-bottom: 15px; 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
}

.mobile-menu-list a { 
    display: block; 
    font-size: 22px; 
    color: #fff !important; 
    text-decoration: none; 
    padding: 10px 0; 
    transition: all 0.3s ease; 
}

.mobile-menu-list a:hover { 
    color: #4F6B63 !important; 
    padding-left: 10px; 
}

.mobile-menu-list .current-menu-item > a { 
    color: #4F6B63 !important; 
    font-weight: bold; 
}

.mobile-menu::before { 
    content: ''; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    background: rgba(0,0,0,0.8); 
    opacity: 0; 
    pointer-events: none; 
    transition: opacity 0.4s ease; 
    z-index: -1; 
}

.mobile-menu.active::before { 
    opacity: 1; 
    pointer-events: all; 
}

/* ========================================================
   АДАПТАЦІЯ ПІД МОБІЛЬНИЙ
   ======================================================== */

@media (max-width: 900px) {
    .site-title { font-size: 18px !important; }
    .header-container { padding: 0 15px; }
    .logo-img { height: 35px; }
    
    .contact-trigger {
        width: 45px;
        height: 45px;
    }
    
    .contact-modal-content {
        padding: 30px 20px;
        max-width: 95%;
    }
    
    .contact-modal-title {
        font-size: 22px;
        margin-bottom: 25px;
    }
    
    .contact-option {
        padding: 15px;
    }
    
    .contact-option-icon {
        width: 45px;
        height: 45px;
    }
    
    .contact-option-label {
        font-size: 16px;
    }
}

@media (max-width: 600px) {
    .site-title {
        font-size: 14px !important;
        letter-spacing: -0.5px;
    }
    
    .logo-link {
        gap: 10px;
    }
}

/* ========================================================
   FOOTER STYLES (Blocksy Theme Override)
   ======================================================== */

footer.ct-footer {
    width: 100% !important;
}

footer.ct-footer .ct-container,
footer.ct-footer .ct-container-fluid {
    max-width: 1000px !important;
    margin: 0 auto !important;
    padding-left: 30px !important;
    padding-right: 30px !important;
}

footer.ct-footer [data-row] {
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 30px !important;
    padding-right: 30px !important;
    align-items: center !important; 
}

footer.ct-footer [data-column="middle"] {
    align-items: center !important; 
    justify-content: center !important;
}

@media (max-width: 900px) {
    footer.ct-footer .ct-container,
    footer.ct-footer .ct-container-fluid,
    footer.ct-footer [data-row] {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* ========================================================
   UTILITY: CONTENT CONTAINERS
   ======================================================== */

.content-core {
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
    background-color: transparent;
}

.content-wide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ========================================================
   TYPOGRAPHY SYSTEM
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=Roboto+Mono:wght@500;700&display=swap');

h1 {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: clamp(40px, 8vw, 72px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0 0 24px 0;
}

h2 {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: clamp(32px, 6vw, 56px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: #fff;
    margin: 0 0 20px 0;
}

h3 {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    margin: 0 0 16px 0;
}

h4 {
    font-family: 'Inter', sans-serif;
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 600;
    line-height: 1.4;
    color: #4F6B63; /* sage green для акцентів */
    margin: 0 0 12px 0;
}

p, .text-body {
    font-family: 'Inter', sans-serif;
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 400;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

/* ========================================================
   UI COMPONENTS - BUTTONS
   ======================================================== */

/* Скидання стилів теми */
.wp-block-button,
.btn-sage,
.btn-minimal {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    border: none !important;
}

/* Спільна геометрія */
.btn-sage .wp-block-button__link,
.btn-minimal .wp-block-button__link,
.wp-block-button__link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    font-weight: 800 !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    text-align: center !important;
    
    border-radius: 50px !important;
    padding: 18px 30px !important;
    border: none !important;
    
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    z-index: 1 !important;
    
    box-shadow: none !important; 
    line-height: 1.2 !important;
}

/* ВАРІАНТ "SAGE" (Основна кнопка) */
.btn-sage .wp-block-button__link,
.wp-block-button__link {
    background: #4F6B63 !important; /* sage green */
    color: #ffffff !important;
    box-shadow: 0 5px 15px rgba(79, 107, 99, 0.2) !important;
}

.btn-sage:hover .wp-block-button__link,
.wp-block-button__link:hover {
    background: #3f5954 !important; /* трохи темніший sage */
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 25px rgba(79, 107, 99, 0.4) !important;
}

/* ВАРІАНТ "MINIMAL" (Чорна з акцентною рамкою) */
.btn-minimal .wp-block-button__link {
    background-color: transparent !important;
    color: #4F6B63 !important;
    border: 2px solid #4F6B63 !important;
}

.btn-minimal:hover .wp-block-button__link {
    background-color: #4F6B63 !important;
    color: #ffffff !important;
    box-shadow: 0 5px 20px rgba(79, 107, 99, 0.3) !important;
}

/* ========================================================
   ANIMATIONS
   ======================================================== */

/* Плавна поява знизу */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Зум-ефект */
@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Класи-тригери */
.anim-up, 
.anim-zoom {
    opacity: 0;
    will-change: opacity, transform;
}

.anim-up.viewed {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.anim-zoom.viewed {
    animation: zoomIn 0.8s ease-out forwards;
}

/* Затримки */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-500 { animation-delay: 0.5s; }
.delay-1000 { animation-delay: 1.0s; }

/* Плавний скрол */
html {
    scroll-behavior: smooth;
}

/* Кастомний скролбар з sage green */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #1a2226; }
::-webkit-scrollbar-thumb { background: #4F6B63; border-radius: 1px; }
::-webkit-scrollbar-thumb:hover { background: #3f5954; }

/* Примусове центрування */
.force-center {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    text-align: center !important;
}

/* ========================================================
   СПИСКИ З ГАЛОЧКАМИ (SAGE GREEN)
   ======================================================== */

ul.list-check-sage {
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

ul.list-check-sage li {
    display: flex !important;
    align-items: flex-start !important;
    gap: 15px !important;
    margin-bottom: 12px !important;
    margin-left: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

ul.list-check-sage li::before {
    content: '' !important;
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234F6B63' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    margin-top: 2px !important;
}
