/* Анимация fade-up (появление при скролле) */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
    opacity: 1  !important; 
    transform: translateY(0)  !important;
}
/* Плавная прокрутка по якорям */
html {
    scroll-behavior: smooth;
}

.services-label {
    position: absolute;
    /* Центрируем относительно родителя (контейнер ноутбука) */
    top: 50%;
    left: 50%;
    /* Базовое центрирование + смещение для анимации выезда */
    transform: translate(calc(-50% - 80px), -85%) perspective(1000px) rotateY(-18deg) scale(0.8);
    opacity: 0;
    transition: all 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
    z-index: 20;
    font-size: 2.5rem;
    font-weight: 900;
    white-space: nowrap;
    background: linear-gradient(90deg, #ff00c3, #fc7979);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(168,85,247,0.4), 0 0 25px rgba(236,72,153,0.3);
    /* Убедимся, что текст не выходит за пределы родителя */
    pointer-events: none;
}

.services-block.visible .services-label {
    opacity: 1;
    transform: translate(calc(-50% + 0px), -85%) perspective(1000px) rotateY(-18deg) scale(1);
}

/* Адаптив для планшетов и телефонов */
@media (max-width: 1024px) {
    .services-label {
        font-size: 2rem;
        transform: translate(calc(-50% - 60px), -50%) perspective(800px) rotateY(-15deg) scale(0.8);
    }
    .services-block.visible .services-label {
        transform: translate(calc(-50% + 0px), -50%) perspective(800px) rotateY(-15deg) scale(1);
    }
}

@media (max-width: 768px) {
    .services-label {
        font-size: 1.8rem;
        transform: translate(calc(-50% - 40px), -90%) perspective(600px) rotateY(-12deg) scale(0.8);
    }
    .services-block.visible .services-label {
        transform: translate(calc(-50% + 0px), -90%) perspective(600px) rotateY(-12deg) scale(1);
    }
}

@media (max-width: 480px) {
    .services-label {
        font-size: 1.8rem;
        transform: translate(calc(-50% - 20px), -90%) perspective(400px) rotateY(-8deg) scale(0.8);
    }
    .services-block.visible .services-label {
        transform: translate(calc(-50% + 0px), -90%) perspective(400px) rotateY(-8deg) scale(1);
    }
}

/* ----для hero---------- */
/* Анимация орбиты (круги) */
@keyframes orbit {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) translateX(250px) rotate(0deg) scale(1);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg) translateX(250px) rotate(-360deg) scale(1);
    }
}

/* Анимация появления текста */
.hero-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стрелка вниз */
.animate-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}


/* ======================================================
   Тёмная тема для страницы пекарни (bakery-page)
   ====================================================== */

/* Фоны блоков */
.dark .bakery-page .bg-white {
    background-color: #e88a07 !important; /* тёмный фон для белых блоков */
}
.dark .bakery-page .bg-amber-50 {
    background-color: #2d1b0e !important; /* тёмный вариант янтарного фона */
}
.dark .bakery-page .bg-amber-100 {
    background-color: #3d2618 !important;
}

/* Текст */
.dark .bakery-page .text-gray-700 {
    color: #ddd !important;
}
.dark .bakery-page .text-gray-600 {
    color: #ccc !important;
}
.dark .bakery-page .text-amber-700 {
    color: #ffffff !important;
}
.dark .bakery-page .text-amber-800 {
    color: #ffffff !important;
}

/* Границы и тени */
.dark .bakery-page .border {
    border-color: #555 !important;
}
.dark .bakery-page .shadow-sm,
.dark .bakery-page .shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.5) !important;
}

/* Кнопки */
.dark .bakery-page .bg-amber-600 {
    background-color: #92400e !important;
}
.dark .bakery-page .bg-amber-600:hover {
    background-color: #78350f !important;
}

/* Герой (градиент заменяем на тёмный фон) */
.dark .bakery-page .bg-gradient-to-br {
    background-image: none !important;
    background-color: #1a1a1a !important;
}
.dark .bakery-page .bg-white\/50 {
    background-color: rgba(26, 26, 26, 0.8) !important;
}
.dark .bakery-page .text-amber-800 {
    color: #f59e0b !important;
}

/* для фона подложки */
/* Блок с фоновым изображением и размытием */
/* .section-with-bg {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.section-with-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: url('/images/sitesign.jpg');
    background-size: cover;
    background-position: center;
    filter: blur(6px);        
    transform: scale(1.05);      
} */
/* ----------------------------------------смена фона по смене темы */
/* Мобильная версия кнопки смены темы */
@media (max-width: 768px) {
    #themeToggle {
        top: 70px !important;
        right: 12px !important;
    }
}
/* Светлая тема (по умолчанию) */
.section-with-bg::before {
    background-image: url('/images/light-bg.jpg');
    filter: blur(6px);
}

