/* Core Variables */
:root {
  --bg: #0d0f11;
  --card: #171b1f;
  --card-lighter: #20252b;
  --accent: #00C896;
  --accent-2: #FFCB45;
}

/* Page Container */
.page-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* News Layout Structure */
.news-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 992px) {
  .news-layout {
    grid-template-columns: 3fr 1fr;
  }
}

/* News Main Content */
.news-main {
  width: 100%;
}

/* News Sidebar */
.news-sidebar {
  width: 100%;
}

/* News Header Section */
.news-header {
  position: relative;
  margin-bottom: 2.5rem;
  text-align: center;
}

.news-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.news-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
}

/* Hero News Section */
.hero-news {
  position: relative;
  width: 100%;
  height: 500px;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  margin-bottom: 2rem;
}

.hero-news::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, 
                             rgba(0, 0, 0, 0.1) 0%, 
                             rgba(0, 0, 0, 0.3) 30%, 
                             rgba(0, 0, 0, 0.7) 70%, 
                             rgba(0, 0, 0, 0.9) 100%);
  z-index: 1;
}

.hero-news-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 1s ease;
}

.hero-news:hover .hero-news-image {
  transform: scale(1.05);
}

.hero-news-content {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 2rem;
  width: 100%;
  z-index: 2;
}

.news-category-tag {
  display: inline-block;
  padding: 0.3rem 1rem;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  transform: translateY(-5px);
  opacity: 0;
  animation: fadeInUp 0.5s forwards 0.2s;
}

.hero-news-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  transform: translateY(-5px);
  opacity: 0;
  animation: fadeInUp 0.5s forwards 0.4s;
}

.hero-news-title {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
  line-height: 1.3;
  transform: translateY(-5px);
  opacity: 0;
  animation: fadeInUp 0.5s forwards 0.6s;
}

.hero-news-summary {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
  max-width: 800px;
  line-height: 1.6;
  transform: translateY(-5px);
  opacity: 0;
  animation: fadeInUp 0.5s forwards 0.8s;
}

.hero-news-link {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
  transform: translateY(-5px);
  opacity: 0;
  animation: fadeInUp 0.5s forwards 1s;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.hero-news-link:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

/* Section Headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
  position: relative;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  padding-left: 1rem;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: var(--accent);
  border-radius: 2px;
}

/* Date Dividers */
.date-divider {
  margin: 2rem 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.date-divider-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.date-divider-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  padding: 0 0.5rem;
  font-weight: 500;
}

/* News Cards Layout */
.news-cards {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .news-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* News Card Base Styles */
.news-card {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(32, 37, 43, 0.8), rgba(23, 27, 31, 0.8));
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 200, 150, 0.2);
  border-color: rgba(0, 200, 150, 0.2);
}

.news-card__category {
  position: absolute;
  top: 1rem;
  left: 0;
  z-index: 10;
  padding: 0.3rem 1rem 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  clip-path: polygon(0 0, 100% 0, 90% 100%, 0% 100%);
}

.news-card__image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.news-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.8s ease;
}

.news-card:hover .news-card__image {
  transform: scale(1.15);
}

.news-card__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.3) 70%,
    rgba(0, 0, 0, 0.8) 100%
  );
  z-index: 2;
}

.news-card__content {
  padding: 1.5rem;
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card__date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
  text-align: left;
}

.news-card__title, .sidebar-news-title {
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  transition: color 0.3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card:hover .news-card__title {
  color: var(--accent);
}

.news-card__excerpt {
  text-align: left;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.news-card__read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-size: 0.85rem;
  transition: all 0.3s ease;
  margin-top: auto;
}

.news-card:hover .news-card__read-more {
  gap: 0.75rem;
}

.news-card__link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
}

/* Card Variants */

/* Standard Card */
.card-standard {
  height: 100%;
}

/* Featured Card */
.card-featured {
  grid-column: span 2;
  max-height: 450px;
}

@media (max-width: 767px) {
  .card-featured {
    grid-column: span 1;
  }
}

.card-featured .news-card__image-container {
  height: 280px;
}

/* Horizontal Card */
.card-horizontal {
  display: flex;
  flex-direction: row;
  height: 180px;
}

.card-horizontal .news-card__image-container {
  width: 40%;
  height: 100%;
  aspect-ratio: auto;
}

.card-horizontal .news-card__content {
  width: 60%;
}

