/* ==========================================================
   Object list page
   ========================================================== */

.object-list-page {
    max-width: 1440px;
    margin: 0 auto;
    padding: 32px 50px;
}

.object-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

.object-container {
    padding: 20px 30px;
}

.page-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.page-title {
    display: flex;
}

.page-title h1 {
    margin: 0;
    font-size: 32px;
    color: #173451;
    font-weight: 700;
}

.object-count {
    display: flex;
    font-size: 15px;
    align-items: center;
    color: #666;
}

.sort-container
{
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 2fr;

}

.sort-container > :first-child {
    justify-self: start;
}

.sort-container > :last-child {
    justify-self: end;
}


.sort-panel {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.sort-panel label {
    font-size: 15px;
    font-weight: 500;
}

.sort-panel select {
    padding: 7px 12px;
    border: 1px solid #d7d7d7;
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
}


/* ==========================================================
   Filters
   ========================================================== */

.filters {
    position: sticky;
    top: 25px;
}

.filters form {
    background: #FCFBFB;
    border-radius: 10px;
    padding: 20px;
    box-shadow:
        0 2px 6px rgba(0,0,0,0.06),
        0 10px 30px rgba(0,0,0,0.04);
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group h3 {
    margin: 0 0 12px;
    font-size: 18px;
    color: #173451;
    font-weight: 500;
}

.filter-group label {
    display: block;
    margin-bottom: 9px;
    font-size: 15px;
    cursor: pointer;
}

.filter-group input {
    margin-right: 8px;
}

.filter-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
}


/* ==========================================================
   Cards
   ========================================================== */

.object-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.object-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 25px;
    background: #FCFBFB;
    border-radius: 10px;
    padding: 15px;
    box-shadow:
        0 2px 6px rgba(0,0,0,0.06),
        0 10px 30px rgba(0,0,0,0.04);
}

.object-image img {
    width: 120px;
    height: 120px;
    border-radius: 6px;
    object-fit: cover;
    display: block;
}

.object-title {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;
}

.object-title a {
    color: #173451;
    text-decoration: none;
}

.object-title a:hover {
    color: #5b8fc4;
}

.object-location {
    margin-bottom: 15px;
    font-size: 14px;
}

.object-meta {
    margin-bottom: 10px;
    font-size: 14px;
	padding-left:10px;
	color: #555;
	font-family: monospace;
}

.object-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.object-badges span {
    padding: 4px 12px;
    background: #eef4fb;
    border-radius: 12px;
    color: #173451;
    font-size: 13px;
}

.object-properties {
    display: flex;
    column-gap: 35px;
	row-gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.object-properties > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.object-properties > .object-collection-form {
    flex-direction: row;
	height: 30px;
}

.property-name {
    font-size: 13px;
    color: #666;
}

.property-value {
    font-size: 15px;
    color: #173451;
}

.object-collection {
    margin-top: 18px;
    color: #5b8fc4;
    font-size: 15px;
    font-weight: 500;
}

.object-collection-form {
    max-width: 300px;
	
}

.collection-description
{
    font-size: 15px; 
    margin-top: -10px;
    margin-bottom: 15px;
}

.pagination{
	text-align: center;
	justify-content: center;
	font-family: monospace;
}

.pagination-link{
	text-decoration: none;
	color: #555;	
	font-weight: 300;
}

.pagination-current{
	color: #173451;
	font-weight: 700;
	font-size: 16px;
}


/* ==========================================================
   Empty list
   ========================================================== */

.empty-list {
    background: #FCFBFB;
    border-radius: 10px;
    padding: 50px;
    text-align: center;
    box-shadow:
        0 2px 6px rgba(0,0,0,0.06),
        0 10px 30px rgba(0,0,0,0.04);
}


.filters-toggle {
    display: none;
    margin-bottom: 20px;
    padding: 10px 18px;
    background: #5b8fc4;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
}





/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 1000px) {

    .object-layout {
        grid-template-columns: 1fr;
    }

    .filters {
        position: static;
    }

}

@media (max-width: 700px) {

    .page-header{
        display: flex;
        flex-direction: column;
        margin-bottom: 0px;
    }

    .object-title {
        margin: 0 0 10px;
        font-size: 20px;
        line-height: 1.2;
        font-weight: 700;
    }

.object-count {
    display: flex;
    font-size: 15px;
    align-items: start;
    color: #666;
}

    .object-card {
        grid-template-columns: 1fr;
    }

    .filters-toggle {
        display: inline-block;
    }

    .filters {
        display: none;
    }

    .filters.filters-open {
        display: block;
        margin-bottom: 20px;
    }

    .page-title h1 {
    margin: 0;
    font-size: 28px;
    color: #173451;
    font-weight: 700;
}

    .sort-panel {
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 5px;
    }

}

