:root {
    --primary-color: #2c7be5;
    --secondary-color: #00d4aa;
    --success-color: #00c9a7;
    --warning-color: #ffc107;
    --danger-color: #e63757;
    --light-bg: #f8f9fa;
    --dark-text: #2c3e50;
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

@font-face {
    font-family: 'Currency';
    src: url('../css/fonts/currency.ttf') format('truetype');
}

.currencySign {
    position: relative;
    top: 0;
    display: inline-block;
    font-family: 'Currency';
    -webkit-font-smoothing: antialiased;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    margin-right: 8px;
}

.currencySign:before {
    content: '^';
}

/* Select2 стилизация для городов */
.select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--multiple {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    min-height: 50px;
    padding: 8px 12px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    position: relative;
}

.select2-container--default .select2-selection--multiple.select2-selection--clearable {
    padding-right: 0px;
    padding-left: 0px;
}

.select2-container .select2-selection--multiple:focus-within,
.select2-container.select2-container--open .select2-selection--multiple {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 123, 229, 0.25);
}

.select2-container--open .select2-selection--multiple.select2-selection--clearable {
    padding-left: 10px;
}

.select2-container .select2-selection--multiple .select2-selection__rendered {
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
    width: 100%;
    position: relative;
    min-height: 34px;
}

.select2-container .select2-selection--multiple .select2-selection__choice {
    background: var(--gradient-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 4px 28px 4px 12px;
    margin: 0;
    box-shadow: 0 2px 4px rgba(44, 123, 229, 0.2);
    position: relative;
    flex: 0 0 calc(50% - 3px);
    max-width: calc(50% - 3px);
}

.select2-container .select2-selection--multiple .select2-selection__choice__remove {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-right: 0;
    transition: color 0.2s ease;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    text-decoration: none;
}

.select2-container .select2-selection--multiple .select2-selection__choice__remove span {
    display: flex;
    justify-content: flex-end;
}

.select2-container .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: white;
    text-decoration: none;
    background-color: transparent !important;
}

.select2-container .select2-selection--multiple .select2-selection__choice__remove:focus {
    background-color: transparent !important;
    outline: none;
}

.select2-container .select2-selection--multiple .select2-selection__choice__remove::after {
    content: none !important;
}

.select2-container .select2-selection--multiple .select2-selection__choice__remove[title] {
    position: relative;
}

.select2-container .select2-selection--multiple .select2-selection__choice__remove[title]::before,
.select2-container .select2-selection--multiple .select2-selection__choice__remove[title]::after {
    display: none !important;
}

/* Счетчик выбранных городов */
.cities-counter {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(44, 123, 229, 0.2);
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    line-height: 1.4;
}

.select2-container .select2-selection--multiple .select2-selection__placeholder {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.select2-dropdown {
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(44, 123, 229, 0.2);
    overflow: hidden;
}

/* Десктопная версия - растягиваем dropdown до 500px */
@media (min-width: 769px) {
    .select2-dropdown {
        min-width: 500px !important;
        max-width: 500px !important;
        width: 500px !important;
    }

    /* Когда dropdown снизу (по умолчанию) */
    .select2-dropdown--below {
        margin-top: -2px;
    }

    /* Когда dropdown сверху */
    .select2-dropdown--above {
        margin-bottom: -2px;
    }
}

.select2-results__option {
    padding: 10px 15px;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}

.select2-results__option--highlighted {
    background: var(--gradient-primary) !important;
    color: white;
}

.select2-search__field {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.95rem;
    height: 24px !important;
    color: var(--dark-text) !important;
}

.select2-search__field:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(44, 123, 229, 0.25);
}

/* Исправляем позиционирование поля поиска внутри multiple select */
.select2-container--default .select2-selection--multiple .select2-search--inline {
    width: auto;
    position: static;
}

.select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
    width: auto !important;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    outline: none;
    font-size: 1rem;
    color: #6c757d;
}

.select2-container--default .select2-selection--multiple:not(:has(.select2-selection__choice)) .select2-search--inline {
    position: absolute;
    left: 22%;
    transform: translateX(-50%);
    width: auto;
}

.select2-container--default .select2-selection--multiple:not(:has(.select2-selection__choice)) .select2-search--inline .select2-search__field {
    text-align: center;
    min-width: 120px;
    width: 150px !important;
}

