/* ========================================
Базовые настройки и переменные
======================================== */
:root {
    --primary: #f28c38;
    --primary-dark: #e07a2a;
    --dark-bg: #0a1c2f;
    --dark-light: #112f44;
    --gray-light: #f5f7fc;
    --gray-medium: #eef2f8;
    --text-dark: #1e2a3a;
    --text-gray: #4a5c6c;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background-color: var(--gray-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
Header и навигация
======================================== */
.header {
    background: var(--dark-bg);
    color: white;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.logo span {
    font-weight: 400;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    display: block;
}

.nav {
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav a {
    color: #e0e7ef;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav a:hover,
.nav a.active {
    color: var(--primary);
}

.btn-contact {
    background: var(--primary);
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 600;
    color: var(--dark-bg);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-contact:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(242, 140, 56, 0.3);
}

/* =============================================
МОБИЛЬНОЕ МЕНЮ
============================================= */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        position: relative;
        z-index: 1001;
    }
    .nav {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 15px;
        padding: 20px 0;
        background: var(--dark-bg);
        border-top: 1px solid rgba(255,255,255,0.1);
        margin-top: 10px;
    }
    .nav.open {
        display: flex;
    }
    .nav a {
        font-size: 18px;
        padding: 8px 0;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .header-inner {
        flex-wrap: wrap;
    }
    .btn-contact {
        margin-top: 10px;
        width: 100%;
        text-align: center;
    }
}

/* ========================================
Герой (главная страница)
======================================== */
.hero {
    background: linear-gradient(135deg, #f5f7fc 0%, #eef2f8 100%);
    color: var(--text-dark);
    padding: 80px 0;
}

.hero-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.hero-text {
    flex: 1;
}

.hero-text h2 {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #1e2a3a;
}

.hero-text p {
    font-size: 18px;
    color: #4a5c6c;
    margin-bottom: 32px;
    max-width: 550px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--dark-bg);
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(242, 140, 56, 0.3);
}

.btn-outline {
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
}

.btn-outline:hover {
    background: rgba(242, 140, 56, 0.1);
    transform: translateY(-2px);
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
    .hero-grid {
        flex-direction: column;
    }
    .hero-image {
        width: 100%;
        margin-top: 25px;
    }
    .hero-image img {
        width: 100% !important;
        height: auto !important;
        box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    }
}

/* ========================================
Блок преимуществ
======================================== */
.benefits {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 48px;
    color: var(--text-dark);
}

.benefits-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
}

.benefit-card {
    background: var(--white);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    flex: 1;
    min-width: 240px;
    border: 1px solid var(--gray-medium);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(242, 140, 56, 0.05), rgba(10, 28, 47, 0.02));
    z-index: -1;
    transition: left 0.6s ease-out;
    border-radius: 20px;
}

.benefit-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
}

.benefit-card:hover::before {
    left: 0;
}

.benefit-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: inline-block;
    transition: transform 0.4s ease;
}

.benefit-card:hover .benefit-icon {
    transform: scale(1.1) rotate(-5deg);
}

/* ========================================
Карточки каталога
======================================== */
.catalog-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.catalog-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: calc(33.333% - 20px);
    min-width: 280px;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.catalog-item-link:hover {
    transform: translateY(-8px);
}

.catalog-item {
    background: var(--white);
    border-radius: 24px;
    padding: 30px 24px 24px;
    text-align: center;
    width: 100%;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--gray-medium);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.catalog-item-link:hover .catalog-item {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
    border-color: var(--primary);
}

.catalog-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 320px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafbfc;
    border-radius: 24px;
    margin: 0 auto 20px auto;
    padding: 30px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
}

.catalog-item-link:hover .catalog-img-wrapper {
    background: rgba(242, 140, 56, 0.08);
    transform: scale(1.03);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.catalog-img-wrapper img {
    max-width: 95%;
    max-height: 95%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
                filter 0.4s ease,
                box-shadow 0.4s ease;
}

.catalog-item-link:hover .catalog-img-wrapper img {
    transform: scale(1.15) rotate(2deg);
    filter: drop-shadow(0 10px 20px rgba(242, 140, 56, 0.2));
}

.catalog-item h3 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
    line-height: 1.3;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.catalog-item p {
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.6;
    margin-top: auto;
}

@media (max-width: 992px) {
    .catalog-item-link {
        width: calc(50% - 15px);
    }
}

@media (max-width: 576px) {
    .catalog-item-link {
        width: 100%;
        min-width: unset;
    }
    .catalog-img-wrapper {
        max-width: 250px !important;
        padding: 20px;
    }
}

/* ========================================
Блок "О компании"
======================================== */
.about-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    padding: 60px 0;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.about-text h3 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-dark);
}

.about-text ul {
    list-style: none;
    padding: 0;
}

.about-text ul li {
    margin-bottom: 12px;
    padding-left: 8px;
}

.about-image {
    flex: 1;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 24px;
}

/* ========================================
Форма обратной связи
======================================== */
.form-card {
    max-width: 680px;
    margin: 0 auto;
    background: var(--dark-light);
    padding: 40px;
    border-radius: 32px;
}

.form-card-light {
    background: #ffffff !important;
    color: #1e2a3a !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin: 40px auto;
}

.form-card h2,
.form-card h3 {
    font-size: 28px;
    margin-bottom: 12px;
}

.form-group {
    margin-bottom: 20px;
}

input, textarea {
    width: 100%;
    padding: 14px 18px;
    border-radius: 40px;
    border: none;
    font-family: inherit;
    background: var(--gray-light);
    color: var(--text-dark);
    font-size: 16px;
    transition: var(--transition);
}

