/*
Theme Name: Trends2News
Theme URI: https://example.com/trends2news-theme
Author: Trends2News
Description: Professionelles News-Portal-Theme für das Trends2News Plugin. Modernes Design mit Breaking-Ticker, Hero-Grid und Kategorie-Slidern.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: trends2news-theme
Tags: news, blog, grid-layout, custom-menu, custom-logo, dark-mode, featured-images, sticky-post, threaded-comments
*/

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --t2n-red:          #c0392b;
  --t2n-red-dark:     #a93226;
  --t2n-red-light:    #e74c3c;
  --t2n-navy:         #1a1a2e;
  --t2n-navy-mid:     #16213e;
  --t2n-navy-light:   #0f3460;
  --t2n-white:        #ffffff;
  --t2n-bg:           #f4f6f8;
  --t2n-bg-card:      #ffffff;
  --t2n-text:         #1c1c1e;
  --t2n-text-muted:   #6b7280;
  --t2n-border:       #e5e7eb;
  --t2n-shadow-sm:    0 1px 3px rgba(0,0,0,.08);
  --t2n-shadow:       0 4px 16px rgba(0,0,0,.10);
  --t2n-shadow-lg:    0 8px 32px rgba(0,0,0,.15);
  --t2n-radius:       8px;
  --t2n-radius-lg:    12px;
  --t2n-container:    1280px;
  --t2n-font:         -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --t2n-font-serif:   Georgia, 'Times New Roman', serif;
  --t2n-transition:   .2s ease;
  --t2n-header-h:     64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --t2n-bg:       #0d0d0d;
    --t2n-bg-card:  #1a1a1a;
    --t2n-text:     #f0f0f0;
    --t2n-text-muted: #9ca3af;
    --t2n-border:   #2d2d2d;
    --t2n-shadow-sm: 0 1px 3px rgba(0,0,0,.3);
    --t2n-shadow:    0 4px 16px rgba(0,0,0,.4);
  }
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--t2n-font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--t2n-text);
  background: var(--t2n-bg);
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--t2n-red); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.t2nt-container {
  max-width: var(--t2n-container);
  margin-inline: auto;
  padding-inline: 20px;
}

.t2nt-sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

.t2nt-skip-link {
  position: absolute; top: -100%; left: 20px;
  background: var(--t2n-red); color: #fff;
  padding: 8px 16px; border-radius: 0 0 8px 8px; z-index: 9999;
  font-weight: 600; font-size: .875rem;
}
.t2nt-skip-link:focus { top: 0; }

/* ============================================================
   HEADER
   ============================================================ */
.t2nt-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--t2n-navy);
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
}

.t2nt-header__inner {
  display: flex; align-items: center;
  height: var(--t2n-header-h);
  gap: 24px;
}

/* Logo */
.t2nt-logo {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.t2nt-logo__mark {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--t2n-red);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.1rem; color: #fff;
  letter-spacing: -.5px;
}
.t2nt-logo__text {
  font-size: 1.35rem; font-weight: 800;
  color: #fff; letter-spacing: -.5px;
  line-height: 1;
}
.t2nt-logo__text span { color: var(--t2n-red-light); }

/* Primary Nav */
.t2nt-nav-primary {
  flex: 1;
  display: flex; align-items: center;
}
.t2nt-nav-primary ul {
  display: flex; align-items: center; gap: 4px;
}
.t2nt-nav-primary li a {
  display: block; padding: 8px 14px;
  color: rgba(255,255,255,.80);
  font-size: .9rem; font-weight: 500;
  border-radius: 6px;
  transition: background var(--t2n-transition), color var(--t2n-transition);
}
.t2nt-nav-primary li a:hover,
.t2nt-nav-primary li.current-menu-item a {
  background: rgba(255,255,255,.12);
  color: #fff;
}

/* Header Tools */
.t2nt-header__tools {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}

.t2nt-search-toggle,
.t2nt-dark-toggle {
  width: 38px; height: 38px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.75);
  background: rgba(255,255,255,.08);
  transition: background var(--t2n-transition), color var(--t2n-transition);
}
.t2nt-search-toggle:hover,
.t2nt-dark-toggle:hover {
  background: rgba(255,255,255,.18); color: #fff;
}
.t2nt-search-toggle svg,
.t2nt-dark-toggle svg { width: 18px; height: 18px; fill: currentColor; }