/* Когда dropdown открыт и нет выбранных городов, меняем выравнивание на left */
.select2-container--open.select2-container--default .select2-selection--multiple:not(:has(.select2-selection__choice)) .select2-search--inline .select2-search__field {
    text-align: left !important;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .select2-container .select2-selection--multiple {
        min-height: 45px;
        padding: 6px 10px;
    }

    .select2-container .select2-selection--multiple .select2-selection__choice {
        font-size: 0.85rem;
        padding: 3px 6px;
    }

    .select2-dropdown {
        border-width: 1px;
    }

    .select2-results__option {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    /* Мобильные стили для поля поиска */
    .select2-container--default .select2-selection--multiple .select2-search--inline {
        margin-left: -6px;
    }

    .select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
        font-size: 0.9rem;
    }

    /* ВЕРТИКАЛЬНОЕ расположение - только когда dropdown открыт */
    .select2-container--open .select2-selection--multiple {
        display: flex;
        flex-direction: column;
    }

    /* Поле поиска занимает всю ширину и располагается снизу */
    .select2-container--open .select2-selection--multiple .select2-search--inline {
        width: 100% !important;
        margin-left: 0 !important;
    }

    .select2-container--open .select2-selection--multiple .select2-search--inline .select2-search__field {
        width: 100% !important;
        padding: 8px 12px;
        box-sizing: border-box;
    }

    /* Мобильные стили для счетчика */
    .cities-counter {
        padding: 5px 10px;
    }

    /* Когда dropdown открыт и есть выбранные города, растягиваем контейнер городов */
    .select2-container--open .select2-selection--multiple:has(.select2-selection__choice) .select2-selection__rendered {
        width: calc(100% - 20px) !important;
    }

    .select2-container--open .select2-selection--multiple.select2-selection--clearable {
        padding-left: 0px;
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header Styles */
.header-top {
    background: var(--gradient-primary);
    color: white;
    padding: 10px 0;
    font-size: 14px;
}

.header-top .info-item {
    display: flex;
    align-items: center;
    margin-right: 25px;
}

.header-top .info-item i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.navbar {
    background: white;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 0;
    transition: all 0.3s ease;
}

/* Для мобильных устройств */
@media (max-width: 991.98px) {
    .navbar {
        padding: 0;
    }
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    padding: 8px 0;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.8rem;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
}

.navbar-brand i {
    margin-right: 10px;
    font-size: 2rem;
}

.navbar-nav .nav-link {
    color: var(--dark-text) !important;
    font-weight: 500;
    margin: 0 15px;
    padding: 10px 0 !important;
    position: relative;
    transition: all 0.3s ease;
}

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

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background: var(--primary-color);
    transition: all 0.3s ease;
}

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

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    min-height: 28vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    color: white;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 600"><defs><pattern id="medical" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="3" fill="rgba(255,255,255,0.1)"/><path d="M50 15 L50 25 M45 20 L55 20" stroke="rgba(255,255,255,0.05)" stroke-width="2"/><rect x="75" y="75" width="20" height="8" rx="4" fill="rgba(255,255,255,0.06)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23medical)"/></svg>') center/cover;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 10px 0 0 0;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 20px;
    opacity: 0.95;
    font-weight: 300;
}

.hero-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
}



/* Search Section */
.search-section {
    background: white;
    padding: 100px 0 100px 0;
    margin-top: 0;
    position: relative;
    z-index: 10;
    border-radius: 25px 25px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.search-container {
    max-width: 850px;
    margin: 0 auto;
}

.search-title {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--dark-text);
    margin-bottom: 15px;
    text-align: center;
}

.search-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-align: center;
}

.search-box {
    background: var(--light-bg);
    border-radius: 60px;
    padding: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    position: relative;
    gap: 8px;
}

.city-select-container {
    position: absolute;
    left: 8px;
    flex-shrink: 0;
    min-width: 200px;
    max-width: 200px;
    z-index: 10;
}

/* Десктопная версия - плавное расширение контейнера */
@media (min-width: 769px) {
    .city-select-container {
        width: 200px;
        transition: all 0.3s ease;
    }

    /* Когда select2 открыт, расширяем контейнер */
    .city-select-container:has(.select2-container--open) {
        min-width: 500px;
        max-width: 500px;
        width: 500px;
    }
}

