/* ===== ОСНОВНЫЕ ПЕРЕМЕННЫЕ ===== */
:root {
    --primary-dark: #3E3F38;
    --primary-text: #353631;
    --bg-light: #FDFAFA;
    --card-bg: #FFFFFF;
    --border-color: rgba(53, 54, 49, 0.1);
    --shadow-sm: 0 5px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.15);
    --font-base: 'Montserrat', sans-serif;
}

/* ===== ОБЩИЕ СТИЛИ ===== */
html::-webkit-scrollbar {
    display: none;
}

body {
    font-family: var(--font-base);
    background-color: var(--bg-light);
    color: var(--primary-text);
}

.main-content {
    padding-top: 20px;
    padding-bottom: 50px;
}

/* ===== ЗАГОЛОВОК СТРАНИЦЫ ===== */
.places-title {
    font-size: 45px;
    color: var(--primary-text);
    font-weight: 700;
    margin-bottom: 0;
}

/* ===== ПОИСКОВАЯ СТРОКА ===== */
.search-container {
    margin: 30px auto 40px;
    position: relative;
    z-index: 10;
}

.search-input {
    border-radius: 15px;
    padding: 15px 15px;
    border: 1px solid var(--border-color);
    font-size: 18px;
    transition: all 0.3s;
    background: var(--bg-light);
    box-shadow: var(--shadow-sm);
    color: var(--primary-text);
}

.search-input:focus {
    border-color: var(--primary-dark);
    outline: none;
}

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

/* ===== ФИЛЬТР ПО КАТЕГОРИЯМ ===== */
.filter-section {
    margin: 0 auto 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.filter-toggle-btn {
    background: var(--bg-light);
    border: 0.5px solid rgba(53, 54, 49, 0.15);
    color: var(--primary-text);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    cursor: pointer;
}

.filter-toggle-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.filter-toggle-btn i {
    transition: transform 0.3s;
}

.filter-toggle-btn.active i {
    transform: rotate(180deg);
}

.filter-dropdown {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-top: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: none;
    width: 100%;
}

.filter-dropdown.show {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-title {
    color: var(--primary-text);
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 22px;
}

.category-select-container {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    background: white;
}

.category-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    margin: 5px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.category-option:hover {
    background: rgba(62, 63, 56, 0.05);
    border-color: rgba(62, 63, 56, 0.1);
}

.category-option.selected {
    background: rgba(62, 63, 56, 0.1);
    color: var(--primary-text);
}

.category-checkbox {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;               /* размер можно подогнать под ваш дизайн */
    height: 20px;
    border: 2px solid #3E3F38;  /* цвет рамки */
    border-radius: 4px;         /* скругление углов */
    outline: none;
    cursor: pointer;
    background-color: #fff;     /* фон невыбранного */
    margin-right: 12px;         /* отступ как в исходном коде */
    position: relative;
    transition: all 0.2s;
}

/* Состояние при наведении */
.category-checkbox:hover {
    border-color: #353631;      /* чуть темнее при наведении */
    background-color: #f5f5f5;
}

/* Состояние "выбрано" */
.category-checkbox:checked {
    background-color: #3E3F38;  /* нужный цвет фона */
    border-color: #3E3F38;
}

/* Галочка (белая) */
.category-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 6px;                  /* позиционирование зависит от размера */
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}



.selected-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.category-tag {
    background: rgba(62, 63, 56, 0.1);
    color: var(--primary-text);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.category-tag:hover {
    background: rgba(62, 63, 56, 0.15);
    transform: translateY(-2px);
}

.category-tag .remove {
    cursor: pointer;
    font-size: 12px;
    opacity: 0.7;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(53, 54, 49, 0.1);
}

.category-tag .remove:hover {
    opacity: 1;
    background: rgba(53, 54, 49, 0.2);
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
}

.apply-filter-btn {
    background: var(--primary-dark);
    color: var(--bg-light);
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.apply-filter-btn:hover {
    background: var(--primary-text);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(62, 63, 56, 0.2);
}

.clear-filters-btn {
    background: var(--bg-light);
    border: 2px solid rgba(62, 63, 56, 0.15);
    color: var(--primary-text);
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-filters-btn:hover {
    background: rgba(62, 63, 56, 0.05);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* ===== ИНФОРМАЦИЯ О РЕЗУЛЬТАТАХ ===== */
.results-info {
    color: var(--primary-text);
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 500;
}

.results-info span {
    font-weight: 700;
    color: var(--primary-dark);
}

/* ===== СЕТКА МЕСТ ===== */
.places-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
    align-items: start;
}

/* ===== КАРТОЧКА МЕСТА ===== */
.place-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 420px;
    border: 1px solid rgba(53, 54, 49, 0.05);
}

.place-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.place-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.place-card:hover .place-image {
    transform: scale(1.05);
}

.no-photo {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, rgba(62, 63, 56, 0.1), rgba(62, 63, 56, 0.05));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: all 0.3s ease;
}

.place-card:hover .no-photo {
    background: linear-gradient(135deg, rgba(62, 63, 56, 0.15), rgba(62, 63, 56, 0.08));
    transform: scale(1.02);
}

.no-photo i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.7;
}

.no-photo p {
    font-size: 16px;
    line-height: 1.5;
    max-width: 200px;
    margin: 0;
}

.place-card-body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.place-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-text);
    margin-bottom: 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
    flex-shrink: 0;
}

