/*
 * Core blocks in page content: the look of the old .page-content markup, rebuilt for block markup.
 *
 * Loaded on the front end and, via add_editor_style(), in the block editor. The editor does not prefix
 * selectors that already contain .editor-styles-wrapper, so :where(.page-content, .editor-styles-wrapper)
 * targets the content area in both places without adding specificity. That keeps block supports such as
 * text alignment (.has-text-align-*) able to override these defaults.
 */

.page-content {
    margin-top: 48px;
    /* Full-width blocks (e.g. the Kartonrechner) use 100vw, which would otherwise add a horizontal scrollbar. */
    overflow-x: clip;
}

/* ---------- Text ---------- */

:where(.page-content, .editor-styles-wrapper) h2 {
    text-align: center;
    margin: 96px 0 36px;
}
:where(.page-content, .editor-styles-wrapper) h4 {
    text-align: center;
    margin-bottom: 48px;
}
/* A heading directly followed by a highlighted subheading (formerly .firmenumzug h4). */
:where(.page-content, .editor-styles-wrapper) h4:has(+ h4.is-style-accent) {
    margin-bottom: 24px;
}
:where(.page-content, .editor-styles-wrapper) p {
    text-align: left;
    text-indent: 2em;
}

/* Paragraph style "Einleitung": centered intro text (formerly .page-content__text, a div in the body font). */
:where(.page-content, .editor-styles-wrapper) p.is-style-lead {
    font-family: inherit;
    font-size: 20px;
    text-align: center;
    text-indent: 0;
    margin-bottom: 28px;
    text-wrap: balance;
}

/* Paragraph and heading style "Hervorgehoben" (formerly .blue). */
.is-style-accent {
    color: var(--main-blue);
    font-weight: 600;
}

/* Text color set inline in the editor; reset.css would render <mark> yellow, bold and italic. */
mark.has-inline-color {
    background-color: transparent;
    font-style: inherit;
    font-weight: inherit;
}

/* ---------- Lists ---------- */

