/********** Template CSS **********/

/*** 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;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}

/*** Button ***/
.btn {
    transition: .5s;
}

.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 {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}


/*** Navbar ***/
.sticky-top {
    top: -150px;
    transition: .5s;
}

.navbar {
    padding: 15px 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 18px;
}

.navbar .navbar-nav .nav-link {
    margin-left: 30px;
    padding: 0;
    outline: none;
    color: var(--bs-dark);
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--bs-primary)
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-menu .dropdown-item.active {
    color: var(--bs-white);
    background: var(--bs-primary);
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link  {
        margin-left: 0;
        padding: 10px 0;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        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;
    }
}


/*** Hero Header ***/
.hero-header {
    margin-top: -100px;
    padding-top: 150px;
    background: url(../img/hero-bg.jpg) top center no-repeat;
    background-size: cover;
}

.hero-header .breadcrumb-item+.breadcrumb-item::before {
    color: var(--light);
}

.header-carousel {
    position: relative;
    padding: 45px 90px 45px 0;
}

.header-carousel::before {
    position: absolute;
    content: "";
    top: 0;
    right: 0;
    width: calc(50% + 45px);
    height: 100%;
    background: var(--bs-primary);
    z-index: -1;
}

.header-carousel .owl-dots {
    position: absolute;
    top: 50%;
    right: 38px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 5px 0;
    width: 15px;
    height: 15px;
    border: 2px solid var(--bs-white);
    transition: .5s;
}

.header-carousel .owl-dot.active {
    height: 30px;
    background: var(--bs-white);
}


/*** About ***/
.about-img {
    position: relative;
    overflow: hidden;
}

.about-img::after {
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: url(../img/bg-about-img.png) top left no-repeat;
    background-size: contain;
}


/*** Project ***/
.project-item img {
    transition: .5s;
}
  
.project-item:hover img {
    transform: scale(1.2);
}
  
.project-overlay {
    position: absolute;
    padding: 25px;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    background: linear-gradient(rgba(255, 255, 255, .1) 50%, var(--bs-dark));
    z-index: 1;
}


/*** Service ***/
.service-item {
    position: relative;
    padding: 30px 25px;
    transition: .5s;
}

.service-item.bg-primary:hover {
    background: var(--bs-light) !important;
}

.service-item.bg-primary p {
    color: var(--bs-light);
    transition: .5s;
}

.service-item.bg-primary:hover p {
    color: var(--bs-secondary);
}

.service-item.bg-light:hover {
    background: var(--bs-primary) !important;
}

.service-item.bg-light p {
    color: var(--bs-secondary);
    transition: .5s;
}

.service-item.bg-light:hover p {
    color: var(--bs-light);
}


.service-item .service-img h3 {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0 12px 7px 0;
}

.service-item.bg-primary .service-img h3 {
    background: var(--bs-primary);
    color: var(--bs-white);
    transition: .5s;
}

.service-item.bg-primary:hover .service-img h3 {
    background: var(--bs-light);
    color: var(--bs-dark);
}

.service-item.bg-light .service-img h3 {
    background: var(--bs-light);
    color: var(--bs-dark);
    transition: .5s;
}

.service-item.bg-light:hover .service-img h3 {
    background: var(--bs-primary);
    color: var(--bs-white);
}


/*** Our Team ***/
.team-item img {
    transition: .5s;
}
  
.team-item:hover img {
    transform: scale(1.2);
}
  
.team-overlay {
    position: absolute;
    padding: 30px;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    background: linear-gradient(rgba(255, 255, 255, .1) 50%, var(--bs-dark));
    z-index: 1;
}

.team-overlay small {
    display: inline-block;
    padding: 3px 15px;
    color: var(--bs-white);
    background: var(--bs-primary);
}


/*** Testimonial ***/
.testimonial-img {
    position: relative;
    padding: 45px 0 45px 90px;
}

.testimonial-img::before {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    width: calc(50% + 45px);
    height: 100%;
    background: var(--bs-primary);
    z-index: -1;
}

.testimonial-text h5 {
    position: relative;
    padding-left: 45px;
}

.testimonial-text h5::before {
    position: absolute;
    content: "";
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 40px;
    height: 2px;
    background: var(--bs-primary);
}

.testimonial-carousel .owl-dots {
    position: absolute;
    height: 17px;
    bottom: 0;
    right: 0;
    left: auto;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin-left: 10px;
    width: 15px;
    height: 15px;
    background: var(--bs-white);
    border: 2px solid var(--bs-primary);
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    width: 30px;
    background: var(--bs-primary);
}

@media (max-width: 768px) {
    .testimonial-carousel .owl-dots {
        left: 0;
        right: auto;
    }

    .testimonial-carousel .owl-dot {
        margin-right: 10px;
        margin-left: 0;
    }
}


/*** Newsletter ***/
.newsletter {
    background: url(../img/hero-bg.jpg) bottom right no-repeat;
    background-size: cover;
}

