﻿/*
Theme Name: Companies Search
Author: Voronkov Nikolay
Author URI: https://voronkov.org
Description: Информационно-поисковая система компаний. 
*/

/* -- было в override.css -- */
:root {
  --main-bg: #2c3e50;
  --accent: #3498db;
  --text-color: #333;
}

.u-flex-center { display:flex; align-items:center; justify-content:center; }
.u-hidden { display:none !important; }

/*
        .bg-blue-900 {
            background-color: var(--color-blue-900);
        }
        li.menu-item-second {
            background-color: white!important;
        }
        

/* -- Вставлялось через плагин -- */

li {
    margin-left: 30px;
}

/* Основной контейнер выпадающего меню */
#ServicesLi {
    position: relative;
}

/* Меню первого уровня */
#ServicesLi .custom-menu-level-1 {
    position: absolute!important;
    left: 0;
    top: 100%;
    width: 250px;
    max-height1: 300px;
    overflow1-y: auto;
    background: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 5px 5px;
    margin-top: 5px;
}

/* Меню второго уровня */
.custom-menu-level-2 {
    position: absolute!important;
    left: 100%;
    top: 0px;
    width: 250px;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
    padding: 5px 5px;
    margin-left: 15px;
}

/* Показываем меню при наведении */
#ServicesLi:hover .custom-menu-level-1,
#ServicesLi.focus .custom-menu-level-1,
.custom-menu-item.has-children:hover > .custom-menu-level-2 {
    opacity: 1;
    visibility: visible;
}

/* Стили пунктов меню */
.custom-menu-item {
    position: relative;
    padding: 5px 5px;
}

.custom-menu-item.has-children {
  position: relative;
}

.custom-menu-link {
    display: block;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}

/* Индикаторы подменю */
.custom-menu-item.has-children > .custom-menu-link:after {
    content: \"→\";
    float: right;
    margin-left: 10px;
}

#ServicesLi > .menu-link:after {
    content: \"↓\";
    margin-left: 8px;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    #ServicesLi .custom-menu-level-1,
    .custom-menu-level-2 {
        position: static;
        opacity: 1;
        visibility: visible;
        max-height: none;
        box-shadow: none;
        width: auto;
        margin: 0;
    }
    
    .custom-menu-level-2 {
        padding-left: 20px;
    }
    
    header {
        position: relative!important;
    }
    
}

/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3, h4 {
    margin-bottom: 20px;
    color: #2c3e50;
}

h1 {
    font-size: 36px;
}

a {
    text-decoration: none;
    color: #3498db;
}

.breadcumbs {
    padding: 5px; 
    margin-bottom: 20px;
}

.breadcumbs a:hover {
    font-weight: bold;
    color: green;
}

.category-title a:hover {
    color: brown;
}

