/* --- 1. ЗМІННІ ТА ОСНОВНІ НАЛАШТУВАННЯ (СВІТЛА ТЕМА - ОСНОВНА) --- */

/* Зменшуємо загальний масштаб сайту на 10% для десктопів */
@media (min-width: 1025px) {
  html {
    font-size: 90%; /* Замість стандартних 100% (16px) стане ~14.4px */
  }
}

:root {
  --bg:          #fffff8;        
  --header-bg:   #fffff8;        
  --header-text: #111111;        
  --header-btn:  rgba(0, 0, 0, 0.05);
  --surface:     #ffffff; 
  --text:        #111111;
  --text-2:      #444444;
  --text-3:      #777777;
  
  --accent:      #043c53; 
  --accent-hover:#032a3a;
  --cursor:      #043c53;
  
  --border:      rgba(0, 0, 0, 0.08);
  --meta:        #666666;
  
  --mega-bg:     rgba(255, 255, 248, 0.96); 
  --mega-sidebar-bg: rgba(0, 0, 0, 0.03);
  --mega-tab-active-bg: #ffffff;
  --mega-text:   #111111;
  --mega-text-2: #444444;
  --mega-text-3: #777777;
  --mega-border: rgba(0, 0, 0, 0.08);
}

.dark-mode {
  --bg:          #303034;        
  --header-bg:   #303034; 
  --header-text: #fffff8;        
  --header-btn:  rgba(255, 255, 255, 0.05); 
  --surface:     #3e3e42; 
  --text:        #fffff8;      
  --text-2:      #b9bbbe;
  --text-3:      #72767d;
  
  --accent:      #54869c; 
  --accent-hover:#80b9d1;
  --cursor:      #54869c;
  
  --border:      rgba(255, 255, 255, 0.08);
  --meta:        #b9bbbe;
  
  --mega-bg:     rgba(48, 48, 52, 0.96); 
  --mega-sidebar-bg: rgba(0, 0, 0, 0.15);
  --mega-tab-active-bg: #3e3e42; 
  --mega-text:   #fffff8;
  --mega-text-2: #b9bbbe;
  --mega-text-3: #72767d;
  --mega-border: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-width: auto;
  scrollbar-color: var(--text-3) var(--bg);
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

body.theme-transition {
  transition: background 0.4s ease, color 0.4s ease;
}

/* --- 2. ШАПКА (HEADER) --- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 70px;
  padding: 0 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.4s ease;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 0 1 auto;
}

/* --- СТИЛІ ДЛЯ ЛОГОТИПУ LINES --- */
.lines-logo-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text); /* Автоматична адаптація до темної/світлої теми */
  padding: 5px;
  cursor: pointer;
}

.lines-logo {
  height: 48px; /* Оптимальний розмір для шапки */
  width: auto;
  overflow: visible;
  transition: all 0.3s ease;
}

/* Анімація при наведенні (Hover Effects) */

/* 1. Пунктирна діагональ у літері N починає "бігти" */
.lines-n-diag {
  transition: stroke 0.3s ease;
}
.lines-logo-link:hover .lines-n-diag {
  animation: dash-march 1s linear infinite;
  stroke: var(--accent); /* Стає фірмовим синім */
}

@keyframes dash-march {
  to { stroke-dashoffset: -20; }
}

/* 2. Каліграфічні літери E та S підсвічуються */
.lines-e, .lines-s {
  transition: stroke 0.4s ease;
}
.lines-logo-link:hover .lines-e, 
.lines-logo-link:hover .lines-s {
  stroke: var(--accent);
}

/* 3. Нижня лінія підкреслення розширюється і змінює колір */
.lines-underline {
  transition: all 0.3s ease;
  transform-origin: center;
}
.lines-logo-link:hover .lines-underline {
  stroke: var(--accent);
  transform: scaleX(1.05);
}

/* Підпис знизу */
.prosto-subtitle {
  display: flex;
  align-items: center;
  width: 100%;
}
.prosto-subtitle-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  padding: 0 6px;
  color: var(--text-2);
}
.prosto-line {
  flex-grow: 1;
  height: 1px;
  background-color: var(--accent);
}

/* --- 2.1 НАВІГАЦІЯ В ШАПЦІ (МЕНЮ З КОЛОНКАМИ) --- */
.header-center {
  flex: 2;
  display: flex;
  justify-content: flex-start;
  padding-left: 2rem;
}

.top-cat-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 1.5rem;
}

.top-cat-item {
  position: relative;
  display: flex;
  align-items: center;
}

