/*
 * Feuerwehr Herrschaft – Unterseiten-System 0.3.0
 * Reusable editorial layouts for overview, organisation, infrastructure and vehicles.
 */

.fw-subpage-hero {
    position: relative;
    overflow: clip;
    margin: 0;
    padding-top: clamp(9rem, 14vw, 12rem);
    padding-bottom: clamp(3.5rem, 7vw, 6rem);
    background:
        radial-gradient(circle at 86% 24%, rgb(215 25 32 / 18%), transparent 26%),
        linear-gradient(118deg, var(--wp--preset--color--navy-deep), var(--wp--preset--color--navy));
    color: var(--wp--preset--color--surface);
}

.fw-subpage-hero::after {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgb(7 21 34 / 20%), transparent 58%);
    content: "";
}

.fw-subpage-hero__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 90rem;
    margin-inline: auto;
}

.fw-subpage-hero .fw-kicker {
    color: var(--wp--preset--color--off-white);
}

.fw-subpage-title {
    max-width: 14ch;
    margin: 0;
    color: var(--wp--preset--color--surface) !important;
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 0.94;
    letter-spacing: -0.05em;
}

.fw-subpage-content,
.fw-editorial-content {
    width: 100%;
    max-width: none;
    margin: 0;
}

.fw-editorial-section {
    margin: 0;
    padding-top: clamp(4rem, 8vw, 7rem);
    padding-bottom: clamp(4rem, 8vw, 7rem);
}

.fw-editorial-section--surface {
    background: var(--wp--preset--color--surface);
}

.fw-editorial-section--offwhite {
    background: var(--wp--preset--color--off-white);
}

.fw-editorial-section--navy {
    background: var(--wp--preset--color--navy);
    color: #dce5eb;
}

.fw-editorial-section--navy :where(h2, h3, h4) {
    color: var(--wp--preset--color--surface);
}

.fw-editorial-inner {
    width: 100%;
    max-width: 90rem;
    margin-inline: auto;
}

.fw-editorial-heading {
    max-width: 58rem;
    margin-bottom: clamp(2rem, 5vw, 4rem);
}

.fw-editorial-heading > :first-child {
    margin-top: 0;
}

.fw-editorial-heading > :last-child {
    margin-bottom: 0;
}

.fw-editorial-title {
    max-width: 15ch;
    margin: 0 0 1rem;
    font-size: clamp(2.35rem, 5.5vw, 5rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.fw-editorial-lead {
    max-width: 50rem;
    margin: 0;
    color: var(--wp--preset--color--muted);
    font-size: clamp(1.08rem, 2vw, 1.35rem);
    line-height: 1.6;
}

.fw-editorial-section--navy .fw-editorial-lead {
    color: #cbd6de;
}

/* Overview ------------------------------------------------------------- */
.fw-topic-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.fw-topic-card {
    position: relative;
    min-height: 18rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: var(--fw-radius-md);
    background: var(--wp--preset--color--surface);
    padding: clamp(1.5rem, 3vw, 2.25rem);
    transition: transform 200ms var(--fw-ease), box-shadow 200ms ease, border-color 200ms ease;
}

.fw-topic-card::before {
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--wp--preset--color--crimson);
    content: "";
}

.fw-topic-card:hover {
    border-color: #c6d0d7;
    box-shadow: var(--fw-shadow-card);
    transform: translateY(-4px);
}

.fw-topic-number {
    margin: 0 0 2.5rem;
    color: var(--wp--preset--color--crimson-dark);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.12em;
}

.fw-topic-card h3 {
    margin-top: 0;
    font-size: clamp(1.5rem, 3vw, 2.15rem);
}

.fw-topic-card p {
    color: var(--wp--preset--color--muted);
}

.fw-topic-card a {
    font-weight: 800;
    text-underline-offset: 0.2em;
}

.fw-place-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    margin-top: 2.5rem;
}

.fw-place-pill {
    margin: 0;
    border: 1px solid rgb(255 255 255 / 14%);
    border-radius: 999px;
    padding: 0.9rem 1rem;
    color: var(--wp--preset--color--surface);
    font-weight: 800;
    text-align: center;
}

