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

/* Оптимизация всех изображений для работоспособности */
img {
    max-width: 100%;
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: optimize-quality;
    /* Улучшаем производительность загрузки */
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Отключаем will-change на мобильных для экономии ресурсов */
@media (max-width: 768px) {
    img {
        will-change: auto;
    }
    
    /* Отключаем тяжелые анимации на мобильных */
    * {
        will-change: auto !important;
    }
    
    /* Упрощаем transitions */
    * {
        transition-duration: 0.2s !important;
    }
}

/* Дополнительная оптимизация для изображений портфолио */
.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 800px;
    max-height: 600px;
}

/* Оптимизация для мобильных устройств */
@media (max-width: 768px) {
    img {
        max-width: 100%;
        height: auto;
    }
    
    .portfolio-item img {
        max-width: 100%;
        max-height: 400px;
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 60vh;
    }
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #f59e0b;
    --accent-color: #ef4444;
    --accent-light: #f87171;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --purple: #8b5cf6;
    --orange: #f97316;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Кастомный курсор в виде птички (только для десктопа) */
@media (min-width: 769px) {
    * {
        cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><ellipse cx="14" cy="18" rx="7" ry="5" fill="%232563eb" stroke="%231e40af" stroke-width="1.5"/><circle cx="20" cy="14" r="4.5" fill="%232563eb" stroke="%231e40af" stroke-width="1.5"/><circle cx="21.5" cy="13" r="1.5" fill="white"/><path d="M24 11.5 L26.5 10.5 L25.5 12.5 L24 11.5 Z" fill="%23f59e0b" stroke="%23d97706" stroke-width="0.5"/><ellipse cx="11" cy="19" rx="2.5" ry="4" fill="%232563eb" opacity="0.9" transform="rotate(-25 11 19)"/><path d="M5 21 Q7 17 9 19 Q7 21 5 21" fill="%231e40af"/></svg>') 16 16, auto;
    }

    a, button, .btn, .phone-btn, .floating-call-btn, .hamburger {
        cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><ellipse cx="14" cy="18" rx="7" ry="5" fill="%23ef4444" stroke="%23dc2626" stroke-width="1.5"/><circle cx="20" cy="14" r="4.5" fill="%23ef4444" stroke="%23dc2626" stroke-width="1.5"/><circle cx="21.5" cy="13" r="1.5" fill="white"/><path d="M24 11.5 L26.5 10.5 L25.5 12.5 L24 11.5 Z" fill="%23f59e0b" stroke="%23d97706" stroke-width="0.5"/><ellipse cx="11" cy="19" rx="2.5" ry="4" fill="%23ef4444" opacity="0.9" transform="rotate(-25 11 19)"/><path d="M5 21 Q7 17 9 19 Q7 21 5 21" fill="%23dc2626"/></svg>') 16 16, pointer;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-size: 20px;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0f9ff 100%);
    background-attachment: fixed;
}

/* Оптимизация для мобильных - упрощаем фон */
@media (max-width: 768px) {
    body {
        font-size: 16px;
        background: #f0f9ff;
        background-attachment: scroll;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

  /* Улучшаем плавность скролла */
html {
    scroll-behavior: smooth;
}

/* Убираем фокус-рамки для кнопок */
button:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
/* Навигация */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-mark {
    width: 56px;
    height: 40px;
    border-radius: 10px;
    background:
        url("data:image/svg+xml,%3Csvg width='56' height='36' viewBox='0 0 56 36' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='sky-c' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%' stop-color='%232563eb'/%3E%3Cstop offset='100%' stop-color='%238b5cf6'/%3E%3C/linearGradient%3E%3ClinearGradient id='mountain-c' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0%' stop-color='%23e5e7eb'/%3E%3Cstop offset='100%' stop-color='%239ca3af'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='56' height='36' rx='10' fill='url(%23sky-c)'/%3E%3Cpath d='M2 28 L18 14 L25 22 L32 10 L46 24 L54 28 Z' fill='url(%23mountain-c)'/%3E%3Ctext x='50%' y='56%' text-anchor='middle' fill='%23f9fafb' font-size='9' font-family='system-ui, -apple-system, BlinkMacSystemFont, %22Segoe UI%22, sans-serif' font-weight='700' letter-spacing='1'%3ESM%3C/text%3E%3C/svg%3E")
            center / contain no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
    overflow: hidden;
    position: relative;
}

.inline-logo-sm {
    display: inline-block;
    width: 72px;
    height: 46px;
    border-radius: 10px;
    background:
        url("data:image/svg+xml,%3Csvg width='56' height='36' viewBox='0 0 56 36' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='sky-c' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%' stop-color='%232563eb'/%3E%3Cstop offset='100%' stop-color='%238b5cf6'/%3E%3C/linearGradient%3E%3ClinearGradient id='mountain-c' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0%' stop-color='%23e5e7eb'/%3E%3Cstop offset='100%' stop-color='%239ca3af'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='56' height='36' rx='10' fill='url(%23sky-c)'/%3E%3Cpath d='M2 28 L18 14 L25 22 L32 10 L46 24 L54 28 Z' fill='url(%23mountain-c)'/%3E%3Ctext x='50%' y='56%' text-anchor='middle' fill='%23f9fafb' font-size='9' font-family='system-ui, -apple-system, BlinkMacSystemFont, %22Segoe UI%22, sans-serif' font-weight='700' letter-spacing='1'%3ESM%3C/text%3E%3C/svg%3E")
            center / contain no-repeat;
    vertical-align: middle;
}

.logo-letter {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--white);
    line-height: 1;
    letter-spacing: 0.06em;
    display: none; /* Скрываем текст, так как логотип уже в SVG фоне */
}

.logo-letter-s {
    opacity: 0.9;
}

.logo-letter-m {
    opacity: 0.9;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.1;
}

.logo-tagline {
    font-size: 0.9rem;
    color: var(--text-light);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.4rem;
    align-items: center;
}

.nav-menu li {
    margin: 0;
    padding: 0;
}

/* Стили для навигационных кнопок заменены на стиль из Uiverse.io */
.nav-button > div,
.nav-button > div > div,
.nav-button > div > div > div {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline !important;
    pointer-events: auto !important;
}

@keyframes star-rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes dots {
    0% {
        background-position:
            0 0,
            4px 4px;
    }
    100% {
        background-position:
            8px 0,
            12px 4px;
    }
}

/* Адаптивность для навигационных кнопок - МОБИЛЬНЫЕ УСТРОЙСТВА */
@media (max-width: 768px) {
    /* Оптимизация навбара */
    .navbar {
        padding: 0.5rem 0.75rem;
        min-height: 60px;
    }
    
    .nav-content {
        gap: 0.5rem;
        flex-wrap: nowrap;
        align-items: center;
    }
    
    /* Логотип */
    .logo {
        flex-shrink: 0;
        min-width: auto;
    }
    
    .logo-mark {
        width: 36px;
        height: 36px;
    }
    
    .logo-letter {
        font-size: 1rem;
    }
    
    .logo-tagline {
        font-size: 0.7rem;
        white-space: nowrap;
        display: none; /* Скрываем на маленьких экранах для экономии места */
    }
    
    /* Скрываем текстовые кнопки в навбаре на мобильных */
    .navbar .phone-btn,
    .navbar .phone-btn.action-button {
        display: none !important;
    }

    .navbar .messengers {
        display: none !important;
    }
    
    /* На мобильных показываем hamburger и скрываем меню по умолчанию */
    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem 1.5rem;
        gap: 1rem;
        transition: left 0.3s ease;
        z-index: 999;
        overflow-y: auto;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu .nav-button {
        width: 100%;
        justify-content: flex-start;
        padding: 0.75rem 1rem;
    }
    
    .hamburger {
        display: flex !important;
        z-index: 1001;
        order: 3;
    }
    
    /* Скрываем секцию "Позвонить" в футере на мобильных */
    .footer-contact {
        display: none;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    /* Плавающие кнопки в навбаре на мобильных */
    .navbar .floating-buttons {
        display: flex !important;
        position: static;
        flex-direction: row;
        gap: 6px;
        margin-left: auto;
        bottom: auto;
        right: auto;
        align-items: center;
        order: 2;
    }
    
    .navbar .floating-call-btn,
    .navbar .floating-messenger-btn {
        width: 40px;
        height: 40px;
        margin: 0;
        position: static;
        bottom: auto;
        right: auto;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        flex-shrink: 0;
    }
    
    /* Telegram показывается в плавающих кнопках навбара на мобильных на главной странице */
    /* На странице works.html можно оставить только WhatsApp и звонок, если нужно */
    
    .navbar .floating-call-btn svg,
    .navbar .floating-messenger-btn svg {
        width: 20px;
        height: 20px;
        display: block;
        margin: 0;
        flex-shrink: 0;
        vertical-align: middle;
    }
    
    .navbar .floating-call-btn {
        animation: none; /* Убираем анимацию в навбаре */
    }
    
    .navbar .floating-messenger-btn.whatsapp,
    .navbar .floating-messenger-btn.telegram {
        margin-bottom: 0;
    }
    
    /* Исправляем выравнивание иконок в навбаре */
    .navbar .floating-call-btn,
    .navbar .floating-messenger-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        vertical-align: middle;
    }
    
    /* Убираем любые отступы и выравниваем по центру */
    .navbar .floating-call-btn *,
    .navbar .floating-messenger-btn * {
        margin: 0;
        padding: 0;
    }
    
    /* Убираем hover эффекты на мобильных */
    .navbar .floating-call-btn:active,
    .navbar .floating-messenger-btn:active {
        transform: scale(0.95);
    }
    
    /* Скрываем плавающие кнопки внизу на мобильных */
    body > .floating-buttons:not(.navbar .floating-buttons) {
        display: none !important;
    }
}

/* Адаптивность для планшетов - отдельная версия */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Скрываем hamburger на планшетах */
    .hamburger {
        display: none !important;
    }
    
    /* Показываем меню на планшетах */
    .nav-menu {
        display: flex !important;
        position: static;
        flex-direction: row;
        gap: 0.3rem;
        padding: 0;
        height: auto;
        background: transparent;
        backdrop-filter: none;
        box-shadow: none;
        overflow: visible;
        left: 0;
    }
    
    /* Скрываем плавающие кнопки в навбаре на планшетах */
    .navbar .floating-buttons {
        display: none !important;
    }
    
    /* Показываем основные кнопки связи на планшетах */
    .navbar .phone-btn,
    .navbar .phone-btn.action-button {
        display: inline-flex !important;
    }
    
    .navbar .messengers {
        display: flex !important;
    }
    
    /* Уменьшаем размеры кнопок для планшетов */
    .nav-button {
        font-size: 0.8rem;
        padding: 0.4em 0.7em;
    }
    
    .navbar .phone-btn,
    .navbar .phone-btn.action-button,
    .navbar .messenger-link,
    .navbar .messenger-link.action-button {
        font-size: 0.75rem;
        padding: 0.4em 0.6em;
    }
    
    /* Улучшаем навбар на планшетах */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-content {
        gap: 0.75rem;
    }
    
    /* Показываем плавающие кнопки внизу на планшетах */
    body > .floating-buttons:not(.navbar .floating-buttons) {
        display: flex !important;
        bottom: 25px;
        right: 25px;
    }
    
    .floating-call-btn,
    .floating-messenger-btn {
        width: 55px;
        height: 55px;
    }
    
    .floating-call-btn svg,
    .floating-messenger-btn svg {
        width: 22px;
        height: 22px;
    }
    
    /* Адаптируем секции для планшетов */
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-content {
        gap: 3rem;
    }
    
    .contact-content {
        gap: 3rem;
    }
}

.messengers {
    display: flex;
    gap: 0.3rem;
    margin-left: 0.5rem;
}

.contact-messengers {
    margin-top: 1rem;
    margin-left: 0;
    justify-content: center;
}

/* Сложные стили для phone-btn и messenger-link удалены - используется стиль из Uiverse.io */
.phone-btn.action-button > div,
.phone-btn.action-button > div > div,
.phone-btn.action-button > div > div > div,
.messenger-link.action-button > div,
.messenger-link.action-button > div > div,
.messenger-link.action-button > div > div > div {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline !important;
    pointer-events: auto !important;
}

/* Старые стили для обратной совместимости */
.btn-whatsapp,
.floating-messenger-btn.whatsapp {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.btn-telegram,
.floating-messenger-btn.telegram {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Главная секция */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #8b5cf6 50%, #ef4444 100%);
    background-size: cover;
    background-position: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
    line-height: 1.2;
    word-wrap: break-word;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease;
    line-height: 1.4;
    word-wrap: break-word;
}

.hero-works-section {
    margin-bottom: 2rem;
    animation: fadeInUp 1.1s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    z-index: 10;
    position: relative;
}

.btn-works {
    background: linear-gradient(135deg, var(--primary-color), var(--purple)) !important;
    color: var(--white) !important;
    padding: 1.2rem 3rem !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    font-size: 1.2rem !important;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.5) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    position: relative !important;
    overflow: hidden !important;
    animation: pulse-glow 2s ease-in-out infinite !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 100 !important;
}

.btn-works::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-works:hover::before {
    left: 100%;
}

.btn-works:hover {
    background: linear-gradient(135deg, var(--purple), var(--primary-color));
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.6);
    color: var(--white);
}

.btn-works:active {
    transform: translateY(-2px) scale(1.02);
}

.works-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    animation: bounce-icon 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(37, 99, 235, 0.5);
    }
    50% {
        box-shadow: 0 10px 40px rgba(37, 99, 235, 0.7);
    }
}