.t2nt-hamburger {
  display: none;
  width: 38px; height: 38px; border-radius: 8px;
  align-items: center; justify-content: center;
  color: rgba(255,255,255,.8);
  background: rgba(255,255,255,.08);
  flex-direction: column; gap: 5px;
  transition: background var(--t2n-transition);
}
.t2nt-hamburger:hover { background: rgba(255,255,255,.18); }
.t2nt-hamburger span {
  display: block; width: 20px; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.t2nt-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.t2nt-hamburger.is-open span:nth-child(2) { opacity: 0; }
.t2nt-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Search Bar */
.t2nt-search-bar {
  background: var(--t2n-navy-mid);
  overflow: hidden; max-height: 0;
  transition: max-height .3s ease, padding .3s ease;
}
.t2nt-search-bar.is-open {
  max-height: 80px;
  padding-block: 12px;
}
.t2nt-search-bar form {
  display: flex; align-items: center; gap: 10px;
}
.t2nt-search-bar input[type="search"] {
  flex: 1; height: 44px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px; padding: 0 16px;
  color: #fff; font-size: .95rem;
  outline: none;
  transition: border-color var(--t2n-transition), background var(--t2n-transition);
}
.t2nt-search-bar input[type="search"]::placeholder { color: rgba(255,255,255,.4); }
.t2nt-search-bar input[type="search"]:focus {
  border-color: var(--t2n-red); background: rgba(255,255,255,.15);
}
.t2nt-search-bar button[type="submit"] {
  height: 44px; padding: 0 20px;
  background: var(--t2n-red); color: #fff;
  border-radius: 8px; font-weight: 600; font-size: .9rem;
  transition: background var(--t2n-transition);
}
.t2nt-search-bar button[type="submit"]:hover { background: var(--t2n-red-dark); }

/* Category Bar */
.t2nt-catbar {
  background: var(--t2n-navy-mid);
  border-top: 1px solid rgba(255,255,255,.07);
  overflow-x: auto; scrollbar-width: none;
}
.t2nt-catbar::-webkit-scrollbar { display: none; }
.t2nt-catbar__inner {
  display: flex; align-items: center;
  height: 44px; gap: 2px;
  width: max-content; min-width: 100%;
}
.t2nt-catbar a {
  display: block; padding: 6px 14px;
  color: rgba(255,255,255,.65);
  font-size: .82rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  border-radius: 6px;
  transition: background var(--t2n-transition), color var(--t2n-transition);
  white-space: nowrap;
}
.t2nt-catbar a:hover,
.t2nt-catbar a.current { background: var(--t2n-red); color: #fff; }

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.t2nt-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 12px;
  border-bottom: 2px solid var(--t2n-red);
  gap: 12px;
}
.t2nt-section-head h2 {
  font-size: 1.25rem; font-weight: 800;
  letter-spacing: -.3px; line-height: 1.2;
  color: var(--t2n-text);
}
.t2nt-section-head h2::before {
  content: '';
  display: inline-block; width: 4px; height: 1.2em;
  background: var(--t2n-red); border-radius: 2px;
  margin-right: 10px; vertical-align: middle;
}
.t2nt-section-head a {
  font-size: .82rem; font-weight: 600;
  color: var(--t2n-red); white-space: nowrap;
  transition: opacity var(--t2n-transition);
}
.t2nt-section-head a:hover { opacity: .75; }

/* ============================================================
   ARTICLE CARD
   ============================================================ */
.t2nt-card {
  background: var(--t2n-bg-card);
  border-radius: var(--t2n-radius-lg);
  overflow: hidden;
  box-shadow: var(--t2n-shadow-sm);
  display: flex; flex-direction: column;
  transition: box-shadow var(--t2n-transition), transform var(--t2n-transition);
}
.t2nt-card:hover {
  box-shadow: var(--t2n-shadow);
  transform: translateY(-2px);
}

.t2nt-card__thumb {
  position: relative; overflow: hidden;
  aspect-ratio: 16/9;
}
.t2nt-card__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.t2nt-card:hover .t2nt-card__thumb img { transform: scale(1.04); }
.t2nt-card__thumb--placeholder {
  background: linear-gradient(135deg, var(--t2n-navy-light) 0%, var(--t2n-navy-mid) 100%);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.2);
  font-size: 2.5rem;
}

.t2nt-card__cat {
  position: absolute; top: 10px; left: 10px;
  background: var(--t2n-red); color: #fff;
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 8px; border-radius: 4px;
}

.t2nt-card__body {
  padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px;
}
.t2nt-card__meta {
  display: flex; align-items: center; gap: 10px;
  font-size: .78rem; color: var(--t2n-text-muted);
}
.t2nt-card__meta time { display: flex; align-items: center; gap: 4px; }

.t2nt-card__title {
  font-size: 1rem; font-weight: 700;
  line-height: 1.35; color: var(--t2n-text);
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
  transition: color var(--t2n-transition);
}
.t2nt-card:hover .t2nt-card__title { color: var(--t2n-red); }

.t2nt-card__excerpt {
  font-size: .875rem; color: var(--t2n-text-muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}

.t2nt-card__footer {
  padding: 0 16px 14px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: .78rem; color: var(--t2n-text-muted);
}
.t2nt-card__read-more {
  color: var(--t2n-red); font-weight: 600;
  display: flex; align-items: center; gap: 4px;
  transition: gap var(--t2n-transition);
}
.t2nt-card:hover .t2nt-card__read-more { gap: 8px; }

/* Card sizes */
.t2nt-card--lg .t2nt-card__title { font-size: 1.3rem; -webkit-line-clamp: 4; }
.t2nt-card--sm .t2nt-card__thumb { aspect-ratio: 3/2; }
.t2nt-card--sm .t2nt-card__title { font-size: .9rem; -webkit-line-clamp: 2; }
.t2nt-card--horizontal {
  flex-direction: row; align-items: stretch;
}
.t2nt-card--horizontal .t2nt-card__thumb {
  width: 100px; min-width: 100px; aspect-ratio: auto;
}
.t2nt-card--horizontal .t2nt-card__thumb img { height: 100%; }
.t2nt-card--horizontal .t2nt-card__body { padding: 12px; }
.t2nt-card--horizontal .t2nt-card__title { font-size: .875rem; -webkit-line-clamp: 3; }

/* ============================================================
   HOMEPAGE LAYOUT
   ============================================================ */
.t2nt-page-home { padding-bottom: 48px; }

.t2nt-home-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  margin-top: 32px;
}

