/* Сброс стандартных отступов и полей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    overflow-x: hidden;
    margin-right: calc(-1 * (100vw - 100%));
}
body {
    font-family: 'Roboto', 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
       overflow-y: scroll;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Стили для шапки */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    height: 40px;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav__link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav__link:hover {
    color: #2c6bed;
}

.phone {
    text-decoration: none;
    color: #333;
    font-weight: 700;
}
/* ===== Стили для бургер-меню ===== */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.burger-menu__line {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 2px 0;
     transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Состояние активного бургер-меню */
.burger-menu.active .burger-menu__line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger-menu.active .burger-menu__line:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-menu__line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Телефон в шапке для десктопа */
.header__phone {
    display: block;
}

.nav__mobile-phone {
    display: none;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .burger-menu {
        display: flex;
    }
        body.menu-open {
        position: fixed;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: #fff;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        padding: 80px 20px 30px;
        transition: right 0.3s ease;
        z-index: 1000;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
          transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .nav.active {
        right: 0;
                transform: translateX(0);
    }

    .nav__link {
        padding: 15px 0;
        font-size: 1.1rem;
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav__link:last-child {
        border-bottom: none;
    }

    .header__phone {
        display: none;
    }

    .nav__mobile-phone {
        display: block;
        margin-top: auto;
        padding: 20px 0;
        border-top: 1px solid #f0f0f0;
    }

    .nav__mobile-phone .phone {
        font-size: 1.1rem;
        color: #2c6bed;
        text-decoration: none;
        font-weight: 600;
    }

    /* Затемнение фона при открытом меню */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 998;

    }

    .nav-overlay.active {
          opacity: 1;
        visibility: visible;
    }
}

/* Анимация для ссылок меню */
@media (max-width: 768px) {
    .nav__link {
        opacity: 0;
        transform: translateX(20px);
        transition: all 0.3s ease;
    }

    .nav.active .nav__link {
        opacity: 1;
        transform: translateX(0);
    }

    .nav.active .nav__link:nth-child(1) { transition-delay: 0.1s; }
    .nav.active .nav__link:nth-child(2) { transition-delay: 0.2s; }
    .nav.active .nav__link:nth-child(3) { transition-delay: 0.3s; }
    .nav.active .nav__mobile-phone { transition-delay: 0.4s; }
     .nav__link:hover {
        background-color: #f8f9fa;
        padding-left: 15px;
        color: #2c6bed;
    }
    
    .nav__link::before {
        content: '';
        position: absolute;
        left: -20px;
        top: 50%;
        transform: translateY(-50%);
        width: 8px;
        height: 8px;
        background-color: #2c6bed;
        border-radius: 50%;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .nav__link:hover::before {
        opacity: 1;
        left: -15px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .nav {
        width: 85%;
    }
    
    .header__inner {
        padding: 10px 0;
    }
    
    .logo img {
        height: 35px;
    }
}

/* Стили для герой-секции */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/hero-bg.jpeg') no-repeat center/cover;
    color: #fff;
    text-align: center;
    padding: 180px 0 100px;
    margin-top: 70px; /* Чтобы учесть фиксированную шапку */
}

.hero__title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero__subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.search-form {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.search-form__input,
.search-form__select {
    padding: 15px;
    border: none;
    border-radius: 5px;
    flex-grow: 1;
    min-width: 200px;
}

/* Стили для кнопок */
.btn {
    display: inline-block;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
}

.btn--primary {
    background-color: #2c6bed;
    color: #fff;
}

.btn--primary:hover {
    background-color: #1a5bc7;
}

.btn--outline {
    background-color: transparent;
    color: #2c6bed;
    border: 2px solid #2c6bed;
}

.btn--outline:hover {
    background-color: #2c6bed;
    color: #fff;
}

/* Стили для секций */
.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
}

.advantages {
    padding: 80px 0;
}

.advantages__list {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
}

.advantage {
    text-align: center;
    flex: 1;
    min-width: 250px;
}

.advantage__icon {
    height: 60px;
    margin-bottom: 20px;
}

.advantage__title {
    margin-bottom: 15px;
}

.featured, .cta {
    padding: 80px 0;
}

.cta {
    background-color: #f8f9fa;
    text-align: center;
}

.cta__title {
    margin-bottom: 20px;
}

.cta__text {
    margin-bottom: 30px;
    font-size: 1.2rem;
}

/* Стили для каталога (списка объектов) */
.catalog__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.object-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.object-card:hover {
    transform: translateY(-5px);
}

.object-card__image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.object-card__content {
    padding: 20px;
}

.object-card__title {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.object-card__price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c6bed;
    margin-bottom: 15px;
}

.object-card__props {
    list-style: none;
    margin-bottom: 15px;
}

.object-card__props li {
    margin-bottom: 5px;
    color: #666;
}

/* Стили для модального окна */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal__content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal__close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header__inner {
        flex-direction: column;
        gap: 15px;
    }

    .hero {
        padding: 150px 0 80px;
    }

    .search-form {
        flex-direction: column;
    }

    .advantages__list {
        flex-direction: column;
    }
}

/* Стили для страниц "О компании", "Контакты" и детальной страницы */

/* Общие стили для внутренних страниц */
.page-header {
    background-color: #f8f9fa;
    padding: 40px 0;
    margin-top: 70px;
}

.page-header__title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumbs__link {
    color: #2c6bed;
    text-decoration: none;
}

.breadcrumbs__link:hover {
    text-decoration: underline;
}

.breadcrumbs__separator {
    margin: 0 10px;
}

.breadcrumbs__current {
    color: #666;
}

/* Стили для страницы "О компании" */
.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    margin: 50px 0;
}

.about-text h2 {
    margin: 30px 0 15px;
    color: #2c6bed;
}

.about-text h2:first-child {
    margin-top: 0;
}

.about-text ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.about-text li {
    margin-bottom: 8px;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.team-member {
    text-align: center;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.team-member__photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.team-member__name {
    margin-bottom: 5px;
}

.team-member__position {
    color: #2c6bed;
    font-weight: 500;
    margin-bottom: 5px;
}

.team-member__experience {
    color: #666;
    font-size: 0.9rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.stat {
    text-align: center;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat__number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: #2c6bed;
    margin-bottom: 10px;
}

.stat__label {
    font-size: 1.1rem;
    color: #666;
}

/* Стили для страницы "Контакты" */
.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin: 50px 0;
}

.contact-item {
    margin-bottom: 30px;
}

.contact-item h3 {
    color: #2c6bed;
    margin-bottom: 10px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

.map-container {
    margin: 50px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Стили для детальной страницы объекта */
.object-detail {
    margin: 50px 0;
}

.object-gallery {
    margin-bottom: 40px;
}

.gallery-main {
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gallery-main img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.gallery-thumb {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.gallery-thumb:hover {
    opacity: 0.8;
}

.object-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

.object-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c6bed;
    margin-bottom: 30px;
}

.object-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.object-meta-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.object-meta-label {
    font-weight: 500;
}

.object-meta-value {
    color: #666;
}

.object-description,
.object-features {
    margin-bottom: 30px;
}

.object-features ul {
    margin-left: 20px;
}

.object-features li {
    margin-bottom: 8px;
}

.object-sidebar {
    position: sticky;
    top: 90px;
    align-self: start;
}

.agent-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 30px;
}

.agent-card__photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.agent-card__name {
    margin-bottom: 5px;
}

.agent-card__position {
    color: #2c6bed;
    margin-bottom: 15px;
    font-weight: 500;
}

.agent-card__contacts a {
    display: block;
    color: #333;
    text-decoration: none;
    margin-bottom: 5px;
}

.agent-card__contacts a:hover {
    color: #2c6bed;
}

.object-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.object-map {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.object-address {
    margin-top: 15px;
    text-align: center;
    color: #666;
}

.similar-objects {
    margin: 50px 0;
}

/* Адаптивность для внутренних страниц */
@media (max-width: 992px) {
    .about-grid,
    .contacts-grid,
    .object-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .object-detail-grid {
        gap: 30px;
    }
    
    .object-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .gallery-main img {
        height: 300px;
    }
    
    .gallery-thumbs {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .object-meta {
        grid-template-columns: 1fr;
    }
    
    .page-header__title {
        font-size: 2rem;
    }
}

/* Стили для улучшенного футера */
.footer {
    background-color: #1a2b47;
    color: #fff;
    padding: 60px 0 0;
}

.footer__content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer__column:first-child {
    grid-column: 1;
}

.footer__logo img {
    height: 40px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}

.footer__description {
    color: #b4c0d9;
    margin-bottom: 25px;
    line-height: 1.6;
}

.footer__social {
    display: flex;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: #2c6bed;
    transform: translateY(-3px);
}

.footer__title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer__title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #2c6bed;
}

.footer__links {
    list-style: none;
}

.footer__links li {
    margin-bottom: 12px;
}

.footer__links a {
    color: #b4c0d9;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    padding-left: 0;
    transition: all 0.3s ease;
}

.footer__links a:hover {
    color: #fff;
    padding-left: 8px;
}

.footer__links a::before {
    content: '›';
    position: absolute;
    left: -12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.footer__links a:hover::before {
    opacity: 1;
    left: -8px;
}

.footer__contact-info {
    margin-bottom: 30px;
}

.footer__contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: #b4c0d9;
}

.footer__contact-item svg {
    margin-right: 12px;
    flex-shrink: 0;
}

.footer__subscribe p {
    color: #b4c0d9;
    margin-bottom: 15px;
}

.footer__subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer__subscribe-form input {
    padding: 12px 15px;
    border: none;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.footer__subscribe-form input::placeholder {
    color: #b4c0d9;
}

.footer__subscribe-form .btn {
    align-self: flex-start;
}

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
}

.footer__bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer__legal-links {
    display: flex;
    gap: 25px;
}

.footer__legal-links a {
    color: #b4c0d9;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer__legal-links a:hover {
    color: #fff;
}

/* Адаптивность футера */
@media (max-width: 1024px) {
    .footer__content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 40px 0 0;
    }
    
    .footer__content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer__bottom-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer__legal-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer__subscribe-form {
        flex-direction: column;
    }
    
    .footer__subscribe-form .btn {
        align-self: stretch;
    }
}

/* Анимация загрузки страницы */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #2c6bed;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
