/* Jelly button animation */
.circle-button {
    position: relative;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: jellyFloat 3s ease-in-out infinite;
    overflow: hidden;
}

.circle-button:hover {
    transform: scale(1.05);
}

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

.circle-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: all 0.8s ease;
}

.circle-button:hover::before {
    left: 100%;
}

/* Title animation */
.title {
    animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Span animations */
.span-intelegence {
    animation: fadeIn 1s ease-out;
    animation-fill-mode: both;
}

.span-intelegence:nth-child(2) {
    animation-delay: 0.3s;
}

.span-intelegence:nth-child(4) {
    animation-delay: 0.6s;
}

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

/* Block animations */
.block-taste, .block-why-open-maker, .block-price, .block-questions {
    animation: slideInUp 0.8s ease-out;
    animation-fill-mode: both;
}

.block-taste {
    animation-delay: 0.2s;
}

.block-why-open-maker {
    animation-delay: 0.4s;
}

.block-price {
    animation-delay: 0.6s;
}

.block-questions {
    animation-delay: 0.8s;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effects for items */
.item-why-open-maker {
    transition: all 0.4s ease;
}

.item-why-open-maker:hover {
    transform: translateY(-3px);
}

.item-block-price {
    transition: all 0.4s ease;
}

.item-block-price:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Star icon animation */
.star-icon {
    animation: starPulse 2s ease-in-out infinite;
}

@keyframes starPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Button hover effects */
.button-make-work {
    transition: all 0.4s ease;
}

.button-make-work:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* Form input animation */
input[type="text"] {
    transition: all 0.4s ease;
}

input[type="text"]:focus {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

/* Questions block animations */
.block-questions {
    animation: slideInUp 0.8s ease-out;
    animation-fill-mode: both;
}

.item-block-questions-form {
    transition: all 0.4s ease;
}

.item-block-questions-form input[type="text"] {
    transition: all 0.4s ease;
}

.item-block-questions-form input[type="text"]:focus {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.item-block-questions-form button {
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.item-block-questions-form button:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.item-block-questions-form button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: all 0.6s ease;
}

.item-block-questions-form button:hover::before {
    left: 100%;
}

.item-block-questions-tg {
    transition: all 0.4s ease;
}

.open-maker {
    transition: all 0.4s ease;
}

.open-maker-tg button {
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.open-maker-tg button:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.open-maker-tg button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: all 0.6s ease;
}

.open-maker-tg button:hover::before {
    left: 100%;
}

/* Логотип контейнер */
.logo-container {
    position: relative;
    z-index: 5;
}

/* Гирлянда на блоке */
.work-selection-block-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 1200px;
    border: none;
    outline: none;
    overflow: visible;
}

.christmas-garland-block {
    position: absolute;
    top: -50px;
    left: -40px;
    right: -40px;
    height: 100px;
    z-index: 10;
    pointer-events: none;
    overflow: visible;
    border: none;
    outline: none;
    width: calc(100% + 80px);
}

.garland-svg-block {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
    animation: garlandWaveBlock 3s ease-in-out infinite;
    border: none;
    outline: none;
    background: transparent;
    overflow: visible;
    min-width: 100%;
}

.garland-path-block {
    filter: url(#glowBlock);
    animation: garlandPulseBlock 2s ease-in-out infinite;
    stroke-linecap: round;
}

@keyframes garlandWaveBlock {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -4px, 0);
    }
}

@keyframes garlandPulseBlock {
    0%, 100% {
        opacity: 0.75;
        stroke-width: 2.5;
    }
    50% {
        opacity: 0.95;
        stroke-width: 3;
    }
}

.garland-lights-block {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    overflow: visible;
}

.light-block {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50% 50% 50% 0;
    transform: translateZ(0) rotate(-45deg);
    top: 31px;
    box-shadow: 
        0 0 12px currentColor,
        0 0 24px currentColor,
        inset -2px -2px 6px rgba(255, 255, 255, 0.4),
        inset 2px 2px 6px rgba(0, 0, 0, 0.2);
    animation: lightPulseBlock 2s ease-in-out infinite;
    z-index: 11;
    will-change: transform, opacity, filter;
}

.light-block::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 6px;
    height: 12px;
    background: linear-gradient(180deg, rgba(200, 200, 200, 0.7) 0%, rgba(150, 150, 150, 0.5) 100%);
    border-radius: 2px 2px 0 0;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
}

.light-block::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, transparent 70%);
    border-radius: 50%;
    animation: lightSparkleBlock 2s ease-in-out infinite;
}