.top-cat-link {
  display: flex;
  align-items: center;
  height: 70px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.top-cat-item:hover .top-cat-link {
  border-bottom: 3px solid var(--text);
}

.top-dropdown {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  padding: 1.5rem 2rem;
  display: flex;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 1000;
  min-width: max-content;
}

.dark-mode .top-dropdown { box-shadow: 0 20px 40px rgba(0,0,0,0.4); }

.top-cat-item:hover .top-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-column {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.dropdown-divider {
  width: 1px;
  background: var(--border);
}

.dropdown-column a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.dropdown-column a svg {
  color: var(--text-3);
  transition: color 0.2s ease;
}

.dropdown-column a:hover {
  color: var(--text);
  transform: translateX(4px);
}

.dropdown-column a:hover svg {
  color: var(--accent);
}

/* --- 2.2 ВИПАДНЕ МЕГА-МЕНЮ (AWWWARDS STYLE) --- */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  background: none;
  border: none;
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0;
  transition: color 0.2s ease;
  position: relative;
  z-index: 105;
}

.dropdown-toggle:hover, .dropdown.open .dropdown-toggle {
  color: var(--text);
}

.chevron {
  transition: transform 0.3s ease;
  margin-top: 2px;
}

.dropdown.open .chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.dropdown-menu.awwwards-mega {
  position: absolute;
  top: calc(100% + 10px); 
  left: -20px; 
  transform: translateY(15px); 
  width: 1150px; 
  max-width: calc(100vw - 6rem); 
  min-height: 420px; 
  max-height: 75vh;
  background: var(--mega-bg);
  backdrop-filter: blur(32px); 
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--mega-border); 
  display: flex; 
  overflow: hidden; 
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.08); 
  opacity: 0; 
  visibility: hidden; 
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 1000;
}

.dark-mode .dropdown-menu.awwwards-mega {
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6); 
}

.dropdown.open .dropdown-menu.awwwards-mega {
  opacity: 1; 
  visibility: visible; 
  transform: translateY(0); 
}

.mega-sidebar {
  width: 320px;
  background: var(--mega-sidebar-bg);
  padding: 2.5rem 2rem;
  display: flex; 
  flex-direction: column; 
  gap: 0.6rem;
  border-right: 1px solid var(--mega-border);
  overflow-y: auto;
}

.mega-tab {
  text-align: left; 
  background: transparent; 
  border: none; 
  color: var(--mega-text-2); 
  padding: 14px 18px; 
  border-radius: 12px; 
  cursor: pointer;
  font-size: 1rem; 
  font-weight: 500; 
  display: flex;
  align-items: center;
  gap: 14px; 
  transition: all 0.2s ease;
}

.mega-tab:hover { 
  color: var(--mega-text); 
  background: rgba(128, 128, 128, 0.08); 
}

