/*
Theme Name: Winton
Version: 1.0.0
Author: Burlet Mikhail
Author URI: https://burlet-mikhail.ru/
*/
.btn-b:hover {
    color: #ffffff;
}

/* Contact Form 7 - Кастомный чекбокс */
label.checkbox {
    position: relative;
}

/* Скрываем весь блок с input */
label.checkbox .wpcf7-form-control-wrap {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
}
p:last-child{
    margin-bottom: 0;
}
label.checkbox .checkbox__text {
    display: block;
    padding-left: 32px;
    font-size: 12px;
    text-indent: 0 !important;
}

/* Рамка чекбокса */
label.checkbox .checkbox__text:after {
    content: "";
    position: absolute;
    border-radius: 2px;
    border: 1px solid rgba(17, 17, 17, .24);
    width: 20px;
    height: 20px;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
}

/* Галочка */
label.checkbox  input {
    visibility: hidden !important;
    opacity: 0 !important;
}
label.checkbox .checkbox__text:before {
    content: "";
    position: absolute;
    border-radius: 2px;
    background: #ff8f00;
    width: 12px;
    height: 12px;
    top: 50%;
    transform: translateY(-50%);
    left: 4px;
    opacity: 0;
}

/* Показываем галочку при checked */
label.checkbox .wpcf7-form-control-wrap:has(input:checked) ~ .checkbox__text:before {
    opacity: 1;
}
label.checkbox input:checked + .checkbox__text:before {
    opacity: 1;
}

label.checkbox a {
    text-decoration: underline;
    text-decoration-skip-ink: none;
    color: #216397;
}

.hero-production .img video {
    width: 100%;
    object-fit: cover;
}

.flex-cap {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.flex-cap .item {
    margin-right: 15px;
}

.flex-cap .item input {
    font-weight: 400;
    font-size: 15px;
    line-height: 1.35;
    color: #111111a3;
    padding-top: 8px;
    padding-bottom: 8px;
    border: none;
    width: 100%;
    display: block;
    border-bottom: 1px solid rgba(17, 17, 17, .24);
    background: none;
}

.all-product .desc {
    box-shadow: 0 0 20px 2px rgba(17, 17, 17, 0.04);
    background: #f5f5f5;
    border-radius: 8px;
    padding: 32px;
}

.all-product .desc svg {
    margin-bottom: 12px;
}

.all-product .desc .flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.all-product .desc .h3-title {
    margin-bottom: 16px;
    margin-right: 15px;
}

.all-product .desc .text {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.4;
}

@media (max-width: 767px) {
    .all-product .desc {
        padding: 16px;
    }

    .all-product .desc .flex {
        flex-direction: column-reverse;
    }

    .all-product .desc .text {
        font-size: 16px;
    }
}

.cities-hide {
    opacity: 0;
    -webkit-transition: all 0.3s;
    -moz-transition: all 0.3s;
    -ms-transition: all 0.3s;
    -o-transition: all 0.3s;
    transition: all 0.3s;
}

/* Hover-эффект для городов на карте */
[class*="city-"].active.cities-hide {
    opacity: 1;
}

/* Hover-эффект для городов на карте */
rect[class*="city-"][fill="#216397"].active,
path[class*="city-"][fill="#216397"].active {
    fill: #1b527e;
}

/* Hover-эффект для городов на карте */
rect[class*="city-"][fill="#216397"],
path[class*="city-"][fill="#216397"] {
    -webkit-transition: all 0.3s !important;
    -moz-transition: all 0.3s !important;
    -ms-transition: all 0.3s !important;
    -o-transition: all 0.3s !important;
    transition: all 0.3s !important;
}

#review textarea[name="comment"] {
    min-height: 100px;
}

.bread br {
    display: none;
}

.btn-o {
    transition: all .3s;
}

.btn-o:hover {
    background: #e07d00;
    color: #fff;
}

.search-result-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(17, 17, 17, .1);
}

.search-result-item:first-child {
    padding-top: 0;
}

.search-result-img {
    flex-shrink: 0;
    width: 200px;
    height: 140px;
    border-radius: 8px;
    overflow: hidden;
}

.search-result-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-content h2 {
    font-size: 18px;
    margin-bottom: 8px;
}

.search-result-content h2 a {
    color: #111;
    text-decoration: none;
}

.search-result-content h2 a:hover {
    color: #216397;
}

.search-result-content .date {
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
}

.search-result-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    margin-bottom: 12px;
}

.search-result-content .more {
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 1px;
    color: #216397;
    text-decoration: none;
}

.search-result-content .more:hover {
    text-decoration: underline;
}

.search-no-results {
    padding: 40px 0;
}

.search-no-results h2 {
    margin-bottom: 12px;
}

.search-no-results p {
    color: #555;
    line-height: 1.5;
}

@media (max-width: 767px) {
    .search-result-item {
        flex-direction: column;
        gap: 12px;
    }

    .search-result-img {
        width: 100%;
        height: 180px;
    }
}

/* Footer — два логотипа рядом */
.copy-logos {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Archive grid — 3 в ряд */
.cases .items-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 991px) {
    .cases .items-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .cases .items-grid {
        grid-template-columns: 1fr;
    }
}

/* Case single — текст + картинка */
.case-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.case-content__text {
    flex: 0 0 60%;
    max-width: 60%;
}

.case-content__image {
    flex: 0 0 calc(40% - 40px);
    max-width: calc(40% - 40px);
}