.place-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.place-card-title a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.place-card-description {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 4.8em;
}

.place-card-description:empty {
    display: none;
}

.place-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    flex-shrink: 0;
}

.btn-outline-primary.btn-sm {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid var(--primary-dark);
    color: var(--primary-dark);
    background: transparent;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-outline-primary.btn-sm:hover {
    background: var(--primary-dark);
    color: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(62, 63, 56, 0.2);
}

.favorite-btn {
    background: none;
    border: none;
    color: #70716E;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
}

.favorite-btn:hover {
    background: rgba(255, 71, 87, 0.1);
    color: #ff4757;
    transform: scale(1.1);
}

.favorite-btn.active {
    color: #ff4757;
}

.favorite-btn i {
    transition: all 0.3s;
}

.favorite-btn.active i:before {
    content: "\f004";
    font-weight: 900;
}

.favorite-btn[href] {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

/* ===== КНОПКА "ЗАГРУЗИТЬ ЕЩЕ" ===== */
.load-more-container {
    text-align: center;
    margin: 50px 0;
}

.load-more-btn {
    background: var(--primary-dark);
    color: var(--bg-light);
    border: none;
    padding: 16px 40px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.load-more-btn:hover {
    background: var(--primary-text);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.load-more-btn:disabled {
    background: #ddd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.load-more-btn i {
    margin-right: 10px;
}

/* ===== СООБЩЕНИЕ ОБ ОТСУТСТВИИ РЕЗУЛЬТАТОВ ===== */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results-icon {
    font-size: 64px;
    margin-bottom: 25px;
    color: #ddd;
}

.no-results h4 {
    color: var(--primary-text);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
}

.no-results p {
    color: #777;
    font-size: 16px;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== СКЕЛЕТОН-ЗАГРУЗЧИК ===== */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.skeleton-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    height: 420px;
    border: 1px solid rgba(53, 54, 49, 0.05);
}

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

.skeleton-content {
    padding: 25px;
}

.skeleton-title {
    height: 24px;
    width: 70%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    margin-bottom: 15px;
    border-radius: 6px;
    animation: loading 1.5s infinite;
}

.skeleton-text {
    height: 16px;
    width: 90%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    margin-bottom: 12px;
    border-radius: 4px;
    animation: loading 1.5s infinite;
}

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

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

/* ===== ФУТЕР ===== */
/*footer {*/
/*    background: var(--primary-dark);*/
/*    color: var(--bg-light);*/
/*    padding: 30px 0;*/
/*    margin-top: 50px;*/
/*}*/

/*footer p {*/
/*    margin: 0;*/
/*    font-size: 14px;*/
/*    color: rgba(253, 250, 250, 0.8);*/
/*}*/

/* ===== АДАПТАЦИЯ ДЛЯ РАЗНЫХ ЭКРАНОВ ===== */

/* Очень широкие экраны (от 1441px) */
@media (min-width: 1441px) {
    .places-title {
        font-size: 52px;
    }
    .search-input {
        font-size: 20px;
        padding: 18px 20px;
    }
    .filter-toggle-btn {
        font-size: 18px;
        padding: 14px 28px;
    }
    .places-grid {
        gap: 35px;
    }
    .place-card {
        min-height: 460px;
    }
    .place-image {
        height: 250px;
    }
    .place-card-title {
        font-size: 22px;
    }
    .place-card-description {
        font-size: 16px;
    }
    .load-more-btn {
        padding: 18px 50px;
        font-size: 18px;
    }
}

/* До 1024px */
@media (max-width: 1024px) {
    .places-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    .skeleton-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    .place-card {
        min-height: 400px;
    }
    .place-image {
        height: 200px;
    }
    .no-photo {
        height: 200px;
    }
}

/* До 992px */
@media (max-width: 992px) {
    .places-title {
        font-size: 45px;
    }
    .search-input {
        font-size: 17px;
        padding: 14px 18px;
    }
    .filter-toggle-btn {
        font-size: 15px;
        padding: 10px 20px;
    }
    .mb-4 {
        margin-bottom: 1rem !important;
    }

    .mt-4 {
        margin-top: 0.8rem !important;
    }
}

/* До 768px */
@media (max-width: 768px) {
    .main-content {
        padding-top: 15px;
        padding-bottom: 40px;
    }
    .places-title {
        font-size: 39px;
    }
    .search-container {
        margin: 20px auto 30px;
    }
    .search-input {
        padding: 12px 15px;
        font-size: 16px;
    }
    .filter-section {
        margin-bottom: 30px;
    }
    .filter-dropdown {
        padding: 20px;
    }
    .filter-actions {
        flex-direction: column;
    }
    .apply-filter-btn,
    .clear-filters-btn {
        width: 100%;
        text-align: center;
    }
    .places-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .skeleton-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .place-card {
        min-height: auto;
    }
    .place-image {
        height: 200px;
    }
    .place-card-body {
        padding: 20px;
    }
    .place-card-title {
        font-size: 18px;
        min-height: 2.6em;
    }
    .place-card-description {
        font-size: 14px;
    }
    .load-more-btn {
        padding: 14px 30px;
        font-size: 15px;
    }
    .no-results {
        padding: 40px 20px;
    }
    .no-results-icon {
        font-size: 48px;
    }
    .no-results h4 {
        font-size: 20px;
    }
    footer {
        padding: 25px 0;
    }
    .mb-4 {
        margin-bottom: 1rem !important;
    }

    .mt-4 {
        margin-top: 0.4rem !important;
    }
}

/* До 576px */
@media (max-width: 576px) {
    .places-title {
        font-size: 35px;
    }
    .search-input {
        font-size: 15px;
        padding: 10px 12px;
    }
    .filter-toggle-btn {
        width: 100%;
        justify-content: center;
    }
    .category-select-container {
        max-height: 300px;
        padding: 10px;
    }
    .category-option {
        padding: 8px 10px;
    }
    .category-tag {
        font-size: 13px;
        padding: 6px 12px;
    }
    .place-image {
        height: 180px;
    }
    .place-card-body {
        padding: 15px;
    }
    .place-card-title {
        font-size: 17px;
        margin-bottom: 10px;
    }
    .btn-outline-primary.btn-sm {
        padding: 8px 16px;
        font-size: 13px;
    }
    .favorite-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .load-more-btn {
        padding: 12px 25px;
        font-size: 14px;
    }
    .mb-4 {
        margin-bottom: 1rem !important;
    }

    .mt-4 {
        margin-top: 0.3rem !important;
    }
}

/* До 500px */
@media (max-width: 500px) {
    .places-title {
        font-size: 34px;
    }
    .search-input {
        font-size: 14px;
        padding: 10px 12px;
    }
    .filter-title {
        font-size: 20px;
    }
    .category-option label {
        font-size: 14px;
    }
    .category-tag {
        font-size: 12px;
        padding: 5px 10px;
    }
    .results-info {
        font-size: 14px;
    }
    .mb-4 {
        margin-bottom: 1rem !important;
    }

    .mt-4 {
        margin-top: 0.2rem !important;
    }
}

/* До 425px */
@media (max-width: 425px) {
    .places-title {
        font-size: 33px;
    }
    .search-input {
        border-radius: 12px;
        padding: 10px 12px;
    }
    .filter-dropdown {
        padding: 15px;
    }
    .category-select-container {
        max-height: 250px;
    }
    .category-option {
        padding: 6px 8px;
    }
    .category-checkbox {
        width: 16px;
        height: 16px;
        margin-right: 8px;
    }
    .selected-categories {
        gap: 8px;
    }
    .category-tag {
        padding: 5px 10px;
        font-size: 11px;
    }
    .apply-filter-btn,
    .clear-filters-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    .place-image {
        height: 160px;
    }
    .place-card-body {
        padding: 12px;
    }
    .place-card-title {
        font-size: 16px;
    }
    .place-card-description {
        font-size: 13px;
    }
    .btn-outline-primary.btn-sm {
        padding: 6px 12px;
        font-size: 12px;
    }
    .favorite-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    .mb-4 {
        margin-bottom: 1rem !important;
    }

    .mt-4 {
        margin-top: 0.2rem !important;
    }
}

/* До 375px */
@media (max-width: 375px) {
    .places-title {
        font-size: 30px;
    }
    .search-input {
        font-size: 13px;
        padding: 8px 10px;
    }
    .filter-toggle-btn {
        font-size: 14px;
        padding: 8px 16px;
    }
    .filter-title {
        font-size: 18px;
    }
    .category-select-container {
        padding: 8px;
    }
    .category-option {
        padding: 5px 6px;
    }
    .category-option label {
        font-size: 13px;
    }
    .place-card-title {
        font-size: 15px;
    }
    .place-card-description {
        font-size: 12px;
    }
    .load-more-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    .no-results-icon {
        font-size: 40px;
    }
    .no-results h4 {
        font-size: 18px;
    }
    .no-results p {
        font-size: 14px;
    }
    .mb-4 {
        margin-bottom: 1rem !important;
    }

    .mt-4 {
        margin-top: 0.1rem !important;
    }
}

/* До 360px */
@media (max-width: 360px) {
    .places-title {
        font-size: 28px;
    }
    .search-input {
        font-size: 12px;
        padding: 8px 10px;
    }
    .filter-toggle-btn {
        font-size: 13px;
        padding: 8px 12px;
    }
    .category-tag {
        font-size: 10px;
        padding: 4px 8px;
    }
    .place-image {
        height: 140px;
    }
    .place-card-body {
        padding: 10px;
    }
    .place-card-title {
        font-size: 14px;
        min-height: 2.4em;
    }
    .place-card-description {
        font-size: 11px;
    }
    .btn-outline-primary.btn-sm {
        padding: 5px 10px;
        font-size: 11px;
    }
    .favorite-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    .load-more-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    .mb-4 {
        margin-bottom: 1rem !important;
    }

    .mt-4 {
        margin-top: 0.1rem !important;
    }
}

/* Убираем голубую обводку и тень при фокусе у всех элементов */
.search-input:focus,
.filter-toggle-btn:focus,
.apply-filter-btn:focus,
.clear-filters-btn:focus,
.load-more-btn:focus,
.btn-outline-primary:focus,
.favorite-btn:focus,
.navbar-toggler:focus,
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none !important;
    box-shadow: none !important; /* убирает тень Bootstrap */
}