/*
Theme Name: Monograce
Theme URI: https://monograce.local
Author: Your Name
Author URI: https://yourname.com
Description: A modern minimalist news blog theme
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: monograce
*/

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #ffffff;
  color: #000000;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: unset;
  cursor: pointer;
}

#page {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* вся высота окна */
}

/* Header */
.header {
  position: sticky;
  top: 0;
  width: 100%;
  background-color: #ffffff;
  border-bottom: 1px solid #000000;
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  cursor: default;
  user-select: none;
  display: flex;
  align-items: center;
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -1px;
}

.dots {
  display: inline-block;
  position: relative;
  width: 4px;
  height: 4px;
  border-radius: 50%;
}
.dot-1 {
  background-color: #e09c1e;
  top: 0px;
  left: 5px;
}
.dot-2 {
  background-color: #e03b1e;
  top: -9px;
  left: 1px;
}
.dot-3 {
  background-color: #100f0f;
  top: 0px;
  left: 7px;
}

.dots-small {
  display: inline-block;
  position: relative;
  width: 3px;
  height: 3px;
  border-radius: 50%;
}
.dot-1-small {
  background-color: #e09c1e;
  top: 0px;
  left: 4px;
}
.dot-2-small {
  background-color: #e03b1e;
  top: -7px;
  left: 1px;
}
.dot-3-small {
  background-color: #100f0f;
  top: 0px;
  left: 5px;
}

.nav-sections {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 40px;
}

.nav-sections a {
  text-decoration: none;
  color: #000000;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 0;
  transition: opacity 0.2s;
}

.nav-sections a:hover {
  opacity: 0.5;
}

.separator {
  color: #000000;
  margin: 0 4px;
  font-size: 13px;
}

.search-form {
  margin-left: 8px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.search-form input[type="text"] {
  width: 100%;
  padding: 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.search-btn {
  display: block;
  background: url("img/search.svg");
  background-position: center;
  background-size: cover;
  width: 20px;
  height: 20px;
  border: none;
  font-size: 18px;
  cursor: pointer;
  margin-left: 6px;
  transition: opacity 0.2s;
}

.search-btn:hover {
  opacity: 0.5;
}

/* === Бургер-кнопка === */
.burger-menu {
  display: none; /* скрыта на десктопе */
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 200;
}

.burger-line {
  width: 100%;
  height: 2px;
  background-color: #000;
  transition: 0.3s;
}

.burger-menu.active .burger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.burger-menu.active .burger-line:nth-child(2) {
  opacity: 0;
}
.burger-menu.active .burger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Main Container */
.main-container {
  flex: 1 0 auto;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 0;
}

/* Featured Section */
.featured-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}

.featured-article {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.featured-image {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}

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

.featured-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.featured-content a {
  text-decoration: none;
}

.featured-content h2 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: #000000;
}

.featured-content h2:hover {
  opacity: 0.7;
}

.featured-content p {
  font-size: 16px;
  color: #666666;
  line-height: 1.5;
  margin: 0;
}

.article-meta {
  font-size: 13px;
  color: #666666;
}

.article-category {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #b64d28;
  display: inline-block;
  padding: 2px 0;
  border-bottom: 1px solid #000000;
  transition: opacity 0.2s;
}

.article-category:hover {
  opacity: 0.6;
}

/* Recent Articles Aside */
.recent-articles {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.recent-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  cursor: pointer;
}

.recent-image {
  width: 120px;
  height: 80px;
  overflow: hidden;
}

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

.recent-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.recent-info h3 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  color: #000000;
}

/* Articles Grid Section */
.articles-grid-section {
  padding: 0;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 40px;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
}

.article-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
}

.card-image {
  width: 100%;
  aspect-ratio: 3/2;
  overflow: hidden;
}

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

.card-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-content h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  color: #000000;
}

.card-content p {
  font-size: 14px;
  color: #666666;
  line-height: 1.5;
  margin: 0;
}

/* Footer */
.footer {
  flex-shrink: 0;
  width: 100%;
  border-top: 1px solid #000000;
  background-color: #ffffff;
  margin-top: 60px;
}

.footer-content {
  max-width: 100%;
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  cursor: default;
  user-select: none;
  display: flex;
  align-items: center;
  font-size: 20px;
}

.footer-logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -1px;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-nav li {
  list-style: none;
}

.footer-nav li:not(:first-child) {
  margin-left: 8px;
}

.footer-nav li:not(:first-child)::before {
  content: "";
  display: inline-block;
  position: relative;
  left: 0;
  top: -3px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background-color: #6a6a6a;
  margin-right: 8px;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  text-decoration: none;
  color: #666666;
  font-size: 12px;
  transition: opacity 0.2s;
}

.footer-nav a:hover {
  opacity: 0.5;
}

/* Footer Language */
.footer-nav-lang ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}

.footer-nav-lang li {
  list-style: none;
  align-items: center;
  display: flex;
  justify-content: center;
}

.footer-nav-lang li:not(:first-child) {
  margin-left: 8px;
}

