/**
 * AsiaForest Theme Styles
 * @package AsiaForest
 * @version 1.0.0
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #2D6647;
    --secondary-green: #3D875E;
    --accent-green: #4AA876;
    --dark-bg: #0f1612;
    --section-bg: #1a2820;
    --card-bg: #1e2d25;
    --light-text: #ffffff;
    --gray-text: #b0b0b0;
    --border-color: rgba(74, 168, 118, 0.2);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--dark-bg);
    color: var(--light-text);
    overflow-x: hidden;
    line-height: 1.6;
}

body.modal-open {
    overflow: hidden;
}

html {
    scroll-behavior: smooth;
}

/* HEADER */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 22, 18, 0.95);
    backdrop-filter: blur(10px);
    padding: 25px 5%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 50px;
    align-items: center;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

header.scrolled {
    padding: 18px 5%;
    background: rgba(15, 22, 18, 0.98);
}

.nav-menu {
    display: flex;
    gap: 35px;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.nav-menu a {
    color: var(--light-text);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 0;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-green);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--accent-green);
}

.nav-menu a:hover::after {
    width: 100%;
}

.logo-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

.logo {
    height: 50px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.slogan {
    display: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header-address {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--gray-text);
    font-size: 13px;
    padding-right: 30px;
    border-right: 1px solid var(--border-color);
}

.mobile-header-contacts {
    display: none;
}

.contacts {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: right;
    flex-shrink: 0;
}

.contacts a {
    color: var(--light-text);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
    line-height: 1.4;
    white-space: nowrap;
}

.contacts a:hover {
    color: var(--accent-green);
}

.lang-switcher {
    display: flex;
    gap: 5px;
    background: rgba(74, 168, 118, 0.1);
    padding: 5px;
    border-radius: 0;
    flex-shrink: 0;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--gray-text);
    padding: 5px 12px;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: 600;
}

.lang-btn.active {
    background: var(--accent-green);
    color: white;
}

.cta-button {
    background: linear-gradient(135deg, var(--accent-green), var(--secondary-green));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 168, 118, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 168, 118, 0.5);
}

/* HERO SECTION */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.35);
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-video.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(45, 102, 71, 0.5), rgba(15, 22, 18, 0.7));
    z-index: 2;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 64px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    color: white;
}

.hero-subtitle {
    font-size: 24px;
    color: var(--gray-text);
    margin-bottom: 40px;
    font-weight: 300;
}

.hero-cta {
    background: linear-gradient(135deg, var(--accent-green), var(--secondary-green));
    color: white;
    border: none;
    padding: 18px 50px;
    border-radius: 0;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(74, 168, 118, 0.4);
}

.hero-cta:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(74, 168, 118, 0.6);
}

/* SECTION COMMON */
section {
    padding: 120px 5%;
    position: relative;
}

.section-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 60px;
    text-align: center;
    color: white;
}

/* Section Title with Logo */
.section-title-with-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.section-title-logo {
    max-height: 80px;
    max-width: 280px;
    height: auto;
    width: auto;
    object-fit: contain;
    filter: brightness(1.1);
    transition: all 0.3s ease;
}

.section-title-logo:hover {
    filter: brightness(1.2);
    transform: scale(1.05);
}

/* WHY US SECTION */
.why-us {
    background: linear-gradient(180deg, var(--dark-bg), var(--section-bg));
}

.formula-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    max-width: 1600px;
    margin: 0 auto;
}