/* Leadership ----------------------------------------------------------- */
.fw-leadership-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.fw-profile-card {
    overflow: hidden;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: var(--fw-radius-md);
    background: var(--wp--preset--color--surface);
    box-shadow: 0 16px 44px rgb(11 31 51 / 7%);
}

.fw-profile-photo {
    min-height: 23rem !important;
    background:
        radial-gradient(circle at 72% 22%, rgb(215 25 32 / 20%), transparent 24%),
        linear-gradient(145deg, #16334d, var(--wp--preset--color--navy-deep));
}

.fw-profile-photo .wp-block-cover__image-background {
    object-fit: cover;
}

.fw-profile-photo .wp-block-cover__inner-container {
    align-self: end;
    width: 100%;
    padding: 1.25rem;
}

.fw-placeholder-label {
    display: inline-flex;
    margin: 0;
    border: 1px solid rgb(255 255 255 / 32%);
    border-radius: 999px;
    background: rgb(7 21 34 / 68%);
    padding: 0.45rem 0.7rem;
    color: var(--wp--preset--color--surface);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fw-profile-copy {
    padding: 1.5rem;
}

.fw-profile-role {
    margin: 0 0 0.35rem;
    color: var(--wp--preset--color--crimson-dark);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fw-profile-name {
    margin: 0 0 0.8rem;
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.fw-profile-copy p:last-child {
    margin-bottom: 0;
    color: var(--wp--preset--color--muted);
}

/* Infrastructure ------------------------------------------------------- */
.fw-station-list {
    display: grid;
    gap: clamp(2rem, 6vw, 5rem);
}

.fw-station-row {
    display: grid;
    grid-template-areas: "media" "copy";
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: var(--fw-radius-lg);
    background: var(--wp--preset--color--surface);
    box-shadow: var(--fw-shadow-card);
}

.fw-station-media {
    grid-area: media;
    min-height: 22rem !important;
    display: flex;
    align-items: flex-end;
    background:
        radial-gradient(circle at 78% 28%, rgb(215 25 32 / 18%), transparent 28%),
        linear-gradient(140deg, #1b405d, var(--wp--preset--color--navy-deep));
    padding: 1.25rem;
}

.fw-station-media .wp-block-cover__image-background {
    object-fit: cover;
}

.fw-station-media .wp-block-cover__inner-container {
    align-self: end;
    width: 100%;
}

.fw-station-copy {
    grid-area: copy;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.75rem, 4vw, 3.5rem);
}

.fw-station-copy h2 {
    margin: 0 0 1rem;
    font-size: clamp(2.25rem, 5vw, 4.25rem);
    letter-spacing: -0.04em;
}

.fw-station-copy > p {
    max-width: 42rem;
    color: var(--wp--preset--color--muted);
}

.fw-map-placeholder {
    position: relative;
    min-height: 12rem;
    overflow: hidden;
    margin-top: 1.5rem;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: var(--fw-radius-sm);
    background:
        linear-gradient(30deg, transparent 24%, rgb(11 31 51 / 8%) 25%, rgb(11 31 51 / 8%) 26%, transparent 27%, transparent 74%, rgb(11 31 51 / 8%) 75%, rgb(11 31 51 / 8%) 76%, transparent 77%),
        linear-gradient(120deg, transparent 24%, rgb(11 31 51 / 8%) 25%, rgb(11 31 51 / 8%) 26%, transparent 27%, transparent 74%, rgb(11 31 51 / 8%) 75%, rgb(11 31 51 / 8%) 76%, transparent 77%),
        #eef2f4;
    background-size: 3.25rem 3.25rem;
    padding: 1.25rem;
}

.fw-map-placeholder::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    border: 0.28rem solid var(--wp--preset--color--surface);
    border-radius: 50% 50% 50% 0;
    background: var(--wp--preset--color--crimson);
    box-shadow: 0 8px 24px rgb(11 31 51 / 22%);
    content: "";
    transform: translate(-50%, -65%) rotate(-45deg);
}

.fw-map-placeholder p {
    position: relative;
    z-index: 1;
    max-width: 13rem;
    margin: 0;
    border-radius: var(--fw-radius-sm);
    background: rgb(255 255 255 / 88%);
    padding: 0.7rem;
    color: var(--wp--preset--color--navy);
    font-size: 0.82rem;
    font-weight: 700;
}

/* Vehicles ------------------------------------------------------------- */
.fw-draft-badge {
    display: inline-flex;
    margin: 0 0 1rem;
    border-radius: 999px;
    background: #fff1f1;
    padding: 0.4rem 0.65rem;
    color: var(--wp--preset--color--crimson-dark);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fw-vehicle-showcase {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
    border-radius: var(--fw-radius-lg);
    background: var(--wp--preset--color--navy-deep);
    color: #dce5eb;
    box-shadow: var(--fw-shadow-card);
}

.fw-vehicle-placeholder {
    position: relative;
    min-height: 24rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 68% 36%, rgb(215 25 32 / 30%), transparent 25%),
        linear-gradient(145deg, #173c59, var(--wp--preset--color--navy-deep));
}

.fw-vehicle-placeholder::before {
    position: absolute;
    top: 29%;
    right: 10%;
    width: 70%;
    height: 36%;
    border: 2px solid rgb(255 255 255 / 30%);
    border-radius: 1.3rem 2.6rem 0.9rem 0.9rem;
    background: rgb(255 255 255 / 4%);
    box-shadow:
        -2.3rem 7.1rem 0 -1.55rem rgb(255 255 255 / 28%),
        14.5rem 7.1rem 0 -1.55rem rgb(255 255 255 / 28%);
    content: "";
    transform: skewX(-6deg);
}

.fw-vehicle-code {
    position: absolute;
    right: 1.25rem;
    bottom: 0.35rem;
    margin: 0;
    color: rgb(255 255 255 / 8%);
    font-size: clamp(6rem, 20vw, 12rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.08em;
}

.fw-vehicle-showcase__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem);
}

.fw-vehicle-showcase__copy :where(h2, h3) {
    color: var(--wp--preset--color--surface);
}

.fw-vehicle-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.fw-vehicle-tag {
    margin: 0;
    border: 1px solid rgb(255 255 255 / 18%);
    border-radius: 999px;
    padding: 0.45rem 0.7rem;
    color: #dce5eb;
    font-size: 0.8rem;
    font-weight: 750;
}

.fw-vehicle-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.fw-vehicle-card {
    overflow: hidden;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: var(--fw-radius-md);
    background: var(--wp--preset--color--surface);
}

.fw-vehicle-card__visual {
    position: relative;
    min-height: 14rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 76% 28%, rgb(215 25 32 / 18%), transparent 28%),
        linear-gradient(140deg, #1a3e5b, var(--wp--preset--color--navy-deep));
}

.fw-vehicle-card__visual::before {
    position: absolute;
    top: 34%;
    left: 17%;
    width: 66%;
    height: 28%;
    border: 1px solid rgb(255 255 255 / 30%);
    border-radius: 0.8rem 1.7rem 0.6rem 0.6rem;
    background: rgb(255 255 255 / 5%);
    content: "";
    transform: skewX(-6deg);
}

.fw-vehicle-card__copy {
    padding: 1.5rem;
}

.fw-vehicle-card__copy h3 {
    margin-top: 0;
}

.fw-vehicle-card__copy p:last-child {
    margin-bottom: 0;
    color: var(--wp--preset--color--muted);
}

/* Closing CTA ---------------------------------------------------------- */
.fw-editorial-cta {
    overflow: hidden;
    border-radius: var(--fw-radius-lg);
    background:
        radial-gradient(circle at 90% 16%, rgb(215 25 32 / 22%), transparent 28%),
        var(--wp--preset--color--navy-deep);
    padding: clamp(2rem, 6vw, 5rem);
    color: #dce5eb;
}

.fw-editorial-cta :where(h2, h3) {
    color: var(--wp--preset--color--surface);
}

@media (min-width: 48rem) {
    .fw-topic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fw-place-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .fw-leadership-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .fw-station-row {
        grid-template-areas: "media copy";
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        min-height: 34rem;
    }

    .fw-station-row--reverse {
        grid-template-areas: "copy media";
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    }

    .fw-station-media {
        min-height: 100% !important;
    }

    .fw-vehicle-showcase {
        grid-template-columns: minmax(0, 1.2fr) minmax(20rem, 0.8fr);
    }

    .fw-vehicle-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 70rem) {
    .fw-topic-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .fw-topic-card {
        transition: none;
    }
}


/* Infrastructure – privacy-preserving swisstopo station maps ----------- */
.fw-station-map{
    margin-top:1.5rem;
    overflow:hidden;
    border:1px solid var(--wp--preset--color--border);
    border-radius:var(--fw-radius-sm);
    background:var(--wp--preset--color--surface);
}
.fw-station-map__preview{
    position:relative;
    min-height:15rem;
    aspect-ratio:16/10;
    overflow:hidden;
    background:
        radial-gradient(circle at 50% 45%,rgb(215 25 32 / 12%),transparent 24%),
        linear-gradient(30deg,transparent 24%,rgb(11 31 51 / 8%) 25%,rgb(11 31 51 / 8%) 26%,transparent 27%,transparent 74%,rgb(11 31 51 / 8%) 75%,rgb(11 31 51 / 8%) 76%,transparent 77%),
        linear-gradient(120deg,transparent 24%,rgb(11 31 51 / 8%) 25%,rgb(11 31 51 / 8%) 26%,transparent 27%,transparent 74%,rgb(11 31 51 / 8%) 75%,rgb(11 31 51 / 8%) 76%,transparent 77%),
        #eef2f4;
    background-size:auto,3.25rem 3.25rem,3.25rem 3.25rem,auto;
}
.fw-station-map__preview-image{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    pointer-events:none;
}
.fw-station-map__marker{
    position:absolute;
    top:50%;
    left:50%;
    z-index:2;
    width:1.7rem;
    height:2.15rem;
    pointer-events:none;
    transform:translate(-50%,-100%);
    filter:drop-shadow(0 .3rem .45rem rgb(11 31 51 / 28%));
}
.fw-station-map__marker::before{
    position:absolute;
    top:0;
    left:50%;
    width:1.35rem;
    height:1.35rem;
    border:.2rem solid #fff;
    border-radius:50%;
    background:var(--wp--preset--color--crimson);
    content:"";
    transform:translateX(-50%);
}
.fw-station-map__marker::after{
    position:absolute;
    bottom:.05rem;
    left:50%;
    width:0;
    height:0;
    border-right:.38rem solid transparent;
    border-left:.38rem solid transparent;
    border-top:.8rem solid var(--wp--preset--color--crimson);
    content:"";
    transform:translateX(-50%);
}
.fw-station-map__load{
    position:absolute;
    left:1.25rem;
    bottom:1.25rem;
    z-index:3;
    max-width:calc(100% - 2.5rem);
    min-height:2.6rem;
    border:0;
    border-radius:999px;
    background:var(--wp--preset--color--crimson);
    color:#fff;
    cursor:pointer;
    font:inherit;
    font-size:.88rem;
    font-weight:800;
    line-height:1.2;
    padding:.65rem 1rem;
    text-align:left;
}
.fw-station-map__load:hover{
    background:var(--wp--preset--color--crimson-dark);
}
.fw-station-map__load:focus-visible,
.fw-station-map__footer a:focus-visible{
    outline:3px solid var(--wp--preset--color--crimson);
    outline-offset:3px;
}
.fw-station-map__privacy{
    margin:0;
    border-top:1px solid var(--wp--preset--color--border);
    background:var(--wp--preset--color--surface);
    padding:.65rem 1rem;
    color:var(--wp--preset--color--muted);
    font-size:.78rem;
    line-height:1.45;
}
.fw-station-map__frame{
    display:block;
    width:100%;
    min-height:18rem;
    aspect-ratio:16/10;
    border:0;
    background:#eef2f4;
}
.fw-station-map__footer{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1rem;
    border-top:1px solid var(--wp--preset--color--border);
    padding:.75rem 1rem;
    color:var(--wp--preset--color--muted);
    font-size:.78rem;
}
.fw-station-map__footer a{
    color:var(--wp--preset--color--crimson-dark);
    font-weight:800;
    text-underline-offset:.18em;
}
@media(max-width:30rem){
    .fw-station-map__preview{min-height:13rem}
    .fw-station-map__load{left:1rem;bottom:1rem;max-width:calc(100% - 2rem)}
    .fw-station-map__frame{min-height:15rem}
    .fw-station-map__footer{align-items:flex-start;flex-direction:column;gap:.45rem}
}
