/* 
* tgWthree main sections
*/

:root {
  --primary-color: #3390ec;
  --primary-hover: #2483e2;
  --dark-bg: #17212b;
  --medium-bg: #242f3d;
  --light-bg: #2b5278;
  --text-primary: #ffffff;
  --text-secondary: #b1c3d5;
  --glass-bg: rgba(39, 66, 94, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: rgba(0, 0, 0, 0.2);
  --card-bg: rgba(39, 66, 94, 0.7);
  --container-width: 1200px;
  --shadow-small: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-large: 0 8px 24px rgba(0, 0, 0, 0.4);
  --radius-small: 8px;
  --radius-medium: 12px;
  --radius-large: 16px;
  --transition-fast: 0.2s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: linear-gradient(135deg, #17212b 0%, #0f3861 100%);
  min-height: 100vh;
  background-attachment: fixed;
  padding-bottom: 2rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header styles */
header {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-small);
}


/* HEADER CONTAINER LAYOUT */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* LOGO WRAPPER FLEX ALIGNMENT */
.logo-wrapper {
  display: flex;
  align-items: center;
}

/* LOGO LINK STYLING */
.logo-link {
  display: inline-block; /* Changed from block to inline-block for better inline behavior */
  line-height: 0;
}

/* LOGO IMAGE STYLING */
/* Unified logo class to ensure consistent behavior across screen sizes */
.header-logo,
.logo-img {
  display: block;
  height: auto; /* Ensures image scales proportionally */
  width: 100%; /* Full width of container */
  max-width: 200px; /* Default maximum size on larger screens */
}

/* MEDIA QUERY: Reduce logo size for smaller screens (mobile/tablet) */
@media (max-width: 768px) {
  .header-logo,
  .logo-img {
    max-width: 120px; /* Moderate size for tablets and smaller screens */
  }
}

/* MEDIA QUERY: Reduce logo size for small mobile devices */
@media (max-width: 480px) {
  .header-logo,
  .logo-img {
    max-width: 80px; /* Smaller logo on phones */
  }
}

/* MEDIA QUERY: Extra small devices (e.g., very small phones) */
@media (max-width: 360px) {
  .header-logo,
  .logo-img {
    max-width: 60px; /* Extra small logo on tiny screens */
  }
}




.stats {
  display: flex;
  gap: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.stats i {
  color: var(--primary-color);
  margin-right: 0.5rem;
}

/* Navigation */
nav {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 0;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-small);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.channels-list, .groups-list {
  flex: 1;
}

.channels-list h2, .groups-list h2 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  color: var(--text-primary);
}

.channels-list h2 i, .groups-list h2 i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

.channels-list ul, .groups-list ul {
  list-style: none;
  max-height: 150px;
  overflow-y: auto;
  padding-right: 0.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.5rem;
}

.channels-list li, .groups-list li {
  padding: 0.5rem;
  background: var(--card-bg);
  border-radius: var(--radius-small);
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-small);
  backdrop-filter: blur(5px);
  border: 1px solid var(--glass-border);
}

.channels-list li:hover, .groups-list li:hover {
  background: rgba(59, 89, 120, 0.7);
}

.join-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-small);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.join-button:hover {
  background-color: var(--primary-hover);
  color: white;
}

.join-button.small {
  font-size: 0.7rem;
  padding: 0.2rem 0.4rem;
}

/* Hero Section */
.hero-section {
  margin-bottom: 2rem;
}

.hero-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 0.5rem;
}

.hero-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

/* Tabs Section */
.tabs-section {
  margin-bottom: 2rem;
}

.tabs-container {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-medium);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-medium);
}

.tabs-header {
  display: flex;
  overflow-x: auto;
  background: rgba(35, 60, 85, 0.6);
  border-bottom: 1px solid var(--glass-border);
  scrollbar-width: thin;
}

.tab-button {
  padding: 0.8rem 1.2rem;
  background: transparent;
  border: none;
  border-right: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-button:hover {
  background: rgba(59, 89, 120, 0.5);
  color: var(--text-primary);
}

.tab-button.active {
  background: var(--primary-color);
  color: white;
}

.tab-content {
  display: none;
  padding: 1rem;
  max-height: 600px;
  overflow-y: auto;
}

.tab-content.active {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

/* News Ticker */
.news-ticker-section {
  margin-bottom: 2rem;
}

.ticker-container {
  display: flex;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-medium);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-medium);
}

