* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #000000;
    color: #f0f0f0;
    line-height: 1.5;
    overflow-x: hidden;
}

:root {
    --bg-dark: #000000;
    --bg-elevated: #0a0a0a;
    --surface: rgba(20, 20, 30, 0.7);
    --border: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent1: #06cca8;
    --accent2: #f2f7a5;
    --accent3: #f2ffd1;
    --transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    --glass-bg: rgba(15, 15, 25, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
}

#part {
    top:-20px;
}

body, .container, .hero-content, .popup-content, .case-card, .popup-text, .popup-contacts, button, input, textarea, select {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: normal;
    hyphens: none;
}

.marquee-logos:hover .marquee-content {
    animation-play-state: paused;
    -webkit-animation-play-state: paused;
}

.marquee-logos .client-logo {
    transition: transform 0.3s ease, filter 0.3s ease;
}
.marquee-logos .client-logo:hover {
    transform: scale(1.15);
    filter: brightness(1.2) drop-shadow(0 0 8px rgba(6, 204, 168, 0.4));
}

.marquee-logos {
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

@keyframes glowPulse {
    0% { box-shadow: 0 0 15px rgba(6, 204, 168, 0.6); }
    50% { box-shadow: 0 0 40px rgba(255, 255, 255, 0.8), 0 0 80px rgba(6, 204, 168, 0.4); }
    100% { box-shadow: 0 0 15px rgba(6, 204, 168, 0.6); }
}

#logo-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

.header {
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    transition: var(--transition);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    flex-wrap: wrap;
}

.logo {
    order: 1;
}
.logo img {
    height: 48px;
    width: auto;
    filter: brightness(1.1);
    transition: transform 0.2s;
}
.logo img:hover {
    transform: scale(1.02);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    order: 2;
}
.header-social {
    display: flex;
    align-items: center;
    gap: 12px;
}
.header-social .social-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--text-primary);
    transition: all 0.2s ease;
    text-decoration: none;
}
.header-social .social-icon:hover {
    background: var(--accent1);
    color: #000;
    transform: translateY(-2px);
}
.header-social .social-icon img {
    max-width: 22px;
    max-height: 22px;
    filter: brightness(0) invert(1);
}
.header-social .social-icon:hover img {
    filter: none;
}

