/* ===========================
   TAB NAVIGATION
   =========================== */
.tab-navigation {
  margin-bottom: 1.5rem;
  position: sticky;
  top: 72px;
  z-index: 50;
  background: var(--gray-50);
  padding: 0.5rem 1rem;
  margin-left: -1rem;
  margin-right: -1rem;
  width: calc(100% + 2rem);
}

/* Tablet */
@media (min-width: 768px) {
  .tab-navigation {
    top: 80px;
    padding: 0.75rem 0;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .tab-navigation {
    position: static;
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
  }
}

.tabs {
  display: flex;
  gap: 0.5rem;
  background: var(--white);
  padding: 0.5rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

/* Tablet */
@media (min-width: 768px) {
  .tabs {
    gap: 0.75rem;
    padding: 0.75rem;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .tabs {
    overflow-x: visible;
  }
}

.tab-btn {
  flex: 1;
  min-width: fit-content;
  padding: 0.875rem 1.25rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  position: relative;
}

.tab-btn i {
  font-size: 1.125rem;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.tab-btn.active i {
  transform: scale(1.1);
}

/* Tab indicator animation */
.tab-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 3px;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: transform 0.3s ease;
}

.tab-btn.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* Tablet */
@media (min-width: 768px) {
  .tab-btn {
    padding: 1rem 1.75rem;
    font-size: 1rem;
  }
  
  .tab-btn i {
    font-size: 1.25rem;
  }
}

/* ===========================
   TAB CONTENT
   =========================== */
.tab-content-section {
  min-height: 400px;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===========================
   HOME TAB (POSTS)
   =========================== */
#home-tab {
  width: 100%;
}

#home-tab {
  display: flex !important;
  flex-direction: column;
  grid-template-columns: 1fr;
  gap: 0px;
  margin: 1rem auto 60px auto;
  max-width: 100%;
  width: 100%;
  padding: 0;
}

/* Tablet */
@media (min-width: 768px) {
  #home-tab  {
    gap: 12px;
    max-width: 600px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  #home-tab  {
    display: grid !important;
    grid-template-columns: 1fr;
  }
}

/* Large Desktop */
@media (min-width: 1280px) {
  #home-tab  {
    grid-template-columns: repeat(2, 1fr);
    max-width: 1200px;
  }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 2px dashed var(--gray-300);
}

.empty-state i {
  font-size: 3rem;
  color: var(--gray-400);
  margin-bottom: 1.5rem;
}

.empty-state h3 {
  font-size: 1.25rem;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--gray-500);
  font-size: 0.9375rem;
  margin-bottom: 0;
}

/* Tablet */
@media (min-width: 768px) {
  .empty-state {
    padding: 4rem 2rem;
  }
  
  .empty-state i {
    font-size: 4rem;
  }
  
  .empty-state h3 {
    font-size: 1.5rem;
  }
}

/* ===========================
   DARK MODE SUPPORT
   =========================== */
@media (prefers-color-scheme: dark) {
  .tab-navigation {
    background: #1a1a1a;
  }

  .tabs {
    background: #252525;
    border-color: #2d2d2d;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .tab-btn {
    color: #b3b3b3;
    background: transparent;
  }

  .tab-btn:hover {
    background: #2d2d2d;
    color: #d4d4d4;
  }

  .tab-btn.active {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
  }

  .tab-content {
    background: transparent;
    color: #d4d4d4;
  }

  .empty-state {
    background: transparent;
  }

  .empty-state i {
    color: #b3b3b3;
  }

  .empty-state h3 {
    color: #d4d4d4;
  }

  .empty-state p {
    color: #999999;
  }
}