/********** Template CSS **********/
:root {
    --primary: #9300ff;
    /* Changed from #413b47 to neon purple */
    --secondary: #0B2154;
    --light: #F2F2F2;
    --dark: #111111;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

/* --- Global Purple Theme Overrides --- */
.text-primary {
    color: #9300ff !important;
}

/* Animated gradient text effect for premium headings */
.text-gradient {
    background: linear-gradient(45deg, #ffffff, #9300ff, #ffffff);
    background-size: 200% auto;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    animation: gradient-shift 4s linear infinite;
    text-shadow: none !important;
}

@keyframes gradient-shift {
    100% {
        background-position: 200% center;
    }
}

.bg-primary {
    background-color: #9300ff !important;
}

.border-primary {
    border-color: #9300ff !important;
}

.btn-primary {
    background-color: #9300ff !important;
    border-color: #9300ff !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #7900d3 !important;
    border-color: #7900d3 !important;
    box-shadow: 0 0 0 0.5rem rgba(147, 0, 255, 0.4) !important;
    transform: scale(1.02);
}

.btn-outline-primary {
    color: #9300ff !important;
    border-color: #9300ff !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: #9300ff !important;
    color: #ffffff !important;
    transform: scale(1.02);
}

/* Pulsing neon effect for primary buttons */
.btn-primary {
    position: relative;
}

.btn-primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    z-index: -1;
    pointer-events: none;
}

@keyframes pulse-primary {
    0% {
        box-shadow: 0 0 0 0 rgba(147, 0, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(147, 0, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(147, 0, 255, 0);
    }
}

.btn-primary:not(:hover)::before {
    animation: pulse-primary 3s infinite;
}

/* Shine effect for buttons with .btn-shine class */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(30deg);
    transition: 0.5s;
    animation: shine-effect 4s infinite;
    pointer-events: none;
}

@keyframes shine-effect {
    0% {
        left: -60%;
    }

    20% {
        left: 120%;
    }

    100% {
        left: 120%;
    }
}

/* Add a very subtle blur/glow to primary colored text for a premium feel on black */
.text-primary {
    text-shadow: 0px 2px 15px rgba(147, 0, 255, 0.4);
}

/* --- Global Typography & Premium Dark Theme Enhancements --- */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0.3px;
    line-height: 1.6;
}

h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4,
h5,
.h5,
h6,
.h6 {
    color: #ffffff !important;
    letter-spacing: 0.5px;
    font-weight: 700;
}

p,
.text-body,
.text-muted {
    color: #c0c0c0 !important;
    font-size: 1.05rem;
}

.text-uppercase {
    letter-spacing: 1.5px;
}

/* Add a very subtle blur/glow to primary colored text for a premium feel on black */
.text-primary {
    text-shadow: 0px 2px 15px rgba(147, 0, 255, 0.4);
}

/* --- Carousel Customization --- */
/* Restrict text width to prevent touching the side arrows */
.carousel-caption .col-10 {
    max-width: 80% !important;
}

@media (min-width: 992px) {
    .carousel-caption .col-lg-7 {
        max-width: 60% !important;
    }
}

/* Move arrows to the very edges to prevent text overlap */
.carousel-control-prev {
    left: 0 !important;
    width: 60px !important;
    justify-content: center !important;
    padding-left: 0 !important;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
}

.carousel-control-next {
    right: 0 !important;
    width: 60px !important;
    justify-content: center !important;
    padding-right: 0 !important;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
}

/* .fаmedium: делает шрифт жирным */
.fаmedium {
    font-weight: 600 !important;
}

/* Accordion Dark Theme Overrides */
.accordion-item {
    background-color: #0b0b0b !important;
    border: 1px solid rgba(147, 0, 255, 0.2) !important;
}

.accordion-button {
    background-color: #0b0b0b !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(147, 0, 255, 0.1) !important;
    color: var(--primary) !important;
}

.accordion-button::after {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.accordion-button:not(.collapsed)::after {
    filter: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%239300ff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-body {
    background-color: #0b0b0b !important;
    color: #c0c0c0 !important;
    border-top: 1px solid rgba(147, 0, 255, 0.2);
}

/* .back-to-top: кнопка возврата на верх страницы (отображается снизу справа) */
.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}

@media (max-width: 768px) {
    .back-to-top {
        right: 20px;
        bottom: 85px;
        /* Move up to prevent overlapping mobile bottom bars/buttons */
    }
}

/* #spinner: экран загрузки (крутящийся круг), пока страница не загрузилась */
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

/* #language-screen: черный экран при первом входе, где нужно выбрать язык */
#language-screen {
    position: fixed;
    /* Приклеиваем к экрану */
    top: 0;
    left: 0;
    width: 100vw;
    /* На всю ширину */
    height: 100vh;
    /* На всю высоту */
    background-color: #000000 !important;
    /* Белый фон, чтобы перекрыть сайт */
    display: flex;
    /* Центрируем содержимое */
    justify-content: center;
    align-items: center;
    z-index: 99999;
    /* ОЧЕНЬ высокий слой, чтобы перекрыть всё */
}

/* .lang-container: красивая коробочка по центру с выбором языка */
.lang-container {
    text-align: center;
    background: #191C24 !important;
    /* Был #f8f9fa. Ставим темно-серый цвет темы */
    border: 1px solid #333;
    /* Тонкая рамка */
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    /* Тень */
}

.lang-container h1 {
    color: #ffffff !important;
    margin-bottom: 30px;
    font-size: 24px;
}

/* Кнопки */
.buttons button {
    padding: 15px 40px;
    margin: 10px;
    font-size: 18px;
    cursor: pointer;
    background-color: #9300ff;
    color: white;
    border: none;
    border-radius: 5px;
    transition: 0.3s;
    font-weight: bold;
}

.buttons button:hover {
    background-color: #7900d3;
    /* Темнее при наведении */
}

/* .btn: базовый класс для всех стандартных кнопок */
.btn {
    font-weight: 500;
    text-transform: uppercase;
    transition: .5s;
}

.btn.btn-primary,
.btn.btn-secondary {
    color: #FFFFFF;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

/* .btn-square, .btn-sm-square, .btn-lg-square: делают квадратные кнопки (используется для иконок соц. сетей) */
.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    border-radius: 2px;
}


/* .navbar: стили шапки сайта с меню навигации */
.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar-light .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 25px 0;
    color: #FFFFFF;
    font-size: 15px;
    text-transform: uppercase;
    outline: none;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary);
}

