/* calculator.css — стили для страницы калькулятора, полностью скопированы из style.css */

html, body {
    overflow-x: hidden;
    font-family: 'Calibri', Arial, Helvetica, sans-serif;
}

body {
    margin: 0;
    background: url('/static/images/background5.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #f1f1f1;
}

/* СТИЛИ ХЕДЕРА И ФУТЕРА */
.main-header {
    background: linear-gradient(90deg, #5865F2 0%, #4752C4 100%); 
    box-shadow: 0 4px 32px rgba(33,150,243,0.18);
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    animation: headerFadeIn 1.2s ease;
    padding: 0;
}

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

.main-header .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 20px 0 5px 0;
}

.site-title {
    color: #fff;
    background: none;
    font-size: 2.1em;
    margin: 0;
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    animation: titleFadeIn 0.9s cubic-bezier(.23,1.02,.53,.97) forwards;
    animation-delay: 0.5s;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}



@keyframes titleFadeIn {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding-bottom: 20px;
    margin: 0;
    opacity: 0;
    transform: translateY(-20px);
    animation: navFadeIn 0.8s 0.3s cubic-bezier(.23,1.02,.53,.97) forwards;
}

@keyframes navFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

nav a {
    color: #f1f1f1;
    text-decoration: none;
    font-weight: bold;
    padding: 6px 14px;
    border-radius: 4px;
    transition: background 0.2s;
    position: relative;
    overflow: hidden;
    font-family: 'Calibri', Arial, Helvetica, sans-serif;
    background: none;
    box-shadow: none;
    border: none;
}

nav a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 3px;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #9778C2 60%, #2196f3 100%);
    border-radius: 2px;
    transition: width 0.3s, left 0.3s;
    z-index: 1;
}

nav a:hover::after, nav a.active::after {
    width: 80%;
    left: 10%;
}

nav a:hover, nav a.active {
    background: none;
    color: #9778C2;
    box-shadow: none;
    border: none;
}

.main-footer {
    background: #5865F2;
    color: #fff;
    padding: 40px 0 0 0;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -4px 32px rgba(33,150,243,0.18);
    margin: 0;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 40px;
    padding-bottom: 20px;
    flex-wrap: wrap;
}

.footer-contacts, .footer-links {
    min-width: 180px;
    text-align: center;
}

.footer-contacts h4, .footer-links h4 {
    margin-bottom: 10px;
    color: #b3e5fc;
    font-size: 1.1em;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    letter-spacing: 1px;
}

.footer-links a {
    display: block;
    color: #fff;
    text-decoration: none;
    margin-bottom: 6px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #9778C2;
}

