/********** Template CSS **********/
:root {
    --primary: #13C5DD;
    --secondary: #354F8E;
    --light: #EFF5F9;
    --dark: #1D2A4D;
}

.btn {
    font-weight: 700;
    transition: .5s;
}

.btn:hover {
    -webkit-box-shadow: 0 8px 6px -6px #555555;
    -moz-box-shadow: 0 8px 6px -6px #555555;
    box-shadow: 0 8px 6px -6px #555555;
}

.btn-primary {
    color: #FFFFFF;
}

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

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

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

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 0;
    border-radius: 50% 0 0;
    z-index: 99;
}

.navbar-light .navbar-nav .nav-link {
    font-family: 'Jost', sans-serif;
    position: relative;
    margin-left: 30px;
    padding: 30px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    outline: none;
    transition: .5s;
}

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

@media (min-width: 992px) {
    .navbar-light .navbar-nav .nav-link::before {
        position: absolute;
        content: "";
        width: 0;
        height: 5px;
        bottom: 0;
        left: 50%;
        background: var(--primary);
        transition: .5s;
    }

    .navbar-light .navbar-nav .nav-link:hover::before,
    .navbar-light .navbar-nav .nav-link.active::before {
        width: 100%;
        left: 0;
    }
}

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

.hero-header {
    background: url(../img/hero.jpg) top right no-repeat;
    background-size: cover;
}

.service-item {
    position: relative;
    height: 350px;
    padding: 0 30px;
    transition: .5s;
}

.service-item .service-icon {
    width: 150px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border-radius: 50%;
    transform: rotate(-14deg);
}

.service-item .service-icon i {
    transform: rotate(15deg);
}

.service-item a.btn {
    position: absolute;
    width: 60px;
    bottom: -48px;
    left: 50%;
    margin-left: -30px;
    opacity: 0;
}

.service-item:hover a.btn {
    bottom: -24px;
    opacity: 1;
}

.price-carousel::after {
    position: absolute;
    content: "";
    width: 100%;
    height: 50%;
    bottom: 0;
    left: 0;
    background: var(--primary);
    border-radius: 8px 8px 50% 50%;
    z-index: -1;
}

.price-carousel .owl-nav {
    margin-top: 35px;
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
}

.price-carousel .owl-nav .owl-prev,
.price-carousel .owl-nav .owl-next{
    position: relative;
    margin: 0 5px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: #FFFFFF;
    font-size: 22px;
    border-radius: 45px;
    transition: .5s;
}

.price-carousel .owl-nav .owl-prev:hover,
.price-carousel .owl-nav .owl-next:hover {
    color: var(--dark);
}

@media (min-width: 576px) {
    .team-item .row {
        height: 350px;
    }
}

.team-carousel .owl-nav {
    position: absolute;
    padding: 0 45px;
    width: 100%;
    height: 45px;
    top: calc(50% - 22.5px);
    left: 0;
    display: flex;
    justify-content: space-between;
}

.team-carousel .owl-nav .owl-prev,
.team-carousel .owl-nav .owl-next {
    position: relative;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: var(--primary);
    border-radius: 45px;
    font-size: 22px;
    transition: .5s;
}

.team-carousel .owl-nav .owl-prev:hover,
.team-carousel .owl-nav .owl-next:hover {
    background: var(--dark);
}

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

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 20px;
    height: 20px;
    background: var(--light);
    border: 2px solid var(--primary);
    border-radius: 20px;
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    width: 40px;
    height: 40px;
    background: var(--primary);
}

.testimonial-carousel .owl-item img {
    width: 150px;
    height: 150px;
}

/* Адаптивная пагинация */
.pagination {
    flex-wrap: wrap;
    justify-content: center;
}

.page-item {
    margin-bottom: 5px;
}

/* На мобилках уменьшаем пагинацию */
@media (max-width: 768px) {
    .pagination {
        font-size: 0.875rem;
    }

    .page-link {
        padding: 0.375rem 0.75rem;
    }
}

