/* ========== Base Reset & Layout ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2d5016;
    --secondary-color: #4a7c2a;
    --accent-color: #d4af37;
    --text-dark: #222;
    --text-muted: #666;
    --bg-light: #f6f7f9;
    --white: #ffffff;
    --transition: 0.25s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text-dark);
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
}

body[dir="rtl"] {
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== Language Switcher (all viewports) ========== */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    display: flex;
    gap: 6px;
    background: #fff;
    padding: 4px 6px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

body[dir="rtl"] .language-switcher {
    right: 20px;
    left: auto;
}

.lang-btn {
    border: none;
    background: transparent;
    color: var(--text-dark);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn:hover {
    background: var(--bg-light);
}

.lang-btn.active {
    background: var(--primary-color);
    color: #fff;
}

.lang-select {
    display: none;
}

/* ========== Header & Navigation ========== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}

.header-content {
    direction: ltr; /* чтобы порядок элементов в шапке не менялся в арабском */
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.logo-text {
    font-weight: 700;
    font-size: 20px;
    color: var(--primary-color);
    white-space: nowrap;
}

.logo-main {}
.logo-sub {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-muted);
}

.nav {
    display: flex;
    align-items: center;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

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

body[dir="rtl"] .nav-link::after {
    left: auto;
    right: 0;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    border-radius: 2px;
    background: var(--text-dark);
    transition: var(--transition);
}

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

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

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

.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 900;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* ========== Hero Section ========== */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("2.jpg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    color: #fff;
    text-align: center;
    padding: 110px 20px 90px;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.2));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
}

.hero-title {
    font-size: 3rem;
    line-height: 1.15;
    margin-bottom: 18px;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 26px;
    color: #f5f5f5;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 999px;
    border: none;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

/* Туман поверх фона — теперь рисуется через canvas #fogCanvas */
#fogCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* В мобильном хедере название сокращаем до "Verdalia" */
@media (max-width: 768px) {
    .header-content {
        justify-content: center; /* центрируем лого в мобильном */
        position: relative;
    }
    .header .logo-sub {
        display: none;
    }
}

/* ========== Sections (About / Services / Products / Contact) ========== */
section {
    padding: 80px 0;
}

.about {
    background: var(--bg-light);
}

.services {
    position: relative;
    overflow: hidden;
}

.vanta-wrap,
#vanta-services {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}


.services .container {
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.about-text p {
    max-width: 900px;
    margin: 0 auto 16px;
    color: var(--text-muted);
    line-height: 1.7;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.service-card,
.product-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.service-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.service-card h3,
.product-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.service-card p,
.product-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.product-image {
    width: 100%;
    height: 180px;
    border-radius: 10px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px; /* крупнее иконки в Our Products */
}

.product-image.wheat {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
}

.product-image.corn {
    background: linear-gradient(135deg, #f7dc6f, #f1c40f);
}

.product-image.barley {
    background: linear-gradient(135deg, #d4af37, #8e6b2e);
}

/* Эмодзи-иконки поверх цветных блоков продуктов */
.product-image.wheat::before {
    content: "🌾";
}

.product-image.corn::before {
    content: "🌽";
}

.product-image.barley::before {
    content: "🌱";
}

/* Contact section */
.contact {
    background: #fff;
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    gap: 20px;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px 16px;
    border-radius: 10px;
    background: var(--bg-light);
}

.contact-icon {
    font-size: 22px;
}

.contact-item h4 {
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--primary-color);
}

.contact-item p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ========== Footer ========== */
.footer {
    background: var(--primary-color);
    color: #fff;
    padding: 32px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.footer .logo-text {
    color: #fff;
}

.footer-text {
    font-size: 13px;
    opacity: 0.9;
}

/* ========== Responsive tweaks ========== */
@media (max-width: 992px) {
    /* оставляем три блока Our Services в одну строку и на планшетах */
}

@media (max-width: 768px) {
    .lang-btn {
        display: none;
    }

    .lang-select {
        display: block;
        border: none;
        background: transparent;
        color: var(--text-dark);
        padding: 6px 8px;
        border-radius: 999px;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        outline: none;
    }

    .lang-select:focus {
        background: var(--bg-light);
    }

    .nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: #fff;
        z-index: 950;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }

    .nav.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 56px 20px 20px; /* меньше отступ сверху при открытом меню */
        align-items: stretch;
    }

    .nav-list li {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 16px 0;
        font-size: 16px;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-link::after {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    .services-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 520px;
        padding-top: 90px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    section {
        padding: 60px 0;
    }

    .container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn {
        padding: 10px 24px;
        font-size: 14px;
    }

    .logo-text {
        font-size: 18px;
    }

    .logo-img {
        width: 48px;
        height: 48px;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .nav {
        width: 260px;
    }
}
