* {
    font-family: 'Roboto', sans-serif !important;
}

.btns-wrap {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.project-page-hero {
    position: relative;
    width: 100%;
    height: calc(100vh - 60px);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Убираем фоновое изображение ТОЛЬКО если внутри есть видео */
.project-page-hero:has(video) {
    background: none !important;
}

.project-page-hero video,
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Стили для видео в контенте и галерее */
.content-image video,
.gallery-image video {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-image video:hover,
.gallery-image video:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Скрываем контролы видео для автопроигрывания */
.content-image video::-webkit-media-controls,
.gallery-image video::-webkit-media-controls,
.hero-video::-webkit-media-controls {
    display: none !important;
}

/* Убираем все элементы управления */
.content-image video::-webkit-media-controls-panel,
.gallery-image video::-webkit-media-controls-panel,
.hero-video::-webkit-media-controls-panel {
    display: none !important;
}

/* Адаптивность для мобильных устройств */
@media screen and (max-width: 768px) {
    .project-page-hero {
        height: 50vh;
    }

    .content-image video,
    .gallery-image video {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .project-page-hero {
        height: 50vh;
    }
}

.hero-btn-primary,
.hero-btn-secondary {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 3px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    display: inline-block;
    text-align: center;
    min-width: 180px;
    border: 4px;
}

.hero-btn-primary {
    background: #fbfbfc;
    color: white;
    border: 4px solid #fbfbfc;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.25);
}

.hero-btn-secondary {
    background: transparent;
    color: #fbfbfc;
    border: 4px solid #fbfbfc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Анимация при наведении */
.hero-btn-primary:hover {
    animation: pulsePrimary 1.5s infinite;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.4);
}

.hero-btn-secondary:hover {
    animation: pulseSecondary 1.5s infinite;
    transform: translateY(-3px);
    background: rgba(0, 102, 204, 0.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Анимация при нажатии */
.hero-btn-primary:active,
.hero-btn-secondary:active {
    transform: translateY(1px) scale(0.98);
    transition: all 0.1s ease;
}

/* Эффект пульсации для основной кнопки */
@keyframes pulsePrimary {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(0, 102, 204, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 102, 204, 0);
    }
}

/* Эффект пульсации для вторичной кнопки */
@keyframes pulseSecondary {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.2);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(0, 102, 204, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 102, 204, 0);
    }
}

/* Эффект волны при клике */
.hero-btn-primary::after,
.hero-btn-secondary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;

    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.hero-btn-primary:active::after,
.hero-btn-secondary:active::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.8;
    }

    100% {
        transform: scale(50, 50);
        opacity: 0;
    }
}

/*
    Переменные для белой/темной темы. Root - белая тема. 
    Все стили делайте в белой теме (root), при смене темы все само поменяется. 
    Если нужны какие-то новые цвета, то в root вставляйте новые переменные,
    а затем создаете такую же переменную в медиа-запрос с темным вариантом цвета.
    Для вставки переменной используется команда var(--clr-dark). 
    Вместо "--clr-dark" ставим нужную переменную из Root.
*/
:root {
    --clr-bg: #fff;
    --clr-text: #000;
    --clr-color-1: #fff;
    --clr-color-2: #000;
    --clr-grey: #444;
    --clr-invert: invert(0%);
    --clr-rgba: rgba(0, 0, 0, 0.75);
}

.modal-content {
    background-color: var(--clr-bg);
    color: var(--clr-text);
}

/* Базовые стили для таблиц */

.sp5 {
    padding: 20px;
    transition: all 0.3s ease;
    /* Плавная анимация */
    border: 2px solid transparent;
    /* Прозрачная граница */
}

.sp5:hover {
    border-color: var(--clr-text) !important;
    /* Цвет контура */
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.3);
    /* Дополнительный эффект свечения */
}

table {

    --clr-border: #ddd;
    /* цвет границ */


    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    color: var(--clr-text) !important;
}