@media (max-width: 991.98px) {
    .navbar-light .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar-light .navbar-nav {
        border-top: 1px solid rgba(147, 0, 255, 0.2);
        background-color: var(--dark);
        padding: 15px;
        border-radius: 10px;
        margin-top: 10px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    }
}

.navbar-light .navbar-brand,
.navbar-light a.btn {
    height: 75px;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--dark);
    font-weight: 500;
}

.navbar-light.sticky-top {
    top: 0px;
    transition: .5s;
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}

/* Custom Dropdown Colors for Dark Theme */
.dropdown-menu {
    background-color: #000000 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.dropdown-item {
    color: #c0c0c0 !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}


/* .carousel-caption: полупрозрачный темный фон поверх картинок в главном слайдере */
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .7);
    z-index: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 10%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
}

@media (max-width: 768px) {
    #header-carousel .carousel-item {
        position: relative;
        min-height: 450px;
    }

    #header-carousel .carousel-item img {
        height: 150px !important;
        /* Задаем фиксированную высоту. Можете изменить на 500px или 700px */
        width: 100%;
        /* Ширина всегда во весь экран */
        object-fit: cover;
        /* Самое важное: обрезает лишнее, сохраняя пропорции */
        object-position: center;
        /* Картинка центрируется */
    }
}

