/* Boats Racing Styles - Mobile First Enhanced */
/* Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

/* Adaptive font sizes */
@media (max-width: 320px) {
  html { font-size: 14px; }
}

@media (min-width: 321px) and (max-width: 480px) {
  html { font-size: 15px; }
}

@media (min-width: 768px) {
  html { font-size: 16px; }
}

@media (min-width: 1200px) {
  html { font-size: 17px; }
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a1929;
  color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 1rem;
  min-height: 100vh;
  position: relative;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.cover {
  width: 100%;
}

/* Button Styles - Responsive */
.button {
  display: inline-block;
  padding: clamp(8px, 2vw, 12px) clamp(16px, 4vw, 24px);
  background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-size: clamp(0.75rem, 2vw, 0.875rem);
  letter-spacing: 0.5px;
  min-height: 44px; /* Touch target size */
  min-width: 44px;
  white-space: nowrap;
}

.button:hover {
  background: linear-gradient(135deg, #1976d2 0%, #1e88e5 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(25, 118, 210, 0.3);
}

.button--secondary {
  background: linear-gradient(135deg, #0277bd 0%, #03a9f4 100%);
}

.button--secondary:hover {
  background: linear-gradient(135deg, #03a9f4 0%, #29b6f6 100%);
  box-shadow: 0 8px 25px rgba(3, 169, 244, 0.3);
}

/* Typography - Responsive */
.title {
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
}

.title.general {
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: #1976d2;
}

.title.high {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  color: #1976d2;
}

/* ========== MOBILE-FIRST HEADER - Enhanced ========== */
.header__cover {
  background: #0a1929;
  padding: clamp(8px, 2vw, 16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1000;
  border-bottom: 2px solid #1976d2;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  min-height: 60px;
}

.header__logo img {
  height: clamp(28px, 6vw, 40px);
  width: auto;
}

/* Mobile Navigation */
.header__nav {
  display: none;
}

.header__desktop-buttons {
  display: none;
}

.header__mobile-buttons {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1vw, 8px);
  flex-shrink: 0;
}

/* Search Input - Responsive */
.header__search {
  display: none;
  position: relative;
  flex-shrink: 0;
}

.header__search-input {
  background: #1a2332;
  border: 1px solid #37474f;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: clamp(0.75rem, 2vw, 0.875rem);
  width: clamp(150px, 25vw, 200px);
  min-height: 36px;
}

.header__search-input::placeholder {
  color: #78909c;
}

.header__search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #78909c;
  cursor: pointer;
  min-height: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Language Dropdown - Enhanced Mobile */
.header__language-dropdown {
  position: relative;
}

.header__language-button {
  background: #1976d2;
  color: #ffffff;
  padding: clamp(4px, 1vw, 6px) clamp(6px, 1.5vw, 10px);
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: clamp(0.625rem, 1.5vw, 0.75rem);
  font-weight: 600;
  text-transform: uppercase;
  transition: background 0.3s ease;
  min-height: 36px;
  min-width: 36px;
}

.header__language-button:hover {
  background: #1e88e5;
}

.header__language-button svg {
  width: clamp(8px, 2vw, 10px) !important;
  height: clamp(8px, 2vw, 10px) !important;
  transition: transform 0.3s ease;
}

.header__language-button.active svg {
  transform: rotate(180deg);
}

.header__language-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #1a2332;
  border: 1px solid #37474f;
  border-radius: 6px;
  min-width: clamp(60px, 15vw, 80px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1001;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.header__language-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header__language-item {
  display: block;
  padding: clamp(6px, 1.5vw, 8px) clamp(8px, 2vw, 12px);
  color: #ffffff;
  text-decoration: none;
  transition: background 0.3s ease;
  text-transform: uppercase;
  font-size: clamp(0.625rem, 1.5vw, 0.75rem);
  min-height: 32px;
  display: flex;
  align-items: center;
}

.header__language-item:hover {
  background: #1976d2;
  color: #ffffff;
}

/* Burger Menu - Enhanced */
.header__burger {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  margin-left: clamp(4px, 1vw, 8px);
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.burger-icon {
  width: clamp(18px, 4vw, 20px);
  height: clamp(18px, 4vw, 20px);
  position: relative;
  transform: rotate(0deg);
  transition: 0.3s ease-in-out;
}

.burger-icon span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: #ffffff;
  border-radius: 2px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: 0.25s ease-in-out;
}

.burger-icon span:nth-child(1) {
  top: 0px;
}

.burger-icon span:nth-child(2) {
  top: 7px;
}

.burger-icon span:nth-child(3) {
  top: 14px;
}

.header__burger.active .burger-icon span:nth-child(1) {
  top: 7px;
  transform: rotate(135deg);
}

.header__burger.active .burger-icon span:nth-child(2) {
  opacity: 0;
  left: -60px;
}

.header__burger.active .burger-icon span:nth-child(3) {
  top: 7px;
  transform: rotate(-135deg);
}

/* Mobile Menu - Enhanced */
.header__mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  overflow-y: auto;
}

.header__mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.header__mobile-menu-content {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: #0a1929;
  border-top: 2px solid #1976d2;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
  min-height: calc(100vh - 60px);
}

.header__mobile-menu.active .header__mobile-menu-content {
  transform: translateY(0);
}

.header__mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.header__mobile-menu-item {
  margin-top: 25px;
  border-bottom: 1px solid #37474f;
}

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

.header__mobile-menu-item a {
  display: block;
  padding: clamp(12px, 3vw, 16px) clamp(16px, 4vw, 20px);
  color: #ffffff;
  text-decoration: none;
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.header__mobile-menu-item a:hover {
  background: #1a2332;
  color: #1976d2;
  padding-left: clamp(24px, 6vw, 30px);
}

.header__mobile-menu-item a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: #1976d2;
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.header__mobile-menu-item a:hover::before {
  transform: scaleY(1);
}

/* Body Lock */
body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* ========== HERO SECTION - Fully Responsive ========== */
.prime__cover {
  position: relative;
  height: clamp(250px, 50vh, 500px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: clamp(8px, 2vw, 24px);
  border-radius: clamp(8px, 2vw, 12px);
  min-height: 200px;
}

/* Extra small screens */
@media (max-width: 320px) {
  .prime__cover {
    height: 200px;
    margin: 4px;
  }
}

.prime__background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  filter: blur(2px);
}

.prime__background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prime__wrap {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 90%;
  padding: clamp(8px, 3vw, 16px);
  width: 100%;
}

.rating__item {
  background: rgba(0, 0, 0, 0.7);
  padding: clamp(4px, 1.5vw, 8px) clamp(8px, 3vw, 16px);
  border-radius: clamp(15px, 4vw, 20px);
  margin-bottom: clamp(8px, 2vw, 16px);
  display: inline-block;
  backdrop-filter: blur(8px);
}

.rating__item p {
  color: #ffffff;
  font-size: clamp(0.625rem, 1.8vw, 0.8rem);
  margin-bottom: 4px;
}

.rating__numbers {
  color: #64b5f6;
  font-weight: 700;
  font-size: clamp(0.75rem, 2.2vw, 1rem);
}

.prime__title {
  color: #ffffff !important;
  margin-bottom: clamp(8px, 2vw, 12px);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  font-size: clamp(1.2rem, 5vw, 3.5rem);
  line-height: 1.1;
  max-width: 100%;
  word-wrap: break-word;
  hyphens: auto;
}

.article__content p {
  margin-bottom: clamp(12px, 3vw, 16px);
  color: #e1f5fe;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  line-height: 1.6;
  word-wrap: break-word;
  hyphens: auto;
}

.article__content ul,
.article__content ol {
  margin: clamp(12px, 3vw, 16px) 0 clamp(12px, 3vw, 16px) clamp(16px, 4vw, 20px);
  color: #e1f5fe;
}

.article__content li {
  margin-bottom: clamp(6px, 1.5vw, 8px);
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  line-height: 1.6;
  word-wrap: break-word;
}

.article__content a {
  color: #64b5f6;
  text-decoration: underline;
  transition: color 0.3s ease;
  word-wrap: break-word;
}

.article__content a:hover {
  color: #90caf9;
}

.article__content blockquote {
  background: #263238;
  border-left: 4px solid #1976d2;
  padding: clamp(12px, 3vw, 16px) clamp(16px, 4vw, 20px);
  margin: clamp(16px, 4vw, 20px) 0;
  border-radius: 0 8px 8px 0;
  color: #b0bec5;
  font-style: italic;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  line-height: 1.6;
}

.article__content code {
  background: #263238;
  color: #64b5f6;
  padding: 2px clamp(4px, 1vw, 6px);
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  word-wrap: break-word;
}

.article__content pre {
  background: #263238;
  border: 1px solid #37474f;
  border-radius: 8px;
  padding: clamp(12px, 3vw, 16px);
  overflow-x: auto;
  margin: clamp(12px, 3vw, 16px) 0;
  font-size: clamp(0.8rem, 2vw, 0.875rem);
}

.article__content pre code {
  background: none;
  padding: 0;
  word-wrap: normal;
}

/* TOC Styles - Enhanced */
.sidebar__toc,
.sidebar__toc-mobile {
  background: #1a2332;
  border: 1px solid #37474f;
  border-radius: 8px;
  padding: clamp(12px, 3vw, 16px);
  margin-bottom: clamp(16px, 4vw, 20px);
}

.toc-content ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.toc-content li {
  margin-bottom: clamp(6px, 1.5vw, 8px);
}

.toc-content a {
  color: #64b5f6;
  text-decoration: none;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  transition: all 0.3s ease;
  display: block;
  padding: clamp(4px, 1vw, 6px) clamp(8px, 2vw, 10px);
  border-radius: 4px;
  border-left: 3px solid transparent;
  word-wrap: break-word;
  hyphens: auto;
  line-height: 1.4;
}

.toc-content a:hover {
  color: #90caf9;
  background: #263238;
  border-left-color: #1976d2;
  transform: translateX(5px);
}

.toc-content ul ul {
  margin-left: clamp(12px, 3vw, 16px);
  margin-top: 4px;
}

.toc-content ul ul a {
  font-size: clamp(0.7rem, 1.8vw, 0.8rem);
  color: #90caf9;
}

/* Author Card - Enhanced */
.author-card {
  background: #263238;
  border: 1px solid #37474f;
  border-radius: 8px;
  padding: clamp(12px, 3vw, 16px);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2.5vw, 12px);
  text-align: center;
}

@media (min-width: 480px) {
  .author-card {
    flex-direction: row;
    text-align: left;
  }
}

.author-card__image {
  width: clamp(50px, 12vw, 60px);
  height: clamp(50px, 12vw, 60px);
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  align-self: center;
}

@media (min-width: 480px) {
  .author-card__image {
    align-self: flex-start;
  }
}

.author-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-card__content {
  flex: 1;
  min-width: 0;
}

.author-card__name {
  color: #ffffff;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  font-weight: 600;
  margin-bottom: 6px;
  word-wrap: break-word;
}

.author-card__bio {
  color: #b0bec5;
  font-size: clamp(0.75rem, 1.8vw, 0.85rem);
  line-height: 1.4;
  margin-bottom: clamp(6px, 1.5vw, 8px);
  word-wrap: break-word;
}

.author-card__expertise {
  font-size: clamp(0.7rem, 1.8vw, 0.8rem);
}

.author-card__expertise strong {
  color: #64b5f6;
}

/* Article Footer - Enhanced */
.article__footer {
  padding: clamp(16px, 4vw, 24px);
  background: #1a2332;
  margin: clamp(12px, 3vw, 24px);
  border-radius: 8px;
  border: 1px solid #37474f;
}

/* Author Info in Footer - Enhanced */
.article__author {
  margin-bottom: clamp(20px, 5vw, 24px);
}

.author-info {
  background: #263238;
  border: 1px solid #37474f;
  border-radius: 8px;
  padding: clamp(16px, 4vw, 20px);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 3vw, 16px);
  text-align: center;
}

@media (min-width: 480px) {
  .author-info {
    flex-direction: row;
    text-align: left;
  }
}

.author-info__image {
  width: clamp(60px, 15vw, 80px);
  height: clamp(60px, 15vw, 80px);
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  align-self: center;
}

@media (min-width: 480px) {
  .author-info__image {
    align-self: flex-start;
  }
}

.author-info__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-info__content {
  flex: 1;
  min-width: 0;
}

.author-info__name {
  color: #ffffff;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 600;
  margin-bottom: clamp(6px, 1.5vw, 8px);
  word-wrap: break-word;
}

.author-info__bio {
  color: #b0bec5;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  line-height: 1.5;
  margin-bottom: clamp(10px, 2.5vw, 12px);
  word-wrap: break-word;
}

.author-info__social {
  display: flex;
  gap: clamp(6px, 1.5vw, 8px);
  flex-wrap: wrap;
  justify-content: center;
}

@media (min-width: 480px) {
  .author-info__social {
    justify-content: flex-start;
  }
}

.author-social__link {
  background: #1976d2;
  color: #ffffff;
  padding: 4px clamp(6px, 1.5vw, 8px);
  border-radius: 4px;
  text-decoration: none;
  font-size: clamp(0.65rem, 1.5vw, 0.75rem);
  font-weight: 500;
  transition: background 0.3s ease;
  white-space: nowrap;
  min-height: 24px;
  display: flex;
  align-items: center;
}

.author-social__link:hover {
  background: #1e88e5;
}

/* Article Navigation - Enhanced */
.article__navigation {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 3vw, 16px);
}

@media (min-width: 600px) {
  .article__navigation {
    grid-template-columns: 1fr 1fr;
  }
}

.nav__item {
  background: #263238;
  border: 1px solid #37474f;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  min-height: 80px;
}

.nav__item:hover {
  border-color: #1976d2;
  transform: translateY(-2px);
}

.nav__label {
  display: block;
  padding: clamp(6px, 1.5vw, 8px) clamp(10px, 2.5vw, 12px);
  background: #37474f;
  color: #78909c;
  font-size: clamp(0.65rem, 1.5vw, 0.75rem);
  font-weight: 600;
  text-transform: uppercase;
}

.nav__link {
  display: flex;
  align-items: center;
  padding: clamp(10px, 2.5vw, 12px);
  text-decoration: none;
  gap: clamp(8px, 2vw, 12px);
  min-height: 60px;
}

.nav__image {
  width: clamp(50px, 12vw, 60px);
  height: clamp(30px, 8vw, 40px);
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.nav__title {
  color: #ffffff;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  font-weight: 500;
  line-height: 1.4;
  transition: color 0.3s ease;
  word-wrap: break-word;
  hyphens: auto;
  flex: 1;
  min-width: 0;
}

.nav__item:hover .nav__title {
  color: #64b5f6;
}

/* ========== TABLES - Enhanced ========== */
.table-container {
  background-color: #1a2332;
  border: 1px solid #37474f;
  border-radius: 8px;
  margin: clamp(12px, 3vw, 16px) 0;
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.table-scroll table {
  width: 100%;
  min-width: clamp(400px, 80vw, 600px);
  border-collapse: collapse;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  color: #ffffff;
  background-color: transparent;
}

thead {
  background-color: #263238;
  position: sticky;
  top: 0;
  z-index: 10;
}

th {
  padding: clamp(8px, 2vw, 12px) clamp(6px, 1.5vw, 10px);
  text-align: left;
  font-weight: 600;
  color: #ffffff;
  border-bottom: 2px solid #37474f;
  font-size: clamp(0.75rem, 1.8vw, 0.85rem);
  word-wrap: break-word;
  white-space: nowrap;
}

td {
  padding: clamp(6px, 1.5vw, 10px);
  border-bottom: 1px solid #37474f;
  font-size: clamp(0.75rem, 1.8vw, 0.85rem);
  word-wrap: break-word;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

tbody tr:hover {
  background-color: #263238;
}

tbody tr:last-child td {
  border-bottom: none;
}

table a {
  color: #64b5f6;
  text-decoration: none;
  font-weight: 500;
  word-wrap: break-word;
}

table a:hover {
  color: #90caf9;
  text-decoration: underline;
}

/* ========== FAQ BLOCK - Enhanced ========== */
.faq-block {
  background-color: #1a2332;
  padding: clamp(16px, 4vw, 20px);
  margin: clamp(12px, 3vw, 16px) 0;
  border-radius: 8px;
  border: 1px solid #37474f;
}

.faq-heading {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 700;
  color: #1976d2;
  margin-bottom: clamp(16px, 4vw, 20px);
  text-align: center;
  word-wrap: break-word;
}

.faq-item {
  background-color: #263238;
  border: 1px solid #37474f;
  border-radius: 8px;
  padding: clamp(12px, 3vw, 16px);
  margin-bottom: clamp(10px, 2.5vw, 12px);
  color: #ffffff;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  transition: all 0.3s ease;
}

.faq-item h3 {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  color: #1976d2;
  margin-bottom: clamp(6px, 1.5vw, 8px);
  font-weight: 600;
  word-wrap: break-word;
  hyphens: auto;
}

.faq-item div {
  line-height: 1.6;
  color: #e1f5fe;
  word-wrap: break-word;
  hyphens: auto;
}

.faq-item:hover {
  background-color: #2e3a46;
  transform: translateY(-2px);
  border-color: #1976d2;
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.15);
}

/* ========== TABLE OF CONTENTS - Enhanced ========== */
#TableOfContents {
  background-color: #1a2332;
  padding: clamp(12px, 3vw, 16px);
  border-radius: 8px;
  border: 1px solid #37474f;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  margin: clamp(12px, 3vw, 16px) 0;
  color: #ffffff;
}

#TableOfContents ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

#TableOfContents li {
  margin-bottom: clamp(6px, 1.5vw, 8px);
}

#TableOfContents a {
  color: #64b5f6;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  display: block;
  padding: clamp(4px, 1vw, 6px) clamp(8px, 2vw, 10px);
  border-radius: 4px;
  word-wrap: break-word;
  hyphens: auto;
  line-height: 1.4;
}

#TableOfContents a:hover {
  color: #90caf9;
  background-color: #263238;
  transform: translateX(5px);
}

