@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #030712; 
    color: #f8fafc;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* =========================================================
   ИДЕАЛЬНАЯ СВЕТЛАЯ ТЕМА (LIGHT THEME FIX)
   ========================================================= */
body.light-theme {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

body.light-theme .site-container {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .top-header, 
body.light-theme .header-logo {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
}

body.light-theme .top-navbar {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

body.light-theme .nav-links a {
    color: #475569 !important;
}

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

body.light-theme .tv-card-wrapper .tv-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .tv-card-wrapper .tv-content,
body.light-theme .tv-card-wrapper .tv-content p,
body.light-theme .tv-card-wrapper .tv-lang-title {
    color: #0f172a !important;
}

body.light-theme .contact-form-wrapper {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06) !important;
}

body.light-theme .form-header h2,
body.light-theme .form-group label {
    color: #0f172a !important;
}

body.light-theme .form-group input, 
body.light-theme .form-group textarea {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

body.light-theme .mobile-drawer {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

body.light-theme .drawer-header {
    border-color: #e2e8f0 !important;
}

body.light-theme .drawer-logo span {
    color: #0f172a !important;
}

body.light-theme .mobile-menu-controls {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}

body.light-theme .mobile-nav-links a {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}

body.light-theme .site-footer {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
}

/* =========================================================
   Корпус сайта и Обертка
   ========================================================= */
.site-outer-wrapper {
    width: 100%;
    max-width: 1550px;
    margin: 25px auto;
    padding: 0 15px; 
}

.site-container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 50px);
    width: 100%;
    background-color: #080c14;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #1e293b;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.85), 0 0 30px rgba(30, 58, 138, 0.2);
}

/* =========================================================
   Шапка ПК
   ========================================================= */
.top-header {
    display: flex;
    width: 100%;
    height: 260px;
    background: #080c14;
    border-bottom: 1px solid #1e293b;
}

.header-logo {
    width: 320px;
    min-width: 320px;
    height: 260px;
    background-color: #080c14;
    border-right: 1px solid #1e293b;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
}

.header-logo a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.header-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.header-banner {
    flex: 1;
    height: 260px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.header-banner::before {
    content: '';
    position: absolute;
    inset: -15px;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    animation: kenburnsEffect 20s infinite alternate ease-in-out;
    z-index: 0;
}

@keyframes kenburnsEffect {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.12) translate(-10px, -5px); }
    100% { transform: scale(1.22) translate(8px, 5px); }
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 12, 20, 0.25) 0%, rgba(8, 12, 20, 0.85) 100%);
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
}

.banner-content h1 {
    margin: 0 0 8px 0;
    font-size: 36px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
}

.banner-content p {
    margin: 0;
    font-size: 16px;
    color: #cbd5e1;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* =========================================================
   Навигация ПК
   ========================================================= */
.top-navbar {
    background: #0d1424;
    border-bottom: 1px solid #1e293b;
    width: 100%;
    position: relative;
}

.nav-container {
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    height: 65px;
    position: relative;
}

.nav-spacer {
    width: 130px;
}

.nav-links.desktop-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 12px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    white-space: nowrap;
}

.nav-links a {
    display: block;
    padding: 10px 22px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover {
    color: #ffffff;
    background: #10b981;
    border-color: #34d399;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.7), 0 8px 25px rgba(245, 158, 11, 0.5);
    transform: translateY(-3px);
}

.nav-links a.active-link {
    color: #ffffff;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #34d399;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.6), 0 6px 15px rgba(245, 158, 11, 0.4);
    font-weight: 700;
}

.nav-controls-right {
    display: flex;
    align-items: center;
    gap: 18px;
    z-index: 10;
}

.theme-toggle-switch {
    position: relative;
    display: inline-block;
    width: 62px;
    height: 32px;
}

.theme-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #1e293b;
    border: 1px solid #334155;
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    padding: 3px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

.theme-slider .power-icon {
    width: 24px;
    height: 24px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: .4s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #0f172a;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

input:checked + .theme-slider {
    background-color: #10b981;
    border-color: #34d399;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

input:checked + .theme-slider .power-icon {
    transform: translateX(30px);
    color: #10b981;
}

.mobile-toggle-btn {
    display: none;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    margin-left: auto;
    z-index: 10;
}

.mobile-toggle-btn .bar {
    width: 22px;
    height: 2px;
    background-color: #38bdf8;
    border-radius: 2px;
}

/* =========================================================
   Выезжающее Мобильное Меню
   ========================================================= */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(6px);
    z-index: 9998;
    display: none;
}

.mobile-overlay.active { display: block; }

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 340px;
    height: 100vh;
    background: #0d1424;
    border-left: 1px solid #1e293b;
    z-index: 9999;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: -15px 0 40px rgba(0,0,0,0.85);
    overflow-y: auto;
}

.mobile-drawer.active { right: 0; }

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 14px;
    margin-bottom: 20px;
}

