/* ============================================================
   INDEX.CSS – стили главной страницы (Zero-Flicker)
   ============================================================ */

/* ----- HERO СЛАЙДЕР ----- */
.hero {
    position: relative;
    height: 480px;
    display: flex;
    align-items: center;
    padding: 0 40px;
    overflow: hidden;
    background-color: var(--bg-dark);
}
.slider-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}
.slider-container img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    filter: brightness(0.5);
}
.slider-container img.active { opacity: 1; }
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    color: var(--text-light);
}
.hero-content h1 {
    font-size: 36px;
    line-height: 1.3;
    font-weight: 400;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

/* ----- НОВОСТИ ----- */
.news-section {
    background-color: var(--bg-dark);
    border-top: 2px solid #3a5d7a;
    padding: 12px 0;
    overflow: hidden;
    position: relative;
}
.news-container {
    display: flex;
    align-items: center;
    white-space: nowrap;
    gap: 60px;
    color: var(--text-light);
    font-size: 14px;
    letter-spacing: 0.04em;
    animation: ticker-news 25s linear infinite;
}
@keyframes ticker-news {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}
.news-btn {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: #1d3c5c;
    color: var(--accent-gold);
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    z-index: 2;
    transition: all 0.3s;
}
.news-btn:hover { background: #2b5683; transform: translateY(-50%) scale(1.05); }

/* ============================================================
   ЕДИНЫЕ ЗАГОЛОВКИ СЕКЦИЙ
   ============================================================ */
.section-title-wrap {
    text-align: center;
    margin-bottom: 45px;
}
.section-title-wrap h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--bg-dark);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0;
}
.title-underline {
    width: 50px;
    height: 3px;
    background: var(--accent-gold);
    margin: 12px auto 0;
    border-radius: 2px;
}

/* ============================================================
   ЗАКАЗЧИКИ (БЕСШОВНЫЙ ЦИКЛ)
   ============================================================ */
.clients {
    padding: 50px 0 40px;
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

.clients-slider-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 35px 0;
    min-height: 120px;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    box-shadow: 0 8px 30px rgba(14, 41, 66, 0.05);
    box-sizing: border-box;
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 8%, rgba(0,0,0,1) 92%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 8%, rgba(0,0,0,1) 92%, rgba(0,0,0,0) 100%);
}

.clients-slider-wrapper:hover .clients-logos-track {
    animation-play-state: paused;
}

.clients-logos-track {
    display: flex;
    align-items: center;
    gap: 70px;
    width: max-content;
    animation: scroll-logos 30s linear infinite;
    will-change: transform;
}

.clients-logos-track img {
    height: 54px;
    max-width: 160px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%) contrast(115%);
    opacity: 0.65;
    transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.clients-logos-track img:hover {
    filter: grayscale(0%) contrast(100%);
    opacity: 1;
    transform: scale(1.08);
}

@keyframes scroll-logos {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(calc(-100% / 3), 0, 0); }
}

/* ============================================================
   ПРЕИМУЩЕСТВА
   ============================================================ */