.t2nt-section { margin-bottom: 40px; }

/* Karte Grid 3 Spalten */
.t2nt-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Karte Grid 4 Spalten */
.t2nt-cards-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.t2nt-sidebar { display: flex; flex-direction: column; gap: 28px; }

.t2nt-widget {
  background: var(--t2n-bg-card);
  border-radius: var(--t2n-radius-lg);
  overflow: hidden;
  box-shadow: var(--t2n-shadow-sm);
}
.t2nt-widget__head {
  background: var(--t2n-navy);
  padding: 14px 18px;
  display: flex; align-items: center; gap: 8px;
}
.t2nt-widget__head h3 {
  font-size: .9rem; font-weight: 700;
  color: #fff; letter-spacing: .02em;
  text-transform: uppercase;
}
.t2nt-widget__head .t2nt-icon {
  width: 18px; height: 18px; color: var(--t2n-red-light);
  flex-shrink: 0;
}
.t2nt-widget__body { padding: 16px; }

/* Trending list */
.t2nt-trending-list { display: flex; flex-direction: column; gap: 4px; }
.t2nt-trending-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 8px; border-radius: 8px;
  transition: background var(--t2n-transition);
  cursor: pointer;
}
.t2nt-trending-item:hover { background: var(--t2n-bg); }
.t2nt-trending-item__num {
  font-size: 1.5rem; font-weight: 900;
  color: var(--t2n-border); line-height: 1;
  min-width: 28px; text-align: center;
}
.t2nt-trending-item:nth-child(1) .t2nt-trending-item__num { color: var(--t2n-red); }
.t2nt-trending-item:nth-child(2) .t2nt-trending-item__num { color: #e67e22; }
.t2nt-trending-item:nth-child(3) .t2nt-trending-item__num { color: #f1c40f; }
.t2nt-trending-item__thumb {
  width: 70px; height: 52px; border-radius: 6px;
  overflow: hidden; flex-shrink: 0;
  background: var(--t2n-bg);
}
.t2nt-trending-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.t2nt-trending-item__title {
  font-size: .85rem; font-weight: 600; line-height: 1.3;
  color: var(--t2n-text);
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}
.t2nt-trending-item__meta {
  font-size: .72rem; color: var(--t2n-text-muted); margin-top: 4px;
}

/* Category list widget */
.t2nt-cat-list { display: flex; flex-direction: column; }
.t2nt-cat-list a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 8px; border-radius: 8px;
  font-size: .875rem; font-weight: 500;
  transition: background var(--t2n-transition), color var(--t2n-transition);
  border-bottom: 1px solid var(--t2n-border);
}
.t2nt-cat-list a:last-child { border-bottom: 0; }
.t2nt-cat-list a:hover { background: var(--t2n-bg); color: var(--t2n-red); }
.t2nt-cat-list a span {
  background: var(--t2n-bg); color: var(--t2n-text-muted);
  font-size: .72rem; font-weight: 700;
  padding: 2px 8px; border-radius: 12px;
}

/* Newsletter widget */
.t2nt-newsletter {
  background: linear-gradient(135deg, var(--t2n-navy) 0%, var(--t2n-navy-light) 100%);
  border-radius: var(--t2n-radius-lg);
  padding: 24px 20px; text-align: center;
  color: #fff;
}
.t2nt-newsletter h3 {
  font-size: 1.05rem; font-weight: 800; margin-bottom: 8px;
}
.t2nt-newsletter p {
  font-size: .82rem; opacity: .75; margin-bottom: 16px;
}
.t2nt-newsletter form { display: flex; flex-direction: column; gap: 8px; }
.t2nt-newsletter input[type="email"] {
  height: 44px; padding: 0 14px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px; color: #fff; font-size: .9rem;
  outline: none;
}
.t2nt-newsletter input[type="email"]::placeholder { color: rgba(255,255,255,.45); }
.t2nt-newsletter input[type="email"]:focus { border-color: var(--t2n-red-light); }
.t2nt-newsletter button {
  height: 44px; background: var(--t2n-red); color: #fff;
  border-radius: 8px; font-weight: 700; font-size: .9rem;
  transition: background var(--t2n-transition);
}
.t2nt-newsletter button:hover { background: var(--t2n-red-dark); }

/* ============================================================
   SINGLE POST
   ============================================================ */
.t2nt-single { padding: 32px 0 48px; }

.t2nt-single__layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}
.t2nt-single__layout--wide { grid-template-columns: 1fr; }
.t2nt-single__layout--wide .t2nt-article { max-width: 100%; }
.t2nt-single__layout--centered { grid-template-columns: 1fr; }
.t2nt-single__layout--centered .t2nt-article { max-width: 780px; margin: 0 auto; }

.t2nt-single__hero {
  margin-bottom: 28px;
}
.t2nt-single__hero-img {
  width: 100%; aspect-ratio: 16/7;
  object-fit: cover; border-radius: var(--t2n-radius-lg);
  box-shadow: var(--t2n-shadow);
}

