/* ==========================================================================
   1. БАННЕР (Hero Section)
   ========================================================================== */

#hero-new {
    position: relative;
    width: 100%;
    height: 85vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 0 0 50% 50% / 0 0 10% 10%;
    margin-bottom: 20px;
}

.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(13, 31, 45, 0.6) 0%, rgba(13, 31, 45, 0.1) 60%, rgba(13, 31, 45, 0) 100%);
    z-index: 2;
}

.hero-container {
    position: relative;
    z-index: 3;
}

.hero-text-content {
    max-width: 650px;
}

/* Подзаголовок */
.hero-subtitle {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-style: italic;
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 5px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
}

/* Главный заголовок */
.hero-title {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-style: italic;
    color: #ffffff;
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.0;
    margin-bottom: 30px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 4px 4px 15px rgba(0, 0, 0, 0.95), 0 0 30px rgba(0,0,0,0.6);
}

.btn-hero-gradient {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(90deg, #007bff 0%, #00d2ff 100%);
    color: #fff !important;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.4), 0 4px 10px rgba(0,0,0,0.4);
    border: 2px solid rgba(255,255,255,0.2);
}

.btn-hero-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 123, 255, 0.5), 0 6px 15px rgba(0,0,0,0.5);
}

/* ==========================================================================
   2. КАРТОЧКИ УСЛУГ (Крупные, с цветными рамками)
   ========================================================================== */

.services-new {
    background: #ffffff !important;
    padding: 20px 0 60px 0;
    margin-top: -30px;
    position: relative;
    z-index: 10;
    border-bottom: 1px solid #eef2f5;
}

.services-new .container {
    max-width: 1400px;
    padding-left: 20px;
    padding-right: 20px;
}

.service-card-new {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 24px;
    padding: 40px 35px;
    text-decoration: none !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease !important;
    height: 100%;
    min-height: 200px;
    position: relative;
    border: 2px solid transparent;
}

/* Иконки */
.icon-wrapper {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 30px;
}

.icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Текст */
.card-content-new h4 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 10px;
}

.card-content-new p {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* Стрелка */
.arrow-circle {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e6091;
    transition: all 0.3s ease;
}

.service-card-new:hover .arrow-circle {
    background: #007bff;
    color: #fff;
}

/* --- Цветные рамки и эффекты --- */
.card-blue { border-color: #007bff; box-shadow: 0 10px 30px rgba(0, 123, 255, 0.05); }
.card-blue:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 20px 40px rgba(0, 123, 255, 0.2); border-color: #0056b3; }

.card-green { border-color: #43a047; box-shadow: 0 10px 30px rgba(67, 160, 71, 0.05); }
.card-green:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 20px 40px rgba(67, 160, 71, 0.2); border-color: #2e7d32; }

.card-red { border-color: #e53935; box-shadow: 0 10px 30px rgba(229, 57, 53, 0.05); }
.card-red:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 20px 40px rgba(229, 57, 53, 0.2); border-color: #c62828; }

.card-purple { border-color: #8e24aa; box-shadow: 0 10px 30px rgba(142, 36, 170, 0.05); }
.card-purple:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 20px 40px rgba(142, 36, 170, 0.2); border-color: #6a1b9a; }

.card-red .icon-wrapper img,
.card-purple .icon-wrapper img {
    transform: scale(0.85);
}

/* ==========================================================================
   3. ШАПКА (Белая пилюля по центру)
   ========================================================================== */

#header {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99999 !important;
    background: transparent !important;
    box-shadow: none !important;
    height: 90px !important;
    padding-top: 10px !important;
    transition: none !important;
}

#header.header-scrolled {
    background: transparent !important;
    box-shadow: none !important;
    height: 90px !important;
    padding-top: 10px !important;
}

.header-pill {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #ffffff;
    border-radius: 50px;
    padding: 0 25px 0 25px !important; /* Симметричные отступы */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    margin: 0 auto;
    height: 70px !important;
    width: 95%;
    box-sizing: border-box !important;
    transition: none !important;
}

.header-logo img {
    max-height: 40px !important;
    width: auto;
    display: block;
}

.header-nav-center {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    margin: 0 20px !important;
}

/* ==========================================================================
   4. МЕНЮ (Bootstrap Dropdown)
   ========================================================================== */

#navbar .navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    height: 100% !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

#navbar .nav-item {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    position: relative;
    list-style: none;
}

#navbar .nav-link {
    color: #2c3e50 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 8px 12px !important; /* Уменьшили отступы для всех пунктов */
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    height: 100% !important;
    line-height: 1.2 !important;
    transition: color 0.2s ease !important;
    background: transparent !important;
    border: none !important;
}

#navbar .nav-link.active {
    background: #e3f2fd !important;
    border-radius: 50px !important;
    padding: 8px 16px !important; /* Отдельно для активного */
    color: #007bff !important;
    height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#navbar .nav-link:hover,
#navbar .nav-link.active {
    color: #007bff !important;
    background: transparent !important;
}

