/* ===== Для страницы галерея ===== */
.gallery-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Roboto, sans-serif;
}
.gallery-header {
    text-align: center;
    margin-bottom: 40px;
}
.gallery-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #1e2a3e;
}
.red { color: #e63946; }
.gallery-header p {
    font-size: 1.2rem;
    color: #4a5568;
}
.rubric {
    margin-bottom: 60px;
    background: #fff;
    border-radius: 24px;
    padding: 20px 0 10px 0;
}
.rubric-title {
    text-align: center;
    margin-bottom: 25px;
}
.rubric-photos-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;  /* по умолчанию — левый край для первых трёх рубрик */
}
.rubric-photos-horizontal.centered {
    justify-content: center;       /* для рубрик 4-6 — по центру */
}
.gallery-card {
    position: relative;
    flex: 1 1 200px;
    max-width: 260px;
    display: block;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    background: #f8f8f8;
    text-decoration: none;
}
.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 24px rgba(0,0,0,0.12);
}
.gallery-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}
.card-label {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
    color: white;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
    pointer-events: none;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: calc(100% - 24px);
}
.price-banner {
    margin-top: 30px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 40px;
    text-align: center;
}
.price-banner p {
    font-size: 1.8rem;
    margin: 0 0 15px;
}
.price-banner strong {
    font-size: 2.2rem;
    color: #e63946;
}
.price-phone {
    display: inline-block;
    background: #2c3e50;
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    transition: 0.2s;
}
.price-phone:hover {
    background: #e63946;
}
@media (max-width: 700px) {
    .gallery-card {
        flex-basis: 160px;
    }
    .gallery-header h1 {
        font-size: 1.8rem;
    }
    .card-label {
        font-size: 0.7rem;
        padding: 3px 8px;
        white-space: normal;
        max-width: 90%;
    }
}
@media (max-width: 550px) {
    .gallery-card {
        flex-basis: 100%;
        max-width: none;
    }
}