/*
Theme Name: Новини.co.ua
Theme URI: https://новини.co.ua
Author: новини.co.ua
Author URI: https://новини.co.ua
Description: Сучасна тема новин для сайту новини.co.ua. Розділи: Новини, Історія, Стоп фейк, Блог, Аналітика. Підтримка категорій, меню, віджетів.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: novyny
Tags: news, blog, custom-menu, featured-images, responsive
*/

/* styles.css - Template for www.новини.co.ua */
:root {
  --blue: #0057B8;
  --yellow: #FFD700;
  --dark: #1a1a1a;
  --gray: #f5f7fa;
  --text: #222;
  --muted: #666;
  --white: #fff;
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  color: var(--text);
  background: var(--gray);
  line-height: 1.6;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* Header */
header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 5%;
  max-width: 1400px;
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--blue);
}
.logo img { height: 48px; width: auto; }
.logo span { color: var(--yellow); }

.search-bar {
  display: flex;
  max-width: 320px;
  width: 100%;
}
.search-bar input {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1px solid #ddd;
  border-radius: 30px 0 0 30px;
  outline: none;
}
.search-bar button {
  background: var(--blue);
  color: white;
  border: none;
  padding: 0 1.2rem;
  border-radius: 0 30px 30px 0;
  cursor: pointer;
}

nav {
  background: var(--blue);
}
nav ul {
  display: flex;
  list-style: none;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5%;
  gap: 0.5rem;
}
nav a {
  display: block;
  color: white;
  padding: 1rem 1.2rem;
  font-weight: 600;
  transition: background 0.2s;
}
nav a:hover, nav a.current-menu-item, nav .current-menu-item > a {
  background: rgba(255,215,0,0.2);
  text-decoration: none;
}

/* Mobile menu */
.menu-toggle { display: none; background: none; border: none; font-size: 1.8rem; cursor: pointer; color: var(--blue); }

/* Hero */
.hero {
  position: relative;
  height: 420px;
  background: url('images/r8AWE.jpg') center/cover no-repeat;
  display: flex;
  align-items: flex-end;
  color: white;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent 60%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem 5%;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}
.hero h1 { font-size: 2.4rem; margin-bottom: 0.5rem; }
.hero p { font-size: 1.1rem; opacity: 0.95; max-width: 700px; }
.badge {
  display: inline-block;
  background: var(--yellow);
  color: var(--dark);
  padding: 0.25rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* Layout */
.container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 5%;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
}
main { min-width: 0; }

/* News cards */
.section-title {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--blue);
  border-left: 4px solid var(--yellow);
  padding-left: 0.8rem;
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.card:hover { transform: translateY(-4px); }
.card img { height: 180px; width: 100%; object-fit: cover; }
.card-body { padding: 1rem; }
.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; line-height: 1.4; }
.card .meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.5rem; }
.card p { font-size: 0.95rem; color: #444; }

/* Sidebar */
.sidebar .widget {
  background: white;
  border-radius: var(--radius);
  padding: 1.2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.sidebar h4, .sidebar .widget-title {
  margin-bottom: 0.8rem;
  color: var(--blue);
}
.sidebar ul { list-style: none; }
.sidebar li { margin-bottom: 0.6rem; }
.sidebar a { color: var(--text); }

/* Form */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-weight: 600; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
}
.form-group textarea { min-height: 120px; resize: vertical; }
button.btn {
  background: var(--blue);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
}
button.btn:hover { background: #004494; }
button.btn.yellow { background: var(--yellow); color: var(--dark); }

/* Footer */
footer {
  background: var(--dark);
  color: #ccc;
  padding: 2.5rem 5% 1.5rem;
  margin-top: 3rem;
}
.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}
footer h4 { color: white; margin-bottom: 0.8rem; }
footer a { color: #aaa; }
footer a:hover { color: var(--yellow); }
.copyright {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #333;
  font-size: 0.9rem;
}

/* Single post */
.single-post .entry-content { background: white; padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.single-post .entry-meta { color: var(--muted); margin-bottom: 1rem; }
.single-post h1 { font-size: 2rem; margin-bottom: 1rem; color: var(--blue); }

/* Responsive */
@media (max-width: 900px) {
  .container { grid-template-columns: 1fr; }
  nav ul { display: none; flex-direction: column; }
  nav ul.open { display: flex; }
  .menu-toggle { display: block; }
  .header-top { flex-wrap: wrap; gap: 1rem; }
  .search-bar { order: 3; max-width: 100%; }
  .hero h1 { font-size: 1.8rem; }
  .hero { height: 300px; }
}