.btn-header-cabinet {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #007bff !important;
    color: #ffffff !important;
    padding: 0 20px !important;
    border-radius: 50px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    border: none !important;
    white-space: nowrap !important;
    height: 40px !important;
}

.btn-header-cabinet:hover {
    background: #0056b3 !important;
}

/* Иконки в меню (ФИКСАЦИЯ ШИРИНЫ) */
#navbar .nav-link i,
.btn-header-cabinet i {
    font-family: "Font Awesome 6 Free", sans-serif !important;
    font-weight: 900 !important;
    font-style: normal !important;
    display: inline-block !important;
    width: 16px !important; /* Фиксируем ширину иконки */
    text-align: center !important;
    font-size: 14px !important;
    color: #6c757d;
    -webkit-font-smoothing: antialiased;
}

#navbar .nav-link:hover i,
#navbar .nav-link.active i {
    color: #007bff !important;
}

/* Dropdown */
#navbar .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    display: none;
    min-width: 280px !important;
    padding: 10px 0 !important;
    margin-top: 10px !important;
    background-color: #ffffff !important;
    border: 1px solid #eef2f5 !important;
    border-radius: 12px !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15) !important;
    z-index: 9999 !important;
    list-style: none;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease !important;
}

#navbar .dropdown-menu.show,
#navbar .dropdown:hover > .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

#navbar .dropdown-item {
    display: block !important;
    padding: 12px 25px !important;
    color: #2c3e50 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    background: transparent !important;
}

#navbar .dropdown-item:hover,
#navbar .dropdown-item:focus {
    background-color: #e3f2fd !important;
    color: #007bff !important;
    padding-left: 32px !important;
    outline: none !important;
}

#navbar .dropdown-toggle::after {
    display: none !important;
}

#navbar .dropdown-toggle i.fa-chevron-down {
    font-size: 12px;
    margin-left: 6px;
    transition: transform 0.3s ease;
}

#navbar .dropdown-toggle[aria-expanded="true"] i.fa-chevron-down {
    transform: rotate(180deg);
}

/* ==========================================================================
   5. ФУТЕР
   ========================================================================== */

#footer,
footer.footer-compact {
    background: #1e6091 !important;
    color: #ffffff !important;
    border-top: none !important;
    padding-top: 40px !important;
}

#footer h4 {
    color: #ffffff !important;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    position: relative;
}

#footer h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: #4facfe;
    border-radius: 2px;
}

#footer ul li a,
#footer .contact-row a,
#footer .contact-row div {
    color: #ffffff !important;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#footer ul li a:hover,
#footer .contact-row a:hover {
    color: #4facfe !important;
    padding-left: 5px;
    text-decoration: none;
}

#footer i {
    color: #4facfe !important;
    font-size: 1.1rem;
    margin-right: 10px;
}

#footer .user-stats {
    background: rgba(255, 255, 255, 0.1) !important;
    border-left: 3px solid #4facfe !important;
    padding: 15px !important;
    border-radius: 8px !important;
}

#footer .user-stats p {
    color: #ffffff !important;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

#footer a.footer-login-link {
    background: #ffffff !important;
    color: #1e6091 !important;
    padding: 5px 12px !important;
    border-radius: 5px !important;
    font-weight: 700 !important;
    display: inline-block;
    margin-top: 5px;
    border: none !important;
}

#footer a.footer-login-link:hover {
    background: #4facfe !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