.formula-item {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 0;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.4s ease;
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
    flex: 0 0 auto;
    width: 260px;
    height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.formula-item:nth-child(1) { animation-delay: 0.1s; }
.formula-item:nth-child(2) { animation-delay: 0.3s; }
.formula-item:nth-child(3) { animation-delay: 0.5s; }
.formula-item:nth-child(4) { animation-delay: 0.7s; }
.formula-item:nth-child(5) { animation-delay: 0.9s; }

.formula-item:hover {
    transform: translateY(-10px);
    border-color: var(--accent-green);
    box-shadow: 0 15px 40px rgba(74, 168, 118, 0.3);
}

.formula-icon {
    width: 120px !important;
    height: 120px !important;
    min-width: 120px;
    min-height: 120px;
    max-width: 120px;
    max-height: 120px;
    margin-bottom: 25px;
    transition: transform 0.3s ease;
    object-fit: contain;
    flex-shrink: 0;
    /* Делаем чёрные иконки белыми для контраста на тёмном фоне */
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.formula-icon-placeholder {
    width: 120px !important;
    height: 120px !important;
    min-width: 120px;
    min-height: 120px;
    max-width: 120px;
    max-height: 120px;
    margin-bottom: 25px;
    border: 2px dashed var(--border-color);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 168, 118, 0.05);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.formula-icon-placeholder::after {
    content: '📷';
    font-size: 40px;
    opacity: 0.3;
}

.formula-item:hover .formula-icon {
    transform: scale(1.1);
    opacity: 1;
}

.formula-item:hover .formula-icon-placeholder {
    border-color: var(--accent-green);
    background: rgba(74, 168, 118, 0.1);
}

.formula-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    margin-top: 0;
    color: white;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
}

.formula-subtitle {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent-green);
    margin-bottom: 8px;
    margin-top: 0;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
}

.formula-text {
    font-size: 17px;
    color: var(--gray-text);
    line-height: 1.5;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
}

.formula-operator {
    font-size: 52px;
    color: var(--accent-green);
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 50px;
    line-height: 1;
}

.formula-result {
    border-color: var(--accent-green) !important;
    border-width: 2px;
}

.formula-result .formula-title {
    color: white !important;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 0;
    padding: 50px;
    max-width: 600px;
    width: 90%;
    position: relative;
    animation: slideUp 0.4s ease;
    border: 1px solid var(--border-color);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--gray-text);
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: white;
    transform: rotate(90deg);
}

.modal-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: white;
}

.modal .form-input,
.modal .form-textarea {
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
}

.modal .form-input::placeholder,
.modal .form-textarea::placeholder {
    color: var(--gray-text);
}

/* LIGHTBOX FOR GALLERY */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    touch-action: pan-y pinch-zoom;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
    pointer-events: none;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.15s ease-in-out;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-close {
    position: fixed;
    top: 30px;
    right: 30px;
    background: rgba(74, 168, 118, 0.2);
    border: 2px solid var(--accent-green);
    color: var(--accent-green);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
}

.lightbox-close:hover {
    background: var(--accent-green);
    color: white;
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(74, 168, 118, 0.2);
    border: 2px solid var(--accent-green);
    color: var(--accent-green);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--accent-green);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-counter {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 16px;
    z-index: 10002;
}

.modal .form-input:focus,
.modal .form-textarea:focus {
    border-color: var(--accent-green);
    background: var(--section-bg);
}

.modal .form-submit {
    background: linear-gradient(135deg, var(--accent-green), var(--secondary-green));
    color: white;
}

.modal .form-submit:hover {
    box-shadow: 0 10px 30px rgba(74, 168, 118, 0.4);
}

/* ABOUT SECTION */
.about {
    background: var(--dark-bg);
    position: relative;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content h3 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 25px;
    color: white;
}

.about-content p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--gray-text);
    margin-bottom: 20px;
}

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

.stat-item {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 0;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--accent-green);
    transform: translateY(-5px);
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent-green);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 16px;
    color: var(--gray-text);
}

