/* css/style.css – оптимизированная версия */
@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/OpenSans-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Century Gothic';
    src: url('../fonts/CenturyGothic.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Montserrat-SemiBold';
    src: url('../fonts/Montserrat-SemiBold.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Open Sans', 'Arial', sans-serif;
    background: #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}
.site {
    width: 960px;
    background: #FEFAEF;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}
/* ШАПКА */
.header {
    width: 100%;
    height: 124px;
    background: linear-gradient(90deg, #781510 20%, #FCF9F9 50%, #781510 80%, #781510 100%);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}
.address {
    justify-self: end;
    text-align: center;
    margin-right: 50px;
    font-size: 13pt;
    line-height: 1.4;
    color: white;
    white-space: nowrap;
}
.logo { justify-self: center; }
.logo a { display: block; }
.logo img { display: block; max-height: 80px; width: auto; }
.contacts {
    justify-self: start;
    text-align: center;
    margin-left: 50px;
    font-size: 13pt;
    line-height: 1.4;
    color: white;
    white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ФОНОВАЯ ОБЁРТКА */
.content-with-bg {
    background-image: url('../img/bgfon.png');
    background-repeat: repeat-y;
    background-size: 100% auto;
    background-position: top center;
}
/* КНОПКИ */
.buttons-section { padding: 37px 20px 20px 20px; }
.buttons-wrapper {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.btn-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #781510;
    border: none;
    border-radius: 30px;
    padding: 0 20px;
    height: 44px;
    width: 205px;
    min-width: auto;
    max-width: 100%;
    font-size: 11pt;
    color: #FEFEFE;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}
.btn-custom:hover { background-color: #5a0f0c; transform: scale(1.02); }
.btn-custom img { width: 20px; height: auto; display: block; }
/* БЛОК ИКОНОК (ТИПЫ ШТОР) */
.icons-section {
    margin-top: 31px;
    text-align: center;
}
.icons-title {
    font-size: 23pt;
    color: #781510;
    margin-bottom: 30px;
    letter-spacing: 2px;
    text-align: center;
}
.icons-container {
    height: 370px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 11px;
}
.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.icon-link {
    display: block;
    text-decoration: none;
    transition: transform 0.2s ease, filter 0.2s ease;
}
.icon-link:hover { transform: scale(1.02); filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15)); }
.icon-item:hover .icon-label { color: #781510; transition: color 0.2s ease; }
.icon-label {
    font-size: 13pt;
    letter-spacing: 0.3px;
    color: #1e1e1e;
    margin-top: 6px;
}
/* ТЕКСТОВЫЙ БЛОК */
.description-section { padding: 20px 20px 40px 20px; }
.description-content {
    max-width: 647px;
    margin: 0 auto;
    font-family: 'Century Gothic', 'CenturyGothic', 'AppleGothic', sans-serif;
    font-size: 12pt;
    color: #781510;
    line-height: 1.5;
    text-align: center;
}
/* КАРУСЕЛИ (общие стили) */
.slider-container,
.reviews-slider-container {
    max-width: 647px;
    margin: 0 auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    border-radius: 15px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.slider-container::-webkit-scrollbar,
.reviews-slider-container::-webkit-scrollbar {
    display: none;
}
.slider-track,
.reviews-track {
    display: flex;
    gap: 7px;
    width: max-content;
}
.slider-item {
    width: 211px;
    flex-shrink: 0;
    scroll-snap-align: start;
    aspect-ratio: 211 / 159;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Кнопки слайдеров */
.slider-controls,
.reviews-slider-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}
.slider-btn {
    width: 22px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    padding: 0;
}
.slider-btn img {
    width: 100%;
    height: auto;
}
.slider-btn:hover { transform: scale(1.1); }
/* КАРТОЧКИ ОТЗЫВОВ */
.review-card {
    width: 211px;
    flex-shrink: 0;
    scroll-snap-align: start;
    background: #fffef7;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 14px 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: left;
}
.review-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,0.1); }
.review-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.review-avatar {
    width: 36px;
    height: 36px;
    background: #781510;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
    font-family: 'Open Sans', sans-serif;
    flex-shrink: 0;
}
.review-meta { flex-grow: 1; }
.review-name {
    font-weight: 700;
    font-size: 10pt;
    color: #2c2c2c;
    margin-bottom: 2px;
}
.review-date { font-size: 9pt; color: #888; }
.review-rating { display: flex; gap: 2px; margin-left: auto; }
.star { color: #ffb800; font-size: 13px; letter-spacing: 1px; }
.review-text {
    font-family: 'Century Gothic', sans-serif;
    font-size: 13px;
    line-height: 1.4;
    color: #2e2e2e;
    margin: 8px 0 12px 0;
    max-height: 110px;
    overflow-y: auto;
}
.company-reply {
    background: #f5f3ed;
    border-left: 3px solid #781510;
    border-radius: 10px;
    padding: 10px 12px;
    margin-top: 8px;
}
.reply-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 12px;
    color: #781510;
}
.reply-icon { font-size: 12px; }
.reply-text { font-size: 13px; line-height: 1.35; color: #3d3d3d; }
/* КОНТАКТЫ И КАРТА */
.contacts-map { padding: 20px 20px 50px 20px; background: transparent; }
.contacts-map {
    background-image: url('../img/contacts-bga.png');
    background-repeat: no-repeat;
    background-position: top left;
    background-size: 48% auto;
    background-position-x: 12px;
}
.contacts-map-inner { max-width: 647px; margin: 0 auto; }
.contacts-map-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}
.contacts-info { width: 37%; }
.map-block { width: calc(63% - 30px); }
.contacts-title, .map-title {
    font-size: 23pt;
    color: #781510;
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-align: center;
}
.contacts-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    display: inline-block;
    text-align: left;
}
.contacts-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
    font-family: 'Open Sans', 'Arial', sans-serif;
    font-size: 14pt;
    color: #781510;
    line-height: 1.5;
}
.contacts-list li img { width: 24px; height: auto; }
.contacts-list li:last-child { margin-top: 50px; }
.map-wrapper {
    width: 100%;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
}
.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
/* ФУТЕР */
.footer {
    background: #E3D9BF;
    padding: 20px 20px;
}
.footer-inner {
    max-width: 647px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    min-height: 170px;
}
.footer-left { text-align: left; }
.footer-logo { margin-bottom: 12px; }
.footer-logo img { max-height: 60px; width: auto; }
.footer-copyright {
    font-family: 'Open Sans', 'Arial', sans-serif;
    font-size: 11pt;
    color: #781510;
    line-height: 1.4;
}
.footer-social { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.footer-social a { display: block; transition: transform 0.2s; }
.footer-social a:hover { transform: scale(1.1); }
.footer-social img { width: 42px; height: auto; }

/* МОДАЛЬНЫЕ ОКНА */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s;
    z-index: 1000;
}
.modal-overlay.active { visibility: visible; opacity: 1; }
.modal-window {
    background: #FEFAEF;
    width: 360px;
    max-width: 90%;
    max-height: 90vh;
    margin-right: 20px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    padding: 28px 24px 32px;
    position: relative;
    transition: transform 0.3s;
    transform: translateX(20px);
    font-family: 'Open Sans', 'Arial', sans-serif;
    overflow-y: auto;
}
.modal-overlay.active .modal-window { transform: translateX(0); }
.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #781510;
    transition: 0.2s;
}
.modal-close:hover { transform: scale(1.2); }
.modal-title {
    font-size: 22pt;
    color: #781510;
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: 1px;
}
.modal-subtitle {
    font-size: 11pt;
    color: #1e1e1e;
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.4;
}
.modal-field { margin-bottom: 20px; }
.modal-field label {
    display: block;
    font-size: 12pt;
    color: #1e1e1e;
    margin-bottom: 6px;
}
.modal-field input,
.modal-field textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 14pt;
    border: 1px solid #ccc;
    border-radius: 40px;
    font-family: inherit;
    outline: none;
    transition: 0.2s;
}
.modal-field textarea {
    resize: vertical;
    min-height: 100px;
    max-height: 200px;
}
.modal-field input:focus,
.modal-field textarea:focus {
    border-color: #781510;
    box-shadow: 0 0 0 2px rgba(120,21,16,0.2);
}
.error-message {
    color: #d32f2f;
    font-size: 10pt;
    margin-top: 6px;
    display: block;
}
.modal-btn {
    width: 100%;
    background: #781510;
    color: #FEFEFE;
    border: none;
    border-radius: 40px;
    padding: 12px;
    font-size: 14pt;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 8px;
}
.modal-btn:hover { background-color: #5a0f0c; transform: scale(1.02); }
.modal-success { text-align: center; font-size: 16pt; color: #2e7d32; padding: 20px 0; }
.modal-consent {
    font-size: 9pt;
    color: #1e1e1e;
    text-align: center;
    margin-top: 20px;
    line-height: 1.4;
}
.consent-link {
    color: #781510;
    text-decoration: underline;
    transition: opacity 0.2s;
}
.consent-link:hover { opacity: 0.7; text-decoration: none; }

.all_link {
    font-family: 'Century Gothic', sans-serif;
    font-size: 13px;
    line-height: 1.4;
    margin: 8px 0 12px 0;
    max-height: 110px;
    overflow-y: auto;
}
.all_link a {
    color: #781510;
}

/* АДАПТИВ */
@media (max-height: 500px) {
    .modal-window {
        padding: 16px 20px;
        max-height: 85vh;
    }
    .modal-title { font-size: 18pt; margin-bottom: 8px; }
    .modal-subtitle { font-size: 10pt; margin-bottom: 12px; }
    .modal-field { margin-bottom: 12px; }
    .modal-field input { padding: 8px 12px; font-size: 12pt; }
    .modal-btn { padding: 8px; font-size: 12pt; }
    .modal-consent { font-size: 8pt; margin-top: 12px; }
    .modal-success { font-size: 14pt; padding: 12px 0; }
    .description-content { font-size: 16px; line-height: 1.5; }
}
@media (max-width: 960px) { .site { width: 100%; } }
@media (max-width: 700px) { .contacts-map { background-size: 80% auto; } }
@media (max-width: 650px) {
    .header {
        background: linear-gradient(180deg, #781510 0%, #FCF9F9 20%, #781510 43%, #781510 100%);
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        height: auto;
        gap: 10px;
        padding: 15px;
        text-align: center;
    }
    .address, .contacts { justify-self: center; text-align: center; margin: 0; white-space: normal; }
    .logo { order: -1; }
    .buttons-section { padding-top: 20px; }
    .btn-custom { white-space: normal; min-width: 160px; font-size: 16px; height: 48px; }
    .buttons-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    .btn-custom {
        width: 100%;
        max-width: 260px;
        justify-content: center;
        white-space: normal;
    }
    .icons-container { flex-wrap: wrap; height: auto; gap: 20px; justify-content: center; }
    .icon-item { margin-top: 0 !important; }
    .description-section { padding: 15px; }
    .description-content { font-size: 16px; line-height: 1.5; }
    .portfolio { padding: 15px; }
    .portfolio-title { font-size: 20pt; }
    .slider-container, .reviews-slider-container { max-width: 100%; }
    .slider-track, .reviews-track { gap: 20px; }
    .slider-item {
        width: calc(100% - 40px);
        max-width: 320px;
        margin: 0 auto;
    }
    .review-card {
        width: calc(100% - 40px);
        max-width: 300px;
        margin: 0 auto;
    }
    .review-text { font-size: 14px; }
    .reviews-slider-controls { display: flex; }
    .contacts-map-container { flex-direction: column; align-items: center; }
    .contacts-info, .map-block { width: 100%; text-align: center; }
    .contacts-list { display: inline-block; margin: 0 auto; }
    .contacts-list li { font-size: 13pt; }
    .contacts-title, .map-title { font-size: 20pt; }
    .footer-inner { flex-direction: column; text-align: center; gap: 20px; min-height: auto; padding: 15px 0; }
    .footer-left { text-align: center; }
    .footer-social { justify-content: center; gap: 28px; }
    .contacts-map { background-size: 95% auto; background-position-x: center; }
    .contacts-list li:last-child { margin-top: 20px; }
    .map-block { margin-top: 0; }
    .map-wrapper { height: 430px; }
}
/* 1. Центрирование заголовков секций */

.portfolio,
.reviews {
	padding: 20px 20px 50px 20px;
    text-align: center;
}

.portfolio-title,
.reviews-title,
.contacts-title, 
.map-title
 {
    font-size: 23pt;
    color: #781510;
    margin-bottom: 30px;
    letter-spacing: 2px;
	text-align: center;
}

/* 2. Исправление наложения крестика на заголовок модалки */
.modal-title {
    padding-right: 30px;      /* место для крестика */
    word-break: break-word;
}

@media (max-width: 650px) {
    .modal-title {
        padding-right: 35px;
        font-size: 18pt;
    }
    .modal-close {
        top: 20px;
        right: 20px;
        font-size: 32px;
    }
}
.footer-developer {
    text-align: center !important;
    font-size: 10pt !important;
    color: #C4B99A !important;  /* ненавязчивый цвет */
    margin-top: 12px !important;
}
.footer-developer a {
    color: #C4B99A;
    text-decoration: none;
    border-bottom: 1px dotted #C4B99A;
}
.footer-developer a:hover {
    color: #781510;  /* при наведении становится заметным */
    border-bottom-color: #781510;
}