.t2nt-single__header { margin-bottom: 24px; }
.t2nt-single__cats {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 14px;
}
.t2nt-single__cat {
  background: var(--t2n-red); color: #fff;
  font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 4px 10px; border-radius: 5px;
  transition: background var(--t2n-transition);
}
.t2nt-single__cat:hover { background: var(--t2n-red-dark); }

.t2nt-single__title {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 900; line-height: 1.2;
  letter-spacing: -.4px; margin-bottom: 16px;
}

.t2nt-single__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  padding: 14px 0; border-top: 1px solid var(--t2n-border);
  border-bottom: 1px solid var(--t2n-border);
  font-size: .85rem; color: var(--t2n-text-muted);
}
.t2nt-single__meta-item { display: flex; align-items: center; gap: 6px; }
.t2nt-single__meta-item svg { width: 15px; height: 15px; opacity: .6; }
.t2nt-single__author { display: flex; align-items: center; gap: 8px; }
.t2nt-single__author img {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
}
.t2nt-single__author-name { font-weight: 600; color: var(--t2n-text); }

/* Article content */
.t2nt-entry-content {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--t2n-text);
}
.t2nt-entry-content > * + * { margin-top: 1.4em; }
.t2nt-entry-content h2 {
  font-size: 1.5rem; font-weight: 800; margin-top: 2em; margin-bottom: .75em;
  padding-left: 14px; border-left: 4px solid var(--t2n-red);
  letter-spacing: -.2px;
}
.t2nt-entry-content h3 {
  font-size: 1.2rem; font-weight: 700; margin-top: 1.75em; margin-bottom: .6em;
}
.t2nt-entry-content h4 {
  font-size: 1.05rem; font-weight: 700; margin-top: 1.5em;
}
.t2nt-entry-content p { margin-bottom: 1.2em; }
.t2nt-entry-content ul, .t2nt-entry-content ol {
  padding-left: 1.5em; margin-bottom: 1.2em;
}
.t2nt-entry-content ul { list-style: disc; }
.t2nt-entry-content ol { list-style: decimal; }
.t2nt-entry-content li { margin-bottom: .4em; }
.t2nt-entry-content blockquote {
  margin: 1.6em 0;
  padding: 16px 20px 16px 24px;
  background: var(--t2n-bg);
  border-left: 4px solid var(--t2n-red);
  border-radius: 0 8px 8px 0;
  font-style: italic; font-size: 1.05rem;
  color: var(--t2n-text-muted);
}
.t2nt-entry-content a { color: var(--t2n-red); text-decoration: underline; text-underline-offset: 3px; }
.t2nt-entry-content a:hover { color: var(--t2n-red-dark); }
.t2nt-entry-content img {
  border-radius: var(--t2n-radius); box-shadow: var(--t2n-shadow-sm);
}
.t2nt-entry-content table {
  width: 100%; border-collapse: collapse; font-size: .9rem;
}
.t2nt-entry-content th, .t2nt-entry-content td {
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--t2n-border);
}
.t2nt-entry-content th { font-weight: 700; background: var(--t2n-bg); }
.t2nt-entry-content strong { font-weight: 700; }
.t2nt-entry-content em { font-style: italic; }
.t2nt-entry-content code {
  background: var(--t2n-bg); padding: 2px 6px; border-radius: 4px;
  font-size: .875em; font-family: 'Courier New', monospace;
}
.t2nt-entry-content pre {
  background: var(--t2n-navy); color: #e0e0e0; padding: 20px;
  border-radius: var(--t2n-radius); overflow-x: auto; font-size: .875rem;
}

/* Reading progress bar */
.t2nt-progress-bar {
  position: fixed; top: 0; left: 0; z-index: 9999;
  width: 0%; height: 3px;
  background: var(--t2n-red);
  transition: width .1s linear;
  pointer-events: none;
}

