
/* Адаптивность */



/* Для темной темы */
@media (prefers-color-scheme: dark) {
    .presentation-modal {
        background: #1a1a1a;
        color: white;
    }
    
    .presentation-title {
        color: white;
    }
    
    .presentation-subtitle {
        color: #ccc;
    }
    
    .presentation-form .form-label {
        color: white;
    }
    
    .presentation-form .form-input {
        background: #2d2d2d;
        border-color: #444;
        color: white;
    }
    
    .presentation-form .form-input:focus {
        border-color: #6a11cb;
        box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.2);
    }
    
    .presentation-form .form-input.error {
        border-color: #ff4757;
        background: #3a1a1a;
    }
    
    .presentation-modal-close {
        color: #ccc;
    }
    
    .presentation-modal-close:hover {
        color: white;
        background: #2d2d2d;
    }
    
    .presentation-note {
        color: #aaa;
    }
    
    .success-title {
        color: white;
    }
    
    .success-message {
        color: #ccc;
    }
}




    @media (max-width: 1200px) {
        .nav-link {
            font-size: 16px;
        }

        .gallery-container {
            height: 100%;
        }

        .text-content p {
            font-size: 1.1em;
        }

    }

    @media (max-width: 1100px) {
        .text-content p {
            font-size: 1em;
        }
    }

    @media (max-width: 996px) {
        .main-title h1 {
            font-size: 2.5em;
        }
        
        .text-content h2,
        .housess-container h2 {
            font-size: 2.2em;
        }
        
        .houses-item {
            gap: 30px;
        }
        
        /* .gallery-container {
            height: 320px;
        } */
        
        .houses-text h3 {
            font-size: 1.6em;
        }
        
        .nav-link {
            font-size: 14px;
        }

        .phone {
            font-size: 20px;
        }

        .navigation {
            display: none;
        }

        .burger-menu {
            display: flex;
        }
        
        .header-right {
            gap: 15px;
        }
                
        .sticky-content {
            justify-content: space-between;
        }
        
        .sticky-nav {
            display: none;
        }
    }

    @media (max-width: 905px) {
        .text-content p {
            font-size: 0.8em;
        }
    }

    @media (max-width: 886px) {
        .phone {
            font-size: 18px;
        }
        .navigation ul li {
            padding: 0 10px;
        }

        h2 {
            font-size: 2em;
        }

        .call-to-preview {
            flex-direction: column;
            align-items: flex-start;
        }

        .call-to-preview-text {
            margin-bottom: 20px;
            width: 100%;
        }

        .cta-btn {
            height: 50px;
            margin-left: 20px;
        }
    }