.mega-tab.active {
  background: var(--mega-tab-active-bg);
  color: var(--mega-text);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.dark-mode .mega-tab.active {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tab-icon {
  flex-shrink: 0;
  background: var(--accent);
  color: #ffffff;
  width: 32px; 
  height: 32px;
  padding: 6px; 
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.dark-mode .tab-icon {
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.mega-content {
  flex: 1; 
  padding: 2.5rem 4rem; 
  position: relative;
  background: var(--mega-tab-active-bg); 
  overflow-y: auto;
}

.mega-panel { display: none; animation: fadeIn 0.4s ease; }
.mega-panel.active { display: block; }

@keyframes fadeIn { 
  from { opacity: 0; transform: translateY(10px); } 
  to { opacity: 1; transform: translateY(0); } 
}

.subcat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding: 1rem;
}

.subcat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem;
  border-radius: 12px;
  text-decoration: none;
  background: transparent;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.subcat-item:hover {
  background: rgba(128, 128, 128, 0.05);
  border-color: rgba(128, 128, 128, 0.1);
  transform: translateY(-3px);
}

.subcat-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.subcat-name { font-weight: 600; font-size: 1.1rem; color: var(--text); }
.subcat-desc { font-size: 0.85rem; color: var(--text-3); line-height: 1.4; }

.subcat-arrow {
  color: var(--accent);
  opacity: 0;
  transform: translateX(-15px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.subcat-item:hover .subcat-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* --- 2.3 ПОШУК І КНОПКИ --- */
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 0 1 auto;
  justify-content: flex-end;
}

.search-container {
  position: relative;
  width: 100%;
  max-width: 450px;
}

.search-input {
  width: 100%;
  background: rgba(128, 128, 128, 0.08);
  border: 1px solid var(--border);
  padding: 10px 16px 10px 42px;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
}

.search-input:focus {
  background: rgba(128, 128, 128, 0.12);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(4, 60, 83, 0.2); 
}

.dark-mode .search-input:focus {
  box-shadow: 0 0 0 3px rgba(75, 156, 191, 0.2);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-3);
  pointer-events: none;
}

/* --- 2.4 РЕЗУЛЬТАТИ ПОШУКУ --- */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 8px); /* Розташування під інпутом */
  left: 0;
  right: 0;
  background: var(--bg); /* Використовує ваш колір фону сайту */
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  z-index: 1000;
  max-height: 350px;
  overflow-y: auto;
  display: none; /* Ховаємо, поки порожньо */
}

/* Показуємо блок, лише коли в ньому є посилання */
.search-results-dropdown:not(:empty) {
  display: block;
}

.search-results-dropdown a {
  display: block;
  padding: 12px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.search-results-dropdown a:last-child {
  border-bottom: none;
}

.search-results-dropdown a:hover {
  background: rgba(128, 128, 128, 0.08);
  color: var(--accent);
}

/* Налаштування для темної теми (якщо змінні не міняються автоматично) */
.dark-mode .search-results-dropdown {
  background: #1e1e1e; /* Або ваш колір для dark-mode */
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.controls { display: flex; gap: 0.6rem; }

.controls button {
  height: 36px;
  padding: 0 14px;
  background: var(--header-btn);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.controls button:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* --- 3. HERO SECTION (БАНЕР ГОЛОВНОЇ) --- */
.hero { 
  padding: 0; 
  position: relative; 
  z-index: 5; 
  display: block;
}

.hero-content {
  background: rgba(128, 128, 128, 0.03);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-left: none;
  border-right: none;
  padding: 0 0 0 4rem;
  width: 100%; 
  max-width: none;
  margin: 0; 
  backdrop-filter: blur(12px);
  position: relative; 
  overflow: hidden; 
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 350px; 
}

.hero-text {
  flex: 1;
  padding: 1rem 0;
  max-width: 600px;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 3.5vw, 3.2rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  margin: 0 0 1rem 0;
  letter-spacing: -0.02em;
}

.hero-text p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0 0 1.5rem 0;
  max-width: 90%;
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-buttons .dropdown { position: static; }

.btn-primary {
  background: var(--text);
  color: var(--bg) !important;
  padding: 0.9rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--accent);
  color: #fff !important;
  transform: translateY(-2px);
}

/* Колаж Hero */
.hero-visual {
  flex: 1.2;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 350px; 
  overflow: visible; 
  margin-right: 0;
}

.hero-collage {
  display: grid;
  grid-template-columns: repeat(7, 120px); 
  gap: 0.5rem; 
  width: max-content; 
  margin-right: -2rem; 
  position: relative;
  align-items: center; 
}

.pill-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; 
  align-items: center;
  justify-content: center; 
}

.col-shift-1 { transform: translateY(20px); } 
.col-shift-2 { transform: translateY(15px); }  
.col-shift-3 { transform: translateY(-30px); } 
.col-shift-4 { transform: translateY(-40px); } 
.col-shift-5 { transform: translateY(-15px); } 
.col-shift-6 { transform: translateY(20px); }  
.col-shift-7 { transform: translateY(-35px); } 

.pill, .pill-solid {
  width: 120px;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  position: relative;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.pill:hover, .pill-solid:hover {
  transform: scale(1.04);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  z-index: 10;
}

.h-small  { height: 100px; }
.h-medium { height: 280px; }
.h-large  { height: 260px; }
.h-xlarge { height: 440px; }

.pill-solid { background: var(--accent); }

.pill img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: none;
  transition: transform 0.5s ease;
}

.pill:hover img { transform: scale(1.05); }

.dark-mode .pill, .dark-mode .pill-solid, .dark-mode .pill-dot {
  box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}

/* --- 4. ARTICLES SECTION (ЖУРНАЛЬНИЙ СТИЛЬ) --- */
.editorial-section { 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 4rem; 
}

.section-top-divider {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 4rem;
  color: var(--text-3);
  font-size: 1.1rem;
  font-style: italic;
}
.section-top-divider strong { color: var(--text); font-style: normal; }

.featured-article {
  display: flex;
  gap: 4rem;
  align-items: center;
  margin-bottom: 4rem;
}
.featured-content { flex: 1; }
.featured-image { flex: 1.2; }
.featured-image img, .featured-image svg {
  width: 100%;
  height: auto;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: rgba(128, 128, 128, 0.03);
  border: 1px solid rgba(128, 128, 128, 0.15);
}

.category-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.featured-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-family: 'Times New Roman', Times, serif;
  line-height: 1.1;
  margin: 0 0 1.5rem 0;
  color: var(--text);
  font-weight: 700;
}

.featured-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.featured-title a:hover { color: var(--accent); }
.dark-mode .featured-title a:hover { color: var(--accent-hover); }

.featured-excerpt {
  font-size: 1.1rem;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0 0 2.5rem 0;
}

.featured-meta {
  font-size: 0.85rem;
  color: var(--text-3);
  border-top: 1px solid var(--text-3);
  border-bottom: 1px solid var(--text-3);
  padding: 0.8rem 0;
  display: inline-block;
}
.featured-meta .divider { margin: 0 0.5rem; color: var(--border); }

/* Вкладки (Tabs) */
.article-tabs {
  display: flex;
  gap: 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.city-tab-content { display: none; }
.city-tab-content.active {
  display: block;
  animation: smoothFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes smoothFadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.tab-item {
  padding: 0 0 1rem 0;
  color: var(--text-3);
  font-size: 1.05rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: color 0.3s;
}
.tab-item:hover { color: var(--text-2); }
.tab-item.active { color: var(--text); }
.tab-item.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.line-title {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 4rem 0 3rem 0;
}
.line-title::before, .line-title::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.line-title::before { margin-right: 1.5rem; }
.line-title::after { margin-left: 1.5rem; }

.line-title a {
  color: var(--text);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.3s ease;
}
.line-title a:hover { color: var(--accent); }

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem; 
}

.section-divider {
  font-family: 'Times New Roman', Times, serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 4.5rem;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.editorial-section .section-divider:first-of-type { margin-top: 2rem; }

.clean-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  border: 1px solid rgba(128, 128, 128, 0.15);
  background: var(--bg);
  overflow: hidden;
}

.clean-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  border-color: rgba(128, 128, 128, 0.3);
}

.card-img-wrapper img, .card-img-wrapper svg {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: rgba(128, 128, 128, 0.03);
  margin-bottom: 1.5rem;
  display: block;
  border-bottom: 1px solid rgba(128, 128, 128, 0.1);
}

.clean-card .category-label { margin: 1.5rem 1.5rem 1rem 1.5rem; }
.clean-card h3 {
  font-size: 1.2rem !important;
  margin: 0 1.5rem 1rem 1.5rem;
  color: var(--text);
  line-height: 1.3;
  font-family: 'Times New Roman', Times, serif;
}
.clean-card h3 a {
  color: var(--text) !important;
  text-decoration: none !important;
  transition: color 0.3s ease;
}
.clean-card h3 a:hover { color: var(--accent) !important; }

.clean-card p {
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0 1.5rem 1.5rem 1.5rem;
}

.dark-mode .clean-card,
.dark-mode .featured-image img,
.dark-mode .featured-image svg {
  border-color: rgba(255, 255, 255, 0.08);
  background: var(--surface);
}

.dark-mode .clean-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.dark-mode .card-img-wrapper img,
.dark-mode .card-img-wrapper svg {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

/* --- 5. CATEGORY PAGE (ПІДКАТЕГОРІЇ) --- */
.category-hero {
  position: relative;
  width: 100%;
  height: 40vh;
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  margin-top: -1px;
}

.category-hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 1;
}

.category-hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.4);
}

