/*
Theme Name: English Center Theme
Theme URI: https://example.com/english-center-theme
Author: Алексей
Author URI: https://example.com
Description: Сучасна тема для освітнього центру на базі Bootstrap 5.
Version: 1.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: english-center
Tags: education, bootstrap5, modern, responsive
*/


:root {
    /* --- Основна палітра --- */
    --primary-color: #003366;       
    --primary-hover: #002244;       
    --accent-color: #FF6B00;        /* Помаранчевий */
    --accent-hover: #e65100;        
    
    /* --- Текст та фони --- */
    --text-dark: #2C2C2C;           
    --text-muted: #6c757d;          
    --bg-light: #F8F9FA;            
    --bg-white: #ffffff;
    --border-color: #dee2e6;

    /* --- Типографіка --- */
    --font-main: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* --- Налаштування компонентів --- */
    --border-radius-lg: 1rem;       
    --border-radius-sm: 0.5rem;
    --box-shadow-sm: 0 .125rem .25rem rgba(0,0,0,.075);
    --box-shadow-hover: 0 10px 20px rgba(0,0,0,0.12);
    --transition-base: all 0.3s ease-in-out;
}

/* =========================================
   2. БАЗОВІ СТИЛІ
   ========================================= */
html, body {
    height: 100%;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.site-content {
    flex: 1 0 auto;
}

/* Загальний стиль заголовків */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

p {
    margin-bottom: 1.5rem;
}

/* Утиліти кольорів */
.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.text-accent { color: var(--accent-color) !important; }
.bg-accent { background-color: var(--accent-color) !important; }
.bg-light { background-color: var(--bg-light) !important; }

/* =========================================
   3. КНОПКИ (BUTTONS)
   ========================================= */
.btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 50rem;
    transition: var(--transition-base);
    text-decoration: none !important;
}

.btn-accent {
    background-color: var(--accent-color);
    border: 2px solid var(--accent-color);
    color: #fff;
}

.btn-accent:hover, .btn-accent:focus, .btn-accent:active {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.25);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

/* Кнопка "Контакти" на Hero Section */
.hero-section .btn-outline-light:hover {
    color: var(--primary-color);
    background-color: #fff;
    border-color: #fff;
}

/* =========================================
   4. КАРТКИ (CARDS)
   ========================================= */
.card {
    border-radius: var(--border-radius-lg);
    border: none;
    background-color: var(--bg-white);
    transition: var(--transition-base);
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover) !important;
}

.card-img-top {
    border-top-left-radius: var(--border-radius-lg);
    border-top-right-radius: var(--border-radius-lg);
}

.object-fit-cover {
    object-fit: cover;
}

/* =========================================
   5. ХЕДЕР (HEADER)
   ========================================= */
.site-header {
    background-color: var(--primary-color); 
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    z-index: 1030;
}

.navbar-brand {
    font-family: var(--font-main);
    font-weight: 800;
    color: #fff !important; 
}

.navbar-nav .nav-item .nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 1rem 0.8rem !important;
    position: relative;
    transition: opacity 0.3s ease;
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-nav .nav-item .nav-link:hover {
    color: #fff !important;
    opacity: 1;
}

/* Анімація підкреслення */
@media (min-width: 992px) {
    .navbar-nav .nav-item .nav-link::after {
        content: '';
        position: absolute;
        bottom: 5px;
        left: 50%;
        width: 0;
        height: 2px;
        background-color: var(--accent-color);
        transition: all 0.3s ease-in-out;
        transform: translateX(-50%);
        opacity: 0;
    }

    .navbar-nav .nav-item .nav-link:hover::after,
    .navbar-nav .nav-item.current-menu-item .nav-link::after {
        width: 80%;
        opacity: 1;
    }
}

/* Мобільне меню */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: #fff; 
        padding: 1.5rem 1rem;
        margin-top: 1rem;
        border-radius: 1rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    }
    
    .navbar-collapse .nav-link {
        color: var(--text-dark) !important; 
        padding: 0.5rem 0 !important;
    }

    .header-actions {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(0,0,0,0.05);
    }
    .header-actions .btn-cta-header {
        width: 100%;
    }
}

/* =========================================
   6. ФУТЕР (FOOTER)
   ========================================= */
.site-footer {
    font-size: 0.95rem;
    flex-shrink: 0; 
}

.site-footer a {
    transition: opacity 0.3s ease;
    text-decoration: none;
}

.site-footer a:hover {
    opacity: 0.7;
    text-decoration: underline !important;
}

.site-footer ul li {
    margin-bottom: 0.5rem;
}

.site-footer .bi {
    transition: transform 0.2s;
}
.site-footer a:hover .bi {
    transform: scale(1.1);
}

/* =========================================
   7. СТИЛІ ГОЛОВНОЇ СТОРІНКИ (CUSTOM SECTIONS)
   ========================================= */

/* --- Hero Section --- */
.hero-section {
    position: relative;
    color: #fff !important; 
}
.hero-section h1, .hero-section h2, .hero-section h3, 
.hero-section p, .hero-section .lead {
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2); 
}
.animate-fade-in {
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}
@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}


/* --- Декоративна рамка (Секція 2: Дистанційне навчання) --- */
.img-frame-decoration {
    padding: 20px;
    position: relative;
    display: inline-block;
}
.img-frame-decoration::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 90%; 
    height: 90%;
    border: 3px solid var(--accent-color); /* Помаранчева рамка */
    border-radius: 2rem;
    z-index: 0;
}
.img-frame-decoration img {
    position: relative;
    z-index: 1;
    border-radius: 1.5rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    margin-top: 25px; /* Зсув від рамки */
    margin-right: 25px;
}


