/* CSS Variables */
:root {
    /* Colors */
    --primary-color: #16697A;
    --primary-dark: #0F4C5C;
    --secondary-color: #2C5282;
    --text-color: #333333;
    --text-light: #4A5568;
    --background-light: #F3F4F6;
    --border-color: #E2E8F0;
    
    /* Gradients */
    --hero-gradient: linear-gradient(135deg, #cb9d6d 0%, #d4b084 100%);
    
    /* Spacing */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
    --spacing-xl: 40px;
    
    /* Border Radius */
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Скрываем стандартную кнопку установки PWA */
.pwa-install-prompt,
[hidden],
[data-installation],
.a2hs-prompt,
#pwa-install-button,
div[chromebar-install-button] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body {
    font-family: 'Inter', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #cb9d6d 0%, #d4b084 100%);
    color: #1E1E1E;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: #1E1E1E;
}

/* Sticky Navigation */
.navbar-sticky {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 40px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #cb9d6d 0%, #d4b084 100%);
    z-index: 1000;
    transform: translateY(-100%); /* Скрыта по умолчанию */
    transition: transform 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-sticky.visible {
    transform: translateY(0); /* Показываем при скролле */
}

/* Гамбургер меню */
.hamburger {
    display: none; /* Скрыт по умолчанию на десктопе */
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex; /* Показываем только на мобильных */
        position: relative;
        z-index: 100;
    }
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #1E1E1E;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Мобильное меню */
.mobile-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #cb9d6d 0%, #d4b084 100%);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    display: none; /* Дополнительное скрытие */
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    display: block; /* Показываем при активации */
}

.mobile-menu .nav-links {
    flex-direction: column;
    padding: 20px;
    gap: 20px;
}

.mobile-menu .nav-links a {
    font-size: 18px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(30, 30, 30, 0.1);
}

.mobile-menu .nav-links a:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .navbar-sticky .nav-links {
        display: none;
    }
    
    .navbar-sticky .hamburger {
        display: flex;
    }
}

.navbar-sticky .logo img {
    width: 60px;
    height: 60px;
}

.logo img {
    width: 80px;
    height: 80px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: #1E1E1E;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a:focus-visible,
.mobile-menu .nav-links a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    border-radius: var(--border-radius-sm);
}

.hero-content {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 40px;
    gap: 60px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #1E1E1E;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    color: #6B7280;
}

.hero-cta {
    margin-top: 40px;
}

.btn-primary {
    background: var(--primary-color);
    color: #FFFFFF;
    border: none;
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 18px;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary.large {
    padding: 20px 40px;
    font-size: 20px;
}

/* Secondary Button */
.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--border-radius-md);
    padding: calc(var(--spacing-md) - 2px) calc(var(--spacing-lg) - 2px);
    font-size: 16px;
    font-weight: 600;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #E6F7F9;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

/* Text Highlights */
.highlight {
    color: var(--primary-color);
}

.cta-note {
    margin-top: 15px;
    font-size: 14px;
    color: #6B7280;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-video {
    position: relative;
    width: 320px;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35), 
                0 10px 30px rgba(203, 157, 109, 0.15);
}

.hero-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

/* Why Us Section */
.why-us {
    padding: 80px 0;
    background: #FAF7F2;
}

.why-us h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: #1E1E1E;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature {
    text-align: center;
    padding: 40px 30px;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}
.feature, .step, .review {
    content-visibility: auto;
    contain-intrinsic-size: 300px 400px;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #1E1E1E;
}

.feature p {
    color: #6B7280;
    font-size: 1.1rem;
}

/* Portfolio Section */
.portfolio {
    padding: 80px 0;
    background: #E9E0D2;
}

.portfolio h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: #1E1E1E;
}

.portfolio-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Ряд с тремя фото */
.photos-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Видео блок отдельно */
.video-section {
    display: flex;
    justify-content: center;
    width: 100%;
    justify-items: center; /* Дополнительное центрирование элементов грида */
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .photos-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.portfolio-item {
    text-align: center;
    width: 100%;
}

.before-after-slider {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 133.33%; /* 3:4 соотношение для фото */
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    cursor: ew-resize;
    user-select: none;
    background: #f8f9fa;
}

.before-img,
.after-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Возвращаем cover для полного заполнения */
    object-position: center;
}

