.menu a:hover {
    background-color: #004a7c;
    color: #ffffff;
}

.select {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 15px auto;
    background-color: #ffffff;
    width: 100%;
    max-width: 400px;
}

.select form {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    gap: 10px;
}

.select input[type="text"] {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.select button {
    padding: 10px 20px;
    background-color: #004a7c;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.select button:hover {
    background-color: #002b4d;
}

.select input::placeholder {
    color: #999;
    font-size: 16px;
}

.placeholder {
    min-height: calc(100vh - 220px);
    width: 100%;
    border: 1px solid #ddd;
    padding: 20px;
    text-align: center;
    background-color: #f9f9f9;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination {
    text-align: center;
    margin-top: 20px;
}

.pagination a {
    color: #004a7c;
    text-decoration: none;
    padding: 5px 10px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    display: inline-block;
    transition: background-color 0.3s, color 0.3s;
}

.pagination a:hover {
    background-color: #004a7c;
    color: #fff;
    border-color: #002b4d;
}

footer {
    background-color: #004a7c;
    color: #ffffff;
    text-align: center;
    padding: 10px;
    margin-top: 15px;
    width: 100%;
    box-sizing: border-box;
}

.footer-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap; /* Позволяет блокам переноситься */
    gap: 10px; /* Добавляет расстояние между блоками */
    text-align: center;
}

.footer-info .block {
    flex: 1 1 100%; /* Блок занимает 100% ширины на маленьких экранах */
    padding: 10px;
}

.block {
    text-align: center;
    padding: 0 15px;
    border: none;
    font-size: 12px;
    line-height: 1.5;
    color: #ffffff;
}

@media screen and (min-width: 768px) {
    .footer-info .block {
        flex: 1; /* На больших экранах блоки распределяются равномерно */
        padding: 5px;
    }
}

.city-card.compact a:hover {
    text-decoration: underline;
    color: #002b4d;
}

.phone-cards-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-start;
}

.phone-card-list {
    padding: 5px;
    font-size: 12px;
    color: #004a7c;
    text-decoration: none;
    background: none;
    border: none;
    width: auto;
    min-width: 80px;
    text-align: left;
    white-space: nowrap;
}

.phone-card-list:hover {
    text-decoration: underline;
    color: #002b4d;
}

.phone-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.phone-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phone-header {
    font-size: 18px;
    font-weight: bold;
    color: #004a7c;
}

.phone-header a {
    text-decoration: none;
    color: #004a7c;
}

.phone-header a:hover {
    text-decoration: underline;
    color: #002b4d;
}

.phone-ads,
.phone-links,
.phone-rating {
    font-size: 12px;
    color: #555;
}

.phone-ads ul,
.phone-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.phone-ads li {
    margin-bottom: 20px;
}

.phone-links li {
    margin-bottom: 5px;
}

.phone-ads a,
.phone-links a {
    color: #004a7c;
    text-decoration: none;
}

.phone-ads a:hover,
.phone-links a:hover {
    text-decoration: underline;
    color: #002b4d;
}

.elapsed-time {
    font-size: 12px;
    color: #999;
}

.phone-item-mb {
    margin-bottom: 20px;
}

.phone-item-title {
    display: block;
    font-weight: bold;
    color: #004a7c;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.phone-item-title:hover {
    text-decoration: underline;
    color: #002b4d;
}

.phone-details {
    font-size: 14px;
    color: #555;
    margin-top: 5px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phone-details .date,
.phone-details .elapsed-time {
    font-size: 12px;
    color: #777;
}

.phone-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phone-header h3 {
    margin: 0;
    font-size: 18px;
    color: #004a7c;
}

.phone-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phone-title {
    font-size: 16px;
    font-weight: bold;
    color: #004a7c;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.phone-title:hover {
    text-decoration: underline;
    color: #002b4d;
}

.phone-meta {
    font-size: 14px;
    color: #555;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phone-description p {
    font-size: 12px;
    color: #444;
    margin: 0;
}

.city-link {
    font-size: 18px;
    font-weight: bold;
    color: #004a7c;
    text-decoration: none;
}

.city-link:hover {
    text-decoration: underline;
    color: #002b4d;
}

.phone-details-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 20px;
    background-color: #f9f9f9;
}

