:root {
  --color-primary: #c60021;
  --color-primary-dark: #a1001b;
  --color-primary-light: #fff0f2;
  --color-accent-green: #7ca82b;
  --color-accent-green-dark: #628620;
  --color-dark: #22262a;
  --color-dark-surface: #1e2124;
  --color-sidebar: #2b2f33;
  --color-text-main: #2d3748;
  --color-text-muted: #718096;
  --color-bg-page: #f0f2f5;
  --color-bg-card: #ffffff;
  --color-border: #e2e8f0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg-page);
  color: var(--color-text-main);
  line-height: 1.6;
  font-size: 15px;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* Page wrapper & container */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow-x: hidden;
}

.site-header {
  background: linear-gradient(135deg, #1f2327 0%, #2b3035 100%);
  color: #ffffff;
  border-bottom: 4px solid var(--color-primary);
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-logo img {
  height: 64px;
  width: auto;
  display: block;
}

.brand-text h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  margin-bottom: 2px;
}

.brand-text .subtext {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: #cbd5e0;
  text-transform: uppercase;
  font-weight: 600;
}

.mobile-menu-toggle {
  display: none;
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  cursor: pointer;
  font-weight: bold;
}

/* Layout 3 columns (left nav, main content, right sidebar) */
.layout-container {
  max-width: 1320px;
  width: 100%;
  margin: 20px auto;
  padding: 0 15px;
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  gap: 20px;
  flex: 1;
}

/* Sidebar navigation */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.nav-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.nav-card-header {
  background-color: var(--color-dark);
  color: #ffffff;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-left: 4px solid var(--color-primary);
}

.nav-card-header.members {
  border-left-color: var(--color-accent-green);
}

.nav-list {
  list-style: none;
}

.nav-list li {
  border-bottom: 1px solid #edf2f7;
}

.nav-list li:last-child {
  border-bottom: none;
}

.nav-list a {
  display: block;
  padding: 9px 14px;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s ease-in-out;
}

.nav-list a:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  padding-left: 18px;
  text-decoration: none;
}

.nav-list a.active {
  background-color: var(--color-primary);
  color: #ffffff;
  font-weight: 700;
}

.nav-list a.active:hover {
  background-color: var(--color-primary-dark);
}

/* Submenu */
.nav-sublist {
  list-style: none;
  background: #f8fafc;
  border-top: 1px solid #edf2f7;
}

.nav-sublist a {
  padding: 7px 14px 7px 24px;
  font-size: 0.85rem;
  color: #64748b;
}

.nav-sublist a.active {
  background-color: #e2e8f0;
  color: var(--color-primary);
  font-weight: 700;
}

/* Main Content Area */
.main-content {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  padding: 24px 28px;
  min-height: 600px;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.main-content img {
  max-width: 100%;
  height: auto;
}

.main-content h1 {
  font-size: 1.6rem;
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-accent-green);
  padding-bottom: 8px;
  margin-bottom: 20px;
  font-weight: 700;
}

.main-content h2 {
  font-size: 1.3rem;
  color: #1e293b;
  margin: 24px 0 12px 0;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 6px;
}

.main-content h3 {
  font-size: 1.1rem;
  color: #334155;
  margin: 18px 0 8px 0;
}

/* Right Sidebar (Login, Notices, Partners, etc.) */
.sidebar-right {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.widget-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.widget-header {
  background-color: var(--color-dark);
  color: #ffffff;
  padding: 9px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  border-left: 4px solid var(--color-primary);
}

.widget-body {
  padding: 14px;
}

/* Login Form Styles */
.login-form .form-group {
  margin-bottom: 10px;
}

.login-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 3px;
}

.form-control {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: border-color 0.15s;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(198, 0, 33, 0.15);
}

.btn {
  display: inline-block;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease-in-out;
  text-align: center;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  color: #ffffff;
  text-decoration: none;
}

.btn-secondary {
  background-color: #64748b;
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: #475569;
  color: #ffffff;
  text-decoration: none;
}

.btn-success {
  background-color: var(--color-accent-green);
  color: #ffffff;
}

.btn-success:hover {
  background-color: var(--color-accent-green-dark);
  color: #ffffff;
  text-decoration: none;
}

.btn-danger {
  background-color: #dc2626;
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #b91c1c;
  color: #ffffff;
  text-decoration: none;
}

.btn-sm {
  padding: 4px 8px;
  font-size: 0.8rem;
}

.btn-block {
  display: block;
  width: 100%;
}

.user-logged-box {
  text-align: center;
}

.user-logged-name {
  font-weight: 700;
  color: #1e293b;
  font-size: 1rem;
  margin-bottom: 4px;
}