@keyframes bounce-icon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    animation: fadeInUp 1.2s ease;
}

/* From Uiverse.io by reshades - https://uiverse.io/reshades/dull-snake-38 */
.btn,
button,
.action-button,
.phone-btn,
.messenger-link {
    background-color: #ffffff00;
    color: #fff;
    min-width: 8.5em;
    width: auto;
    height: 2.9em;
    border: var(--primary-color) 0.2em solid;
    border-radius: 11px;
    text-align: right;
    transition: all 0.6s ease;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    padding: 0 1em;
}

/* Стили для кнопки "Вернуться на главную" */
.btn.btn-secondary {
    background-color: transparent;
    color: #1f2937;
    border: 1.5px solid var(--primary-color);
    border-radius: 8px;
    text-align: center;
    justify-content: center;
    min-width: auto;
    height: auto;
    padding: 0.6em 1.2em;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn.btn-secondary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.btn.btn-secondary span {
    color: inherit;
}

/* Специальные стили для навигационных кнопок */
.nav-button {
    background-color: transparent;
    color: #1f2937;
    min-width: auto;
    width: auto;
    height: auto;
    border: 1.5px solid var(--primary-color);
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    padding: 0.5em 1em;
    font-size: 0.9rem;
}

/* Специальные стили для кнопок "Позвонить", WhatsApp и Telegram в навигации */
.navbar .phone-btn,
.navbar .phone-btn.action-button,
.navbar .messenger-link,
.navbar .messenger-link.action-button {
    background-color: transparent;
    color: #1f2937;
    min-width: auto;
    width: auto;
    height: auto;
    border: 1.5px solid var(--primary-color);
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    padding: 0.5em 0.8em;
    font-size: 0.85rem;
}

.navbar .phone-btn:hover,
.navbar .phone-btn.action-button:hover,
.navbar .messenger-link:hover,
.navbar .messenger-link.action-button:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-dark);
    color: var(--white);
    cursor: pointer;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.btn:hover,
