/* ═══════════════════════════════════════════════════
   Triff-Chemnitz CMS · Stylesheet
   Hell/Klassisch Design
   ═══════════════════════════════════════════════════ */

:root {
  --primary:    #1a6fc4;
  --primary-d:  #1559a0;
  --primary-l:  #e8f0fb;
  --accent:     #e8650a;
  --bg:         #f0f2f5;
  --bg2:        #ffffff;
  --border:     #dde1e7;
  --text:       #1c1e21;
  --text-muted: #65676b;
  --red:        #e41c23;
  --green:      #2d9c3e;
  --radius:     8px;
  --shadow:     0 1px 3px rgba(0,0,0,.1);
  --shadow-md:  0 2px 8px rgba(0,0,0,.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: 'Open Sans', sans-serif; line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
input, textarea, select, button { font-family: inherit; font-size: 1rem; }
::-webkit-scrollbar { width: 6px; } ::-webkit-scrollbar-thumb { background: #bbb; border-radius: 3px; }

/* ── LAYOUT ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.row { display: flex; gap: 20px; }
.col-main { flex: 1; min-width: 0; }
.col-side { width: 300px; flex-shrink: 0; }
@media (max-width: 768px) { .row { flex-direction: column; } .col-side { width: 100%; } }

/* ── HEADER ── */
.site-header { background: var(--primary); color: #fff; position: sticky; top: 0; z-index: 200; box-shadow: var(--shadow-md); }
.header-inner { display: flex; align-items: center; gap: 12px; height: 56px; }
.site-logo { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; font-size: 1.1rem; text-decoration: none; white-space: nowrap; }
.site-logo:hover { text-decoration: none; }
.logo-icon { font-size: 1.4rem; }
.logo-text span { color: #ffd080; }
.header-search { flex: 1; max-width: 400px; display: flex; background: rgba(255,255,255,.15); border-radius: 20px; overflow: hidden; }
.header-search input { flex: 1; background: none; border: none; color: #fff; padding: 8px 14px; outline: none; }
.header-search input::placeholder { color: rgba(255,255,255,.6); }
.header-search button { background: none; border: none; color: #fff; padding: 8px 12px; cursor: pointer; }
.header-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-icon-btn { position: relative; background: rgba(255,255,255,.15); border: none; border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; text-decoration: none; font-size: 1rem; transition: background .2s; }
.nav-icon-btn:hover { background: rgba(255,255,255,.25); text-decoration: none; }
.badge { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; font-size: .62rem; font-weight: 700; border-radius: 10px; padding: 1px 5px; min-width: 16px; text-align: center; }
.nav-user-menu { position: relative; }
.nav-user-btn { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.15); border: none; border-radius: 20px; padding: 4px 10px 4px 4px; color: #fff; cursor: pointer; font-size: .88rem; font-weight: 600; }
.nav-user-btn:hover { background: rgba(255,255,255,.25); }
.nav-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.dropdown-menu { display: none; position: absolute; top: calc(100% + 8px); right: 0; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); min-width: 190px; z-index: 300; overflow: hidden; }
.dropdown-menu.open { display: block; }
.dropdown-menu a { display: flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--text); font-size: .9rem; transition: background .15s; }
.dropdown-menu a:hover { background: var(--bg); text-decoration: none; }
.dropdown-menu .text-red { color: var(--red); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.hamburger { display: none; background: none; border: none; color: #fff; font-size: 1.3rem; cursor: pointer; }
@media (max-width: 768px) { .header-search { display: none; } .hamburger { display: block; } }

/* ── MAIN NAV ── */
.main-nav { background: var(--bg2); border-bottom: 1px solid var(--border); }
.main-nav-list { display: flex; list-style: none; overflow-x: auto; }
.main-nav-list li a { display: block; padding: 12px 16px; color: var(--text-muted); font-size: .88rem; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; transition: all .2s; }
.main-nav-list li a:hover, .main-nav-list li a.active { color: var(--primary); border-bottom-color: var(--primary); text-decoration: none; }
@media (max-width: 768px) {
  .main-nav-list { flex-direction: column; display: none; }
  .main-nav-list.open { display: flex; }
  .main-nav-list li a { border-bottom: 1px solid var(--border); border-left: 3px solid transparent; }
  .main-nav-list li a.active { border-left-color: var(--primary); border-bottom-color: var(--border); }
}

/* ── SITE MAIN ── */
.site-main { padding: 20px 0 40px; min-height: calc(100vh - 200px); }

/* ── CARDS ── */
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden; }
.card-head { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-head h3 { font-size: 1rem; font-weight: 700; }
.card-body { padding: 16px; }
.card-foot { padding: 12px 16px; border-top: 1px solid var(--border); background: #fafafa; }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 6px; border: none; font-size: .9rem; font-weight: 600; cursor: pointer; transition: all .2s; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); }
.btn-outline { background: transparent; border: 1.5px solid #fff; color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.15); }
.btn-secondary { background: var(--bg); border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { background: #e4e6eb; }
.btn-danger { background: var(--red); color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: .8rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── FORMS ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
.form-control { width: 100%; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 6px; background: var(--bg2); color: var(--text); transition: border-color .2s; }
.form-control:focus { outline: none; border-color: var(--primary); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-help { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: .8rem; color: var(--red); margin-top: 4px; }

/* ── FLASH ── */
.flash { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; position: fixed; top: 70px; left: 50%; transform: translateX(-50%); min-width: 300px; border-radius: var(--radius); box-shadow: var(--shadow-md); z-index: 500; }
.flash button { background: none; border: none; cursor: pointer; font-size: 1rem; margin-left: 12px; }
.flash-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.flash-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ── POST / TIMELINE ── */
.post-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; box-shadow: var(--shadow); }
.post-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.post-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.post-meta { flex: 1; }
.post-author { font-weight: 700; color: var(--text); font-size: .95rem; }
.post-author:hover { text-decoration: underline; }
.post-time { font-size: .78rem; color: var(--text-muted); }
.post-body { padding: 0 16px 12px; font-size: .95rem; line-height: 1.65; }
.post-image { width: 100%; max-height: 400px; object-fit: cover; margin-top: 10px; border-radius: 6px; }
.post-actions { display: flex; border-top: 1px solid var(--border); }
.post-action-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border: none; background: none; color: var(--text-muted); font-weight: 600; font-size: .88rem; cursor: pointer; transition: background .15s; border-radius: 0; }
.post-action-btn:hover { background: var(--bg); color: var(--primary); }
.post-action-btn.liked { color: var(--primary); }
.post-comments { border-top: 1px solid var(--border); padding: 12px 16px; }
.comment-item { display: flex; gap: 8px; margin-bottom: 10px; }
.comment-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-bubble { background: var(--bg); border-radius: 16px; padding: 8px 12px; flex: 1; }
.comment-author { font-weight: 700; font-size: .85rem; }
.comment-text { font-size: .9rem; }
.comment-form { display: flex; gap: 8px; margin-top: 10px; }
.comment-form input { flex: 1; border: 1.5px solid var(--border); border-radius: 20px; padding: 7px 14px; outline: none; }
.comment-form input:focus { border-color: var(--primary); }
.comment-form button { background: var(--primary); color: #fff; border: none; border-radius: 50%; width: 36px; height: 36px; cursor: pointer; font-size: 1rem; }

/* ── WRITE POST ── */
.write-post { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 16px; box-shadow: var(--shadow); }
.write-post-inner { display: flex; gap: 10px; align-items: flex-start; }
.write-post textarea { flex: 1; border: 1.5px solid var(--border); border-radius: 20px; padding: 10px 14px; resize: none; outline: none; font-size: .95rem; min-height: 44px; }
.write-post textarea:focus { border-color: var(--primary); border-radius: 8px; }
.write-post-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }

/* PROFILE */
.profile-cover { 
  height: 200px; 
  background: linear-gradient(135deg, var(--primary), var(--primary-d)); 
  border-radius: var(--radius) var(--radius) 0 0; 
  position: relative; 
  overflow: visible; /* ALT: hidden → NEU: visible */
}
.profile-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.profile-info-bar { 
  background: var(--bg2); 
  border: 1px solid var(--border); 
  border-top: none; 
  border-radius: 0 0 var(--radius) var(--radius); 
  padding: 0 20px 16px; 
  margin-bottom: 16px; 
}
.profile-avatar-wrap { 
  display: flex; 
  align-items: flex-end; 
  gap: 14px; 
  margin-top: -55px; 
  margin-bottom: 10px; 
  position: relative; 
  z-index: 2; 
}
.profile-avatar { 
  width: 110px; 
  height: 110px; 
  border-radius: 50%; 
  border: 4px solid #fff; 
  object-fit: cover; 
  box-shadow: 0 2px 8px rgba(0,0,0,.2); 
}.profile-name { font-size: 1.3rem; font-weight: 700; }
.profile-bio { color: var(--text-muted); font-size: .9rem; }
.profile-stats { display: flex; gap: 20px; margin-top: 10px; }
.profile-stat { text-align: center; }
.profile-stat strong { display: block; font-size: 1.1rem; }
.profile-stat span { font-size: .78rem; color: var(--text-muted); }

/* ── FORUM ── */
.forum-category { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; }
.forum-cat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--primary-l); border-bottom: 1px solid var(--border); }
.forum-cat-icon { font-size: 1.4rem; }
.forum-cat-name { font-weight: 700; font-size: 1rem; color: var(--primary); }
.forum-cat-desc { font-size: .82rem; color: var(--text-muted); }
.forum-topic { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); transition: background .15s; }
.forum-topic:last-child { border-bottom: none; }
.forum-topic:hover { background: var(--bg); }
.forum-topic-icon { font-size: 1.2rem; flex-shrink: 0; }
.forum-topic-main { flex: 1; min-width: 0; }
.forum-topic-title { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.forum-topic-title:hover { color: var(--primary); }
.forum-topic-meta { font-size: .78rem; color: var(--text-muted); }
.forum-topic-stats { display: flex; gap: 16px; font-size: .82rem; color: var(--text-muted); flex-shrink: 0; text-align: right; }
.pinned-badge { font-size: .7rem; background: var(--primary); color: #fff; padding: 1px 6px; border-radius: 10px; margin-left: 6px; }
.locked-badge { font-size: .7rem; background: #888; color: #fff; padding: 1px 6px; border-radius: 10px; margin-left: 6px; }

/* ── BLOG ── */
.blog-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; box-shadow: var(--shadow); display: flex; }
.blog-card-img { width: 200px; flex-shrink: 0; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 16px; flex: 1; }
.blog-category { font-size: .75rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .5px; }
.blog-title { font-size: 1.1rem; font-weight: 700; margin: 6px 0; line-height: 1.35; }
.blog-title a { color: var(--text); }
.blog-title a:hover { color: var(--primary); text-decoration: none; }
.blog-excerpt { font-size: .88rem; color: var(--text-muted); line-height: 1.6; }
.blog-meta { display: flex; gap: 14px; margin-top: 10px; font-size: .78rem; color: var(--text-muted); }
@media (max-width: 600px) { .blog-card { flex-direction: column; } .blog-card-img { width: 100%; height: 160px; } }

/* ── EVENTS ── */
.event-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.event-date-badge { background: var(--primary); color: #fff; text-align: center; padding: 10px; flex-shrink: 0; width: 60px; }
.event-date-badge .day { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.event-date-badge .month { font-size: .7rem; text-transform: uppercase; }
.event-body { padding: 14px; flex: 1; }
.event-title { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.event-meta { font-size: .8rem; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }

/* ── CHAT ── */
.chat-wrap { display: flex; height: 500px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg2); }
.chat-sidebar { width: 200px; border-right: 1px solid var(--border); padding: 10px; background: var(--bg); }
.chat-messages { flex: 1; display: flex; flex-direction: column; }
.chat-msg-list { flex: 1; overflow-y: auto; padding: 12px; }
.chat-msg { display: flex; gap: 8px; margin-bottom: 10px; }
.chat-msg-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.chat-msg-bubble { background: var(--bg); border-radius: 12px; padding: 6px 10px; max-width: 70%; }
.chat-msg-name { font-size: .75rem; font-weight: 700; color: var(--primary); }
.chat-msg-text { font-size: .9rem; }
.chat-msg-time { font-size: .68rem; color: var(--text-muted); }
.chat-input { border-top: 1px solid var(--border); padding: 10px; display: flex; gap: 8px; }
.chat-input input { flex: 1; border: 1.5px solid var(--border); border-radius: 20px; padding: 8px 14px; outline: none; }
.chat-input input:focus { border-color: var(--primary); }
.chat-input button { background: var(--primary); color: #fff; border: none; border-radius: 50%; width: 38px; height: 38px; cursor: pointer; font-size: 1rem; }

/* ── MEMBERS ── */
.member-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; box-shadow: var(--shadow); }
.member-avatar { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; }
.member-name { font-weight: 700; margin-bottom: 4px; }
.member-role { font-size: .78rem; color: var(--text-muted); }
.online-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); display: inline-block; margin-right: 4px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
@media (max-width: 768px) { .grid-3,.grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px) { .grid-3,.grid-4 { grid-template-columns: 1fr; } }

/* ── WIDGETS (SIDEBAR) ── */
.widget { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; box-shadow: var(--shadow); }
.widget-title { padding: 12px 14px; font-weight: 700; font-size: .9rem; border-bottom: 1px solid var(--border); background: var(--bg); }
.widget-body { padding: 14px; }
.widget-list {list-style: none;padding: 15px;}
.widget-list li { padding: 7px 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.widget-list li:last-child { border-bottom: none; }

/* ── PAGINATION ── */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 20px; }
.pagination a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-weight: 600; transition: all .2s; }
.pagination a:hover { background: var(--primary-l); border-color: var(--primary); text-decoration: none; }
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── ALERTS ── */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: .9rem; }
.alert-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.alert-danger  { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ── BADGES ── */
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: .75rem; font-weight: 700; background: var(--primary-l); color: var(--primary); margin-right: 4px; }
.tag-admin { background: #fde8e8; color: var(--red); }
.tag-mod   { background: #e8f4e8; color: var(--green); }

/* ── ADMIN ── */
.admin-stat { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.admin-stat-num { font-size: 2rem; font-weight: 700; color: var(--primary); }
.admin-stat-lbl { font-size: .82rem; color: var(--text-muted); }

/* ── FOOTER ── */
.site-footer { background: #1c1e21; color: #ccc; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: repeat(4,1fr); gap: 30px; padding: 40px 0 30px; }
.footer-logo { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 10px; }
.footer-logo span { color: #ffd080; }
.footer-col p { font-size: .85rem; line-height: 1.7; color: #aaa; }
.footer-col h4 { color: #fff; font-size: .9rem; margin-bottom: 12px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 7px; }
.footer-col ul li a { color: #aaa; font-size: .85rem; }
.footer-col ul li a:hover { color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid #333; padding: 16px 0; text-align: center; font-size: .82rem; color: #777; }
.footer-bottom a { color: #999; }
@media (max-width: 768px) { .footer-inner { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px) { .footer-inner { grid-template-columns: 1fr; } }

/* ── UTILS ── */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-red    { color: var(--red); }
.text-green  { color: var(--green); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.fw-bold { font-weight: 700; }
.fs-sm { font-size: .85rem; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }


@media only screen and (max-width: 767px) {
   #hide_in_mobile{
	   display:none;
   }
    }
	@media only screen and (min-width:768px){
		#show_in_mobile{
			  display:none;
		}
	}
	#show_in_mobile{
		float:right;
		margin-top:6px;
	}

@media only screen and (max-width: 767px) {
   #hide_in_desktop{
	   display:none;
   }
    }
	@media only screen and (min-width:768px){
		#show_in_desktop{
			  display:none;
		}
	}
	#show_in_desktop{
		float:right;
		margin-top:6px;
	}