* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #000;
  background: #fff;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* TOP BAR */

.top-bar {
  font-size: clamp(14px, 2.5vw, 16px);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 44px;
}

.dot {
  margin: 0 8px;
}

.social a {
  margin-left: 12px;
}

/* MAIN HEADER */

.main-header {
  padding: 24px 0 40px;
}

.main-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: clamp(24px, 5vw, 32px);
  line-height: 1.2;
}


.nav a {
  font-size: 18px;
}

/* NEWS GRID */

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
}

.news-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 6px;
}

.category {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 10px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 6px;
  background: #f1f1f1;
}

.news-card h2 {
  margin: 12px 0 8px;
  font-size: 22px;
  line-height: 1.3;
}

.news-card time {
  font-size: 14px;
  color: #666;
}

/* ARTICLE PAGE */

.article-container {
  max-width: 800px;
  margin-top: 40px;
}

.article-title {
  font-size: 40px;
  font-weight: 800;
  margin: 12px 0 16px;
}

.article-date {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  color: #666;
}

.article-lead {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.article-image {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 32px;
}

.article-content {
  font-size: 18px;
  line-height: 1.7;
}

.article-content h2 {
  margin-top: 40px;
}

.category {
  text-transform: uppercase;
}

.category.SPORTS { background: #e6f0ff; }
.category.CELEBRITY { background: #fdecef; }
.category.BUSINESS { background: #eef9f1; }
.category.TECH { background: #f3f0ff; }
/* ===========================================
   MOBILE RESPONSIVE STYLES
   =========================================== */

@media (max-width: 768px) {
  /* Container adjustments */
  .container {
    padding: 0 16px;
  }

  /* Top Bar - Mobile */
  .top-bar {
    font-size: 12px;
    padding: 6px 0;
  }

  .top-bar-inner {
    flex-direction: column;
    height: auto;
    gap: 4px;
  }

  .dot {
    margin: 0 4px;
  }

  .social a {
    margin-left: 8px;
  }

  /* Main Header - Mobile */
  .main-header {
    padding: 16px 0 24px;
  }

  .main-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .site-title {
    font-size: 24px;
    max-width: 100%;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav a {
    margin-left: 0;
    margin-right: 16px;
    font-size: 14px;
    white-space: nowrap;
  }

  /* News Grid - Mobile (2 колонки) */
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
  }

  .news-card img {
    height: 180px;
  }

  /* КАТЕГОРИЯ - МОБИЛЬНАЯ (КОМПАКТНАЯ) */
  .category {
    font-size: 11px;
    padding: 3px 6px;
    margin-top: 10px;
    font-weight: 700;
    border-radius: 3px;
  }

  .news-card h2 {
    font-size: 16px;
    margin: 10px 0 6px;
    line-height: 1.3;
  }

  .news-card time {
    font-size: 12px;
  }

  /* Article Page - Mobile */
  .article-container {
    margin-top: 30px;
  }

  .article-title {
    font-size: 28px;
    margin: 8px 0 12px;
  }

  .article-date {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .article-lead {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 24px;
  }

  .article-content {
    font-size: 16px;
    line-height: 1.6;
  }

  .article-content h2 {
    font-size: 22px;
    margin-top: 32px;
  }

  .article-content h3 {
    font-size: 18px;
  }

  .article-content p {
    margin: 16px 0;
  }
}

/* Очень маленькие телефоны (≤ 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  /* News Grid - на очень маленьких 1 колонка */
  .news-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .news-card img {
    height: 200px; /* увеличиваем для одной колонки */
  }

  .site-title {
    font-size: 24px;
  }

  .nav a {
    font-size: 15px;
    margin-right: 16px;
  }

  .category {
    font-size: 13px;
    padding: 6px 10px;
  }

  .news-card h2 {
    font-size: 20px; /* на одной колонке можно больше */
  }

  .article-title {
    font-size: 26px;
  }

  .article-lead {
    font-size: 17px;
  }

  .article-content {
    font-size: 16px;
  }

  .article-content h2 {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  /* Extra small devices */
  .container {
    padding: 0 12px;
  }

  .top-bar {
    font-size: 22px;
  }

  .site-title {
    font-size: 28px;
  }

  .nav a {
    font-size: 32px;
  }

  .news-card img {
    height: 180px;
  }

  .news-card h2 {
    font-size: 17px;
  }

  .article-title {
    font-size: 24px;
  }

  .article-lead {
    font-size: 15px;
  }

  .article-content {
    font-size: 15px;
  }

  .article-content h2 {
    font-size: 18px;
  }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .site-title {
    font-size: 32px;
  }

  .article-title {
    font-size: 32px;
  }

  .article-lead {
    font-size: 17px;
  }
}

/* Utility classes for mobile */
.mobile-only {
  display: none;
}

.desktop-only {
  display: block;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }

  .desktop-only {
    display: none;
  }
}

/* Improved touch targets for mobile */
@media (max-width: 768px) {
  a, button, .category {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav a {
    min-height: 32px;
  }
}

/* Prevent horizontal scrolling */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

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

/* Добавьте это в конец вашего style.css */

.main-footer {
  background: #000;
  color: #fff;
  padding: 60px 0 30px;
  margin-top: 80px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #fff;
}

.footer-section p {
  color: #aaa;
  line-height: 1.6;
  margin: 0;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 10px;
}

.footer-section a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: #fff;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 30px;
  text-align: center;
  color: #777;
  font-size: 14px;
}

.footer-bottom p {
  margin: 5px 0;
}

@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .main-footer {
    padding: 40px 0 20px;
    margin-top: 60px;
  }

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

  .social-links {
    align-items: center;
  }
}