button:hover,
.action-button:hover,
.phone-btn:hover,
.messenger-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-dark);
    cursor: pointer;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.nav-button:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-dark);
    color: var(--white);
    cursor: pointer;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.btn svg,
button svg,
.action-button svg,
.phone-btn svg,
.messenger-link svg {
    width: 1.6em;
    margin: -0.2em 0.8em 1em;
    position: absolute;
    display: flex;
    transition: all 0.6s ease;
}

.btn:hover svg,
button:hover svg,
.action-button:hover svg,
.phone-btn:hover svg,
.messenger-link:hover svg {
    transform: translateX(5px);
}

.btn .text,
button .text,
.action-button .text,
.phone-btn .text,
.messenger-link .text {
    margin: 0 1.5em;
}

/* Стили для SVG и текста навигационных кнопок */
.nav-button svg {
    width: 1em;
    margin: 0 0.5em 0 0;
    position: relative;
    display: inline-flex;
    transition: all 0.3s ease;
}

.nav-button:hover svg {
    transform: none;
}

.nav-button .text {
    margin: 0;
}

/* Стили для SVG и текста кнопок в навигации */
.navbar .phone-btn svg,
.navbar .phone-btn.action-button svg,
.navbar .messenger-link svg,
.navbar .messenger-link.action-button svg {
    width: 1em;
    margin: 0 0.3em 0 0;
    position: relative;
    display: inline-flex;
    transition: all 0.3s ease;
}

