/* HOMEOFJOBS - CMS Frontend Seiten-Templates */

.cms-tpl { background: #fff; min-height: calc(100vh - 160px); }

/* HERO / Header-Bild — geht bis Top, Header schwebt drüber.
   Gelber Brand-Gradient liegt IMMER als Base-Layer (für PNG/SVG mit Transparenz).
   Darüber: <img> mit dem hochgeladenen Bild.
   Darüber: dunkles Overlay für Lesbarkeit.
   Darüber: Inhalt (Titel + Subtitle). */
.cms-hero {
    position: relative;
    min-height: 440px;
    background: linear-gradient(180deg, #9f4c00 0%, #f6a200 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    padding-top: 80px;  /* Platz unter dem schwebenden Header */
    overflow: hidden;
}
.cms-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;          /* default: cover */
    object-position: center;
    z-index: 0;
    pointer-events: none;
}
/* Fit-Modi */
.cms-hero-fit-cover    .cms-hero-bg { object-fit: cover; }
.cms-hero-fit-contain  .cms-hero-bg { object-fit: contain; }
.cms-hero-fit-original .cms-hero-bg { object-fit: none; }
/* Tile: wir nutzen background-image via inline-style, kein <img> Element */
.cms-hero-fit-tile {
    background-size: auto !important;
}
.cms-tpl.cms-has-hero { padding-top: 0 !important; }
.cms-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.20) 0%, rgba(0,0,0,0.45) 100%);
    z-index: 1;
}
.cms-hero-inner {
    position: relative; z-index: 2;
    text-align: center;
    color: #fff;
    padding: 40px 24px;
    max-width: 900px;
}
.cms-hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: #fff;
    margin: 0 0 14px;
    line-height: 1.15;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.cms-hero-sub {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    color: rgba(255,255,255,0.92);
    margin: 0;
    line-height: 1.5;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Wenn Hero da: weniger Top-Padding im Article (Hero ersetzt es) */
.cms-tpl.cms-has-hero .cms-article { padding-top: 40px; }
.cms-tpl-sidebar.cms-has-hero { padding-top: 0; }
.cms-tpl-sidebar.cms-has-hero .cms-sidebar-grid { padding-top: 32px; }
.cms-tpl-landing.cms-has-hero { padding-top: 0; }

/* Template: Default - zentrierte schmale Spalte */
.cms-tpl-default .cms-article { max-width: 820px; margin: 0 auto; padding: 110px 24px 80px; }

/* Template: Wide - breitere Spalte */
.cms-tpl-wide .cms-article { max-width: 1200px; margin: 0 auto; padding: 110px 32px 80px; }

/* Template: Landing - voll, kein Padding */
.cms-tpl-landing { padding-top: 64px; }
.cms-tpl-landing .cms-article { max-width: none; margin: 0; padding: 0; }
.cms-tpl-landing .cms-block { margin: 0 0 32px; max-width: 1200px; padding: 0 24px; margin-left: auto; margin-right: auto; }
.cms-tpl-landing .cms-image-block { max-width: none; padding: 0; }
.cms-tpl-landing .cms-image-block img { border-radius: 0; }

/* Template: Sidebar - linke Sidebar + rechts Content */
.cms-tpl-sidebar { padding: 100px 32px 80px; }
.cms-tpl-sidebar .cms-sidebar-grid { display: grid; grid-template-columns: 240px 1fr; gap: 48px; max-width: 1200px; margin: 0 auto; }
.cms-tpl-sidebar .cms-article { padding: 0; max-width: 800px; }
@media (max-width: 860px) {
    .cms-tpl-sidebar .cms-sidebar-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* Sidebar */
.cms-sidebar { position: sticky; top: 90px; align-self: start; }
.cms-sidebar-nav { display: flex; flex-direction: column; gap: 2px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px; }
.cms-sidebar-link { display: block; padding: 10px 14px; border-radius: 8px; font-size: 0.92rem; color: #475569; text-decoration: none; transition: all .15s; }
.cms-sidebar-link:hover { background: #fff; color: #1e293b; }
.cms-sidebar-link.active { background: #f6a200; color: #fff; font-weight: 600; }
@media (max-width: 860px) {
    .cms-sidebar { position: static; }
    .cms-sidebar-nav { flex-direction: row; flex-wrap: wrap; overflow-x: auto; }
    .cms-sidebar-link { white-space: nowrap; }
}

/* Page Title */
.cms-page-title { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; color: #0f172a; margin: 0 0 24px; line-height: 1.2; }

/* Sub-Nav-Tabs (für default/wide/landing) */
.cms-subnav-tabs { display: flex; gap: 4px; margin: -4px 0 32px; padding-bottom: 1px; border-bottom: 1px solid #e2e8f0; overflow-x: auto; scrollbar-width: thin; }
.cms-subnav-tab { padding: 10px 18px; font-size: 0.9rem; font-weight: 500; color: #64748b; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: all .15s; }
.cms-subnav-tab:hover { color: #1e293b; border-bottom-color: #cbd5e1; }
.cms-subnav-tab.active { color: #f6a200; border-bottom-color: #f6a200; }

/* Draft Banner */
.cms-draft-banner { max-width: 820px; margin: 100px auto 0; background: rgba(245,158,11,0.1); color: #b45309; padding: 12px 20px; border-radius: 10px; display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.cms-draft-banner a { margin-left: auto; color: #b45309; font-weight: 600; text-decoration: none; }
.cms-tpl-wide .cms-draft-banner { max-width: 1200px; }
.cms-tpl-sidebar .cms-draft-banner { max-width: 1200px; }
.cms-tpl-landing .cms-draft-banner { max-width: 1200px; margin: 100px auto 0; }

/* Empty State */
.cms-empty-hint { color: #94a3b8; text-align: center; padding: 40px; }

/* === Block-Styles === */
.cms-block { margin-bottom: 28px; }
.cms-block:last-child { margin-bottom: 0; }

.cms-text { font-size: 1.05rem; line-height: 1.75; color: #334155; }
.cms-heading h2 { font-size: 1.75rem; font-weight: 700; color: #0f172a; margin: 8px 0 14px; line-height: 1.3; }
.cms-heading h3 { font-size: 1.35rem; font-weight: 600; color: #1e293b; margin: 8px 0 12px; }
.cms-heading h4 { font-size: 1.1rem; font-weight: 600; color: #334155; margin: 8px 0 10px; }

.cms-image-block { margin: 0; }
.cms-image { width: 100%; border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,0.08); display: block; }
.cms-image-block figcaption { font-size: 0.85rem; color: #94a3b8; text-align: center; margin-top: 10px; }

.cms-button-block { margin: 8px 0; }
.cms-button { display: inline-flex; align-items: center; gap: 8px; padding: 13px 28px; border-radius: 10px; font-weight: 600; text-decoration: none; transition: all .15s; }
.cms-button-primary { background: #f6a200; color: #fff; }
.cms-button-primary:hover { background: #e09500; transform: translateY(-1px); }
.cms-button-outline { border: 2px solid #f6a200; color: #f6a200; }
.cms-button-outline:hover { background: rgba(246,162,0,0.08); }
.cms-button-ghost { color: #f6a200; padding: 13px 0; }
.cms-button-ghost:hover { color: #c47e00; }

.cms-accordion details { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px 22px; transition: box-shadow .15s; }
.cms-accordion details[open] { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.cms-accordion summary { font-weight: 600; color: #0f172a; cursor: pointer; outline: none; font-size: 1.02rem; }
.cms-accordion summary::-webkit-details-marker { display: none; }
.cms-accordion summary::before { content: '+'; display: inline-block; width: 24px; height: 24px; line-height: 22px; text-align: center; background: rgba(246,162,0,0.12); color: #f6a200; border-radius: 50%; font-weight: 700; margin-right: 10px; transition: transform .2s; }
.cms-accordion details[open] summary::before { content: '−'; }
.cms-accordion-body { margin-top: 14px; color: #475569; line-height: 1.7; }

.cms-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.cms-gallery figure { margin: 0; }
.cms-gallery img { width: 100%; height: 220px; object-fit: cover; border-radius: 10px; display: block; transition: transform .2s; }
.cms-gallery img:hover { transform: scale(1.02); }
.cms-gallery figcaption { font-size: 0.8rem; color: #94a3b8; text-align: center; margin-top: 6px; }

.cms-video { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,0.08); }
.cms-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.cms-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.cms-columns .cms-col { color: #334155; line-height: 1.7; }
@media (max-width: 640px) { .cms-columns { grid-template-columns: 1fr; gap: 18px; } }

/* Background-Gradients für Bilder mit Transparenz (PNG) */
.cms-image-wrap { display: block; }
.cms-bg-warm,
.cms-bg-cool,
.cms-bg-dark,
.cms-bg-soft,
.cms-bg-brand,
.cms-bg-mono { padding: 36px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.cms-bg-warm  { background: linear-gradient(135deg, #f6a200 0%, #ffd166 100%); }
.cms-bg-cool  { background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 100%); }
.cms-bg-dark  { background: linear-gradient(135deg, #0f172a 0%, #334155 100%); }
.cms-bg-soft  { background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); }
.cms-bg-brand { background: linear-gradient(135deg, #f6a200 0%, #f87171 100%); }
.cms-bg-mono  { background: linear-gradient(135deg, #1f2937 0%, #6b7280 100%); }
.cms-bg-warm img, .cms-bg-cool img, .cms-bg-dark img, .cms-bg-soft img, .cms-bg-brand img, .cms-bg-mono img {
    max-width: 100%; max-height: 360px; height: auto; width: auto; object-fit: contain;
    border-radius: 0 !important; box-shadow: none !important;
}
.cms-image-text__img-wrap { display: block; }
.cms-image-text__img-wrap.cms-bg-warm,
.cms-image-text__img-wrap.cms-bg-cool,
.cms-image-text__img-wrap.cms-bg-dark,
.cms-image-text__img-wrap.cms-bg-soft,
.cms-image-text__img-wrap.cms-bg-brand,
.cms-image-text__img-wrap.cms-bg-mono { padding: 36px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.cms-image-text__figure figcaption { display: block; text-align: left; }

.cms-image-text { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.cms-image-text--reverse .cms-image-text__media { order: 2; }
.cms-image-text__figure { margin: 0; }
.cms-image-text__figure img { width: 100%; height: auto; border-radius: 14px; display: block; box-shadow: 0 6px 22px rgba(0,0,0,0.08); }
.cms-image-text__figure figcaption { font-size: 0.82rem; color: #94a3b8; margin-top: 8px; }
.cms-image-text__heading { font-size: 1.45rem; font-weight: 700; color: #0f172a; margin: 0 0 12px; }
.cms-image-text__text { color: #334155; font-size: 1rem; line-height: 1.7; }
@media (max-width: 720px) {
    .cms-image-text { grid-template-columns: 1fr; gap: 18px; }
    .cms-image-text--reverse .cms-image-text__media { order: 0; }
}

.cms-quote { margin: 0; border-left: 4px solid #f6a200; padding: 8px 0 8px 22px; }
.cms-quote p { font-size: 1.15rem; font-style: italic; color: #1e293b; margin: 0 0 10px; line-height: 1.6; }
.cms-quote cite { font-size: 0.9rem; color: #64748b; font-style: normal; }

.cms-divider { border: none; border-top: 1px solid #e2e8f0; margin: 40px 0; }
