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;
}

body.menu-open {
    overflow: hidden;
}

/* СТИЛИ ХЕДЕРА И ФУТЕРА */
.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;
}

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; 
}

.main-btn {
    width: 100%;
    font-size: 1.15em;
    padding: 18px 0;
    border-radius: 12px;
    background: linear-gradient(90deg, #17C4D4 0%, #6D00B0 100%);
    color: #fff;
    font-weight: bold;
    box-shadow: 0 4px 16px #6D00B055;
    transition: transform 0.15s, box-shadow 0.15s, background 0.25s;
    border: none;
}
.main-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 32px #17C4D455;
    background: linear-gradient(90deg, #6D00B0 0%, #17C4D4 100%);
}

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

.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);
}

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

.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;
    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;
}

#order-form {
    background: rgba(35, 39, 42, 0.7);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-grow: 1;
    z-index: 2;
    position: relative;
    animation: formSlideIn 1s ease-out forwards;
}

@keyframes formSlideIn {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

#order-form label {
    font-weight: bold;
    color: #b3e5fc;
    margin-bottom: 5px;
    display: block;
}

#order-form input, #order-form select, #order-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #181a1b;
    color: #f1f1f1;
    box-sizing: border-box;
    margin-bottom: 15px;
    transition: all 0.3s;
}

#order-form input:focus, #order-form select:focus, #order-form textarea:focus {
    outline: none;
    border-color: #9778C2;
    box-shadow: 0 0 10px rgba(151, 120, 194, 0.5);
}

.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    width: 8px;
    height: 8px;
    border-right: 2px solid #f1f1f1;
    border-bottom: 2px solid #f1f1f1;
    transform: translateY(-75%) rotate(45deg);
    pointer-events: none;
    transition: all 0.2s;
}

#order-form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 40px; 
}

#order-form select::-ms-expand {
    display: none;
}


#order-form button {
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.2em;
    transition: background-color 0.3s, transform 0.2s;
}

#order-form button:hover {
    background-color: #825aa9;
    transform: translateY(-2px);
}

#order-form textarea {
    resize: none;
    min-height: 100px;
}

.form-with-image-container {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; 
}

.form-aside-image {
    width: 450px; 
    height: auto;
    z-index: 1;
    opacity: 0;
    animation: slideInFromBehind 1s forwards 0.2s; /* Изменим анимацию */
}

@keyframes slideInFromBehind { /* Новая анимация */
    0% {
        opacity: 0;
        transform: translateX(-50%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .form-with-image-container {
        flex-direction: column;
        padding-right: 0;
    }
    .form-aside-image {
        position: relative;
        transform: translateY(0); /* Изменим transform для мобильных */
        margin-top: 20px;
        width: 80%; /* Сделаем ширину адаптивной */
        max-width: 300px; /* Ограничим максимальный размер */
    }
}

.contact-intro-section {
    display: flex;
    gap: 30px;
    align-items: center;
}

.contact-intro-text {
    flex: 2;
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInFromLeft 1s forwards;
}

.contact-info-card {
    flex: 1;
    background: rgba(40, 43, 48, 0.8);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateX(60px) scale(0.98);
    animation: slideInFromRight 1s forwards 0.3s;
}

.contact-info-card p {
    margin: 0 0 15px 0;
}

.contact-info-card a {
    color: #9778C2;
    text-decoration: none;
    font-size: 1.1em;
    transition: color 0.3s;
}

.contact-info-card a:hover {
    color: #ad8dd1;
}

@keyframes slideInFromLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.form-section {
    padding-top: 20px;
}

/* MEDIA QUERIES */

@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;
    }
}

@media (max-width: 849px) {
    .form-aside-image {
        display: none;
    }
}

@media (max-width: 768px) {
    .form-with-image-container {
        flex-direction: column;
    }
    .form-aside-image {
        position: relative;
        transform: translateY(0);
        margin-top: 20px;
        width: 80%;
        max-width: 300px;
    }
}

@media (max-width: 600px) {
    .main-header, .main-footer {
        border-radius: 0;
        padding: 10px 0 30px;
    }
    .footer-content {
        gap: 12px;
        padding-bottom: 10px;
    }
    .main-btn {
        width: 100%;
        padding: 12px 8px;
        font-size: 1em;
        margin-right: 0;
    }
    nav {
        flex-direction: column;
        gap: 10px;
    }
     .feedback-fab {
        right: 12px;
        bottom: 16px;
        width: 52px;
        height: 52px;
    }
    .feedback-form-container {
        right: 8px;
        bottom: 80px; /* Adjusted from 70px to avoid overlap */
        min-width: 90vw;
        padding: 15px;
    }
    #order-form input, #order-form select, #order-form textarea {
        padding: 10px 12px;
        font-size: 16px;
    }

    .select-wrapper::after {
        right: 15px;
    }
}

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

.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 (max-width: 768px) {
    .main-header {
        position: relative;
        display: flex;
        align-items: center;
        padding: 0 20px;
        height: 70px;
    }
    
    .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.show {
        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.show a {
        opacity: 1;
        transform: translateY(0);
    }

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

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

    nav {
        display: contents;
    }
}