/* ========== BACK TO TOP - Enhanced ========== */
.back-top {
  position: fixed;
  bottom: clamp(16px, 4vw, 20px);
  right: clamp(16px, 4vw, 20px);
  z-index: 1000;
}

.back-top__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(40px, 10vw, 44px);
  height: clamp(40px, 10vw, 44px);
  background: #1976d2;
  border-radius: 50%;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  border: none;
  cursor: pointer;
}

.back-top__button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(25, 118, 210, 0.4);
  background: #1e88e5;
}

.back-top__button svg {
  width: clamp(16px, 4vw, 18px);
  height: clamp(16px, 4vw, 18px);
}

.back-top__button.visible {
  opacity: 1;
  visibility: visible;
}

/* ========== FOOTER - Enhanced ========== */
.footer {
  background: #0a1929;
  border-top: 2px solid #1976d2;
  margin-top: clamp(32px, 8vw, 40px);
}

.footer__content {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 4vw, 20px);
  padding: clamp(20px, 5vw, 32px) clamp(16px, 4vw, 24px);
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .footer__content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .footer__content {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer__section h4 {
  color: #1976d2;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  font-weight: 600;
  margin-bottom: clamp(10px, 2.5vw, 12px);
  word-wrap: break-word;
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.5vw, 8px);
}