.ticker-title {
  background: var(--primary-color);
  padding: 0.8rem 1.2rem;
  color: white;
  font-weight: bold;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.ticker-wrapper {
  overflow: hidden;
  flex: 1;
}

.ticker-items {
  display: flex;
  animation: ticker 30s linear infinite;
  padding: 0.8rem 0;
}

.ticker-item {
  white-space: nowrap;
  padding: 0 2rem;
  color: var(--text-primary);
}

.ticker-item strong {
  color: var(--primary-color);
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Posts styling */
.post {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-medium);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-medium);
  transition: transform var(--transition-fast);
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}

.post:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-large);
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  background: rgba(35, 60, 85, 0.6);
  border-bottom: 1px solid var(--glass-border);
}

.post-source {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.source-icon {
  color: var(--primary-color);
}

.source-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.post-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.post-content {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-media {
  margin-bottom: 1rem;
  border-radius: var(--radius-small);
  overflow: hidden;
  background: rgba(25, 50, 75, 0.6);
}

.media-content {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
}

.media-placeholder {
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.media-placeholder i {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.post-text {
  margin-bottom: 1rem;
  overflow-wrap: break-word;
  word-break: break-word;
  font-size: 0.95rem;
}

.post-text.collapsed {
  max-height: 120px;
  overflow: hidden;
  position: relative;
}

.post-text.collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(transparent, var(--glass-bg));
}

.expand-collapse {
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  user-select: none;
}

.original-link {
  margin-top: auto;
  margin-bottom: 0.8rem;
}

.original-link a {
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.social-share {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.social-share span {
  color: var(--text-secondary);
}

.social-share a {
  font-size: 1.1rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.social-share a:hover {
  color: var(--primary-color);
}

/* Document styling */
.document {
  margin-bottom: 1rem;
}

.document-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-color);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-small);
  transition: all var(--transition-fast);
}

.document-link:hover {
  background: var(--primary-hover);
  color: white;
}

/* New post animation */
@keyframes newPostHighlight {
  0% { box-shadow: 0 0 0 4px var(--primary-color); }
  50% { box-shadow: 0 0 0 2px var(--primary-color); }
  100% { box-shadow: var(--shadow-medium); }
}

.new-post {
  animation: newPostHighlight 2s ease-out;
}

.no-posts {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

/* Audio/Video styling */
audio, video {
  width: 100%;
  border-radius: var(--radius-small);
  background: rgba(30, 55, 80, 0.7);
}

/* Footer */
.site-footer {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--glass-border);
  margin-top: 3rem;
  padding: 2rem 0 1rem;
}

.footer-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.footer-cta-headline {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.footer-cta-subtext {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--primary-color);
  color: white;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  border-radius: var(--radius-small);
  font-weight: 600;
  transition: all var(--transition-fast);
}

.cta-button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  color: white;
}

.footer-social-proof {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.stat-bubble {
  text-align: center;
  background: rgba(59, 89, 120, 0.6);
  padding: 1rem;
  border-radius: var(--radius-medium);
  min-width: 120px;
  backdrop-filter: blur(5px);
  border: 1px solid var(--glass-border);
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1.2;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--glass-border);
  padding-top: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Responsive styles */
@media (max-width: 992px) {
  .container {
    max-width: 100%;
  }
  
  .hero-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
  
  .tab-content.active {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
  }
  
  .tab-content.active {
    grid-template-columns: 1fr;
  }
  
  .footer-social-proof {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .stat-bubble {
    width: 80%;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .stats {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  .footer-cta-headline {
    font-size: 1.5rem;
  }
}





/* Custom scrollbar */
/*::-webkit-scrollbar {*/
/*  width: 8px;*/
/*  height: 8px;*/
/*}*/

/*::-webkit-scrollbar-track {*/
/*  background: rgba(20, 40, 60, 0.4);*/
/*}*/

/*::-webkit-scrollbar-thumb {*/
/*  background: var(--primary-color);*/
/*  border-radius: 4px;*/
/*}*/

/*::-webkit-scrollbar-thumb:hover {*/
/*  background: var(--primary-hover);*/
/*}*/

/* Vertical + Horizontal Scrollbars */
::-webkit-scrollbar {
  width: 8px;  /* Vertical */
  height: 8px; /* Horizontal */
}
::-webkit-scrollbar-track {
  background: rgba(20, 40, 60, 0.4);
}
::-webkit-scrollbar-thumb {
  background: #4a90e2; /* Fallback color */
  background: var(--primary-color, #4a90e2); 
  border-radius: 4px;
}

/* Firefox */
@supports (scrollbar-color: red blue) {
  html {
    scrollbar-color: var(--primary-color) rgba(20,40,60,0.4);
    scrollbar-width: thin;
  }
}

/* Force horizontal scrollbar visibility */
.channels-list {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}