.city-select {
    border: none;
    background: white;
    padding: 18px 20px;
    outline: none;
    font-size: 1.1rem;
    color: var(--dark-text);
    border-radius: 50px;
    cursor: pointer;
    min-width: 180px;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    padding-right: 40px;
}

.city-select:focus {
    box-shadow: 0 0 0 3px rgba(44, 123, 229, 0.2);
}

/* Select2 стили */
.select2-container--default .select2-selection--multiple {
    border: none;
    background: white;
    border-radius: 50px;
    padding: 15px 15px;
    min-height: 56px;
    display: flex;
    align-items: center;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border: none;
    outline: none;
    box-shadow: 0 0 0 3px rgba(44, 123, 229, 0.2);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: var(--gradient-primary);
    border: none;
    border-radius: 20px;
    padding: 5px 32px 5px 15px;
    color: white;
    font-size: 0.95rem;
    margin: 2px 5px 2px 0;
    position: relative;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: white;
    margin-right: 0;
    font-weight: bold;
    border: none;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    text-decoration: none;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove span {
    display: flex;
    justify-content: flex-end;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    background-color: transparent !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:focus {
    background-color: transparent !important;
    outline: none;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove::after {
    content: none !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove[title] {
    position: relative;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove[title]::before,
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove[title]::after {
    display: none !important;
}

.select2-container--default .select2-search--inline .select2-search__field {
    font-size: 1rem;
    margin: 0;
    padding: 5px;
}

.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
    color: #999;
    font-size: 1rem;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    width: 100%;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

/* Когда есть выбранные элементы (choices), выравниваем влево */
.select2-container--default .select2-selection--multiple:has(.select2-selection__choice) .select2-selection__rendered {
    justify-content: flex-start;
}

/* Когда показывается счетчик городов, выравниваем по центру */
.select2-container--default .select2-selection--multiple .select2-selection__rendered:has(.cities-counter) {
    justify-content: center;
}

/* Скрываем кнопку "Очистить все" */
.select2-container--default .select2-selection__clear {
    display: none;
}

.select2-container--default .select2-selection--multiple .select2-search--inline {
    width: 1px !important;
}

.select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
    text-align: center;
}

/* Когда есть выбранные города, фиксируем ширину поля поиска */
.select2-container--open .select2-selection--multiple:has(.select2-selection__choice) .select2-search--inline {
    width: 150px !important;
    flex-shrink: 0;
    margin-left: 15px;
}

/* Когда dropdown открыт, города растягиваются на всю доступную ширину контейнера */
.select2-container--open .select2-selection--multiple .select2-selection__choice {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

.select2-container--default .select2-selection--multiple:has(.select2-selection__choice) .select2-search--inline .select2-search__field {
    text-align: left;
}

.select2-dropdown {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
}


.search-input {
    border: none;
    background: transparent;
    padding: 18px 25px 18px 218px;
    outline: none;
    flex: 1;
    font-size: 1.1rem;
    color: var(--dark-text);
    caret-color: var(--dark-text);
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    background: var(--gradient-primary);
    border: none;
    border-radius: 50px;
    padding: 18px 30px;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(44, 123, 229, 0.4);
}

/* Анимация спиннера */
.search-btn .fa-spinner {
    animation: spin 1s linear infinite !important;
}

/* Стили для заблокированной кнопки */
.search-btn.searching,
.search-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    pointer-events: none;
}

.search-btn.searching:hover {
    transform: none;
    box-shadow: 0 5px 15px rgba(44, 123, 229, 0.2);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background: var(--light-bg);
}

.feature-card {
    background: white;
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    height: 100%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: none;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
    font-size: 2rem;
}

.feature-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--dark-text);
}

.feature-description {
    color: #666;
    line-height: 1.6;
}

/* Search Results */
.search-results {
    max-width: 800px;
    margin: 30px auto 0;
    display: none;
}

.result-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--primary-color);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Выравниваем по верху */
    margin-bottom: 15px;
    gap: 15px;
}

.result-title {
    font-weight: bold;
    color: var(--dark-text);
    font-size: 1.2rem;
    flex: 1;
    margin-right: 15px;
    line-height: 1.4;
    word-break: break-word; /* Разрываем длинные слова */
    /* Убираем все ограничения по строкам */
}

