/*
Theme Name: МегаМетражСтрой
Theme URI: https://www.мегаметражстрой.рф
Description: Тема для МегаМетражСтрой. Переделка темы из Elementor без дизайна.
Version: 1.0
Author: Nika Media Group
Author URI: https://nikamg.ru
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
    --primary: #FF7F2A;
    --primary-hover: #FF9E4A;
    --bg: #FAF3EF;
    --bg-primary: #fafafa;
    --text: #333;
    --border-light: #cdd2d7;
    --radius-s: 6px;
    --radius-m: 12px;
    --gap: 24px;
}

/* ----- БАЗА ----- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: "Roboto", sans-serif;
    background-color: var(--bg-primary) !important; /* тема часто перебивает, оставлено */
    color: var(--text);
    font-size: 18px;
    line-height: 1.5;
}
section {
    padding: 3rem 0;
}
.section_title {
    color: #000;
    font-weight: 700;
    margin-bottom: 1.75rem;
}
.section_title:after {
    content: "";
    display: block;
    width: 100px;
    height: 3px;
    background: var(--primary);
}
.price {
    font-weight: 600;
}
.price span {
    color: var(--primary);
    font-size: 1.4rem;
}

/* ----- КНОПКИ (общие правила) ----- */
.btn-primary,
.btn-outline-primary {
    transition: all 0.2s ease;
}
.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-hover);
    --bs-btn-hover-border-color: var(--primary-hover);
    background-color: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}
.btn-primary:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 115, 0, 0.5);
}
.btn-outline-primary {
    --bs-btn-color: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary);
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ----- ШАПКА (всегда светлая) ----- */
.header,
.navbar {
    background-color: #ffffff;
}
.header {
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    width: 100%;
    z-index: 1000;
}
.navbar {
    padding: 0.75rem 0;
}
.navbar-nav .nav-link {
    font-weight: 500;
    color: #333 !important;
    padding: 0.5rem 1rem;
    transition: color 0.2s;
}
.navbar-nav .nav-link:hover {
    color: var(--primary) !important;
}
.btn-primary.popmake-3037 {
    background-color: var(--primary);
    border: 2px solid var(--primary);
    color: #fff;
    border-radius: 30px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
}
.btn-primary.popmake-3037:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
}
.navbar-toggler {
    border: none;
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0,0,0,0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.phone-link {
    color: #333;
    transition: color 0.2s;
}
.phone-link:hover {
    color: var(--primary);
}

/* ----- HERO (с затемнением и фиксированным фоном) ----- */
.hero {
    position: relative;
    min-height: 100vh;
    background-image: url('/wp-content/uploads/backMain-2.webp');
    background-size: cover;
    background-position: bottom center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding-top: 90px;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}
.hero .container-lg {
    position: relative;
    z-index: 2;
}
.hero .hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-shadow: 2px 2px 5px #000;
}
.hero .btn {
    display: inline-block;
    width: auto;
}
@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
        min-height: 80vh;
    }
}

/* ----- СЛАЙДЕР GALLERY ----- */
.gallery-top {
    height: 500px;
    width: 100%;
}
.gallery-top .swiper-slide img,
.gallery-thumbs .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-thumbs {
    height: 100px;
    width: 100%;
    margin-top: 10px;
}
.gallery-thumbs .swiper-slide {
    width: auto;
    height: 100%;
    opacity: 0.4;
}
.gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
}
.swiper-pagination {
    position: relative;
    padding: 1rem 0;
}
.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
}

/* ----- АДАПТИВНАЯ СЕТКА ----- */
@media (min-width: 768px) {
    .col-md-custom-5 {
        flex: 0 0 auto;
        width: 20%;
    }
}

/* ----- АККОРДЕОН ----- */
.accordion-item .accordion-button {
    padding: 1.25rem 1.75rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.25rem;
}
.accordion-button:not(.collapsed) {
    background-color: #fff;
}
.accordion-item .accordion-body {
    padding: 1.25rem 1.75rem;
}

/* ----- ФОРМЫ ----- */
.order-form .wpcf7 {
    max-width: 800px;
    margin: 0 auto;
}
.form-consent input {
    width: auto !important;
    margin-bottom: 0;
}

/* ----- МОБИЛЬНОЕ МЕНЮ (открытое состояние) ----- */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: #ffffff;
        border-radius: 16px;
        padding: 1rem;
        margin-top: 0.75rem;
        box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    }
    .navbar-nav {
        flex-direction: column !important;
        text-align: center;
        width: 100%;
        gap: 0.5rem;
    }
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
        border-radius: 12px;
        color: #1f2937;
    }
    .navbar-nav .nav-link:hover {
        background: #f3f4f6;
    }
    .navbar-collapse .d-flex {
        justify-content: center;
        margin-top: 0.75rem;
    }
}