.footer-big-title {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 12vw;
    color: #e6e9ff;
    opacity: 0.65;
    line-height: 1;
    margin: 30px 0 0 0;
    padding: 0;
    background: none;
    border: none;
    user-select: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-socials {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s;
}

.footer-social-link:hover {
    transform: scale(1.15);
}

section {
    margin: 40px auto;
    max-width: 900px;
    background: transparent;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.colorful-section {
    background: transparent;
    box-shadow: 0 4px 32px rgba(76,175,80,0.15);
    border-radius: 16px;
    margin-bottom: 30px;
    padding-top: 40px;
    padding-bottom: 40px;
}

input, select, button, textarea {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #181a1b;
    color: #f1f1f1;
    font-family: 'Calibri', Arial, Helvetica, sans-serif;
    cursor: pointer;
}
select option{
    cursor: pointer;
}

input:focus, select:focus, textarea:focus {
    outline: 2px solid #9778C2;
}

button {
    background: #9778C2;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: #825aa9; /* Darker shade for hover */
}

button:focus { 
    outline: 2px solid #FFD600 !important; 
    outline-offset: 2px; 
    box-shadow: 0 0 0 2px #FFD60055; 
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.colorful-section {
    background: transparent !important;
    box-shadow: 0 4px 32px rgba(76,175,80,0.15);
    border-radius: 16px;
    margin-bottom: 40px;
    padding-top: 40px;
    padding-bottom: 40px;
}

.steps-section {
    background: transparent !important;
    box-shadow: 0 4px 32px rgba(33,150,243,0.12);
    border-radius: 16px;
    margin-bottom: 30px;
    padding-top: 40px;
    padding-bottom: 40px;
}

.main-banner {
    width: 100%;
    max-width: 900px;
    height: 220px;
    object-fit: cover;
    border-radius: 14px;
    margin: 20px auto 0 auto;
    display: block;
    box-shadow: 0 4px 24px rgba(76,175,80,0.18);
    opacity: 0;
    transform: scale(0.98);
    animation: bannerFadeIn 1s 0.3s cubic-bezier(.23,1.02,.53,.97) forwards;
    will-change: transform;
}

.type-img {
    width: 100%;
    max-width: 320px;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(33,150,243,0.13);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.calc-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.calc-sum-label {
    width: 380px;
    font-size: 1.25em;
    font-weight: bold;
    color: #17C4D4;
    background: #232a4d;
    border-radius: 8px;
    padding: 10px 16px;
    margin: 18px 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

input, select, button {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #181a1b;
    color: #f1f1f1;
}

input:focus, select:focus {
    outline: 2px solid #9778C2;
}

button {
    background: #9778C2;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: #9778C2 !important;
    color: #fff;
}

button:focus { 
    outline: 2px solid #FFD600 !important; 
    outline-offset: 2px; 
    box-shadow: 0 0 0 2px #FFD60055; 
}

.main-btn {
    display: inline-block;
    background: linear-gradient(90deg, #17C4D4 0%, #6D00B0 100%) !important;
    color: #fff;
    padding: 16px 38px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 1.18em;
    margin-right: 10px;
    margin-bottom: 10px;
    font-weight: bold;
    letter-spacing: 0.5px;
    box-shadow: none;
    border: none !important;
    transition: background 0.25s, box-shadow 0.25s, transform 0.2s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.main-btn:hover {
    background: linear-gradient(90deg, #6D00B0 0%, #17C4D4 100%) !important;
    box-shadow: none;
    transform: scale(1.06);
    border: none !important;
}

.main-btn:active {
    transform: scale(0.94) rotate(-1deg);
    box-shadow: none;
    filter: brightness(0.95);
    border: none !important;
}

body.light-theme nav a,
body.light-theme .site-title,
body.light-theme .site-slogan {
    color: #1a1a1a !important;
    text-shadow: 0 1px 0 #fff8, 0 2px 8px #fff2;
}

body.light-theme nav a.active,
body.light-theme nav a:hover {
    color: #c62828 !important;
}

body.light-theme nav a {
    position: relative;
    border: none;
    background: none;
    box-shadow: none;
    transition: background 0.3s, color 0.3s;
}

body.light-theme nav a::after {
    content: '';
    display: block;
    position: absolute;
    left: 10%;
    bottom: 3px;
    width: 80%;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, #b3e5fc 0%, #ffb6c1 100%);
    opacity: 0.7;
    transition: background 0.3s, height 0.3s, opacity 0.3s;
}

body.light-theme nav a.active::after,
body.light-theme nav a:hover::after {
    height: 5px;
    opacity: 1;
    background: linear-gradient(90deg, #b3e5fc 0%, #ffb6c1 100%);
} 

.calculator-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
}

.calc-form {
    background: rgba(20, 20, 40, 0.85);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    padding: 32px 28px;
    max-width: 420px;
    width: 100%;
    margin: 0;
    backdrop-filter: blur(4px);
    animation: slide-in-form 1.5s forwards;
    position: relative;
    z-index: 2;
    height: auto; /* Убрана фиксированная высота 800px */
}

.calculator-image {
    height: auto; /* Убрана фиксированная высота 864px */
    opacity: 0;
    animation: slide-in-image 1.5s 0.5s forwards;
    position: relative;
    z-index: 1;
}

.calculator-image img {
    width: 100%;
    height: 100%;
    opacity: 0.85;
    object-fit: cover;
    border-radius: 0 24px 24px 0;
}

@keyframes slide-in-form {
    from {
        transform: translateX(50%);
        opacity: 0;
    }
    to {
        transform: translateX(25px);
        opacity: 1;
    }
}

@keyframes slide-in-image {
    from {
        opacity: 0;
        transform: translateX(-150px);
    }
    to {
        opacity: 1;
        transform: translateX(-25px);
    }
}

h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    letter-spacing: 1px;
    margin-top: 0;
    text-align: center;
    font-size: 2em;  
    transform: translateY(-20px);
    opacity: 0;
    animation: navFadeIn 0.8s 0.3s cubic-bezier(.23,1.02,.53,.97) forwards;
}

.calc-form input, .calc-form select, .calc-form textarea {
    border: 2px solid #232a4d;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 1.08em;
    background: #181a2b;
    color: #fff;
    margin-bottom: 12px;
    transition: border 0.2s, box-shadow 0.2s;
    accent-color: #6D00B0;
    
}

.calc-form input[type="checkbox"] {
    accent-color: #6D00B0;
        width: 18px;
        height: 18px;
        margin: 0;
        padding: 0;
        flex-shrink: 0;
}

.calc-form textarea {
    resize: none;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 120px;
}

.calc-form input:focus, .calc-form select:focus, .calc-form textarea:focus {
    border-color: #17C4D4;
    box-shadow: 0 0 0 2px #17C4D455;
}

.calc-form .calc-opt-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    cursor: pointer;
}

.burger-menu {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    z-index: 1001;
    position: absolute;
    right: 20px;
    top: 28px;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

.feedback-fab {
    position: fixed;    
    right: 28px;
    bottom: 32px;
    z-index: 1200;
    width: 62px;
    height: 62px;
    background: linear-gradient(135deg, #6D00B0 0%, #17C4D4 100%);
    border-radius: 50%;
    box-shadow: 0 4px 24px rgba(33,150,243,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

@keyframes chatFabIn {
    from { opacity: 0; transform: scale(0.7) translateY(60px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.feedback-fab:hover {
    transform: scale(1.08);
}

.feedback-form-container {
    position: fixed;
    right: 32px;
    bottom: 110px;
    z-index: 1300;
    background: #23272a;
    border-radius: 18px;
    box-shadow: 0 8px 40px rgba(33,150,243,0.18);
    width: 340px;
    max-width: 95vw;
    padding: 20px;
    opacity: 0;
    pointer-events: none; /* Исправлена опечатка с point-events */
    transform: translateY(40px) scale(0.98);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    visibility: hidden; /* Initially hidden */
}

.feedback-form-container.active {
    visibility: visible;
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1);
}

.feedback-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.feedback-form-header h3 {
    margin: 0;
    color: #9778C2;
    font-size: 1.3em;
}

.close-feedback-form {
    font-size: 2em;
    color: #b3e5fc;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-feedback-form:hover {
    color: #9778C2;
}

#feedback-form label {
    color: #b3e5fc;
    font-size: 1em;
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
}

#feedback-form input,
#feedback-form textarea {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #181a1b;
    color: #f1f1f1;
    font-size: 1em;
    margin-bottom: 15px;
    box-sizing: border-box;
    resize: none;
}

#feedback-form button {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    margin-top: 10px;
}

body.menu-open {
    overflow: hidden;
}

.burger-menu {
    display: none;
    cursor: pointer;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.7);
    padding: 8px;
    border-radius: 8px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2000;
    transition: all 0.3s ease;
}

.burger-menu:hover {
    background: rgba(255, 255, 255, 0.1);
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px 0;
    transition: all 0.3s cubic-bezier(.68,-0.55,.27,1.55);
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* MEDIA QUERIES */

@media (max-width: 1000px) {
    /* Скрытие изображения и отключение анимаций на мобильных устройствах */
    .calculator-image {
        display: none;
    }

    .calc-form,
    .calculator-image {
        animation: none;
        transform: none;
    }

    /* Центрирование контейнера и формы */
    .colorful-section {
        padding: 20px 0;
    }

    .calculator-container {
        padding: 0 15px; /* Добавляем отступы по бокам */
        box-sizing: border-box;
        width: 100%;
        justify-content: center;
    }

    .calc-form {
        margin: 0; /* Убираем авто-отступы, так как контейнер уже центрирует */
        width: 100%;
        max-width: 500px; /* Ограничиваем максимальную ширину */
        box-sizing: border-box; /* Исправляем проблему с "уезжанием" формы */
        padding: 30px 25px;
    }

    .calc-sum-label {
        width: 100%;
        box-sizing: border-box;
    }

    .main-btn {
        width: 100%;
        padding: 16px 12px;
        font-size: 1.1em;
        margin-top: 10px;
    }
}


@media (max-width: 900px) {
    section, .colorful-section {
        padding: 20px;
    }
    .footer-content {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }
    .contact-intro-section {
        flex-direction: column;
    }
    section, .colorful-section, .steps-section {
        padding: 20px;
    }
    .cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 14px;
    }
    .main-banner {
        height: 140px;
    }
}


@media (max-width: 768px) {
    .burger-menu {
        display: block;
    }

    nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: linear-gradient(90deg, #5865F2 0%, #4752C4 100%);
        padding: 20px 0;
        z-index: 1000;
        align-items: center;
    }

    nav.active {
        display: flex;
    }

    nav a {
        text-align: center;
        padding: 12px 0;
        font-size: 1.1em;
    }

    nav a:hover::after, nav a.active::after {
        left: 50%;
        transform: translateX(-50%);
        width: 80%;
    }

    .calc-opt-label {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
        cursor: pointer;
        font-size: 1em;
    }

    .calc-opt-label input[type="checkbox"] {
        accent-color: #6D00B0;
        width: 18px;
        height: 18px;
        margin: 0;
        padding: 0;
        flex-shrink: 0;
    }

    .main-header {
        position: relative;
        display: flex;
        align-items: center;
        padding: 0 20px;
        height: 70px;
        border-radius: 0;
    }
    
    .header-content {
        justify-content: flex-start;
        padding: 0;
    }
    
    .site-title {
        font-size: 1.8em;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(40, 43, 48, 0.9);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        gap: 20px;
        z-index: 1500;
    }

    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        font-size: 1.8em;
        color: #fff;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .nav-links.active a {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-links.active a:nth-child(1) { transition-delay: 0.2s; }
    .nav-links.active a:nth-child(2) { transition-delay: 0.3s; }
    .nav-links.active a:nth-child(3) { transition-delay: 0.4s; }
    .nav-links.active a:nth-child(4) { transition-delay: 0.5s; }
    .nav-links.active a:nth-child(5) { transition-delay: 0.6s; }
    .nav-links.active a:nth-child(6) { transition-delay: 0.7s; }

    .burger-menu {
        display: block;
        position: relative;
        top: auto;
        transform: none;
    }

    nav {
        display: contents;
    }
}


@media (max-width: 600px) {
    .main-btn {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 12px 8px;
        font-size: 1em;
        margin-right: 0;
    }

    h2 {
        font-size: 1.5em;
        padding: 0 10px;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .footer-content {
        gap: 12px;
        padding-bottom: 10px;
    }
    
    nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .feedback-fab {
        right: 12px;
        bottom: 16px;
        width: 52px;
        height: 52px;
    }
    
    .feedback-form-container {
        right: 8px;
        bottom: 80px;
        min-width: 90vw;
        padding: 15px;
    }
}

/* Дополнительный адаптив для очень маленьких экранов */
@media (max-width: 480px) {
    h2 {
        font-size: 1.5em;
        padding: 0 8px;
        margin-bottom: 16px;
    }
}

@media (max-width: 360px) {
    h2 {
        font-size: 1.4em;
        padding: 0 5px;
        margin-bottom: 12px;
    }
}

.footer-contacts a {
    color: #fff !important;
    text-decoration: underline;
} 