.result-price {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--success-color);
    white-space: nowrap; /* Запрещаем перенос */
    flex-shrink: 0; /* Не сжимаем блок с ценой */
}

.pharmacy-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.pharmacy-name {
    color: #666;
    font-size: 0.9rem;
}

.pharmacy-distance {
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* No Results Message */
.no-results {
    background: white;
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--warning-color);
}

.no-results-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--warning-color), #ffb84d);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
    font-size: 2.2rem;
}

.no-results-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-text);
    margin-bottom: 15px;
}

.no-results-text {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 25px;
    line-height: 1.6;
}

.no-results-suggestions {
    margin-top: 20px;
}

.no-results-suggestions p {
    color: #777;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.retry-suggestion {
    display: inline-block;
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
    padding: 8px 16px;
    border-radius: 20px;
    margin: 3px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.retry-suggestion:hover {
    background: var(--warning-color);
    color: white;
    transform: translateY(-2px);
}

/* Autocomplete */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 8px;
    right: 8px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.autocomplete-item {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: var(--light-bg);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

/* Footer */
.footer {
    background: var(--dark-text);
    color: white;
    padding: 20px 0;
}

.footer-content {
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
}

.footer-logo i {
    margin-right: 10px;
}

.footer h5 {
    color: var(--secondary-color);
    margin-bottom: 22px;
    font-weight: bold;
}

.footer a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 5px 0;
}

.footer a:hover {
    color: var(--secondary-color);
}

.footer-content p {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer .email-link {
    color: inherit;
    text-decoration: none;
    padding: 0;
    display: inline;
}

.footer .email-link:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    text-align: center;
    color: #bbb;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-up-delay-1 {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.fade-in-up-delay-2 {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.fade-in-up-delay-3 {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 30vh;
    }

    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        margin-bottom: 25px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

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

    .search-section {
        padding: 30px 0 30px 0;
    }

    .search-box {
        flex-direction: column;
        padding: 15px;
        border-radius: 20px;
        gap: 10px;
    }

    .city-select {
        width: 100%;
        text-align: center;
        padding: 15px 50px 15px 20px;
        font-size: 1rem;
        min-width: unset;
    }

    .city-select-container {
        position: relative;
        left: auto;
        top: auto;
        min-width: unset;
        width: 100%;
    }

    .search-input {
        padding: 18px 25px;
    }

    .select2-container--default .select2-selection--multiple {
        min-height: 50px;
        border-radius: 15px;
        padding: 8px 12px;
    }

    .select2-container--default .select2-selection--multiple .select2-selection__choice {
        font-size: 0.85rem;
        padding: 4px 10px;
        margin: 2px 3px 2px 0;
    }

    .search-input {
        margin-bottom: 0;
        text-align: left; /* Изменяем с center на left */
        padding: 15px 20px;
        font-size: 1rem;
        width: 100%; /* Убеждаемся что занимает всю ширину */
        background: white;
        border-radius: 15px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .search-btn {
        width: 100%;
        border-radius: 15px;
        padding: 15px 25px;
        font-size: 1rem;
        min-height: 50px;
    }

    .no-results {
        padding: 30px 20px;
    }

    .no-results-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }

    .no-results-title {
        font-size: 1.3rem;
    }

    .no-results-text {
        font-size: 1rem;
    }
}

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

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

    .hero-stats {
        flex-direction: row;
        gap: 20px;
        justify-content: center;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .result-title {
        font-size: 1rem;
        line-height: 1.3;
        /* Без ограничений по высоте */
    }

    .result-header {
        align-items: flex-start;
        gap: 10px;
    }

    .result-price {
        font-size: 1.2rem;
        margin-top: 2px;
        min-width: 60px; /* Минимальная ширина для цены */
    }
}

/* Стили для блока с информацией о количестве аптек */
.pharmacy-count {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
}

.pharmacy-count i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

/* Для результатов поиска */
.result-item .pharmacy-info {
    display: flex;
    gap: 2px;
}

.result-item .pharmacy-name {
    color: #6c757d;
    font-size: 0.85rem;
}

.result-item .pharmacy-count {
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .pharmacy-count {
        font-size: 0.8rem;
    }
    
    .result-item .pharmacy-count {
        font-size: 0.9rem;
    }
}