@media (max-width:991px) {
    body.poster {
        margin-top: 60vh;
    }
}

body.poster {
    background-attachment: fixed;
}

.top-5 {
    top: 5px;
}

/* Основные стили из HTML файла */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #4a6741 100%);
    --light-gradient: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    --accent-gradient: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    overflow-x: hidden; 
}

.fixed-top-custom {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.hero-modern {
    min-height: 100vh;
    background: var(--primary-gradient);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

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

.floating-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.floating-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.zigzag-section {
    position: relative;
    padding: 120px 0;
}

.zigzag-section:nth-child(even) {
    background: var(--accent-gradient);
}

.zigzag-section:nth-child(odd) {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.zigzag-section::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 100px;
    background: inherit;
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    z-index: 1;
}

.card-modern {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 25px;
    transition: all 0.4s ease;
    overflow: hidden;
    position: relative;
}

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

.card-modern:hover::before {
    left: 100%;
}

.card-modern:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.service-card {
    background: var(--secondary-gradient);
    color: white;
    border-radius: 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

/* Исправление для Business пакета - белый текст */
.service-card[style*="primary-gradient"] {
    color: white !important;
}

.service-card[style*="primary-gradient"] h3,
.service-card[style*="primary-gradient"] .animated-counter,
.service-card[style*="primary-gradient"] p,
.service-card[style*="primary-gradient"] li {
    color: white !important;
}

.team-section {
    background: var(--dark-gradient);
    position: relative;
}

.team-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1579532537598-459ecdaf39cc?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wyMDkyMnwwfDF8c2VhcmNofDE2OXx8YnVzaW5lc3N8ZW58MHx8fHwxNzQ5MTUxODM0fDA&ixlib=rb-4.1.0&q=80&w=1080') center/cover;
    opacity: 0.1;
    filter: blur(1px);
}

/* Исправление для команды - темный фон блока */
.team-section .floating-card {
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white !important;
}

.team-section .floating-card p {
    color: white !important;
}

/* Исправление заголовка "Unser Team" - серый цвет */
.team-section h2.display-4 {
    color: #6c757d !important;
}

.contact-modern {
    background: var(--light-gradient);
    border-radius: 50px 50px 0 0;
    margin-top: -50px;
    position: relative;
    z-index: 2;
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.value-item {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.value-item::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--primary-gradient);
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.value-item:hover::before {
    opacity: 1;
}

.value-item:hover {
    transform: translateY(-10px);
    color: white;
}

.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Исправление для десктопной версии - отступ для секций под навигацией */
/* Применяется ко всем страницам кроме index.html */
section.d-flex {
    margin-top: 80px;
}

/* Отступ для всех первых секций под фиксированной навигацией в десктопной версии */
main > section:first-child:not(.hero-modern) {
    margin-top: 80px;
}

@media (max-width: 768px) {
    .zigzag-section::before { display: none; }
    .value-grid { 
        grid-template-columns: 1fr;
    }
    .parallax-bg { background-attachment: scroll; }
    
    /* Исправление для мобильной версии - отступ для секций под навигацией */
    .hero-modern {
        margin-top: 90px;
    }
    
    /* Отступ для всех первых секций под фиксированной навигацией */
    main > section:first-child {
        margin-top: 90px;
    }
    
    /* Отступ для страниц с контентными секциями */
    section.d-flex {
        margin-top: 90px;
    }
}

.animated-counter {
    font-size: 3rem;
    font-weight: bold;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Исправление счетчика для белого фона */
.service-card[style*="primary-gradient"] .animated-counter {
    background: white !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.btn-gradient {
    background: var(--secondary-gradient);
    border: none;
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    color: white;
}

/* Улучшение кнопки - добавление эффекта активности */
.btn-gradient:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.btn-gradient:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(103, 126, 234, 0.3);
}

/* Плавная прокрутка для всей страницы */
html {
    scroll-behavior: smooth;
}

/* Исправление для секции контактов - предотвращение выхода текста за border */
.contact-modern .card-modern {
    overflow: hidden;
}

.contact-modern .d-flex .fw-bold {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

.contact-modern .d-flex {
    min-height: 80px;
    align-items: center !important;
}

.contact-modern .d-flex > div:last-child {
    flex: 1;
    min-width: 0;
    padding-left: 0;
}

.contact-modern .rounded-4[style*="background: var(--accent-gradient)"] {
    overflow: hidden;
    word-wrap: break-word;
}

/* Дополнительное исправление для мобильных устройств */
@media (max-width: 768px) {
    .contact-modern .d-flex {
        flex-direction: column;
        text-align: center;
        padding: 20px !important;
    }
    
    .contact-modern .d-flex .me-4 {
        margin-right: 0 !important;
        margin-bottom: 15px;
    }
    
    .contact-modern .fw-bold {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}
