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



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

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

/* СТИЛИ ХЕДЕРА И ФУТЕРА */
.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;
    flex-wrap: wrap; /* Allow items to wrap */
    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-contacts div {
    color: #fff !important;
    margin-bottom: 6px;
}

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

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


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

.card {
    background: #23272a !important;
    color: #f1f1f1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    text-shadow: none !important;
    border-radius: 12px;
    padding: 24px 20px 20px 20px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.13);
    transition: transform 0.2s, box-shadow 0.2s;
    opacity: 0;
    transform: translateY(20px);
    animation: cardFadeIn 0.5s cubic-bezier(.23,1.02,.53,.97) forwards;
}

.card::before, .card::after {
    display: none !important;
    content: none !important;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 32px rgba(76,175,80,0.18);
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }

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

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

h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    letter-spacing: 1px;
    margin-top: 0;
    margin-bottom: 25px;
}

h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    letter-spacing: 1px;
}

.card p {
    font-size: 1.1em;
}

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

/* Плавные переходы для секций */
section, .colorful-section {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    animation: sectionFadeIn 1s cubic-bezier(.23,1.02,.53,.97) forwards;
    animation-delay: 0.3s;
    transition: box-shadow 0.3s, background 0.3s;
}

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

/* Анимация появления заголовков */
h1, h2, h3, h4, .site-title {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    animation: titleFadeIn 0.9s cubic-bezier(.23,1.02,.53,.97) forwards;
    animation-delay: 0.5s;
}

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




/* Форма обратной связи */
.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;
    
}

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

#preloader{position:fixed;top:0;left:0;width:100vw;height:100vh;background:#181a1b;z-index:9999;display:flex;align-items:center;justify-content:center;transition:opacity .5s;opacity:1}#preloader.hide{opacity:0;pointer-events:none} .spinner{width:60px;height:60px;border:6px solid #23272a;border-top:6px solid #9778C2;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}

.main-btn, button, .filter-btn, .lang-btn, .theme-btn {
    background: linear-gradient(90deg, #17C4D4 0%, #6D00B0 100%) ;
    color: #fff !important;
    border: none;
}
.main-btn:hover, button:hover, .filter-btn:hover, .lang-btn:hover, .theme-btn:hover {
    background: linear-gradient(90deg, #6D00B0 0%, #17C4D4 100%) ;
    color: #fff !important;
}
footer, .main-footer, .footer-content, .footer-links, .footer-contacts, .footer-bottom, .footer-subscribe, .footer-socials {
    font-family: 'Calibri', Arial, Helvetica, sans-serif !important;
}

section, .colorful-section, .steps-section, p {
    font-size: 1.15em;
}

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              */
/* =================================== */

/* Medium devices (tablets, less than 1024px) */
@media (max-width: 1024px) {
    .header-content {
        padding: 15px 20px;
    }
    section, .colorful-section {
        padding: 20px;
        margin: 25px 20px;
    }
    .cards {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 18px;
    }
    .footer-content {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 768px) {
    /* Header & Nav */
    .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 {
        display: contents;
    }
    .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: relative;
        top: auto;
        transform: none;
    }
    
    /* Body Content */
    section, .colorful-section {
        margin: 20px 15px;
        padding: 20px;
    }
    .cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .card {
        padding: 15px;
        min-width: unset;
    }
    .type-img {
        height: 120px;
    }
    h2, h3 {
        font-size: 1.2em;
    }
    .main-btn {
        width: 100%;
        padding: 14px 10px;
        font-size: 1.1em;
        margin: 0 0 10px 0;
        box-sizing: border-box;
    }

    /* Feedback Form */
    .feedback-fab {
        width: 56px;
        height: 56px;
        right: 20px;
        bottom: 25px;
    }
    .feedback-form-container {
        right: 15px;
        bottom: 95px;
        width: auto;
        left: 15px;
        max-width: 400px;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 600px) {
    body {
        font-size: 15px; /* Adjust base font size */
    }

    .main-header, .main-footer {
        border-radius: 0;
    }
    .main-footer {
        padding-top: 20px;
        padding-bottom: 30px;
    }
    nav {
        flex-direction: column;
        gap: 10px;
    }

    section, .colorful-section {
        margin: 15px 10px;
        padding: 15px;
    }
    .card {
        padding: 12px;
    }
    .type-img {
        height: 100px;
    }
    h2, h3 {
        font-size: 1.1em;
        margin-bottom: 15px;
    }
    .main-btn {
        padding: 12px 8px;
        font-size: 1em;
    }

    .feedback-fab {
        right: 12px;
        bottom: 16px;
        width: 52px;
        height: 52px;
    }
    
    .feedback-form-container {
        padding: 15px;
        right: 10px;
        left: 10px;
        bottom: 80px;
        width: auto;
    }
}

/* Super small devices */
@media (max-width: 400px) {
    .site-title {
        font-size: 1.5em;
    }
    section, .colorful-section, .card {
        padding-left: 8px;
        padding-right: 8px;
    }
}
