/* =========================================
   CNC-FRAESEN UEBERSICHT (cnc-router.html)
   =========================================
   Aufbau wie die "CNC Router"-Seite auf sign-cnc.com: Banner, Brotkrumen,
   links die Baureihen, rechts die Produktkacheln (9 je Seite). Filter,
   Seiten und Anfrageliste: js/cnc-router.js. Ohne JavaScript stehen alle
   Maschinen untereinander und jede Kachel fuehrt direkt zur Anfrage. */

.cr-page { --cr-accent: #0073d6; --cr-line: rgba(105, 105, 105, 0.22); --cr-soft: #f8f9f9; }

/* ---------- Banner ---------- */
/* Foto fuellt den Banner; links ist es dunkel und traegt den Text. */
.cr-banner {
    position: relative;
    overflow: hidden;
    background: #0b1420;
    color: #fff;
}
.cr-banner-foto {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
}
/* Banner flacher als das Foto (30 % der Breite statt 37,5 %): Das Foto
   fuellt immer die volle Breite und wird nie vergroessert, beschnitten wird
   nur oben und unten im dunklen Hallenbereich. Spindel und Tisch bleiben
   durch object-position im Bild. */
@media (min-width: 1200px) {
    .cr-banner { display: flex; align-items: center; min-height: clamp(420px, 30vw, 560px); }
    .cr-banner-foto { object-position: center 62%; }
    .cr-banner-grid { width: 100%; padding-top: 2rem; padding-bottom: 2rem; }
}
/* Schmaler passt der Text nicht neben die Maschine: Foto oben, Text darunter. */
@media (max-width: 1199px) {
    .cr-banner-foto { position: static; display: block; height: auto; aspect-ratio: 2048 / 768; }
    .cr-banner::after { content: none; }
    .cr-banner-grid { grid-template-columns: 1fr; padding-top: 2.5rem; padding-bottom: 3rem; }
}
.cr-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 15, 24, 0.55) 0%, rgba(8, 15, 24, 0.25) 38%, rgba(8, 15, 24, 0) 60%);
    pointer-events: none;
}
.cr-banner-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 580px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(1.5rem, 4vw, 4rem);
    min-height: 0;
    padding-top: clamp(2.5rem, 4vw, 3.5rem);
    padding-bottom: clamp(2.5rem, 4vw, 3.5rem);
}
.cr-banner-eyebrow {
    margin: 0 0 1rem;
    color: #7cc0ff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
/* Kraeftige Banner-Typografie wie auf sign-cnc.com: schwerster Schnitt, Versalien. */
.cr-banner h1 {
    margin: 0 0 0.9rem;
    color: #fff;
    font: 900 clamp(2.6rem, 4.4vw, 4.4rem)/0.98 var(--font-family-heading);
    letter-spacing: -0.015em;
    text-transform: uppercase;
}
.cr-banner h1 span { display: block; max-width: 24ch; margin-top: 0.7rem; color: #8fc9ff; font-size: 0.4em; font-weight: 900; letter-spacing: 0.01em; line-height: 1.2; }
.cr-banner-text { max-width: 520px; margin: 0 0 1.5rem; color: #c9d6e0; font-size: 1rem; line-height: 1.6; }
.cr-banner-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cr-banner-actions .btn-outline { color: #fff; border: 1px solid rgba(255, 255, 255, 0.55); }
.cr-banner-actions .btn-outline:hover { background: #fff; color: var(--color-primary); }

/* ---------- Brotkrumen ---------- */
.cr-crumb { background: #f3f4f5; border-bottom: 1px solid #e8eaec; }
.cr-crumb nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 14px; padding-bottom: 14px; color: #777; font-size: 0.875rem; }
.cr-crumb a { color: #777; text-decoration: none; }
.cr-crumb a:hover { color: var(--cr-accent); }
.cr-crumb [aria-current] { color: var(--cr-accent); }

/* ---------- Liste ---------- */
.cr-liste { padding: 36px 0 93px; background: #fff; }
.cr-liste-grid {
    display: grid;
    grid-template-columns: minmax(220px, 20.7%) minmax(0, 1fr);
    gap: 4.6%;
    align-items: start;
}
/* Sonst dehnt die waagerecht scrollende Baureihen-Leiste (Handy) die Spalte auf. */
.cr-liste-grid > * { min-width: 0; }

/* Baureihen links */
.cr-serien { position: sticky; top: 100px; }
.cr-serien-titel {
    margin: 0 0 15px;
    padding-bottom: 21px;
    border-bottom: 1px solid var(--cr-line);
    color: #333;
    font: 700 1.5rem/1.2 var(--font-family-heading);
    text-transform: uppercase;
}
.cr-serien ul { margin: 0; padding: 0; list-style: none; }
.cr-serien a {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 17px 17px;
    border-bottom: 1px solid var(--cr-line);
    color: #333;
    font-size: 1rem;
    text-decoration: none;
    transition: background-color 200ms ease, color 200ms ease;
}
.cr-serien a::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--cr-accent);
    opacity: 0;
    transition: opacity 200ms ease;
}
.cr-serien a:hover,
.cr-serien a[aria-current="true"] { background: rgba(105, 105, 105, 0.08); color: var(--cr-accent); }
.cr-serien a:hover::after,
.cr-serien a[aria-current="true"]::after { opacity: 1; }

/* Kopf ueber den Kacheln */
.cr-kopf { margin: 0 0 45px; padding-top: 2px; }
.cr-kopf h2 { margin: 0 0 8px; color: #333; font: 700 1.25rem/1.3 var(--font-family-heading); }
.cr-kopf p { max-width: 760px; margin: 0; color: #666; font-size: 1rem; line-height: 1.6; }

/* Kacheln */
.cr-wrap {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 0.8%;
    row-gap: 57px;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
}
.cr-karte {
    position: relative;
    padding-top: 32px;
    transition: background-color 300ms ease, box-shadow 300ms ease;
}
.cr-karte[hidden] { display: none; }
.cr-karte:hover,
.cr-karte:focus-within { background: var(--cr-soft); box-shadow: 3px 5px 18px 0 rgba(0, 0, 0, 0.18); }

/* Namensband oben rechts, erscheint beim Ueberfahren wie bei sign-cnc. */
.cr-band {
    position: absolute;
    top: 8px;
    right: -8px;
    z-index: 2;
    max-width: 75%;
    padding: 8px 22px 8px 30px;
    background: var(--cr-accent);
    color: #fff;
    font: 700 0.95rem/1.2 var(--font-family-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%);
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 300ms ease, transform 300ms ease;
    pointer-events: none;
}
.cr-band::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -8px;
    border-top: 8px solid #00468a;
    border-right: 8px solid transparent;
}
.cr-karte:hover .cr-band,
.cr-karte:focus-within .cr-band { opacity: 1; transform: none; }

.cr-bild {
    display: block;
    margin: 0;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    background: linear-gradient(180deg, #ffffff 0%, #f3f4f5 100%);
}
.cr-bild img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform 300ms ease; }
.cr-karte:hover .cr-bild img { transform: scale(1.05); }

.cr-inhalt { padding: 31px 15px 29px; }
.cr-inhalt h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cr-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    min-height: 72px;
    margin: 0 0 15px;
    color: #333;
    font-size: 1rem;
    line-height: 1.5;
}
.cr-text strong { font-weight: 700; }

.cr-aktion { display: flex; align-items: center; gap: 10px; }
.cr-anfrage {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    height: 37px;
    padding: 0 16px;
    border: 1px solid var(--cr-accent);
    background: #fff;
    color: var(--cr-accent);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 200ms ease, color 200ms ease;
}
.cr-anfrage:hover,
.cr-anfrage:focus-visible { background: var(--cr-accent); color: #fff; }

/* Seiten und Anfrageliste */
.cr-fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 18px; }
.cr-seiten { display: flex; align-items: center; gap: 4px; }
.cr-seiten button {
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    border: 0;
    background: none;
    color: #999;
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}
.cr-seiten button:hover { color: var(--cr-accent); }
.cr-seiten button[aria-current="true"] { background: var(--cr-accent); color: #fff; }
.cr-seiten button:disabled { opacity: 0.35; cursor: default; }

/* ---------- Schmalere Fenster ---------- */
@media (max-width: 1199px) {
    .cr-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2%; }
}

@media (max-width: 900px) {
    .cr-banner-grid { padding-top: 2rem; padding-bottom: 2.5rem; }
    .cr-liste { padding-top: 24px; padding-bottom: 64px; }
    .cr-liste-grid { grid-template-columns: 1fr; gap: 28px; }
    .cr-serien { position: static; }
    .cr-serien-titel { margin-bottom: 12px; padding-bottom: 12px; font-size: 1.15rem; }
    /* Baureihen als waagerecht scrollende Leiste */
    .cr-serien ul { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
    .cr-serien a { flex: 0 0 auto; padding: 9px 14px; border: 1px solid var(--cr-line); white-space: nowrap; }
    .cr-serien a::after { content: none; }
    .cr-serien a[aria-current="true"] { border-color: var(--cr-accent); }
    .cr-kopf { margin-bottom: 24px; }
}

@media (max-width: 600px) {
    .cr-wrap { grid-template-columns: 1fr; row-gap: 28px; }
    .cr-karte { padding-top: 16px; }
    .cr-inhalt { padding: 20px 12px 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .cr-karte, .cr-band, .cr-bild img, .cr-serien a { transition: none; }
}

/* =========================================
   DETAILSEITE (cnc-router/<modell>.html)
   =========================================
   Reihenfolge wie die Produktseiten auf sign-cnc.com: Banner, Einfuehrung,
   grosses Maschinenbild, Ausstattung, Baugruppen, technische Daten,
   Anfrage und verwandte Maschinen. */

.cr-bild-link { display: block; }

/* Ueberschrift mit Doppelpfeil, wie bei sign-cnc */
.cd-titel {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 1.1rem;
    color: #333;
    font: 700 clamp(1.4rem, 2.2vw, 2.1rem)/1.2 var(--font-family-heading);
}
.cd-titel::before {
    content: '\25B6\25B6';
    flex: 0 0 auto;
    color: var(--cr-accent);
    font-size: 0.55em;
    letter-spacing: -0.3em;
    padding-right: 0.3em;
}

/* Banner */
.cd-banner {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0) 55%, rgba(0, 115, 214, 0.06) 55%, rgba(0, 115, 214, 0.06) 62%, rgba(255, 255, 255, 0) 62%),
        linear-gradient(180deg, #ffffff 0%, #eef1f4 100%);
}
.cd-banner-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(1.5rem, 4vw, 4rem);
    min-height: clamp(320px, 28vw, 460px);
    padding-top: clamp(2rem, 3.5vw, 3rem);
    padding-bottom: clamp(2rem, 3.5vw, 3rem);
}
.cd-banner-serie { margin: 0 0 0.6rem; color: #6b7a86; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
/* Wie die Produktbanner auf sign-cnc.com: Modell und Untertitel im
   schwersten Schnitt, beide in der Akzentfarbe. */
.cd-banner-name {
    margin: 0 0 0.5rem;
    color: var(--cr-accent);
    font: 900 clamp(3rem, 6.2vw, 6rem)/0.95 var(--font-family-heading);
    letter-spacing: -0.02em;
}
.cd-banner-tagline { max-width: 26ch; margin: 0 0 1.75rem; color: #0a4c8f; font: 900 clamp(1.5rem, 2.8vw, 2.7rem)/1.12 var(--font-family-heading); letter-spacing: -0.01em; }
.cd-banner-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cd-banner-actions .btn-outline { border: 1px solid var(--cr-accent); color: var(--cr-accent); }
.cd-banner-actions .btn-outline:hover { background: var(--cr-accent); color: #fff; }
.cd-banner-bild { margin: 0; justify-self: end; width: 100%; max-width: 820px; }
.cd-banner-bild img { display: block; width: 100%; height: auto; filter: drop-shadow(0 24px 30px rgba(15, 30, 45, 0.22)); }

/* Einfuehrung */
.cd-intro { padding: 56px 0 60px; background: #fff; }
.cd-intro h1 { margin: 0 0 1.6rem; color: #333; font: 700 1.6rem/1.2 var(--font-family-heading); }
.cd-intro p { max-width: 980px; margin: 0 0 0.9rem; color: #555; font-size: 1.02rem; line-height: 1.75; }

/* Grosses Bild */
.cd-gross { background: #f4f4f4; }
.cd-gross figure { margin: 0 auto; max-width: 1180px; padding: clamp(1.5rem, 4vw, 3.5rem) 0; }
.cd-gross img { display: block; width: 100%; height: auto; }

/* Ausstattung */
.cd-ausstattung { padding: 0 0 64px; background: #f4f4f4; }
.cd-check {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px 40px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.cd-check li { position: relative; padding-left: 30px; color: #444; font-size: 1rem; line-height: 1.5; }
.cd-check li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2em;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--cr-accent);
    border-radius: 50%;
    box-sizing: border-box;
}
.cd-check li::after {
    content: '';
    position: absolute;
    left: 6.5px;
    top: calc(0.2em + 3.5px);
    width: 5px;
    height: 8px;
    border: solid var(--cr-accent);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Baugruppen */
.cd-gruppen { padding: 72px 0; background: #fff; }
.cd-gruppen-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.cd-gruppe {
    position: relative;
    overflow: hidden;
    padding: clamp(1.5rem, 2.5vw, 2.25rem);
    border: 1px solid #e6e9ec;
    background: linear-gradient(135deg, #ffffff 0%, #f6f8fa 100%);
    transition: box-shadow 300ms ease, transform 300ms ease;
}
.cd-gruppe:hover { box-shadow: 3px 5px 18px rgba(0, 0, 0, 0.12); transform: translateY(-2px); }
.cd-gruppe .cd-titel { font-size: clamp(1.15rem, 1.6vw, 1.45rem); margin-bottom: 0.9rem; }
.cd-gruppe ul { margin: 0; padding: 0; list-style: none; }
.cd-gruppe li { padding: 5px 0; color: #555; font-size: 0.98rem; }

/* Technische Daten */
.cd-daten { padding: 72px 0; background: #fff; border-top: 1px solid #eef0f2; }
.cd-tabelle { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.cd-tabelle th,
.cd-tabelle td { padding: 13px 18px; border-bottom: 1px solid #fff; text-align: left; vertical-align: top; }
.cd-tabelle th { width: 35%; color: #555; font-weight: 600; }
.cd-tabelle td { color: #333; }
.cd-tabelle tr:nth-child(odd) { background: #f3f4f5; }
.cd-tabelle tr:first-child th,
.cd-tabelle tr:first-child td { background: var(--cr-accent); color: #fff; font-weight: 700; }
.cd-hinweis {
    margin: 0;
    padding: 22px 26px;
    border-left: 3px solid var(--cr-accent);
    background: #eef5fc;
    color: #23475e;
    font-size: 1rem;
    line-height: 1.6;
}
.cd-hinweis a { color: var(--cr-accent); font-weight: 600; }

/* Verwandte Maschinen */
.cd-verwandt { padding: 72px 0 90px; background: #fff; }
.cd-verwandt-kopf { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.cd-verwandt-kopf h2 { margin: 0; padding-left: 12px; border-left: 3px solid var(--cr-accent); color: #333; font: 700 1.35rem/1.2 var(--font-family-heading); text-transform: uppercase; }
.cd-pfeile { display: flex; gap: 8px; }
.cd-pfeile button {
    width: 36px;
    height: 36px;
    border: 1px solid #dde1e5;
    background: #f5f6f7;
    color: #777;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 200ms ease, color 200ms ease;
}
.cd-pfeile button:hover:not(:disabled) { background: var(--cr-accent); border-color: var(--cr-accent); color: #fff; }
.cd-pfeile button:disabled { opacity: 0.4; cursor: default; }
/* Die Leiste bekommt innen Luft, damit Schatten und Namensband beim
   Ueberfahren nicht am Scrollrand abgeschnitten werden. */
.cd-band {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 3 * 20px) / 4);
    gap: 20px;
    margin: -20px -14px -24px;
    padding: 20px 14px 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 14px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    list-style: none;
}
.cd-band::-webkit-scrollbar { display: none; }
.cd-band li { scroll-snap-align: start; }

/* Ueberfahren wie bei sign-cnc: grauer Grund mit Schatten, Namensband
   oben rechts, Bild zoomt auf 105 %, der Strich wird zur Schaltflaeche. */
.cd-band a {
    position: relative;
    display: block;
    height: 100%;
    padding-top: 20px;
    color: inherit;
    text-decoration: none;
    transition: background-color 300ms ease, box-shadow 300ms ease;
}
.cd-band a:hover,
.cd-band a:focus-visible { background: var(--cr-soft); box-shadow: 3px 5px 18px rgba(0, 0, 0, 0.18); }
.cd-band .cr-band { top: 6px; right: 0; max-width: 85%; }
.cd-band a:hover .cr-band,
.cd-band a:focus-visible .cr-band { opacity: 1; transform: none; }
.cd-band .cr-bild img { transition: transform 300ms ease; }
.cd-band a:hover .cr-bild img { transform: scale(1.05); }
.cd-band-text { display: block; padding: 34px 21px 30px; }
.cd-band-text span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; min-height: 4.5em; margin-bottom: 30px; color: #333; font-size: 0.95rem; line-height: 1.5; transition: color 200ms ease; }
.cd-band a:hover .cd-band-text span { color: var(--cr-accent); }
.cd-band-text i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 37px;
    height: 3px;
    overflow: hidden;
    background: var(--cr-accent);
    color: transparent;
    font-size: 0.8rem;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: width 300ms ease, height 300ms ease, transform 300ms ease, color 200ms ease 100ms;
}
.cd-band a:hover .cd-band-text i,
.cd-band a:focus-visible .cd-band-text i { width: 160px; height: 37px; color: #fff; transform: translateY(-15px); }

@media (max-width: 1199px) {
    .cd-band { grid-auto-columns: calc((100% - 2 * 20px) / 3); }
}
@media (max-width: 900px) {
    .cd-banner-grid { grid-template-columns: 1fr; min-height: 0; }
    .cd-banner-bild { justify-self: center; max-width: 560px; }
    .cd-gruppen-grid { grid-template-columns: 1fr; }
    .cd-band { grid-auto-columns: calc((100% - 20px) / 2); }
    .cd-intro, .cd-gruppen, .cd-daten, .cd-verwandt { padding-top: 48px; padding-bottom: 48px; }
}
@media (max-width: 600px) {
    .cd-band { grid-auto-columns: 82%; }
    .cd-tabelle th, .cd-tabelle td { padding: 11px 12px; }
    .cd-tabelle th { width: 42%; }
}
@media (prefers-reduced-motion: reduce) {
    .cd-gruppe, .cd-band a, .cd-band .cr-bild img, .cd-band-text i, .cd-band-text span { transition: none; }
    .cd-band { scroll-behavior: auto; }
}