.case-content__image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

@media (max-width: 767px) {
    .case-content {
        flex-direction: column;
        gap: 24px;
    }

    .case-content__text,
    .case-content__image {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Glossary — архив словаря терминов */
.glossary-item {
    padding: 24px 0;
    border-bottom: 1px solid rgba(17, 17, 17, .1);
}

.glossary-item:first-child {
    padding-top: 0;
}

.glossary-item .title {
    margin-bottom: 8px;
}

.glossary-item .title a {
    font-weight: 700;
    font-size: 18px;
    color: #111;
    text-decoration: none;
    transition: color .3s;
}

.glossary-item .title a:hover {
    color: #216397;
}

.glossary-item .text {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

/* CF7 — чекбокс согласия */
.wpcf7-form-control-wrap[data-name="your-agree"] {
    display: block !important;
    width: 100% !important;
    margin-bottom: 15px;
}

.wpcf7-acceptance .wpcf7-list-item {
    margin: 0 !important;
}

.wpcf7-acceptance .wpcf7-list-item label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px;
    font-size: 12px;
    cursor: pointer;
}

.wpcf7-acceptance input[type="checkbox"] {
    display: block !important;
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    flex-shrink: 0 !important;
    margin: 2px 0 0 0 !important;
    opacity: 1 !important;
    position: static !important;
    visibility: visible !important;
    overflow: visible !important;
}

.wpcf7-acceptance .wpcf7-list-item-label {
    line-height: 1.4;
    flex: 1;
}

.wpcf7-acceptance .wpcf7-list-item-label a {
    color: #216397;
    text-decoration: underline;
}

/* Modal - Callback */
#callback .modal-dialog {
    max-width: 540px;
}

#callback .modal-content {
    border: none;
    border-radius: 0;
    padding: 48px 40px;
    position: relative;
}

#callback .btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f4f5f6;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    padding: 0;
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
}

#callback .btn-icon:hover {
    background: #ededed;
}

#callback > .btn-icon {
    position: fixed;
    top: 24px;
    right: 24px;
}

#callback .modal-body {
    padding: 0;
}

#callback .modal-body .title-point {
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    color: #ff8f00;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

#callback .modal-body .title {
    font-weight: 700;
    font-size: 24px;
    line-height: 1.3;
    color: #222;
    margin-bottom: 28px;
}

#callback .form label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: #555;
    margin-bottom: 16px;
}

#callback .form label input,
#callback .form label textarea {
    display: block;
    width: 100%;
    background: #fff;
    border: 2px solid #ededed;
    padding: 12px 18px;
    font-size: 15px;
    color: #111;
    margin-top: 6px;
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
    outline: none;
    font-family: inherit;
}

#callback .form label input:focus,
#callback .form label textarea:focus {
    border-color: #216397;
}

#callback .form label textarea {
    min-height: 100px;
    resize: vertical;
}

#callback .form .wpcf7-submit {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
    padding: 5px 41px;
    background: #ff8f00;
    border: none;
    cursor: pointer;
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
    width: 100%;
    margin-top: 8px;
}

#callback .form .wpcf7-submit:hover {
    background: #e07d00;
}

#callback .wpcf7-response-output {
    margin: 16px 0 0;
    padding: 12px 18px;
    font-size: 14px;
    border: 2px solid #ededed;
}

#callback .wpcf7-spinner {
    display: none;
}

@media (max-width: 767px) {
    #callback .modal-content {
        padding: 32px 20px;
    }

    #callback .modal-body .title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    #callback .form .wpcf7-submit {
        padding: 5px 20px;
    }
}

/* Modal - Search */
#search-modal .modal-dialog {
    max-width: 540px;
}

#search-modal .modal-content {
    border: none;
    border-radius: 0;
    padding: 48px 40px;
    position: relative;
}

#search-modal .modal-body {
    padding: 0;
}

#search-modal .modal-body .title {
    font-weight: 700;
    font-size: 24px;
    line-height: 1.3;
    color: #222;
    margin-bottom: 28px;
}

.search-modal-input {
    display: flex;
    gap: 0;
}

.search-modal-input input {
    flex: 1;
    display: block;
    width: 100%;
    background: #fff;
    border: 2px solid #ededed;
    border-right: none;
    padding: 12px 18px;
    font-size: 15px;
    color: #111;
    outline: none;
    font-family: inherit;
    transition: border-color .3s;
}

.search-modal-input input:focus {
    border-color: #216397;
}

.search-modal-input button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    background: #ff8f00;
    border: none;
    cursor: pointer;
    transition: background .3s;
    padding: 0 18px;
}

.search-modal-input button:hover {
    background: #e07d00;
}

@media (max-width: 767px) {
    #search-modal .modal-content {
        padding: 32px 20px;
    }

    #search-modal .modal-body .title {
        font-size: 20px;
        margin-bottom: 20px;
    }
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination ul {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination ul li {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #216397;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.pagination .page-numbers:hover {
    background-color: rgba(33, 99, 151, 0.08);
}

.pagination .page-numbers.active {
    background-color: #216397;
    color: #fff;
    pointer-events: none;
}

.pagination .prev,
.pagination .next {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.pagination .prev:hover,
.pagination .next:hover {
    background-color: rgba(33, 99, 151, 0.08);
}

.pagination ul li span:not(.page-numbers) {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    font-size: 15px;
    color: #666;
    letter-spacing: 2px;
}