/* --- Секція з великим текстом (Секція 3: Як ми це робимо) --- */
.position-relative { position: relative; }
.opacity-05 { opacity: 0.05; }
.opacity-10 { opacity: 0.1; }

.video-card-wrapper {
    transition: transform 0.3s ease;
}
.video-card-wrapper:hover {
    transform: translateY(-5px);
}
/* Пульсуюча кнопка Play */
.video-card-wrapper .btn-accent {
    animation: pulse-orange 2s infinite;
}
@keyframes pulse-orange {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 0, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 107, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 0, 0); }
}


/* --- Квадратні іконки (Секція 4: Чому ми) --- */
.square-feature-card {
    transition: all 0.3s ease;
}
.icon-square {
    width: 110px;
    height: 110px;
    border: 3px solid #b0d4f1; /* Світло-блакитна рамка */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #b0d4f1;
    transition: all 0.4s ease;
    margin: 0 auto 1.5rem auto;
}

/* Ефект при наведенні: рамка стає помаранчевою і крутиться */
.square-feature-card:hover .icon-square {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: rotate(45deg);
    background-color: rgba(255, 107, 0, 0.05);
}
.square-feature-card:hover .icon-square i {
    transform: rotate(-45deg); /* Іконка залишається рівно */
}
.square-feature-card i { transition: transform 0.4s ease; }


/* =========================================
   8. WORDPRESS CORE & WIDGETS
   ========================================= */
.aligncenter { display: block; margin: 0 auto; }
.alignright { float: right; margin: 0 0 1em 1em; }
.alignleft { float: left; margin: 0 1em 1em 0; }
img { max-width: 100%; height: auto; }

/* Пагінація */
.pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 5px;
}
.page-numbers {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    color: var(--primary-color);
    text-decoration: none;
}
.page-numbers.current, .page-numbers:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Сайдбар */
@media (min-width: 992px) {
    .sticky-top { top: 100px; z-index: 1020; }
}

/* Віджети */
.widget { margin-bottom: 2rem; }
.widget-title {
    font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem;
    color: var(--primary-color); border-bottom: 2px solid var(--accent-color);
    display: inline-block; padding-bottom: 5px;
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: 0.5rem 0; border-bottom: 1px solid rgba(0,0,0,0.05); }
.widget ul li a { color: var(--text-dark); }
.widget ul li a:hover { color: var(--accent-color); }

/* Пошук */
.search-form { display: flex; gap: 0.5rem; }
.search-form .search-field {
    width: 100%; padding: 0.5rem 1rem; border: 1px solid #ced4da; border-radius: 50rem;
}
.search-form .search-submit {
    background-color: var(--primary-color); color: #fff; border: none;
    padding: 0.5rem 1rem; border-radius: 50rem; cursor: pointer;
}

/* =========================================
   9. CONTACT FORM 7
   ========================================= */
.contact-form-modern {
    background: #fff;
    border: 1px solid #e0e0e0;
}

.wpcf7-form-control-wrap {
    display: block;
    margin-bottom: 1rem;
    position: relative;
}

/* Сучасні поля форми (трохи квадратніші, як на скріншоті) */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea,
.wpcf7 select {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--text-dark);
    background-color: #f9f9f9; /* Світло-сірий фон полів */
    border: 1px solid #e0e0e0;
    border-radius: 0.3rem; /* Менше скруглення */
    transition: all 0.2s ease-in-out;
}

.wpcf7 input:focus, .wpcf7 textarea:focus {
    border-color: var(--primary-color);
    background-color: #fff;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.wpcf7 textarea { resize: vertical; min-height: 120px; }

/* Кнопка форми */
.wpcf7 input[type="submit"] {
    display: inline-block;
    font-weight: 700;
    text-align: center;
    padding: 0.9rem 2rem;
    font-size: 1.1rem;
    border-radius: 50rem;
    transition: var(--transition-base);
    cursor: pointer;
    width: 100%;
    background-color: #ff0000; /* Червоний колір з вашого скріншоту */
    border: none;
    color: #fff;
    margin-top: 1rem;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.wpcf7 input[type="submit"]:hover {
    background-color: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

/* Повідомлення CF7 */
.wpcf7-not-valid-tip { color: #dc3545; font-size: 0.85em; margin-top: 0.25rem; }
.wpcf7-response-output { 
    border-radius: 0.5rem; padding: 1rem !important; margin: 1rem 0 !important; border: none !important; 
}

/* =========================================
   10. КОМЕНТАРІ (COMMENTS)
   ========================================= */
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-body {
    background: #fff; padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow-sm);
}
.comment-meta { margin-bottom: 1rem; font-size: 0.9rem; color: var(--text-muted); }
.fn { font-weight: bold; font-style: normal; font-size: 1.1rem; color: var(--primary-color); margin-right: 0.5rem; }
.reply { margin-top: 1rem; }
.comment-reply-link { font-size: 0.875rem; font-weight: 600; text-decoration: none; }

.comment-respond {
    background: var(--bg-light); padding: 2rem;
    border-radius: var(--border-radius-lg); margin-top: 3rem;
}
.comment-form label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.comment-form input, .comment-form textarea {
    width: 100%; padding: 0.75rem; border: 1px solid #ced4da;
    border-radius: 0.5rem; margin-bottom: 1rem;
}
.form-submit .submit {
    background-color: var(--primary-color); color: #fff; border: none;
    padding: 0.75rem 2rem; border-radius: 50rem; cursor: pointer; font-weight: 600;
}