.about-image {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    height: 100%;
    min-height: 100%;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* GALLERY SECTION */
.gallery {
    background: var(--section-bg);
    overflow: hidden;
}

.gallery-carousel {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 0;
    touch-action: pan-y pinch-zoom;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.gallery-track {
    display: flex;
    gap: 20px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.gallery-item {
    min-width: calc(100% - 40px);
    height: 600px;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    pointer-events: none;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Touch feedback для галереи */
.gallery-item:active {
    opacity: 0.95;
}

.gallery-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.gallery-btn {
    background: rgba(74, 168, 118, 0.2);
    border: 2px solid var(--accent-green);
    color: var(--accent-green);
    width: 50px;
    height: 50px;
    border-radius: 0;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
}

.gallery-btn:hover {
    background: var(--accent-green);
    color: white;
    transform: scale(1.1);
}

.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(74, 168, 118, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--accent-green);
    width: 30px;
    border-radius: 5px;
}

/* Индикатор свайпа для мобильных */
.gallery-swipe-hint {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(74, 168, 118, 0.5);
    border-radius: 30px;
    color: var(--accent-green);
    font-size: 14px;
    font-weight: 500;
    z-index: 10;
    pointer-events: none;
    animation: swipeHintFade 3s ease forwards;
}

.gallery-swipe-hint::before,
.gallery-swipe-hint::after {
    content: '←';
    font-size: 18px;
    animation: swipeArrowLeft 1.5s ease-in-out infinite;
}

.gallery-swipe-hint::after {
    content: '→';
    animation: swipeArrowRight 1.5s ease-in-out infinite;
}

@keyframes swipeHintFade {
    0%, 80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes swipeArrowLeft {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(-5px);
    }
}

@keyframes swipeArrowRight {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(5px);
    }
}

@media (max-width: 768px) {
    .gallery-swipe-hint {
        display: flex;
    }
}

/* PRINCIPLES SECTION */
.principles {
    background: linear-gradient(180deg, var(--section-bg), var(--dark-bg));
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.principle-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 0;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

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

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

.principle-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-green);
    box-shadow: 0 15px 40px rgba(74, 168, 118, 0.2);
}

.principle-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
    object-fit: contain;
    /* Делаем чёрные иконки белыми для контраста на тёмном фоне */
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.principle-icon-placeholder {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border: 2px dashed var(--border-color);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 168, 118, 0.05);
    transition: all 0.3s ease;
}

.principle-icon-placeholder::after {
    content: '📷';
    font-size: 30px;
    opacity: 0.3;
}

.principle-card:hover .principle-icon {
    transform: scale(1.15);
    opacity: 1;
}

.principle-card:hover .principle-icon-placeholder {
    border-color: var(--accent-green);
    background: rgba(74, 168, 118, 0.1);
}

.principle-text {
    font-size: 18px;
    line-height: 1.6;
    color: var(--light-text);
}

/* CTA FORM SECTION */
.cta-form-section {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    padding: 100px 5%;
}

.form-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.form-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 40px;
    color: white;
}

/* FORM STYLES */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-input,
.form-textarea {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 0;
    padding: 15px 20px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: white;
    background: rgba(255, 255, 255, 0.15);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-submit {
    background: white;
    color: var(--primary-green);
    border: none;
    padding: 18px 40px;
    border-radius: 0;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.form-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.form-success {
    display: none;
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 0;
    margin-top: 20px;
    color: white;
}

/* FOOTER */
footer {
    background: #0a0a0a;
    padding: 60px 5% 30px;
    border-top: 1px solid rgba(74, 168, 118, 0.2);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    margin-bottom: 40px;
}

.footer-cta {
    background: linear-gradient(135deg, var(--accent-green), var(--secondary-green));
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.footer-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 168, 118, 0.4);
}

.footer-links {
    display: flex;
    gap: 30px;
    justify-content: center;
    padding-top: 30px;
    border-top: 1px solid rgba(74, 168, 118, 0.1);
}

.footer-links a {
    color: var(--gray-text);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-green);
}

.footer-copyright {
    text-align: center;
    padding: 30px 0;
    color: var(--gray-text);
    font-size: 14px;
    border-top: 1px solid rgba(74, 168, 118, 0.1);
}

/* FOOTER LEGAL INFO */
.footer-legal {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.footer-legal-column {
    font-size: 15px;
    line-height: 1.8;
    color: var(--gray-text);
}

.footer-legal-column .footer-description {
    font-size: 16px;
    line-height: 1.8;
    color: var(--gray-text);
    margin-top: 20px;
    margin-bottom: 15px;
}

.footer-legal-column .footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.footer-legal-column .footer-contacts a {
    color: var(--light-text);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.footer-legal-column .footer-contacts a:hover {
    color: var(--accent-green);
}

.footer-legal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-green);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.footer-legal-item {
    margin-bottom: 12px;
}

.footer-legal-label {
    color: var(--gray-text);
    font-weight: 500;
}

.footer-legal-value {
    color: rgba(255, 255, 255, 0.7);
    margin-left: 5px;
}

/* MOBILE MENU */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 0;
}