/* ============================================================
   Routes
   ============================================================ */

.routes-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.route-card {
    display: grid;
    grid-template-columns: 297px minmax(220px, 1.3fr) minmax(220px, 1fr);
    gap: 24px;
    align-items: center;
    padding: 18px;
    background: #FCFBFB;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .06);
}

/* Галерея фотографий */

.route-card-gallery {
    display: grid;
    grid-template-columns: 220fr 68.5fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 8px;

    width: 100%;
    height: 145px;
    box-sizing: border-box;

    overflow: hidden;
    border-radius: 8px;
}

.route-card-image {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: #f1f3f5;
}

.route-card-image-main {
    grid-column: 1;
    grid-row: 1 / 3;
}

.route-card-image-small {
    grid-column: 2;
}

.route-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Название и описание */

.route-card-info {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 15px;
    min-width: 0;
}

.route-card-title {
    color: #173451;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
}

.route-card-description {
    color: #555;
    padding-left: 15px;
    font-size: 14px;
    line-height: 1.55;
}

/* Точки маршрута */

.route-card-points {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-left: 0;
    min-width: 0;
}

.route-card-points::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 6px;
    bottom: 6px;
    border-left: 4px dashed #aab8c5;
}

.route-point-item {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.route-point-item:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 17px;
    bottom: -8px;
}

.route-point-dot {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    box-sizing: border-box;
    border: 4px solid #1F5F99;
    border-radius: 50%;
    background: #fff;
}

.route-point-name {
    overflow: hidden;
    color: #173451;
    font-size: 14px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-point-more {
    height: 18px;
    display: flex;
    align-items: center;
    padding-left: 23px;
    color: #8996a3;
    font-size: 14px;
    line-height: 1;
}

/* Кнопка */

.route-card-action {
    white-space: nowrap;
}

/* Планшеты */

@media (max-width: 1050px) {
    .route-card {
        grid-template-columns: 247px minmax(180px, 1fr);
    }

    .route-card-gallery {
        height: 125px;
        grid-template-columns: 180fr 58.5fr;
    }

    .route-card-points {
        grid-column: 2;
    }

    .route-card-action {
        grid-column: 1 / -1;
        text-align: right;
    }
}

/* Мобильные устройства */

@media (max-width: 650px) {
    .route-card {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .route-card-gallery {
        width: 100%;
        height: auto;
        aspect-ratio: 296.5 / 145;
        grid-template-columns: 220fr 68.5fr;
    }

    .route-card-points,
    .route-card-action {
        grid-column: auto;
    }

    .route-card-action {
        text-align: left;
    }

    .route-card-action .button {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
}

/* ==========================================================
   Route detail
   ========================================================== */

.route-detail-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


.route-detail-item {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 25px;

    padding: 15px;

    background: #FCFBFB;
    border-radius: 10px;

    box-shadow:
        0 2px 6px rgba(0,0,0,0.06),
        0 10px 30px rgba(0,0,0,0.04);
}


.route-detail-image {
    width: 300px;
    height: 200px;
    overflow: hidden;
}


.route-detail-image img {
    width: 300px;
    height: 200px;

    object-fit: cover;
    border-radius: 6px;
}


.route-detail-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 12px;
}


.route-detail-title {
    margin: 0;

    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
}


.route-detail-title a {
    color: #173451;
    text-decoration: none;
}


.route-detail-title a:hover {
    color: #5b8fc4;
}


.route-detail-location {
    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 15px;
}


.route-detail-location .location-icon img {
    border-radius: 0;
}


.route-detail-description {
    font-size: 15px;
    line-height: 1.5;
}

.route-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;

    margin: -10px 0 30px 8px;
    padding: 9px 14px;

    border-top: 1px solid #dfe5ea;
    border-bottom: 1px solid #dfe5ea;

    color: #71808d;
    font-size: 14px;
    line-height: 1.4;
}

.route-detail-period {
    margin-top: auto;
    padding-top: 10px;

    color: #71808d;
    font-size: 14px;
}

@media (max-width: 700px) {

    .route-detail-item {
        grid-template-columns: 1fr;
    }

    .route-detail-image {
        width: 100%;
        height: 200px;
    }

    .route-detail-image img {
        width: 100%;
        height: 200px;
    }

}