/* Базовые настройки */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { max-width: 100vw; overflow-x: hidden; }
body { background-color: #f7f7f5; color: #121212; font-family: 'Lora', serif; line-height: 1.6; }
.newspaper-container { width: 100%; max-width: 1600px; margin: 0 auto; padding: 2rem 4%; }
img { max-width: 100%; height: auto; }

/* Газетная шапка */
.masthead { text-align: center; border-bottom: 4px double #121212; padding-bottom: 15px; margin-bottom: 0; }
.masthead-top { display: flex; justify-content: space-between; font-family: "Arial", sans-serif; font-size: 13px; text-transform: uppercase; border-bottom: 1px solid #121212; padding-bottom: 5px; margin-bottom: 20px; }
.masthead-weather { font-family: "Arial", sans-serif; font-size: 13px; text-transform: uppercase; color: #333; letter-spacing: 0.5px; }
.site-title { font-family: 'Playfair Display', serif; font-size: 85px; font-weight: 900; font-style: italic; letter-spacing: -1px; margin-bottom: 20px; color: #121212; }

/* Навигация */
.top-nav { display: flex; justify-content: center; align-items: center; gap: 50px; border-top: 1px solid #121212; padding: 12px 0; flex-wrap: wrap; }
.nav-link { color: #121212; text-decoration: none; font-family: "Arial", sans-serif; font-size: 16px; text-transform: uppercase; letter-spacing: 1px; padding: 6px 15px; border: 1px solid transparent; transition: all 0.2s ease-in-out; cursor: pointer; }
.nav-link:hover { border: 1px solid #121212; background-color: rgba(0, 0, 0, 0.04); }
.nav-link.active { font-weight: bold; border: 1px solid #121212; }

/* Бегущая строка */
.news-ticker { width: 100%; background-color: #121212; color: #f7f7f5; padding: 10px 0; overflow: hidden; white-space: nowrap; margin-bottom: 30px; }
.ticker-content { display: inline-block; padding-left: 100%; animation: ticker 30s linear infinite; font-family: "Arial", sans-serif; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }
.ticker-content strong { color: #c0392b; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* Сетка для ПК */
.newspaper-grid { display: grid; grid-template-columns: 25% 71%; gap: 4%; align-items: start; position: relative; }

/* Левая колонка (Сайдбар) */
.sidebar-left { min-width: 0; position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; padding-right: 15px; }
.sidebar-left::-webkit-scrollbar { width: 4px; }
.sidebar-left::-webkit-scrollbar-track { background: transparent; }
.sidebar-left::-webkit-scrollbar-thumb { background-color: #121212; }

.news-brief { margin-bottom: 30px; border-bottom: 1px solid #e0e0e0; padding-bottom: 20px; }
.news-brief img { width: 100%; height: auto; margin-bottom: 10px; border: 1px solid #121212; filter: grayscale(100%) contrast(110%) sepia(15%); transition: filter 0.5s ease-in-out; }
.news-brief img:hover { filter: grayscale(0%) contrast(100%) sepia(0%); }
.news-brief h3 { font-family: 'Playfair Display', serif; font-size: 22px; margin-bottom: 12px; font-style: italic; }
.news-brief p { font-size: 16px; text-align: justify; }

/* Центральная колонка */
.main-story { min-width: 0; border-left: 1px solid #ccc; padding-left: 4%; padding-bottom: 20px; }
.main-story.full-width { grid-column: 1 / -1; max-width: 1100px; margin: 0 auto; border-left: none; padding-left: 0; }
.main-story.full-width .headline { text-align: center; }
.main-story.full-width .author-line { justify-content: center; }

.headline { font-family: 'Playfair Display', serif; font-size: 56px; font-weight: 700; line-height: 1.1; margin-bottom: 20px; word-wrap: break-word; }
.hanko { display: inline-block; color: #c0392b; border: 2px solid #c0392b; border-radius: 4px; padding: 1px 4px; font-family: "MS Mincho", "Yu Mincho", serif; font-size: 14px; font-weight: bold; margin-left: 6px; vertical-align: middle; }
.author-line { font-family: "Arial", sans-serif; font-size: 13px; color: #555; margin-bottom: 25px; display: flex; align-items: center; }

/* Изображения */
.main-image-container { width: 100%; margin-bottom: 25px; text-align: center; }
.main-image-container img { max-width: 100%; max-height: 65vh; width: auto; height: auto; border: 1px solid #121212; filter: grayscale(100%) contrast(110%) sepia(15%); transition: filter 0.5s ease-in-out; }
.main-image-container img:hover { filter: grayscale(0%) contrast(100%) sepia(0%); }
figcaption { font-family: "Arial", sans-serif; font-size: 13px; color: #666; text-align: center; margin-top: 8px; max-width: 45em; margin-left: auto; margin-right: auto; }

.article-text { font-size: 20px; text-align: justify; text-justify: inter-word; hyphens: auto; columns: 2; column-gap: 50px; }
.article-text::first-letter { font-family: 'Playfair Display', serif; font-size: 75px; float: left; line-height: 0.85; padding-right: 10px; padding-top: 5px; font-weight: bold; }
.mobile-menu-btn { display: none; }

/* КАРТОЧКИ ДЛЯ "НОВОСТЕЙ" */
.cards-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; margin-top: 40px; }
.news-card { border: 2px solid #121212; padding: 25px; background-color: #f7f7f5; cursor: pointer; transition: all 0.3s ease; display: flex; flex-direction: column; justify-content: space-between; min-height: 220px; position: relative; overflow: hidden; }
.news-card:hover { background-color: #121212; color: #f7f7f5; transform: translateY(-5px); box-shadow: 8px 8px 0px rgba(0,0,0,0.1); }
.news-card h3 { font-family: 'Playfair Display', serif; font-size: 24px; margin-bottom: 15px; line-height: 1.2; }
.news-card .card-meta { font-family: "Arial", sans-serif; font-size: 12px; text-transform: uppercase; color: inherit; opacity: 0.7; margin-top: auto; }
.news-card img.card-thumb { width: 100%; height: 200px; object-fit: cover; object-position: center; margin: 10px 0; border: 1px solid #121212; filter: grayscale(100%) contrast(110%) sepia(15%); transition: filter 0.5s ease-in-out; }
.news-card img.card-thumb:hover { filter: grayscale(0%) contrast(100%) sepia(0%); }
.hidden-article-content { display: none; }

/* Модалки, авторизация, твиттер и футер */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.85); display: flex; align-items: center; justify-content: center; z-index: 100000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content-box { background-color: #f7f7f5; color: #121212; width: 65%; max-width: 1000px; max-height: 85vh; overflow-y: auto; padding: 50px; border: 6px double #121212; position: relative; transform: scale(0.9) translateY(30px); transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); }
.modal-overlay.active .modal-content-box { transform: scale(1) translateY(0); }
.close-modal-btn { position: absolute; top: 20px; right: 25px; font-size: 40px; font-family: "Arial", sans-serif; cursor: pointer; line-height: 1; color: #121212; transition: color 0.2s; z-index: 10; }
.close-modal-btn:hover { color: #c0392b; }
#modal-title { font-family: 'Playfair Display', serif; font-size: 46px; font-weight: 700; line-height: 1.1; margin-bottom: 20px; padding-right: 40px; }
#modal-meta { font-family: "Arial", sans-serif; font-size: 13px; color: #555; margin-bottom: 30px; border-bottom: 1px solid #ccc; padding-bottom: 15px; }
#modal-text { font-size: 18px; text-align: justify; line-height: 1.8; }

.auth-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(10, 10, 10, 0.95); display: flex; align-items: center; justify-content: center; z-index: 100001; opacity: 0; visibility: hidden; transition: opacity 0.3s ease; }
.auth-modal.active { opacity: 1; visibility: visible; }
.auth-box { background-color: #0a0a0a; border: 1px solid #c0392b; padding: 40px; width: 100%; max-width: 400px; text-align: center; font-family: 'Courier New', Courier, monospace; position: relative; }
.auth-box h3 { color: #c0392b; margin-bottom: 30px; font-size: 22px; letter-spacing: 2px; text-transform: uppercase; }
.auth-input-group { margin-bottom: 20px; text-align: left; }
.auth-input-group label { display: block; color: #666; font-size: 12px; margin-bottom: 5px; text-transform: uppercase; }
.auth-input { width: 100%; background: transparent; border: 1px solid #333; color: #fff; padding: 12px; font-family: inherit; font-size: 16px; outline: none; }
.auth-input:focus { border-color: #c0392b; }
.auth-input:disabled { color: #fff; border-color: #c0392b; }
.auth-btn { background-color: #c0392b; color: #fff; border: none; padding: 15px; width: 100%; cursor: pointer; font-family: inherit; font-size: 16px; font-weight: bold; text-transform: uppercase; margin-top: 10px; }
.close-auth-btn { position: absolute; top: 10px; right: 15px; color: #555; font-size: 24px; cursor: pointer; }

.twitter-box { background-color: #000; border: 1px solid #333; width: 100%; max-width: 550px; height: 80vh; border-radius: 15px; display: flex; flex-direction: column; color: #e7e9ea; font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif; }
.twitter-header { padding: 15px 20px; border-bottom: 1px solid #2f3336; display: flex; justify-content: space-between; align-items: center; }
.twitter-logo { font-size: 28px; color: #fff; line-height: 1; }
.twitter-feed { flex: 1; overflow-y: auto; }
.tweet { padding: 15px 20px; border-bottom: 1px solid #2f3336; display: flex; gap: 15px; text-align: left; }
.tweet-avatar { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background-color: #222; }
.tweet-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tweet-content { flex: 1; word-wrap: break-word; }
.tweet-author { font-size: 15px; margin-bottom: 5px; }
.tweet-author strong { color: #fff; }
.tweet-handle { color: #71767b; font-weight: normal; }
.tweet-text { font-size: 15px; line-height: 1.5; color: #e7e9ea; }
.main-post { background-color: rgba(192, 57, 43, 0.08); border-bottom: 2px solid #2f3336 !important; }
.main-post-image { margin-top: 10px; border-radius: 12px; overflow: hidden; border: 1px solid #333; max-height: 250px; cursor: pointer; }
.main-post-image img { width: 100%; height: auto; display: block; object-fit: cover; }
.comments-divider { background-color: #16181c; color: #71767b; font-size: 12px; font-weight: bold; padding: 10px 20px; letter-spacing: 1px; text-transform: uppercase; border-bottom: 1px solid #2f3336; }
.tweet-composer { padding: 12px 20px; border-bottom: 2px solid #2f3336; display: flex; gap: 15px; background-color: #000; }
.composer-box { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.composer-nick-input { width: 100%; max-width: 150px; background: transparent; border: none; border-bottom: 1px solid #333; color: #1d9bf0; font-family: inherit; font-size: 13px; outline: none; padding-bottom: 2px; }
.composer-row { display: flex; align-items: center; gap: 10px; }
.composer-input { flex: 1; background: transparent; border: none; color: #e7e9ea; font-family: inherit; font-size: 15px; outline: none; min-width: 0; }
.composer-btn { background-color: #eff3f4; color: #0f1419; border: none; padding: 8px 18px; border-radius: 20px; font-weight: bold; cursor: pointer; font-size: 14px; flex-shrink: 0; }
.user-comment { background-color: rgba(29, 155, 240, 0.03); }

.widget-wrapper { position: fixed; right: 0; top: 60%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 20px; z-index: 9999; }
.floating-widget { position: relative; right: -240px; width: 240px; background-color: #121212; color: #f7f7f5; border: 1px solid #444; border-right: none; text-decoration: none; transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); display: block; box-shadow: -5px 5px 15px rgba(0,0,0,0.4); }
.floating-widget:hover { right: 0; }
.widget-tab { position: absolute; left: -40px; top: -1px; bottom: -1px; width: 40px; background-color: #121212; border: 1px solid #444; border-right: none; display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; text-orientation: upright; font-family: "Arial", sans-serif; font-size: 13px; font-weight: bold; letter-spacing: 2px; color: #f7f7f5; padding: 10px 0; z-index: 10; }
.widget-content { padding: 20px; min-height: 120px; display: flex; flex-direction: column; justify-content: center; background-color: #121212; }
.widget-info .sub-text { font-family: "Arial", sans-serif; font-size: 11px; color: #ddd; text-transform: uppercase; display: block; margin-bottom: 5px; letter-spacing: 1px; }
.widget-info .main-text { font-family: 'Playfair Display', serif; font-size: 32px; font-weight: 700; display: block; margin-bottom: 5px; }
.widget-info .jp-text { font-family: "Arial", sans-serif; font-weight: bold; font-size: 16px; color: #ff6b6b; }
.site-footer { margin-top: 60px; padding: 30px 0; border-top: 4px double #121212; text-align: center; font-family: "Arial", sans-serif; }

.twitter-lightbox { display: none; position: fixed; z-index: 200000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.95); flex-direction: row; }
.lb-left-pane { flex: 1; height: 100%; display: flex; justify-content: center; align-items: center; padding: 30px; position: relative; overflow: auto; }
.lb-image { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.lb-right-pane { width: 420px; height: 100%; background-color: #000; border-left: 1px solid #2f3336; display: flex; flex-direction: column; overflow-y: auto; }
.lb-post-header { padding: 20px; display: flex; gap: 12px; align-items: center; border-bottom: 1px solid #2f3336; font-size: 15px; }
.lb-post-text { padding: 15px 20px; font-size: 15px; line-height: 1.5; border-bottom: 1px solid #2f3336; color: #e7e9ea; }
.lb-comments-list { flex: 1; }
.lightbox-close { position: absolute; top: 15px; left: 20px; background: rgba(0, 0, 0, 0.6); color: #fff; border: none; font-size: 30px; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; z-index: 200001; display: flex; align-items: center; justify-content: center; }

/* СТЕНА РЕДАКЦИИ (Доска с полароидами) */
.ed-modal-content { text-align: center; padding-top: 40px; background-color: #eae7db; background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' fill='%23eae7db'/%3E%3Crect width='100' height='100' filter='url(%23n)' opacity='0.25'/%3E%3C/svg%3E"); border: 10px solid #2c3e50; }
.ed-photo-wrapper { position: relative; display: inline-block; }
.marker-drawn { position: absolute; pointer-events: none; z-index: 5; filter: drop-shadow(1px 2px 1px rgba(0,0,0,0.3)); }

.ed-chief { position: relative; display: inline-block; margin-bottom: 50px; }
.ed-chief .ed-photo-wrapper { background: #fff; padding: 15px 15px 35px 15px; box-shadow: 2px 4px 15px rgba(0,0,0,0.2); transform: rotate(-1deg); display: inline-block; }
.ed-chief img { width: 240px; height: 240px; object-fit: cover; border: 1px solid #ddd; }
.ed-chief-name { font-family: 'Playfair Display', serif; font-size: 32px; font-weight: 900; margin-top: 15px; color: #121212; }
.ed-role { font-family: 'Arial', sans-serif; font-size: 14px; color: #c0392b; text-transform: uppercase; letter-spacing: 1px; font-weight: bold; }

.ed-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; border-top: 2px dashed #999; padding-top: 50px; }
.ed-member { transition: transform 0.2s; position: relative; }
.ed-member .ed-photo-wrapper { background: #fff; padding: 12px 12px 30px 12px; box-shadow: 2px 4px 10px rgba(0,0,0,0.15); display: inline-block; transform: rotate(-3deg); transition: all 0.3s; }
.ed-member:nth-child(even) .ed-photo-wrapper { transform: rotate(3deg); }
.ed-member:nth-child(3n) .ed-photo-wrapper { transform: rotate(-1deg); }
.ed-member:hover .ed-photo-wrapper { transform: scale(1.05) rotate(0deg); z-index: 10; box-shadow: 4px 8px 20px rgba(0,0,0,0.3); }
.ed-member img { width: 160px; height: 160px; object-fit: cover; border: 1px solid #eee; display: block; margin: 0 auto; }
.ed-name { font-family: 'Playfair Display', serif; font-weight: bold; font-size: 19px; margin-top: 15px; margin-bottom: 2px; color: #121212; }

/* МОБИЛЬНАЯ ВЕРСИЯ */
@media (max-width: 900px) {
    .newspaper-container { padding: 15px; }
    .masthead-weather { display: none; }
    .masthead-top { flex-direction: column; gap: 5px; align-items: center; }
    .newspaper-grid { display: block; }
    .main-story { width: 100%; border-left: none; padding-left: 0; padding-bottom: 0; }
    .article-text { columns: 1; }
    .mobile-menu-btn { display: block !important; background: #121212; color: #f7f7f5; border: none; padding: 12px; font-family: "Arial", sans-serif; font-size: 15px; text-transform: uppercase; font-weight: bold; cursor: pointer; margin-bottom: 20px; width: 100%; text-align: center; }
    .sidebar-left { position: fixed !important; top: 0; left: -280px; width: 280px !important; height: 100vh; background-color: #f7f7f5; z-index: 99999; box-shadow: 5px 0 15px rgba(0,0,0,0.3); padding: 20px; transition: left 0.3s ease-in-out; overflow-y: auto; margin-top: 0 !important; max-height: none !important; }
    .sidebar-left.sidebar-open { left: 0; }
    .sidebar-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); z-index: 99998; }
    .sidebar-overlay.active { display: block; }
    .twitter-lightbox { flex-direction: column; overflow-y: auto; }
    .lb-left-pane { width: 100%; height: 100vh; min-height: 100vh; flex: none; padding: 0; background-color: #000; }
    .lb-image { width: 100%; height: 100%; object-fit: contain; }
    .lb-right-pane { width: 100%; height: auto; flex: none; border-left: none; border-top: 1px solid #2f3336; }
    .lightbox-close { top: 15px; left: 15px; background: rgba(0, 0, 0, 0.6); }
    .cards-grid { grid-template-columns: 1fr; }
    
    /* Сетка редакции на мобилках теперь двухколоночная с наклонами, как на ПК */
    .ed-grid { grid-template-columns: repeat(2, 1fr); gap: 25px; }
    .ed-chief img { width: 180px; height: 180px; }
    .ed-member img { width: 120px; height: 120px; }
}
@media (max-width: 600px) {
    .site-title { font-size: 42px; margin-bottom: 10px; line-height: 1; }
    .headline { font-size: 32px; word-wrap: break-word; }
    .article-text::first-letter { font-size: 50px; }
    .article-text { font-size: 18px; }
    .top-nav { gap: 10px; padding: 10px 0; }
    .nav-link { font-size: 14px; padding: 5px 10px; }
    .news-card { padding: 15px; min-height: auto; }
    .modal-content-box { width: 95%; padding: 25px 15px 15px 15px; }
    #modal-title { font-size: 26px; padding-right: 30px; }
    .widget-wrapper { transform: translateY(-50%) scale(0.65); transform-origin: right center; }
    
    .ed-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .ed-chief img { width: 150px; height: 150px; }
    .ed-member img { width: 100px; height: 100px; }
    .ed-member .ed-photo-wrapper { padding: 8px 8px 22px 8px; }
    .ed-name { font-size: 15px; }
    .ed-role { font-size: 11px; }
}

/* =========================================================
   АТМОСФЕРНЫЙ СКРОЛЛБАР (ГАЗЕТНЫЙ СТИЛЬ)
   ========================================================= */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: #f7f7f5; border-left: 1px solid #ccc; }
::-webkit-scrollbar-thumb { background-color: #121212; border: 2px solid #f7f7f5; transition: background-color 0.3s; }
::-webkit-scrollbar-thumb:hover { background-color: #c0392b; }

.modal-content-box::-webkit-scrollbar { width: 14px; }
.modal-content-box::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.05); border-left: 2px dashed #121212; }
.modal-content-box::-webkit-scrollbar-thumb { background-color: #121212; border: none; border-left: 2px solid #121212; }
.modal-content-box::-webkit-scrollbar-thumb:hover { background-color: #c0392b; border-left: 2px solid #c0392b; }

.table-scroll::-webkit-scrollbar { height: 8px; display: block; }
.table-scroll::-webkit-scrollbar-track { background: #e9e9e7; }
.table-scroll::-webkit-scrollbar-thumb { background-color: #121212; }