textarea {
    border-radius: 24px;
    resize: vertical;
}

input:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary);
}

.btn-submit {
    background: var(--primary);
    border: none;
    padding: 14px 32px;
    font-weight: 700;
    border-radius: 40px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
}

.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(242, 140, 56, 0.3);
}

.form-message {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

/* ========================================
Страница контактов
======================================== */
.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 60px;
}

.contact-details {
    flex: 1;
    background: var(--white);
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.contact-details h2,
.contact-details h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--dark-bg);
}

.contact-details p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-details a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.contact-details a:hover {
    color: var(--primary-dark);
}

.map {
    flex: 1;
    min-height: 400px;
    height: auto;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.map img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ========================================
Footer
======================================== */
.footer {
    background: #071625;
    padding: 40px 0;
    color: #9aaebf;
    text-align: center;
}

.footer-contacts {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-contacts a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.footer-contacts a:hover {
    color: var(--primary-dark);
}

.footer p {
    margin-top: 20px;
    font-size: 14px;
}

/* ========================================
Анимации появления (scroll reveal)
======================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes breathe {
    0% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.01) translateY(-3px); }
    100% { transform: scale(1) translateY(0); }
}

.reveal.active .benefit-card,
.reveal.active .catalog-item {
    animation: breathe 4s ease-in-out infinite;
}

.reveal.active .benefit-card:hover,
.reveal.active .catalog-item:hover {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: none;
    }
    .reveal.active .benefit-card,
    .reveal.active .catalog-item {
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ========================================
Адаптив
======================================== */
@media (max-width: 768px) {
    .hero-text h2 {
        font-size: 32px;
    }
    .section-title {
        font-size: 28px;
    }
    .footer-contacts {
        flex-direction: column;
        gap: 10px;
    }
    .contact-info {
        flex-direction: column;
    }
    .map {
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    .header-inner {
        gap: 10px;
    }
    .btn-contact, .btn-primary, .btn-outline {
        padding: 10px 16px;
        font-size: 14px;
    }
    .benefit-card {
        padding: 24px 16px;
        border-radius: 16px;
    }
    .hero-text h2 {
        font-size: 26px;
    }
    .form-card {
        padding: 24px 16px;
    }
}

/* =============================================
БЕГУЩАЯ СТРОКА — МИНИМАЛИСТИЧНАЯ, БЕСШОВНАЯ
============================================= */
.ticker-container {
    width: 100%;
    overflow: hidden;
    background: #f28c38;
    border-top: 1px solid #0a1c2f;
    border-bottom: 1px solid #0a1c2f;
    padding: 14px 0;
    position: relative;
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: tickerScroll 40s linear infinite;
    will-change: transform;
}

.ticker-container:hover .ticker-track {
    animation-play-state: paused;
}

.ticker-item {
    flex-shrink: 0;
    padding: 0 40px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #0a1c2f;
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
}

@keyframes tickerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
    .ticker-container {
        padding: 12px 0;
    }
    .ticker-item {
        font-size: 13px;
        padding: 0 24px;
        letter-spacing: 1px;
    }
}

/* =============================================
ЖЁСТКОЕ УБИРАНИЕ ОТСТУПА МЕЖДУ БЕГУЩЕЙ СТРОКОЙ И ЗАГОЛОВКОМ
============================================= */
.benefits {
    margin-top: 0 !important;
    padding-top: 10px !important;
}

.benefits .section-title {
    margin-top: 0 !important;
}

/* =============================================
АДАПТАЦИЯ СТРАНИЦЫ "О НАС" ДЛЯ МОБИЛЬНЫХ
============================================= */
@media (max-width: 768px) {
    .about-image {
        display: none !important;
    }
    .about-text {
        width: 100%;
        max-width: 100%;
        text-align: center;
        padding: 0 10px;
    }
    .about-text h2,
    .about-text h3 {
        text-align: center;
    }
    .about-text ul {
        text-align: left;
        display: inline-block;
    }
    .about-text ul li {
        text-align: left;
    }
}

/* =============================================
АДАПТАЦИЯ SEO-БЛОКА ДЛЯ МОБИЛЬНЫХ
============================================= */
@media (max-width: 768px) {
    .seo-bottom-block .reveal {
        text-align: left !important;
        padding: 20px !important;
        max-width: 100% !important;
    }
    .seo-bottom-block p {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }
}

/* =============================================
СТИЛИ ДЛЯ H1 (SEO-ИСПРАВЛЕНИЕ)
============================================= */
.hero-text h1 {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #1e2a3a;
}

h1.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 48px;
    color: var(--text-dark);
}

.about-text h1,
.contact-details h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.product-page h1,
.container h1[style*="font-size: 32px"] {
    font-size: 32px !important;
    color: #0a1c2f !important;
    margin-bottom: 30px !important;
}

.ecoline-series h1 {
    font-size: 32px;
    font-weight: 700;
    color: #0a1c2f;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 32px;
    }
    h1.section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    .about-text h1,
    .contact-details h1 {
        font-size: 24px;
    }
    .product-page h1,
    .container h1[style*="font-size: 32px"] {
        font-size: 26px !important;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 26px;
    }
    h1.section-title {
        font-size: 24px;
        margin-bottom: 24px;
    }
    .about-text h1,
    .contact-details h1 {
        font-size: 22px;
    }
    .product-page h1,
    .container h1[style*="font-size: 32px"] {
        font-size: 22px !important;
    }
}