.navbar .phone-btn:hover svg,
.navbar .phone-btn.action-button:hover svg,
.navbar .messenger-link:hover svg,
.navbar .messenger-link.action-button:hover svg {
    transform: none;
}

.navbar .phone-btn .text,
.navbar .phone-btn.action-button .text,
.navbar .messenger-link .text,
.navbar .messenger-link.action-button .text {
    margin: 0;
}

/* Стиль из Uiverse.io by reshades применен к action-button - определен выше в общем блоке */

/* Убраны сложные стили для вложенных div - используется простой стиль из Uiverse.io */
.action-button > div,
.action-button > div > div,
.action-button > div > div > div {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline !important;
    pointer-events: auto !important;
    color: inherit !important;
}

/* Стили для текста внутри кнопок */
.action-button > div > div > div,
.btn > div > div > div {
    color: #fff !important;
}

.nav-button > div > div > div {
    color: #1f2937 !important;
}

.navbar .phone-btn > div > div > div,
.navbar .phone-btn.action-button > div > div > div,
.navbar .messenger-link > div > div > div,
.navbar .messenger-link.action-button > div > div > div {
    color: #1f2937 !important;
}

/* Специфичные стили для разных типов кнопок удалены - используется единый стиль из Uiverse.io */

/* Все специфичные стили для разных типов кнопок удалены - используется единый стиль из Uiverse.io */

.hero-features {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1.4s ease;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
}

.feature-icon {
    width: 24px;
    height: 24px;
    background: var(--white);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Секции */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    word-wrap: break-word;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

/* Услуги */
.services {
    background: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
    border-top: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.service-card:nth-child(1) {
    border-top-color: var(--primary-color);
}

.service-card:nth-child(2) {
    border-top-color: var(--orange);
}

.service-card:nth-child(3) {
    border-top-color: var(--purple);
}

.service-card:nth-child(4) {
    border-top-color: var(--accent-color);
}

.service-card:nth-child(5) {
    border-top-color: var(--success-color);
}

.service-card:nth-child(6) {
    border-top-color: var(--warning-color);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-top-width: 6px;
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* О нас */
.about-text {
    position: relative;
}

.about-text::before {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 260px;
    height: 170px;
    background-image: url("data:image/svg+xml,%3Csvg width='280' height='180' viewBox='0 0 56 36' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='sky-c' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%' stop-color='%23e5f0ff'/%3E%3Cstop offset='100%' stop-color='%23eff6ff'/%3E%3C/linearGradient%3E%3ClinearGradient id='mountain-c' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0%' stop-color='%23d1d5db'/%3E%3Cstop offset='100%' stop-color='%239ca3af'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='56' height='36' rx='10' fill='url(%23sky-c)'/%3E%3Cpath d='M2 28 L18 14 L25 22 L32 10 L46 24 L54 28 Z' fill='url(%23mountain-c)'/%3E%3Ctext x='50%' y='56%' text-anchor='middle' fill='%23374151' font-size='9' font-family='Inter, system-ui, -apple-system, BlinkMacSystemFont, %22Segoe UI%22, sans-serif' font-weight='700' letter-spacing='1'%3ESM%3C/text%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.14;
    z-index: 0;
    pointer-events: none;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    position: relative;
    z-index: 1;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.8;
}

.advantages {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.advantage-item {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-light), var(--white));
    border-radius: 12px;
    flex: 1;
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    overflow: hidden;
}

.advantage-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--purple), var(--accent-color));
}

.advantage-item:nth-child(1)::before {
    background: linear-gradient(90deg, var(--primary-color), var(--purple));
}

.advantage-item:nth-child(2)::before {
    background: linear-gradient(90deg, var(--orange), var(--accent-color));
}

.advantage-item:nth-child(3)::before {
    background: linear-gradient(90deg, var(--success-color), var(--primary-color));
}