.category-hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: 0 2rem;
  max-width: 800px;
}

.cat-label-top {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1rem;
}

.category-hero-content h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-family: 'Times New Roman', Times, serif;
  margin: 0 0 1rem 0;
  line-height: 1.1;
}

.category-hero-content p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.6;
}

.featured-category-article {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}

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

.featured-cat-text { padding: 3rem 4rem 3rem 0; }

.featured-cat-text h2 {
  font-size: 2.2rem;
  font-family: 'Times New Roman', Times, serif;
  margin: 0 0 1rem 0;
  line-height: 1.2;
}

.featured-cat-text h2 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.featured-cat-text h2 a:hover { color: var(--accent); }

.featured-cat-text p {
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.read-more-link {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}
.read-more-link:hover { color: var(--accent); }

.filter-section {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  margin-bottom: 3rem;
  position: relative;
  z-index: 20;
}

.filter-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  margin: 0;
}

.custom-filter-dropdown {
  position: relative;
  min-width: 220px;
}

.filter-dropdown-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.8rem 1.2rem;
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-dropdown-toggle:hover {
  background: rgba(128, 128, 128, 0.05);
}

.filter-dropdown-toggle svg {
  transition: transform 0.3s ease;
  color: var(--text-3);
}

.custom-filter-dropdown.open .filter-dropdown-toggle svg {
  transform: rotate(180deg);
  color: var(--accent);
}

.filter-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 300px; 
  overflow-y: auto;
  z-index: 100;
}

.dark-mode .filter-dropdown-menu { box-shadow: 0 15px 35px rgba(0,0,0,0.4); }

.custom-filter-dropdown.open .filter-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.filter-option {
  padding: 0.7rem 1.2rem;
  font-size: 0.95rem;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-option:hover {
  background: rgba(128, 128, 128, 0.05);
  color: var(--text);
  padding-left: 1.5rem;
}

.filter-option.active {
  color: var(--accent);
  font-weight: 600;
}

/* --- 6. ПІДВАЛ ТА ІНШІ КОМПОНЕНТИ --- */
.site-footer {
  padding: 3rem 2rem 1rem;
  border-top: 1px solid var(--border); 
  margin-top: 5rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2rem;
  margin-bottom: 2rem;
  align-items: start;
}

.footer-brand h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.footer-desc { color: var(--text-3); font-size: 0.95rem; }

.footer-links, .category-columns {
  list-style: none !important; 
  padding: 0 !important;       
  margin: 0 !important;
}

.category-columns {
  display: flex !important; 
  flex-direction: column !important;
  gap: 0; 
}

.footer-links li, .category-columns li { margin-bottom: 0.8rem; }

.footer-links a, .category-columns a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease, transform 0.3s ease;
  display: inline-block;
}

.footer-links a:hover, .category-columns a:hover {
  color: var(--accent);
  transform: translateX(3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 0.9rem;
}

.dropdown-menu.awwwards-mega, .mega-tab, .tab-icon, .search-input,
.controls button, .hero-content, .btn, .f-card, .clean-card, .btn-load-more {
  border-radius: 3px !important;
}

.btn-load-more {
  background: transparent;
  color: var(--text);
  padding: 0.9rem 2.5rem;
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn-load-more:hover {
  border-color: var(--text-3);
  background: rgba(128, 128, 128, 0.05);
  transform: translateY(-2px);
}
.load-more-container { text-align: center; margin-top: 4rem; width: 100%; }

/* МОБІЛЬНЕ МЕНЮ (СХОВАНЕ НА ДЕСКТОПІ) */
.hamburger {
  display: none !important;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
  margin-left: 10px;
  transition: transform 0.2s;
}
.hamburger:active { transform: scale(0.9); }

.mobile-overlay {
  position: fixed;
  top: 0; right: 0; width: 100%; height: 100dvh;
  background: var(--bg);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 2rem;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.mobile-overlay.active { transform: translateX(0); }

.mobile-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3rem; }
.close-btn { background: transparent; border: none; color: var(--text); cursor: pointer; padding: 5px; display: flex; transition: transform 0.3s; }
.close-btn:hover { transform: rotate(90deg); color: var(--accent); }

.mobile-nav { display: flex; flex-direction: column; padding: 0 0.5rem; margin-top: 1rem; }
.mobile-nav-item, .mobile-accordion { border-bottom: 1px solid var(--border); }
.mobile-nav-item:last-child, .mobile-accordion:last-child { border-bottom: none; }

.mobile-nav-link, .mobile-accordion-toggle {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 1.5rem 0; background: transparent; border: none; font-family: 'Inter', sans-serif;
  font-size: 1.1rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text);
  cursor: pointer; text-decoration: none; font-weight: 500; transition: color 0.3s ease;
}
.mobile-nav-link:hover, .mobile-accordion-toggle:hover { color: var(--accent); }
.mobile-accordion-toggle .chevron { color: var(--text); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease; }
.mobile-accordion.open .mobile-accordion-toggle .chevron { transform: rotate(90deg); color: var(--accent); }

.mobile-accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.5s ease, padding 0.5s ease; display: flex; flex-direction: column; }
.mobile-accordion.open .mobile-accordion-content { max-height: 1000px; padding-bottom: 1.5rem; }
.mobile-accordion-content a { padding: 1rem 0 1rem 1rem; font-size: 1.05rem; color: var(--text-2); text-decoration: none; border-bottom: 1px dashed rgba(128, 128, 128, 0.2); transition: color 0.3s ease, padding-left 0.3s ease; font-family: 'Inter', sans-serif; line-height: 1.4; }
.mobile-accordion-content a:last-child { border-bottom: none; }
.mobile-accordion-content a:hover { color: var(--text); padding-left: 1.5rem; }

