/* ================================================
   JEDI — HOME PAGE STYLES
   Glassmorphism + smooth animations
   ================================================ */

/* ---- ANIMATION DELAYS ---- */
.delay-100  { animation-delay: 0.1s; }
.delay-200  { animation-delay: 0.2s; }
.delay-300  { animation-delay: 0.3s; }
.delay-400  { animation-delay: 0.4s; }
.delay-500  { animation-delay: 0.5s; }
.delay-600  { animation-delay: 0.6s; }
.delay-700  { animation-delay: 0.7s; }
.delay-800  { animation-delay: 0.8s; }
.delay-900  { animation-delay: 0.9s; }
.delay-1000 { animation-delay: 1.0s; }
.delay-1100 { animation-delay: 1.1s; }
.delay-1200 { animation-delay: 1.2s; }

/* ---- FADE IN UP — мягкое и ненавязчивое ---- */
.fade-in-up {
    opacity: 0;
    transform: translateY(14px);
    animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* ---- КНОПКИ ---- */
.gradient-button {
    background-image: linear-gradient(135deg, #2fbf57 0%, #1f9a45 100%);
    transition: filter 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 20px rgba(47,191,87,0.30);
}
.gradient-button:hover {
    filter: brightness(1.08);
    box-shadow: 0 8px 28px rgba(47,191,87,0.42);
}

/* ---- НАВИГАЦИЯ ---- */
.active-nav {
    font-weight: 700 !important;
    color: #1f9a45 !important;
    border-bottom: 2px solid #2fbf57;
    padding-bottom: 2px;
}
.lang-button.active {
    font-weight: 700;
    color: #2fbf57;
}

/* ---- LANG FLAG BUTTONS в хедере ---- */
.lang-flag-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 7px;
    border: 1px solid transparent;
    background: transparent;
    color: #9ca3af;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.03em;
}
.lang-flag-btn .fi {
    width: 18px;
    height: 13px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    flex-shrink: 0;
}
.lang-flag-btn:hover {
    color: #1f9a45;
    background: rgba(47,191,87,0.08);
    border-color: rgba(47,191,87,0.2);
}
.lang-flag-btn.active {
    color: #1f9a45;
    background: rgba(47,191,87,0.10);
    border-color: rgba(47,191,87,0.25);
    font-weight: 700;
}

/* ---- МОБИЛЬНОЕ МЕНЮ ---- */
.mobile-menu {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.35s ease;
    transform: translateY(-100%);
    opacity: 0;
}
.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
}
.hamburger-icon {
    display: flex; flex-direction: column;
    justify-content: space-around;
    width: 24px; height: 24px;
    cursor: pointer;
}
.hamburger-icon span {
    display: block; height: 3px; width: 100%;
    background: #1f9a45; border-radius: 2px;
    transition: all 0.3s ease;
}
.hamburger-icon.open span:nth-child(1) { transform: translateY(10.5px) rotate(45deg); }
.hamburger-icon.open span:nth-child(2) { opacity: 0; }
.hamburger-icon.open span:nth-child(3) { transform: translateY(-10.5px) rotate(-45deg); }

/* ---- HERO DYNAMIC BG ---- */
#dynamic-hero-bg { z-index: 0; }
#dynamic-hero-bg img,
#dynamic-hero-bg video {
    position: absolute; width: 100%; height: 100%;
    object-fit: cover; opacity: 0.2;
    transition: opacity 0.6s ease;
}
#dynamic-hero-bg::after {
    content: "";
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.55);
    z-index: 1;
}
.hero-content p, .hero-content h1 {
    color: #1f2937 !important;
    text-shadow: 0 1px 6px rgba(255,255,255,0.6);
}
.hero-content strong, .text-gray-600 strong {
    font-weight: 800;
    color: #1f9a45;
}

/* ---- HERO AMBIENT GLOWS ---- */
.hero-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(72px);
}
.hero-glow-1 {
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(47,191,87,0.16), transparent 70%);
    top: -120px; left: -100px;
}
.hero-glow-2 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(31,154,69,0.10), transparent 70%);
    bottom: -80px; right: -60px;
}
.hero-glow-3 {
    width: 260px; height: 260px;
    background: radial-gradient(circle, rgba(47,191,87,0.09), transparent 70%);
    top: 50%; left: -50px; transform: translateY(-50%);
}
.hero-glow-4 {
    width: 340px; height: 340px;
    background: radial-gradient(circle, rgba(47,191,87,0.12), transparent 70%);
    top: -50px; right: -50px;
}

/* ---- GLASSMORPHISM — КАРТОЧКИ ---- */
.card-glass {
    background: rgba(255,255,255,0.60);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.78);
    box-shadow: 0 2px 16px rgba(47,191,87,0.06), 0 1px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card-glass:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(47,191,87,0.11), 0 3px 10px rgba(0,0,0,0.07);
    border-color: rgba(47,191,87,0.22);
}

/* ---- GLASSMORPHISM — ТЁМНЫЕ КАРТОЧКИ ---- */
.benefit-glass-dark {
    background: rgba(18,44,12,0.60);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(47,191,87,0.16);
    box-shadow: 0 4px 20px rgba(0,0,0,0.20);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.benefit-glass-dark:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(47,191,87,0.28);
    box-shadow: 0 10px 30px rgba(47,191,87,0.14), 0 4px 10px rgba(0,0,0,0.22);
}

/* ---- GLASSMORPHISM — ФОРМА ---- */
.form-glass {
    background: rgba(255,255,255,0.68);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.88);
    box-shadow: 0 6px 36px rgba(47,191,87,0.07), 0 2px 8px rgba(0,0,0,0.05);
}

