/*
Theme Name:   TCSavant Child Theme
Theme URI:    https://tcsavant.com
Description:  Дочірня тема для TCSavant з кастомними функціями та шаблонами
Author:       TCSavant Team
Author URI:   https://tcsavant.com
Template:     hello-elementor
Version:      1.0.5
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  tcsavant-child
*/

/* 
 * Базові стилі батьківської теми завантажуються через functions.php
 * Тут можна додавати додаткові стилі для перевизначення
 */
/* ============================================================
 * OVERRIDE: Виправлення шрифтів з батьківської теми
 * Батьківська тема Hello Elementor встановлює системні шрифти
 * Перевизначаємо їх для збереження оригінального стилю сайту
 * ============================================================ */

/* Reset шрифтів для всього сайту */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 700;
    line-height: 1.3;
    color: inherit;
}

/* Параграфи та текст */
p, span, div, a, li, td, th {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Кнопки */
button, input, select, textarea {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Elementor елементи */
.elementor-widget-text-editor,
.elementor-widget-heading,
.elementor-widget-button,
.elementor-element {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Перевизначення для кастомних сторінок */
.page-courses,
.single-courses,
.page-blog-archive {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* ============================================================
 * Промо-банер з таймером
 * ============================================================ */
.promo-banner {
    color: #fff;
    padding: 14px 40px;
    font-size: 15px;
    position: relative;
    z-index: 1000;
}

.promo-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    position: relative;
}

.promo-text {
    display: flex;
    align-items: center;
    gap: 0;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
}

.promo-icon {
    display: none;
}

.promo-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 6px;
}

.timer-icon {
    display: none;
}

.promo-close {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    padding: 0;
    line-height: 1;
}

.promo-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.promo-btn {
    background: #fff;
    color: #FF8C00;
    border: none;
    padding: 8px 24px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.promo-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .promo-banner {
        padding: 8px 30px 8px 8px;
    }
    
    .promo-content {
        flex-direction: row;
        gap: 8px;
        text-align: left;
        justify-content: flex-start;
    }
    
    .promo-text {
        font-size: 12px;
        font-weight: 600;
    }
    
    .promo-timer {
        display: none !important;
    }
    
    .promo-btn {
        width: auto;
        padding: 6px 12px;
        font-size: 12px;
        white-space: nowrap;
    }
    
    .promo-close {
        right: 5px;
        width: 20px;
        height: 20px;
        font-size: 14px;
    }
}

/* ============================================================
 * Contact Dropdown в хедері
 * ============================================================ */
.contact-dropdown {
    position: relative;
    margin: 0 10px;
}

.contact-toggle {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.3s;
}

.contact-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.contact-toggle svg {
    width: 24px;
    height: 24px;
}

.contact-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 12px;
    min-width: 260px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

/* Відкривається при hover на батьківському елементі */
.contact-dropdown:hover .contact-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.contact-dropdown-menu[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.contact-item:last-of-type {
    border-bottom: none;
    margin-bottom: 8px;
}

.contact-item svg {
    color: #F1BD54;
    flex-shrink: 0;
}

.contact-item a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: #F1BD54;
}

.contact-form-btn {
    width: 100%;
    background: #F1BD54;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.contact-form-btn:hover {
    background: #FF8C00;
    transform: translateY(-2px);
}

/* ============================================================
 * Contact Form Modal
 * ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-container {
    background: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 24px;
}

.callback-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group .required {
    color: #ff4444;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #FFB400;
}

.privacy-checkbox {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}

.privacy-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.privacy-checkbox label {
    font-weight: normal;
    font-size: 13px;
    line-height: 1.4;
}

.privacy-checkbox label a {
    color: #FFB400;
    text-decoration: none;
}

.privacy-checkbox label a:hover {
    text-decoration: underline;
}

.submit-btn {
    background: #FFB400;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-btn:hover:not(:disabled) {
    background: #FF8C00;
    transform: translateY(-2px);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-message {
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    .contact-dropdown {
        margin: 0 2px;
    }
    
    .contact-toggle {
        padding: 6px;
    }
    
    .contact-toggle svg {
        width: 20px;
        height: 20px;
    }
    
    .contact-dropdown-menu {
        right: -20px;
    }
}
