/* Reset breadcrumb nav so header.css fixed positioning doesn't apply */
.hero-small nav[aria-label="breadcrumb"],
.hero nav[aria-label="breadcrumb"] {
    position: static;
    height: auto;
    background: transparent;
    box-shadow: none;
    padding: 0;
    z-index: auto;
    width: auto;
    display: block;
}

/* ── Hero image (auto-injected by detail.php when /assets/img/magazine/{slug}.webp exists) ── */
/* Sits between the H1 hero section and the TOC */
.mag-hero-image-wrap {
    width: 100%;
    aspect-ratio: 16 / 6;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 6px 32px rgba(0,0,0,.12);
    line-height: 0;
    margin-bottom: -12px;
}
.mag-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform .4s ease;
}
.mag-hero-image-wrap:hover .mag-hero-img {
    transform: scale(1.02);
}
@media (max-width: 760px) {
    .mag-hero-image-wrap { aspect-ratio: 16 / 8; border-radius: 14px; }
}

/* ── Magazine article layout ── */
.mag-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 48px 0 80px;
}
.mag-content-row {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 48px;
    align-items: start;
}
.mag-body {
    min-width: 0;
}
.mag-author-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}
.mag-body > * + * {
    margin-top: 20px;
}
.mag-body h2 {
    font-size: clamp(21px, 2.2vw, 27px);
    border-bottom: 2px solid var(--dt-altrosa);
    padding-bottom: 10px;
    margin-top: 52px !important;
}
.mag-body h3 {
    font-size: clamp(17px, 1.6vw, 20px) !important;
    font-weight: 600 !important;
    margin-top: 32px !important;
}
.mag-body h4 {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 10px;
}

/* Decisions & formats ordered lists – semantic wrappers, no visual change */
.mag-decisions,
.mag-formats-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.mag-decisions > li,
.mag-formats-list > li {
    display: contents;
}

/* Byline */
.mag-byline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 14px;
    color: var(--text-menu);
}
.mag-byline i { margin-right: 4px; font-size: 13px; }
.mag-dot { color: #ccc; }

/* Lead paragraph */
.mag-lead {
    font-size: clamp(16px, 1.2vw, 19px) !important;
    line-height: 1.7 !important;
    font-weight: 500;
    color: var(--text);
    border-left: 4px solid var(--dt-blau);
    padding-left: 18px;
    margin-bottom: 4px;
}

/* Lists */
.mag-list {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mag-list li { line-height: 1.65; }
.mag-checklist {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 0 !important;
}
.mag-checklist li {
    padding-left: 28px;
    position: relative;
    font-size: 14px;
    line-height: 1.55;
}
.mag-checklist li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    width: 16px;
    height: 16px;
    border: 2px solid var(--cta-primary);
    border-radius: 4px;
    background: white;
}

/* Tip & Warning */
.mag-tip {
    background: white;
    border-left: 3px solid var(--dt-gelb);
    border-radius: 0 8px 8px 0;
    padding: 11px 15px;
    font-size: 14px;
    line-height: 1.55;
    margin-top: 10px !important;
}
.mag-tip i { color: var(--dt-orange); margin-right: 5px; }
.mag-warning {
    background: white;
    border-left: 3px solid var(--dt-koral);
    border-radius: 0 8px 8px 0;
    padding: 11px 15px;
    font-size: 14px;
    line-height: 1.55;
    margin-top: 6px !important;
}
.mag-warning i { color: #d95555; margin-right: 5px; }

/* Callout box */
.mag-callout {
    background: var(--dt-altrosa);
    border-radius: 14px;
    padding: 18px 22px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    line-height: 1.6;
    margin-top: 28px !important;
}
.mag-callout-icon {
    color: var(--dt-orange);
    font-size: 17px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Budget grid */
.mag-budget-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 14px !important;
}
.mag-budget-card {
    background: #f8f8f8;
    border: 1px solid #e7e9eb;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.mag-budget-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-menu);
}
.mag-budget-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--cta-primary);
}
.mag-budget-card p {
    font-size: 13px;
    color: var(--text-menu);
    line-height: 1.5;
    margin-top: 4px !important;
}