.phone-rating {
    font-size: 14px;
    color: #555;
    margin-right: 70px;
}

.phone-links {
    font-size: 14px;
}

.phone-links a {
    display: block;
    font-size: 14px;
    color: #004a7c;
    text-decoration: none;
    margin-bottom: 3px;
}

.phone-links a:hover {
    text-decoration: underline;
    color: #002b4d;
}

.phone-rating p {
    margin-bottom: 2px;
    margin-top: 2px;
}

.rating-value-accent {
    color: #c26969;
}

.phone-formats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

.phone-format {
    background-color: #f1f1f1;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    color: #333;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.about-section {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.about-section h1, .about-section h2 {
    color: #004a7c;
    text-align: center;
    margin-bottom: 20px;
}

.about-section p {
    line-height: 1.6;
    font-size: 18px;
    color: #555;
    margin-bottom: 15px;
}

.about-section ul {
    list-style-type: none;
    padding: 0;
}

.about-section ul li {
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.about-section ul li::before {
    content: "\2713";
    color: #004a7c;
    position: absolute;
    left: 0;
    font-size: 18px;
    top: 0;
}

.cta-section {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background-color: #f4f4f4;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cta-section h2 {
    font-size: 24px;
    color: #004a7c;
    margin-bottom: 15px;
}

.cta-section p {
    font-size: 18px;
    color: #555;
    margin-bottom: 20px;
}

.cta-button {
    display: inline-block;
    background-color: #004a7c;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    font-size: 18px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #002b4d;
}

.contacts-section {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.contacts-section h1 {
    font-size: 28px;
    color: #004a7c;
    margin-bottom: 15px;
}

.contacts-section p {
    font-size: 18px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.contact-email a {
    font-size: 18px;
    color: #004a7c;
    text-decoration: none;
    font-weight: bold;
}

.contact-email a:hover {
    text-decoration: underline;
    color: #002b4d;
}

/* related phones */
.phone-details-container {
    display: flex;
    gap: 40px;
}

.related-phones {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-left: 40px;
}

.related-phones p {
    margin-top: 0;
    font-size: 14px;
    font-weight: bold;
}

.related-phones ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-phones a {
    color: #004a7c;
    text-decoration: none;
}

.related-phones a:hover {
    text-decoration: underline;
    color: #002b4d;
}

/* filters form */
@media screen and (max-width: 768px) {
    .filters-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-checkbox {
        width: 100%;
    }
    
    .apply-button {
        width: 100%;
    }
}


.filters-container {
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.filters-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #d1d1d1;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.filter-checkbox input {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #007bff;
    border-radius: 4px;
    display: inline-block;
    position: relative;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.filter-checkbox input:checked {
    background: #007bff;
    border-color: #0056b3;
}

.filter-checkbox input:checked::after {
    content: "✔";
    font-size: 14px;
    color: white;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
}

.filter-checkbox span {
    font-size: 14px;
    color: #333;
}

.apply-button {
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.apply-button:hover {
    background: #0056b3;
}

/* no results */
.no-results {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #666;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* flash message */
.flash-messages {
    padding: 15px;
    text-align: center;
}

.flash-message {
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    margin-bottom: 10px;
}

.flash-message.warning {
    background-color: #ffcc00;
    color: #333;
}

/* Phone search page styles */
.breadcrumbs {
    margin: 10px 0;
    font-size: 13px;
    color: #666;
}

.breadcrumbs a {
    color: #004a7c;
    text-decoration: none;
}

.flash-messages-modern {
    margin: 15px 0;
}

.flash-message-modern {
    padding: 12px 16px;
    margin: 8px 0;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    background: #e3f2fd;
    color: #1976d2;
}

.search-hero {
    background: linear-gradient(135deg, #004a7c 0%, #0066cc 100%);
    color: white;
    padding: 40px 20px;
    border-radius: 16px;
    margin: 20px 0;
    text-align: center;
}

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

.search-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.search-subtitle {
    font-size: 18px;
    margin: 0 0 30px;
    opacity: 0.9;
    line-height: 1.4;
}

.search-form-modern {
    margin: 30px 0;
}

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

.input-wrapper {
    position: relative;
    display: flex;
    background: white;
    border-radius: 50px;
    padding: 4px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #6c757d;
    z-index: 2;
}

.search-input-modern {
    flex: 1;
    padding: 16px 20px 16px 50px;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
    border-radius: 50px;
}

.search-input-modern::placeholder {
    color: #6c757d;
}

.search-btn-modern {
    padding: 16px 32px;
    background: #004a7c;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-btn-modern:hover {
    background: #003a6b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 74, 124, 0.3);
}

.search-hints {
    margin-top: 15px;
}

.hint {
    font-size: 14px;
    opacity: 0.8;
    background: rgba(255,255,255,0.1);
    padding: 6px 12px;
    border-radius: 20px;
}

.search-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    flex-wrap: wrap;
}

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

.stat-number {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popular-phones-section {
    margin: 40px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 24px;
    color: #004a7c;
    margin: 0 0 10px;
}

.section-description {
    color: #6c757d;
    font-size: 16px;
    margin: 0;
}

.phones-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0;
    flex-wrap: wrap;
    gap: 15px;
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.view-toggle {
    display: flex;
    gap: 5px;
    background: #f8f9fa;
    padding: 3px;
    border-radius: 8px;
}

.view-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
}

.view-btn.active {
    background: #004a7c;
    color: white;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-label {
    font-size: 14px;
    color: #6c757d;
}

.sort-select-modern, .filter-input {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    outline: none;
}

.sort-select-modern {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 32px;
}

.phones-container {
    margin: 20px 0;
}

.phones-container.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.phones-container.list-view {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.phone-item-modern {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.phone-card-link {
    display: block;
    padding: 16px;
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.phone-item-modern:hover {
    box-shadow: 0 4px 12px rgba(0, 74, 124, 0.15);
    transform: translateY(-2px);
}

.phone-card-link:hover {
    color: inherit;
    text-decoration: none;
}

.phone-card-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.phone-icon {
    font-size: 18px;
    color: #004a7c;
}

.phone-text {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    font-family: monospace;
}

.phone-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.copy-phone-btn {
    padding: 6px 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    position: relative;
}

.copy-phone-btn:hover {
    background: #e9ecef;
}

.faq-search-section {
    background: #f8f9fa;
    padding: 30px 20px;
    border-radius: 16px;
    margin: 40px 0;
}

.faq-title {
    text-align: center;
    color: #004a7c;
    margin: 0 0 25px;
    font-size: 20px;
}

.faq-grid-search {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.faq-item-search {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #004a7c;
}

.faq-question-search {
    color: #004a7c;
    font-size: 16px;
    margin: 0 0 12px;
}

.faq-answer-search {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* List view styles */
.list-view .phone-card-link {
    padding: 12px 16px;
}

.list-view .phone-card-content {
    justify-content: space-between;
}

/* Responsive */
@media (max-width: 768px) {
    .search-title {
        font-size: 24px;
    }

    .search-subtitle {
        font-size: 16px;
    }

    .search-stats {
        gap: 20px;
    }

    .phones-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .phones-container.grid-view {
        grid-template-columns: 1fr;
    }

    .input-wrapper {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
        border-radius: 16px;
    }

    .search-input-modern {
        padding: 16px 20px;
    }

    .search-btn-modern {
        border-radius: 12px;
    }
}