.drawer-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.drawer-logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
}

.drawer-logo span {
    font-weight: 800;
    color: #ffffff;
    font-size: 18px;
    letter-spacing: -0.3px;
}

.drawer-close-btn {
    background: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
    font-size: 22px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.mobile-menu-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #04070d;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #1e293b;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-nav-links a {
    display: block;
    padding: 12px 16px;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.25s ease;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active-link {
    background: #10b981 !important;
    color: #ffffff !important;
    border-color: #34d399 !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.6), 0 6px 20px rgba(245, 158, 11, 0.4) !important;
}

/* =========================================================
   Основной контент и Карточки
   ========================================================= */
.page-content {
    flex: 1;
    width: 100%;
    padding: 40px 35px;
    line-height: 1.8;
    min-height: 500px;
}

.tv-card-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.tv-card-wrapper .tv-card {
    background: linear-gradient(160deg, #0d1f38, #08152b);
    border-radius: 2.5rem;
    padding: 3rem 3.5rem;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(80, 160, 255, 0.12) inset;
    border: 1px solid #2f5a8a;
    width: 100%;
}

.contact-form-wrapper {
    max-width: 720px;
    margin: 0 auto;
    background: linear-gradient(145deg, #0d1424, #080c14);
    border: 1px solid #1e3a5f;
    padding: 35px 40px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(37, 99, 235, 0.1);
}

.form-header { text-align: center; margin-bottom: 25px; }
.form-header h2 { margin: 0 0 10px 0; font-size: 30px; font-weight: 800; color: #ffffff; }
.form-header p { margin: 0; color: #94a3b8; font-size: 14px; }

.person-type-toggle {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 30px auto;
    background: #04070d;
    padding: 5px;
    border-radius: 12px;
    border: 1px solid #1e293b;
    width: fit-content;
}

.type-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 9px 24px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.type-btn:hover {
    background: #10b981;
    color: #fff;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5), 0 5px 15px rgba(245, 158, 11, 0.4);
}

.type-btn.active {
    background: #2563eb;
    color: #ffffff;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #cbd5e1; }
.form-group input, .form-group textarea {
    width: 100%;
    background: #04070d;
    border: 1px solid #1e293b;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
}
.form-group textarea { min-height: 110px; resize: vertical; }

#techvents-contact-form { display: flex; flex-direction: column; }

/* =========================================================
   Кнопка «Написать нам»
   ========================================================= */
.form-submit-row {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
}

.truck-button {
    --color: #ffffff;
    --background: #2563eb;
    
    position: relative !important;
    border: none !important;
    background: var(--background) !important;
    color: var(--color) !important;
    
    width: 240px !important;
    max-width: 240px !important;
    height: 48px !important;
    max-height: 48px !important;
    padding: 0 20px !important;
    
    border-radius: 10px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer;
    overflow: hidden !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    transition: all 0.3s ease;
    margin: 0 auto !important;
}

.truck-button:hover {
    background: #10b981 !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.7), 0 6px 20px rgba(245, 158, 11, 0.5) !important;
}

.truck-button .default {
    display: block !important;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 2;
    white-space: nowrap;
}

.truck-button .success {
    position: absolute !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 2;
    white-space: nowrap;
}

.truck-button .success svg {
    width: 16px !important;
    height: 16px !important;
    stroke: #ffffff;
    stroke-width: 2.5;
    fill: none;
}

.truck-button .truck {
    position: absolute !important;
    width: 50px !important;
    height: 24px !important;
    left: -60px;
    bottom: 12px;
    transition: transform 2s ease-in-out;
    z-index: 1;
}

.truck-button .truck .wheel {
    position: absolute;
    bottom: 0;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1e293b;
    box-shadow: 26px 0 0 #1e293b;
}

.truck-button .truck .back {
    position: absolute;
    left: 0;
    bottom: 4px;
    width: 30px;
    height: 15px;
    border-radius: 3px 0 0 3px;
    background: #38bdf8;
}

.truck-button .truck .front {
    position: absolute;
    right: 0;
    bottom: 4px;
    width: 16px;
    height: 15px;
    border-radius: 0 5px 3px 0;
    background: #60a5fa;
}

.truck-button.animation {
    background: #10b981 !important;
}

.truck-button.animation .default {
    opacity: 0;
    transform: translateY(-20px);
}

.truck-button.animation .truck {
    transform: translateX(320px);
}

.truck-button.animation .success {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.6s;
}

/* =========================================================
   Галерея
   ========================================================= */
.projects-square-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    margin-top: 25px;
}

.project-square-card {
    background: linear-gradient(145deg, #0d1424, #080c14);
    border: 1px solid #1e3a5f;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.project-square-card:hover {
    transform: translateY(-8px);
    border-color: #10b981;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.5), 0 15px 30px rgba(245, 158, 11, 0.35);
}

.project-img-wrapper {
    position: relative;
    width: 100%;
    height: 260px;
    background: #04070d;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.project-square-info { padding: 20px; background: #0d1424; }
.project-square-info h3 { margin: 0; font-size: 16px; color: #ffffff; font-weight: 700; }

/* =========================================================
   Подвал
   ========================================================= */
.site-footer {
    background: #04070d;
    padding: 20px 30px;
    border-top: 1px solid #1e293b;
    width: 100%;
    margin-top: auto;
}

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

.lang-switch {
    display: inline-flex;
    background: #1e293b;
    padding: 3px;
    border-radius: 8px;
    border: 1px solid #334155;
}

.lang-switch a {
    color: #94a3b8;
    text-decoration: none;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.lang-switch a:hover {
    background: #10b981;
    color: #fff;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.6), 0 4px 10px rgba(245, 158, 11, 0.4);
}

.lang-switch a.active {
    color: #ffffff;
    background: #2563eb;
}

/* =========================================================
   Адаптивность для телефонов (100% ШИРИНА И ИСПРАВЛЕНИЯ)
   ========================================================= */
@media (max-width: 1024px) {
    .desktop-only { display: none !important; }
}

@media (max-width: 820px) {
    .desktop-menu { display: none !important; }
    .mobile-toggle-btn { display: flex !important; margin-left: auto; }
    
    .top-header { 
        flex-direction: column !important;
        height: auto !important;
        background: #080c14;
    }

    .header-logo { 
        width: 100% !important; 
        height: 100px !important; 
        min-width: 100% !important;
        border-right: none !important; 
        border-bottom: 1px solid #1e293b !important;
        padding: 8px !important; 
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .header-logo img {
        max-width: 100% !important;
        max-height: 84px !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
    }

    .header-banner {
        display: flex !important;
        width: 100% !important;
        height: 160px !important;
    }

    .banner-content h1 {
        font-size: 24px !important;
    }

    .banner-content p {
        font-size: 13px !important;
    }

    /* Растягиваем корпус и страницу ровно на 100% экрана на мобилках */
    .site-outer-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .site-container {
        border-radius: 0 !important;
        border: none !important;
        width: 100% !important;
    }

    .page-content {
        padding: 12px 6px !important;
        width: 100% !important;
    }

    /* Карточка с текстом растягивается НА ВСЮ ШИРИНУ ЭКРАНА */
    .tv-card-wrapper {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .tv-card-wrapper .tv-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 1.4rem 1rem !important;
        border-radius: 1rem !important;
        box-sizing: border-box !important;
    }

    .tv-card-wrapper .tv-content p {
        font-size: 1rem !important;
        line-height: 1.7 !important;
    }

    .footer-container {
        flex-direction: column !important;
        gap: 15px !important;
        text-align: center !important;
    }

    .projects-square-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
}

@media (max-width: 600px) {
    .contact-form-wrapper { 
        padding: 20px 12px !important; 
        width: 100% !important;
    }
    .form-grid { grid-template-columns: 1fr; }
}