@media (max-width: 768px) {
        
        h2 {
            padding-bottom: 10px;
        }
        .mobile-menu {
            width: 280px;
        }
        
        .mobile-nav-link {
            padding: 12px 25px;
            font-size: 16px;
        }
        
        .mobile-phone {
            font-size: 16px;
        }

        .main-header {
            padding: 15px 0;
        }
        
        .phone {
            font-size: 16px;
        }
        
        .main-title h1 {
            font-size: 2em;
        }
        
        .main-title p {
            font-size: 1.1em;
        }

        .text-section-content-1, .text-section-content-3,
        .text-section-content-2, .text-section-content-4 {
            flex-direction: column-reverse;
            padding-bottom: 30px;
        }

        .text-content img {
            max-width: 100%;
            width: 100%;
        }

        .text-content p {
            max-width: 100%;
            font-size: 1em;
            text-align: justify;
            margin-bottom: 15px;
        }

        .position-number {
            font-size: 1.5em;
        }
        .position-unit {
            font-size: 0.4em;
        }
        
        .position-label {
            font-size: 0.9em;
        }


        .text-section,
        .houses-section {
            padding: 50px 20px;
        }
        
        .houses-item {
            flex-direction: column !important;
            gap: 30px;
            margin-bottom: 50px;
        }
        
        .houses-gallery,
        .houses-text {
            width: 100%;
        }
/*             
        .gallery-container {
            height: 300px;
        } */
        
        .gallery-arrow {
            width: 35px;
            height: 35px;
            font-size: 16px;
        }
        
        .footer-content {
            gap: 30px;
        }
        
        .footer-info {
            min-width: 250px;
        }
        
        .modal {
            padding: 30px 25px;
        }
        
        .modal-title {
            font-size: 1.6em;
        }    
        .gallery-modal {
            width: 95%;
            height: 95%;
            max-height: 70vh;
        }

        .gallery-modal-arrow {
            width: 50px;
            height: 50px;
            font-size: 20px;
        }

        .gallery-modal-arrow.prev {
            left: 10px;
        }

        .gallery-modal-arrow.next {
            right: 10px;
        }

        .gallery-modal-close {
            top: 10px;
            right: 10px;
            width: 40px;
            height: 40px;
            font-size: 24px;
        }

        .gallery-modal-slide {
            padding: 20px;
        }

            .presentation-modal {
        width: 95%;
        padding: 30px 25px;
        border-radius: 15px;
    }
    
    .presentation-title {
        font-size: 24px;
    }
    
    .presentation-icon {
        font-size: 50px;
    }
    
    .presentation-btn {
        padding: 12px 25px;
        font-size: 16px;
    }
    
    .success-icon {
        font-size: 60px;
    }
    
    .success-title {
        font-size: 26px;
    }
}

    /* Большие телефоны (576px - 767px) */
    @media (max-width: 576px) {
        .mobile-menu {
            width: 100%;
            max-width: 280px;
        }
        .header-content,
        .sticky-content {
            padding: 0 15px;
        }
        
        .logo {
            font-size: 18px;
        }
        
        .phone {
            font-size: 14px;
        }
        
        .sticky-logo {
            font-size: 16px;
        }
        
        .sticky-phone {
            font-size: 14px;
        }
        
        .main-title h1 {
            font-size: 1.8em;
            margin-bottom: 15px;
        }
        
        .main-title p {
            font-size: 1em;
            margin-bottom: 20px;
        }
        
        .call-request-btn {
            padding: 10px 20px;
            font-size: 14px;
        }
        
        .text-section,
        .housess-section {
            padding: 60px 15px;
        }
        
        .text-content h2,
        .housess-container h2 {
            font-size: 1.8em;
            margin-bottom: 25px;
        }
        
        .text-content p {
            font-size: 1.1em;
        }
        
        .houses-text h3 {
            font-size: 1.4em;
        }
        
        .houses-text p {
            font-size: 1em;
        }
        .call-to-preview {
            align-items: center;
        }

        .call-to-preview p {
            text-align: center;
        }
        
        /* .gallery-container {
            height: 250px;
        } */
        
        .gallery-arrow {
            width: 30px;
            height: 30px;
            font-size: 14px;
        }
        
        .gallery-arrow.prev {
            left: 10px;
        }
        
        .gallery-arrow.next {
            right: 10px;
        }
        
        .gallery-dots {
            bottom: 10px;
        }
        
        .call-button {
            width: 50px;
            height: 50px;
            bottom: 20px;
            right: 20px;
            font-size: 20px;
        }
        
        footer {
            padding: 40px 15px;
        }
        
        .footer-info h3 {
            font-size: 1.3em;
        }
        
        .footer-phone {
            font-size: 1.1em;
        }
        
        .modal-overlay {
            padding: 15px;
        }
        
        .modal {
            padding: 25px 20px;
        }
        
        .modal-title {
            font-size: 1.4em;
            margin-bottom: 20px;
        }
        
        .form-input {
            padding: 10px 12px;
            font-size: 14px;
        }
        
        .submit-btn {
            padding: 12px;
            font-size: 14px;
        }
    }

    /* Маленькие телефоны (390px - 575px) */

    @media (max-width: 480px) {
        .header-content {
            flex-direction: column;
            gap: 10px;
            text-align: center;
        }
        
        .sticky-content {
            flex-direction: column;
            gap: 8px;
        }
        
        .main-title h1 {
            font-size: 1.6em;
        }
        
        .main-title p {
            font-size: 0.9em;
        }
        
        .text-section,
        .housess-section {
            padding: 50px 15px;
        }
        
        .text-content h2,
        .housess-container h2 {
            font-size: 1.6em;
        }
        
        .text-content p {
            font-size: 1em;
            line-height: 1.6;
        }
        
        .houses-item {
            margin-bottom: 40px;
            gap: 25px;
        }
        
        .houses-text h3 {
            font-size: 1.3em;
            margin-bottom: 15px;
        }
        
        /* .gallery-container {
            height: 220px;
        } */
        
        .gallery-arrow {
            width: 28px;
            height: 28px;
            font-size: 12px;
        }
        
        .gallery-dot {
            width: 8px;
            height: 8px;
        }
        
        .call-request-btn {
            padding: 8px 16px;
            font-size: 13px;
            margin: 5px 3px;
        }
        
        .footer-content {
            flex-direction: column;
            gap: 25px;
            text-align: center;
        }
        
        .footer-info {
            min-width: auto;
            width: 100%;
        }
        
        .call-button {
            width: 45px;
            height: 45px;
            bottom: 15px;
            right: 15px;
            font-size: 18px;
        }
        
        .modal {
            padding: 20px 15px;
            border-radius: 10px;
        }
        
        .modal-close {
            top: 10px;
            right: 15px;
            font-size: 20px;
        }
        
        .modal-title {
            font-size: 1.3em;
        }
        
        .form-group {
            margin-bottom: 15px;
        }
        
        .form-label {
            font-size: 14px;
        }

        .presentation-modal {
            padding: 25px 20px;
        }
        
        .presentation-title {
            font-size: 22px;
        }
        
        .presentation-subtitle {
            font-size: 15px;
        }
        
        .presentation-form .form-input {
            padding: 12px 15px;
            font-size: 15px;
        }
        
        .presentation-submit-btn {
            padding: 15px;
            font-size: 16px;
        }
        
        .presentation-btn {
            padding: 10px 20px;
            font-size: 15px;
        }
        
        .success-btn {
            padding: 12px 30px;
        }
    }

    /* Очень маленькие телефоны (до 390px) */
    @media (max-width: 390px) {
        .burger-menu {
            width: 25px;
            height: 20px;
        }
        
        .burger-menu span {
            height: 2px;
        }
        .main-title h1 {
            font-size: 1.4em;
        }
        
        .main-title p {
            font-size: 0.85em;
        }
        
        .text-content h2,
        .housess-container h2 {
            font-size: 1.4em;
        }
        
        .houses-text h3 {
            font-size: 1.4em;
        }
        
        /* .gallery-container {
            height: 200px;
        } */
        
        .text-section,
        .housess-section {
            padding: 40px 10px;
        }
        
        .call-request-btn {
            padding: 8px 14px;
            font-size: 12px;
        }
        
        .modal-overlay {
            padding: 10px;
        }
        
        .modal {
            padding: 18px 12px;
        }
        
        .modal-title {
            font-size: 1.2em;
        }
        
        .form-input {
            padding: 8px 10px;
            font-size: 13px;
        }
        
        .submit-btn {
            padding: 10px;
            font-size: 13px;
        }
    }

    /* Ландшафтная ориентация на мобильных */
    @media (max-height: 500px) and (orientation: landscape) {
        .main-section {
            height: 100vh;
            min-height: 400px;
        }
        
        .main-title {
            top: 45%;
        }
        
        .main-title h1 {
            font-size: 1.8em;
            margin-bottom: 10px;
        }
        
        .modal {
            max-height: 80vh;
        }
    }

    /* Высокие экраны */
    /* @media (min-height: 1000px) {
        .gallery-container {
            height: 500px;
        }
    } */


    /* Улучшение доступности */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }

        .gallery-modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.9);
        display: none;
        justify-content: center;
        align-items: center;
        z-index: 3000;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .gallery-modal-overlay.active {
        display: flex;
        opacity: 1;
    }

    .gallery-modal {
        position: relative;
        width: 90%;
        height: 90%;
        max-width: 1200px;
        max-height: 800px;
        background: #000;
        border-radius: 10px;
        overflow: hidden;
        transform: scale(0.8);
        transition: transform 0.3s ease;
    }

    .gallery-modal-overlay.active .gallery-modal {
        transform: scale(1);
    }

    .gallery-modal-close {
        position: absolute;
        top: 20px;
        right: 20px;
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: white;
        font-size: 30px;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        cursor: pointer;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.3s ease;
    }

    .gallery-modal-close:hover {
        background: rgba(255, 255, 255, 0.3);
    }

    .gallery-modal-container {
        width: 100%;
        height: 100%;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .gallery-modal-slides {
        display: flex;
        transition: transform 0.5s ease;
        height: 100%;
        width: 100%;
    }

    .gallery-modal-slide {
        min-width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 40px;
    }

    .gallery-modal-image {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        border-radius: 5px;
    }

    .gallery-modal-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: white;
        font-size: 24px;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.3s ease;
        z-index: 10;
    }

    .gallery-modal-arrow:hover {
        background: rgba(255, 255, 255, 0.3);
    }

    .gallery-modal-arrow.prev {
        left: 20px;
    }

    .gallery-modal-arrow.next {
        right: 20px;
    }

    .gallery-modal-dots {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 10px;
        z-index: 10;
    }

    .gallery-modal-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.5);
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .gallery-modal-dot.active {
        background: rgba(255, 255, 255, 1);
        transform: scale(1.2);
    }

    .gallery-modal-counter {
        position: absolute;
        top: 20px;
        left: 20px;
        color: white;
        font-size: 16px;
        background: rgba(0, 0, 0, 0.5);
        padding: 8px 16px;
        border-radius: 20px;
        z-index: 10;
    }

    /* Стили для миниатюр в основной галерее */
    .houses-gallery {
        cursor: pointer;
        transition: transform 0.3s ease;
    }

    .houses-gallery:hover {
        transform: scale(1.02);
    }

    /* Адаптивность для модальной галереи */
    @media (max-width: 768px) {

    }

    @media (max-width: 480px) {
        .gallery-modal {
            width: 100%;
            height: 100%;
            max-height: 100vh;
            border-radius: 0;
        }

        .gallery-modal-arrow {
            width: 40px;
            height: 40px;
            font-size: 18px;
        }

        .gallery-modal-dots {
            bottom: 10px;
        }

        .gallery-modal-dot {
            width: 10px;
            height: 10px;
        }

        .gallery-modal-counter {
            top: 10px;
            left: 10px;
            font-size: 14px;
        }
    }

  

    /* Адаптивность */
    @media (max-width: 1200px) {
        .photo-gallery-item {
            flex: 0 0 calc(25% - 12px); /* 4 фотографии в ряду */
        }
    }

    @media (max-width: 768px) {
        .photo-main-section {
            padding: 60px 15px;
        }

        .photo-gallery-title {
            font-size: 2em;
            margin-bottom: 30px;
        }

        .photo-gallery-wrapper {
            padding: 0 40px;
        }

        .photo-gallery-item {
            flex: 0 0 calc(33.333% - 10px); /* 3 фотографии в ряду */
        }

        .photo-gallery-arrow {
            width: 40px;
            height: 40px;
            font-size: 16px;
        }

        .photo-modal {
            width: 95%;
            height: 95%;
            max-height: 70vh;
        }

        .photo-modal-arrow {
            width: 50px;
            height: 50px;
            font-size: 20px;
        }

        .photo-modal-close {
            width: 40px;
            height: 40px;
            font-size: 24px;
        }

        .photo-modal-slide {
            padding: 20px;
        }

        .layouts-modal {
            width: 95%;
            height: 95%;
            max-height: 70vh;
        }

        .layouts-modal-arrow {
            width: 50px;
            height: 50px;
            font-size: 20px;
        }

        .layouts-modal-close {
            width: 40px;
            height: 40px;
            font-size: 24px;
        }

        .layouts-modal-slide {
            padding: 20px;
        }

        .layouts-modal-title {
            font-size: 16px;
            top: 10px;
        }
    }


    @media (max-width: 576px) {
        .photo-gallery-wrapper {
            padding: 0 35px;
        }

        .photo-gallery-item {
            flex: 0 0 calc(50% - 8px); /* 2 фотографии в ряду */
        }

        .photo-gallery-arrow {
            width: 35px;
            height: 35px;
            font-size: 14px;
        }

        .photo-modal {
            width: 100%;
            height: 100%;
            max-height: 100vh;
            border-radius: 0;
        }

        .photo-modal-arrow {
            width: 40px;
            height: 40px;
            font-size: 18px;
        }

        .photo-modal-close {
            top: 10px;
            right: 10px;
        }

        .photo-modal-counter {
            top: 10px;
            left: 10px;
            font-size: 14px;
        }
    }

    @media (max-width: 480px) {
        .layouts-modal {
            width: 100%;
            height: 100%;
            max-height: 100vh;
            border-radius: 0;
        }

        .layouts-modal-arrow {
            width: 40px;
            height: 40px;
            font-size: 18px;
        }

        .layouts-modal-close {
            top: 10px;
            right: 10px;
        }

        .layouts-modal-counter {
            top: 10px;
            left: 10px;
            font-size: 14px;
        }

        .layouts-modal-title {
            font-size: 14px;
            top: 60px;
        }
    }

    @media (max-width: 390px) {
        .photo-gallery-item {
            flex: 0 0 calc(100% - 10px); /* 1 фотография в ряду */
        }
    }


    /* Адаптивность */
   /* Адаптивность */