/* Стили для ячеек */
th,
td {
    padding: 0.75rem;
    border: 1px solid var(--clr-border);
    vertical-align: top;
    text-align: left;
    color: inherit !important;
    /* наследует цвет от таблицы */
}

/* Стили для заголовков */
thead th {
    background-color: var(--clr-header-bg);
    font-weight: 600;
    color: inherit !important;
}

/* Стили для подзаголовков в объединённых ячейках */
tr th[colspan],
tr th[rowspan] {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Стили для полосатого эффекта */
tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Специфичные стили для вложенных элементов */
table a,
table strong,
table em {
    color: inherit !important;
    /* наследование цвета текста */
}

/* Анимации для изображений */
.content-image:hover,
.gallery-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.content-image,
.gallery-image {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --clr-bg: #171717;
        --clr-text: #fff;
        --clr-color-1: #000;
        --clr-color-2: #fff;
        --clr-grey: #444;
        --clr-invert: invert(100%);
        --clr-rgba: rgba(255, 255, 255, 0.75);
    }
}

section-item ul,
li {
    color: var(--clr-text) !important;
}

/* Стили для спецраздела */
.special-sections {
    color: var(--clr-text) !important;
}

.special-sections h2,
.special-sections h3,
.special-sections h5 {
    color: var(--clr-text) !important;
}

.special-sections p {
    color: var(--clr-text) !important;
}

.special-sections ul,
.special-sections li {
    color: var(--clr-text) !important;
}

.special-sections .conclusion {
    color: var(--clr-text) !important;
}

/* Стили для текста "Проекты будут добавлены" */
.text-muted {
    color: var(--clr-text) !important;
    opacity: 0.7;
}

.sp4 {
    color: var(--clr-text) !important;
    position: relative;
    text-decoration: none;
    display: inline-block;
    /* Для корректного позиционирования */
}

.sp4::after {
    content: '';
    position: absolute;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--clr-text) !important;
    transition: width 0.3s ease;
}



/* Нижняя линия */
.sp4::after {
    bottom: -5px;
    /* Отступ от текста снизу */
}

/* Анимация при наведении */

.project-card-preview:hover .sp4::after {
    width: 100%;
}






.sp3 {
    color: var(--clr-text) !important;
    position: relative;
    text-decoration: none;
    display: inline-block;
    /* Для корректного позиционирования */
}

.sp3::before,
.sp3::after {
    content: '';
    position: absolute;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--clr-text) !important;
    transition: width 0.3s ease;
}

/* Верхняя линия */
.sp3::before {
    top: -5px;
    /* Отступ от текста сверху */
}

/* Нижняя линия */
.sp3::after {
    bottom: -5px;
    /* Отступ от текста снизу */
}

/* Анимация при наведении */

.project-card-preview:hover .sp3::before,
.project-card-preview:hover .sp3::after {
    width: 100%;
}

.sp {
    color: var(--clr-text) !important;
    position: relative;
    text-decoration: none;
}

.sp::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0px;
    width: 0;
    height: 1px;
    background-color: var(--clr-text) !important;
    transition: width 0.3s ease;
}

/* Активация подчёркивания при ховере на карточку */
.project-card-preview:hover .sp::after {
    width: 100%;
}

/* Активация эффекта увеличения изображения */
.project-card-preview:hover .zoom-image {
    transform: scale(1.3);
    transition: transform 0.3s ease;
}

.project-card-preview:hover .sp2 {
    text-decoration: underline;
}

.sp:hover::after {
    width: 100%;
}

/* Базовый стиль для изображения */
.zoom-image {
    transition: transform 0.3s ease;
}

.sp2 {
    color: var(--clr-text) !important;
    text-decoration: none;
}

.sp2:hover {

    text-decoration: underline;
}

/* подсказка при копировании */
.email-container {
    position: relative;
    cursor: pointer;
}

.tooltip-custom {
    position: absolute;
    left: 100px;
    bottom: 30px;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: .75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
}