.advantage-item strong {
    display: block;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.advantage-item span {
    color: var(--text-light);
    font-size: 0.9rem;
}

.about-image {
    position: relative;
}

.image-placeholder {
    background: linear-gradient(135deg, #e5f0ff 0%, #dbeafe 50%, #e5e7eb 100%);
    border-radius: 16px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: visible;
    z-index: 0;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.about-image .inline-logo-sm {
    width: 70%;
    height: auto;
    aspect-ratio: 56 / 36;
    max-width: 100%;
    border-radius: 16px;
    opacity: 0.95;
    display: block;
    margin: 0 auto;
}

/* Анимация накопления и осыпания снега на горах */

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Видео наших работ */
.videos {
    background: var(--white);
    padding: 5rem 0;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.video-item {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 соотношение */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-item h3 {
    padding: 1.5rem;
    margin: 0;
    color: var(--text-dark);
    font-size: 1.2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-light), var(--white));
}

.video-note {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Улучшенная галерея портфолио */
.portfolio {
   background: var(--bg-light);
   padding: 5rem 0;
}

.portfolio-filters {
   display: flex;
   justify-content: center;
   flex-wrap: wrap;
   gap: 2rem;
   margin-bottom: 3rem;
   padding: 2rem 0;
}

.filter-folder-wrapper {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.filter-folder-wrapper:hover {
    transform: translateY(-5px);
}

.filter-folder-wrapper:active {
    transform: translateY(-2px) scale(0.98);
}

.filter-folder-wrapper.active .folder-work-5 {
    background: linear-gradient(135deg, var(--accent-color), var(--orange));
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4);
}

.filter-folder-wrapper.active .folder-work-1 {
    background: linear-gradient(to top, var(--accent-color), #f87171);
}

.filter-folder-wrapper.active .folder-work-5::after {
    background: linear-gradient(135deg, var(--accent-color), var(--orange));
}

.filter-folder-wrapper.active .folder-work-5::before {
    background: linear-gradient(135deg, var(--accent-color), var(--orange));
}

.filter-folder-wrapper.active .folder-work-1::after {
    background: #f87171;
}

.filter-folder-wrapper.active .folder-work-1::before {
    background: #f87171;
}

.filter-folder {
    width: 180px;
    height: 120px;
}

.filter-folder .folder-label {
    font-size: 0.95rem;
    padding: 0 0.5rem;
}

/* Старые стили для обратной совместимости */
.filter-btn {
   padding: 0.75rem 1.5rem;
   background: var(--white);
   border: 2px solid transparent;
   border-radius: 50px;
   color: var(--text-dark);
   font-weight: 500;
   cursor: pointer;
   transition: all 0.3s ease;
   font-size: 1rem;
   display: none; /* Скрываем старые кнопки */
}

.filter-btn:hover {
   background: var(--primary-color);
   color: var(--white);
   transform: translateY(-2px);
   box-shadow: var(--shadow);
}

.filter-btn.active {
   background: linear-gradient(135deg, var(--primary-color), var(--purple));
   color: var(--white);
   border-color: transparent;
   box-shadow: var(--shadow);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    width: 100%;
    align-items: start;
}

.portfolio-item {
   position: relative;
   border-radius: 16px;
   overflow: hidden;
   cursor: pointer;
   transition: all 0.4s ease;
   opacity: 1;
   transform: scale(1);
   background: var(--white);
   box-shadow: var(--shadow);
   width: 100%;
   min-height: 300px;
}

    .portfolio-item:hover {
   transform: translateY(-5px);
   box-shadow: var(--shadow-lg);
}

/* Отключаем hover эффекты на мобильных */
@media (max-width: 768px) {
    .portfolio-item:hover {
        transform: none;
    }
    
    .portfolio-item:hover .portfolio-image img {
        transform: none;
    }
    
    .portfolio-item:hover .portfolio-overlay {
        opacity: 0;
    }
}

.portfolio-image {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 соотношение */
    overflow: hidden;
    background: var(--bg-light);
    display: block;
}

/* Постоянный текст под изображением для ПК версии */
@media (min-width: 769px) {
    .portfolio-item {
        display: flex;
        flex-direction: column;
    }
    
    .portfolio-caption {
        padding: 1rem 1.25rem;
        background: var(--white);
        border-top: 3px solid var(--primary-color);
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .portfolio-caption h3 {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-dark);
        margin-bottom: 0.4rem;
        line-height: 1.3;
    }
    
    .portfolio-caption p {
        font-size: 0.9rem;
        color: var(--text-light);
        line-height: 1.4;
        margin: 0;
    }
}

.portfolio-image img {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   object-fit: cover;
   transition: transform 0.5s ease;
   max-width: 100%;
   max-height: 100%;
   image-rendering: -webkit-optimize-contrast;
   image-rendering: crisp-edges;
   image-rendering: optimize-quality;
}

.portfolio-item:hover .portfolio-image img {
   transform: scale(1.05);
}

.portfolio-overlay {
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   /* Улучшенный градиент с более темным фоном для лучшей читаемости */
   background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.7) 0%,
      rgba(0, 0, 0, 0.5) 50%,
      rgba(0, 0, 0, 0.8) 100%
   ),
   linear-gradient(135deg, rgba(37, 99, 235, 0.85), rgba(139, 92, 246, 0.85));
   opacity: 0;
   transition: all 0.3s ease;
   color: var(--white);
   text-align: center;
   padding: 2rem;
   z-index: 10;
}

.portfolio-item:hover .portfolio-overlay {
   opacity: 1;
}

.portfolio-overlay h3 {
   font-size: 1.5rem;
   margin-bottom: 0.5rem;
   color: var(--white);
   font-weight: 700;
   /* Текстовая тень для лучшей читаемости */
   text-shadow: 
      2px 2px 4px rgba(0, 0, 0, 0.8),
      0 0 10px rgba(0, 0, 0, 0.5),
      0 0 20px rgba(0, 0, 0, 0.3);
   line-height: 1.3;
   letter-spacing: 0.5px;
   position: relative;
   z-index: 1;
}

.portfolio-overlay p {
   font-size: 1rem;
   color: rgba(255, 255, 255, 0.95);
   margin-bottom: 1rem;
   /* Текстовая тень для лучшей читаемости */
   text-shadow: 
      1px 1px 3px rgba(0, 0, 0, 0.8),
      0 0 8px rgba(0, 0, 0, 0.5);
   line-height: 1.5;
   position: relative;
   z-index: 1;
   font-weight: 500;
}

.portfolio-icon {
   font-size: 2rem;
   animation: pulse-icon 2s infinite;
   /* Тень для иконки */
   filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.8));
   position: relative;
   z-index: 1;
}

/* Дополнительный слой для улучшения контраста текста */
.portfolio-overlay::before {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background: radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0.3) 0%,
      rgba(0, 0, 0, 0.6) 100%
   );
   z-index: 0;
}

/* Улучшаем видимость текста на светлых изображениях */
@media (min-width: 769px) {
   .portfolio-overlay {
      /* Более темный фон для ПК версии */
      background: linear-gradient(
         to bottom,
         rgba(0, 0, 0, 0.75) 0%,
         rgba(0, 0, 0, 0.6) 50%,
         rgba(0, 0, 0, 0.85) 100%
      ),
      linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(139, 92, 246, 0.9));
   }
   
   .portfolio-overlay h3 {
      text-shadow: 
         3px 3px 6px rgba(0, 0, 0, 0.9),
         0 0 15px rgba(0, 0, 0, 0.6),
         0 0 30px rgba(0, 0, 0, 0.4);
   }
   
   .portfolio-overlay p {
      text-shadow: 
         2px 2px 4px rgba(0, 0, 0, 0.9),
         0 0 10px rgba(0, 0, 0, 0.6);
   }
}