@media (max-width: 1200px) {
    .callback-wrapper {
        gap: 40px;
    }
    
    .callback-form-container {
        padding: 50px 40px;
    }
    
    .callback-title {
        font-size: 28px;
    }
}

@media (max-width: 992px) {
    .callback-wrapper {
        flex-direction: column;
        gap: 0;
    }
    
    .callback-image-container {
        display: none; /* Скрываем изображение на мобильных */
    }
    
    .callback-form-container {
        width: 100%;
        padding: 50px 30px;
    }
    
    .callback-form-wrapper {
        max-width: 500px;
    }
    
    .callback-title {
        text-align: center;
        font-size: 26px;
    }
}

@media (max-width: 768px) {
    .callback-section {
        padding: 0;
    }
    
    .callback-form-container {
        padding: 50px 0;
    }
    
    .callback-title {
        font-size: 24px;
        margin-bottom: 25px;
    }
    
    .form-input {
        padding: 14px 18px;
        font-size: 15px;
    }
    
    .callback-submit-btn {
        padding: 16px;
        font-size: 16px;
    }
    
    .success-icon {
        font-size: 50px;
    }
    
    .success-title {
        font-size: 22px;
    }

    .footer-info h3 {
        font-size: 1em;
    }
    .footer-info p, .footer-link {
        font-size: 0.9em;
    }
    
    footer {
        padding: 30px 20px 10px;
    }
}

@media (max-width: 576px) {
   
  
    .callback-title {
        font-size: 22px;
    }
    
    .form-input {
        padding: 12px 16px;
    }
    
    .checkbox-label {
        font-size: 12px;
    }
    
    .success-title {
        font-size: 20px;
    }
    
    .success-message {
        font-size: 15px;
    }

    .houses-container {
        padding: 0;
    }

    .footer-content  {
        flex-direction: column;
        align-items: center;
    }

    .footer-info-right, .footer-info-left {
        text-align: center;
    }
}

/* Альтернативный вариант - изображение появляется сверху */
@media (max-width: 992px) and (min-width: 577px) {
    .callback-wrapper.alternative {
        flex-direction: column-reverse;
    }
    
    .callback-wrapper.alternative .callback-image-container {
        display: block;
        width: 100%;
        min-height: 300px;
    }
    
    .callback-wrapper.alternative .callback-image-wrapper {
        min-height: 300px;
    }
    
    .callback-wrapper.alternative .callback-form-container {
        width: 100%;
    }
}