.burger-btn {
    display: none;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border);
    width: 44px;
    height: 44px;
    border-radius: 40px !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: 0.2s;
    z-index: 210;
    flex-shrink: 0;
}
.burger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s;
    border-radius: 2px;
}
.burger-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.burger-btn.active span:nth-child(2) {
    opacity: 0;
}
.burger-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-wrapper {
    order: 3;
}
.nav-menu {
    display: flex;
    gap: 48px; /* увеличенное пространство между кнопками на ПК */
}
.nav-link {
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    padding: 6px 0;
    position: relative;
    transition: var(--transition);
    font-family: inherit;
    border-radius: 0;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent1);
    transition: width 0.25s;
}
.nav-link:hover::after {
    width: 100%;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 200;
    transition: right 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    display: flex;
    flex-direction: column;
    padding: 80px 20px 30px;
    box-shadow: -4px 0 20px rgba(0,0,0,0.5);
}
.mobile-menu.active {
    right: 0;
}
.mobile-menu-header {
    text-align: center;
    margin-bottom: 40px;
}
.mobile-logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #FFFFFF, #6BD4D0, #E7D738);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.mobile-nav-items {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.mobile-nav-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 60px;
    padding: 14px 20px;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: inherit;
}
.mobile-nav-item i {
    width: 24px;
    font-size: 20px;
    color: var(--accent1);
}
.mobile-nav-item:hover {
    background: rgba(6,204,168,0.2);
    border-color: var(--accent1);
    transform: translateX(6px);
}
.mobile-social {
    margin-top: -20px;
    display: flex;
    justify-content: center;
    gap: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.15);
}
.mobile-social .social-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    text-decoration: none;
}
.mobile-social .social-icon:hover {
    background: var(--accent1);
    color: #000;
    transform: translateY(-3px);
}
.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 40px;
    font-size: 20px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.mobile-menu-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: 40px 0 20px;
}
.hero-title {
    font-size: clamp(36px, 8vw, 70px);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff, var(--accent2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-subtitle {
    font-size: clamp(16px, 4vw, 20px);
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 600px;
}

.btn, button, .chat-open-btn, .popup-nav-btn, .popup-close {
    border-radius: 40px !important;
}
.btn {
    background: transparent;
    border: 1px solid var(--border);
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    color: var(--text-primary);
}
.btn-primary {
    background: var(--accent1);
    border-color: var(--accent1);
    color: #000;
}
.btn-primary:hover {
    background: transparent;
    color: var(--accent1);
    transform: translateY(-3px);
}
.btn-submit {
    background: var(--accent1);
    border: none;
    color: #000;
    width: 100%;
    transition: 0.2s;
}
.btn-submit:hover {
    background: var(--accent2);
    color: #000;
}

.marquee-wrapper {
    position: relative;
    z-index: 2;
}


.marquee {
    overflow: hidden;
    white-space: nowrap;
    background: var(--surface);
    backdrop-filter: blur(4px);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    will-change: contents;
}

.marquee-content {
    display: flex;                      /* вместо inline-block */
    flex-wrap: nowrap;                  /* гарантирует одну строку */
    width: max-content;                 /* ширина по содержимому */
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    animation: scrollMarquee 40s linear infinite;
    -webkit-animation: scrollMarquee 40s linear infinite; /* префикс */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.marquee-services .marquee-content span {
    font-size: 18px;
    font-weight: 500;
    margin: 0 20px;
    letter-spacing: -0.2px;
}

.dot {
    color: var(--accent1);
}

.marquee-content span,
.marquee-content .dot {
    flex-shrink: 0;                     /* не сжимаются */
    white-space: nowrap;
}

.marquee-logos .client-logo {
    height: 36px;
    width: auto;
    margin: 0 30px;
    flex-shrink: 0;
    filter: brightness(0.75);
    transition: filter 0.3s, transform 0.2s;
}

.client-logo:hover {
    filter: brightness(1);
    transform: scale(1.02);
}

.client-logo {
    height: 36px;
    width: auto;
    margin: 0 30px;
    filter: brightness(0.75);
    transition: filter 0.3s, transform 0.2s;
}
.client-logo:hover {
    filter: brightness(1);
    transform: scale(1.02);
}

@keyframes scrollMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@-webkit-keyframes scrollMarquee {      /* префикс для ключевых кадров */
    0% { -webkit-transform: translateX(0); }
    100% { -webkit-transform: translateX(-50%); }
}

.contact-section {
    padding: 50px 0 80px;
    background: var(--bg-elevated);
    position: relative;
    z-index: 2;
    top:-10px;
}
.section-title {
    font-size: clamp(28px, 6vw, 42px);
    font-weight: 500;
    margin-bottom: 40px;
    letter-spacing: -1px;
}
.contact-form-wrapper {
    max-width: 700px;
    margin: 0 auto;
}
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.form-group input, .form-group textarea {
    width: 100%;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border);
    padding: 14px 18px;
    font-family: inherit;
    font-size: 16px;
    color: var(--text-primary);
    transition: var(--transition);
    border-radius: 28px;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent1);
    box-shadow: 0 0 0 2px rgba(6,204,168,0.2);
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(16px);
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
}
.popup-overlay.active {
    display: flex;
    animation: fadeIn 0.25s ease;
}
.popup-container {
    width: 92%;
    max-width: 1300px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    margin: 50px auto;
    transform: translateY(-20px);
    animation: slideDown 0.35s forwards;
    overflow: hidden;
}
@keyframes slideDown {
    to { transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 15px;
}
.popup-nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.popup-nav-btn {
    background: none;
    border: none;
    font-size: 17px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px 18px;
    transition: 0.2s;
    border-radius: 40px;
}
.popup-nav-btn.active {
    color: var(--accent1);
    background: rgba(6,204,168,0.15);
}
.popup-close {
    background: rgba(255,255,255,0.1);
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.popup-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}
.popup-content {
    padding: 30px 24px;
    min-height: 380px;
}
.popup-form-section {
    padding: 28px 24px;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.3);
}
.popup-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 20px;
}
.form-row {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.form-row input {
    flex: 1;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 15px;
    border-radius: 40px;
}
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 30px;
}
.case-card {
    background: rgba(20,20,30,0.6);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.case-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 30px -10px rgba(0,0,0,0.5);
    border-color: var(--accent1);
}
.case-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
.case-card h3 {
    padding: 16px 16px 8px;
    font-size: 20px;
    font-weight: 600;
    max-height: 7.0rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.case-card p {
    padding: 0 16px 20px;
    color: var(--text-secondary);
    max-height: 3.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.case-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(24px);
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
}
.case-modal-overlay.active {
    display: flex;
}
.case-modal {
    max-width: 600px;
    width: 90%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 28px;
    position: relative;
    animation: fadeInUp 0.3s ease;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.case-modal h3 {
    font-size: 28px;
    margin-bottom: 16px;
    color: var(--accent1);
}
.case-modal p {
    margin-bottom: 12px;
    line-height: 1.5;
}
.case-modal .close-modal {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #fff;
}

.case-images {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    justify-content: flex-start;
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
}
.case-images img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--glass-border);
}
.case-images img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(6,204,168,0.3);
    border-color: var(--accent1);
}
.case-images.horizontal-scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
}
.case-images.horizontal-scroll img {
    flex-shrink: 0;
}