@keyframes pulse-icon {
   0%, 100% {
       transform: scale(1);
   }
   50% {
       transform: scale(1.2);
   }
}

/* Плавное скрытие/показ для фильтров */
.portfolio-item.hidden {
   opacity: 0;
   transform: scale(0.8);
   height: 0;
   margin: 0;
   padding: 0;
   pointer-events: none;
}
/* Улучшенное модальное окно */
.modal {
   display: none;
   position: fixed;
   z-index: 2000;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
   background-color: rgba(0, 0, 0, 0.95);
   backdrop-filter: blur(10px);
   animation: fadeIn 0.3s ease;
   padding: 2rem;
   box-sizing: border-box;
}

.modal.show {
   display: flex;
   align-items: center;
   justify-content: center;
   flex-direction: column;
}

.modal-content {
   max-width: 90%;
   max-height: 70vh;
   width: auto;
   height: auto;
   object-fit: contain;
   border-radius: 12px;
   box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
   animation: zoomIn 0.3s ease;
   image-rendering: -webkit-optimize-contrast;
   image-rendering: crisp-edges;
}

.modal-caption {
   margin-top: 1.5rem;
   color: var(--white);
   font-size: 1.2rem;
   text-align: center;
   background: rgba(0, 0, 0, 0.7);
   padding: 1rem 2rem;
   border-radius: 50px;
   max-width: 80%;
}

.modal-close {
   position: absolute;
   top: 2rem;
   right: 2rem;
   color: var(--white);
   font-size: 2.5rem;
   font-weight: 300;
   cursor: pointer;
   transition: all 0.3s ease;
   width: 50px;
   height: 50px;
   display: flex;
   align-items: center;
   justify-content: center;
   background: rgba(255, 255, 255, 0.1);
   border-radius: 50%;
   backdrop-filter: blur(10px);
   z-index: 2001;
}

.modal-close:hover {
   background: rgba(255, 255, 255, 0.2);
   transform: rotate(90deg);
}

@keyframes fadeIn {
   from {
       opacity: 0;
   }
   to {
       opacity: 1;
   }
}

@keyframes zoomIn {
   from {
       transform: scale(0.8);
       opacity: 0;
   }
   to {
       transform: scale(1);
       opacity: 1;
   }
}

/* Контакты */
.contact {
    background-color: var(--bg-light);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 360px;
    height: 230px;
    background-image: url("data:image/svg+xml,%3Csvg width='280' height='180' viewBox='0 0 56 36' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='sky-c' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%' stop-color='%23e5f0ff'/%3E%3Cstop offset='100%' stop-color='%23eff6ff'/%3E%3C/linearGradient%3E%3ClinearGradient id='mountain-c' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0%' stop-color='%23d1d5db'/%3E%3Cstop offset='100%' stop-color='%239ca3af'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='56' height='36' rx='10' fill='url(%23sky-c)'/%3E%3Cpath d='M2 28 L18 14 L25 22 L32 10 L46 24 L54 28 Z' fill='url(%23mountain-c)'/%3E%3Ctext x='50%' y='56%' text-anchor='middle' fill='%23374151' font-size='9' font-family='Inter, system-ui, -apple-system, BlinkMacSystemFont, %22Segoe UI%22, sans-serif' font-weight='700' letter-spacing='1'%3ESM%3C/text%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.16;
    z-index: 0;
    pointer-events: none;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.contact-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--purple));
    color: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
}

.contact-item:hover .contact-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.contact-item h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--primary-dark);
}