.footer__links a {
  color: #b0bec5;
  text-decoration: none;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  transition: color 0.3s ease;
  word-wrap: break-word;
  line-height: 1.4;
}

.footer__links a:hover {
  color: #64b5f6;
}

.footer__bottom {
  border-top: 1px solid #37474f;
  padding: clamp(12px, 3vw, 16px);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2.5vw, 12px);
  align-items: center;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer__copy {
  color: #78909c;
  font-size: clamp(0.7rem, 1.8vw, 0.8rem);
  word-wrap: break-word;
}

.footer__social {
  display: flex;
  gap: clamp(8px, 2vw, 12px);
  justify-content: center;
}

.footer__social-link {
  width: clamp(28px, 7vw, 32px);
  height: clamp(28px, 7vw, 32px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #263238;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.footer__social-link:hover {
  background: #1976d2;
  transform: translateY(-2px);
}

.footer__social-link img {
  width: clamp(12px, 3vw, 16px);
  height: clamp(12px, 3vw, 16px);
}

/* ========== COMMENTS SECTION - Enhanced ========== */
.comments {
  padding: clamp(16px, 4vw, 24px);
  background: #1a2332;
  margin: clamp(12px, 3vw, 24px);
  border-radius: 8px;
  border: 1px solid #37474f;
}

.comments h3 {
  color: #1976d2;
  font-size: clamp(1.1rem, 2.8vw, 1.3rem);
  font-weight: 600;
  margin-bottom: clamp(12px, 3vw, 16px);
  text-align: center;
  word-wrap: break-word;
}

.comments__container {
  background: #263238;
  border: 1px solid #37474f;
  border-radius: 6px;
  padding: clamp(16px, 4vw, 20px);
  min-height: clamp(150px, 30vw, 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #78909c;
  text-align: center;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
}

/* ========== CONTENT SECTION STYLES - Enhanced ========== */
.content-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(20px, 5vw, 40px);
  background: #1a2332;
  border: 1px solid #37474f;
  border-radius: 8px;
  min-height: clamp(300px, 60vh, 400px);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 20px);
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.py-10 {
  padding-top: clamp(1.5rem, 5vw, 2.5rem);
  padding-bottom: clamp(1.5rem, 5vw, 2.5rem);
}

/* Enhanced Typography - Responsive */
h1 {
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 800;
  line-height: 1.1;
  margin-top: 0;
  margin-bottom: clamp(1.5rem, 4vw, 2rem);
  color: #1976d2;
  word-wrap: break-word;
  hyphens: auto;
}

h2 {
  font-size: clamp(1.2rem, 4vw, 1.875rem);
  font-weight: 700;
  line-height: 1.2;
  margin-top: clamp(2rem, 5vw, 3rem);
  margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
  color: #64b5f6;
  border-bottom: 2px solid #1976d2;
  padding-bottom: 0.5rem;
  word-wrap: break-word;
  hyphens: auto;
}

h3 {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 600;
  line-height: 1.3;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: clamp(0.75rem, 2vw, 1rem);
  color: #90caf9;
  word-wrap: break-word;
  hyphens: auto;
}

h4 {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 600;
  line-height: 1.4;
  margin-top: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: clamp(0.5rem, 1.5vw, 0.75rem);
  color: #b0bec5;
  word-wrap: break-word;
  hyphens: auto;
}

p {
  margin-top: clamp(1rem, 2.5vw, 1.25rem);
  margin-bottom: clamp(1rem, 2.5vw, 1.25rem);
  font-size: clamp(0.9rem, 2.2vw, 1.125rem);
  line-height: 1.75;
  color: #e1f5fe;
  word-wrap: break-word;
  hyphens: auto;
}

strong {
  font-weight: 700;
  color: #ffffff;
}

/* Lists - Enhanced Dark Theme */
ul {
  margin-top: clamp(1rem, 2.5vw, 1.25rem);
  margin-bottom: clamp(1rem, 2.5vw, 1.25rem);
  padding-left: clamp(1.25rem, 3vw, 1.5rem);
}

ol {
  margin-top: clamp(1rem, 2.5vw, 1.25rem);
  margin-bottom: clamp(1rem, 2.5vw, 1.25rem);
  padding-left: clamp(1.25rem, 3vw, 1.5rem);
}

li {
  margin-top: clamp(0.25rem, 1vw, 0.5rem);
  margin-bottom: clamp(0.25rem, 1vw, 0.5rem);
  line-height: 1.75;
  color: #e1f5fe;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  word-wrap: break-word;
}

ul > li {
  position: relative;
}

ul > li::before {
  content: "";
  position: absolute;
  background-color: #1976d2;
  border-radius: 50%;
  width: clamp(0.25rem, 1vw, 0.375rem);
  height: clamp(0.25rem, 1vw, 0.375rem);
  top: calc(0.875rem - 0.1875rem);
  left: clamp(-0.8rem, -2vw, -1rem);
}

ol > li::before {
  content: counter(list-item, decimal) ".";
  position: absolute;
  font-weight: 400;
  color: #64b5f6;
  left: clamp(-1.2rem, -3vw, -1.5rem);
  font-size: clamp(0.8rem, 2vw, 0.9rem);
}

/* Links - Enhanced Dark Theme */
a {
  color: #64b5f6;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.3s ease;
  word-wrap: break-word;
}

a:hover {
  color: #90caf9;
  text-decoration: none;
}

/* Blockquotes - Enhanced Dark Theme */
blockquote {
  font-weight: 500;
  font-style: italic;
  color: #ffffff;
  border-left: clamp(0.2rem, 0.5vw, 0.25rem) solid #1976d2;
  padding-left: clamp(0.75rem, 2vw, 1rem);
  margin: clamp(1.5rem, 4vw, 2rem) 0;
  background: #263238;
  padding: clamp(12px, 3vw, 16px) clamp(16px, 4vw, 20px);
  border-radius: 0 8px 8px 0;
  quotes: "\201C""\201D""\2018""\2019";
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  line-height: 1.6;
  word-wrap: break-word;
  hyphens: auto;
}

blockquote p:first-of-type::before {
  content: open-quote;
}

blockquote p:last-of-type::after {
  content: close-quote;
}

/* Code - Enhanced Dark Theme */
code {
  color: #64b5f6;
  font-weight: 600;
  font-size: clamp(0.75rem, 1.8vw, 0.875rem);
  background-color: #263238;
  padding: clamp(0.15rem, 0.5vw, 0.25rem) clamp(0.25rem, 0.8vw, 0.375rem);
  border-radius: 0.25rem;
  word-wrap: break-word;
}

pre {
  color: #e5e7eb;
  background-color: #263238;
  border: 1px solid #37474f;
  overflow-x: auto;
  font-weight: 400;
  font-size: clamp(0.75rem, 1.8vw, 0.875rem);
  line-height: 1.7142857;
  margin-top: clamp(1.2rem, 3vw, 1.7142857em);
  margin-bottom: clamp(1.2rem, 3vw, 1.7142857em);
  border-radius: clamp(0.25rem, 1vw, 0.375rem);
  padding: clamp(0.75rem, 2vw, 1rem);
  -webkit-overflow-scrolling: touch;
}

pre code {
  background-color: transparent;
  border-width: 0;
  border-radius: 0;
  padding: 0;
  font-weight: inherit;
  color: inherit;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
  word-wrap: normal;
}

/* Tables - Enhanced */
table {
  width: 100%;
  table-layout: auto;
  text-align: left;
  margin-top: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: clamp(1.5rem, 4vw, 2rem);
  font-size: clamp(0.75rem, 1.8vw, 0.875rem);
  line-height: 1.7142857;
  border-collapse: collapse;
  background-color: #1a2332;
  border: 1px solid #37474f;
  border-radius: 8px;
  overflow: hidden;
}

thead {
  border-bottom: 1px solid #37474f;
  background-color: #263238;
}

thead th {
  color: #ffffff;
  font-weight: 600;
  vertical-align: bottom;
  padding: clamp(0.4rem, 1.2vw, 0.5714286em);
  border-right: 1px solid #37474f;
  word-wrap: break-word;
  font-size: clamp(0.7rem, 1.6vw, 0.8rem);
}

thead th:last-child {
  border-right: none;
}

tbody tr {
  border-bottom: 1px solid #37474f;
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background-color: #263238;
}

tbody td {
  vertical-align: baseline;
  padding: clamp(0.4rem, 1.2vw, 0.5714286em);
  border-right: 1px solid #37474f;
  color: #e1f5fe;
  word-wrap: break-word;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(0.7rem, 1.6vw, 0.8rem);
}

tbody td:last-child {
  border-right: none;
}

/* Images - Enhanced */
img {
  margin-top: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: clamp(1.5rem, 4vw, 2rem);
  max-width: 100%;
  height: auto;
  border-radius: clamp(0.25rem, 1vw, 0.5rem);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Horizontal Rule - Enhanced */
hr {
  border-color: #37474f;
  border-top-width: 1px;
  margin-top: clamp(2rem, 5vw, 3rem);
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

/* ========== ULTRA SMALL SCREENS (320px and below) ========== */
@media (max-width: 320px) {
  .header__cover {
    padding: 6px 8px;
    min-height: 50px;
  }
  
  .header__logo img {
    height: 24px;
  }
  
  .prime__cover {
    height: 180px;
    margin: 4px;
  }
  
  .prime__title {
    font-size: 0.9rem;
    margin-bottom: 6px;
  }
  
  .prime__text {
    font-size: 0.7rem;
    margin-bottom: 8px;
  }
  
  .prime__buttons {
    gap: 4px;
    margin: 8px 0;
  }
  
  .prime__button {
    font-size: 0.5rem;
    padding: 6px 12px;
    max-width: 140px;
    min-height: 36px;
  }
  
  .categories,
  .latest-articles {
    padding: 8px;
  }
  
  .categories h2,
  .latest-articles h2 {
    font-size: 1rem;
    margin-bottom: 12px;
  }
  
  .sidebar {
    padding: 8px;
  }
  
  .sidebar__title {
    font-size: 0.8rem;
    margin-bottom: 6px;
  }
  
  .article__header,
  .article__content,
  .article__footer,
  .comments {
    padding: 8px;
    margin: 4px;
  }
  
  .article__title {
    font-size: 1.1rem;
  }
  
  .content-section {
    padding: 12px 8px;
    min-height: 200px;
  }
}

/* ========== LARGE SCREENS OPTIMIZATION ========== */
@media (min-width: 1400px) {
  .header__cover {
    max-width: 1400px;
    margin: 0 auto;
  }
  
  .content {
    max-width: 1400px;
    margin: 0 auto;
  }
  
  .prime__cover {
    max-height: 600px;
  }
  
  .sidebar {
    max-width: 350px;
  }
}

/* ========== PRINT STYLES - Enhanced ========== */
@media print {
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  .header__cover,
  .sidebar,
  .back-top,
  .footer,
  .article__share,
  .comments,
  .header__burger,
  .header__mobile-menu {
    display: none !important;
  }
  
  .main {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .content {
    display: block !important;
  }
  
  .article__content {
    background: white !important;
    color: black !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .article__title {
    color: black !important;
  }
  
  .article__content h2,
  .article__content h3 {
    color: black !important;
    border-color: black !important;
  }
  
  .prime__cover {
    height: auto !important;
    min-height: 200px !important;
    page-break-inside: avoid;
  }
  
  h1, h2, h3, h4 {
    page-break-after: avoid;
    color: black !important;
  }
  
  p, li {
    orphans: 3;
    widows: 3;
  }
  
  blockquote {
    page-break-inside: avoid;
    border-left-color: black !important;
    background: transparent !important;
  }
  
  table {
    page-break-inside: avoid;
    border-color: black !important;
  }
  
  th, td {
    border-color: black !important;
  }
  
  a {
    color: black !important;
    text-decoration: underline !important;
  }
  
  .article__navigation,
  .author-info,
  .stats {
    display: none !important;
  }
}

/* ========== ACCESSIBILITY ENHANCEMENTS ========== */

/* Focus styles */
*:focus {
  outline: 2px solid #64b5f6;
  outline-offset: 2px;
}

.header__menu-item a:focus,
.button:focus,
.header__language-button:focus,
.header__burger:focus {
  outline: 2px solid #64b5f6;
  outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .header__burger .burger-icon span {
    transition: none !important;
  }
  
  .prime__cover,
  .category__card,
  .article__card,
  .sidebar__card {
    transform: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .button {
    border: 2px solid #ffffff;
  }
  
  .sidebar__card,
  .article__card,
  .category__card {
    border-width: 2px;
  }
  
  .article__content a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
  }
}

/* Dark mode override (for systems that prefer light mode) */
@media (prefers-color-scheme: light) {
  /* Keep dark theme as this appears to be a dark-themed site */
  /* Add light mode overrides here if needed in the future */
}

/* ========== TOUCH DEVICE OPTIMIZATIONS ========== */
@media (hover: none) and (pointer: coarse) {
  /* Touch-only devices */
  .button,
  .header__language-button,
  .header__burger,
  .nav__link,
  .share__link {
    min-height: 44px;
    min-width: 44px;
  }
  
  .header__menu-item a {
    padding: 12px 8px;
  }
  
  .sidebar__nav-item,
  .tool__item {
    min-height: 48px;
  }
  
  /* Remove hover effects on touch devices */
  .category__card:hover,
  .article__card:hover,
  .sidebar__card:hover {
    transform: none;
    box-shadow: none;
  }
}

/* ========== LANDSCAPE MOBILE OPTIMIZATION ========== */
@media (max-height: 500px) and (orientation: landscape) {
  .header__cover {
    padding: 8px 16px;
    min-height: 50px;
  }
  
  .prime__cover {
    height: 250px;
    margin: 8px;
  }
  
  .prime__title {
    font-size: clamp(1rem, 4vw, 1.5rem);
    margin-bottom: 8px;
  }
  
  .prime__text {
    font-size: clamp(0.8rem, 2vw, 1rem);
    margin-bottom: 12px;
  }
  
  .header__mobile-menu-content {
    top: 50px;
    min-height: calc(100vh - 50px);
  }
}

/* ========== DEBUGGING HELPERS (remove in production) ========== */
.debug-responsive {
  position: fixed;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px;
  font-size: 12px;
  z-index: 9999;
  border-radius: 4px;
  font-family: monospace;
}

.debug-responsive::before {
  content: "XS";
}

@media (min-width: 480px) {
  .debug-responsive::before {
    content: "SM";
  }
}

@media (min-width: 768px) {
  .debug-responsive::before {
    content: "MD";
  }
}

@media (min-width: 1024px) {
  .debug-responsive::before {
    content: "LG";
  }
}

@media (min-width: 1200px) {
  .debug-responsive::before {
    content: "XL";
  }
}

/* ========== PERFORMANCE OPTIMIZATIONS ========== */

/* GPU acceleration for animations */
.prime__cover,
.category__card,
.article__card,
.sidebar__card,
.button,
.back-top__button {
  will-change: transform;
}

/* Optimize scrolling */
.table-scroll,
.breadcrumbs,
.header__mobile-menu {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Optimize repaints */
.header__cover {
  contain: layout style paint;
}

.sidebar {
  contain: layout style;
}

.main {
  contain: layout;
}

/* ========== CONTAINER QUERIES SUPPORT (for modern browsers) ========== */
@supports (container-type: inline-size) {
  .sidebar {
    container-type: inline-size;
  }
  
  @container (min-width: 300px) {
    .sidebar__card {
      display: flex;
      flex-direction: row;
    }
    
    .sidebar__card-image {
      width: 80px;
      height: 60px;
      flex-shrink: 0;
    }
  }
}

/* ========== FINAL UTILITY CLASSES ========== */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #1976d2;
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 1001;
  border-radius: 4px;
}

.skip-link:focus {
  top: 6px;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.no-scroll {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Clearfix for older browser support */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
  word-wrap: break-word;
  hyphens: auto;
}

/* Extra responsive title for very small screens */
@media (max-width: 320px) {
  .prime__title {
    font-size: 1rem;
    line-height: 1.2;
  }
}

.prime__text {
  color: #ffffff;
  font-size: clamp(0.8rem, 2.5vw, 1.2rem);
  margin-bottom: clamp(12px, 3vw, 20px);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  line-height: 1.4;
  max-width: 100%;
  word-wrap: break-word;
}

.prime__buttons {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 2vw, 10px);
  align-items: center;
  margin: clamp(12px, 3vw, 20px) 0;
  width: 100%;
}

.prime__button {
  font-size: clamp(0.75rem, 2vw, 0.875rem);
  padding: clamp(8px, 2vw, 12px) clamp(16px, 4vw, 32px);
  box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
  width: 100%;
  max-width: clamp(180px, 40vw, 200px);
  margin: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== MOBILE-FIRST LAYOUT - Enhanced ========== */
.content {
  display: block;
  min-height: calc(100vh - 60px);
  width: 100%;
}

/* Sidebars - Enhanced Mobile First */
.sidebar {
  background: #0a1929;
  width: 100%;
  padding: clamp(12px, 3vw, 24px);
  border-bottom: 1px solid #37474f;
}

.sidebar__left {
  order: 2;
}

.sidebar__right {
  order: 3;
}

.main {
  order: 1;
  background: #0a1929;
  width: 100%;
  min-height: 300px;
}

/* ========== SIDEBAR COMPONENTS - Enhanced ========== */
.sidebar__section {
  margin-bottom: clamp(16px, 4vw, 24px);
}

.sidebar__title {
  color: #1976d2;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  font-weight: 600;
  margin-bottom: clamp(8px, 2vw, 12px);
  padding-bottom: 6px;
  border-bottom: 2px solid #1976d2;
  word-wrap: break-word;
}
/* Breadcrumbs - Minimal Slim Style */
.sidebar__breadcrumbs {
  margin-bottom: 10px;
}

.breadcrumbs {
  background: transparent;
  padding: 4px 0;
  border-bottom: 1px solid #37474f;
  overflow-x: auto;
}

.breadcrumbs__container {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  white-space: nowrap;
  min-width: max-content;
}

.breadcrumbs__link {
  color: #64b5f6;
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumbs__link:hover {
  color: #90caf9;
}

.breadcrumbs__separator {
  color: #78909c;
}

.breadcrumbs__current {
  color: #ffffff;
  font-weight: 400;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Categories Grid - Enhanced Responsive */
.categories {
  padding: clamp(16px, 4vw, 20px);
}

.categories h2 {
  color: #1976d2;
  font-size: clamp(1.2rem, 3.5vw, 1.5rem);
  margin-bottom: clamp(16px, 4vw, 20px);
  text-align: center;
  word-wrap: break-word;
}

.categories__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 3vw, 16px);
}

/* Enhanced responsive grid */
@media (min-width: 480px) {
  .categories__grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (min-width: 768px) {
  .categories__grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (min-width: 1024px) {
  .categories__grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

.category__card {
  background: #1a2332;
  border: 1px solid #37474f;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.category__card:hover {
  border-color: #1976d2;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.2);
}

.category__image {
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
}

.category__image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.category__content {
  padding: clamp(12px, 3vw, 16px);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.category__content h3 {
  color: #ffffff;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  margin-bottom: clamp(6px, 1.5vw, 8px);
  font-weight: 600;
  line-height: 1.3;
  word-wrap: break-word;
}

.category__content p {
  color: #b0bec5;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  line-height: 1.5;
  margin-bottom: clamp(8px, 2vw, 12px);
  flex: 1;
}

.category__link {
  color: #64b5f6;
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  transition: color 0.3s ease;
  align-self: flex-start;
  min-height: 24px;
  display: flex;
  align-items: center;
}

.category__link:hover {
  color: #90caf9;
}

/* Articles Grid - Enhanced */
.latest-articles {
  padding: clamp(16px, 4vw, 20px);
}

.latest-articles h2 {
  color: #1976d2;
  font-size: clamp(1.2rem, 3.5vw, 1.5rem);
  margin-bottom: clamp(16px, 4vw, 20px);
  text-align: center;
  word-wrap: break-word;
}

.articles__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 3vw, 16px);
  margin-bottom: clamp(20px, 5vw, 24px);
}

/* Enhanced responsive articles grid */
@media (min-width: 480px) {
  .articles__grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (min-width: 768px) {
  .articles__grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (min-width: 1200px) {
  .articles__grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

.article__card {
  background: #1a2332;
  border: 1px solid #37474f;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  min-height: 250px;
  display: flex;
  flex-direction: column;
}

.article__card:hover {
  border-color: #1976d2;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2);
}

.article__image {
  height: clamp(100px, 25vw, 140px);
  overflow: hidden;
  flex-shrink: 0;
}

.article__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article__content {
  padding: clamp(12px, 3vw, 16px);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: clamp(6px, 1.5vw, 8px);
  font-size: clamp(0.65rem, 1.5vw, 0.75rem);
  gap: 8px;
  flex-wrap: wrap;
}

.article__category {
  background: #1976d2;
  color: #ffffff;
  padding: 3px clamp(6px, 1.5vw, 8px);
  border-radius: 4px;
  font-weight: 600;
  flex-shrink: 0;
  min-height: 20px;
  display: flex;
  align-items: center;
}

.article__date {
  color: #78909c;
  flex-shrink: 0;
}

.article__title {
  font-size: clamp(0.85rem, 2.2vw, 1rem);
  margin-bottom: clamp(6px, 1.5vw, 8px);
  font-weight: 600;
  line-height: 1.3;
}

.article__title a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
  word-wrap: break-word;
  hyphens: auto;
}

.article__title a:hover {
  color: #64b5f6;
}

.article__excerpt {
  color: #b0bec5;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  line-height: 1.5;
  margin-bottom: clamp(8px, 2vw, 12px);
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.article__tags {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(4px, 1vw, 6px);
  margin-top: auto;
}

.article__tag {
  background: #263238;
  color: #90caf9;
  padding: 2px clamp(4px, 1vw, 6px);
  border-radius: 4px;
  font-size: clamp(0.6rem, 1.5vw, 0.7rem);
  font-weight: 500;
  white-space: nowrap;
}

/* Section Footer */
.section__footer {
  text-align: center;
  margin-top: clamp(16px, 4vw, 20px);
}

/* ========== TABLET RESPONSIVE ========== */
@media (min-width: 768px) {
  .header__cover {
    padding: 15px clamp(20px, 3vw, 32px);
  }
  
  .header__logo img {
    height: 40px;
  }
  
  .header__mobile-buttons {
    display: none;
  }
  
  .header__desktop-buttons {
    display: flex;
    gap: 16px;
    align-items: center;
  }
  
  .header__search {
    display: flex;
  }
  
  .header__nav {
    display: flex;
    align-items: center;
    gap: clamp(20px, 3vw, 28px);
  }
  
  .header__menu {
    display: flex;
    list-style: none;
    gap: clamp(16px, 2.5vw, 20px);
    margin: 0;
    padding: 0;
  }
  
  .header__menu-item a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 8px 0;
    position: relative;
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    white-space: nowrap;
  }
  
  .header__menu-item a:hover {
    color: #64b5f6;
  }
  
  .header__menu-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #1976d2;
    transition: width 0.3s ease;
  }
  
  .header__menu-item a:hover::after {
    width: 100%;
  }
  
  .header__burger {
    display: none;
  }
  
  .content {
    display: flex;
    min-height: calc(100vh - 70px);
  }
  
  .sidebar {
    width: clamp(250px, 25vw, 320px);
    border-bottom: none;
    flex-shrink: 0;
  }
  
  .sidebar__left {
    border-right: 1px solid #37474f;
    order: 1;
  }
  
  .sidebar__right {
    border-left: 1px solid #37474f;
    order: 3;
  }
  
  .main {
    flex: 1;
    order: 2;
    min-width: 0; /* Prevents flex item from overflowing */
  }
  
  .prime__cover {
    height: clamp(350px, 50vh, 500px);
    margin: clamp(16px, 2.5vw, 24px);
  }
  
  .prime__title {
    font-size: clamp(2rem, 4vw, 3.5rem);
  }
  
  .prime__text {
    font-size: clamp(1rem, 2vw, 1.2rem);
  }
  
  .prime__buttons {
    flex-direction: row;
    justify-content: center;
    gap: clamp(12px, 2vw, 16px);
    flex-wrap: wrap;
  }
  
  .prime__button {
    width: auto;
    min-width: clamp(140px, 20vw, 180px);
    flex: 0 0 auto;
  }
}

/* ========== DESKTOP RESPONSIVE ========== */
@media (min-width: 1024px) {
  .header__cover {
    padding: 15px clamp(24px, 3vw, 40px);
  }
  
  .header__menu {
    gap: clamp(20px, 2.5vw, 28px);
  }
  
  .header__desktop-buttons {
    gap: 20px;
  }
  
  .sidebar {
    width: clamp(280px, 25vw, 350px);
    padding: clamp(20px, 2.5vw, 32px);
  }
  
  .prime__cover {
    height: clamp(400px, 60vh, 600px);
    margin: clamp(20px, 2.5vw, 32px);
  }
  
  .section {
    padding: clamp(24px, 3vw, 40px);
  }
  
  .article__header {
    padding: clamp(20px, 2.5vw, 32px);
    margin: clamp(20px, 2.5vw, 32px);
  }
  
  .article__content {
    padding: clamp(24px, 3vw, 40px);
    margin: clamp(20px, 2.5vw, 32px);
  }
  
  .article__footer {
    padding: clamp(20px, 2.5vw, 32px);
    margin: clamp(20px, 2.5vw, 32px);
  }
  
  .comments {
    padding: clamp(20px, 2.5vw, 32px);
    margin: clamp(20px, 2.5vw, 32px);
  }
}

/* ========== LARGE DESKTOP ========== */
@media (min-width: 1200px) {
  .header__cover {
    padding: 15px clamp(32px, 3vw, 48px);
  }
  
  .title.general {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
  }
  
  .prime__title {
    font-size: clamp(2.5rem, 4vw, 4rem);
  }
  
  .sidebar {
    width: clamp(300px, 22vw, 380px);
  }
}

/* ========== SIDEBAR COMPONENTS CONTINUED ========== */
.sidebar__cards {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2.5vw, 12px);
}

.sidebar__card {
  background: #1a2332;
  border: 1px solid #37474f;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  min-height: 120px;
}

.sidebar__card:hover {
  border-color: #1976d2;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2);
}

.sidebar__card-image {
  width: 100%;
  aspect-ratio: 1 / 1; /* квадрат */
  overflow: hidden;
  border-radius: 6px;
}

.sidebar__card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.sidebar__card-content {
  padding: clamp(8px, 2vw, 12px);
}

.sidebar__card-title {
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  margin-bottom: 6px;
  line-height: 1.3;
}

.sidebar__card-title a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
  word-wrap: break-word;
  hyphens: auto;
}

.sidebar__card-title a:hover {
  color: #64b5f6;
}

.sidebar__card-excerpt {
  color: #b0bec5;
  font-size: clamp(0.7rem, 1.8vw, 0.8rem);
  margin-bottom: 8px;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sidebar__card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: clamp(0.65rem, 1.5vw, 0.75rem);
  gap: 8px;
  flex-wrap: wrap;
}

.sidebar__card-category {
  background: #1976d2;
  color: #ffffff;
  padding: 2px clamp(4px, 1vw, 6px);
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.sidebar__card-date {
  color: #78909c;
  flex-shrink: 0;
}

/* Navigation Lists - Enhanced */
.sidebar__nav-list {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.5vw, 8px);
}

.sidebar__nav-item {
  display: flex;
  align-items: center;
  padding: clamp(8px, 2vw, 10px) clamp(10px, 2.5vw, 12px);
  background: #1a2332;
  border: 1px solid #37474f;
  border-radius: 6px;
  transition: all 0.3s ease;
  min-height: 40px;
}

.sidebar__nav-item:hover {
  background: #263238;
  border-color: #1976d2;
}

.sidebar__nav-icon {
  width: clamp(14px, 3vw, 16px);
  height: clamp(14px, 3vw, 16px);
  margin-right: 8px;
  flex-shrink: 0;
}

.sidebar__nav-item a {
  color: #ffffff;
  text-decoration: none;
  flex: 1;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  transition: color 0.3s ease;
  word-wrap: break-word;
  min-width: 0;
}

.sidebar__nav-item:hover a {
  color: #64b5f6;
}

.sidebar__nav-count {
  color: #78909c;
  font-size: clamp(0.7rem, 1.8vw, 0.8rem);
  font-weight: 500;
  flex-shrink: 0;
  margin-left: 8px;
}

/* Articles List - Enhanced */
.sidebar__articles {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 2vw, 10px);
}

.sidebar__article {
  padding: clamp(8px, 2vw, 10px) clamp(10px, 2.5vw, 12px);
  background: #1a2332;
  border: 1px solid #37474f;
  border-radius: 6px;
  transition: all 0.3s ease;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sidebar__article:hover {
  background: #263238;
  border-color: #1976d2;
}

.sidebar__article-title {
  font-size: clamp(0.75rem, 1.8vw, 0.85rem);
  margin-bottom: 6px;
  line-height: 1.3;
}

.sidebar__article-title a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
  word-wrap: break-word;
  hyphens: auto;
}

.sidebar__article-title a:hover {
  color: #64b5f6;
}

.sidebar__article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: clamp(0.65rem, 1.5vw, 0.75rem);
  color: #78909c;
  gap: 8px;
  flex-wrap: wrap;
}

/* Newsletter - Enhanced */
.sidebar__newsletter {
  background: #1a2332;
  border: 1px solid #37474f;
  border-radius: 8px;
  padding: clamp(12px, 3vw, 16px);
  margin-bottom: clamp(16px, 4vw, 20px);
}

.sidebar__text {
  color: #b0bec5;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  margin-bottom: clamp(10px, 2.5vw, 12px);
  line-height: 1.5;
}

.sidebar__form {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 2vw, 10px);
}

.sidebar__input {
  background: #263238;
  border: 1px solid #37474f;
  color: #ffffff;
  padding: clamp(8px, 2vw, 10px) clamp(10px, 2.5vw, 12px);
  border-radius: 6px;
  font-size: clamp(0.8rem, 2vw, 0.875rem);
  min-height: 40px;
}

.sidebar__input::placeholder {
  color: #78909c;
}

.sidebar__button {
  width: 100%;
  text-align: center;
  padding: clamp(8px, 2vw, 10px);
  font-size: clamp(0.75rem, 1.8vw, 0.8125rem);
  min-height: 40px;
}

/* Calendar - Enhanced */
.sidebar__calendar {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2.5vw, 12px);
}

.calendar__event {
  display: flex;
  align-items: center;
  padding: clamp(10px, 2.5vw, 12px);
  background: #1a2332;
  border: 1px solid #37474f;
  border-radius: 6px;
  transition: all 0.3s ease;
  min-height: 60px;
}

.calendar__event:hover {
  background: #263238;
  border-color: #1976d2;
}

.calendar__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: clamp(8px, 2vw, 12px);
  min-width: clamp(32px, 8vw, 40px);
  flex-shrink: 0;
}

.calendar__day {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 700;
  color: #1976d2;
  line-height: 1;
}

.calendar__month {
  font-size: clamp(0.6rem, 1.5vw, 0.7rem);
  color: #78909c;
  text-transform: uppercase;
  line-height: 1;
}

.calendar__info {
  flex: 1;
  min-width: 0;
}

.calendar__title {
  color: #ffffff;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  margin-bottom: 4px;
  font-weight: 600;
  word-wrap: break-word;
  hyphens: auto;
}

.calendar__location {
  color: #b0bec5;
  font-size: clamp(0.7rem, 1.8vw, 0.8rem);
  margin-bottom: 4px;
  word-wrap: break-word;
}

.calendar__type {
  background: #0277bd;
  color: #ffffff;
  padding: 2px clamp(4px, 1vw, 6px);
  border-radius: 4px;
  font-size: clamp(0.6rem, 1.5vw, 0.7rem);
  font-weight: 500;
  white-space: nowrap;
  display: inline-block;
}

/* Tips - Enhanced */
.sidebar__tips {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 2vw, 10px);
}

.tip__item {
  padding: clamp(8px, 2vw, 10px) clamp(10px, 2.5vw, 12px);
  background: #1a2332;
  border: 1px solid #37474f;
  border-radius: 6px;
  border-left: 3px solid #1976d2;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tip__race {
  color: #64b5f6;
  font-size: clamp(0.7rem, 1.8vw, 0.8rem);
  font-weight: 600;
  margin-bottom: 4px;
  word-wrap: break-word;
}

.tip__recommendation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  gap: 8px;
  flex-wrap: wrap;
}