.email-container:hover .tooltip-custom {
    opacity: 1;
    visibility: visible;
}


/* Дополнительные стили которые были изменены для ~корректной смены темы */

body {
    background: var(--clr-bg) !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.navbar-brand img,
.me-3,
.rating-wrap img,
.navbar-toggler-icon {
    filter: var(--clr-invert) !important;
}

.img-container img {
    filter: none !important;
}

.img-container {
    overflow: hidden;
}

.project-wrap {
    overflow: hidden;
}

.zoom-image {
    transition: transform 0.3s ease;
}

.zoom-image:hover {
    transform: scale(1.2);
}

.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6,
p,
b,
span,
label,
textarea::placeholder,
.form-control {
    color: var(--clr-text) !important;
}

.hero-content h1,
.hero-content p {
    color: #fff !important;
}

textarea,
.mb-4 input {
    background: var(--clr-bg) !important;
}

/* Конец */

a {
    text-decoration: none;
    color: var(--clr-text) !important;
}

.container {
    max-width: 1681px;
}

.navbar {
    height: 60px;
    padding: 0px;
}

.nav-link {
    color: var(--clr-text) !important;
}



.bg-body-tertiary {
    background-color: var(--clr-bg) !important;
}

.navbar-toggler {
    outline: none !important;
    box-shadow: none !important;
    border-width: 0px !important;
    border: none !important;
    padding: 0px !important;
}

.navbar-toggler:focus,
.navbar-toggler:active,
.navbar-toggler:hover {
    outline: none !important;
    box-shadow: none !important;
}

.drop-menu {
    z-index: 20 !important;
    background-color: var(--clr-bg) !important;
}

.fixed-header-wrap {
    width: 100%;
    background-color: var(--clr-bg) !important;
    border-bottom: 1px solid var(--clr-color-2) !important;
    z-index: 10;
}

.mobile-drop-menu {
    border-bottom: 1px solid var(--clr-color-2) !important;
    z-index: -1;
}

/* Позиционируем псевдоэлементы для создания крестика */
.navbar-toggler {
    position: relative;
}

.navbar-toggler .navbar-toggler-icon {
    transition: opacity 0.3s ease;
    /* Плавное исчезновение стандартной иконки */
}

/* Создаем крестик с помощью псевдоэлементов */
.navbar-toggler::before,
.navbar-toggler::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--clr-color-2) !important;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    /* Скрываем крестик по умолчанию */
    transition: all 0.3s ease;
}

/* Поворачиваем псевдоэлементы для создания крестика */
.navbar-toggler::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.navbar-toggler::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Анимация при открытом меню */
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    opacity: 0;
    /* Прячем стандартную иконку */
}

.navbar-toggler[aria-expanded="true"]::before,
.navbar-toggler[aria-expanded="true"]::after {
    opacity: 1;
    /* Показываем крестик */
}


/* Герой-секция */

.h1 {
    font-weight: bold;
    font-size: 3.5rem;
}

.h2 {
    font-weight: 400;
    font-size: 2.5rem;
}

.h4 {
    font-weight: 400;
    font-size: 2rem;
}

.h5 {
    font-weight: 400;
    font-size: 1.5rem;
}

.h6 {
    font-weight: 400;
    font-size: 1.25rem;
}

.p-title {
    font-size: 1.125rem;
}

.hero {
    height: calc(100vh - 72px);
    width: 100%;
    color: var(--clr-color-1) !important;
    position: relative;
}

.carousel {
    position: absolute;
    width: 100%;
    height: calc(100vh - 60px);
}

.carousel-inner,
.carousel-item {
    height: 100%;
}

.carousel-image {
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.carousel-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #444444af !important;
    /* background-color: var(--clr-grey) !important; */
}

.hero .container {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #444444af !important;
    /* background-color: var(--clr-grey) !important;  */
}

.hero-content {
    position: relative;
    z-index: 0;
}

