@import url("https://fonts.googleapis.com/css?family=IBM%20Plex%20Sans:500|IBM%20Plex%20Sans:300");
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap");

@font-face {
    font-family: "PPNeueMontreal";
    src: url("/NeueMontreal-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "PPNeueMontreal";
    src: url("/NeueMontreal-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "HalvarBreit";
    src: url("/HalvarBreit-Lt.ttf") format("truetype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

:root {
    --m: 4rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'HalvarBreit', 'PPNeueMontreal', 'Neue Montreal', 'Montserrat', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 1rem;
    overflow-x: hidden;
}

/* Стили хэдера теперь в css/header.css */

.main {
    margin-top: 5rem;
    min-height: calc(100vh - 5rem);
}

.hero {
    padding: 8rem 2rem 6rem;
    text-align: left;
    max-width: 90rem;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    font-family: 'HalvarBreit', 'PPNeueMontreal', 'Neue Montreal', sans-serif;
}

/* Hero buttons section */
.hero-buttons-section {
    max-width: 90rem;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.hero-buttons-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-button {
    display: inline-block;
    padding: 1.25rem 3rem;
    border: 1px solid #a68f50;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    font-family: 'HalvarBreit', 'PPNeueMontreal', 'Neue Montreal', 'Montserrat', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.hero-button-primary {
    background-color: #a68f50;
    color: #ffffff;
}

.hero-button-primary:hover {
    background-color: transparent;
    color: #a68f50;
    border-color: #a68f50;
}

.hero-button-secondary {
    background-color: transparent;
    color: #a68f50;
}

.hero-button-secondary:hover {
    background-color: #a68f50;
    color: #ffffff;
    border-color: #a68f50;
}

.content {
    max-width: 90rem;
    margin: 0 auto;
    padding: 0 2rem 8rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: 6rem 4rem;
}

.content-block {
    max-width: 35rem;
}

.content-title {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'HalvarBreit', 'PPNeueMontreal', 'Neue Montreal', sans-serif;
}

.content-text {
    font-size: 1rem;
    line-height: 1.8;
    font-weight: 300;
    letter-spacing: 0.01em;
}

.contact-section {
    max-width: 90rem;
    margin: 0 auto;
    padding: 8rem 2rem;
    text-align: center;
    border-top: 1px solid #000000;
}

.contact-title {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'HalvarBreit', 'PPNeueMontreal', 'Neue Montreal', sans-serif;
}

.contact-text {
    font-size: 1rem;
    font-weight: 300;
    margin-bottom: 3rem;
    letter-spacing: 0.01em;
}

.contact-button {
    display: inline-block;
    padding: 1rem 3rem;
    border: 1px solid #000000;
    background-color: #ffffff;
    color: #000000;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.contact-button:hover {
    background-color: #000000;
    color: #ffffff;
}

h2 {
    font-weight: 500;
    text-align: center;
    font-size: var(--m);
    margin: 0;
    font-family: 'HalvarBreit', 'PPNeueMontreal', 'Neue Montreal', sans-serif;
}

h3 {
    font-weight: 500;
    font-size: calc(0.6 * var(--m));
    margin: 0;
    font-family: 'HalvarBreit', 'PPNeueMontreal', 'Neue Montreal', sans-serif;
}

/* Стили футера теперь в css/footer.css */

img {
    height: calc(0.3 * var(--m));
    object-fit: cover;
}

.social {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

.link {
    width: calc(0.8 * var(--m));
    height: calc(0.8 * var(--m));
    background-color: rgba(0, 0, 0, 0.1);
    border: 1px solid #000000;
    border-radius: calc(0.1 * var(--m));
    display: flex;
    justify-content: center;
    align-items: center;
}

@media screen and (max-width: 1000px) {
    :root {
        --m: 3rem;
    }
}

@media screen and (max-width: 700px) {
    /* Мобильные стили хэдера теперь в css/header.css */
    /* Мобильные стили футера теперь в css/footer.css */

    .hero {
        padding: 6rem 1.5rem 4rem;
    }

    .content {
        padding: 0 1.5rem 6rem;
        gap: 4rem 2rem;
    }

    .contact-section {
        padding: 6rem 1.5rem;
    }

    .contact-title {
        font-size: 1.5rem;
    }
}

/* Секция отзывов */
.testimonials-section {
    max-width: 90rem;
    margin: 0 auto;
    padding: 4rem 2rem 8rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
    gap: 4rem;
}

.testimonial-card {
    border: 1px solid #000000;
    padding: 3rem;
}

.testimonial-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.testimonial-text {
    font-size: 1.125rem;
    font-weight: 300;
    line-height: 1.8;
    color: #000000;
}

.testimonial-author {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
}

.testimonial-avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #000000;
}

.testimonial-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.testimonial-name {
    font-size: 1rem;
    font-weight: 500;
    color: #000000;
    margin: 0;
}

.testimonial-position {
    font-size: 0.875rem;
    font-weight: 300;
    color: #000000;
    margin: 0;
    line-height: 1.4;
}

/* Секция контактной информации */
.contact-info-section {
    max-width: 90rem;
    margin: 0 auto;
    padding: 4rem 2rem 8rem;
    border-top: 1px solid #000000;
}

.contact-info-title {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
}

.contact-info-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: 3rem;
}

.contact-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-info-label {
    font-size: 0.875rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #000000;
    margin: 0;
}

.contact-info-value {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.6;
    color: #000000;
    margin: 0;
}

.contact-info-value a {
    color: #000000;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.contact-info-value a:hover {
    opacity: 0.6;
}

/* Секция карты */
.map-section {
    max-width: 90rem;
    margin: 0 auto;
    padding: 4rem 2rem 8rem;
    border-top: 1px solid #000000;
}

/* Скрываем секцию карты и убираем её отступы в полноэкранном режиме */
body:has(.yandex-map:-webkit-full-screen) .map-section,
body:has(.yandex-map:-moz-full-screen) .map-section,
body:has(.yandex-map:-ms-fullscreen) .map-section,
body:has(.yandex-map:fullscreen) .map-section {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Убираем все внутренние отступы у карты в полноэкранном режиме */
.yandex-map:-webkit-full-screen *,
.yandex-map:-moz-full-screen *,
.yandex-map:-ms-fullscreen *,
.yandex-map:fullscreen * {
    box-sizing: border-box !important;
}

/* Внутренние элементы карты в полноэкранном режиме */
.yandex-map:-webkit-full-screen *,
.yandex-map:-moz-full-screen *,
.yandex-map:-ms-fullscreen *,
.yandex-map:fullscreen * {
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.yandex-map:-webkit-full-screen .ymaps-2-1-79-map,
.yandex-map:-moz-full-screen .ymaps-2-1-79-map,
.yandex-map:-ms-fullscreen .ymaps-2-1-79-map,
.yandex-map:fullscreen .ymaps-2-1-79-map,
.yandex-map:-webkit-full-screen .ymaps-2-1-79-inner-panes,
.yandex-map:-moz-full-screen .ymaps-2-1-79-inner-panes,
.yandex-map:-ms-fullscreen .ymaps-2-1-79-inner-panes,
.yandex-map:fullscreen .ymaps-2-1-79-inner-panes,
.yandex-map:-webkit-full-screen .ymaps-2-1-79-ground-pane,
.yandex-map:-moz-full-screen .ymaps-2-1-79-ground-pane,
.yandex-map:-ms-fullscreen .ymaps-2-1-79-ground-pane,
.yandex-map:fullscreen .ymaps-2-1-79-ground-pane {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    left: 0 !important;
    right: 0 !important;
}

.map-title {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
}

.yandex-map {
    width: 100%;
    height: 600px;
    border: 1px solid #000000;
    box-sizing: border-box;
    position: relative;
}

/* Убираем все возможные отступы у внутренних элементов карты */
.yandex-map > div {
    width: 100% !important;
    height: 100% !important;
}

/* Полноэкранный режим карты - используем псевдокласс :fullscreen */
:fullscreen .yandex-map,
:-webkit-full-screen .yandex-map,
:-moz-full-screen .yandex-map,
:-ms-fullscreen .yandex-map {
    width: 100vw !important;
    height: 100vh !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    max-width: none !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
}

/* Полноэкранный режим - убираем отступы у body и html */
:fullscreen,
:-webkit-full-screen,
:-moz-full-screen,
:-ms-fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Полноэкранный режим карты */
.yandex-map:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    max-width: none !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
}

.yandex-map:-moz-full-screen {
    width: 100vw !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100% !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    max-width: none !important;
    min-width: 100vw !important;
}

.yandex-map:-ms-fullscreen {
    width: 100vw !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100% !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    max-width: none !important;
    min-width: 100vw !important;
}

.yandex-map:fullscreen {
    width: 100vw !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100% !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    max-width: none !important;
    min-width: 100vw !important;
}

/* Полноэкранный режим через класс body */
body.map-fullscreen-active {
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

body.map-fullscreen-active html {
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
}

body.map-fullscreen-active .yandex-map {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    z-index: 999999 !important;
    max-width: none !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
}

/* Все внутренние элементы карты без отступов */
body.map-fullscreen-active .yandex-map * {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
}

@media screen and (max-width: 768px) {
    .testimonials-section {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem 4rem;
        gap: 2rem;
    }

    .testimonial-card {
        padding: 2rem;
    }

    .testimonial-text {
        font-size: 1rem;
    }

    .contact-info-section {
        padding: 2rem 1.5rem 4rem;
    }

    .contact-info-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .map-section {
        padding: 2rem 1.5rem 4rem;
    }

    .map-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .yandex-map {
        height: 450px;
    }

    .hero-buttons-section {
        padding: 0 1.5rem 2rem;
    }

    .hero-buttons-container {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-button {
        width: 100%;
        text-align: center;
    }
}

/* Form Modal Styles */
.form-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 2rem;
}

.form-modal.active {
    opacity: 1;
    visibility: visible;
}

.form-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.form-modal-content {
    position: relative;
    z-index: 1;
    background-color: #ffffff;
    max-width: 600px;
    width: 100%;
    padding: 4rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.form-modal.active .form-modal-content {
    transform: scale(1) translateY(0);
}

.form-modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.form-modal-close:hover {
    opacity: 0.6;
}

.form-modal-close span {
    position: absolute;
    width: 1.5rem;
    height: 1px;
    background-color: #000000;
    transition: transform 0.3s ease;
}

.form-modal-close span:first-child {
    transform: rotate(45deg);
}

.form-modal-close span:last-child {
    transform: rotate(-45deg);
}

.form-modal-header {
    margin-bottom: 3rem;
    text-align: left;
}

.form-modal-title {
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    text-transform: none;
    color: #000000;
}

.form-modal-subtitle {
    font-size: 1.125rem;
    font-weight: 300;
    letter-spacing: 0.01em;
    color: rgba(0, 0, 0, 0.7);
    line-height: 1.6;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group-question {
    display: none;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #000000;
}

.form-input {
    width: 100%;
    padding: 1rem 0;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    background-color: transparent;
    font-size: 1.125rem;
    font-weight: 300;
    font-family: inherit;
    color: #000000;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.form-input:focus {
    border-bottom-color: #000000;
}

.form-input:valid {
    border-bottom-color: rgba(0, 0, 0, 0.5);
}

.form-textarea {
    width: 100%;
    padding: 1rem 0;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    background-color: transparent;
    font-size: 1.125rem;
    font-weight: 300;
    font-family: inherit;
    color: #000000;
    outline: none;
    transition: border-color 0.3s ease;
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.form-textarea::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.form-textarea:focus {
    border-bottom-color: #000000;
}

.form-submit {
    margin-top: 1rem;
    padding: 1.25rem 3rem;
    border: 1px solid #000000;
    background-color: #000000;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    width: fit-content;
    align-self: flex-start;
}

.form-submit:hover {
    background-color: #ffffff;
    color: #000000;
}

.form-submit:active {
    transform: scale(0.98);
}

.form-success {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.05);
    border-left: 3px solid #000000;
    font-size: 1rem;
    font-weight: 300;
    color: #000000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media screen and (max-width: 700px) {
    .form-modal-content {
        padding: 3rem 2rem;
    }

    .form-modal-close {
        top: 1.5rem;
        right: 1.5rem;
    }
}
