/* Основные стили */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Главный заголовок */
.display-4.fw-bold {
    color: #2a7169;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem !important;
    padding: 0 15px;
}

/* Карточки */
.card {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: none;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
}

.card-img-top {
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #2a7169;
}

.card-text {
    color: #555;
    margin-bottom: 1.25rem;
}

/* Кнопки */
.btn-lg {
    font-size: 1.1rem;
    padding: 12px 25px;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: #4db6ac;
    border-color: #4db6ac;
    box-shadow: 0 4px 6px rgba(77, 182, 172, 0.2);
    position: relative;
    z-index: 9999 !important;
}

.btn-primary:hover {
    background-color: #3da89e;
    border-color: #3da89e;
    box-shadow: 0 7px 14px rgba(77, 182, 172, 0.25);
}

.btn-outline-primary {
    color: #4db6ac;
    border-color: #4db6ac;
    border-width: 2px;
}

.btn-outline-primary:hover {
    background-color: #4db6ac;
    color: white;
}

/* Блок преимуществ */
#advantagesBlock {
    background: linear-gradient(135deg, #f0faf9 0%, #e0f5f3 100%);
    border-radius: 15px;
    margin: 3rem auto;
    padding: 3rem 0 !important;
    position: relative;
    overflow: hidden;
}

#advantagesBlock::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="%234db6ac" fill-opacity="0.03" d="M0,0 L100,0 L100,100 L0,100 Z"></path></svg>');
    background-size: cover;
}

.advantages-list {
    padding: 2rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1;
}

.advantages-list h3 {
    font-weight: 500;
    color: #2a7169;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.advantages-list h3:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

/* Карусель */
#popularPropertiesCarousel {
    padding: 0 50px;
    margin: 4rem 0;
}

.carousel-control-prev, .carousel-control-next {
    width: 50px;
    opacity: 1;
}

.carousel-control-prev-icon, .carousel-control-next-icon {
    background-size: 70%;
    background-color: rgba(77, 182, 172, 0.8);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 10px;
}

#contactForm .form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

#contactForm .form-floating label {
    color: #6c757d;
}

#contactForm .btn-primary {
    background-color: #4db6ac;
    border-color: #4db6ac;
    transition: all 0.3s;
}

#contactForm .btn-primary:hover {
    background-color: #3da89e;
    transform: translateY(-2px);
}

.properties-carousel-container {
    overflow: hidden;
    padding: 0 30px;
    margin: 0 -15px;
    width: calc(100% + 30px);
    position: relative; /* Добавляем для будущих модификаций */
}

.properties-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out; /* Более плавный easing */
    gap: 20px;
    padding: 15px 0; /* Увеличил вертикальные отступы */
    margin: 0;
    list-style: none; /* Если используется ul */
}

.property-card {
    flex: 0 0 calc(33.333% - 13.333px); /* Более точный расчет */
    min-width: 0;
    padding: 0 5px;
    box-sizing: border-box;
    scroll-snap-align: start; /* Для лучшего скролла */
}

/* Изменил порядок медиа-запросов по методологии mobile-first */
@media (max-width: 768px) {
    .property-card {
        flex: 0 0 calc(50% - 10px);
    }

    .properties-carousel-container {
        padding: 0 20px;
        width: calc(100% + 20px);
    }
}

@media (max-width: 576px) {
    /* Добавил breakpoint для очень маленьких экранов */
    .property-card {
        flex: 0 0 100%;
        padding: 0 10px; /* Больше padding на мобильных */
    }

    .properties-carousel-container {
        padding: 0 15px;
        width: calc(100% + 15px);
    }
}

/* Опциональные улучшения для карточек */
.property-card .card {
    height: 100%; /* Равная высота карточек */
    border-radius: 8px; /* Скругленные углы */
    overflow: hidden; /* Для сохранения скруглений */
}

/* Блок для собственников */
#ownerBlock {
    background: linear-gradient(135deg, #f8fcfb 0%, #e8f7f5 100%);
    border-radius: 16px;
    margin: 4rem auto;
    padding: 4rem 0 !important;
    position: relative;
    overflow: hidden;
}