.page-header {
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.page-header-inner {
    background: rgba(0, 0, 0, .7);
}

.breadcrumb-item+.breadcrumb-item::before {
    color: var(--light);
}


/* .fact: фоновое изображение для блока со статистикой (15 лет опыта, 7 экспертов и т.д.) */
.fact {
    background: linear-gradient(rgba(0, 0, 0, .6), rgba(0, 0, 0, .6)), url(http://devoscar.lviv.ua/img/bg_stats.png);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}


/* .service .nav .nav-link: стили кнопок-вкладок в секции услуг */
.service .nav .nav-link {
    background: #000000;
    /* Темно-серый (черный) фон */
    color: #FFFFFF;
    /* Белый текст */
    transition: 0.5s;
    /* Плавность смены цвета */
}

.service .nav .nav-link.active {
    background: var(--primary);
}

.service .nav .nav-link.active h4 {
    color: #FFFFFF !important;
}


/* .booking: фон для секции "Заказать звонок / Контакты" */
.booking {
    background: linear-gradient(rgba(0, 0, 0, .6), rgba(0, 0, 0, .6)), url(http://devoscar.lviv.ua/img/bg_contact.png) center center no-repeat;
    background-size: cover;
}

.bootstrap-datetimepicker-widget.bottom {
    top: auto !important;
}

.bootstrap-datetimepicker-widget .table * {
    border-bottom-width: 0px;
}

.bootstrap-datetimepicker-widget .table th {
    font-weight: 500;
}

.bootstrap-datetimepicker-widget.dropdown-menu {
    padding: 10px;
    border-radius: 2px;
}

.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover {
    background: var(--primary);
}

.bootstrap-datetimepicker-widget table td.today::before {
    border-bottom-color: var(--primary);
}


/* .team-overlay: выезжающий блок с иконками соц-сетей при наведении на фото сотрудника */
.team-item .team-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    transform: scale(0);
    transition: .5s;
}

.team-item:hover .team-overlay {
    transform: scale(1);
}

.team-item .team-overlay .btn {
    color: var(--primary);
    background: #FFFFFF;
}

.team-item .team-overlay .btn:hover {
    color: #FFFFFF;
    background: var(--secondary)
}


/* .testimonial-carousel: стили для сдвигающегося слайдера с отзывами клиентов */
.testimonial-carousel .owl-item .testimonial-text,
.testimonial-carousel .owl-item.center .testimonial-text * {
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-text {
    background: var(--primary) !important;
}

.testimonial-carousel .owl-item.center .testimonial-text * {
    color: #FFFFFF !important;
}

.testimonial-carousel .owl-dots {
    margin-top: 24px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 15px;
    height: 15px;
    border: 1px solid #CCCCCC;
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    background: var(--primary);
    border-color: var(--primary);
}


/* .footer: настройки черного фона и картинок для самого низа страницы */
.footer {
    background: #000000 !important;
}

.footer .btn.btn-social {
    margin-right: 5px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    border: 1px solid #FFFFFF;
    border-radius: 35px;
    transition: .3s;
}

.footer .btn.btn-social:hover {
    color: var(--primary);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .copyright {
    padding: 25px 0;
    font-size: 15px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: var(--light);
}

.footer .footer-menu a {
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, .3);
}

.footer .footer-menu a:last-child {
    margin-right: 0;
    padding-right: 0;
    border-right: none;
}

/* .hover-animate: эффект поднятия элемента и тени при наведении мышки (для карточек услуг) */
.hover-animate {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: transform, box-shadow;
}

.hover-animate:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(147, 0, 255, 0.25) !important;
    border-color: #9300ff !important;
    z-index: 2;
}

/* Ускоряем WOW.js: убираем долгие задержки при скролле для максимальной динамики */
.wow {
    animation-duration: 0.8s !important;
}

/* Ограничиваем максимальную задержку до очень быстрой (сохраняем эффект лесенки, но без долгой пустоты) */
.wow[data-wow-delay="0.1s"] {
    animation-delay: 0.05s !important;
}

.wow[data-wow-delay="0.3s"] {
    animation-delay: 0.1s !important;
}

.wow[data-wow-delay="0.5s"] {
    animation-delay: 0.15s !important;
}

.wow[data-wow-delay="0.7s"] {
    animation-delay: 0.2s !important;
}

.wow[data-wow-delay="0.8s"] {
    animation-delay: 0.2s !important;
}

.wow[data-wow-delay="0.9s"] {
    animation-delay: 0.2s !important;
}

/* .img-zoom-hover: эффект красивого плавного приближения картинки при наведении (для блока "DVC Довірся фахівцям") */
.img-zoom-hover {
    overflow: hidden;
}

.img-zoom-hover img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.img-zoom-hover:hover img {
    transform: scale(1.1);
}

/* .btn-shine effect is now defined at the top of the file for infinite animation */

.fact-item {
    transition: all 0.3s ease;
}

.fact-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transform: translateY(-5px);
}

/* ============================================================== 
 * Мобільна Адаптація (Mobile Responsiveness)
 * ============================================================== */
@media (max-width: 768px) {

    /* Зменшуємо величезні заголовки на телефонах */
    .display-1 {
        font-size: 2.5rem !important;
    }

    .display-2 {
        font-size: 2.2rem !important;
    }

    .display-3 {
        font-size: 1.8rem !important;
    }

    .display-4 {
        font-size: 1.5rem !important;
    }

    /* Зменшуємо загальні відступи для контейнерів, щоб контент вміщувався */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .px-5 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .mt-5 {
        margin-top: 2rem !important;
    }

    .mb-5 {
        margin-bottom: 2rem !important;
    }

    /* Фікси для форм зв'язку і блоків */
    .contact-form input,
    .contact-form textarea {
        width: 100% !important;
    }

    /* Адаптація чорних інформаційних блоків (bg-black) */
    .bg-black.p-5 {
        padding: 1.5rem !important;
    }

    /* Адаптація каруселі тексту - вирівнювання і розміри */
    #header-carousel .carousel-caption {
        padding: 0 15px;
        text-align: center;
    }

    #header-carousel h1,
    #header-carousel h6 {
        margin-bottom: 10px !important;
    }

    /* Ховаємо зайві елементи меню або верхнього бару на малих екранах якщо вони переповнюють екран */
    .topbar .col-lg-4,
    .topbar .col-lg-8 {
        text-align: center !important;
        justify-content: center !important;
    }
}

