/* Cтили для мега-меню */
.dropdown.mega-menu {
    position: static;
}

.dropdown-menu.full-width {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    margin: 0 auto;
    position: absolute;
    padding: 0;
    margin-top: 0;
    background-color: #1e293b;
    border-radius: 0 0 8px 8px;
    border: none;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: none;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.mega-menu-content {
    display: flex;
    flex-direction: column;
    padding: 20px;
    width: 100%;
}

.mega-menu-row {
    display: flex;
    width: 100%;
    margin-bottom: 20px;
    gap: 15px;
}

.mega-menu-row:last-child {
    margin-bottom: 0;
}

.mega-menu-column {
    flex: 1;
    min-width: 0;
    padding: 0 10px;
}

.mega-menu-column a {
    text-decoration: none !important;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.mega-menu-header {
    display: flex;
    align-items: flex-start;
    text-align: left;
    min-height: 60px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    padding: 10px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #334155;
    transition: all 0.3s ease;
    line-height: 1.3;
}

.mega-menu-header:hover {
    color: #f97316;
    transform: translateX(5px);
}

.mega-menu-header .menu-icon {
    width: 28px;
    height: 28px;
    margin-right: 15px;
    color: #f97316;
}

.mega-menu-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: 10px;
}

.mega-menu-column li a {
    display: block;
    padding: 10px 0;
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s, padding-left 0.2s;
    font-size: 1rem;
}

.mega-menu-column li a:hover {
    color: #ffffff;
    padding-left: 8px;
}

/* Стили для стрелочки выпадающего меню */
.dropdown-toggle .dropdown-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

/* Десктопная версия */
@media (min-width: 993px) {
    .dropdown.mega-menu:hover .dropdown-menu.full-width {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .dropdown.mega-menu:hover .dropdown-arrow {
        transform: rotate(180deg);
    }

    .dropdown-toggle {
        display: flex;
        align-items: center;
    }

    .dropdown-toggle .dropdown-arrow {
        margin-left: 8px;
    }
}

/* Мобильная версия */
@media (max-width: 992px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .navbar {
        width: 100%;
        max-width: 100%;
        left: 0;
        right: 0;
        box-sizing: border-box;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 12px;
        box-sizing: border-box;
    }

    .dropdown.mega-menu>.dropdown-toggle {
        display: flex;
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    .dropdown.mega-menu.active>.dropdown-toggle {
        background-color: #f97316;
        color: #ffffff;
    }

    .dropdown-toggle .dropdown-arrow {
        position: static;
        transform: none;
        margin-left: 15px;
        transition: transform 0.3s ease;
    }

    .dropdown.mega-menu.active .dropdown-arrow {
        transform: rotate(180deg);
    }

    .dropdown-toggle:hover .dropdown-arrow {
        transform: translateY(2px);
    }

    .dropdown-menu.full-width {
        position: static;
        background-color: transparent;
        box-shadow: none;
        border: none;
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        margin-top: 0;
        left: 0;
        right: 0;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        transform: none;
        visibility: hidden;
        transition: max-height 0.3s ease, padding-top 0.2s ease;
    }

    .dropdown.mega-menu.active .dropdown-menu.full-width {
        display: block;
        max-height: 1200px;
        padding-top: 0;
        padding-left: 0;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .mega-menu-content {
        flex-direction: column;
        padding: 0;
    }

    .mega-menu-row {
        flex-direction: column;
        margin-bottom: 0;
        gap: 0;
    }

    .mega-menu-column {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0;
        margin-bottom: 0px;
    }

    .mega-menu-row:last-child .mega-menu-column:last-child {
        margin-bottom: 0;
    }

    .mega-menu-header {
        color: #ffffff;
        font-size: 0.9rem;
        padding: 10px 15px;
        border-bottom: none;
        margin-bottom: 0;
        background-color: rgba(255, 255, 255, 0.1);
        min-height: auto;
    }

    .mega-menu-header .menu-icon {
        display: inline-block;
        margin-right: 8px;
        width: 16px;
        height: 18px;
    }

    .mega-menu-column a {
        display: block;
        padding: 8px 15px 8px 35px;
        color: #e2e8f0;
        font-size: 0.85rem;
        text-decoration: none;
        transition: all 0.3s ease;
    }

    .mega-menu-column a:hover {
        color: #ffffff;
        background-color: rgba(255, 255, 255, 0.05);
        padding-left: 35px;
    }

    /* Отступы между колонками */
    .mega-menu-column:not(:last-child) {
        margin-bottom: 0;
    }

    .mega-menu-column {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mega-menu-column:last-child {
        border-bottom: none;
    }

    /* Улучшенная анимация закрытия мобильного меню */
    .nav-links {
        transition: none;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .mega-menu-header {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .mega-menu-column a {
        padding: 6px 12px 6px 30px;
        font-size: 0.8rem;
    }

    .mega-menu-header .menu-icon {
        width: 14px;
        height: 14px;
        margin-right: 6px;
    }
}

@media (min-width: 1400px) {
    .dropdown-menu.full-width {
        max-width: 1300px;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Form validation styles */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #1e293b;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: slideIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background-color: #f3f4f6;
    color: #374151;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Notification styles */
.notification {
    position: fixed;
    top: 90px;
    right: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.5rem;
    z-index: 1500;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid #10b981;
}

.notification.error {
    border-left: 4px solid #ef4444;
}

.notification.warning {
    border-left: 4px solid #f59e0b;
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.notification-icon {
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.notification-icon.success {
    color: #10b981;
}

.notification-icon.error {
    color: #ef4444;
}

.notification-icon.warning {
    color: #f59e0b;
}

.notification-text h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
}

.notification-text p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #f97316;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    background-color: #ea580c;
    transform: translateY(-2px);
}

.back-to-top.show {
    display: flex;
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* Scroll progress bar */
.scroll-progress {
    position: fixed;
    top: 70px;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: #f97316;
    z-index: 1001;
    transition: width 0.1s ease;
}

/* Image lazy loading placeholder */
.image-placeholder {
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.875rem;
}

.image-placeholder svg {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-text.long {
    width: 100%;
}

/* Print styles */
@media print {

    .navbar,
    .mobile-menu-btn,
    .back-to-top,
    .contact-form-section,
    .footer {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .hero {
        background: white !important;
        color: black !important;
        min-height: auto !important;
        padding: 2rem 0 !important;
    }

    .hero-bg {
        display: none !important;
    }
}