.tip__recommendation strong {
  color: #ffffff;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  word-wrap: break-word;
  flex: 1;
  min-width: 0;
}

.tip__odds {
  background: #0277bd;
  color: #ffffff;
  padding: 2px clamp(4px, 1vw, 6px);
  border-radius: 4px;
  font-size: clamp(0.7rem, 1.8vw, 0.8rem);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.tip__confidence {
  color: #78909c;
  font-size: clamp(0.65rem, 1.5vw, 0.75rem);
}

@media (max-width: 768px) {
  .sidebar__card,
  .sidebar__title {
    display: none !important;
  }
}

/* Tools - Enhanced */
.sidebar__tools {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 2vw, 10px);
}

.tool__item {
  display: flex;
  align-items: center;
  padding: clamp(10px, 2.5vw, 12px);
  background: #1a2332;
  border: 1px solid #37474f;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
  min-height: 60px;
}

.tool__item:hover {
  background: #263238;
  border-color: #1976d2;
  transform: translateY(-1px);
}

.tool__icon {
  width: clamp(24px, 6vw, 32px);
  height: clamp(24px, 6vw, 32px);
  margin-right: clamp(8px, 2vw, 10px);
  flex-shrink: 0;
}

.tool__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tool__content {
  flex: 1;
  min-width: 0;
}