@media (min-width: 992px) {
    .newsletter .container {
        max-width: 100% !important;
    }

    .newsletter .newsletter-text  {
        padding-right: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    .newsletter .newsletter-text  {
        padding-right: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    .newsletter .newsletter-text  {
        padding-right: calc(((100% - 1320px) / 2) + .75rem);
    }
}


/*** Footer ***/
.footer .btn.btn-link {
    display: block;
    margin-bottom: 10px;
    padding: 0;
    text-align: left;
    color: rgba(255,255,255,.5);
    font-weight: normal;
    transition: .3s;
}

.footer .btn.btn-link:hover {
    color: var(--bs-white);
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .copyright {
    padding: 25px 0;
    font-size: 14px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: rgba(255,255,255,.5);
}

.footer .copyright a:hover {
    color: var(--bs-white);
}

.footer .footer-menu a {
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, .1);
}

.footer .footer-menu a:last-child {
    margin-right: 0;
    padding-right: 0;
    border-right: none;
}

.pricing-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    padding-bottom: 50px;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1e2a3e;
}

.section-header h2 span {
    background: #e8f0fe;
    color: #2c6e9e;
    padding: 0.2rem 1rem;
    display: inline-block;
    border-radius: 40px;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
}

.section-header p {
    color: #4a5568;
    max-width: 600px;
    margin: 1rem auto 0;
    font-size: 1.1rem;
}

/* Grid — адаптивный */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem;
}

/* Карточка тарифа — flex колонка для прижатия кнопки вниз */
.pricing-card {
    background: white;
    border-radius: 2rem;
    padding: 2rem 1.5rem 1.8rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e9edf2;
    
    /* Важно: делаем карточку flex-контейнером с вертикальным направлением */
    display: flex;
    flex-direction: column;
    height: 100%;          /* чтобы карточки выравнивались по высоте внутри grid */
}

.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.08);
}

/* Акцент на ультра-тарифе (Pro max) */
.pricing-card.featured {
    border-top: 5px solid #0d6b68;
    position: relative;
    background: #ffffff;
}

.plan-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1e2a3e;
}

.price {
    font-size: 2.5rem;
    font-weight: 800;
    color: #2c6e9e;
    margin: 1rem 0 0.25rem;
}

.price small {
    font-size: 1rem;
    font-weight: 500;
    color: #6c7a8a;
}

.period {
    color: #7e8c9e;
    font-size: 0.85rem;
    margin-bottom: 1.8rem;
    border-bottom: 1px solid #eef2f6;
    display: inline-block;
    padding-bottom: 0.5rem;
}

/* Список фич — растягивается, чтобы заполнить доступное место */
.features-list {
    list-style: none;
    text-align: left;
    margin: 1rem 0 1.5rem 0;
    flex: 1;   /* ключевой момент: этот блок занимает всё свободное пространство, 
                  прижимая кнопку вниз */
}

.features-list li {
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    color: #2d3a4a;
}

.features-list li i {
    width: 1.5rem;
    color: #0d6b68;
    font-size: 1rem;
}

/* Кнопка теперь всегда внизу, так как находится после flex:1 блока */
.btn-plan {
    display: inline-block;
    width: 100%;
    padding: 0.9rem 0;
    background: white;
    border: 2px solid #0d6b68;
    border-radius: 60px;
    font-weight: 600;
    color: #0d6b68;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
    text-align: center;
    margin-top: 0.5rem;
}

.btn-plan:hover {
    background: #0d6b68;
    color: white;
}

.card-featured-badge {
    background: #0d6b68;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 1rem;
    border-radius: 30px;
    display: inline-block;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
    width: fit-content;
}

/* Адаптив */
@media (max-width: 1100px) {
    .pricing-grid {
        gap: 1.2rem;
        padding: 0 20px;
    }
    .plan-name {
        font-size: 1.5rem;
    }
    .price {
        font-size: 2rem;
    }
}

@media (max-width: 900px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.8rem;
    }
    body {
        padding: 2rem 1.2rem;
    }
}

@media (max-width: 550px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 380px;
        margin: 0 auto;
    }
    .section-header h2 {
        font-size: 1.8rem;
    }
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header секции */
.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
}

.gallery-header span {
    background: #e8f0fe;
    color: #2c6e9e;
    padding: 0.3rem 1.2rem;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 1rem;
}

.gallery-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1e2a3e;
    margin-bottom: 0.75rem;
}

.gallery-header p {
    color: #4a5568;
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* Сетка галереи */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* Карточка изображения */
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

/* Оверлей с подписью */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
    padding: 1.5rem 1rem 1rem;
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.gallery-overlay p {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Модальное окно (lightbox) */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 100000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 1rem;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.close-lightbox {
    position: absolute;
    top: 25px;
    right: 35px;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}
.close-lightbox:hover {
    color: #c49a6c;
}

/* Адаптивность */
@media (max-width: 1100px) {
    .gallery-grid {
        gap: 1.2rem;
    }
    .gallery-item img {
        height: 260px;
    }
}

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .gallery-header h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 550px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }
    .gallery-item img {
        height: 260px;
    }
    body {
        padding: 2rem 1rem;
    }
}

@media (min-width: 992px) {
    .col-lg-33 {
        width: 33%;
    }
}