.contact-cta {
    background: linear-gradient(135deg, var(--white) 0%, #f0f9ff 100%);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.contact-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--purple), var(--accent-color));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
}

.contact-cta h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.contact-cta p {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.contact-actions .btn {
    margin: 0;
}


/* Футер */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-info h3 {
    margin-bottom: 0.5rem;
    color: var(--white);
}

.footer-info p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact {
    text-align: right;
}

.footer-phone {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-phone:hover {
    color: var(--secondary-color);
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Плавающие кнопки связи */
/* Улучшенные плавающие кнопки */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.floating-call-btn,
.floating-messenger-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.35);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    line-height: 1;
}

.floating-call-btn svg,
.floating-messenger-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    display: block;
    margin: 0 auto;
    flex-shrink: 0;
    vertical-align: middle;
}

/* Убираем текст из плавающих кнопок, оставляем только SVG */
.floating-call-btn > span:not(svg),
.floating-messenger-btn > span:not(svg) {
    display: none;
}

.floating-call-btn::before,
.floating-messenger-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.floating-call-btn:hover::before,
.floating-messenger-btn:hover::before {
    opacity: 1;
}

.floating-call-btn {
    background: linear-gradient(135deg, var(--accent-color), var(--orange));
    animation: pulse 2s infinite;
}

.floating-messenger-btn.whatsapp {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.floating-messenger-btn.telegram {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
}

.floating-call-btn:hover,
.floating-messenger-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.5);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(239, 68, 68, 0);
    }
}
/* Адаптивность */
@media (max-width: 768px) {
   /* Оптимизация производительности на мобильных */
   * {
       -webkit-tap-highlight-color: transparent;
   }
   
   body {
       -webkit-font-smoothing: antialiased;
       -moz-osx-font-smoothing: grayscale;
   }
   
   /* Навбар оптимизирован выше в отдельном блоке */

   /* Стили для мобильного меню уже определены выше */
   
   .nav-button {
       font-size: 0.85rem;
       padding: 0.4em 0.8em;
   }
   
   .nav-button > div > div > div {
       padding: 0;
       color: #1f2937 !important;
   }
   
   .nav-button::before {
       display: none;
   }

   .hamburger.active span:nth-child(1) {
       transform: rotate(45deg) translate(5px, 5px);
   }

   .hamburger.active span:nth-child(2) {
       opacity: 0;
   }

   .hamburger.active span:nth-child(3) {
       transform: rotate(-45deg) translate(7px, -6px);
   }

    /* Кнопки уже скрыты в блоке выше */

    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.4;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
        justify-content: center;
    }
    
    .hero-buttons .action-button {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    .action-button {
        font-size: 0.9rem !important;
    }
    
    .action-button > div > div > div {
        padding: 0.6rem 1rem !important;
        font-size: 0.9rem !important;
    }
    
    .action-button::before {
        max-height: 80px;
    }
    
    .btn-large.action-button {
        font-size: 1rem !important;
    }
    
    .btn-large.action-button > div > div > div {
        padding: 0.75rem 1.25rem !important;
    }

    .hero-features {
        flex-direction: column;
        align-items: center;
    }

    .section-title {
        font-size: 1.75rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .hero-content {
        padding: 1.5rem 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .advantages {
        flex-direction: column;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-contact {
        text-align: center;
    }

    /* Скрываем плавающие кнопки внизу на мобильных - они теперь в навбаре */
    .floating-buttons {
        display: none;
    }
    
    /* Плавающие кнопки теперь в навбаре (стили выше) */

    .videos-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .portfolio-item {
        min-height: 250px;
    }
    
    .portfolio-image {
        padding-top: 70%;
    }

    .portfolio-filters {
        gap: 1rem;
        padding: 1rem 0;
    }

    .filter-folder {
        width: 140px;
        height: 93px;
    }

    .filter-folder .folder-label {
        font-size: 0.75rem;
        padding: 0 0.4rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .modal-content {
        max-width: 95%;
        max-height: 85%;
    }

    .modal-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }

}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .section-title {
        font-size: 1.4rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    .service-card {
        padding: 1.25rem;
    }
    
    .service-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .service-card p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Уменьшаем размеры кнопок для лучшего отображения */
    .btn {
        font-size: 0.85rem;
        padding: 0.65rem 1.25rem;
    }
    
    /* Оптимизация навбара */
    .navbar {
        padding: 0.4rem 0.6rem;
        min-height: 55px;
    }
    
    .nav-content {
        gap: 0.3rem;
    }
    
    .logo-mark {
        width: 32px;
        height: 32px;
    }
    
    .logo-tagline {
        display: none; /* Полностью скрываем на маленьких экранах */
    }
    
    .hamburger {
        padding: 6px;
    }
    
    .hamburger span {
        width: 22px;
        height: 2.5px;
    }
    
    /* Уменьшаем размеры текста в меню */
    .nav-menu {
        top: 55px;
        padding: 0.4rem 0;
    }
    
    .nav-button {
        font-size: 0.85rem;
        padding: 0.85rem 1rem;
    }
    
    .nav-button > div > div > div {
        font-size: 0.85rem;
    }
    
    /* Плавающие кнопки в навбаре на маленьких экранах */
    .navbar .floating-call-btn,
    .navbar .floating-messenger-btn {
        width: 36px;
        height: 36px;
    }
    
    .navbar .floating-call-btn svg,
    .navbar .floating-messenger-btn svg {
        width: 18px;
        height: 18px;
        margin: 0;
    }
}

/* Оптимизация для планшетов - отдельная версия */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Скрываем hamburger на планшетах */
    .hamburger {
        display: none;
    }
    
    /* Показываем меню на планшетах */
    .nav-menu {
        display: flex;
        position: static;
        flex-direction: row;
        gap: 0.3rem;
        padding: 0;
        height: auto;
        background: transparent;
        backdrop-filter: none;
        box-shadow: none;
        overflow: visible;
    }
    
    /* Скрываем плавающие кнопки в навбаре на планшетах */
    .navbar .floating-buttons {
        display: none;
    }
    
    /* Показываем основные кнопки связи на планшетах */
    .navbar .phone-btn,
    .navbar .phone-btn.action-button {
        display: inline-flex;
    }
    
    .navbar .messengers {
        display: flex;
    }
    
    /* Уменьшаем размеры кнопок для планшетов */
    .nav-button {
        font-size: 0.8rem;
        padding: 0.4em 0.7em;
    }
    
    .navbar .phone-btn,
    .navbar .phone-btn.action-button,
    .navbar .messenger-link,
    .navbar .messenger-link.action-button {
        font-size: 0.75rem;
        padding: 0.4em 0.6em;
    }
    
    /* Улучшаем навбар на планшетах */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-content {
        gap: 0.75rem;
    }
    
    /* Показываем плавающие кнопки внизу на планшетах */
    .floating-buttons {
        display: flex;
        bottom: 25px;
        right: 25px;
    }
    
    .floating-call-btn,
    .floating-messenger-btn {
        width: 55px;
        height: 55px;
    }
    
    .floating-call-btn svg,
    .floating-messenger-btn svg {
        width: 22px;
        height: 22px;
    }
    
    /* Адаптируем секции для планшетов */
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Оптимизация для ПК версии */
@media (min-width: 1025px) {
    /* Скрываем hamburger на ПК */
    .hamburger {
        display: none;
    }
    
    /* Показываем меню на ПК */
    .nav-menu {
        display: flex;
        position: static;
        flex-direction: row;
        gap: 0.4rem;
        padding: 0;
        height: auto;
        background: transparent;
        backdrop-filter: none;
        box-shadow: none;
        overflow: visible;
    }
    
    /* Скрываем плавающие кнопки в навбаре на ПК */
    .navbar .floating-buttons {
        display: none;
    }
    
    /* Показываем основные кнопки связи на ПК */
    .navbar .phone-btn,
    .navbar .phone-btn.action-button {
        display: inline-flex;
    }
    
    .navbar .messengers {
        display: flex;
    }
    
    /* Показываем Telegram в навбаре на ПК */
    .navbar .messenger-link.telegram,
    .navbar .messenger-link.telegram.action-button {
        display: inline-flex;
    }
    
    /* Улучшаем плавающие кнопки на ПК */
    .floating-buttons {
        bottom: 30px;
        right: 30px;
    }
    
    .floating-call-btn,
    .floating-messenger-btn {
        width: 60px;
        height: 60px;
    }
    
    .floating-call-btn svg,
    .floating-messenger-btn svg {
        width: 24px;
        height: 24px;
    }
    
    /* Улучшаем навбар на ПК */
    .navbar {
        padding: 1rem 0;
    }
    
    .nav-content {
        gap: 1rem;
    }
    
    /* Улучшаем читаемость текста в портфолио на ПК */
    .portfolio-overlay h3 {
        font-size: 1.75rem;
    }
    
    .portfolio-overlay p {
        font-size: 1.1rem;
    }
}
/* Лоадер для изображений */
.image-loader {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: rgba(255, 255, 255, 0.95);
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   z-index: 3000;
   transition: opacity 0.3s ease;
}

.image-loader.hidden {
   opacity: 0;
   pointer-events: none;
   display: none;
}

.loader-spinner {
   width: 50px;
   height: 50px;
   border: 5px solid var(--bg-light);
   border-top: 5px solid var(--primary-color);
   border-radius: 50%;
   animation: spin 1s linear infinite;
   margin-bottom: 1rem;
}

@keyframes spin {
   0% { transform: rotate(0deg); }
   100% { transform: rotate(360deg); }
}

/* 3D Папка с документами - анимация */
.folder-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    perspective: 1500px;
}

.folder-wrapper {
    position: relative;
    width: 240px;
    height: 160px;
    cursor: pointer;
    transform-origin: bottom;
    z-index: 50;
    display: block;
}

.folder-wrapper.folder-clickable {
    cursor: pointer;
    text-decoration: none;
}

.folder-work-5 {
    background: linear-gradient(135deg, var(--primary-color), var(--purple));
    width: 100%;
    height: 100%;
    transform-origin: top;
    border-radius: 16px;
    border-top-left-radius: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.folder-label {
    position: relative;
    z-index: 10;
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.05em;
    padding: 0 1rem;
    line-height: 1.2;
    transition: all 0.3s ease;
    pointer-events: none;
}

.folder-clickable {
    text-decoration: none;
    display: block;
}

.folder-clickable:hover {
    transform: scale(1.02);
}

.folder-clickable:active {
    transform: scale(0.98);
}

.folder-wrapper:hover .folder-work-5 {
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.3);
}

.folder-wrapper:hover .folder-label {
    transform: scale(1.05);
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.folder-work-5::after {
    content: '';
    position: absolute;
    bottom: 99%;
    left: 0;
    width: 80px;
    height: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--purple));
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.folder-work-5::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 75.5px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--purple));
    clip-path: polygon(0 35%, 0% 100%, 50% 100%);
}