.features {
    padding: 40px 0 90px;
    width: 100%;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.feature-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--accent-gold);
    border-radius: 16px;
    padding: 38px 30px;
    box-shadow: 0 6px 22px rgba(14, 41, 66, 0.04);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-left-color 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 35px rgba(14, 41, 66, 0.08);
    border-left-color: #b8862d;
}
.feature-num {
    position: absolute;
    top: 22px;
    right: 24px;
    font-size: 34px;
    font-weight: 800;
    color: #e2e8f0;
    line-height: 1;
    pointer-events: none;
    transition: color 0.3s ease;
}
.feature-card:hover .feature-num { color: #cbd5e1; }
.feature-icon-box {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;
    border-radius: 12px;
    background: #0e2942;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(14, 41, 66, 0.12);
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}
.feature-card:hover .feature-icon-box {
    transform: scale(1.05);
    background-color: var(--accent-gold);
    color: #0e2942;
}
.feature-icon-box svg {
    width: 26px !important;
    height: 26px !important;
    flex-shrink: 0;
}
.feature-card h4 {
    font-size: 19px;
    font-weight: 700;
    color: #0e2942;
    margin: 0 0 12px 0;
    letter-spacing: 0.01em;
}
.feature-card p {
    font-size: 14.5px;
    line-height: 1.65;
    color: #475569;
    margin: 0;
}
.feature-card p strong { color: #0e2942; }

/* ============================================================
   ДОСТАВКА
   ============================================================ */
.delivery-section { 
    padding: 70px 0 80px; 
    background-color: var(--bg-light); 
    position: relative; 
}
.delivery-wrapper { 
    display: flex; 
    justify-content: space-between; 
    align-items: stretch; 
    gap: 30px; 
    position: relative; 
}
.delivery-left { 
    flex: 1.2; 
    position: relative; 
    max-width: 600px; 
    display: flex;
    flex-direction: column;
}
.delivery-title { 
    font-size: 34px; 
    font-weight: 700; 
    line-height: 1.25; 
    margin-bottom: 25px; 
    color: var(--bg-dark); 
    letter-spacing: 0.02em; 
}
.delivery-card {
    width: 100%; 
    height: 100%; 
    min-height: 380px; 
    background: var(--text-light);
    border-radius: 20px !important;
    position: relative; 
    overflow: hidden;
    box-shadow: var(--shadow-premium); 
    border: 1px solid rgba(255,255,255,0.8);
}
.delivery-card img.map-bg { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}
.float-icon {
    position: absolute; 
    background: var(--text-light); 
    border-radius: 50%; 
    padding: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08); 
    width: 60px; 
    height: 60px;
    animation: float-rotate 5s infinite alternate ease-in-out; 
    pointer-events: none;
}
.float-icon img { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
}
.icon-1 { top: 10%; left: 10%; animation-delay: 0s; }
.icon-2 { top: 5%; right: 15%; animation-delay: 2s; }
.icon-3 { bottom: 15%; right: 5%; animation-delay: 4s; }
.icon-4 { bottom: 5%; left: 20%; animation-delay: 1s; }

@keyframes float-rotate {
    0% { transform: translateY(-10px) rotate(-5deg); }
    100% { transform: translateY(15px) rotate(5deg); }
}
.neural-lines { 
    position: absolute; 
    top:0; left:0; 
    width:100%; height:100%; 
    z-index:1; 
    pointer-events:none; 
}
.neural-lines line {
    stroke: #e1b36e; 
    stroke-width: 2.5; 
    stroke-dasharray: 10 15;
    animation: move-dash 3s linear infinite, pulse-opacity 4s ease-in-out infinite;
}
@keyframes move-dash { to { stroke-dashoffset: -50; } }
@keyframes pulse-opacity { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

.delivery-right {
    flex: 1; 
    max-width: 480px; 
    background: var(--text-light);
    border-radius: 20px !important;
    padding: 40px 45px;
    box-shadow: var(--shadow-premium); 
    display: flex; 
    flex-direction: column; 
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.8);
    margin-top: 38px;
}
.delivery-ways-text { 
    display: flex; 
    flex-direction: column; 
    gap: 22px; 
}
.delivery-ways-item { 
    display: flex; 
    flex-direction: column; 
}
.delivery-ways-item h4 { 
    font-size: 16.5px; 
    font-weight: 700; 
    color: #0e2942; 
    letter-spacing: 0.02em; 
    margin-bottom: 4px; 
}
.delivery-ways-item p { 
    font-size: 14px; 
    line-height: 1.6; 
    color: #475569; 
    margin: 0; 
}

/* ----- ОТЗЫВЫ И КАРТА ----- */
.reviews-map { padding: 60px 0; }
.reviews-map-wrapper { display: flex; gap: 40px; background: var(--bg-light); border-radius: 24px; }
.reviews-block {
    background: var(--text-light); border-radius: 20px; padding: 25px; flex: 1;
    box-shadow: var(--shadow-premium); border: 1px solid rgba(255,255,255,0.8);
}
.review-item { margin-bottom: 20px; border-bottom: 1px solid #f0f4fa; padding-bottom: 15px; }
.review-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.review-text { font-size: 14px; line-height: 1.5; margin: 10px 0; color: #475569; }
.map-block { flex: 1; border-radius: 20px; overflow: hidden; position: relative; box-shadow: var(--shadow-premium); }
#map { width: 100%; height: 100%; min-height: 450px; background: #f0f0f0; }

/* ----- ФОРМА ЗАЯВКИ ----- */
.contact-section { padding: 60px 0; background-color: var(--bg-light); }
.contact-form-container {
    background-color: #9fb7cc; padding: 50px; border-radius: 24px; margin-bottom: 80px;
    box-shadow: 0 10px 40px rgba(14, 41, 66, 0.08);
    transition: all 0.5s ease;
}
.contact-form-container h2 { font-size: 32px; margin-bottom: 30px; color: #0e2942; font-weight: 600; }
.form-row { display: flex; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.form-row input, .form-row textarea {
    flex: 1; padding: 14px 20px; border-radius: 10px;
    border: 1px solid #e2e8f0; outline: none; min-width: 200px; font-size: 15px;
    background: #fff; transition: all 0.3s;
}
.form-row input:focus, .form-row textarea:focus {
    border-color: #1d4a78; box-shadow: 0 0 0 4px rgba(14,41,66,0.06);
}
.form-group-message { display: flex; flex-direction: column; gap: 15px; }
.form-group-message textarea { flex: 1; padding: 15px 24px; border-radius: 10px; border: 1px solid #e2e8f0; resize: vertical; min-height: 120px; background: #fff; transition: 0.3s;}
.form-group-message textarea:focus { border-color: #1d4a78; box-shadow: 0 0 0 4px rgba(14,41,66,0.06); }
.form-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; margin-top: 15px; }

/* Прикрепление файлов */
.file-upload-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.file-upload-wrapper { position: relative; display: flex; align-items: center; gap: 10px; }
.file-upload-wrapper input[type="file"] { position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-upload-btn {
    background: #fff; padding: 10px 20px; border-radius: 30px; font-size: 14px; font-weight: 500;
    color: #0e2942; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
    transition: 0.3s; border: 1px solid transparent;
}
.file-upload-btn:hover { background: #f0f4fa; border-color: #e2e8f0; transform: translateY(-2px); }
.file-limit-hint {
    font-size: 13px;
    color: #334155;
    margin-left: 5px;
}
.file-names-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.file-name-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12.5px;
    color: #0e2942;
    font-weight: 500;
}

.btn-submit {
    background-color: var(--accent-gold); border: none; padding: 14px 45px; border-radius: 10px;
    font-size: 16px; cursor: pointer; font-weight: 600; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.btn-submit:hover {
    background-color: #d1a256; transform: translateY(-3px); box-shadow: 0 10px 25px rgba(220, 179, 107, 0.4);
}

/* ============================================================
   АКЦЕНТНАЯ ЗОЛОТИСТАЯ ПОДСВЕТКА ФОРМЫ
   ============================================================ */
@keyframes goldPulseHighlight {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 179, 107, 0);
        outline: 3px solid transparent;
        transform: scale(1);
    }
    25% {
        box-shadow: 0 0 50px 15px rgba(220, 179, 107, 0.9);
        outline: 3px solid var(--accent-gold);
        transform: scale(1.02);
    }
    60% {
        box-shadow: 0 0 35px 10px rgba(220, 179, 107, 0.7);
        outline: 3px solid var(--accent-gold);
        transform: scale(1.01);
    }
    100% {
        box-shadow: 0 10px 40px rgba(14, 41, 66, 0.08);
        outline: 3px solid transparent;
        transform: scale(1);
    }
}

.contact-form-container.highlight-gold {
    animation: goldPulseHighlight 2.8s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
}

/* ============================================================
   КАТАЛОГ ПРОДУКЦИИ НА ГЛАВНОЙ (ШЕЛКОВАЯ АНИМАЦИЯ БЕЗ МИГАНИЯ)
   ============================================================ */
.featured-products {
    padding: 80px 20px 20px;
}
.featured-products .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.featured-products .section-header h2 {
    font-size: 30px;
    font-weight: 700;
    color: var(--bg-dark);
    letter-spacing: 0.02em;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    min-height: 280px;
}

/* Аппаратная анимация появления карточек с нулевого кадра */
@keyframes productCardEntry {
    0% {
        opacity: 0;
        transform: translateY(22px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    /* Гарантирует невидимость с 0-й миллисекунды до старта анимации */
    animation: productCardEntry 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.product-card:nth-child(1) { animation-delay: 0.04s; }
.product-card:nth-child(2) { animation-delay: 0.11s; }
.product-card:nth-child(3) { animation-delay: 0.18s; }
.product-card:nth-child(4) { animation-delay: 0.25s; }

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}
.product-card .card-img {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #fafafa;
}
.product-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.product-card:hover .card-img img {
    transform: scale(1.05);
}
.product-card .card-body {
    padding: 16px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.product-card .card-body h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--bg-dark);
    margin-bottom: 8px;
}
.product-card .card-body p {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}
.product-card .card-body .btn-small {
    background-color: var(--accent-gold);
    color: #1e293b;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
}
.product-card .card-body .btn-small:hover {
    background-color: #cfa150;
}

/* КНОПКА СКАЧАТЬ КАТАЛОГ */
.download-catalog-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
    margin-bottom: 10px;
    padding-right: 0;
}
.download-catalog-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.7;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.1);
}
.download-catalog-btn:hover {
    opacity: 1;
    transform: translateY(-3px);
    background: var(--accent-gold);
    color: var(--bg-dark);
    border-color: var(--bg-dark);
    box-shadow: 0 8px 20px rgba(220, 179, 107, 0.3);
}
.download-catalog-btn svg {
    stroke: currentColor;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
@media (max-width: 768px) {
    .clients-slider-wrapper {
        padding: 24px 0;
        min-height: 100px;
    }
    .clients-logos-track {
        gap: 45px;
    }
    .clients-logos-track img {
        height: 46px;
    }
    .download-catalog-container { justify-content: center; }
    .delivery-title {
        padding-left: 20px !important;
        padding-right: 20px !important;
        font-size: 28px;
    }
    .delivery-wrapper { flex-direction: column; }
    .delivery-left, .delivery-right { width: 100%; max-width: 100%; margin-top: 0; }
    .delivery-card { border-radius: 24px; }
    .delivery-right { border-radius: 24px; padding: 30px; }
    .reviews-map-wrapper { flex-direction: column; }
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .hero { height: 380px; padding: 0 20px; }
    .hero-content h1 { font-size: 24px; }
    .delivery-card { min-height: 280px; }
    .float-icon { width: 45px; height: 45px; }
    .delivery-ways-item { gap: 5px; }
    .contact-form-container { padding: 20px; }
    .form-row { flex-direction: column; }
    .form-row input, .form-row textarea { width: 100%; min-width: 0; }
    .form-actions { flex-direction: column; align-items: stretch; }
    .btn-submit { width: 100%; text-align: center; }
    .reviews-map-wrapper { flex-direction: column; }
    .reviews-block { padding: 15px; }
    .products-grid {
        grid-template-columns: 1fr;
    }
}