a:hover {
    color: yellow;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

/* Шапка */
/*
header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
*/

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-item {
    position: relative;
    cursor: pointer;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
}

.nav-item:hover {
    background-color: #34495e;
}

/* Выпадающие списки */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 250px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 4px;
    color: #333;
    max-height: 400px;
    overflow-y: auto;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #3498db;
    color: white;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Мега меню категорий */
.mega-menu {
    display: none;
    position: absolute;
    left: 0;
    width: 700px;
    background-color: white;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 4px;
    padding: 15px;
    color: #333;
}

.mega-menu-container {
    display: flex;
}

.parent-categories {
    width: 30%;
    padding-right: 15px;
    border-right: 1px solid #eee;
}

.child-categories {
    width: 70%;
    padding-left: 15px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.parent-category {
    padding: 8px 0;
    cursor: pointer;
}

.parent-category:hover {
    color: #3498db;
}

.child-category {
    padding: 5px 0;
    white-space: normal;
}

/* Поиск */
.search-container {
    display: flex;
    align-items: center;
}

.search-input {
    display: none;
    padding: 8px 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-right: 10px;
    width: 200px;
    color: black;
}

.search-btn {
    background-color: transparent;
    color: white;
    font-size: 16px;
}

/* Первый экран */
.company-header {
    display: flex;
    margin: 30px 0;
    flex-wrap: wrap;
}

.company-gallery {
    text-align: center;
    width: 33%;
    padding-right: 15px;
}

.company-info {
    width: 67%;
    padding-left: 15px;
}

.main-image {
    max-width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.thumbnail-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.thumbnail {
    width: 75px;
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid #ddd;
    cursor: pointer;
}

.thumbnail:hover, .thumbnail.active {
    border-color: #3498db;
}

.rating {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.stars {
    color: #f1c40f;
    margin-right: 10px;
}

.reviews-count {
    color: #7f8c8d;
}

.contacts {
    margin-top: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.contact-icon {
    margin-right: 10px;
    color: #3498db;
    width: 20px;
    text-align: center;
}

.add-review-btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.add-review-btn:hover {
    background-color: #2980b9;
}

/* Карта */
.map-container {
    height: 400px;
    margin: 30px 0;
    border-radius: 8px;
    overflow: hidden;
}

/* Блоки с информацией */
.info-block {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.description {
    line-height: 1.8;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.detail-item {
    margin-bottom: 10px;
}

.detail-label {
    font-weight: bold;
    color: #7f8c8d;
}

/* Финансовые показатели */
.financial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.financial-item {
    padding: 15px;
    border-radius: 8px;
    color: white;
}

.revenue {
    background-color: #3498db;
}

.profit {
    background-color: #2ecc71;
}

.cost {
    background-color: #9b59b6;
}

/* Отзывы */
.review {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.review:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.review-author {
    font-weight: bold;
}

.review-date {
    color: #7f8c8d;
}

.review-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-textarea {
    height: 100px;
}

.rating-stars {
    display: flex;
    gap: 5px;
}

.star {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
}

.star.active {
    color: #f1c40f;
}

.submit-btn {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 16px;
}

.submit-btn:hover {
    background-color: #2980b9;
}

/* Услуги */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.tag {
    background-color: #3498db;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.tag:hover {
    background-color: #2980b9;
}

.show-more-btn {
    background-color: transparent;
    color: #3498db;
    font-size: 14px;
}

/* Карусели компаний */
.carousel {
    position: relative;
}

.carousel-container {
    display: flex;
    overflow: hidden;
    gap: 20px;
    scroll-behavior: smooth;
}

.company-card {
    min-width: calc(33.333% - 14px);
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.premium-company {
    min-width: calc(25% - 15px);
}

.company-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.company-name {
    font-weight: bold;
    margin-bottom: 10px;
}

.details-btn {
    display: block;
    text-align: center;
    background-color: #3498db;
    color: white;
    padding: 8px 0;
    border-radius: 4px;
    margin-top: 15px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1;
    cursor: pointer;
}

.prev {
    left: -20px;
}

.next {
    right: -20px;
}

/* Смежные категории */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.category-column {
    padding: 10px;
}

.parent-category-title {
    font-weight: bold;
    margin-bottom: 10px;
}

.child-category-list {
    list-style: none;
}

.child-category-item {
    margin-bottom: 8px;
}

/* Футер */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 0px 0px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-column h3 {
    color: white;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-link {
    margin-bottom: 10px;
}

.footer-link a {
    color: #bdc3c7;
}

.footer-link a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    color: white;
    font-size: 20px;
}

.copyright {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* Адаптивность */
@media (max-width: 992px) {
    .company-gallery, .company-info {
        width: 100%;
        padding: 0;
    }

    .company-gallery {
        margin-bottom: 20px;
    }

    .mega-menu {
        width: 90%;
    }

    .financial-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }

    .nav {
        width: 100%;
        justify-content: space-between;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .company-card {
        min-width: calc(50% - 10px);
    }

    .premium-company {
        min-width: calc(50% - 10px);
    }

    .categories-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .company-card {
        min-width: 100%;
    }

    .premium-company {
        min-width: 100%;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }
}


/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
}

/* Шапка */
header {
    background-color: #0D1A2D;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Десктопная шапка */
.header-desktop {
    display: none;
    height: 64px;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
    margin-right: 30px;
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 8px;
    color: #3498db;
}

.nav-item {
    position: relative;
    cursor: pointer;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 15px;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.nav-item:hover {
    background-color: rgba(255,255,255,0.1);
}

.nav-item i {
    margin-left: 8px;
    font-size: 12px;
    transition: transform 0.2s ease;
}

.spacer {
    flex-grow: 1;
}

/* Выпадающие списки */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 280px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    z-index: 1001;
    border-radius: 6px;
    color: #333;
    animation: fadeIn 0.2s ease-out;
    border: 1px solid #eee;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-content a {
    color: #333;
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: #0D1A2D;
    color: white;
}

.dropdown-footer {
    padding: 12px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    background-color: #f9f9f9;
    border-radius: 0 0 6px 6px;
}

.dropdown-footer button {
    color: #3498db;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.dropdown-footer button:hover {
    background-color: rgba(52,152,219,0.1);
}

/* Мега меню категорий */
.mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 650px;
    background-color: white;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    z-index: 1001;
    border-radius: 6px;
    animation: fadeIn 0.2s ease-out;
    border: 1px solid #eee;
}

.mega-menu-container {
    display: flex;
    min-height: 400px;
    max-height: 80vh;
}

.parent-categories {
    width: 35%;
    padding: 15px 0;
    border-right: 1px solid #eee;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.child-categories {
    width: 65%;
    padding: 20px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    align-content: start;
}

.parent-category {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #333;
    border-left: 3px solid transparent;
}

.parent-category:hover, .parent-category.active {
    background-color: #0D1A2D;
    color: white;
    border-left: 3px solid #3498db;
}

.child-category {
    padding: 10px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 13px;
    color: #333;
    background-color: #f5f5f5;
}

.child-category:hover {
    background-color: #0D1A2D;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.child-category a {
    display: block;
}

.mega-menu-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f9f9f9;
    border-radius: 6px 6px 0 0;
}

.back-btn {
    color: #3498db;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.back-btn:hover {
    background-color: rgba(52,152,219,0.1);
}

.back-btn i {
    margin-right: 8px;
}

.close-btn {
    color: #777;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    background-color: rgba(0,0,0,0.05);
    color: #333;
}

/* Поиск */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    display: none;
    width: 250px;
    padding: 10px 15px;
    border-radius: 20px;
    border: none;
    outline: none;
    margin-right: 10px;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.search-input:focus {
    box-shadow: 0 2px 10px rgba(52,152,219,0.3);
}

.search-btn {
    color: white;
    font-size: 16px;
    padding: 8px;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

.search-submit {
    display: none;
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    margin-left: 10px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.search-submit:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Мобильная шапка */

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
}

/* Гамбургер */
.hamburger {
    width: 28px;
    height: 22px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Анимация в крестик */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Меню (скрытое) */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

/* Раскрытое меню */
.mobile-menu.active {
    max-height: 600px; /* Достаточно для содержимого */
}

.header-mobile {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
}

.mobile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.mobile-row:first-child {
    justify-content: center;
    padding: 10px 0;
}

.mobile-btn {
    flex: 1;
    text-align: center;
    padding: 12px;
    color: white;
    border-radius: 6px;
    margin: 0 5px;
    transition: all 0.2s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

.mobile-btn i {
    margin-left: 8px;
    font-size: 12px;
}

/* Мобильные оверлеи */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: white;
    z-index: 1002;
    overflow-y: auto;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.overlay-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.overlay-close {
    color: #777;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.overlay-close:hover {
    background-color: rgba(0,0,0,0.05);
    color: #333;
}

.overlay-content {
    margin-bottom: 20px;
}

.overlay-item {
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    color: #333;
    font-size: 16px;
    transition: all 0.2s ease;
}

.overlay-item:hover {
    background-color: #0D1A2D;
    color: white;
    padding-left: 10px;
    border-bottom-color: #0D1A2D;
}

.overlay-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.overlay-back {
    color: #3498db;
    font-weight: 500;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 16px;
}

.overlay-back:hover {
    background-color: rgba(52,152,219,0.1);
}

.overlay-back i {
    margin-right: 8px;
}

.overlay-cancel {
    color: #777;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 16px;
}

.overlay-cancel:hover {
    background-color: rgba(0,0,0,0.05);
}

/* Анимация стрелки */
.active-dropdown i.fa-chevron-down {
    transform: rotate(180deg);
}

/* Адаптивность */
@media (min-width: 1024px) {
    .header-desktop {
        display: flex;
    }
    .header-mobile {
        display: none;
    }
}

@media (max-width: 1023px) {
    .header-desktop {
        display: none;
    }
    .header-mobile {
        display: flex;
    }
}

/* Активные состояния */
.active-dropdown {
    background-color: rgba(255,255,255,0.1);
}

.active-dropdown .dropdown-content,
.active-dropdown .mega-menu {
    display: block;
}

.active-search .search-input,
.active-search .search-submit {
    display: block;
}

.active-overlay {
    display: block;
}

/* Улучшенный инпут поиска в мобильной версии */
.search-input-mobile {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.search-input-mobile:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.2);
}

.search-submit-mobile {
    width: 100%;
    padding: 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.search-submit-mobile:hover {
    background-color: #2980b9;
}

/* Скрытое модальное окно */
.modal {
  display: none;              /* изначально скрыто */
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);

  /* выравнивание по центру */
  align-items: center;        /* по вертикали */
  justify-content: center;    /* по горизонтали */
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.modal-content img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}

/* Кнопка закрытия */
.closeImage {
  position: absolute;
  top: -50px;
  right: 0;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
}

/* стиль индикатора */
.loaderImage {
  border: 6px solid #f3f3f3;       /* серый фон */
  border-top: 6px solid #3498db;   /* синяя полоска */
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: auto;
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