::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--text-3); border-radius: 6px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.dropdown-menu.awwwards-mega *::-webkit-scrollbar { width: 6px; }
.dropdown-menu.awwwards-mega *::-webkit-scrollbar-track { background: transparent; }
.dropdown-menu.awwwards-mega *::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }


/* ========================================= */
/* --- АДАПТИВНІСТЬ (МЕДІА ЗАПИТИ) --- */
/* ========================================= */

@media (min-width: 1025px) {
  .hero-single-photo-mobile { display: none; }
}

@media (max-width: 1200px) {
  .dropdown-menu.awwwards-mega { width: 95vw; left: 0; }
}

@media (max-width: 1024px) {
  /* Ваші існуючі правила для планшета */
  header { padding: 0 2rem; }
  .featured-article { flex-direction: column; gap: 2rem; }
  .editorial-grid { grid-template-columns: repeat(2, 1fr); }
  .header-center { display: none; }

  /* 1. ВИПРАВЛЯЄМО МЕНЮ: Показуємо гамбургер і ховаємо пошук */
  .search-container { display: none !important; }
  .hamburger { display: flex !important; align-items: center; justify-content: center; }
  .hero-buttons .dropdown { display: none; }

  /* 2 та 3. ВИПРАВЛЯЄМО ГОЛОВНИЙ ЕКРАН: Робимо вертикальний дизайн для планшета */
  .hero-content { flex-direction: column; height: auto; padding: 3rem 2rem 0 2rem; gap: 2rem; }
  .hero-text { width: 100%; max-width: 100%; text-align: center; padding: 0; display: flex; flex-direction: column; align-items: center; }
  .hero-visual { width: 100%; height: auto; justify-content: center; margin: 0; padding: 0 0 3rem 0; overflow: visible; }
  
  /* Ховаємо "поламаний" колаж і показуємо одну акуратну картинку */
  .hero-collage { display: none; }
  .hero-single-photo-mobile { 
    display: block; 
    width: 100%; 
    max-width: 650px; 
    height: auto; 
    border-radius: 20px; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); 
    margin: 0 auto;
  }
}

/* --- АДАПТИВНІСТЬ ДЛЯ ПЛАНШЕТІВ ТА ТЕЛЕФОНІВ --- */
@media (max-width: 768px) {
  /* 1. Шапка: Зменшуємо відступи для максимуму простору */
  header { 
    padding: 0 1rem; 
  }

  .nav-links, .header-center { display: none; }
  .search-container { display: none !important; }
  .hamburger { display: flex !important; align-items: center; justify-content: center; }
  
 /* 2. Логотип: Масштабуємо під мобільні екрани */
  .prosto-logo-main { font-size: 1.4rem; }
  .prosto-subtitle-text { font-size: 0.45rem; padding: 0 3px; letter-spacing: 0.5px; }
  .prosto-logo { padding: 0; }

  /* 3. Кнопка теми: Робимо її компактною (лише іконка) */
  #theme-toggle .text { 
    display: none; 
  }
  #theme-toggle {
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 3px !important;
  }

  /* Головний блок (Hero) */
  .hero-content { flex-direction: column; height: auto; padding: 2rem 1rem 0 1rem; gap: 1.5rem; }
  .hero-text { width: 100%; max-width: 100%; text-align: center; padding: 0; display: flex; flex-direction: column; align-items: center; }
  .hero-text h1 { font-size: 2rem; margin: 0 0 0.5rem 0; }
  .hero-text p { font-size: 1rem; margin: 0 0 1.5rem 0; }
  .hero-visual { width: 100%; height: auto; justify-content: center; margin: 0; padding: 0 1rem 3rem 1rem; overflow: visible; }
  .hero-collage { display: none; }
  .hero-single-photo-mobile { display: block; width: 100%; max-width: 400px; height: auto; border-radius: 20px; object-fit: cover; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

  /* Секції зі статтями */
  .editorial-section { padding: 2rem 1.5rem; }
  .editorial-grid { grid-template-columns: 1fr; }
  .article-tabs { gap: 1.5rem; overflow-x: auto; white-space: nowrap; padding-bottom: 0.5rem; }
  .section-divider { font-size: 1.8rem; margin-top: 3rem; }

  /* Підвал */
  .footer-container { grid-template-columns: 1fr; text-align: center; gap: 3rem; }
  .category-columns { text-align: left; max-width: 250px; margin: 0 auto; }

  /* Головна стаття в категоріях */
  .featured-category-article { grid-template-columns: 1fr; gap: 0; }
  .featured-cat-image img { min-height: 250px; height: 250px; }
  .featured-cat-text { padding: 2rem 1.5rem; }
  .featured-cat-text h2 { font-size: 1.8rem; }
}