.after-img {
    clip-path: polygon(50% 0%, 100% 0%, 100% 100%, 50% 100%);
    transition: none; /* Убрал автоматическую анимацию */
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transform: translateX(-50%);
    transition: none; /* Убрал анимацию */
    cursor: ew-resize;
    z-index: 10;
}

/* Добавим кружок на ручке */
.slider-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border: 3px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.animated-photo {
    position: relative;
    width: 100%;
    max-width: 720px;
    height: 405px; /* Фиксированная высота для 16:9 на десктопе */
    border-radius: 12px;
    overflow: hidden;
    margin: 0 auto 20px auto;
    background: #f8f9fa;
}

@media (max-width: 768px) {
    .animated-photo {
        max-width: none;
        height: 0;
        padding-bottom: 56.25%; /* 16:9 на мобильных */
    }
}

.animated-photo {
    position: relative;
    overflow: hidden;
}

.animated-photo video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
}

/* Контейнер для маркеров и подсказок */
.video-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Стили для маркеров времени */
.time-marker {
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    transition: transform var(--transition-fast);
    z-index: 2;
}

.time-marker:hover {
    transform: scale(1.2);
}

/* Всплывающие подсказки */
.marker-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: 3;
}

.time-marker:hover + .marker-tooltip {
    opacity: 1;
}

/* Оверлей с пояснениями */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.7));
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 1;
}

.animated-photo:hover .video-overlay {
    opacity: 1;
}

/* Текст пояснения в оверлее */
.overlay-text {
    position: absolute;
    bottom: var(--spacing-md);
    left: var(--spacing-md);
    right: var(--spacing-md);
    color: white;
    font-size: 0.9rem;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Индикатор прогресса */
.video-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 2;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    transition: width 0.1s linear;
}

/* Кнопки управления */
.video-controls {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    display: flex;
    gap: var(--spacing-xs);
    z-index: 3;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.animated-photo:hover .video-controls {
    opacity: 1;
}

.video-control-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.video-control-btn .icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: inline-block;
}

.video-control-btn .icon-pause {
    display: none;
}

.video-control-btn[data-state="pause"] .icon-play {
    display: none;
}

.video-control-btn[data-state="pause"] .icon-pause {
    display: inline-block;
}

.video-control-btn:hover {
    background: var(--primary-color);
    border-color: white;
    transform: scale(1.1);
}

.animated-photo video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.portfolio-caption {
    font-weight: 500;
    color: #374151;
}

/* Packages Section */
.packages {
    padding: 60px 0;
    background: #FAF7F2;
}

.packages h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: #1E1E1E;
}

/* Pricing Categories */
.pricing-category {
    margin-bottom: 30px;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1E1E1E;
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    width: 100%;
    line-height: 1.2;
}

/* Packages Grid */
.packages-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    align-items: stretch;
}

.restoration-packages {
    gap: 18px;
}