.card-horizontal .news-card__excerpt {
  -webkit-line-clamp: 2;
}

/* Compact Card */
.card-compact {
  height: 100%;
}

.card-compact .news-card__image-container {
  aspect-ratio: 16/10;
}

.card-compact .news-card__excerpt {
  -webkit-line-clamp: 2;
}

/* Quote Card */
.card-quote {
  background: rgba(255, 203, 69, 0.1);
  border-left: 4px solid var(--accent-2);
}

.card-quote::before {
  content: '"';
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 4rem;
  line-height: 1;
  font-family: serif;
  color: rgba(255, 203, 69, 0.2);
  z-index: 1;
}

.card-quote .news-card__image-container {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 2rem auto 1rem;
  border: 3px solid rgba(255, 203, 69, 0.3);
  aspect-ratio: auto;
}

.card-quote .news-card__content {
  text-align: left;
  padding-top: 0.5rem;
}

.card-quote .news-card__excerpt {
  font-style: italic;
}

/* Video Card */
.card-video .news-card__image-container {
  height: 100%;
  min-height: 200px;
}

.card-video .play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(0, 200, 150, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: all 0.3s ease;
  border: 2px solid var(--accent);
}

.card-video:hover .play-button {
  background: var(--accent);
  transform: translate(-50%, -50%) scale(1.1);
}

.card-video .play-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px;
}

.card-video .news-card__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

/* Sidebar Styles */
.sidebar-card {
  background: linear-gradient(145deg, rgba(32, 37, 43, 0.7), rgba(23, 27, 31, 0.7));
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  margin-bottom: 2rem;
  height: 100%;
  position: sticky;
  top: 2rem;
}

.sidebar-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin: 0;
  position: relative;
  padding-left: 1rem;
}

.sidebar-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 70%;
  background: var(--accent);
  border-radius: 3px;
}

.sidebar-content {
  padding: 0;
  max-height: calc(100vh - 10rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.sidebar-content::-webkit-scrollbar {
  width: 4px;
}

.sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
}

.sidebar-date-group {
  margin-bottom: 1rem;
}

.sidebar-date {
  padding: 0.5rem 1.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.2);
  font-weight: 500;
}

.sidebar-news-item {
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  position: relative;
}

.sidebar-news-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-news-item:last-child {
  border-bottom: none;
}

.sidebar-news-category {
  font-size: 0.7rem;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 0.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-news-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: white;
  margin-bottom: 0.25rem;
  transition: color 0.3s ease;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-news-item:hover .sidebar-news-title {
  color: var(--accent);
}

.sidebar-news-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
}

/* Pagination Controls */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 3rem;
  gap: 0.5rem;
}

.pagination-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  transition: all 0.3s ease;
}

.pagination-btn:hover, .pagination-btn.active {
  background: var(--accent);
  color: #000;
}

.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Category Tag Colors */
.category-match {
  background: var(--accent);
  color: #000;
}

.category-интервью {
  background: var(--accent-2);
  color: #000;
}

.category-анонс {
  background: #FF6B6B;
  color: #000;
}

.category-турнир {
  background: #5E72EB;
  color: white;
}

.category-киберспорт {
  background: #BD00FF;
  color: white;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

.empty-state svg {
  width: 80px;
  height: 80px;
  color: rgba(255, 255, 255, 0.2);
  margin-bottom: 1.5rem;
}

.empty-state-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.empty-state-message {
  color: rgba(255, 255, 255, 0.5);
  max-width: 400px;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .sidebar-card {
    position: static;
  }
}

@media (max-width: 768px) {
  .news-cards {
    grid-template-columns: 1fr;
  }
  
  .hero-news {
    height: 400px;
  }
  
  .hero-news-title {
    font-size: 1.5rem;
  }
  
  .hero-news-content {
    padding: 1.5rem;
  }
  
  .news-title {
    font-size: 2rem;
  }
  
  .sidebar-card {
    margin-bottom: 2rem;
  }
  
  .card-featured {
    grid-column: span 1;
  }
  
  .card-horizontal {
    flex-direction: column;
    height: auto;
  }
  
  .card-horizontal .news-card__image-container {
    width: 100%;
    height: 180px;
  }
  
  .card-horizontal .news-card__content {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .hero-news {
    height: 350px;
  }
  
  .hero-news-summary {
    display: none;
  }
}