/* 4. Фікс для iPhone 12 та інших вузьких екранів (до 400px) */
@media (max-width: 400px) {
  .prosto-subtitle { display: none; } /* Ховаємо підпис, щоб залишалося місце для кнопок */
  .prosto-logo-main { font-size: 1.3rem; }
}

@media (max-width: 600px) {
  .filter-section { flex-direction: column; align-items: stretch; gap: 1rem; }
}

/* Стилі для головного фото-колажу на мобільних та планшетах (до 1200px) */
@media (max-width: 1200px) {
  
  /* Цей новий клас відповідає за ідеально симетричні відступи */
  .hero-visual-wrapper {
    display: flex !important;
    justify-content: center !important; /* Центрує зображення всередині */
    width: 100vw !important; /* Розтягуємо на всю ширину екрана */
    
    /* Ідеально симетричні бічні відступи по 15px кожен */
    padding-left: 15px !important; 
    padding-right: 15px !important;
    
    /* Допомагає обійти батьківські відступи */
    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  /* Тепер зображення просто займає 100% гнучкого симетричного контейнера */
  .hero-single-photo-mobile {
    width: 100% !important; /* Займає всю ширину .hero-visual-wrapper мінус падінги */
    max-width: none !important;
    display: block !important;
    
    /* Скидання будь-якого білого фону або рамки */
    background: transparent !important;
    border: none !important;
    padding: 0 !important;

    /* Зберігаємо красиві закруглені кути */
    border-radius: 12px; 
    
    /* Тінь для об'єму */
    box-shadow: 0 4px 15px rgba(0,0,0, 0.2);
  }
}

/* ======================================================= */
/* --- 1. НОВІ ДИЗАЙНИ (ДЕСКТОП) --- */
/* ======================================================= */

/* --- ГОЛОВНИЙ ХАЙЛАЙТ (ПІД БАНЕРОМ) --- */
.top-highlight-section {
  max-width: 1200px;
  margin: 5rem auto 0 auto; /* Відступ від верхнього банера */
  padding: 0 4rem; 
}

.highlight-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr; /* Текст займає менше, фото - більше */
  gap: 4rem;
  align-items: center;
}

.highlight-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.highlight-text .category-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 1rem;
  font-weight: 700;
}

.highlight-text h2 {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.1;
  margin: 0 0 1.5rem 0;
  color: var(--text);
}

.highlight-text h2 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.highlight-text h2 a:hover { color: var(--accent); }

.highlight-text p {
  font-size: 1.1rem;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0;
}

.highlight-image img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
  border-radius: 3px;
  border: 1px solid rgba(128, 128, 128, 0.15);
}

.dark-mode .highlight-image img { border-color: rgba(255, 255, 255, 0.08); }

/* --- АЛЬТЕРНАТИВНИЙ БЛОК (Журнальний Стиль: 1+3) --- */
.alt-category-layout { margin: 4rem 0; border-top: 2px solid var(--text); padding-top: 3rem; }
.alt-top-row { display: grid; grid-template-columns: 1.5fr 1fr; gap: 4rem; margin-bottom: 3rem; align-items: center; }
.alt-big-article img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; border: 1px solid var(--border); }
.alt-big-content { margin-top: 1.5rem; }
.alt-big-content .category-label { margin-bottom: 0.8rem; }
.alt-big-content h3 { font-family: 'Times New Roman', Times, serif; font-size: 1.8rem; line-height: 1.2; margin: 0; }
.alt-big-content a { color: var(--text); text-decoration: none; transition: color 0.3s; }
.alt-big-content a:hover { color: var(--accent); }
.alt-category-info h2 { font-family: 'Times New Roman', Times, serif; font-size: clamp(2.5rem, 4vw, 3.5rem); line-height: 1.1; margin: 0 0 1.5rem 0; color: var(--text); }
.alt-category-info p { font-size: 1.1rem; color: var(--text-2); line-height: 1.6; margin-bottom: 2.5rem; }
.btn-discover { display: inline-block; background: var(--text); color: var(--bg); padding: 14px 28px; text-transform: uppercase; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.1em; text-decoration: none; transition: all 0.3s ease; }
.btn-discover:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.alt-bottom-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

/* --- МОЗАЇКА КАТЕГОРІЇ (Bento Box: 5 карток) --- */
.masonry-category-header { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid var(--text); padding-bottom: 1rem; margin: 5rem 0 2.5rem 0; }
.masonry-category-header h2 { font-family: 'Times New Roman', Times, serif; /* Змінили шрифт на журнальний */font-size: clamp(1.8rem, 3vw, 2.4rem); margin: 0; line-height: 1; color: var(--text); font-weight: bold; /* Стандартна товщина для цього шрифту */text-transform: none; /* Відключили примусові ВЕЛИКІ літери */}
.masonry-category-header h2 em { font-family: 'Times New Roman', Times, serif; /* Змінили шрифт для "та" */font-style: italic; font-weight: normal; font-size: 1em; /* Повернули нормальний розмір */vertical-align: baseline; padding: 0 5px; color: var(--text); /* Щоб колір був такий самий, як у "Їжа та Напої" */text-transform: none;}
.masonry-category-header a { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text); text-decoration: none; transition: color 0.3s; }
.masonry-category-header a:hover { color: var(--accent); }
.masonry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }

