/* Посуточная аренда квартир — Mogilev24 */

@media (max-width: 768px) {
    .mg24-apartments-page .mg24-hero-section {
        padding: 32px 0 56px;
    }

    .mg24-apartments-page .mg24-hero-container {
        padding-top: 24px;
        padding-bottom: 32px;
    }

    .mg24-apartments-page .mg24-breadcrumbs {
        padding-top: 16px;
        margin-bottom: 18px;
    }

    .mg24-apartments-page .mg24-hero-h1 {
        margin-bottom: 4px;
    }

    .mg24-apartments-page .mg24-hero-anchors {
        margin-top: 18px;
        margin-bottom: 22px;
    }

    .mg24-apartments-page .mg24-smart-logic-wrap {
        padding-bottom: 16px;
    }

    .mg24-apartments-page .mg24-messengers-left,
    .mg24-apartments-page .mg24-messengers-wrapper {
        margin-bottom: 10px;
    }
}

.mg24-apt-table-specs {
    display: none;
}

@media (max-width: 600px) {
    .mg24-apartments-page .mg24-apt-table-specs {
        display: flex;
        flex-wrap: wrap;
        gap: 10px 18px;
        justify-content: center;
        margin-top: 12px;
    }

    .mg24-apartments-page .mg24-apt-table-specs span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: #f1f5f9;
        border: 1px solid #e2e8f0;
        border-radius: 999px;
        padding: 6px 14px;
        font-size: 13px;
        color: #64748b;
        font-weight: 600;
    }

    .mg24-apartments-page .mg24-apt-table-specs strong {
        color: #0f172a;
        font-size: 1rem;
        font-weight: 800;
    }

    .mg24-apartments-page .mg24-pro-table .mg24-td-desktop {
        display: none !important;
    }
}

.mg24-apt-section {
    padding: 56px 0 64px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.mg24-apt-section .mg24-sec-title span {
    color: #25d366;
}

.mg24-apt-section .mg24-sec-desc {
    color: #64748b;
    margin-top: 8px;
}

.mg24-apt-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.mg24-apt-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}

.mg24-apt-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.mg24-apt-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #1e293b;
}

.mg24-apt-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.mg24-apt-card:hover .mg24-apt-card__media img {
    transform: scale(1.05);
}

.mg24-apt-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #25d366;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 5px 10px;
    border-radius: 999px;
}

.mg24-apt-card__count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.mg24-apt-card__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

.mg24-apt-card__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}

.mg24-apt-card__sub {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.mg24-apt-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #475569;
}

.mg24-apt-card__meta span {
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 999px;
}

.mg24-apt-card__foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
}

.mg24-apt-card__price {
    font-size: 14px;
    color: #64748b;
}

.mg24-apt-card__price strong {
    font-size: 1.5rem;
    color: #0f172a;
}

.mg24-apt-card__btn {
    font-size: 13px;
    font-weight: 700;
    color: #25d366;
}

/* Modal */
body.mg24-apt-modal-open {
    overflow: hidden;
}

.mg24-apt-modal {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.mg24-apt-modal[hidden] {
    display: none !important;
}

.mg24-apt-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
}

.mg24-apt-modal__dialog {
    position: relative;
    z-index: 2;
    width: min(920px, 100%);
    max-height: min(92vh, 900px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.mg24-apt-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 6;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.65);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.mg24-apt-modal__media {
    flex-shrink: 0;
    background: #0f172a;
}

.mg24-apt-modal__gallery {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: min(48vh, 400px);
    min-height: 200px;
    overflow: hidden;
    background: #0f172a;
    flex-shrink: 0;
}

.mg24-apt-modal__stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.mg24-apt-modal__img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    background: transparent;
}

.mg24-apt-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.mg24-apt-modal__prev { left: 12px; }
.mg24-apt-modal__next { right: 12px; }

.mg24-apt-modal__counter {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    pointer-events: none;
}

.mg24-apt-modal__thumbs {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    scrollbar-width: thin;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    margin: 0;
}

.mg24-apt-modal__thumb {
    flex-shrink: 0;
    width: 72px;
    height: 54px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #e2e8f0;
}

.mg24-apt-modal__thumb.is-active {
    border-color: #25d366;
}

.mg24-apt-modal__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mg24-apt-modal__content {
    padding: 20px 24px 28px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    scrollbar-width: thin;
}

.mg24-apt-modal__title {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
}

.mg24-apt-modal__sub {
    margin: 0 0 16px;
    color: #64748b;
    font-size: 14px;
}

.mg24-apt-modal__prices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.mg24-apt-modal__price-chip {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
}

.mg24-apt-modal__price-chip strong {
    font-size: 1.1rem;
}

.mg24-apt-modal__desc {
    margin: 0 0 18px;
    line-height: 1.65;
    color: #334155;
    font-size: 14px;
}

.mg24-apt-modal__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.mg24-apt-modal__grid h4 {
    margin: 0 0 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.mg24-apt-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mg24-apt-tag {
    font-size: 12px;
    background: #f1f5f9;
    color: #475569;
    padding: 4px 10px;
    border-radius: 999px;
}

.mg24-apt-rules {
    margin: 0;
    padding-left: 18px;
    color: #475569;
    font-size: 13px;
    line-height: 1.6;
}

.mg24-apt-modal__cta {
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.mg24-apt-modal__call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25d366;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 800;
    font-size: 1.05rem;
    padding: 14px 28px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
    transition: transform 0.2s, background 0.2s;
}

.mg24-apt-modal__call:hover {
    background: #1ea850;
    transform: translateY(-2px);
}

.mg24-apt-modal__hint {
    margin: 10px 0 0;
    font-size: 12px;
    color: #94a3b8;
}

.mg24-price-note {
    text-align: center;
    color: #64748b;
    font-size: 14px;
    margin-top: 16px;
}

.mg24-seo-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 14px;
}

.mg24-seo-subtitle {
    margin: 28px 0 16px;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
}

.mg24-seo-lead {
    margin: 20px 0 0;
    padding: 16px 18px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    color: #334155;
    font-size: 14px;
    line-height: 1.65;
}

.mg24-seo-footer a {
    color: #25d366;
    font-weight: 700;
}

@media (max-width: 768px) {
    .mg24-apt-grid {
        grid-template-columns: 1fr;
    }

    .mg24-apt-modal {
        padding: 0;
        align-items: flex-end;
    }

    .mg24-apt-modal__dialog {
        max-height: 94vh;
        border-radius: 20px 20px 0 0;
    }

    .mg24-apt-modal__grid {
        grid-template-columns: 1fr;
    }

    .mg24-apt-modal__nav {
        width: 36px;
        height: 36px;
        font-size: 22px;
    }
}