:where(.page-content, .editor-styles-wrapper) ul.wp-block-list {
    margin-top: 16px;
    margin-bottom: 24px;
}
:where(.page-content, .editor-styles-wrapper) ul.wp-block-list > li {
    position: relative;
    margin-bottom: 16px;
    padding-left: 70px;
}
:where(.page-content, .editor-styles-wrapper) ul.wp-block-list > li::before {
    position: absolute;
    content: '';
    width: 45px;
    height: 25px;
    background-image: url(../img/decor-right-blue.svg);
    background-size: contain;
    background-repeat: no-repeat;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* List style "Große Aufzählung" (formerly .page-marker). */
:where(.page-content, .editor-styles-wrapper) ul.is-style-marker > li {
    padding-left: 90px;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* ---------- Media & Text (formerly .page-item and .page-big-item) ---------- */

:where(.page-content, .editor-styles-wrapper) .wp-block-media-text {
    margin-bottom: 30px;
}
:where(.page-content, .editor-styles-wrapper) .wp-block-media-text > .wp-block-media-text__content {
    padding: 0 12px;
}
:where(.page-content, .editor-styles-wrapper) .wp-block-media-text > .wp-block-media-text__media img {
    border-radius: 45px 0;
    max-height: 328px;
    object-fit: cover;
}
:where(.page-content, .editor-styles-wrapper) .wp-block-media-text.is-image-fill-element > .wp-block-media-text__media {
    border-radius: 45px 0;
    overflow: hidden;
}
:where(.page-content, .editor-styles-wrapper) .wp-block-media-text.is-image-fill-element > .wp-block-media-text__media img {
    max-height: none;
}

/* Stack like the old Bootstrap columns: below 768px, text first; image-fill rows show the image first. */
@media (max-width: 767.98px) {
    :where(.page-content, .editor-styles-wrapper) .wp-block-media-text.is-stacked-on-mobile {
        grid-template-columns: 100% !important;
    }
    :where(.page-content, .editor-styles-wrapper) .wp-block-media-text.is-stacked-on-mobile > .wp-block-media-text__content {
        grid-column: 1;
        grid-row: 1;
    }
    :where(.page-content, .editor-styles-wrapper) .wp-block-media-text.is-stacked-on-mobile > .wp-block-media-text__media {
        grid-column: 1;
        grid-row: 2;
    }
    :where(.page-content, .editor-styles-wrapper) .wp-block-media-text.is-stacked-on-mobile.is-image-fill-element > .wp-block-media-text__media {
        grid-row: 1;
        margin-bottom: 20px;
    }
    :where(.page-content, .editor-styles-wrapper) .wp-block-media-text.is-stacked-on-mobile.is-image-fill-element > .wp-block-media-text__content {
        grid-row: 2;
    }
}

/* ---------- Alignment classes (core expects classic themes to provide them) ---------- */

.aligncenter {
    margin-left: auto;
    margin-right: auto;
}
.alignleft {
    float: left;
    margin-right: 1.5em;
}
.alignright {
    float: right;
    margin-left: 1.5em;
}

/* ---------- Buttons (formerly .btn-fill / .btn-str) ---------- */

.wp-block-button .wp-block-button__link {
    display: inline-block;
    background-color: var(--main-blue);
    color: #fff;
    text-transform: uppercase;
    text-indent: 0;
    padding: 5px 15px;
    font-family: "Poppins", sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.5;
    border: none;
    border-radius: 5px;
    transition: all 0.3s;
}
.wp-block-button.is-style-outline > .wp-block-button__link {
    background-color: transparent;
    color: inherit;
    border: 1px solid var(--main-blue);
}
@media (hover: hover) {
    .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover {
        background-color: var(--blue-light);
        color: #fff;
    }
}

/* Centered call to action at the end of a page (synced pattern "Umzugsanfrage-Button"). */
.wp-block-buttons.page-btn {
    margin: 40px auto 78px;
}

/* ---------- Theme blocks ---------- */

/* Karte (Google Maps): placeholder until the visitor loads the map. */
.map-consent {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--map-height, 330px);
    padding: 24px;
    background-color: #e8edf2;
    text-align: center;
}
.map-consent.is-loaded {
    display: block;
    padding: 0;
}
.map-consent iframe {
    display: block;
    width: 100%;
    height: var(--map-height, 330px);
    border: 0;
}
.map-consent .map-consent__text {
    max-width: 420px;
    margin: 0 auto 16px;
    font-size: 15px;
    text-align: center;
    text-indent: 0;
}
.map-consent__button {
    display: inline-block;
    background-color: var(--main-blue);
    color: #fff;
    text-transform: uppercase;
    padding: 5px 15px;
    font-family: "Poppins", sans-serif;
    font-size: 18px;
    font-weight: 500;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}
@media (hover: hover) {
    .map-consent__button:hover {
        background-color: var(--blue-light);
    }
}

/* Kontaktdaten: centered like the old contact page. */
.contact-details {
    margin-bottom: 24px;
}
.contact-details p {
    text-align: center;
    text-indent: 0;
}

/* Preistabelle: yellow panel with a large star in the background and white price cards. */
.price-table {
    padding: clamp(32px, 5vw, 64px) 0;
}
/* Inside page content the block already sits in a container. */
.container .price-table .container {
    padding: 0;
}
.price-table__panel {
    position: relative;
    overflow: hidden;
    padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 48px) clamp(32px, 5vw, 64px);
    border-radius: clamp(20px, 3vw, 36px);
    background: linear-gradient(160deg, #fed83a 0%, var(--main-yellow) 45%, #f3b900 100%);
}
.price-table__panel::before {
    position: absolute;
    content: '';
    width: min(620px, 90%);
    aspect-ratio: 1;
    right: -6%;
    top: 50%;
    transform: translateY(-50%) rotate(-12deg);
    background-color: rgba(255, 255, 255, 0.18);
    -webkit-mask: url(../img/icons/star.svg) center / contain no-repeat;
    mask: url(../img/icons/star.svg) center / contain no-repeat;
    pointer-events: none;
}
.price-table .price-table__title {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 clamp(24px, 3vw, 40px);
    text-align: left;
    color: #000;
}
.price-table__title::before {
    content: '';
    flex-shrink: 0;
    width: 1.3em;
    height: 1.3em;
    background-color: #000;
    -webkit-mask: url(../img/icons/star.svg) center / contain no-repeat;
    mask: url(../img/icons/star.svg) center / contain no-repeat;
}
.price-table__cards {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: clamp(16px, 3vw, 40px);
    align-items: start;
}

.price-card {
    padding: 28px 18px 22px;
    border-radius: 24px;
    background-color: #fff;
    box-shadow: 0 0 0 1px #dfe6ef, 0 14px 30px rgba(120, 85, 0, 0.18);
    font-family: "Poppins", sans-serif;
    font-size: 15px;
    line-height: 1.4;
    color: #222;
}
.price-card__crew {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    min-height: 28px;
    margin: 0 0 22px 6px;
}
.price-card__person,
.price-card__truck {
    display: block;
    background-repeat: no-repeat;
    background-size: contain;
}
.price-card__person {
    width: 16px;
    height: 28px;
    background-image: url(../img/icons/person.svg);
}
.price-card__truck {
    width: 42px;
    height: 28px;
    background-image: url(../img/icons/truck.svg);
}
.price-card__plus {
    margin: 0 6px;
    font-size: 28px;
    font-weight: 500;
    line-height: 1;
    color: #000;
}
.price-card__vehicle {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: #e8f5eb;
    color: #1f3b29;
    font-size: 14px;
}
.price-card .price-card__note {
    margin: 18px 0 16px;
    font-size: 15px;
    text-align: left;
    text-indent: 0;
    color: #8a94a6;
}
.price-card ul.price-card__rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 22px;
}
.price-card .price-card__row {
    position: relative;
    padding: 7px 20px;
    border: 1px solid #d6dce4;
    border-radius: 8px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.05);
    color: #8a94a6;
}
.price-card__row strong {
    font-weight: 600;
    color: #000;
}
.price-card__extra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.price-card__extra-price {
    flex-shrink: 0;
    padding: 12px 14px;
    border-radius: 8px;
    background-color: #e8eff8;
    color: var(--main-blue);
    white-space: nowrap;
}
/* Editor only: remove and add buttons of the price rows. */
.price-card .price-card__remove {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    opacity: 0;
}
.price-card__row:hover .price-card__remove,
.price-card .price-card__remove:focus {
    opacity: 1;
}
.price-card .price-card__add {
    margin: -8px 0 22px;
}
