* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: Arial, Helvetica, sans-serif;
    color: #1f1f1f;
    background: var(--bg-light);
}

.preview-open {
    overflow: hidden;
}

.page {
    flex: 1;
    width: 100%;
    margin: 0 auto;
    padding: 34px 0 48px;
}

.offers {
    padding: 8px 0;
}

.tiles-container {
    padding-top: 24px;
    padding-bottom: 36px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
}

h1 {
    margin: 0;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.1;
    letter-spacing: 0;
}

.see-all {
    border: 1px solid #006ce4;
    border-radius: 6px;
    padding: 10px 16px;
    color: var(--accent);
    background: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.see-all:hover {
    background: #f0f7ff;
}

.cards-row {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(230px, 1fr));
    gap: 18px;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 28px;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.service-card {
    min-height: 455px;
    overflow: hidden;
    border: 1px solid #e7e7e7;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
}

.service-card:hover,
.service-card:focus {
    outline: none;
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.service-card:focus-visible {
    outline: 3px solid rgba(0, 108, 228, 0.45);
    outline-offset: 4px;
}

.photo-wrap {
    position: relative;
    height: 265px;
    overflow: hidden;
    background: #d9d9d9;
}

.photo-wrap img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.next {
    position: absolute;
    top: 50%;
    right: -20px;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #1f1f1f;
    background: #ffffff;
    box-shadow: 0 2px 9px rgba(0, 0, 0, 0.20);
    transform: translateY(-50%);
    font-size: 36px;
    cursor: pointer;
}

.next:hover {
    background: #f4f4f4;
}

.card-body {
    display: flex;
    min-height: 190px;
    flex-direction: column;
    padding: 16px 14px 16px;
}

.service-tag {
    width: fit-content;
    margin-bottom: 10px;
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--accent);
    background: #eaf3ff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

h2 {
    margin: 0 0 5px;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0;
}

.location {
    margin: 0 0 10px;
    color: #5c5c5c;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.details {
    margin: 0 0 18px;
    color: #424242;
    font-size: 15px;
    line-height: 1.4;
}

.price {
    margin: auto 0 0;
    color: #595959;
    text-align: right;
    font-size: 15px;
}

.price strong {
    color: #1f1f1f;
    font-size: 21px;
}

.price {
    font-weight: 700;
}

.price:empty,
.preview-price:empty {
    display: none;
}

.preview {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.preview.is-open {
    pointer-events: auto;
    opacity: 1;
}

.preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(22, 31, 48, 0.42);
    backdrop-filter: blur(7px);
}

.preview-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(520px, 100%);
    max-height: min(680px, calc(100vh - 48px));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    padding: 22px;
    background: #ffffff;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.30);
    transform: scale(0.94) translateY(12px);
    transition: transform 0.18s ease;
}

.preview.is-open .preview-panel {
    transform: scale(1) translateY(0);
}

.preview-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #1f1f1f;
    background: #f1f4f8;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
}

.preview-close:hover {
    background: #e5edf7;
}

.preview-collage {
    width: calc(100% + 44px);
    height: 220px;
    display: grid;
    gap: 3px;
    margin: -22px -22px 18px;
    background: #d9d9d9;
}

.preview-collage[data-count="1"] {
    grid-template-columns: 1fr;
}

.preview-collage[data-count="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.preview-collage[data-count="3"] {
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: repeat(2, 1fr);
}

.preview-collage[data-count="3"] .preview-collage-item:first-child {
    grid-row: 1 / 3;
}

.preview-collage[data-count="4"] {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.preview-collage-item {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: #d9d9d9;
}

.preview-collage-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.preview-collage-more {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(16, 24, 32, 0.58);
    font-size: 34px;
    font-weight: 700;
}

.preview-category {
    width: fit-content;
    margin: 0 44px 12px 0;
    border-radius: 999px;
    padding: 6px 10px;
    color: #003b95;
    background: #eaf3ff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.preview-panel h2 {
    margin-right: 34px;
    font-size: 28px;
}

.preview-text {
    min-height: 120px;
    max-height: none;
    flex: 1;
    margin: 18px -8px 18px 0;
    padding-right: 10px;
    overflow-y: auto;
    color: #3f3f3f;
    font-size: 16px;
    line-height: 1.6;
}

.preview-text::-webkit-scrollbar {
    width: 10px;
}

.preview-text::-webkit-scrollbar-track {
    border-radius: 999px;
    background: #edf1f6;
}

.preview-text::-webkit-scrollbar-thumb {
    border: 2px solid #edf1f6;
    border-radius: 999px;
    background: #7aa7de;
}

.preview-price {
    margin: 0;
    color: var(--accent);
    text-align: right;
    font-size: 20px;
    font-weight: 700;
}

@media (max-width: 1050px) {
    .cards-row {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }
}

@media (max-width: 620px) {
    .page {
        width: 100%;
        padding-top: 20px;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .cards-row {
        grid-template-columns: 1fr;
    }

    .service-card {
        min-height: 410px;
    }

    .photo-wrap {
        height: 230px;
    }

    .next {
        right: 10px;
    }

    .preview {
        padding: 14px;
    }

    .preview-panel {
        padding: 18px;
    }

    .preview-collage {
        width: calc(100% + 36px);
        height: 190px;
        margin: -18px -18px 16px;
    }

    .preview-panel h2 {
        font-size: 24px;
    }

    .preview-text {
        min-height: 160px;
    }
}