/* На очень маленьких экранах */
@media (max-width: 576px) {
    .pagination {
        font-size: 0.75rem;
    }

    .page-link {
        padding: 0.25rem 0.5rem;
        margin: 1px;
    }
}

/* Выравнивание изображений постов */
.image-container {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ограничение высоты для заголовка поста */
.blog-post-title {
    height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Ограничение размера изображения в посте для мобильных устройств */
[class*="wp-image-"]{
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.tag-view{
    font-size: 0.75em;
}

/* На мобилках уменьшаем размер тегов */
@media (max-width: 768px) {
    .tag-view{
        font-size: 0.65em;
    }
}

/* На очень маленьких экранах */
@media (max-width: 576px) {
    .tag-view{
        font-size: 0.65em;
    }
}

a > img {
    display: block;
}

/* Стили для YouTube плеера */
.youtube-player-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin: 20px 0;
}

.youtube-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Стили для таблиц */
.table-presentation {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9em;
    font-family: sans-serif;
    min-width: 400px;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

.table-presentation thead tr {
    background-color: var(--primary);
    color: #ffffff;
    text-align: left;
    font-weight: bold;
}

.table-presentation th,
.table-presentation td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dddddd;
}

.table-presentation tbody tr {
    border-bottom: 1px solid #dddddd;
}

.table-presentation tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

.table-presentation tbody tr:last-of-type {
    border-bottom: 2px solid var(--primary);
}

/* Адаптивность для основных элементов на главной странице */
.container-fluid.py-5 {
    padding: 3rem 1rem !important;
}

@media (max-width: 768px) {
    .display-4 {
        font-size: 1.8rem;
    }

    .h5.text-uppercase {
        font-size: 1rem;
    }

    .h3.text-primary {
        font-size: 1.2rem;
    }

    .container-fluid.py-5 {
        padding: 2rem 0.5rem !important;
    }

    .col-lg-3, .col-lg-4, .col-lg-6, .col-md-6 {
        padding: 0 0.5rem;
    }

    .bg-light.rounded.overflow-hidden {
        margin-bottom: 1rem;
    }

    .p-4 {
        padding: 1rem !important;
    }

    .border-top.p-4 {
        padding: 0.75rem !important;
    }

    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 1.5rem;
    }

    .h5.text-uppercase {
        font-size: 0.9rem;
    }

    .h3.text-primary {
        font-size: 1.1rem;
    }

    .container {
        padding: 0 10px;
    }

    .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .text-center.mx-auto.mb-5 {
        margin-bottom: 1.5rem !important;
    }

    .row.g-4 {
        margin: 0 -0.25rem;
    }

    .col-lg-4.col-md-6, .col-lg-3.col-md-6 {
        padding: 0 0.25rem;
    }

    .nav-tabs {
        flex-wrap: wrap;
    }

    .nav-tabs .nav-link {
        flex: 1 1 auto;
        margin-bottom: 0.25rem;
    }
}

/* Дополнительные стили для адаптивности */
@media (max-width: 992px) {
    .row.g-5 {
        margin: 0 -0.75rem;
    }

    .col-lg-6 {
        padding: 0 0.75rem;
    }

    .img-fluid.rounded {
        margin-bottom: 1rem;
    }
}

/* Адаптивность для элементов карточек */
.card, .bg-light.rounded {
    overflow: hidden;
}

.img-fluid.w-100 {
    height: 200px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .img-fluid.w-100 {
        height: 150px;
    }

    .p-4 {
        padding: 0.75rem !important;
    }

    .h5.d-block {
        font-size: 1rem;
        height: auto;
    }

    .small.text-muted {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .img-fluid.w-100 {
        height: 120px;
    }

    .h5.d-block {
        font-size: 0.9rem;
    }

    .p-4 {
        padding: 0.5rem !important;
    }

    .border-top.p-4 {
        padding: 0.5rem !important;
    }
}