.chat-widget {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.chat-bubble {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    min-height: 240px;
    width: 280px;
    display: flex;
    flex-direction: column;
    border-radius: 28px !important;
    box-shadow: 0 12px 28px rgba(0,0,0,0.4);
    margin-bottom: 16px;
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    transform-origin: bottom right;
    overflow: hidden;
}
.chat-bubble.active {
    transform: scale(1);
}
.chat-bubble-header {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--accent1);
    color: #000;
    font-weight: 600;
}
.chat-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #000;
    transition: opacity 0.2s;
}
.chat-bubble-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px !important;
    font-size: 20px !important;
    line-height: 1.4;
}
.chat-open-btn {
    background: var(--accent1);
    border: none;
    width: 56px;
    height: 56px;
    font-size: 28px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: glowPulse 2.5s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(6, 204, 168, 0.6);
}
.chat-open-btn:hover {
    transform: scale(1.05);
    background: var(--accent2);
}

.popup-about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 30px 0;
}
.popup-about-img, .popup-about-video {
    width: 100%;
    border-radius: 24px;
border: none !important;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #FFFFFF, #6BD4D0, #E7D738, #F2F6AE);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
    line-height: 1.2;
    transition: transform 0.2s ease;
}
.logo-text:hover {
    transform: scale(1.02);
}

.custom-select {
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border);
    padding: 14px 18px;
    font-family: inherit;
    font-size: 16px;
    color: var(--text-primary);
    border-radius: 28px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b0b0b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 18px center;
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
}
.custom-select:focus {
    outline: none;
    border-color: var(--accent1);
    box-shadow: 0 0 0 2px rgba(6,204,168,0.2);
}
.custom-select option {
    background: #1a1a1a;
    color: #fff;
}

.social-links {
    display: flex;
    gap: 16px;
    align-items: center;
}
.social-icon {
    color: var(--text-secondary);
    font-size: 22px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    text-decoration: none;
}
.social-icon:hover {
    color: var(--accent1);
    background: rgba(6,204,168,0.15);
    transform: translateY(-2px);
}

.chat-messages {
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chat-message {
    max-width: 80%;
    padding: 6px 12px;
    border-radius: 18px;
    word-break: break-word;
}
.chat-message.user {
    align-self: flex-end;
    background: var(--accent1);
    color: #000;
}
.chat-message.admin {
    align-self: flex-start;
    background: rgba(255,255,255,0.2);
    color: #fff;
}

#star-trail-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* ===================== АДАПТИВНОСТЬ ===================== */
@media (min-width: 769px) {
    .header-container {
        justify-content: flex-start;
    }
    .logo {
        margin-right: auto;
    }
    .burger-btn {
        display: none;
    }
    .header-right {
        display: flex;
        margin: 0;
        padding: 0;
    }
    .header-social {
        gap: 16px;
        margin: 0;
    }

    div#part {
        top:-20px
    }

    .header-social .social-icon {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }
    .header-social .social-icon img {
        max-width: 24px;
        max-height: 24px;
    }
    .nav-wrapper {
        margin-left: 24px; /* небольшое расстояние между соцсетями и навигацией */
    }
    .nav-menu {
        gap: 48px;
    }
    #logo-canvas {
        position: relative;
        width: 100%;
        height: 100%;
        max-height: 100%;
        object-fit: contain;
        opacity: 1;
        pointer-events: auto;
        cursor: default;
    }
    .hero-grid {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 40px;
        flex-wrap: wrap;
        min-height: 70vh;
    }
    .hero-content {
        flex: 1;
        order: 1;
    }
    .hero-3d-wrapper {
        flex: 1;
        order: 2;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 70vh;
        min-height: 400px;
    }
    .hero-3d-wrapper canvas {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
    }
    .header-container {
        padding: 12px 24px;
    }
    .logo img {
        height: 40px;
    }
    .nav-link {
        font-size: 15px;
        padding: 4px 0;
    }
    .hero {
        padding: 30px 0 20px;
    }
    .mobile-social {
        margin-top: -20px;
    }
}