/* Format cards */
.mag-format-card {
    display: flex;
    gap: 20px;
    border: 1px solid #e7e9eb;
    border-radius: 16px;
    padding: 22px;
    margin-top: 12px !important;
    transition: box-shadow .2s;
    background: white;
}
.mag-format-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,.07);
}
.mag-format-num {
    font-family: var(--primary-heading-font);
    font-size: 32px;
    font-weight: 700;
    color: var(--dt-blau);
    -webkit-text-stroke: 1.5px #5aacce;
    line-height: 1;
    flex-shrink: 0;
    width: 44px;
    text-align: center;
    padding-top: 2px;
}
.mag-format-content {
    flex: 1;
    min-width: 0;
}
.mag-format-content > * + * { margin-top: 10px; }
.mag-format-content h3 {
    font-size: 17px !important;
    font-weight: 600 !important;
    margin-top: 0 !important;
}
.mag-format-meta {
    font-size: 13px;
    color: var(--text-menu);
}
.mag-format-meta i { margin-right: 3px; color: var(--cta-primary); font-size: 12px; }

/* Error list */
.mag-errors {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px !important;
}
.mag-error {
    border: 1px solid #e7e9eb;
    border-radius: 12px;
    overflow: hidden;
}
.mag-error-head {
    background: #f8f8f8;
    padding: 11px 16px;
    font-weight: 600;
    font-size: 14px;
}
.mag-error-body {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.mag-wrong, .mag-right {
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}
.mag-wrong { color: #d95555; }
.mag-wrong i { flex-shrink: 0; margin-top: 3px; }
.mag-right { color: #2a7a50; }
.mag-right i { flex-shrink: 0; margin-top: 3px; }

/* Timeline */
.mag-timeline {
    padding-left: 16px;
    border-left: 3px solid var(--dt-altrosa);
    display: flex;
    flex-direction: column;
    margin-top: 24px !important;
}
.mag-tl-item {
    position: relative;
    padding: 0 0 28px 28px;
}
.mag-tl-item:last-child { padding-bottom: 0; }
.mag-tl-item::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--cta-primary);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--cta-primary);
}
.mag-tl-marker {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--cta-primary);
    margin-bottom: 6px;
}

/* TOC – full width below H1 */
.mag-toc {
    width: 100%;
    margin-bottom: 40px;
}
.mag-toc-inner {
    background: var(--dt-altrosa);
    border-radius: 16px;
    padding: 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mag-toc-heading {
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-menu);
    flex-shrink: 0;
    margin-bottom: 0 !important;
}
.mag-toc-list {
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 0 !important;
    counter-reset: toc-counter;
}
.mag-toc-list li {
    font-size: 14px;
    line-height: 1.4;
    counter-increment: toc-counter;
}
.mag-toc-list li::before {
    content: counter(toc-counter) ". ";
    color: var(--cta-primary);
    font-weight: 600;
    font-size: 13px;
}
.mag-toc-list a { color: var(--text); text-decoration: none; }
.mag-toc-list a:hover { color: var(--cta-primary); text-decoration: underline; }

/* Author card sidebar */
.mag-author-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,.08);
    padding: 24px 20px 20px;
    text-align: center;
}
.mag-author-updated {
    font-size: 11px !important;
    color: #999;
    line-height: 1.5;
    margin-bottom: 16px !important;
}
.mag-author-updated strong {
    display: block;
    font-weight: 600;
    color: var(--text-menu);
    font-size: 12px;
}
.mag-author-photo-wrap {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 14px;
    border: 3px solid var(--dt-altrosa);
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mag-author-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}
.mag-author-placeholder {
    font-size: 2rem;
    color: #bbb;
}
.mag-author-info { display: contents; }
.mag-author-name {
    font-size: 15px !important;
    font-weight: 700;
    margin-bottom: 5px !important;
}
.mag-author-role {
    font-size: 12px !important;
    color: var(--text-menu);
    line-height: 1.5;
    margin-bottom: 16px !important;
}
.mag-author-right { display: contents; }
.mag-author-socials {
    display: flex;
    justify-content: center;
    gap: 8px;
}
.mag-author-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--cta-primary);
    transition: background .2s, transform .15s;
}
.mag-author-socials a:hover {
    background: var(--cta-primary-hover);
    transform: translateY(-2px);
}
.mag-author-socials svg {
    width: 15px;
    height: 15px;
    fill: white;
}

/* Responsive */
@media (max-width: 900px) {
    .mag-content-row { grid-template-columns: 1fr; }
    .mag-author-sidebar { position: static; }
}
@media (max-width: 760px) {
    .mag-toc-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
    .mag-toc-list { flex-direction: column; gap: 8px; }
    .mag-budget-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 580px) {
    .mag-budget-grid { grid-template-columns: 1fr; }
    .mag-format-card { flex-direction: column; gap: 10px; }
    .mag-format-num { width: auto; font-size: 24px; }
    .mag-byline { gap: 5px 10px; }
}