.folder-work-4,
.folder-work-3,
.folder-work-2 {
    position: absolute;
    inset: 4px;
    border-radius: 16px;
    transition: all 0.3s ease;
    transform-origin: bottom;
    user-select: none;
}

.folder-work-4 {
    background: #a1a1aa;
}

.folder-work-3 {
    background: #d4d4d8;
}

.folder-work-2 {
    background: #e4e4e7;
}

.folder-wrapper:hover .folder-work-4 {
    transform: rotateX(-20deg);
}

.folder-wrapper:hover .folder-work-3 {
    transform: rotateX(-30deg);
}

.folder-wrapper:hover .folder-work-2 {
    transform: rotateX(-38deg);
}

.folder-work-1 {
    position: absolute;
    bottom: 0;
    background: linear-gradient(to top, var(--secondary-color), #fbbf24);
    width: 100%;
    height: 156px;
    border-radius: 16px;
    border-top-right-radius: 0;
    transition: all 0.3s ease;
    transform-origin: bottom;
    display: flex;
    align-items: flex-end;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.folder-wrapper:hover .folder-work-1 {
    box-shadow: inset 0 20px 40px #fbbf24, inset 0 -20px 40px var(--secondary-color);
    transform: rotateX(-46deg) translateY(1px);
}

.folder-work-1::after {
    content: '';
    position: absolute;
    bottom: 99%;
    right: 0;
    width: 146px;
    height: 16px;
    background: #fbbf24;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.folder-work-1::before {
    content: '';
    position: absolute;
    top: -10px;
    right: 142px;
    width: 12px;
    height: 12px;
    background: #fbbf24;
    clip-path: polygon(100% 14%, 50% 100%, 100% 100%);
}

.folder-hint {
    font-size: 1.5rem;
    padding-top: 1rem;
    opacity: 0.2;
    color: var(--text-dark);
    text-align: center;
}


/* Адаптация для главной страницы */
.hero-folder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hero-folder .folder-wrapper {
    width: 280px;
    height: 187px;
}

.hero-folder-text {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    font-weight: 500;
}

@media (max-width: 768px) {
    .folder-wrapper {
        width: 200px;
        height: 133px;
    }
    
    .hero-folder .folder-wrapper {
        width: 220px;
        height: 147px;
    }
    
    .folder-label {
        font-size: 0.95rem;
        padding: 0 0.75rem;
    }
    
    .hero-folder-text {
        font-size: 1rem;
    }
    
    .folder-hint {
        font-size: 1.2rem;
    }
}