/* Тёмная тема */
.dark .section-with-bg::before {
    background-image: url('/images/dark-bg.jpg');
    /* или даже затемнение: background-color: #1a1a1a; */
}
/* ----------------------------------------смена фона по смене темы */

/* Стили для слайдера */
.slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.slider-container button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.slider-container button:hover {
    background: rgba(0, 0, 0, 0.8);
}

#prevSlide {
    left: 10px;
}

#nextSlide {
    right: 10px;
}

/* для 3D  в хиро */
/* Контейнер с перспективой---------------------------- */
.perspective-container {
    perspective: 600px; /* сила 3D-эффекта */
    transform-style: preserve-3d;
}

/* Внутренний блок, который будет вращаться */
.card-3d .card-inner {
    transition: transform 0.15s ease-out;
    transform-style: preserve-3d;
    will-change: transform;
}

/* Дополнительно для плавности при уходе мыши */
.card-3d .card-inner {
    transition: transform 0.25s ease-out;
}

/* Сокращённое имя на мобильных ----------------------------*/
@media (max-width: 767px) {
    .full-name { display: none; }
    .short-name { display: inline; }
}
@media (min-width: 768px) {
    .full-name { display: inline; }
    .short-name { display: none; }
}

/* Анимация для стрелок ----------------------------*/
.arrow-pulse {
    display: inline-block;
    font-size: 2.5rem; /* размер стрелки, можно настроить */
    transition: all 0.3s ease;
    animation: arrowGlow 1s ease-in-out infinite;
}

/* Задержки для каждой стрелки */
.arrow-1 {
    animation-delay: 0s;
}
.arrow-2 {
    animation-delay: 0.3s;
}
.arrow-3 {
    animation-delay: 0.6s;
}

/* Ключевые кадры анимации */
@keyframes arrowGlow {
    0% {
        color: #9ca3af;          /* серый */
        text-shadow: none;
        /*transform: scale(1);*/
    }
    50% {
        color: #a855f7;          /* фиолетовый (purple-500) */
        text-shadow: 0 0 20px #a855f7, 0 0 40px #a855f7; /* свечение */
        /*transform: scale(1.2);*/
    }
    100% {
        color: #9ca3af;
        text-shadow: none;
        /*transform: scale(1);*/
    }
}

/* Мобильный поворот стрелок вниз ---------------------------------*/
@media (max-width: 767px) {
    .arrow-mobile-down {
        transform:   rotate(90deg) !important;
       
    }
}
@media (min-width: 768px) {
    .arrow-mobile-down {
        transform: rotate(0deg) !important;
    }
}

.dark body {
    background-color: #111827 !important;
    color: #e5e7eb !important;
}


/* ===== Принудительная тёмная тема для iOS Safari ===== */

/* Фон страницы */
.dark body {
    background-color: #111827 !important;
    color: #e5e7eb !important;
}

/* Хедер */
.dark header {
    background-color: #1f2937 !important;
}

/* Секции с фоном */
.dark .bg-white {
    background-color: #1f2937 !important;
}
.dark .bg-gray-50 {
    background-color: #111827 !important;
}
.dark .bg-gray-100 {
    background-color: #1f2937 !important;
}
.dark .bg-gray-50\/50 {
    background-color: rgba(17, 24, 39, 0.5) !important;
}

/* Карточки услуг (в разделе "Что я создаю") */
.dark .services-block {
    background-color: #1f2937 !important;
}

/* Карточки преимуществ */
.dark .bg-white.dark\:bg-gray-800 {
    background-color: #1f2937 !important;
}

/* Форма обратной связи */
.dark #contactForm {
    background-color: #1f2937 !important;
}
.dark #contactForm input,
.dark #contactForm textarea,
.dark #contactForm select {
    background-color: #111827 !important;
    color: #e5e7eb !important;
    border-color: #374151 !important;
}

/* FAQ карточки */
.dark .faq-item {
    background-color: #1f2937 !important;
}

/* Текст */
.dark .text-gray-600 {
    color: #d1d5db !important;
}
.dark .text-gray-700 {
    color: #e5e7eb !important;
}
.dark .text-gray-800 {
    color: #e5e7eb !important;
}
.dark .text-gray-900 {
    color: #f3f4f6 !important;
}
.dark .text-amber-800 {
    color: #f59e0b !important;
}
.dark .text-amber-700 {
    color: #fbbf24 !important;
}


