/**
 * News Page Desktop UI
 * Modern 2-Column Layout with Sidebar & News Grid
 */

/* ============================================================================
   DESKTOP CONTAINER - 2 COLUMNS (FULLWIDTH)
   ============================================================================ */

.news-desktop-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  width: 100vw !important;
  max-width: 100vw !important;
  height: calc(100vh - 110px) !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  position: relative;
  left: calc(-50vw + 50%);
}

/* ============================================================================
   LEFT SIDEBAR - FILTERS & CATEGORIES
   ============================================================================ */

.news-sidebar {
  background: linear-gradient(180deg, rgba(15,23,42,0.95) 0%, rgba(30,41,59,0.95) 100%);
  border-right: 1px solid rgba(148,163,184,0.2);
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.news-sidebar-header {
  flex: 0 0 auto;
  padding: 20px;
  border-bottom: 1px solid rgba(148,163,184,0.2);
  background: rgba(30,41,59,0.5);
  position: sticky;
  top: 0;
  z-index: 10;
}

.news-sidebar-header h3 {
  margin: 0 0 4px 0;
  font-size: 18px;
  color: #e2e8f0;
  font-weight: 600;
}

.news-sidebar-header small {
  color: #94a3b8;
  font-size: 12px;
}

.news-sidebar-section {
  padding: 16px;
  border-bottom: 1px solid rgba(148,163,184,0.15);
  flex: 0 0 auto;
}

.news-sidebar-section h4 {
  margin: 0 0 12px 0;
  font-size: 12px;
  color: #cbd5e1;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Period Buttons */
.news-period-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-period-btn {
  padding: 10px 12px;
  background: rgba(71,85,105,0.2);
  border: 1px solid rgba(148,163,184,0.3);
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  text-align: left;
}

.news-period-btn:hover {
  background: rgba(71,85,105,0.3);
  border-color: rgba(59,130,246,0.5);
  color: #e2e8f0;
}

.news-period-btn.active {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  border-color: #06b6d4;
  color: #ffffff;
}

/* Source Select */
.news-source-select {
  width: 100%;
  padding: 10px 12px;
  background: rgba(71,85,105,0.3);
  border: 1px solid rgba(148,163,184,0.3);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.news-source-select:hover {
  background: rgba(71,85,105,0.4);
  border-color: rgba(59,130,246,0.5);
}

.news-source-select:focus {
  outline: none;
  background: rgba(71,85,105,0.5);
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6,182,212,0.1);
}

/* Category Tags */
.news-category-tags {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.news-category-tag {
  padding: 8px 10px;
  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 6px;
  color: #93c5fd;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.news-category-tag:hover {
  background: rgba(59,130,246,0.25);
  border-color: rgba(59,130,246,0.5);
  color: #bfdbfe;
}

/* Search Input */
.news-search-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(71,85,105,0.3);
  border: 1px solid rgba(148,163,184,0.3);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.news-search-input::placeholder {
  color: #64748b;
}

.news-search-input:focus {
  background: rgba(71,85,105,0.5);
  border-color: rgba(59,130,246,0.5);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* ============================================================================
   RIGHT SIDE - NEWS GRID
   ============================================================================ */

.news-main {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1a1f35 100%);
}

.news-main-header {
  flex: 0 0 auto;
  padding: 24px 32px;
  border-bottom: 1px solid rgba(148,163,184,0.2);
  background: linear-gradient(180deg, rgba(30,41,59,0.6) 0%, rgba(15,23,42,0.4) 100%);
}

.news-main-header h2 {
  margin: 0 0 4px 0;
  font-size: 26px;
  color: #e2e8f0;
  font-weight: 700;
}

.news-main-header p {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
}

/* News Grid */
.news-grid {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 24px 32px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.news-grid::-webkit-scrollbar {
  width: 8px;
}

.news-grid::-webkit-scrollbar-track {
  background: transparent;
}

.news-grid::-webkit-scrollbar-thumb {
  background: rgba(71,85,105,0.4);
  border-radius: 4px;
}

.news-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(71,85,105,0.6);
}

/* News Card */
.news-card {
  background: rgba(71,85,105,0.2);
  border: 1px solid rgba(148,163,184,0.2);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-card:hover {
  background: rgba(71,85,105,0.3);
  border-color: rgba(59,130,246,0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.3);
}

.news-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(37,99,235,0.2));
}

.news-card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.news-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
}

.news-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.news-card-tag {
  padding: 4px 8px;
  background: rgba(6,182,212,0.2);
  border: 1px solid rgba(6,182,212,0.3);
  border-radius: 4px;
  color: #67e8f9;
  font-size: 11px;
  font-weight: 600;
}

.news-card-favorite-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.news-card-favorite-btn:hover {
  transform: scale(1.2);
}

.news-card-title {
  margin: 0;
  font-size: 15px;
  color: #e2e8f0;
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
}

.news-card-source {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #94a3b8;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(148,163,184,0.1);
}

.news-card-source-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(6,182,212,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.news-card-read-btn {
  padding: 10px 14px;
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  border: none;
  border-radius: 6px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.news-card-read-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(6,182,212,0.3);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 1400px) {
  .news-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    padding: 20px 24px;
  }
}

@media (max-width: 1024px) {
  .news-desktop-container {
    display: none;
  }
}