/* Share bar */
.t2nt-share {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin: 28px 0; padding: 20px;
  background: var(--t2n-bg); border-radius: var(--t2n-radius-lg);
}
.t2nt-share__label { font-size: .85rem; font-weight: 700; color: var(--t2n-text-muted); }
.t2nt-share__btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px;
  font-size: .82rem; font-weight: 700;
  transition: opacity var(--t2n-transition), transform var(--t2n-transition);
  color: #fff; text-decoration: none;
}
.t2nt-share__btn:hover { opacity: .85; transform: translateY(-1px); color: #fff; }
.t2nt-share__btn--fb  { background: #1877f2; }
.t2nt-share__btn--tw  { background: #000; }
.t2nt-share__btn--wa  { background: #25d366; }
.t2nt-share__btn--li  { background: #0a66c2; }
.t2nt-share__btn--copy {
  background: var(--t2n-bg-card); color: var(--t2n-text);
  border: 1px solid var(--t2n-border);
}
.t2nt-share__btn--copy:hover { color: var(--t2n-text); }
.t2nt-share__btn svg { width: 15px; height: 15px; fill: currentColor; }

/* Tags */
.t2nt-tags {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 24px;
}
.t2nt-tags__label { font-size: .82rem; font-weight: 700; color: var(--t2n-text-muted); }
.t2nt-tag {
  display: inline-block; padding: 5px 12px;
  background: var(--t2n-bg); border-radius: 20px;
  font-size: .8rem; font-weight: 500; color: var(--t2n-text-muted);
  border: 1px solid var(--t2n-border);
  transition: background var(--t2n-transition), color var(--t2n-transition);
}
.t2nt-tag:hover { background: var(--t2n-red); color: #fff; border-color: var(--t2n-red); }

/* Related articles */
.t2nt-related { margin-top: 48px; padding-top: 32px; border-top: 2px solid var(--t2n-border); }

/* Author box */
.t2nt-author-box {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 24px; margin-top: 32px;
  background: var(--t2n-bg-card);
  border-radius: var(--t2n-radius-lg);
  box-shadow: var(--t2n-shadow-sm);
  border-left: 4px solid var(--t2n-red);
}
.t2nt-author-box__avatar {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 3px solid var(--t2n-border);
}
.t2nt-author-box__name { font-size: 1rem; font-weight: 800; margin-bottom: 4px; }
.t2nt-author-box__bio { font-size: .875rem; color: var(--t2n-text-muted); line-height: 1.55; }

/* ============================================================
   ARCHIVE / CATEGORY PAGE
   ============================================================ */
.t2nt-archive { padding: 32px 0 48px; }

.t2nt-archive__layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

.t2nt-archive__header {
  padding: 28px;
  background: linear-gradient(135deg, var(--t2n-navy) 0%, var(--t2n-navy-light) 100%);
  border-radius: var(--t2n-radius-lg);
  color: #fff; margin-bottom: 28px;
}
.t2nt-archive__header .t2nt-cat-icon {
  font-size: 2rem; margin-bottom: 8px;
}
.t2nt-archive__header h1 {
  font-size: 1.75rem; font-weight: 900; letter-spacing: -.4px;
}
.t2nt-archive__header p {
  font-size: .9rem; opacity: .7; margin-top: 6px;
}
.t2nt-archive__count {
  display: inline-block; background: var(--t2n-red);
  padding: 4px 12px; border-radius: 20px;
  font-size: .8rem; font-weight: 700;
  margin-top: 10px;
}

.t2nt-posts-list { display: flex; flex-direction: column; gap: 20px; }

.t2nt-pagination {
  display: flex; justify-content: center; align-items: center; gap: 6px;
  margin-top: 36px;
}
.t2nt-pagination a, .t2nt-pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 8px;
  font-size: .9rem; font-weight: 600;
  border: 1px solid var(--t2n-border);
  background: var(--t2n-bg-card);
  transition: background var(--t2n-transition), color var(--t2n-transition), border-color var(--t2n-transition);
}
.t2nt-pagination a:hover { background: var(--t2n-red); color: #fff; border-color: var(--t2n-red); }
.t2nt-pagination .current, .t2nt-pagination span.current {
  background: var(--t2n-red); color: #fff; border-color: var(--t2n-red);
}
.t2nt-pagination .prev, .t2nt-pagination .next { width: auto; padding: 0 14px; gap: 4px; }

/* ============================================================
   SEARCH PAGE
   ============================================================ */
.t2nt-search-header {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--t2n-border);
  margin-bottom: 28px;
}
.t2nt-search-header h1 { font-size: 1.5rem; font-weight: 800; }
.t2nt-search-header p { font-size: .9rem; color: var(--t2n-text-muted); margin-top: 6px; }
.t2nt-search-form-large {
  display: flex; gap: 10px; margin-top: 20px;
}
.t2nt-search-form-large input[type="search"] {
  flex: 1; height: 50px; padding: 0 18px;
  background: var(--t2n-bg-card);
  border: 2px solid var(--t2n-border);
  border-radius: 10px; font-size: 1rem;
  color: var(--t2n-text); outline: none;
  transition: border-color var(--t2n-transition);
}
.t2nt-search-form-large input:focus { border-color: var(--t2n-red); }
.t2nt-search-form-large button {
  height: 50px; padding: 0 24px;
  background: var(--t2n-red); color: #fff;
  border-radius: 10px; font-weight: 700;
  transition: background var(--t2n-transition);
}
.t2nt-search-form-large button:hover { background: var(--t2n-red-dark); }

/* ============================================================
   404 PAGE
   ============================================================ */
.t2nt-404 {
  padding: 80px 0; text-align: center;
}
.t2nt-404__code {
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 900; color: var(--t2n-red);
  line-height: 1; letter-spacing: -4px;
  opacity: .15;
}
.t2nt-404__title { font-size: 1.75rem; font-weight: 800; margin-bottom: 12px; }
.t2nt-404__text { font-size: 1rem; color: var(--t2n-text-muted); max-width: 480px; margin: 0 auto 28px; }
.t2nt-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px;
  font-weight: 700; font-size: .95rem;
  background: var(--t2n-red); color: #fff;
  transition: background var(--t2n-transition), transform var(--t2n-transition);
}
.t2nt-btn:hover { background: var(--t2n-red-dark); transform: translateY(-1px); color: #fff; }

/* ============================================================
   FOOTER
   ============================================================ */
.t2nt-footer {
  background: var(--t2n-navy);
  color: rgba(255,255,255,.7);
  margin-top: 48px;
}
.t2nt-footer__top {
  padding: 48px 0 32px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.t2nt-footer__brand .t2nt-logo { margin-bottom: 14px; }
.t2nt-footer__brand p { font-size: .875rem; line-height: 1.65; }

.t2nt-footer__col h4 {
  font-size: .8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255,255,255,.45);
  margin-bottom: 14px;
}
.t2nt-footer__col ul { display: flex; flex-direction: column; gap: 8px; }
.t2nt-footer__col a {
  font-size: .875rem; color: rgba(255,255,255,.65);
  transition: color var(--t2n-transition);
}
.t2nt-footer__col a:hover { color: #fff; }

.t2nt-footer__social {
  display: flex; gap: 8px; margin-top: 16px;
}
.t2nt-footer__social a {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.65);
  transition: background var(--t2n-transition), color var(--t2n-transition);
}
.t2nt-footer__social a:hover { background: var(--t2n-red); color: #fff; }
.t2nt-footer__social svg { width: 16px; height: 16px; fill: currentColor; }

.t2nt-footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; flex-wrap: wrap; gap: 12px;
  font-size: .8rem;
}
.t2nt-footer__bottom a { color: rgba(255,255,255,.5); transition: color var(--t2n-transition); }
.t2nt-footer__bottom a:hover { color: #fff; }
.t2nt-footer__links { display: flex; gap: 20px; }

/* ============================================================
   COMMENTS
   ============================================================ */
.t2nt-comments { margin-top: 40px; padding-top: 32px; border-top: 2px solid var(--t2n-border); }
.t2nt-comments h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 20px; }

.comment-list { list-style: none; }
.comment { margin-bottom: 24px; }
.comment-body { padding: 18px; background: var(--t2n-bg-card); border-radius: var(--t2n-radius); }
.comment-author { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-author img { border-radius: 50%; }
.comment-meta { font-size: .8rem; color: var(--t2n-text-muted); }
.comment-content { font-size: .9rem; line-height: 1.6; }
.reply { margin-top: 8px; }
.reply a { font-size: .8rem; color: var(--t2n-red); font-weight: 600; }

/* Comment form */
.comment-respond { margin-top: 32px; }
.comment-respond h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 16px; }
.comment-form-comment label,
.comment-form-author label,
.comment-form-email label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.comment-form-comment textarea,
.comment-form-author input,
.comment-form-email input {
  width: 100%; padding: 10px 14px;
  background: var(--t2n-bg-card);
  border: 1px solid var(--t2n-border);
  border-radius: 8px; font-size: .9rem; color: var(--t2n-text);
  outline: none; transition: border-color var(--t2n-transition);
}
.comment-form-comment textarea { min-height: 120px; resize: vertical; }
.comment-form-comment textarea:focus,
.comment-form-author input:focus,
.comment-form-email input:focus { border-color: var(--t2n-red); }
.form-submit .submit {
  height: 44px; padding: 0 24px;
  background: var(--t2n-red); color: #fff;
  border-radius: 8px; font-weight: 700; cursor: pointer;
  transition: background var(--t2n-transition);
}
.form-submit .submit:hover { background: var(--t2n-red-dark); }

/* ============================================================
   PLUGIN INTEGRATION OVERRIDES
   ============================================================ */

/* Breaking Ticker im Theme */
.t2n-breaking-ticker { border-radius: 0; margin: 0; }

/* Hero Grid Spacing */
.t2n-hero-grid { margin-bottom: 0; }

/* Category Row im Content-Bereich */
.t2nt-main-content .t2n-category-row { margin-bottom: 0; }

/* Trending Widget in Sidebar anpassen */
.t2nt-sidebar .t2n-trending-widget {
  background: var(--t2n-bg-card);
  border-radius: var(--t2n-radius-lg);
  box-shadow: var(--t2n-shadow-sm);
  overflow: hidden;
}

/* ─── Plugin components on mobile ─── */
@media (max-width: 600px) {
  /* Prevent ticker from overflowing */
  .t2n-breaking-ticker { height: 34px; }
  .t2n-ticker-label    { font-size: 10px; padding: 0 10px; }
  .t2n-ticker-item     { font-size: 12px; padding: 0 18px; }

  /* Hero main image: taller on small screens */
  .t2n-hero-image img  { height: clamp(160px, 48vw, 260px); }

  /* Category slider: negative margin to create edge-to-edge scroll */
  .t2nt-main-content .t2n-category-slider {
    margin-inline: -14px;
    padding-inline: 14px;
  }
  .t2n-category-card { min-width: 200px; }

  /* Side cards: stack instead of horizontal layout */
  .t2n-side-card { flex-direction: column; }
  .t2n-side-image img { width: 100%; height: 140px; }

  /* Trending widget items: comfortable touch target */
  .t2n-trending-item { padding: 14px 0; }
}

@media (max-width: 400px) {
  .t2n-hero-image img { height: clamp(140px, 50vw, 220px); }
  .t2n-category-card  { min-width: 175px; }
}

/* ============================================================
   MOBILE NAVIGATION
   ============================================================ */
.t2nt-mobile-nav {
  position: fixed;
  top: var(--t2n-header-h); /* JS overrides this precisely */
  right: 0; bottom: 0; left: 0;
  z-index: 199;
  background: var(--t2n-navy);
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 20px 16px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}
.t2nt-mobile-nav.is-open { transform: translateX(0); }
.t2nt-mobile-nav ul { display: flex; flex-direction: column; gap: 2px; }
.t2nt-mobile-nav li a,
.t2nt-mobile-nav > a {
  display: flex; align-items: center;
  min-height: 52px; padding: 12px 16px;
  color: rgba(255,255,255,.85);
  font-size: 1rem; font-weight: 600;
  border-radius: 10px;
  transition: background var(--t2n-transition), color var(--t2n-transition);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.t2nt-mobile-nav li:last-child > a,
.t2nt-mobile-nav > a:last-child { border-bottom: 0; }
.t2nt-mobile-nav li a:hover,
.t2nt-mobile-nav > a:hover { background: rgba(255,255,255,.10); color: #fff; }
.t2nt-mobile-nav li.current-menu-item > a { color: var(--t2n-red-light); background: rgba(192,57,43,.15); }
.t2nt-mobile-nav .menu-item-has-children > a::after { content: ' ›'; opacity: .4; margin-left: auto; }
.t2nt-mobile-nav hr { border: none; border-top: 1px solid rgba(255,255,255,.1); margin: 14px 0; }

/* Scroll lock when nav is open */
body.t2nt-nav-open { overflow: hidden; }

/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */
.t2nt-back-top {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 180;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--t2n-red);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  opacity: 0; transform: translateY(16px);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
  cursor: pointer;
}
.t2nt-back-top.is-visible {
  opacity: 1; transform: translateY(0);
  pointer-events: auto;
}
.t2nt-back-top:hover { background: var(--t2n-red-dark); transform: translateY(-2px); }

/* ============================================================
   RESPONSIVE — ≤1100px  (Large Tablet / Small Desktop)
   ============================================================ */
@media (max-width: 1100px) {
  .t2nt-home-grid         { grid-template-columns: 1fr 280px; gap: 24px; }
  .t2nt-single__layout    { grid-template-columns: 1fr 280px; gap: 28px; }
  .t2nt-archive__layout   { grid-template-columns: 1fr 280px; gap: 28px; }
  .t2nt-footer__top       { grid-template-columns: 1fr 1fr; gap: 28px; }
  .t2nt-cards-grid-4      { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   RESPONSIVE — ≤900px  (Tablet)
   ============================================================ */
@media (max-width: 900px) {
  /* Navigation */
  .t2nt-nav-primary { display: none; }
  .t2nt-hamburger   { display: flex; }

  /* Collapse all side-by-side layouts */
  .t2nt-home-grid,
  .t2nt-single__layout,
  .t2nt-archive__layout { grid-template-columns: 1fr; gap: 24px; }

  /* Sidebar flows after main content */
  .t2nt-home-grid    > .t2nt-sidebar { order: 2; }
  .t2nt-single__layout > aside        { display: none; } /* sidebar hidden; use trending widget in content */

  /* Cards 2-up */
  .t2nt-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  /* Single: full-width regardless of layout setting */
  .t2nt-single__layout--centered .t2nt-article,
  .t2nt-single__layout--wide    .t2nt-article { max-width: 100%; margin: 0; }

  /* Footer */
  .t2nt-footer__top { grid-template-columns: 1.2fr 1fr; gap: 24px; }

  /* Archive */
  .t2nt-archive__header { padding: 22px; }
  .t2nt-archive__header h1 { font-size: 1.6rem; }
}

/* ============================================================
   RESPONSIVE — ≤768px  (Mobile / Tablet boundary)
   ============================================================ */
@media (max-width: 768px) {
  /* Container breathing room */
  .t2nt-container { padding-inline: 16px; }

  /* Search bar stacks on very narrow */
  .t2nt-search-bar.is-open { max-height: 120px; }

  /* Section headings */
  .t2nt-section { margin-bottom: 28px; }
  .t2nt-section-head { margin-bottom: 14px; }
  .t2nt-section-head h2 { font-size: 1.1rem; }

  /* Single */
  .t2nt-single { padding: 22px 0 36px; }
  .t2nt-single__title { font-size: clamp(1.4rem, 5.5vw, 1.9rem); }
  .t2nt-single__header { margin-bottom: 16px; }
  .t2nt-single__meta   { gap: 10px 14px; font-size: .82rem; }
  .t2nt-single__hero   { margin-bottom: 18px; }
  .t2nt-single__hero-img { border-radius: var(--t2n-radius); }

  /* Article content */
  .t2nt-entry-content h2 { font-size: 1.25rem; padding-left: 12px; }
  .t2nt-entry-content h3 { font-size: 1.1rem; }
  /* Make tables horizontally scrollable instead of overflowing */
  .t2nt-entry-content table {
    display: block; overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  /* Share */
  .t2nt-share { padding: 14px 16px; gap: 6px; }
  .t2nt-share__btn { padding: 9px 12px; font-size: .82rem; }

  /* Author box */
  .t2nt-author-box { flex-direction: column; gap: 12px; padding: 18px; }
  .t2nt-author-box__avatar { width: 60px; height: 60px; }

  /* Footer */
  .t2nt-footer__top { grid-template-columns: 1fr 1fr; padding: 32px 0 24px; gap: 24px; }

  /* Archive */
  .t2nt-archive { padding: 22px 0 36px; }
  .t2nt-archive__header h1 { font-size: 1.4rem; }

  /* Newsletter form: stacked on smaller screens */
  .t2nt-newsletter form { flex-direction: column; gap: 8px; }
}

/* ============================================================
   RESPONSIVE — ≤600px  (Small Mobile)
   ============================================================ */
@media (max-width: 600px) {
  :root { --t2n-header-h: 56px; }

  .t2nt-container { padding-inline: 14px; }

  /* All grids → single column */
  .t2nt-cards-grid,
  .t2nt-cards-grid-4 { grid-template-columns: 1fr; gap: 14px; }

  /* Footer */
  .t2nt-footer__top {
    grid-template-columns: 1fr;
    gap: 20px; padding: 28px 0 20px;
  }
  .t2nt-footer__bottom {
    flex-direction: column; align-items: flex-start; gap: 8px;
  }
  .t2nt-footer__links { gap: 16px; }

  /* Single */
  .t2nt-single { padding: 16px 0 32px; }
  .t2nt-single__title { font-size: 1.4rem; letter-spacing: -.2px; }
  .t2nt-single__meta { padding: 10px 0; flex-wrap: wrap; gap: 8px 12px; font-size: .8rem; }
  .t2nt-single__hero { margin-bottom: 14px; }

  /* Article content */
  .t2nt-entry-content { font-size: 1rem; line-height: 1.7; }
  .t2nt-entry-content h2 {
    font-size: 1.15rem; margin-top: 1.5em; padding-left: 10px; border-left-width: 3px;
  }
  .t2nt-entry-content h3 { font-size: 1.05rem; margin-top: 1.3em; }
  .t2nt-entry-content blockquote { padding: 12px 14px 12px 18px; font-size: .95rem; }
  .t2nt-entry-content pre { padding: 12px 14px; font-size: .78rem; }

  /* Share: buttons stretch to fill row */
  .t2nt-share { flex-wrap: wrap; padding: 12px; gap: 8px; }
  .t2nt-share__label { width: 100%; margin-bottom: 2px; }
  .t2nt-share__btn   { flex: 1; min-width: calc(50% - 8px); justify-content: center; padding: 10px 8px; }

  /* Tags */
  .t2nt-tags { gap: 6px; margin-top: 16px; }

  /* Author box */
  .t2nt-author-box { padding: 16px; }
  .t2nt-author-box__avatar { width: 52px; height: 52px; }

  /* Related */
  .t2nt-related { margin-top: 28px; padding-top: 20px; }

  /* Comments */
  .t2nt-comments { margin-top: 20px; padding-top: 20px; }

  /* Archive */
  .t2nt-archive { padding: 14px 0 28px; }
  .t2nt-archive__header { padding: 16px; margin-bottom: 16px; }
  .t2nt-archive__header h1 { font-size: 1.25rem; }
  .t2nt-archive__header p  { font-size: .85rem; }

  /* Pagination */
  .t2nt-pagination { gap: 4px; flex-wrap: wrap; }
  .t2nt-pagination a,
  .t2nt-pagination span { width: 36px; height: 36px; font-size: .85rem; border-radius: 6px; }
  .t2nt-pagination .prev,
  .t2nt-pagination .next { padding: 0 10px; width: auto; }

  /* Search page */
  .t2nt-search-header { padding: 18px 0 14px; }
  .t2nt-search-form-large { flex-direction: column; gap: 8px; }
  .t2nt-search-form-large button { width: 100%; }

  /* 404 */
  .t2nt-404 { padding: 40px 0; }
  .t2nt-404__title { font-size: 1.4rem; }

  /* Widget */
  .t2nt-widget__body { padding: 12px; }

  /* Section head */
  .t2nt-section-head h2 { font-size: 1rem; }
  .t2nt-section-head a  { font-size: .78rem; }

  /* Mobile nav: larger touch targets */
  .t2nt-mobile-nav li a,
  .t2nt-mobile-nav > a { font-size: 1.05rem; min-height: 56px; }

  /* Back to top: closer to edge */
  .t2nt-back-top { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
}

/* ============================================================
   RESPONSIVE — ≤400px  (Very Small / Compact Phones)
   ============================================================ */
@media (max-width: 400px) {
  .t2nt-container { padding-inline: 12px; }
  .t2nt-single__title { font-size: 1.25rem; }

  /* Share: icon-only on tiny screens */
  .t2nt-share__text { display: none; }
  .t2nt-share__btn  { min-width: 44px; padding: 10px; flex: 0 0 44px; justify-content: center; }
  .t2nt-share__btn svg { width: 18px; height: 18px; }

  .t2nt-footer__links { gap: 10px; flex-wrap: wrap; }
  .t2nt-pagination a,
  .t2nt-pagination span { width: 32px; height: 32px; font-size: .78rem; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .t2nt-header, .t2nt-catbar, .t2nt-mobile-nav,
  .t2nt-share, .t2nt-related, .t2nt-sidebar, .t2nt-footer,
  .t2nt-progress-bar, .t2nt-back-top { display: none !important; }
  .t2nt-single__layout { grid-template-columns: 1fr; }
  .t2nt-entry-content { font-size: .9rem; line-height: 1.6; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}

/* ============================================================
   WORDPRESS CORE HELPERS
   ============================================================ */
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .8rem; color: var(--t2n-text-muted); text-align: center; margin-top: 6px; }
.alignleft { float: left; margin: 0 20px 16px 0; }
.alignright { float: right; margin: 0 0 16px 20px; }
.aligncenter { display: block; margin: 0 auto 16px; }
.sticky { }
.bypostauthor { }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