.tool__name {
  color: #ffffff;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  font-weight: 600;
  margin-bottom: 2px;
  word-wrap: break-word;
  hyphens: auto;
}

.tool__description {
  color: #b0bec5;
  font-size: clamp(0.7rem, 1.8vw, 0.8rem);
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* CTA - Enhanced */
.sidebar__cta {
  background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%);
  padding: clamp(12px, 3vw, 16px);
  border-radius: 8px;
  text-align: center;
  margin-bottom: clamp(16px, 4vw, 20px);
}

.sidebar__cta .sidebar__title {
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: clamp(8px, 2vw, 10px);
}

.sidebar__cta .sidebar__text {
  color: #e3f2fd;
  margin-bottom: clamp(10px, 2.5vw, 12px);
}

.sidebar__cta .sidebar__button {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.sidebar__cta .sidebar__button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* ========== STATS SECTION - Enhanced ========== */
.stats {
  background: #1a2332;
  margin: clamp(12px, 3vw, 24px);
  border-radius: 8px;
  border: 1px solid #37474f;
  padding: clamp(16px, 4vw, 20px);
}

.stats__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 3vw, 16px);
  margin-top: clamp(16px, 4vw, 20px);
}

@media (min-width: 480px) {
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .stats__grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (min-width: 1024px) {
  .stats__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stats__item {
  background: #263238;
  border: 1px solid #37474f;
  border-radius: 8px;
  padding: clamp(16px, 4vw, 20px);
  text-align: center;
  transition: all 0.3s ease;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stats__item:hover {
  border-color: #1976d2;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2);
}

.stats__number {
  color: #1976d2;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1;
}

.stats__label {
  color: #ffffff;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  font-weight: 600;
  margin-bottom: 4px;
  word-wrap: break-word;
}

.stats__description {
  color: #b0bec5;
  font-size: clamp(0.75rem, 1.8vw, 0.85rem);
  line-height: 1.4;
}

/* ========== ARTICLE PAGES - Enhanced ========== */
.article__header {
  padding: clamp(16px, 4vw, 24px);
  background: #1a2332;
  margin: clamp(12px, 3vw, 24px);
  border-radius: 8px;
  border: 1px solid #37474f;
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(6px, 1.5vw, 8px);
  margin-bottom: clamp(10px, 2.5vw, 12px);
  font-size: clamp(0.7rem, 1.8vw, 0.8rem);
}

.article__category a {
  background: #1976d2;
  color: #ffffff;
  padding: 4px clamp(6px, 1.5vw, 8px);
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  min-height: 24px;
  display: flex;
  align-items: center;
}

.article__date,
.article__updated,
.article__reading-time {
  color: #78909c;
  white-space: nowrap;
}

.article__title {
  color: #ffffff;
  font-size: clamp(1.4rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: clamp(10px, 2.5vw, 12px);
  word-wrap: break-word;
  hyphens: auto;
}

.article__subtitle {
  color: #b0bec5;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.4;
  margin-bottom: clamp(12px, 3vw, 16px);
  word-wrap: break-word;
}

.article__featured-image {
  margin-bottom: clamp(12px, 3vw, 16px);
  border-radius: 8px;
  overflow: hidden;
}

.article__featured-image img {
  width: 100%;
  height: auto;
  max-height: clamp(200px, 40vh, 300px);
  object-fit: cover;
}

.article__image-caption {
  background: #263238;
  color: #b0bec5;
  padding: clamp(6px, 1.5vw, 8px) clamp(10px, 2.5vw, 12px);
  font-size: clamp(0.7rem, 1.8vw, 0.8rem);
  text-align: center;
  border-top: 1px solid #37474f;
}

/* Article Info Box - Enhanced */
.article__info-box {
  background: #263238;
  border: 1px solid #37474f;
  border-radius: 6px;
  padding: clamp(10px, 2.5vw, 12px);
  margin-bottom: clamp(12px, 3vw, 16px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(6px, 1.5vw, 8px);
}

@media (min-width: 480px) {
  .article__info-box {
    grid-template-columns: repeat(2, 1fr);
  }
}

.info-box__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: clamp(0.75rem, 1.8vw, 0.85rem);
  gap: 8px;
  min-height: 24px;
}

.info-box__item strong {
  color: #64b5f6;
  font-weight: 600;
  word-wrap: break-word;
  flex: 1;
}

.difficulty-level {
  padding: 2px clamp(6px, 1.5vw, 8px);
  border-radius: 4px;
  font-size: clamp(0.65rem, 1.5vw, 0.75rem);
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.difficulty-level--beginner {
  background: #4caf50;
  color: #ffffff;
}

.difficulty-level--intermediate {
  background: #ff9800;
  color: #ffffff;
}

.difficulty-level--advanced {
  background: #f44336;
  color: #ffffff;
}

/* Article Tags - Enhanced */
.article__tags {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(4px, 1vw, 6px);
  margin-bottom: clamp(12px, 3vw, 16px);
}

.article__tag {
  background: #1976d2;
  color: #ffffff;
  padding: 4px clamp(6px, 1.5vw, 8px);
  border-radius: 4px;
  text-decoration: none;
  font-size: clamp(0.65rem, 1.5vw, 0.75rem);
  font-weight: 500;
  transition: background 0.3s ease;
  white-space: nowrap;
  min-height: 24px;
  display: flex;
  align-items: center;
}

.article__tag:hover {
  background: #1e88e5;
}

/* Social Share - Enhanced */
.article__share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(6px, 1.5vw, 8px);
  padding-top: clamp(10px, 2.5vw, 12px);
  border-top: 1px solid #37474f;
}

.share__label {
  color: #78909c;
  font-size: clamp(0.7rem, 1.8vw, 0.8rem);
  font-weight: 600;
  margin-right: clamp(4px, 1vw, 8px);
}

.share__link {
  background: #263238;
  color: #ffffff;
  padding: clamp(4px, 1vw, 6px) clamp(8px, 2vw, 12px);
  border-radius: 4px;
  text-decoration: none;
  font-size: clamp(0.65rem, 1.5vw, 0.75rem);
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  min-height: 32px;
  display: flex;
  align-items: center;
}

.share__twitter:hover {
  background: #1da1f2;
}

.share__facebook:hover {
  background: #1877f2;
}

.share__linkedin:hover {
  background: #0a66c2;
}

.share__copy:hover {
  background: #1976d2;
}
/* ========== СТИЛИ ДЛЯ СУЩЕСТВУЮЩЕЙ КНОПКИ BACK-TOP ========== */

.back-top {
  position: fixed;
  bottom: clamp(16px, 4vw, 24px);
  right: clamp(16px, 4vw, 24px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: none;
}

/* Показать кнопку */
.back-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  margin-right: 500px;
}

/* Анимация при скролле */
.back-top.scrolling {
  transform: translateY(0) scale(0.95);
}

.back-top__button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(48px, 12vw, 56px);
  height: clamp(48px, 12vw, 56px);
  background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%);
  color: #ffffff;
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 
    0 4px 20px rgba(25, 118, 210, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  
  /* Touch targets */
  min-width: 44px;
  min-height: 44px;
  
  /* Prevent selection */
  user-select: none;
  -webkit-user-select: none;
  
  /* Improve rendering */
  will-change: transform, box-shadow;
  backface-visibility: hidden;
}

/* Ripple effect */
.back-top__button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.3s ease;
  pointer-events: none;
}

/* Hover states */
.back-top__button:hover {
  background: linear-gradient(135deg, #1976d2 0%, #1e88e5 100%);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 
    0 8px 30px rgba(25, 118, 210, 0.4),
    0 4px 15px rgba(0, 0, 0, 0.3);
  color: #ffffff;
  text-decoration: none;
}

.back-top__button:hover::before {
  transform: scale(1);
}

/* Active state */
.back-top__button:active {
  transform: translateY(-2px) scale(0.98);
  box-shadow: 
    0 4px 20px rgba(25, 118, 210, 0.35),
    0 2px 10px rgba(0, 0, 0, 0.25);
}

/* Focus state для accessibility */
.back-top__button:focus {
  outline: none;
  box-shadow: 
    0 4px 20px rgba(25, 118, 210, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.2),
    0 0 0 3px rgba(100, 181, 246, 0.5);
  text-decoration: none;
}

/* SVG стрелка */
.back-top__button svg {
  width: clamp(20px, 5vw, 24px);
  height: clamp(20px, 5vw, 24px);
  transition: all 0.3s ease;
  stroke: currentColor;
  fill: none;
  pointer-events: none;
}

/* Анимация стрелки при ховере */
.back-top__button:hover svg {
  transform: translateY(-2px) scale(1.1);
}

/* Пульсирующая анимация */
@keyframes pulse {
  0% {
    box-shadow: 
      0 4px 20px rgba(25, 118, 210, 0.3),
      0 2px 8px rgba(0, 0, 0, 0.2),
      0 0 0 0 rgba(25, 118, 210, 0.7);
  }
  70% {
    box-shadow: 
      0 4px 20px rgba(25, 118, 210, 0.3),
      0 2px 8px rgba(0, 0, 0, 0.2),
      0 0 0 10px rgba(25, 118, 210, 0);
  }
  100% {
    box-shadow: 
      0 4px 20px rgba(25, 118, 210, 0.3),
      0 2px 8px rgba(0, 0, 0, 0.2),
      0 0 0 0 rgba(25, 118, 210, 0);
  }
}

/* Применить пульсацию при первом появлении */
.back-top.first-show .back-top__button {
  animation: pulse 2s infinite;
}

/* Анимация появления */
@keyframes slideInUp {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.5) rotate(45deg);
  }
  50% {
    transform: translateY(-5px) scale(1.1) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes slideOutDown {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(30px) scale(0.5) rotate(-45deg);
  }
}

/* Применение анимаций */
.back-top.animate-in {
  animation: slideInUp 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.back-top.animate-out {
  animation: slideOutDown 0.4s ease-in forwards;
}

/* Tooltip */
.back-top::after {
  content: 'Наверх';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  margin-right: 12px;
  pointer-events: none;
  backdrop-filter: blur(4px);
  z-index: 1001;
}

.back-top::before {
  content: '';
  position: absolute;
  right: 88%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: rgba(0, 0, 0, 0.8);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 1001;
}

.back-top:hover::after,
.back-top:hover::before {
  opacity: 1;
  visibility: visible;
}

.back-top:hover::after {
  transform: translateY(-50%) translateX(-8px);
}

/* Мобильные устройства */
@media (max-width: 768px) {
  .back-top {
    bottom: clamp(12px, 3vw, 16px);
    right: clamp(12px, 3vw, 16px);
  }
  
  .back-top__button {
    width: clamp(44px, 10vw, 48px);
    height: clamp(44px, 10vw, 48px);
  }
  
  .back-top__button svg {
    width: clamp(18px, 4vw, 20px);
    height: clamp(18px, 4vw, 20px);
  }
  
  /* Скрываем tooltip на мобильных */
  .back-top::after,
  .back-top::before {
    display: none;
  }
}

/* Очень маленькие экраны */
@media (max-width: 320px) {
  .back-top {
    bottom: 8px;
    right: 8px;
  }
  
  .back-top__button {
    width: 40px;
    height: 40px;
  }
  
  .back-top__button svg {
    width: 16px;
    height: 16px;
  }
}

/* Touch устройства */
@media (hover: none) and (pointer: coarse) {
  .back-top__button:hover {
    transform: none;
    background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%);
  }
  
  .back-top__button:active {
    transform: scale(0.95);
  }
  
  /* Убираем tooltip */
  .back-top::after,
  .back-top::before {
    display: none;
  }
}

/* Альтернативные стили */

/* Квадратная кнопка */
.back-top--square .back-top__button {
  border-radius: clamp(8px, 2vw, 12px);
}

/* Минималистичная кнопка */
.back-top--minimal .back-top__button {
  background: rgba(25, 118, 210, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.back-top--minimal .back-top__button:hover {
  background: rgba(25, 118, 210, 1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Темная версия */
.back-top--dark .back-top__button {
  background: linear-gradient(135deg, #263238 0%, #37474f 100%);
  color: #64b5f6;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

.back-top--dark .back-top__button:hover {
  background: linear-gradient(135deg, #37474f 0%, #455a64 100%);
  color: #90caf9;
}

/* Высокий контраст */
@media (prefers-contrast: high) {
  .back-top__button {
    border: 2px solid #ffffff;
    box-shadow: 
      0 4px 20px rgba(0, 0, 0, 0.8),
      0 2px 8px rgba(0, 0, 0, 0.6);
  }
}

/* Уменьшенная анимация */
@media (prefers-reduced-motion: reduce) {
  .back-top,
  .back-top__button,
  .back-top__button svg {
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
  
  .back-top__button:hover {
    transform: none !important;
  }
  
  .back-top__button:hover svg {
    transform: none !important;
  }
}

/* Для печати */
@media print {
  .back-top {
    display: none !important;
  }
}

/* Smooth scroll behavior для anchor-link */
html {
  scroll-behavior: smooth;
}

/* Дополнительные стили для плавного скролла */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

}