/* Tablet Safari / iPad Portrait Fix for fact items missing labels due to flexbox breaking */
@media (min-width: 768px) and (max-width: 991.98px) {

    .fact-item h2,
    .fact-item p {
        width: 100%;
        display: block;
        text-align: center;
    }

    .fact-item {
        padding: 1.5rem !important;
    }
}

/* ============================================================ */
/* LIGHTBOX FOR GALLERY                                         */
/* ============================================================ */
.gallery-item {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
}

#lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

#lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

#lightbox-content img,
#lightbox-content video {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 5px;
    box-shadow: 0 0 30px rgba(147, 0, 255, 0.3);
}

#lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    transition: color 0.3s;
}

#lightbox-close:hover {
    color: #9300ff;
}

/* ============================================================ */
/* OWL CAROUSEL SIDE NAVIGATION                                 */
/* ============================================================ */
.dynamic-gallery-container {
    position: relative;
    padding: 0 50px;
    /* Допомагає кнопкам не перекривати фото */
}

.dynamic-gallery-container .owl-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    left: 0;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    z-index: 10;
}

.dynamic-gallery-container .owl-prev,
.dynamic-gallery-container .owl-next {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.6) !important;
    border-radius: 50% !important;
    width: 50px;
    height: 50px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease !important;
    border: 1px solid #9300ff !important;
    margin: 0 -25px !important;
    /* Виносимо за межі слайдера */
}

.dynamic-gallery-container .owl-prev:hover,
.dynamic-gallery-container .owl-next:hover {
    background: #9300ff !important;
    box-shadow: 0 0 20px rgba(147, 0, 255, 0.6);
}

.dynamic-gallery-container .owl-prev i,
.dynamic-gallery-container .owl-next i {
    color: #fff !important;
    font-size: 1.5rem !important;
    margin: 0 !important;
}

/* Красивіші точки пагінації */
.dynamic-gallery-container .owl-dots {
    margin-top: 30px !important;
    text-align: center;
}

.dynamic-gallery-container .owl-dot span {
    background: rgba(255, 255, 255, 0.2) !important;
    width: 10px !important;
    height: 10px !important;
    transition: all 0.3s ease;
}

.dynamic-gallery-container .owl-dot.active span {
    background: #9300ff !important;
    width: 30px !important;
    /* Робимо активну точку довшою */
}

@media (max-width: 768px) {
    .dynamic-gallery-container {
        padding: 0 15px;
    }

    .dynamic-gallery-container .owl-nav {
        top: auto;
        bottom: -60px;
        /* На мобільних можна залишити знизу або приховати */
        position: relative;
        transform: none;
        justify-content: center;
        gap: 20px;
        margin-top: 20px;
    }

    .dynamic-gallery-container .owl-prev,
    .dynamic-gallery-container .owl-next {
        margin: 0 !important;
        width: 40px;
        height: 40px;
    }
}