/* Reset и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #fa0808; /* Основной */
    --color-primary-dark: #4d0808;
    --color-secondary: #6c4b4b; /* Акцентный цвет */
    --color-text: #333333;
    --color-text-light: #666666;
    --color-background: #ffffff;
    --color-background-alt: #f8f9fa;
    --color-border: #e0e0e0;
    --font-main: 'Inter', sans-serif;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Навигация */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-primary);
}

.logo img {
    margin-right: 0.5rem;
    height: 65px; 
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--color-primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--color-text);
    margin: 3px 0;
    transition: var(--transition);
}

/* Основные секции */
.fullscreen-section {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    scroll-snap-align: start;
}

main {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: 100vh;
}

#home {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../assets/images/hero-bg.jpg') no-repeat center center/cover;
    color: white;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
}

.cta-button:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    opacity: 0.7;
}

.arrow {
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-left: none;
    border-top: none;
    transform: rotate(45deg);
    margin-top: 0.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0) rotate(45deg);}
    40% {transform: translateY(-10px) rotate(45deg);}
    60% {transform: translateY(-5px) rotate(45deg);}
}

.section-content {
    max-width: 1000px;
    text-align: center;
}

.section-content h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--color-primary);
}

.section-content p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    max-width: 800px;
}

#about {
    background-color: var(--color-background-alt);
}

#services {
    background-color: var(--color-background);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.service-card h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

#contact {
    background-color: var(--color-background-alt);
}

.contact-info {
    margin-top: 2rem;
    text-align: center;
}

.contact-info a {
    color: var(--color-primary);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Футер */
footer {
    background-color: var(--color-text);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

footer a {
    color: #fff;
    text-decoration: underline;
}

/* Виджет связи */
.contact-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.widget-toggle {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.widget-toggle:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
}

.widget-content {
    position: absolute;
    bottom: calc(100% + 1rem);
    right: 0;
    width: 350px;
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

.widget-content.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.widget-content h3 {
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    font-family: inherit;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.form-actions button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.submit-btn {
    background-color: var(--color-primary);
    color: white;
}

.submit-btn:hover {
    background-color: var(--color-primary-dark);
}

.clear-btn {
    background-color: var(--color-text-light);
    color: white;
}

.clear-btn:hover {
    background-color: var(--color-text);
}

.close-btn {
    background-color: #fe1c32;
    color: white;
}

.close-btn:hover {
    background-color: #bf0417;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
    text-align: center;
}

/* Стили для анимированных иконок */
.service-icon {
    margin-bottom: 1.5rem;
    text-align: center;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.service-icon svg {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 4px 8px rgba(0, 86, 179, 0.3));
    transition: all 0.3s ease;
}

/* Анимация для Express-Lieferung */
.service-card:nth-child(1) .service-icon svg {
    animation: lightning-pulse 2s ease-in-out infinite;
}

@keyframes lightning-pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 4px 8px rgba(0, 86, 179, 0.3)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 6px 12px rgba(0, 86, 179, 0.5)); }
}

/* Анимация для Paketdienst */
.service-card:nth-child(2) .service-icon svg {
    animation: box-bounce 1.5s ease-in-out infinite;
}

@keyframes box-bounce {
    0%, 100% { transform: translateY(0) rotate(0); }
    25% { transform: translateY(-8px) rotate(-2deg); }
    75% { transform: translateY(-5px) rotate(2deg); }
}

/* Анимация для E-Commerce Logistik */
.service-card:nth-child(3) .service-icon svg {
    animation: cart-float 3s ease-in-out infinite;
}

@keyframes cart-float {
    0%, 100% { transform: translateX(0) translateY(0); }
    33% { transform: translateX(3px) translateY(-2px); }
    66% { transform: translateX(-3px) translateY(2px); }
}

/* Эффекты при наведении */
.service-card:hover .service-icon svg {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 8px 16px rgba(0, 86, 179, 0.6));
}

/* Плавные переходы для иконок */
.service-icon svg path,
.service-icon svg rect,
.service-icon svg circle {
    transition: all 0.3s ease;
}

.service-card:hover .service-icon svg path {
    stroke-width: 5;
}

.service-card:hover .service-icon svg circle {
    r: 7;
}

/* свечение при hover */
.service-card:hover .service-icon {
    filter: hue-rotate(45deg);
}

/* Плавное появление иконок */
.service-icon {
    opacity: 0;
    animation: fade-in-up 0.8s ease forwards;
}

.service-card:nth-child(1) .service-icon {
    animation-delay: 0.2s;
}

.service-card:nth-child(2) .service-icon {
    animation-delay: 0.4s;
}

.service-card:nth-child(3) .service-icon {
    animation-delay: 0.6s;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    /* Убираем анимированный скролл */
    .scroll-indicator {
        display: none;
    }
    
    /* Исправляем основную структуру для нормального скролла */
    main {
        scroll-snap-type: none !important;
        overflow-y: auto !important;
        height: auto !important;
    }
    
    .fullscreen-section {
        height: auto !important;
        min-height: 100vh;
        padding: 6rem 1rem 2rem;
        scroll-snap-align: none !important;
    }
    
    /* Навигация */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 1rem 2rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-container {
        padding: 0 1rem;
    }
    
    .logo span {
        font-size: 1.2rem;
    }

    /* Отключаем сложные анимации для мобильных */
    .service-icon svg {
        animation: none !important;
    }
    
    .service-card:hover .service-icon svg {
        transform: none !important;
        filter: none !important;
    }
    
    /* Герой секция */
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Секции */
    .section-content {
        padding: 0 1rem;
    }
    
    .section-content h2 {
        font-size: 2rem;
    }
    
    .section-content p {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    /* Сервисы */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .service-card {
        padding: 1.5rem;
        margin: 0.5rem;
    }
    
    /* Контактная информация */
    .contact-info {
        text-align: left;
        padding: 0 1rem;
    }
    
    .contact-info p {
        margin-bottom: 1rem;
    }
    
    /* Футер - исправляем отображение */
    footer {
        position: relative !important;
        margin-top: 0 !important;
    }
    
    .footer-content {
        padding: 1.5rem 1rem;
        text-align: center;
    }
    
    .footer-content p {
        margin-bottom: 1rem;
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    /* Контактный виджет */
    .contact-widget {
        bottom: 2rem;
        right: 1rem;
        left: auto;
    }
    
    .widget-toggle {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .widget-content {
        width: 90vw !important;
        max-width: 400px;
        right: 0 !important;
        left: auto !important;
        transform: translateY(10px);
    }
    
    .widget-content.active {
        transform: translateY(0);
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-actions button {
        width: 100%;
        margin-bottom: 0;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section-content h2 {
        font-size: 1.8rem;
    }
    
    .service-icon {
        height: 60px;
    }
    
    .service-icon svg {
        width: 50px;
        height: 50px;
    }
    
    .footer-content p {
        font-size: 0.8rem;
    }
}

/* Плавное отключение анимаций для экономии батареи */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