/* ---- LANGUAGE MODAL OVERLAY ---- */
#lang-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Плавный тёмный фон */
    background: rgba(8, 20, 8, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: overlayIn 0.4s ease forwards;
}
@keyframes overlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
#lang-modal-overlay.hidden { display: none; }

/* ---- LANGUAGE MODAL ---- */
#lang-modal {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow:
        0 32px 80px rgba(0,0,0,0.55),
        0 0 0 1px rgba(255,255,255,0.06) inset;
    border-radius: 26px;
    padding: 44px 36px 38px;
    max-width: 440px;
    width: 92vw;
    text-align: center;
    /* Мягкое появление снизу */
    animation: modalIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes modalOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(12px) scale(0.96); }
}

.modal-logo { margin-bottom: 24px; }
.modal-logo-icon {
    width: 58px; height: 58px;
    background: linear-gradient(135deg, #2fbf57, #1a8a3d);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px;
    box-shadow: 0 0 36px rgba(47,191,87,0.45);
    font-size: 24px;
    color: white;
}
#lang-modal h2 {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}
#lang-modal p {
    color: rgba(255,255,255,0.46);
    font-size: 0.82rem;
    margin-bottom: 28px;
    line-height: 1.6;
}

/* ---- LANGUAGE OPTION BUTTONS (в модалке) ---- */
.lang-option-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 18px;
    border-radius: 13px;
    border: 1px solid rgba(255,255,255,0.09);
    background: rgba(255,255,255,0.04);
    color: #fff;
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    /* Плавный переход без резкостей */
    transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
    margin-bottom: 10px;
    text-align: left;
    font-family: inherit;
}
.lang-option-btn:last-child { margin-bottom: 0; }
.lang-option-btn:hover {
    background: rgba(47,191,87,0.13);
    border-color: rgba(47,191,87,0.35);
    transform: translateX(5px);
}
.lang-option-btn:active {
    transform: translateX(2px) scale(0.99);
}

/* Флаг в модалке — через fi (flag-icons) */
.lang-option-btn .fi {
    width: 38px;
    height: 28px;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    flex-shrink: 0;
    /* Убираем стандартный line-height у span */
    display: block;
}
/* Квадратный флаг нужного размера */
.flag-sq {
    width: 38px !important;
    height: 28px !important;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    display: block !important;
    flex-shrink: 0;
    background-size: cover;
}

.lang-name { flex: 1; }
.lang-native {
    font-size: 0.76rem;
    color: rgba(255,255,255,0.38);
    font-weight: 400;
}

/* ---- FLOATING WORDS ---- */
#floating-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 4;      /* под хедером, над контентом */
    overflow: hidden;
}
.floating-word {
    position: absolute;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(31,154,69,0.15);   /* очень тихо */
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    /* Медленно и плавно */
    animation: floatDrift linear infinite;
}
@keyframes floatDrift {
    0%   { transform: translateX(-220px) translateY(0px);   opacity: 0; }
    8%   { opacity: 1; }
    85%  { opacity: 1; }
    100% { transform: translateX(calc(100vw + 220px)) translateY(-18px); opacity: 0; }
}

/* ---- MINI MODAL (правый нижний угол) ---- */
#mini-modal {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 8888;
    max-width: 300px;
    width: calc(100vw - 48px);
    /* Стекло */
    background: rgba(8, 20, 8, 0.80);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(47,191,87,0.20);
    border-radius: 18px;
    padding: 20px 20px 16px;
    box-shadow: 0 16px 44px rgba(0,0,0,0.40), 0 0 0 1px rgba(255,255,255,0.04) inset;
    /* По умолчанию скрыт */
    display: none;
    opacity: 0;
}
#mini-modal.show {
    display: block;
    animation: miniSlideIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes miniSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

#mini-modal h3 {
    color: #fff;
    font-size: 0.90rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    padding-right: 18px;
}
.mini-actions { display: flex; flex-direction: column; gap: 7px; }

.mini-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 13px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    transition: filter 0.18s ease, transform 0.18s ease;
    text-decoration: none;
    line-height: 1;
}
.mini-btn-yes {
    background: linear-gradient(135deg, #2fbf57, #1f9a45);
    color: #fff;
    box-shadow: 0 3px 12px rgba(47,191,87,0.28);
}
.mini-btn-yes:hover { filter: brightness(1.08); transform: translateX(2px); }

.mini-btn-no {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.62);
    border: 1px solid rgba(255,255,255,0.10) !important;
    border-radius: 10px;
}
.mini-btn-no:hover { background: rgba(255,255,255,0.11); }

.mini-btn-dismiss {
    background: transparent;
    color: rgba(255,255,255,0.28);
    font-size: 0.74rem;
    text-align: center;
    padding: 5px;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: color 0.18s ease;
}
.mini-btn-dismiss:hover { color: rgba(255,255,255,0.52); }

#mini-modal-close {
    position: absolute;
    top: 10px; right: 11px;
    color: rgba(255,255,255,0.26);
    cursor: pointer;
    font-size: 13px;
    background: none; border: none;
    padding: 3px; line-height: 1;
    transition: color 0.18s ease;
}
#mini-modal-close:hover { color: rgba(255,255,255,0.60); }

/* ---- MOBILE ---- */
@media (max-width: 640px) {
    #lang-modal { padding: 32px 22px 28px; }
    #lang-modal h2 { font-size: 1.15rem; }
    .lang-option-btn { padding: 12px 14px; }
    #mini-modal { bottom: 14px; right: 14px; }
}