@keyframes lightPulseBlock {
    0%, 100% {
        opacity: 0.6;
        transform: translateZ(0) rotate(-45deg) scale(0.95);
        filter: brightness(0.9);
    }
    50% {
        opacity: 1;
        transform: translateZ(0) rotate(-45deg) scale(1.1);
        filter: brightness(1.2);
    }
}

@keyframes lightSparkleBlock {
    0%, 100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) translateZ(0) rotate(45deg) scale(0.9);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) translateZ(0) rotate(45deg) scale(1.2);
    }
}

/* Позиционирование лампочек на блоке - оптимизировано */
.light-block-1 { left: 3%; background: linear-gradient(135deg, #FFD700, #FFA500); color: #FFD700; animation-delay: 0s; }
.light-block-2 { left: 9%; background: linear-gradient(135deg, #FF6B6B, #FF4757); color: #FF6B6B; animation-delay: 0.15s; }
.light-block-3 { left: 15%; background: linear-gradient(135deg, #4ECDC4, #44A08D); color: #4ECDC4; animation-delay: 0.3s; }
.light-block-4 { left: 21%; background: linear-gradient(135deg, #45B7D1, #96C93D); color: #45B7D1; animation-delay: 0.45s; }
.light-block-5 { left: 27%; background: linear-gradient(135deg, #FFD93D, #F6C23E); color: #FFD93D; animation-delay: 0.6s; }
.light-block-6 { left: 33%; background: linear-gradient(135deg, #A8E6CF, #88D8A3); color: #A8E6CF; animation-delay: 0.75s; }
.light-block-7 { left: 39%; background: linear-gradient(135deg, #FF9FF3, #F368E0); color: #FF9FF3; animation-delay: 0.9s; }
.light-block-8 { left: 45%; background: linear-gradient(135deg, #54A0FF, #2E86DE); color: #54A0FF; animation-delay: 1.05s; }
.light-block-9 { left: 51%; background: linear-gradient(135deg, #5F27CD, #341F97); color: #5F27CD; animation-delay: 1.2s; }
.light-block-10 { left: 57%; background: linear-gradient(135deg, #00D2D3, #01A3A4); color: #00D2D3; animation-delay: 1.35s; }
.light-block-11 { left: 63%; background: linear-gradient(135deg, #FF6348, #FF4757); color: #FF6348; animation-delay: 1.5s; }
.light-block-12 { left: 69%; background: linear-gradient(135deg, #FFA502, #FF6348); color: #FFA502; animation-delay: 1.65s; }
.light-block-13 { left: 75%; background: linear-gradient(135deg, #FFD700, #FFA500); color: #FFD700; animation-delay: 1.8s; }
.light-block-14 { left: 81%; background: linear-gradient(135deg, #32FF7E, #18D26E); color: #32FF7E; animation-delay: 1.95s; }
.light-block-15 { left: 87%; background: linear-gradient(135deg, #7BED9F, #5F27CD); color: #7BED9F; animation-delay: 2.1s; }
.light-block-16 { left: 93%; background: linear-gradient(135deg, #70A1FF, #5352ED); color: #70A1FF; animation-delay: 2.25s; }

/* Снежинки - оптимизировано */
.snow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
    will-change: contents;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1em;
    font-family: Arial;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.6);
    animation: snowfall linear infinite;
    opacity: 0;
    will-change: transform;
    transform: translateZ(0);
}

.snowflake:nth-child(1) {
    left: 20%;
    animation-duration: 14s;
    animation-delay: 0s;
    font-size: 0.9em;
}

.snowflake:nth-child(2) {
    left: 45%;
    animation-duration: 16s;
    animation-delay: 2s;
    font-size: 1em;
}

.snowflake:nth-child(3) {
    left: 70%;
    animation-duration: 13s;
    animation-delay: 1s;
    font-size: 0.85em;
}

.snowflake:nth-child(4) {
    left: 35%;
    animation-duration: 15s;
    animation-delay: 3s;
    font-size: 0.95em;
}

.snowflake::before {
    content: '❄';
}

@keyframes snowfall {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translate3d(15px, 100vh, 0) rotate(360deg);
        opacity: 0;
    }
}

/* Блестящие звёздочки - отключено */
.sparkles-container {
    display: none;
}

/* Адаптивность для разных разрешений */
@media (max-width: 1200px) {
    .christmas-garland-block {
        top: -50px;
        left: -30px;
        right: -30px;
        height: 100px;
        width: calc(100% + 60px);
    }
    
    .garland-svg-block {
        width: 100% !important;
        left: 0 !important;
        min-width: 100%;
    }
    
    .light-block {
        width: 16px;
        height: 16px;
        top: 30px;
    }
}

@media (max-width: 992px) {
    .christmas-garland-block {
        top: -45px;
        left: -25px;
        right: -25px;
        height: 90px;
    }
    
    .light-block {
        width: 15px;
        height: 15px;
        top: 28px;
    }
}

@media (max-width: 946px) {
    .christmas-garland-block {
        top: -40px;
        left: -20px;
        right: -20px;
        height: 80px;
    }
    
    .light-block {
        width: 14px;
        height: 14px;
        top: 28px;
    }
}

@media (max-width: 768px) {
    .christmas-garland-block {
        top: -35px;
        left: -15px;
        right: -15px;
        height: 70px;
    }
    
    .light-block {
        width: 13px;
        height: 13px;
        top: 26px;
    }
    
    .snowflake {
        font-size: 0.7em;
    }
    
}

@media (max-width: 576px) {
    .christmas-garland-block {
        top: 48px !important;
        left: -25px;
        right: -8px;
        height: 50px;
    }
    
    .garland-svg-block {
        width: calc(100% + 16px) !important;
        left: -8px !important;
    }
    
    .light-block {
        width: 10px;
        height: 10px;
        top: 20px;
    }
    
    .snowflake {
        font-size: 0.6em;
    }
    
}

/* Дополнительные новогодние эффекты для блока - оптимизировано */
.work-selection-block {
    position: relative;
    animation: blockGlow 4s ease-in-out infinite;
    will-change: box-shadow;
}

@keyframes blockGlow {
    0%, 100% {
        box-shadow: 0 8px 32px black, 0 0 0 rgba(255, 215, 0, 0);
    }
    50% {
        box-shadow: 0 8px 32px black, 0 0 20px rgba(255, 215, 0, 0.25), 0 0 40px rgba(177, 100, 253, 0.15);
    }
}

/* Эффект свечения для заголовка - оптимизировано */
.title {
    position: relative;
    animation: titleSparkle 5s ease-in-out infinite;
    will-change: text-shadow;
}

@keyframes titleSparkle {
    0%, 100% {
        text-shadow: 
            0 0 8px rgba(255, 255, 255, 0.4),
            0 0 16px rgba(128, 0, 255, 0.25);
    }
    50% {
        text-shadow: 
            0 0 16px rgba(255, 255, 255, 0.7),
            0 0 32px rgba(128, 0, 255, 0.5),
            0 0 48px rgba(177, 100, 253, 0.3);
    }
}