/*
 * Dachfenstermarkt.de - Dachfenster einbauen / austauschen (templates/page-dachfenster-montage.php)
 * Präfix dm-. Baut auf application.css des Parents auf (.section, .container, .btn, .section-title).
 * Tokens wie auf «Über uns»: Gilroy, #ff0083, #3a3a3a, #616161, #898989, #ededed, #f7f7f7,
 * Schatten 0 8px 50px rgba(0,0,0,.05); keine Border-Radien (Vorgabe Inhaber).
 */

.dm-main { color: #3a3a3a; }
.dm-main .section { padding: 72px 0; }
.dm-main .container { max-width: 100%; }
.dm-main p { margin: 0 0 16px; line-height: 1.6; }
.dm-main p:last-child { margin-bottom: 0; }

.dm-eyebrow {
    display: block;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #ff0083;
}
.dm-h1 {
    margin: 0 0 20px;
    font-family: Gilroy, sans-serif;
    font-size: 48px;
    line-height: 1.12;
    font-weight: 700;
}
.dm-h1__accent { color: #ff0083; }
.dm-h2 {
    margin: 0 0 18px;
    font-family: Gilroy, sans-serif;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
}
.dm-h3 {
    margin: 0 0 10px;
    font-family: Gilroy, sans-serif;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 600;
}
.dm-lead {
    max-width: 640px;
    font-size: 18px;
    line-height: 1.55;
    color: #616161;
}
.dm-intro {
    max-width: 720px;
    margin-bottom: 36px;
    color: #616161;
}
.dm-main .section-title { margin: 0 0 12px; }
.dm-muted { color: #898989; font-size: 14px; }
.dm-link { color: #ff0083; font-weight: 600; text-decoration: none; }
.dm-link:hover { text-decoration: underline; color: #ff0083; }

/* ---------- 01 Hero ---------- */
.dm-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 56px;
    align-items: center;
}
.dm-hero__media img {
    display: block;
    width: 100%;
    height: auto;
    box-shadow: 0 8px 50px rgba(0, 0, 0, .08);
}
.dm-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0 0;
}
.dm-btns .btn {
    padding: 13px 26px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 0;
}
.dm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}
.dm-chips li {
    position: relative;
    padding: 9px 14px 9px 30px;
    background: #f7f7f7;
    font-size: 14px;
    font-weight: 500;
}
.dm-chips li::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -4px;
    background: #ff0083;
}

/* ---------- 02 Formular ---------- */
.dm-request__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 40px;
    align-items: start;
}
.dm-form-card {
    padding: 40px;
    background: #fff;
    border: 1px solid #ededed;
    border-top: 3px solid #ff0083;
    box-shadow: 0 8px 50px rgba(0, 0, 0, .05);
}
.dm-form { display: block; }
.dm-form__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
    margin-bottom: 18px;
}
.dm-form__row--address { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.dm-form__row--street { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.dm-form__row--single { grid-template-columns: minmax(0, 1fr); }
.dm-field { display: block; min-width: 0; }
.dm-field__label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #3a3a3a;
}
.dm-field__label .req { color: #ff0083; }
.dm-form .dm-input {
    display: block;
    width: 100%;
    height: 46px;
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.4;
    color: #3a3a3a;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 0;
    box-shadow: none;
    transition: border-color .15s ease-in-out;
    -webkit-appearance: none;
    appearance: none;
}
.dm-form select.dm-input {
    padding-right: 40px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%233a3a3a' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
.dm-form textarea.dm-input { height: auto; min-height: 130px; resize: vertical; }
.dm-form .dm-input:focus { outline: 0; border-color: #ff0083; box-shadow: none; }
.dm-form .dm-input::placeholder { color: #a5a5a5; opacity: 1; }
.dm-field.is-invalid .dm-input { border-color: #d0021b; }
.dm-field__error {
    display: block;
    min-height: 0;
    margin-top: 5px;
    font-size: 13px;
    color: #d0021b;
}
.dm-field__error:empty { display: none; }
/* Hinweis statt Fehler (unbekannte PLZ, Ortsauswahl): gleicher Platz, andere Farbe. */
.dm-field.is-note .dm-field__error { color: #8a6d3b; }
.dm-field.is-note .dm-input { border-color: #e3b96b; }
.dm-field__hint { display: block; margin-top: 5px; font-size: 13px; color: #898989; }

/* Fotos */
.dm-photos { margin-bottom: 18px; }
.dm-photos__drop {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border: 1px dashed #c4c4c4;
    background: #fafafa;
}
.dm-photos__btn {
    display: inline-block;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #ff0083;
    background: #fff;
    border: 1px solid #ff0083;
    cursor: pointer;
}
.dm-photos__btn:hover { background: #ff0083; color: #fff; }
.dm-photos__btn input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}
.dm-photos__drop span { font-size: 13px; color: #898989; }
.dm-photo-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}
.dm-photo-list:empty { display: none; }
.dm-photo {
    position: relative;
    width: 96px;
}
.dm-photo img {
    display: block;
    width: 96px;
    height: 96px;
    object-fit: cover;
    border: 1px solid #ededed;
}
.dm-photo__name {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #898989;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dm-photo__remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    padding: 0;
    font-size: 16px;
    line-height: 22px;
    color: #fff;
    background: #3a3a3a;
    border: 0;
    cursor: pointer;
}
.dm-photo__remove:hover { background: #ff0083; }

/* Einwilligung, Honeypot, Absenden */
.dm-consent { margin: 4px 0 18px; }
.dm-consent label {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #616161;
    cursor: pointer;
}
.dm-consent input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 3px 0 0;
    accent-color: #ff0083;
}
.dm-consent a { color: #ff0083; text-decoration: underline; }
.dm-hp {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.dm-form__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
}
.dm-form__actions .btn {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 0;
}
.dm-form__actions .btn[disabled] { opacity: .6; cursor: wait; }
.dm-form__legal { flex: 1 1 260px; font-size: 12px; line-height: 1.5; color: #898989; }
.dm-form__legal a { color: #898989; text-decoration: underline; }
.dm-form__msg {
    margin: 0 0 18px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}
.dm-form__msg[hidden] { display: none; }
.dm-form__msg--error { background: #ffe5ec; color: #b3003a; }
.dm-form__msg--info { background: #f7f7f7; color: #616161; }
.dm-form__success { padding: 12px 0; }
.dm-form__success h3 {
    margin: 0 0 12px;
    font-family: Gilroy, sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #ff0083;
}
.dm-form__success p { font-size: 16px; line-height: 1.6; }
.grecaptcha-badge { visibility: hidden; }

/* Aside neben dem Formular */
.dm-aside { display: grid; gap: 20px; }
.dm-aside__box {
    padding: 28px;
    background: #fff;
    border: 1px solid #ededed;
}
.dm-aside__box--accent { background: #ff0083; color: #fff; border-color: #ff0083; }
.dm-aside__box--accent .dm-h3 { color: #fff; }
.dm-aside__box--accent a { color: #fff; text-decoration: underline; }
.dm-aside__list { margin: 0; padding: 0; list-style: none; }
.dm-aside__list li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.5;
}
.dm-aside__list li:last-child { margin-bottom: 0; }
.dm-aside__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background: #ff0083;
}
.dm-aside__box--accent .dm-aside__list li::before { background: #fff; }

/* ---------- 03 Ablauf ---------- */
.dm-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin: 36px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: dm-step;
}
.dm-step {
    padding: 28px;
    background: #fff;
    border: 1px solid #ededed;
    border-top: 3px solid #ff0083;
    box-shadow: 0 8px 50px rgba(0, 0, 0, .05);
}
.dm-step__num {
    display: block;
    margin-bottom: 14px;
    font-family: Gilroy, sans-serif;
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
    color: #ff0083;
}
.dm-step p { font-size: 15px; color: #616161; }

/* ---------- 04 Einbau / Austausch ---------- */
.dm-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 36px;
}
.dm-card {
    display: flex;
    flex-direction: column;
    padding: 32px 28px;
    background: #fff;
    border: 1px solid #ededed;
    border-top: 3px solid #ff0083;
    box-shadow: 0 8px 50px rgba(0, 0, 0, .05);
}
.dm-card .dm-h3 { font-size: 22px; margin-bottom: 14px; }
.dm-card__intro { color: #616161; }
.dm-main .list-check.dm-list { margin: 18px 0 24px; }
.dm-main .list-check.dm-list li {
    margin-bottom: 14px;
    padding-left: 31px;
    font-size: 16px;
    line-height: 1.55;
}
.dm-main .list-check.dm-list li:last-child { margin-bottom: 0; }
.dm-main .list-check.dm-list li strong { font-weight: 600; }
.dm-card__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 8px; }
.dm-card__cta .btn { border-radius: 0; padding: 12px 24px; font-weight: 600; }

/* ---------- 05 Warum wir ---------- */
.dm-why__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}
.dm-usps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.dm-usp {
    padding: 24px;
    background: #f7f7f7;
}
.dm-usp .dm-h3 { font-size: 18px; margin-bottom: 8px; }
.dm-usp p { font-size: 14px; color: #616161; }
.dm-rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-top: 28px;
    padding: 18px 22px;
    background: #f7f7f7;
}
.dm-rating__score {
    font-family: Gilroy, sans-serif;
    font-size: 30px;
    font-weight: 700;
    color: #ff0083;
}
.dm-rating__stars { color: #ffb400; font-size: 18px; letter-spacing: 2px; }
.dm-rating__text { font-size: 14px; color: #616161; }

/* ---------- 06 Angaben / Größentabelle ---------- */
.dm-info__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}
.dm-table-wrap { overflow-x: auto; }
.dm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
}
.dm-table th,
.dm-table td {
    padding: 9px 12px;
    text-align: left;
    border: 1px solid #ededed;
    white-space: nowrap;
}
.dm-table th { background: #f7f7f7; font-weight: 600; }
.dm-table td:first-child { font-weight: 600; }
.dm-table tr:hover td { background: #fffafc; }

/* ---------- 07 FAQ ---------- */
.dm-faq { max-width: 860px; margin-top: 28px; }
.dm-faq__item {
    margin-bottom: 14px;
    padding: 4px 22px;
    background: #fff;
    border: 1px solid #ededed;
}
.dm-faq__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    font-family: Gilroy, sans-serif;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}
.dm-faq__q::-webkit-details-marker { display: none; }
.dm-faq__icon {
    position: relative;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: 1px solid #bebebe;
}
.dm-faq__icon::before,
.dm-faq__icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 2px;
    margin: -1px 0 0 -7px;
    background: #3a3a3a;
    transition: transform .2s ease;
}
.dm-faq__icon::after { transform: rotate(90deg); }
.dm-faq__item[open] .dm-faq__icon::after { transform: rotate(0); }
.dm-faq__item[open] .dm-faq__icon { border-color: #ff0083; }
.dm-faq__a {
    padding: 0 0 18px;
    font-size: 16px;
    line-height: 1.6;
    color: #616161;
}

/* ---------- 08 CTA ---------- */
.dm-cta__inner {
    padding: 56px 48px;
    text-align: center;
    color: #fff;
    background: #ff0083;
}
.dm-cta__inner .dm-h2 { color: #fff; }
.dm-cta__inner p {
    max-width: 640px;
    margin: 0 auto 24px;
    font-size: 17px;
    color: rgba(255, 255, 255, .92);
}
.dm-cta__inner .btn { border-radius: 0; padding: 13px 28px; font-size: 16px; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
    .dm-h1 { font-size: 42px; }
    .dm-hero__grid { gap: 40px; }
    .dm-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dm-request__grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
    .dm-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dm-card:nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 991px) {
    .dm-main .section { padding: 52px 0; }
    .dm-hero__grid,
    .dm-request__grid,
    .dm-why__grid,
    .dm-info__grid,
    .dm-cards { grid-template-columns: minmax(0, 1fr); }
    .dm-hero__media { order: -1; }
    .dm-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dm-form-card { padding: 30px; }
}
@media (max-width: 767px) {
    .dm-h1 { font-size: 34px; }
    .dm-h2 { font-size: 26px; }
    .dm-lead { font-size: 17px; }
    .dm-aside { grid-template-columns: minmax(0, 1fr); }
    .dm-usps { grid-template-columns: minmax(0, 1fr); }
    .dm-steps { grid-template-columns: minmax(0, 1fr); }
    .dm-cta__inner { padding: 40px 24px; }
}
@media (max-width: 574px) {
    .dm-main .section { padding: 40px 0; }
    .dm-h1 { font-size: 30px; }
    .dm-form-card { padding: 22px 18px; }
    .dm-form__row,
    .dm-form__row--address,
    .dm-form__row--street { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .dm-card { padding: 26px 20px; }
    .dm-btns .btn,
    .dm-form__actions .btn { width: 100%; text-align: center; }
}