.hero h1 {
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.125rem;
}

/* Остальной контент */
.content {
    padding: 20px;
    background-color: #f9f9f9 !important;
    /* background-color: var(--clr-color-1) !important; */
}

.btns-wrap {
    padding-top: 20px;
}

.hero-btn-primary {
    padding: 12px 24px;
    /* color: var(--clr-text) !important; */
    background: var(--clr-bg) !important;
    border: 1px solid var(--clr-bg) !important;
    font-size: 16px;
}

.hero-btn-secondary {
    padding: 12px 24px;
    color: #fff !important;
    background: #ffffff00 !important;
    border: 1px solid var(--clr-bg) !important;
    font-size: 16px;

}

.hero-btn-primary-black {
    color: var(--clr-color-1) !important;
    background: var(--clr-color-2) !important;
    border: 1px solid var(--clr-bg) !important;
}

.hero-btn-secondary-black {
    color: var(--clr-color-2) !important;
    background: #ffffff00 !important;
    border: 1px solid var(--clr-bg) !important;
}

.page-block {
    padding: 100px 0px 50px 0px;
}

.page-block-img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.project-description-row {
    row-gap: 2rem;
}

@media (min-width: 992px) {
    .project-description-row {
        align-items: stretch;
    }

    .project-description-media {
        display: flex;
    }

    .project-description-media-item {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
}

@media (max-width: 991px) {
    .project-description-media-item {
        width: 100%;
        height: auto;
        object-fit: cover;
    }
}

.project-card-preview {
    color: var(--clr-color-2) !important;
}

.project-card-preview img,
.project-card-preview video {
    height: 240px;
    object-fit: cover;
    width: 100%;
    display: block;
    /* Важно для удаления отступов */
    transition: transform 0.3s ease;
    /* Для плавного зума */
}

.advantages-wrap {
    border-left: 2px solid var(--clr-color-2) !important;
    margin-bottom: 25px;
}

.advantage-title {
    font-size: 4.375rem;
}

.review-user img {
    width: 57px;
    height: 57px;
    object-fit: cover;
    border-radius: 100%;
}

.footer-wrap-container {
    border-top: 1px solid var(--clr-color-2) !important;
    padding: 19px 0px;
}

.small-title {
    font-size: 0.875rem;
}

.contact-form-input {
    border-radius: 0px;
    border-color: var(--clr-rgba) !important;
}

.contact-form-checkbox {
    width: 20px;
    height: 20px;
}

.contact-form-input:focus {
    border-color: var(--clr-rgba) !important;
    box-shadow: none;
}

.projects-list-img {
    object-fit: cover;
}

.project-wrap {
    border-top: 1px solid var(--clr-color-2) !important;
    padding: 40px 0px;
    margin: 0px 10px;
}

/* страница проекта */

.project-page-hero {

    height: calc(100vh - 60px);
    width: 100%;
    background-size: cover;
    background-position: center;
}

.gallery-image {
    height: 450px;
    width: 100%;
    object-fit: cover;

}

.project-page-block-img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.onimage-wrap {
    position: relative;
    overflow: hidden;
}

.onimage-text {
    position: absolute;
    bottom: 0;
    /* Размещаем текст внизу */
    left: 0;
    right: 0;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    /* Полупрозрачный фон для лучшей читаемости */
    color: white;
    margin: 0;
    z-index: 2;
    /* Убедимся, что текст выше изображения */
}

@media screen and (max-width: 1156px) {
    .advantage-title {
        font-size: 3.5rem;
    }
}

@media screen and (max-width: 650px) {
    .h1 {
        font-size: 2.5rem;
    }

    .h2 {
        font-size: 2rem;
    }

    .h4 {
        font-size: 1.5rem;
    }

    .h5 {
        font-size: 1.25rem;
    }

    .h6 {

        font-size: 1.125rem;
    }


    .hero p {
        font-size: 1rem;
    }

    .p-title {
        font-size: 1rem;
    }
}