#footer .copyright-bar {
    background: #0d1f2d !important;
    color: #8fa0b5 !important;
    padding: 15px 0 !important;
    margin-top: 40px !important;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* ==========================================================================
   6. ВНУТРЕННИЕ СТРАНИЦЫ
   ========================================================================== */

body:not(.site-index) #main {
    padding-top: 100px !important;
    background-color: transparent !important;
}

body.site-index #main {
    padding-top: 0 !important;
}

body:not(.site-index) .breadcrumbs,
body:not(.site-index) .header-tops {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-top: 0 !important;
    padding: 20px 0 !important;
    min-height: auto !important;
}

body:not(.site-index) .breadcrumbs h2 {
    font-size: 24px;
    font-weight: 600;
    color: #0d1f2d;
    margin-bottom: 0;
}

body:not(.site-index) .breadcrumbs ol {
    margin-bottom: 0;
    font-size: 0.9rem;
    padding-top: 5px;
}

/* ==========================================================================
   7. СЕКЦИЯ НОВОСТЕЙ
   ========================================================================== */

section.section-bg {
    background-color: #f4f8fb !important;
    border-top: 1px solid #eef2f5;
    border-bottom: 1px solid #eef2f5;
    padding-top: 50px;
    padding-bottom: 50px;
}

section.section-bg .section-title h2 {
    color: #1e6091 !important;
    font-weight: 700 !important;
    font-size: 2rem !important;
}

section.section-bg .section-title h2::after {
    background: #007bff !important;
}

/* ==========================================================================
   8. ФИКСАЦИЯ ЦВЕТА ТЕКСТА ПРИ ПРОКРУТКЕ
   ========================================================================== */

html body header#header.header-scrolled nav#navbar ul li a {
    color: #2c3e50 !important;
}

html body header#header.header-scrolled nav#navbar ul li a.active {
    color: #007bff !important;
    background: #e3f2fd !important;
}

html body header#header.header-scrolled nav#navbar ul li a i {
    color: #6c757d !important;
}

html body header#header.header-scrolled nav#navbar ul li a.active i {
    color: #007bff !important;
}

html body header#header.header-scrolled a.btn-header-cabinet {
    background: #007bff !important;
    color: #ffffff !important;
}

/* ==========================================================================
   9. ПЛАВАЮЩИЕ КНОПКИ
   ========================================================================== */

.floating-actions {
    position: fixed !important;
    right: 30px !important;
    bottom: 90px !important;
    left: auto !important;
    top: auto !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    width: auto !important;
    height: auto !important;
}

.float-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 120px !important;
    height: 120px !important;
    border-radius: 50% !important;
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;
}

.float-btn-text {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin-bottom: 8px !important;
    white-space: normal !important;
    display: block !important;
}

.float-icon {
    width: 35px !important;
    height: 35px !important;
    object-fit: contain !important;
    display: block !important;
}

.float-icon-bi {
    font-size: 35px !important;
    display: block !important;
}

/* === АДАПТИВ ПЛАВАЮЩИХ КНОПОК ДЛЯ ЭКРАНОВ <= 1199px === */
@media (max-width: 1199px) {
    .floating-actions {
        right: 15px !important;
        bottom: 20px !important; /* Прижимаем к низу */
        gap: 10px !important;
    }

    .float-btn {
        width: 65px !important;  /* Оптимальный размер для планшетов */
        height: 65px !important;
    }

    /* Оставляем текст, но делаем его совсем маленьким, чтобы он влез в 65px */
    .float-btn-text {
        font-size: 0.55rem !important;
        margin-bottom: 2px !important;
        line-height: 1.1 !important;
        white-space: normal !important;
    }

    .float-icon {
        width: 22px !important;
        height: 22px !important;
    }

    .float-icon-bi {
        font-size: 22px !important;
    }

    /* Уменьшаем кнопку "Особистий кабінет" в шапке на планшетах */
    .btn-header-cabinet {
        padding: 0 15px !important;
        font-size: 13px !important;
        height: 36px !important;
    }
}

/* === ДЛЯ ТЕЛЕФОНОВ (<= 576px) === */
@media (max-width: 576px) {
    /* На самых узких экранах текст всё же лучше скрыть, оставив только иконки */
    .float-btn-text {
        display: none !important;
    }

    .float-btn {
        width: 55px !important;
        height: 55px !important;
    }

    .float-icon {
        width: 24px !important;
        height: 24px !important;
        margin: 0 !important;
    }

    .float-icon-bi {
        font-size: 24px !important;
        margin: 0 !important;
    }
}