.footer-nav-lang li:not(:first-child)::before {
  content: "";
  display: inline-block;
  position: relative;
  left: 0;
  top: 0;
  width: 4px;
  height: 1px;
  border-radius: 50%;
  background-color: #6a6a6a;
  margin-right: 8px;
}

.footer-nav-lang {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav-lang a {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  text-decoration: none;
  color: #666666;
  font-size: 12px;
  transition: opacity 0.2s;
}

.footer-nav-lang a:hover {
  opacity: 0.5;
}

/* Footer Copyright */
.footer-copyright {
  font-size: 11px;
  color: #666666;
}

/* Article Page */
.article-main {
  flex: 1 0 auto;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.article-layout {
  display: grid;
  grid-template-columns: 800px 300px;
  gap: 60px;
  align-items: start;
}

.article-header {
  margin-bottom: 32px;
}

.article-header h1 {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
  margin: 12px 0 16px;
}

.article-lead {
  font-size: 18px;
  color: #333333;
  line-height: 1.5;
  margin-bottom: 20px;
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #666666;
  padding-bottom: 24px;
  border-bottom: 1px solid #000000;
}

.article-hero {
  width: 100%;
  margin-bottom: 36px;
}

.article-hero img {
  width: 100%;
  height: auto;
  display: block;
}

.article-body {
  width: 100%;
}

.article-content {
  line-height: 1.8;
}

.article-content p {
  font-size: 16px;
  line-height: 1.75;
  color: #1a1a1a;
  margin-bottom: 24px;
	margin-top: 12px;
}

.article-content h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 40px 0 16px;
  padding-top: 8px;
  border-top: 1px solid #000000;
}

.article-content h4 {
	margin-top: 12px;
}

.article-content blockquote {
  border-left: 3px solid #000000;
  margin: 36px 0;
  padding: 16px 24px;
  background: #f9f9f9;
}

.article-content blockquote p {
  font-size: 18px;
  font-style: italic;
  color: #222222;
  margin-bottom: 8px;
}

.article-content blockquote cite {
  font-size: 13px;
  color: #666666;
  font-style: normal;
}

.article-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.sidebar-section {
  border-top: 1px solid #000000;
  padding-top: 24px;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
}

.sidebar-articles {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  cursor: pointer;
}

.sidebar-card img {
  width: 80px;
  height: 60px;
  object-fit: cover;
}

.sidebar-card h4 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 4px 0;
}

.trending-list {
  list-style: decimal;
  padding-left: 20px;
}

.trending-list li {
  margin-bottom: 12px;
  font-size: 14px;
}

.trending-list a {
  color: #000000;
  transition: opacity 0.2s;
}

.trending-list a:hover {
  opacity: 0.6;
}

/* Page Content */
.page-main {
  flex: 1 0 auto;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
  margin: 12px 0 16px;
}

.page-lead {
  font-size: 18px;
  color: #333333;
  line-height: 1.5;
  margin-bottom: 20px;
}

.page-byline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #666666;
  padding-bottom: 24px;
  border-bottom: 1px solid #000000;
}

.page-hero {
  width: 100%;
  margin-bottom: 36px;
}

.page-hero img {
  width: 100%;
  height: auto;
  display: block;
}

.page-body {
  width: 100%;
}

.page-content {
  line-height: 1.8;
}

.page-content a {
  color: #b64d28;
}

.page-content p {
  font-size: 16px;
  line-height: 1.75;
  color: #1a1a1a;
}

.page-content h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 40px 0 16px;
  padding-top: 8px;
  border-top: 1px solid #000000;
}

.page-content h3 {
  margin: 12px 0;
}

.page-content h4 {
  margin: 12px 0;
}

.page-content blockquote {
  border-left: 3px solid #000000;
  margin: 36px 0;
  padding: 16px 24px;
  background: #f9f9f9;
}

.page-content blockquote p {
  font-size: 18px;
  font-style: italic;
  color: #222222;
  margin-bottom: 8px;
}

.page-content blockquote cite {
  font-size: 13px;
  color: #666666;
  font-style: normal;
}

.page-content ol, ul {
	padding-left: 20px;
	margin: 12px;
}

/* Responsive */
@media (max-width: 1200px) {
  .featured-section {
    grid-template-columns: 1fr;
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: relative;
    top: 0;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .page-layout {
    grid-template-columns: 1fr;
  }

  .page-sidebar {
    position: relative;
    top: 0;
  }

  .pages-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .burger-menu {
    display: flex;
    margin-left: auto;
  }

  .nav-sections {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background-color: #fff;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 16px;
    padding: 80px 24px 24px;
    margin-left: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    z-index: 150;
  }

  .nav-sections.active {
    left: 0;
  }

  .nav-sections a {
    font-size: 16px;
    width: 100%;
    border-bottom: 1px solid #eee;
  }

  .separator {
    display: none;
  }

  .search-form {
    width: 100%;
    margin-left: 0;
    margin-top: 16px;
  }
  .search-form input[type="text"] {
    width: calc(100% - 32px);
  }

  .featured-section {
    grid-template-columns: 1fr;
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: relative;
    top: 0;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .page-layout {
    grid-template-columns: 1fr;
  }

  .page-sidebar {
    position: relative;
    top: 0;
  }

  .pages-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}