.user-logged-reg {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

/* Notices / Nástěnka */
.notice-item {
  border-bottom: 1px dashed var(--color-border);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.notice-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.notice-date {
  font-size: 0.75rem;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 2px;
}

.notice-body {
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.4;
}

/* Partners & Organizing */
.partners-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.partners-grid img {
  max-width: 130px;
  filter: grayscale(15%);
  transition: transform 0.2s, filter 0.2s;
}

.partners-grid img:hover {
  filter: none;
  transform: scale(1.05);
}

/* Alert / Flash messages */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.alert-success {
  background-color: #ecfdf5;
  color: #065f46;
  border-left: 4px solid #10b981;
}

.alert-danger {
  background-color: #fef2f2;
  color: #991b1b;
  border-left: 4px solid #ef4444;
}

.alert-warning {
  background-color: #fffbeb;
  color: #92400e;
  border-left: 4px solid #f59e0b;
}

.alert-info {
  background-color: #eff6ff;
  color: #1e40af;
  border-left: 4px solid #3b82f6;
}

/* Modern tables */
.table-responsive {
  overflow-x: auto;
  margin-bottom: 20px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.table th,
.table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

.table th {
  background-color: #2b3035;
  color: #ffffff;
  font-weight: 600;
  border-bottom: 2px solid var(--color-primary);
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: #f8fafc;
}

.table tr.bgr1, .table-striped tbody tr.bgr1 {
  background-color: #ffffff;
}

.table tr.bgr2, .table-striped tbody tr.bgr2 {
  background-color: #f8fafc;
}

.table tbody tr:hover {
  background-color: var(--color-primary-light);
}

/* News cards */
.news-item {
  border-bottom: 1px solid var(--color-border);
  padding: 18px 0;
}

.news-item:first-child {
  padding-top: 0;
}

.news-item:last-child {
  border-bottom: none;
}

.news-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.news-date {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 700;
  white-space: nowrap;
}

.news-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
}

.news-body {
  font-size: 0.92rem;
  color: #334155;
  margin-bottom: 8px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.news-body img {
  max-width: 100%;
  height: auto;
}

.news-image {
  margin: 10px 0;
  max-width: min(100%, 450px);
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  display: block;
}

.news-actions {
  display: flex;
  gap: 10px;
  font-size: 0.8rem;
  margin-top: 6px;
}

/* Discussion / Board posts */
.discussion-post {
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.post-author {
  font-weight: 700;
  color: #1e293b;
}

.post-date {
  color: var(--color-primary);
}

.post-text {
  font-size: 0.92rem;
  color: #334155;
}

/* Footer */
.site-footer {
  background-color: #1e2124;
  color: #94a3b8;
  padding: 20px 0;
  margin-top: auto;
  font-size: 0.85rem;
  text-align: center;
  border-top: 3px solid var(--color-primary);
  width: 100%;
}

.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
  width: 100%;
}

.site-footer a {
  color: #cbd5e1;
}

/* Responsive Media Queries */
@media (max-width: 1100px) {
  .layout-container {
    grid-template-columns: 200px 1fr;
  }
  .sidebar-right {
    grid-column: span 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .layout-container {
    grid-template-columns: 1fr;
    margin: 10px auto;
    padding: 0 15px;
    width: 100%;
    box-sizing: border-box;
  }
  .sidebar-right {
    grid-column: span 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
  }
  .mobile-menu-toggle {
    display: block;
    flex-shrink: 0;
  }
  .sidebar-nav {
    display: none;
  }
  .sidebar-nav.is-open {
    display: flex;
  }
  .site-header {
    width: 100%;
  }
  .header-inner {
    padding: 12px 15px;
    width: 100%;
    box-sizing: border-box;
    gap: 12px;
  }
  .brand-wrapper {
    gap: 12px;
    min-width: 0;
  }
  .brand-logo img {
    height: 48px;
    width: auto;
  }
  .brand-text {
    min-width: 0;
  }
  .brand-text h1 {
    font-size: 1.15rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .brand-text .subtext {
    font-size: 0.68rem;
  }
  .main-content {
    padding: 16px;
    width: 100%;
    box-sizing: border-box;
  }
  .news-image {
    max-width: 100%;
    height: auto;
  }
  .site-footer {
    width: 100%;
  }
  .footer-inner {
    padding: 0 15px;
    width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 10px 12px;
  }
  .brand-wrapper {
    gap: 10px;
  }
  .brand-logo img {
    height: 40px;
  }
  .brand-text h1 {
    font-size: 1.05rem;
  }
  .brand-text .subtext {
    font-size: 0.62rem;
  }
  .layout-container {
    padding: 0 10px;
    margin: 8px auto;
  }
  .main-content {
    padding: 12px;
  }
  .footer-inner {
    padding: 0 10px;
  }
}