@media (max-width: 768px) {
    .header-container {
        justify-content: space-between;
        padding: 12px 16px;
    }
    .logo {
        margin-right: 0; /* сброс прижатия */
    }
    .nav-wrapper {
        display: none !important;
    }
    .burger-btn {
        display: flex;
    }
    .logo {
        flex-shrink: 1;
        min-width: 0;
    }
    .logo img {
        height: 36px;
    }
    .header-right {
        display: flex;
        gap: 8px;
        flex-shrink: 0;
    }
    .header-social {
        order: 1;
        gap: 6px;
        margin: 0;
    }
    .burger-btn {
        order: 2;
        width: 42px;
        height: 42px;
        margin: 0;
    }

    #star-trail-canvas {
        display: none;
    }

    .header-social .social-icon {
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(4px);
        font-size: 18px;
    }
    .header-social .social-icon img {
        max-width: 18px;
        max-height: 18px;
    }
    .logo-text {
        font-size: 26px;
    }
    .popup-header {
        flex-direction: row;
        justify-content: space-between;
        padding: 12px 16px;
    }
    .popup-nav {
        overflow-x: auto;
        gap: 8px;
    }
    .popup-nav-btn {
        padding: 6px 14px;
        font-size: 14px;
        white-space: nowrap;
    }
    .custom-select {
        padding: 12px 16px;
        font-size: 15px;
    }
    .popup-close {
        width: 36px;
        height: 36px;
    }
    .popup-content {
        padding: 20px 16px;
    }
    .popup-form-section {
        padding: 20px 16px;
    }
    .hero {
        position: relative;
        overflow: hidden;
        padding: 40px 0 30px;
        min-height: 60vh;
        display: flex;
        align-items: center;
    }
    .hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 1;
        pointer-events: none;
    }
    .hero .container {
        position: relative;
        z-index: 2;
    }
    #logo-canvas {
        filter: none;
        opacity: 0.8;
        z-index: 0;
    }
    #chatInput,
    .chat-bubble input {
        color: #ffffff !important;
    }
    #chatInput::placeholder,
    .chat-bubble input::placeholder {
        color: rgba(255, 255, 255, 0.6);
    }
    .hero-content {
        background: transparent;
        backdrop-filter: none;
        padding: 0;
        margin: 0;
        border: none;
    }
    .hero-title {
        text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 16px;
    }
    .hero-subtitle {
        text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
        font-size: 1rem;
        margin-bottom: 28px;
    }
    .btn-primary {
        padding: 12px 24px;
        font-size: 1rem;
    }
    .cases-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
        padding: 0 8px;
    }
    .case-card img {
        height: 160px;
    }
    .case-card h3 {
        font-size: 1rem;
        padding: 12px 12px 4px;
        margin-bottom: 4px;
    }
    .case-card p {
        font-size: 0.85rem;
        padding: 0 12px 16px;
        margin-top: 0;
    }
    .popup-cases .cases-grid {
        max-height: 70vh;
        overflow-y: auto;
        padding-right: 5px;
    }
    .popup-cases .cases-grid::-webkit-scrollbar {
        width: 4px;
    }
    .popup-cases .cases-grid::-webkit-scrollbar-track {
        background: rgba(255,255,255,0.1);
        border-radius: 4px;
    }
    .popup-cases .cases-grid::-webkit-scrollbar-thumb {
        background: var(--accent1);
        border-radius: 4px;
    }
    .contact-form .form-group input,
    .contact-form .form-group textarea,
    .custom-select {
        font-size: 14px;
        padding: 12px 16px;
    }
    .case-modal {
        padding: 20px;
        max-width: 90%;
    }
    .case-modal h3 {
        font-size: 1.5rem;
    }
    .case-modal p {
        font-size: 0.9rem;
    }
    .case-images img {
        width: 70px;
        height: 70px;
    }
}

.chat-widget {
    z-index: 199;
}
.mobile-menu {
    z-index: 200;
}
#chatInput,
.chat-bubble input {
    color: #ffffff !important;
}
#chatInput::placeholder,
.chat-bubble input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}
