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;
    position: relative;
}

@keyframes headerFadeIn {
    from { opacity: 0; transform: translateY(-40px); }
    to { opacity: 1; transform: translateY(0); }
}
.header-content {
    display: flex;
    align-items: center ;
    justify-content: center !important;
    gap: 24px;
    padding: 20px 0 5px 0;
}
.main-header .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: relative;
}



.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;
    color: #fff; /* Устанавливаем белый цвет для всего текста в блоке */
}

.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;
    opacity: 0; /* Начальное состояние для анимации */
    transform: translateY(20px); /* Начальное состояние для анимации */
    animation: fadeInUp 0.6s ease-out 0.2s forwards; /* Применяем анимацию с задержкой */
}

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

.footer-contacts a:hover {
    color: #fff;
    text-decoration-color: #9778C2;
}

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

.blog-list {
    display: flex; /* Изменено с grid на flex */
    flex-wrap: wrap; /* Разрешаем перенос элементов */
    justify-content: space-around; /* Центрируем карточки */
    gap: 30px;
    padding-top: 20px;
    padding-bottom: 40px;
}

.blog-item {
    background: rgba(44, 47, 51, 0.8);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    width: 350px; /* Задаем фиксированную ширину */
    opacity: 0; /* Начальное состояние для анимации */
    transform: translateY(30px); /* Начальное состояние для анимации */
    animation: cardFadeInUp 0.6s ease-out forwards; /* Применяем анимацию */
}

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

.blog-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.blog-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.4em;
    color: #58a6ff;
}

.blog-date {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 15px;
}

.blog-info p {
    margin: 0;
    flex-grow: 1;
}

h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    letter-spacing: 1px;
    margin: 0;
    padding-left: 12px;
    font-size: 2em;

}

h4 {
    animation: titleFadeIn 0.9s cubic-bezier(.23,1.02,.53,.97) forwards;
}


.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;
}
section {
    margin: 40px auto;
    max-width: 1200px;
    background: transparent !important;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}
user agent stylesheet
section {
    display: block;
    unicode-bidi: isolate;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 4999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #2c2f33;
    color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.4);
    z-index: 5000;
    max-width: 600px;
    width: 90%;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    font-family: 'Calibri', sans-serif;
    border: 1px solid #444;
}
.modal.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}
.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}
.modal-close:hover {
    color: #fff;
}



/* Конец стилей для модальных окон */

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

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.menu-open {
    overflow: hidden;
}

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



.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 {
    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: 1024px) {
    .header-content {
        padding: 15px 20px;
    }
}

@media (max-width: 768px) {
    /* Header & Nav */
    .main-header {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 20px;
        height: 70px;
    }
    .header-content {
        justify-content: flex-start;
        padding: 0;
        position: static;
    }
    .site-title {
        font-size: 1.8em;
    }
    nav {
        display: contents;
    }

    .main-header, .main-footer {
        border-radius: 0;
    }

    .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; }
    .burger-menu {
        display: block;
        position: absolute;
       
        
        right: 0px;
        z-index: 2000;
    }
}

@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: 4px;
        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;
} 

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