#ownerBlock::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="%234db6ac" fill-opacity="0.03" d="M0,0 L100,0 L100,100 L0,100 Z"></path></svg>');
    background-size: cover;
}

/* Стили для кнопок */
.btn-owner-action {
    border: none;
    color: white;
    background: linear-gradient(135deg, #4db6ac 0%, #3da89e 100%);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 12px rgba(77, 182, 172, 0.3);
    position: relative;
    overflow: hidden;
    padding: 1.5rem !important;
    font-size: 1.1rem;
}

.btn-owner-action .btn-icon-wrapper {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s;
}

.qr-code-absolute {
    position: absolute;
    right: -35px;
    /*top: -50%;*/
    transform: translateY(-50%);
}

.telegram-username {
    transition: all 0.3s ease;
    padding: 6px 12px;
    border-radius: 20px;
    background-color: rgba(42, 171, 238, 0.05);
}

.telegram-username:hover {
    background-color: rgba(42, 171, 238, 0.1);
    transform: translateY(-2px);
}

.btn-owner-action::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    z-index: 0;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.btn-owner-action:hover::after {
    transform: translateY(0);
}


.btn-owner-action .btn-main-text {
    font-size: 1.1rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.btn-owner-action .btn-sub-text {
    font-size: 0.95rem;
    opacity: 0.9;
    transition: all 0.3s;
    color: rgba(255, 255, 255, 0.75);
!important;
}

.btn-hover-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(77, 182, 172, 0.1) 0%, rgba(77, 182, 172, 0.05) 100%);
    z-index: -1;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

#aboutAgency {
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}

/* Эффекты при наведении */
.btn-owner-action:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(77, 182, 172, 0.4);
    color: white;
}

.btn-owner-action:hover .btn-icon-wrapper {
    background-color: rgba(77, 182, 172, 0.2);
    transform: scale(1.05);
}

.btn-owner-action:hover .btn-sub-text {
    opacity: 1;
}

.btn-owner-action:hover .btn-hover-effect {
    transform: translateY(0);
}

.btn-telegram {
    border: none;
    color: white;
    background: linear-gradient(135deg, #4db6ac 0%, #3da89e 100%);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 12px rgba(77, 182, 172, 0.3);
    position: relative;
    overflow: hidden;
    padding: 1rem !important;
}

.btn-telegram .btn-icon-wrapper {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    transition: all 0.3s;
}

.btn-telegram .btn-main-text {
    font-size: 1.1rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.btn-telegram .btn-sub-text {
    font-size: 0.95rem;
    opacity: 0.9;
    transition: all 0.3s;
    color: rgba(255, 255, 255, 0.9);
}

.btn-telegram::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    z-index: 0;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

/* Эффекты при наведении */
.btn-telegram:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(77, 182, 172, 0.4);
    color: white;
}

.btn-telegram:hover .btn-icon-wrapper {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.btn-telegram:hover .btn-sub-text {
    opacity: 1;
}

.btn-telegram:hover::after {
    transform: translateY(0);
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .btn-telegram {
        padding: 1rem !important;
    }

    .btn-telegram .btn-icon-wrapper {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .btn-owner-action {
        padding: 1rem !important;
    }

    .btn-owner-action .btn-icon-wrapper {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    #ownerBlock {
        padding: 2.5rem 0 !important;
        margin: 2.5rem auto;
    }
}


#rentalTypeBlock {
    background: linear-gradient(135deg, #f0faf9 0%, #e0f5f3 100%);
    border-radius: 16px;
    margin: 2rem auto;
    padding: 2.5rem 0 !important;
}

#rentalTypeBlock::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="%234db6ac" fill-opacity="0.03" d="M0,0 L100,0 L100,100 L0,100 Z"></path></svg>');
    background-size: cover;
}

/* Стили для кнопок аренды */
.btn-rental-type {
    border: none;
    color: white;
    background: linear-gradient(135deg, #4db6ac 0%, #3da89e 100%);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 12px rgba(77, 182, 172, 0.3);
    position: relative;
    z-index: 1;
    overflow: hidden;
    padding: 1rem !important;
}

.btn-rental-type .btn-icon-wrapper {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    transition: all 0.3s;
}

.btn-rental-type .btn-main-text {
    font-size: 1.1rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.btn-rental-type .btn-sub-text {
    font-size: 0.95rem;
    opacity: 0.9;
    transition: all 0.3s;
    color: rgba(255, 255, 255, 0.75) !important;
}

.btn-rental-type:hover .btn-sub-text {
    opacity: 1;
}

.btn-rental-type::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    z-index: -1;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

/* Эффекты при наведении */
.btn-rental-type:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(77, 182, 172, 0.4);
    color: white;
}

.btn-rental-type:hover .btn-icon-wrapper {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.btn-rental-type:hover .btn-sub-text {
    opacity: 1;
}

.btn-rental-type:hover::after {
    transform: translateY(0);
}

/* Эффект при нажатии */
.btn-rental-type:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(77, 182, 172, 0.4);
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    #rentalTypeBlock {
        padding: 1.5rem 0 !important;
        margin: 1.5rem auto;
    }

    .btn-rental-type {
        padding: 0.8rem !important;
    }

    .btn-rental-type .btn-icon-wrapper {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .btn-rental-type .btn-main-text {
        font-size: 1.1rem;
    }

    #rentalTypeBlock {
        padding: 2.5rem 0 !important;
        margin: 2.5rem auto;
    }
}

/* Контактная секция */
#contact {
    background: linear-gradient(to right, #f8fcfb 0%, #e8f7f5 100%);
    padding: 4rem 0;
    position: relative;
}

#contact h2 {
    margin-bottom: 3rem;
    position: relative;
}

#contact h2::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #4db6ac;
    border-radius: 3px;
}