.video-packages {
    gap: 20px;
    justify-content: center;
    align-items: stretch;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.video-packages .package {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 450px;
    width: 280px;
}

.video-packages .package.special {
    min-height: 450px;
    width: 280px;
}

.video-packages .package-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.video-packages .package-features {
    flex-grow: 1;
    justify-content: center;
    display: flex;
    flex-direction: column;
}

.video-packages .package-price {
    margin-bottom: 15px;
}

.special-packages {
    justify-content: center;
}

/* Video Info Section */
.video-info {
    display: flex;
    gap: 20px;
    margin-top: 25px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
}

.animation-features {
    margin-top: 0;
    padding: 15px;
    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    width: 580px;
    flex-shrink: 0;
}

.video-note {
    margin-top: 0;
    text-align: center;
    width: 280px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .video-info {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .animation-features {
        width: 100%;
        max-width: 350px;
    }
    
    .video-note {
        width: 100%;
        max-width: 350px;
    }
}

.package {
    background: #FFFFFF;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
    width: 260px;
    flex-shrink: 0;
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

.package:hover {
    transform: translateY(-5px);
}

.package.popular {
    transform: scale(1.05);
    border: 3px solid var(--primary-color);
}

.package.special {
    background: linear-gradient(135deg, #cb9d6d 0%, #d4b084 100%);
    color: white;
    width: 280px;
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.package h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    line-height: 1.3;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
}

.package h3 strong {
    font-weight: 700;
    display: block;
    margin-bottom: 3px;
}

.package-subtitle {
    font-weight: 400;
    font-size: 0.9rem;
    color: #6B7280;
    margin-top: 5px;
    line-height: 1.2;
    text-align: center;
    width: 100%;
    display: block;
}

.package.special .package-subtitle {
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.package.special h3 {
    text-align: center;
    align-items: center;
    margin-top: 25px;
}

.package.special h3 strong {
    text-align: center;
}

.package-price {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.package.special .package-price {
    color: white;
}

.package-description {
    color: #6B7280;
    margin-bottom: 10px;
    font-size: 1rem;
}

.package.special .package-description {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 1.1rem;
    line-height: 1.3;
    margin-bottom: 20px;
}

.old-price {
    font-size: 0.85rem;
    text-decoration: line-through;
    opacity: 0.7;
    display: block;
    margin-top: 4px;
}

.package-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.package-features {
    list-style: none;
    margin: 0px 0;
    flex-grow: 1;
    text-align: left;
}

.package-features li {
    padding: 6px 0;
    color: #6B7280;
    text-align: left;
    display: flex;
    align-items: flex-start;
    font-size: 0.9rem;
}

.package.special .package-features li {
    color: rgba(255, 255, 255, 0.9);
}

.package-features li:before {
    content: "✓ ";
    color: #4caf50;
    font-weight: bold;
    margin-right: 8px;
    flex-shrink: 0;
    min-width: 16px;
}

/* Animation Package Specific Styles */
.package-features-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 0;
}

.animation-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: var(--background-light);
    border-radius: var(--border-radius-sm);
    border-left: 3px solid var(--primary-color);
}

.option-label {
    font-weight: 500;
    color: #1E1E1E;
    font-size: 0.85rem;
}

.option-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1rem;
}

.extra-time {
    margin-top: 20px;
    margin-bottom: 15px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.extra-time small {
    color: #FFFFFF;
    font-weight: 600;
    font-size: 0.8rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-package {
    width: 100%;
    padding: var(--spacing-sm);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
    margin-top: auto;
    font-size: 0.9rem;
}

.btn-package:hover {
    background: var(--primary-dark);
}

/* Volume Discounts */
.volume-discounts {
    margin-top: 30px;
    padding: 20px;
    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.volume-discounts h3 {
    color: #1E1E1E;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.discount-info {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.discount-item {
    background: var(--primary-color);
    color: white;
    padding: 6px 14px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 0.85rem;
}

.discount-example {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #4caf50;
    color: #1E1E1E;
    font-size: 0.9rem;
}

/* Animation Features */
.animation-features {
    margin-top: 0;
    padding: 15px;
    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    width: 580px;
    flex-shrink: 0;
}

.animation-features h3 {
    color: #1E1E1E;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.animation-features ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.animation-features li {
    padding: 4px 0;
    color: #6B7280;
    display: flex;
    align-items: flex-start;
    font-size: 0.9rem;
}

.animation-features li:before {
    content: "✓ ";
    color: #4caf50;
    font-weight: bold;
    margin-right: 6px;
    flex-shrink: 0;
}

.animation-note {
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--background-light);
    border-radius: var(--border-radius-sm);
    color: var(--text-color);
    font-size: 0.85rem;
    border-left: 3px solid var(--primary-color);
}

/* Video Note */
.video-note {
    margin-top: 0;
    text-align: center;
    width: 280px;
    flex-shrink: 0;
}

.video-note p {
    background: #fff3cd;
    padding: 12px;
    border-radius: 6px;
    color: #856404;
    margin: 0;
    border-left: 3px solid #ffc107;
    font-size: 0.85rem;
}

/* Additional Services */
.additional-services {
    margin-top: 20px;
}

.additional-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.additional-item {
    background: #FFFFFF;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
    border-top: 3px solid var(--primary-color);
}

.additional-item h3 {
    color: #1E1E1E;
    margin-bottom: 6px;
    font-size: 0.95rem;
    line-height: 1.2;
}

.additional-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.urgency-details {
    margin: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.urgency-option {
    font-size: 0.8rem;
    color: var(--text-light);
    background: var(--background-light);
    padding: calc(var(--spacing-xs) - 2px) var(--spacing-xs);
    border-radius: calc(var(--border-radius-sm) / 2);
    border-left: 2px solid var(--primary-color);
}

/* How It Works Section */
.how-it-works {
    padding: 80px 0;
    background: #E9E0D2;
}

.how-it-works h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: #1E1E1E;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.step {
    text-align: center;
    padding: 30px 20px;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #1E1E1E;
}

.step p {
    color: #6B7280;
    line-height: 1.6;
}

/* Reviews Section */
.reviews {
    padding: 80px 0;
    background: #FAF7F2;
}

.reviews h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: #1E1E1E;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.review {
    background: #FFFFFF;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
    background-color: #f5f5f5; /* Цвет фона во время загрузки */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Лёгкая тень */
    transition: transform 0.2s ease; /* Плавное увеличение при наведении */
}

/* Эффект при наведении */
.review-avatar:hover {
    transform: scale(1.05);
}

/* Оптимизация для Retina дисплеев */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .review-avatar {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

.review-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.review-date {
    color: #6B7280;
    font-size: 14px;
}

.review-text {
    color: #1E1E1E;
    line-height: 1.6;
    margin-bottom: 15px;
}

.review-rating {
    font-size: 18px;
}

/* CTA Section */
.cta-section {
    padding: 30px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    position: relative;
}

.cta-logo {
    margin: 0 auto 30px;
    width: 300px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-logo img {
    width: 100%;
    height: auto;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.95;
}

/* Footer */
.footer {
    background: #1E1E1E;
    color: white;
    padding: 28px 0 12px;
    font-size: 0.9rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.footer-section h3 {
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.footer-section p {
    margin-bottom: 4px;
    color: #D1D5DB;
    line-height: 1.4;
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.social-link {
    color: #D1D5DB;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #2d3748;
    border-radius: 50%;
    transition: background 0.3s, transform 0.3s, color 0.3s;
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.social-icon {
    width: 18px;
    height: 18px;
    display: block;
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(2%) hue-rotate(256deg) brightness(108%) contrast(101%);
}

.footer-link {
    display: block;
    color: #D1D5DB;
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid #374151;
    color: #D1D5DB;
    line-height: 1.4;
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 4px 0;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Флексбокс для центрирования */
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 40px;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
    margin: auto; /* Добавляем auto margin для дополнительного центрирования */
    /* Добавляем стили для лучшего отображения */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Специальные стили для окна успешной отправки */
#successModal .modal-content {
    max-width: 400px; /* Делаем окно меньше */
    padding: 30px;
    text-align: center;
    /* Добавляем тень для лучшего выделения на фоне */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#successModal h3 {
    font-size: 24px;
    margin-bottom: 16px;
    color: #2C5282;
}

#successModal p {
    margin-bottom: 24px;
    color: #4A5568;
    font-size: 16px;
}

/* Стили для кнопок в модальном окне успешной отправки */
#successModal .btn {
    min-width: 160px;
    margin: 8px;
    padding: 12px 24px;
}

#successModal .btn-primary {
    background: var(--primary-color);
}

#successModal .btn-secondary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

/* Анимация появления */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#successModal .modal-content {
    animation: modalFadeIn 0.3s ease-out;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.modal-content h3 {
    margin-bottom: 30px;
    font-size: 1.8rem;
    text-align: center;
}

.upload-area {
    margin-bottom: 30px;
}

.upload-previews {
    margin-top: 15px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.preview-card {
    display: flex;
    gap: 8px;
    padding: 8px;
    border: 1px solid #e9ecef;
    background: #fff;
    border-radius: 10px;
    align-items: center;
}

.preview-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f3f4f6;
}

.preview-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.preview-name {
    font-size: 11px;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-actions {
    display: flex;
    gap: 8px;
}

.action-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 7px;
    border-radius: 999px;
    border: 2px solid var(--primary-color);
    color: #1E1E1E;
    font-size: 10.5px;
    cursor: pointer;
    user-select: none;
}

.action-pill input[type="radio"] {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    display: inline-block;
    position: relative;
    background: #fff;
}

.action-pill input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary-color);
    transform: translate(-50%, -50%);
}

.preview-remove {
    margin-left: auto;
    background: #fff0f0;
    color: #dc3545;
    border: 1px solid #f3c2c2;
    border-radius: 16px;
    font-size: 11px;
    padding: 4px 8px;
    cursor: pointer;
}

.action-pill input[type="radio"]:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.upload-zone {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}

.upload-zone:hover {
    border-color: var(--primary-color);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.upload-note {
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form input:invalid {
    border-color: #f44336;
}

.contact-form input:valid:not(:placeholder-shown) {
    border-color: #4caf50;
}

/* Прогресс-бар загрузки */
.upload-progress {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #6B7280;
}

#progressPercent {
    font-weight: 600;
    color: #1E1E1E;
}

#progressStatus {
    font-style: italic;
}

/* Анимация пульсации для прогресс-бара */
.progress-fill.pulsing {
    animation: progressPulse 1.5s ease-in-out infinite alternate;
}

@keyframes progressPulse {
    0% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
    }
}

#telegramInput {
    position: relative;
}

#telegramInput::placeholder {
    color: #999;
}

/* Согласие на обработку данных */
.consent-notice {
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 10px;
}

.consent-notice input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    margin-top: 1px;
    accent-color: var(--primary-color);
    cursor: pointer;
    flex-shrink: 0;
}

.consent-notice label {
    display: inline;
    cursor: pointer;
    line-height: 1.4;
    font-weight: 400;
    color: #333;
    font-size: 12px;
    white-space: normal;
}

.consent-notice a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.consent-notice a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Состояния чекбокса */
.consent-notice input[type="checkbox"]:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Баннер согласия на cookies */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1E1E1E 0%, #2d2d2d 100%);
    color: white;
    padding: 20px;
    z-index: 10000;
    border-top: 3px solid var(--primary-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(100%);
    }
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-text {
    flex: 1;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-text a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.cookie-text a:hover {
    color: var(--primary-dark);
}

.cookie-btn {
    flex-shrink: 0;
    padding: 12px 24px;
    font-size: 14px;
    white-space: nowrap;
}

/* Адаптивность для cookie-баннера */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 15px;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .cookie-text {
        font-size: 13px;
    }
    
    .cookie-btn {
        width: 100%;
        padding: 14px;
        font-size: 16px;
    }
}

/* Стили для модального окна политики cookies */
.legal-text h3 {
    color: #1E1E1E;
    font-size: 1.2rem;
    margin: 20px 0 10px 0;
    font-weight: 600;
}

.legal-text ul {
    margin: 10px 0 10px 20px;
    padding: 0;
}

.legal-text li {
    margin: 5px 0;
    line-height: 1.6;
}

.consent-notice input[type="checkbox"]:invalid {
    outline: 2px solid #dc3545;
}

/* Ошибка валидации */
.consent-notice.error {
    border-color: #dc3545;
    background: #fff5f5;
}

.consent-notice.error label {
    color: #dc3545;
}

/* Юридические модальные окна */
.legal-modal .modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.legal-content {
    padding: 30px;
}

.legal-text {
    line-height: 1.6;
    color: #333;
}

.legal-text p {
    margin-bottom: 15px;
}

.legal-text strong {
    color: #1E1E1E;
    font-weight: 600;
}

.legal-text ul {
    margin: 10px 0 15px 20px;
}

.legal-text li {
    margin-bottom: 5px;
}

/* Правовая информация в футере */
.legal-notice {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.contact-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        padding: 0 20px;
    }
    .hero-video {
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25),
                    0 6px 18px rgba(203, 157, 109, 0.12);
        margin-bottom: 40px;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .navbar {
        padding: 15px 20px;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu .nav-links {
        display: flex;
    }
    
    /* Video packages mobile styles */
    .video-packages {
        flex-direction: column;
        align-items: center;
    }
    
    .video-packages .package {
        min-height: auto;
        width: 100%;
        max-width: 350px;
    }
    
    .video-packages .package.special {
        min-height: auto;
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .packages h2 {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .category-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .packages-grid {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .package {
        width: 100%;
        max-width: 350px;
        min-height: auto;
        padding: 25px;
    }
    
    .package.popular {
        transform: none;
    }
    
    .package.special {
        width: 100%;
        max-width: 350px;
    }
    
    .popular-badge {
        font-size: 12px;
        padding: 6px 16px;
    }
    
    .package h3 {
        font-size: 1.1rem;
        min-height: 110px;
        line-height: 1.2;
    }
    
    .package-subtitle {
        font-size: 0.8rem;
        margin-top: 3px;
    }
    
    .package-price {
        font-size: 2rem;
    }
    
    .package-description {
        font-size: 1rem;
    }
    
    /* Volume discounts mobile */
    .volume-discounts {
        margin-top: 30px;
        padding: 20px;
    }
    
    .volume-discounts h3 {
        font-size: 1.1rem;
    }
    
    .discount-info {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .discount-item {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .discount-example {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    /* Animation options mobile */
    .animation-option {
        padding: 6px 10px;
    }
    
    .option-label {
        font-size: 0.9rem;
    }
    
    .option-price {
        font-size: 1rem;
    }
    
    .animation-features {
        margin-top: 20px;
        padding: 15px;
    }
    
    .animation-features h3 {
        font-size: 1.1rem;
    }
    
    .animation-note {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    /* Additional services mobile */
    .additional-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .additional-item {
        padding: 15px;
    }
    
    .additional-item h3 {
        font-size: 1rem;
    }
    
    .additional-price {
        font-size: 1.3rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .reviews-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 5px auto;
        padding: 15px;
        width: 98%;
        max-height: 98vh;
        border-radius: 8px;
    }
    
    .modal-content h3 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .upload-zone {
        padding: 20px;
    }
    
    .upload-icon {
        font-size: 2rem;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 2px auto;
        padding: 10px;
        width: 99%;
        max-height: 99vh;
    }
    
    .modal-content h3 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .upload-zone {
        padding: 15px;
    }
    
    .contact-form {
        gap: 15px;
    }
    
    .contact-form input,
    .contact-form textarea {
        padding: 10px;
        font-size: 14px;
    }
    
    .consent-notice {
        padding: 15px;
        font-size: 13px;
    }
    
    .consent-notice input[type="checkbox"] {
        width: 16px;
    }
}

/* Стили для юридических модальных окон */
.legal-modal .modal-content {
    padding: 30px;
    max-width: 800px;
}

.legal-modal h3 {
    color: #2C5282;
    margin-bottom: 20px;
    font-size: 24px;
    border-bottom: 2px solid #E2E8F0;
    padding-bottom: 10px;
}

.legal-content {
    color: #4A5568;
    line-height: 1.6;
    margin-bottom: 20px;
}

.legal-content p {
    margin: 15px 0;
    font-size: 16px;
}

.legal-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.legal-content li {
    margin: 5px 0;
    list-style-type: disc;
}

.legal-modal .btn-secondary {
    margin-top: 20px;
    width: 100%;
    max-width: 200px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .legal-modal .modal-content {
        padding: 20px;
    }
    
    .legal-modal h3 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .legal-content p {
        font-size: 14px;
    }
}