.masonry-card { display: flex; flex-direction: column; background: var(--bg); border: 1px solid rgba(128, 128, 128, 0.15); transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; overflow: hidden; }
.masonry-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04); border-color: rgba(128, 128, 128, 0.3); }
.masonry-card .card-img-wrapper { margin-bottom: 0; }
.masonry-card .card-img-wrapper img { width: 100%; display: block; object-fit: cover; }
.masonry-card .card-text-wrapper { padding: 1.5rem; display: flex; flex-direction: column; justify-content: center; flex-grow: 1; }
.masonry-card .category-label { margin-bottom: 0.8rem; margin-left: 0; }
.masonry-card h3 { font-family: 'Times New Roman', Times, serif; font-size: 1.5rem; line-height: 1.25; margin: 0; }
.masonry-card h3 a { color: var(--text); text-decoration: none; transition: color 0.3s; }
.masonry-card h3 a:hover { color: var(--accent); }

.masonry-normal .card-img-wrapper img { aspect-ratio: 1/1; } 
.masonry-card:nth-child(2) .card-img-wrapper img { aspect-ratio: 4/3; } 
.masonry-wide { grid-column: span 2; }
.masonry-wide .card-img-wrapper img { aspect-ratio: 21/9; }

.dark-mode .masonry-card { border-color: rgba(255, 255, 255, 0.08); background: var(--surface); }
.dark-mode .masonry-card:hover { border-color: rgba(255, 255, 255, 0.15); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }


/* ======================================================= */
/* --- 2. АДАПТАЦІЯ (ВІД БІЛЬШОГО ДО МЕНШОГО) --- */
/* ======================================================= */

/* --- ПЛАНШЕТИ ГОРИЗОНТАЛЬНІ (до 1200px) --- */
@media (max-width: 1200px) {
  /* Відновлений фікс для головного фото (Hero) */
  .hero-visual-wrapper { display: flex !important; justify-content: center !important; width: 100vw !important; padding-left: 15px !important; padding-right: 15px !important; position: relative !important; left: 50% !important; transform: translateX(-50%) !important; }
  .hero-single-photo-mobile { width: 100% !important; max-width: none !important; display: block !important; background: transparent !important; border: none !important; padding: 0 !important; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0, 0.2); }
}

/* --- ПЛАНШЕТИ ВЕРТИКАЛЬНІ (до 900px) --- */
@media (max-width: 900px) {
  .highlight-container { grid-template-columns: 1fr; gap: 2rem; }
  .highlight-image { order: -1; } /* На планшеті ставимо картинку ЗВЕРХУ тексту */
  .alt-top-row { grid-template-columns: 1fr; gap: 2rem; }
  .alt-category-info { text-align: center; }
  .alt-bottom-row { grid-template-columns: repeat(2, 1fr); }
  .masonry-grid { grid-template-columns: repeat(2, 1fr); }
  .masonry-wide { grid-column: span 2; } 
}

