/* Topic Detail Page */

/* Mobile-First: Basis-Styles gelten für mobile Geräte */
/* VERPFLICHTEND: Horizontal Overflow verhindern (Regel 011-ui-css-mobile.mdc 005.001) */

/* VERPFLICHTEND: Hero-Section für Topic-Detail (wie Live-Version) */
.hero {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 18px 45px rgba(2,6,23,.22);
    background:
        radial-gradient(900px 420px at 10% 10%, rgba(255, 140, 0, .70), transparent 60%),
        radial-gradient(700px 380px at 70% 10%, rgba(34, 197, 94, .55), transparent 58%),
        radial-gradient(900px 520px at 80% 70%, rgba(59,130,246,.45), transparent 60%),
        radial-gradient(800px 520px at 30% 70%, rgba(239,68,68,.50), transparent 62%),
        linear-gradient(135deg, var(--nav-gradient-1), var(--nav-gradient-2) 55%, var(--nav-gradient-3));
    color: var(--color-text-inverse);
}

.hero::after {
    content: "";
    position: absolute;
    inset: -40px;
    background:
        radial-gradient(circle at 15% 25%, rgba(255,255,255,.18) 0 2px, transparent 3px),
        radial-gradient(circle at 35% 65%, rgba(255,255,255,.16) 0 2px, transparent 3px),
        radial-gradient(circle at 55% 30%, rgba(255,255,255,.14) 0 2px, transparent 3px),
        radial-gradient(circle at 75% 50%, rgba(255,255,255,.12) 0 2px, transparent 3px),
        radial-gradient(circle at 85% 20%, rgba(255,255,255,.10) 0 2px, transparent 3px);
    opacity: .8;
    filter: blur(.2px);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    padding: 38px 28px 22px;
}

.hero h1 {
    margin: 0;
    font-size: 44px;
    line-height: 1.06;
    letter-spacing: -.6px;
    color: var(--color-text-inverse);
}

.hero .base-headline-h1,
.hero .base-headline-h2,
.hero .base-headline-h3,
.hero .base-headline-h4,
.hero .base-headline-h5,
.hero .base-headline-h6 {
    color: var(--color-text-inverse);
}

.hero p {
    margin: 10px 0 18px;
    max-width: 62ch;
    opacity: .92;
}

.hero .topic-detail-description {
    max-width: 100%;
}

/* VERPFLICHTEND: Badge-Styles für Topic-Detail (wie Live-Version) */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    letter-spacing: .4px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.16);
    color: var(--color-text-inverse);
}

.badge.pro {
    background: rgba(34,197,94,.14);
    border-color: rgba(34,197,94,.22);
}

.badge.contra {
    background: rgba(249,115,22,.14);
    border-color: rgba(249,115,22,.22);
}

.badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.badge.pro .dot {
    background: var(--pro);
}

.badge.contra .dot {
    background: var(--contra);
}

/* VERPFLICHTEND: Top-Arguments-Section (wie Live-Version) */
.top-arguments-section {
    margin-bottom: 24px;
}

.top-arguments-list {
    list-style: none;
    padding-left: 0;
    margin: 12px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.top-argument-item {
    margin: 0;
    display: inline-block;
}

.top-argument-item .tag {
    white-space: nowrap;
    display: inline-block;
}

/* VERPFLICHTEND: "Deine Meinung zählt!"-Section (hochwertig gestylt) */
.deine-meinung-zaehlt {
    margin-bottom: 18px;
    background: linear-gradient(180deg, var(--card), var(--color-bg-subtle));
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.deine-meinung-zaehlt::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pro), var(--contra));
    opacity: 0.3;
}

.deine-meinung-zaehlt-content {
    padding: 0;
    position: relative;
    z-index: 1;
}

.deine-meinung-zaehlt-title {
    margin: 0 0 12px 0;
    font-size: 22px;
    font-weight: 900;
    color: var(--text);
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.deine-meinung-zaehlt-meta {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 11px;
}

.deine-meinung-zaehlt-info {
    margin: 0 0 18px 0;
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
    line-height: 1.5;
}

.deine-meinung-zaehlt-message {
    margin: 0 0 24px 0;
    font-size: 15px;
    color: var(--text);
    font-weight: 500;
    line-height: 1.6;
}

.deine-meinung-zaehlt-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.deine-meinung-zaehlt-buttons .base-button-standard {
    flex: 1;
    min-width: 140px;
    font-weight: 700;
}

/* VERPFLICHTEND: "Worum geht's hier?"-Section (hochwertig gestylt) */
.worum-gehts-hier {
    margin-bottom: 18px;
    background: linear-gradient(180deg, var(--card), var(--color-bg-subtle));
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.worum-gehts-hier::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pro), var(--contra));
    opacity: 0.3;
}

.worum-gehts-hier-content {
    padding: 0;
    position: relative;
    z-index: 1;
}

.worum-gehts-hier-title {
    margin: 0 0 16px 0;
    font-size: 22px;
    font-weight: 900;
    color: var(--text);
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.worum-gehts-hier-text-container {
    margin: 0;
}

.worum-gehts-hier-text {
    margin: 0;
    font-size: 15px;
    color: var(--text);
    font-weight: 500;
    line-height: 1.7;
}

/* VERPFLICHTEND: Kicker-Styles (wie Live-Version) */
.kicker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

/* VERPFLICHTEND: Tabs-Styles (wie Live-Version) */
.tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 6px 0 12px;
}