/* ----- POPUP (калькулятор / форма) ----- */
.pum-overlay {
    backdrop-filter: blur(4px);
}
#popmake-122 {
    --clr-main: var(--primary);
    --clr-main-dark: #0557b3;
    --clr-soft: #eef1f6;
    background: #fff !important;
    border-radius: var(--radius-m);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 32px;
    max-width: 600px;
    margin: 20px auto;
    font: 16px/1.45 "Segoe UI", "Roboto", sans-serif;
    color: #333;
}
#popmake-122 input:not([type="radio"]),
#popmake-122 select {
    width: 100%;
    height: 48px;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-s);
    font: inherit;
    transition: border-color 0.25s, box-shadow 0.25s;
}
#popmake-122 select {
    appearance: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23666' d='M2 5L0 0h4z'/%3E%3C/svg%3E") no-repeat right 14px center/8px 10px;
    padding-right: 40px;
}
.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: var(--gap);
}
.input-group label {
    margin-bottom: 8px;
    font-weight: 600;
}
.form-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: var(--gap);
}
.form-row .input-group {
    margin-bottom: 0;
}
.mcx-radio {
    align-items: center;
    margin: var(--gap) 0;
    border: none;
    padding: 0;
}
.mcx-radio legend {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 14px;
}
.mcx-radio label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin: 8px 0;
    font-weight: 400;
    font-size: 14px;
}
.mcx-radio input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    transition: border-color 0.2s;
    position: relative;
}
.mcx-radio input[type="radio"]:checked {
    border-color: var(--clr-main);
}
.mcx-radio input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    background-color: var(--primary);
    border-radius: 50%;
}
.mcx-radio input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,109,228,0.2);
}
.mcx-btns {
    display: flex;
    gap: 14px;
    margin-top: 32px;
}
.mcx-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: var(--radius-s);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s, transform 0.25s;
}
.mcx-btn:active {
    transform: translateY(1px);
}
.mcx-btn.primary {
    background: var(--clr-main);
    color: #fff;
}
.mcx-btn.primary:hover {
    background: var(--clr-main-dark);
}
.mcx-btn.reset {
    background: var(--clr-soft);
    color: #333;
}
.mcx-btn.reset:hover {
    background: #e2e5ec;
}
.mcx-result {
    margin-top: 28px;
    padding: 20px;
    background: #f9fafb;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-s);
    animation: fade-in 0.4s ease;
}
.mcx-result p {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
}
.mcx-result strong {
    color: var(--clr-main);
    font-weight: 700;
}
@keyframes fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
#popmake-122 input[type="number"] {
    -moz-appearance: textfield;
}
#popmake-122 input[type="number"]::-webkit-outer-spin-button,
#popmake-122 input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
@media (max-width: 480px) {
    #popmake-122 {
        padding: 24px;
        margin: 10px;
    }
    .form-row {
        flex-direction: column;
    }
    .mcx-btns {
        flex-direction: column;
        gap: 8px;
        margin-top: 16px;
    }
    .mcx-btns .mcx-btn {
        width: 100%;
    }
}
/* закрывающая кнопка попапа */
.pum-theme-content-only .pum-content + .pum-close,
.pum-theme-116 .pum-content + .pum-close {
    display: block !important;
    font-size: 32px !important;
    width: 32px !important;
    height: 32px !important;
}

/* ----- ФУТЕР ----- */
.footer-nav .nav-link,
.footer-contacts a {
    color: #fff;
    text-decoration: none;
}
.footer-nav .nav-link:hover,
.footer-nav .nav-link:focus,
.footer-contacts a:hover,
.footer-contacts a:focus {
    color: var(--primary);
}
.properties-item {
    text-decoration: none;
}

/* Заголовок */
.mortage_item_title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a2c3e;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #ffb347;
    display: inline-block;
}

/* Блок проблемы */
.mortage_item_problem {
    background: #fff7eb;
    border-left: 5px solid #ff8c42;
    padding: 1rem 1.2rem;
    margin: 1rem 0 1.5rem 0;
    border-radius: 16px;
    font-size: 1rem;
    line-height: 1.45;
    color: #2c3e4e;
}

.mortage_item_problem i {
    color: #c0392b;
    font-style: italic;
    font-weight: 500;
}

/* Блок решения */
.mortage_item_decision {
    background: #eef5f2;
    border-radius: 16px;
    padding: 1rem 1.2rem;
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: #1e3c2c;
}

.mortage_item_decision b {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    color: #2b6e3c;
    margin-bottom: 0.75rem;
}

.mortage_item_decision .emoji {
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
}