:root {
    --overlay-bg: rgba(0, 0, 0, 0.55);
    --accent: #fff;
    --price-text: "Alates €5"; /* change this value in the CSS or via JS */
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

html, body {
    height: 100%;
    margin: 0;
}

/* 2x2 grid filling the viewport */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    height: 100vh;
    width: 100vw;
}

figure {
    margin: 0;
}

.tile {
    position: relative;
    overflow: hidden;
}

.tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    vertical-align: middle;
}

/* center overlay */
.center-overlay {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--overlay-bg);
    color: var(--accent);
    padding: 1.2rem 1.6rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10;
    min-width: 260px;
}

.center-overlay .phone {
    font-size: 1.9rem;
    font-weight: 800;
    text-decoration: none;
    color: inherit;
    display: inline-block;
    margin: 0.1rem 0;
}

.small {
    font-size: 0.95rem;
    opacity: 0.95;
    margin-top: 6px;
}

.price {
    font-size: 1.05rem;
    margin-top: 8px;
    font-weight: 600;
}

/* accessibility focus styles */
.phone:focus {
    outline: 3px solid rgba(255, 255, 255, 0.2);
    outline-offset: 3px
}

/* responsive tweaks */
@media (max-width: 700px) {
    .center-overlay {
        min-width: 220px;
        padding: 1rem
    }

    .center-overlay .phone {
        font-size: 1.4rem
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0
}

/* ===== Rates table (center overlay) ===== */
.rates {
    margin-top: 10px;
    text-align: center;
    width: 100%;
}

.rates-title {
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 0.95rem;
    color: inherit;
}

/* Table container: constrained width so it fits nicely in the overlay */
.rates-table {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    border-collapse: collapse;
    background: transparent; /* inherits overlay color */
    color: inherit;
    font-size: 0.95rem;
}

/* Header */
.rates-table thead th {
    text-align: left;
    font-weight: 700;
    padding: 8px 10px;
    font-size: 0.9rem;
    opacity: 0.95;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Cells */
.rates-table td,
.rates-table th {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Right align numeric cells */
.rates-table .numeric {
    text-align: right;
    white-space: nowrap;
}

/* Zebra rows for easier scanning */
.rates-table tbody tr:nth-child(even) {
    background: rgba(255,255,255,0.02);
}

/* Small devices: transform table into stacked blocks (mobile friendly) */
@media (max-width: 420px) {
    .rates-table {
        max-width: 100%;
    }

    /* hide header (we will show labels via data-label on each cell) */
    .rates-table thead {
        display: none;
    }

    .rates-table, .rates-table tbody, .rates-table tr {
        display: block;
        width: 100%;
    }

    .rates-table tr {
        margin-bottom: 10px;
        border-radius: 8px;
        padding: 8px;
        background: rgba(255,255,255,0.02);
    }

    .rates-table td {
        display: flex;
        justify-content: space-between;
        padding: 8px 10px;
        border: none;
        border-bottom: 1px solid rgba(255,255,255,0.04);
    }

    /* label before the value comes from the data-label attribute */
    .rates-table td::before {
        content: attr(data-label);
        font-weight: 700;
        margin-right: 8px;
        opacity: 0.9;
        flex: 0 0 auto;
    }

    .rates-table td.numeric {
        text-align: right;
    }
}

/* Ensure sr-only helper exists (in case it's not already in your CSS) */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}