.tab {
    border: 1px solid var(--line);
    background: var(--card);
    padding: 8px 10px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 13px;
    color: var(--color-tab-text);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.tab:hover {
    border-color: var(--pro);
    background: rgba(34,197,94,.05);
    color: var(--pro);
}

.tab.active {
    border-color: rgba(34,197,94,.35);
    background: rgba(34,197,94,.10);
    color: var(--pro);
}

/* VERPFLICHTEND: Counter-Article-Button mit Pro/Contra-Farben (wie Live-Version) */
.topic-detail-counter-article-button-pro {
    background: linear-gradient(180deg, rgba(34,197,94,.95), rgba(22,163,74,.92));
    color: var(--color-btn-pro-text);
    border: 1px solid rgba(255,255,255,.18);
}

.topic-detail-counter-article-button-pro:hover {
    filter: brightness(1.03);
}

.topic-detail-counter-article-button-contra {
    background: linear-gradient(180deg, rgba(249,115,22,.96), rgba(194,65,12,.95));
    color: var(--color-btn-contra-text);
    border: 1px solid rgba(255,255,255,.18);
}

.topic-detail-counter-article-button-contra:hover {
    filter: brightness(1.03);
}

/* VERPFLICHTEND: Article-Hero Meta (wie Live-Version) */
.article-hero {
    margin-bottom: 18px;
}

.meta {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
}

.meta b {
    color: var(--text);
    font-weight: 700;
}

.topic-detail-container {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Mobile-First: Basis-Styles gelten für mobile Geräte - 1 Spalte */
.article-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 18px;
}

.article {
    padding: 18px;
}

.article h2 {
    margin: 20px 0 8px;
    font-size: 20px;
}

.article p {
    margin: 10px 0;
    color: var(--text);
}

.opinions-section {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    margin-bottom: 18px;
}

.opinions-title {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    margin: 0 0 12px;
}

.opinion-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.opinion {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card);
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--line);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,.7), transparent 60%),
        linear-gradient(135deg, var(--color-pastel-blue), var(--color-pastel-pink));
}

.avatar:has(svg),
.avatar:has(img) {
    background: transparent;
}

.avatar svg,
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}

.avatar-initials {
    font-size: 14px;
    font-weight: 900;
    color: var(--text);
    text-align: center;
    line-height: 1;
}

.author-avatar {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
    vertical-align: middle;
    margin-right: 8px;
}

.author-avatar svg,
.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.opinion-author {
    margin: 0;
    font-size: 14px;
    font-weight: 900;
}

[id*="-content"] {
    min-width: 0;
    overflow: visible;
}

.opinion-text {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--muted);
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.opinion-content {
    min-width: 0;
    overflow: visible;
}

.opinion-tag-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.tag {
    font-size: 12px;
    font-weight: 900;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
}

.tag.pro {
    color: var(--pro);
    background: rgba(34, 197, 94, .12);
    border-color: rgba(34, 197, 94, .30);
}

.tag.contra {
    color: var(--contra);
    background: rgba(249, 115, 22, .12);
    border-color: rgba(249, 115, 22, .30);
}

.tag.neutral {
    color: var(--color-text-slate);
    background: rgba(148, 163, 184, .12);
    border-color: rgba(148, 163, 184, .25);
}

.tag.moderated {
    color: var(--color-link-blue);
    background: rgba(59, 130, 246, .12);
    border-color: rgba(59, 130, 246, .30);
}

.opinions-empty {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--muted);
    margin-top: 12px;
}

.sidebar {
    padding: 16px;
    position: sticky;
    top: 16px;
    height: fit-content;
}

.sidecard {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    background: linear-gradient(180deg, var(--card), var(--color-bg-subtle));
    margin-top: 10px;
}

.sidecard h4 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 900;
}

.sidecard ul {
    margin: 0;
    padding-left: 16px;
    color: var(--muted);
    font-size: 13px;
}

.sidecard .btn {
    width: 100%;
    justify-content: center;
}

.topic-image-container {
    width: 100%;
    margin: 18px 0;
    border-radius: 14px;
    overflow: hidden;
}

.topic-image-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.topic-detail-hero-inner {
    text-align: left;
}

.topic-detail-badge-wrapper {
    text-align: left;
    width: 100%;
}

.topic-detail-title {
    width: 100%;
    text-align: left;
}

.hero .topic-detail-description {
    width: 100%;
    text-align: left;
    max-width: 100%;
    font-size: 1.25rem;
    line-height: 1.5;
    font-weight: 500;
    margin: 10px 0 18px;
}

.topic-detail-image-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* VERPFLICHTEND: max-width: 100% für Bilder (Regel 011-ui-css-mobile.mdc 008.009) */
.topic-detail-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Mobile-First: Responsive Design - Regel 022: 4 Breakpoints */
/* Basis-Styles gelten für mobile (max-width: 576px) - keine Media Query erforderlich */

/* Tablet/iPad (min-width: 600px) */
@media (min-width: 600px) {
    .topic-detail-container {
        max-width: 100%;
    }
}

/* Kleiner Desktop/13-Zoll (min-width: 1024px) */
@media (min-width: 1024px) {
    .topic-detail-container {
        max-width: var(--max);
    }
    
    /* Article Layout: 2 Spalten ab Desktop */
    .article-layout {
        grid-template-columns: 1.35fr .65fr;
    }
}

/* Großer Desktop/Widescreen (min-width: 1440px) */
@media (min-width: 1440px) {
    .topic-detail-container {
        max-width: var(--max);
    }
}