.mobile-menu-btn span {
    display: block;
    width: 28px;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background: var(--card-bg);
    z-index: 9999;
    padding: 80px 30px 30px;
    transition: right 0.4s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav a {
    display: block;
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: 500;
    padding: 18px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.mobile-nav a:hover {
    color: var(--accent-green);
    padding-left: 10px;
}

.mobile-nav-cta {
    margin: 30px 0 20px;
    width: 100%;
    padding: 16px 30px;
    background: var(--accent-green);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-nav-cta:hover {
    background: var(--secondary-green);
    transform: translateY(-2px);
}

.mobile-nav-lang {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mobile-nav-lang .lang-btn {
    flex: 1;
}

.mobile-nav-contacts {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.mobile-nav-contacts a {
    font-size: 16px;
    border: none;
    padding: 12px 0;
    color: var(--gray-text);
}

.mobile-nav-contacts a:hover {
    color: var(--accent-green);
}

/* SCROLL ANIMATIONS */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* LOADING ANIMATION */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(74, 168, 118, 0.2);
    border-top-color: var(--accent-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* RESPONSIVE */
@media (max-width: 1600px) {
    .cta-button {
        display: none;
    }
}

@media (max-width: 1400px) {
    .nav-menu {
        gap: 25px;
    }
    .nav-menu a {
        font-size: 15px;
    }
    .formula-container {
        gap: 15px;
    }
    .formula-item {
        width: 220px;
        height: 340px;
        padding: 30px 20px;
    }
    .formula-title {
        font-size: 18px;
        line-height: 1.3;
    }
    .formula-subtitle {
        font-size: 14px;
        line-height: 1.3;
    }
    .formula-text {
        font-size: 15px;
        line-height: 1.4;
    }
    .formula-operator {
        font-size: 42px;
        width: 40px;
    }
    .formula-icon {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 1280px) {
    .nav-menu {
        gap: 20px;
    }
    .nav-menu a {
        font-size: 14px;
        white-space: nowrap;
    }
}

@media (max-width: 1200px) {
    .nav-menu {
        gap: 18px;
    }
    .nav-menu a {
        font-size: 13.5px;
    }
}

@media (max-width: 1170px) {
    .nav-menu {
        gap: 15px;
    }
    .nav-menu a {
        font-size: 13px;
    }
}

@media (max-width: 1150px) {
    /* Переключаемся на мобильное меню раньше, чтобы контакты не сжимались */
    header {
        padding: 15px 5%;
        display: flex;
        align-items: center;
        gap: 15px;
    }
    .nav-menu {
        display: none;
    }
    .header-address {
        display: none;
    }
    .cta-button {
        display: none;
    }
    .mobile-menu-btn {
        display: flex;
        order: -1;
        flex-shrink: 0;
    }
    .mobile-nav {
        display: block;
    }
    .mobile-nav-overlay {
        display: block;
    }
    .logo-section {
        flex-shrink: 0;
    }
    .header-right {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-left: auto;
        flex-shrink: 0;
    }
    .contacts {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 3px;
        font-size: 13px;
        flex-shrink: 0;
    }
    .contacts a {
        white-space: nowrap;
    }
}

@media (max-width: 1024px) {
    /* === HERO === */
    .hero-title {
        font-size: 48px;
    }
    .section-title {
        font-size: 36px;
    }
    .section-title-with-logo {
        gap: 20px;
    }
    .section-title-logo {
        max-height: 60px;
        max-width: 220px;
    }
    
    /* === FORMULA: сетка 2x2, без операторов === */
    .formula-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        max-width: 600px;
        margin: 0 auto;
    }
    .formula-operator {
        display: none;
    }
    .formula-item {
        width: 100%;
        height: 300px;
        padding: 25px 20px;
    }
    .formula-icon {
        width: 80px !important;
        height: 80px !important;
        min-width: 80px;
        min-height: 80px;
        max-width: 80px;
        max-height: 80px;
        margin-bottom: 15px;
    }
    .formula-title {
        font-size: 18px;
        line-height: 1.3;
    }
    .formula-subtitle {
        font-size: 14px;
        line-height: 1.3;
    }
    .formula-text {
        font-size: 15px;
        line-height: 1.4;
    }
    
    /* === OTHER === */
    .gallery-item {
        height: 400px;
    }
    .about-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .about-image {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .lightbox-prev {
        left: 15px;
    }
    
    .lightbox-next {
        right: 15px;
    }
    
    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
    
    .lightbox-counter {
        bottom: 15px;
        font-size: 14px;
        padding: 8px 16px;
    }
    
    header {
        padding: 10px 5%;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .logo-section {
        max-width: 120px;
        flex-shrink: 0;
    }
    .logo {
        height: 30px;
    }
    .header-right {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        margin-left: auto;
    }
    .mobile-header-contacts {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 2px;
        font-size: 11px;
        line-height: 1.3;
        flex-shrink: 0;
    }
    .mobile-header-contacts a {
        color: var(--light-text);
        text-decoration: none;
        transition: color 0.3s ease;
        white-space: nowrap;
    }
    .mobile-header-contacts a:hover {
        color: var(--accent-green);
    }
    .mobile-header-address {
        color: var(--gray-text);
        font-size: 9px;
        white-space: nowrap;
    }
    .contacts {
        display: none;
    }
    .header-address {
        display: none;
    }
    .nav-menu {
        display: none;
    }
    .lang-switcher {
        display: flex;
        gap: 3px;
        background: rgba(74, 168, 118, 0.1);
        padding: 3px;
        border-radius: 0;
        flex-shrink: 0;
    }
    .lang-switcher .lang-btn {
        padding: 3px 8px;
        font-size: 10px;
    }
    .cta-button {
        display: none;
    }
    .mobile-menu-btn {
        display: flex;
        width: 35px;
        height: 35px;
        order: -1; /* Кнопка меню слева */
        flex-shrink: 0;
    }
    .mobile-menu-btn span {
        width: 24px;
        height: 2px;
    }
    .mobile-nav {
        display: block;
    }
    .mobile-nav-overlay {
        display: block;
    }
    .hero-title {
        font-size: 32px;
        line-height: 1.2;
    }
    .hero-subtitle {
        font-size: 16px;
    }
    .hero-cta {
        padding: 14px 30px;
        font-size: 15px;
    }
    .section-title {
        font-size: 28px;
    }
    .section-title-with-logo {
        gap: 15px;
        flex-direction: column;
    }
    .section-title-logo {
        max-height: 50px;
        max-width: 180px;
    }
    /* FORMULA: сетка 2x2 на планшетах */
    .formula-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        max-width: 100%;
    }
    .formula-operator {
        display: none;
    }
    .formula-item {
        width: 100%;
        height: 280px;
        padding: 25px 15px;
    }
    .formula-icon {
        width: 70px !important;
        height: 70px !important;
        min-width: 70px;
        min-height: 70px;
        max-width: 70px;
        max-height: 70px;
        margin-bottom: 15px;
    }
    .formula-title {
        font-size: 16px;
        line-height: 1.3;
        margin-bottom: 10px;
    }
    .formula-subtitle {
        font-size: 13px;
        line-height: 1.3;
        margin-bottom: 6px;
    }
    .formula-text {
        font-size: 14px;
        line-height: 1.4;
    }
    .about-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .about-image {
        height: 300px;
    }
    .principles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .footer-legal {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* На мобилке меняем порядок: сначала юр.данные, потом описание и контакты */
    .footer-legal-column {
        display: flex;
        flex-direction: column;
    }
    
    .footer-legal-column .footer-description {
        order: 10;
    }
    
    .footer-legal-column .footer-contacts {
        order: 11;
    }
    .modal-content {
        width: 95%;
        padding: 30px 20px;
    }
    .modal-title {
        font-size: 24px;
    }
    .form-title {
        font-size: 28px;
    }
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    section {
        padding: 80px 5%;
    }
    
    /* Улучшенная галерея для мобильных */
    .gallery-item {
        height: 400px;
        min-width: 100%;
    }
    
    .gallery-track {
        gap: 0;
    }
    
    .gallery-carousel {
        margin: 0 -5%;
        max-width: none;
        border-radius: 0;
    }
    
    .gallery-controls {
        margin-top: 20px;
        gap: 15px;
    }
    
    .gallery-btn {
        width: 55px;
        height: 55px;
        font-size: 24px;
        border-radius: 50%;
        /* Увеличенная область нажатия для удобства */
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .gallery-btn:active {
        transform: scale(0.95);
        background: var(--accent-green);
        color: white;
    }
    
    .gallery-dots {
        margin-top: 15px;
    }
    
    .dot {
        width: 12px;
        height: 12px;
        /* Увеличенная область нажатия */
        padding: 5px;
        margin: -5px;
    }
    
    .dot.active {
        width: 32px;
    }
    
    /* Lightbox оптимизация для мобильных */
    .lightbox-prev,
    .lightbox-next {
        width: 55px;
        height: 55px;
        font-size: 24px;
        border-radius: 50%;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        /* Полупрозрачность для лучшей видимости фото */
        background: rgba(74, 168, 118, 0.3);
    }
    
    .lightbox-prev:active,
    .lightbox-next:active {
        background: var(--accent-green);
        transform: translateY(-50%) scale(0.95);
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 50px;
        height: 50px;
        font-size: 22px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .lightbox-close:active {
        background: var(--accent-green);
        transform: rotate(90deg) scale(0.95);
    }
    
    .lightbox-counter {
        bottom: 20px;
        font-size: 15px;
        padding: 10px 20px;
        border-radius: 25px;
        background: rgba(0, 0, 0, 0.8);
        font-weight: 500;
    }
    
    .lightbox-image {
        /* Оптимизация для мобильных экранов */
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
    }
}

/* Дополнительные улучшения для очень маленьких экранов */
@media (max-width: 480px) {
    .gallery-item {
        height: 350px;
    }
    
    /* FORMULA: один столбец на маленьких экранах */
    .formula-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .formula-item {
        height: 260px;
        padding: 20px 25px;
    }
    
    .formula-icon {
        width: 70px !important;
        height: 70px !important;
        min-width: 70px;
        min-height: 70px;
        max-width: 70px;
        max-height: 70px;
        margin-bottom: 12px;
    }
    
    .formula-title {
        font-size: 18px;
        line-height: 1.2;
        margin-bottom: 8px;
    }
    
    .formula-subtitle {
        font-size: 14px;
        line-height: 1.3;
        margin-bottom: 6px;
    }
    
    .formula-text {
        font-size: 15px;
        line-height: 1.3;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
    
    .lightbox-prev {
        left: 5px;
    }
    
    .lightbox-next {
        right: 5px;
    }
    
    .lightbox-close {
        top: 5px;
        right: 5px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .gallery-btn {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
}

/* Landscape ориентация на мобильных */
@media (max-width: 896px) and (orientation: landscape) {
    .gallery-item {
        height: 70vh;
        min-height: 300px;
    }
    
    .gallery-swipe-hint {
        bottom: 100px;
        font-size: 12px;
        padding: 8px 16px;
    }
    
    .gallery-controls {
        margin-top: 15px;
    }
    
    .gallery-dots {
        margin-top: 10px;
    }
    
    .lightbox-counter {
        bottom: 10px;
        font-size: 13px;
        padding: 6px 14px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 18px;
        top: 8px;
        right: 8px;
    }
}

/* Дополнительная оптимизация для старых iOS устройств */
@supports (-webkit-touch-callout: none) {
    .gallery-carousel,
    .lightbox {
        -webkit-overflow-scrolling: touch;
    }
    
    .gallery-item img,
    .lightbox-image {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