/* --- ТЕЛЕФОНИ (до 768px) --- */
@media (max-width: 768px) {

  .top-highlight-section { padding: 0 1.5rem; margin-top: 3rem; }
  .highlight-container { grid-template-columns: 1fr; gap: 1.5rem; }
  .highlight-image { order: -1; } /* Картинка над текстом */
  .highlight-image img { aspect-ratio: 4/3; }
  .highlight-text h2 { font-size: 1.8rem; }
  
  /* Базові елементи (Шапка, Footer, звичайні статті) */
  header { padding: 0 1rem; }
  .nav-links, .header-center { display: none; }
  .search-container { display: none !important; }
  .hamburger { display: flex !important; align-items: center; justify-content: center; }
  
  .prosto-logo-main { font-size: 1.4rem; }
  .prosto-subtitle-text { font-size: 0.45rem; padding: 0 3px; letter-spacing: 0.5px; }
  .prosto-logo { padding: 0; }

  #theme-toggle .text { display: none; }
  #theme-toggle { padding: 0; width: 36px; height: 36px; display: flex; justify-content: center; align-items: center; border-radius: 3px !important; }

  .hero-content { flex-direction: column; height: auto; padding: 2rem 1rem 0 1rem; gap: 1.5rem; }
  .hero-text { width: 100%; max-width: 100%; text-align: center; padding: 0; display: flex; flex-direction: column; align-items: center; }
  .hero-text h1 { font-size: 2rem; margin: 0 0 0.5rem 0; }
  .hero-text p { font-size: 1rem; margin: 0 0 1.5rem 0; }
  .hero-visual { width: 100%; height: auto; justify-content: center; margin: 0; padding: 0 1rem 3rem 1rem; overflow: visible; }
  .hero-collage { display: none; }
  .hero-single-photo-mobile { display: block; width: 100%; max-width: 400px; height: auto; border-radius: 20px; object-fit: cover; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

  .editorial-section { padding: 2rem 1.5rem; }
  .editorial-grid { grid-template-columns: 1fr; }
  .article-tabs { gap: 1.5rem; overflow-x: auto; white-space: nowrap; padding-bottom: 0.5rem; }
  .section-divider { font-size: 1.8rem; margin-top: 3rem; }

  .footer-container { grid-template-columns: 1fr; text-align: center; gap: 3rem; }
  .category-columns { text-align: left; max-width: 250px; margin: 0 auto; }

  .featured-category-article { grid-template-columns: 1fr; gap: 0; }
  .featured-cat-image img { min-height: 250px; height: 250px; }
  .featured-cat-text { padding: 2rem 1.5rem; }
  .featured-cat-text h2 { font-size: 1.8rem; }

  /* Мобільна Мозаїка (Dім / Сад) */
  .masonry-category-header { flex-direction: column !important; align-items: flex-start !important; gap: 0 !important; border-bottom: 1px solid rgba(128, 128, 128, 0.2) !important; padding-bottom: 1rem !important; margin-bottom: 2rem !important; }
  .masonry-category-header a { display: none !important; }
  .mobile-btn-wrapper { display: block !important; text-align: left !important; margin-top: 1.5rem !important; }

  .masonry-grid .masonry-card:nth-child(4), .masonry-grid .masonry-card:nth-child(5) { display: none !important; }
  .masonry-grid .masonry-card:nth-child(1) { border: none !important; box-shadow: none !important; background: transparent !important; }
  .masonry-grid .masonry-card:nth-child(1) .card-text-wrapper { padding: 1rem 0 !important; }

  .masonry-grid .masonry-card:nth-child(2), .masonry-grid .masonry-card:nth-child(3) { display: flex !important; flex-direction: row !important; align-items: center !important; gap: 1rem !important; border: none !important; box-shadow: none !important; background: transparent !important; border-bottom: 1px solid rgba(128, 128, 128, 0.15) !important; padding: 0 0 1.2rem 0 !important; border-radius: 0 !important; margin-bottom: 1.2rem !important; }
  .masonry-grid .masonry-card:nth-child(3) { border-bottom: none !important; margin-bottom: 0 !important; }
  .masonry-grid .masonry-card:nth-child(2) .card-img-wrapper, .masonry-grid .masonry-card:nth-child(3) .card-img-wrapper { order: -1 !important; width: 110px !important; height: 110px !important; flex-shrink: 0 !important; margin: 0 !important; }
  .masonry-grid .masonry-card:nth-child(2) .card-img-wrapper img, .masonry-grid .masonry-card:nth-child(3) .card-img-wrapper img { width: 100% !important; height: 100% !important; border-radius: 6px !important; aspect-ratio: 1/1 !important; border: none !important; }
  .masonry-grid .masonry-card:nth-child(2) .card-text-wrapper, .masonry-grid .masonry-card:nth-child(3) .card-text-wrapper { padding: 0 !important; order: 2 !important; }
  .masonry-grid .masonry-card:nth-child(2) h3, .masonry-grid .masonry-card:nth-child(3) h3 { font-size: 1.1rem !important; }

  /* Мобільний Журнальний Блок (Їжа та напої) */
  .desktop-btn-journal { display: none !important; }
  .mobile-btn-journal { display: block !important; margin-top: 1.5rem !important; margin-bottom: 2.5rem !important; }
  .alt-top-row { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 1.5rem; }
  .alt-category-info { order: -1 !important; text-align: left; padding: 0; }
  .alt-bottom-row { display: flex; flex-direction: column; gap: 1.2rem; }

  .alt-bottom-row .clean-card { display: grid !important; grid-template-columns: 110px 1fr !important; grid-template-rows: auto auto !important; column-gap: 1rem !important; row-gap: 0.3rem !important; align-content: center !important; background: transparent !important; border: none !important; box-shadow: none !important; border-bottom: 1px solid rgba(128, 128, 128, 0.15) !important; padding: 0 0 1.2rem 0 !important; border-radius: 0 !important; }
  .alt-bottom-row .clean-card:last-child { border-bottom: none !important; padding-bottom: 0 !important; }
  .alt-bottom-row .card-img-wrapper { grid-column: 1 !important; grid-row: 1 / 3 !important; margin: 0 !important; }
  .alt-bottom-row .card-img-wrapper img { width: 100% !important; height: 110px !important; object-fit: cover !important; border-radius: 6px !important; border: none !important; }
  .alt-bottom-row .clean-card .category-label { grid-column: 2 !important; grid-row: 1 !important; margin: 0 !important; align-self: end !important; }
  .alt-bottom-row .clean-card h3 { grid-column: 2 !important; grid-row: 2 !important; margin: 0 !important; align-self: start !important; font-size: 1.1rem !important; line-height: 1.3 !important; }
  .alt-bottom-row .clean-card p { display: none !important; }
}

/* --- МАЛЕНЬКІ ЕКРАНИ (до 600px / 400px) --- */
@media (max-width: 600px) {
  .filter-section { flex-direction: column; align-items: stretch; gap: 1rem; }
  .alt-bottom-row { grid-template-columns: 1fr; }
  .masonry-grid { grid-template-columns: 1fr; }
  .masonry-wide { grid-column: span 1; }
  .masonry-wide .card-img-wrapper img { aspect-ratio: 16/9; }
  .masonry-category-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

@media (max-width: 400px) {
  .prosto-subtitle { display: none; } 
  .prosto-logo-main { font-size: 1.3rem; }
}