.btn-viber { background-color: #7360f2 !important; box-shadow: 0 6px 20px rgba(115, 96, 242, 0.5) !important; }
.btn-viber:hover { background-color: #5a48d6 !important; box-shadow: 0 10px 30px rgba(115, 96, 242, 0.7) !important; }
.btn-contacts { background-color: #1e6091 !important; box-shadow: 0 6px 20px rgba(30, 96, 145, 0.4) !important; }
.btn-contacts:hover { background-color: #0d1f2d !important; box-shadow: 0 10px 30px rgba(13, 31, 45, 0.6) !important; }
.btn-contact-form { background-color: #0056b3 !important; box-shadow: 0 6px 20px rgba(0, 86, 179, 0.4) !important; }
.btn-contact-form:hover { background-color: #004494 !important; box-shadow: 0 10px 30px rgba(0, 68, 148, 0.6) !important; }
.btn-logout-float { background-color: #dc3545 !important; box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4) !important; }
.btn-logout-float:hover { background-color: #a71d2a !important; box-shadow: 0 10px 30px rgba(167, 29, 42, 0.6) !important; }

/* ==========================================================================
   10. ТАБЛИЦА КОНТАКТОВ
   ========================================================================== */

.contacts-wrapper {
    background: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-top: 5px solid #1e6091;
    margin-bottom: 30px;
}

.contacts-wrapper .contacts-title {
    color: #1e6091;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 25px;
    text-align: left;
}

.table-contacts {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    font-size: 0.95rem;
    background: #ffffff;
}

.table-contacts thead th {
    background-color: #f4f8fb !important;
    color: #1e6091 !important;
    font-weight: 700;
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid #eef2f5;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table-contacts tbody td {
    padding: 15px;
    border-bottom: 1px solid #eef2f5;
    vertical-align: top;
    color: #444;
    line-height: 1.5;
}

.table-contacts tbody td:first-child {
    font-weight: 700;
    color: #2c3e50;
}

.table-contacts tbody td:nth-child(3) {
    font-weight: 600;
    color: #0056b3 !important;
    white-space: nowrap;
}

.table-contacts tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.table-contacts tbody tr:hover {
    background-color: #f0f4f8;
    transition: background-color 0.2s ease;
}

.contacts-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #ccc;
    color: #555;
    line-height: 1.8;
}

.contacts-info strong {
    color: #2c3e50;
}

/* ==========================================================================
   11. АДАПТИВНОСТЬ
   ========================================================================== */

@media (max-width: 991px) {
    .hero-title { font-size: 2.5rem; }
    .services-new { margin-top: 0; }
    #header { height: 70px !important; padding-top: 10px !important; }
    .header-logo img { max-height: 35px; }
    .header-nav-center { display: none !important; }
}

@media (max-width: 768px) {
    #hero-new { height: auto; padding-top: 100px;
        padding-bottom: 100px !important;; text-align: center; }
    .hero-text-content { margin: 0 auto; }
    .services-new { padding-top: 20px; }
    .service-card-new { flex-direction: column; text-align: center; }
    .icon-wrapper { margin-right: 0; margin-bottom: 15px; }
    .arrow-circle { position: static; margin-top: 15px; }
    .header-pill { width: 100%; border-radius: 0; padding: 5px 15px !important; height: 60px !important; }
    #header { background: #ffffff !important; padding-top: 0; height: 60px !important; }
}

/* ==========================================================================
   ФИКС ПРЫЖКОВ ШРИФТОВ (FOUC)
   ========================================================================== */

/* Фиксируем ширину иконок, чтобы они не меняли размер, пока шрифт не загрузился */
i.fa-solid,
i.fa-regular,
i.bi {
    display: inline-block !important;
    width: 1.25em !important;
    text-align: center !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

/* Скрываем плавающие кнопки на всех страницах админки */
body.page-admin .floating-actions {
    display: none !important;
}

/* Скрываем кнопку мобильного меню в кабинете */
body.page-admin .mobile-nav-toggle {
    display: none !important;
}