h2 {
    position: relative;
    padding-bottom: 15px; /* Отступ для линии */
}

h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #4db6ac;
    border-radius: 3px;
}

h2.no-underline::after {
    display: none;
}

.contact-info {
    padding: 2rem !important;
}

.feedback {
    padding: 2rem !important;
}

.contact-item {
    margin-bottom: 2rem;
}

.contact-item h5 {
    font-weight: 600;
}

/* Баджи */
.badge {
    font-size: 0.85rem;
    padding: 0.5em 0.9em;
    font-weight: 500;
    border-radius: 6px;
}

.badge.bg-primary {
    background-color: #4db6ac !important;
}

.badge.bg-success {
    background-color: #81c784 !important;
}

/* Анимации */
.hidden-cta {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.hidden-cta.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== Мобильная адаптация ==================== */
@media (max-width: 576px) {
    /* Общие стили */
    body {
        font-size: 15px;
        line-height: 1.5;
    }

    /* Заголовок */
    .display-4.fw-bold {
        font-size: 2rem !important;
        margin-bottom: 1.5rem !important;
        text-align: center;
    }

    #aboutAgency h2 {
        font-size: 1.6rem !important;
    }

    /* Кнопки */
    .btn-lg {
        font-size: 1rem;
        padding: 10px 20px;
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }

    /* Карточки */
    .card {
        margin-bottom: 1rem;
    }

    .card-img-top {
        height: 160px;
    }

    /* Блок преимуществ */
    #advantagesBlock {
        padding: 1.5rem 0 !important;
        margin: 2rem auto;
        border-radius: 10px;
    }

    .advantages-list {
        padding: 1rem;
    }

    /* Карусель */
    #popularPropertiesCarousel {
        padding: 0 15px;
        margin: 2rem 0;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 30px;
    }

    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 30px;
        height: 30px;
    }

    /* Контактная секция */
    #contact {
        padding: 2rem 0;
    }

    #contact h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .contact-info {
        padding: 1rem !important;
    }

    .contact-item {
        margin-bottom: 1rem;
    }

    /* Форма поиска (если есть) */
    .search-form {
        padding: 1rem;
    }

    .search-form .form-control,
    .search-form .form-select {
        margin-bottom: 10px;
    }

    /* Отзывы */
    .testimonial {
        padding: 1rem;
    }
}

/* Отзывчивые отступы */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }

    #advantagesBlock {
        padding: 2rem 0 !important;
    }

    .advantages-list {
        padding: 1.5rem;
    }

    .card-img-top {
        height: 180px;
    }
}

@media (max-width: 991px) {
    .qr-code-absolute {
        position: static;
        transform: none;
        margin-top: 20px;
    }
}