/*
Theme Name: Побратими Разом
Description: Тема для ГО «Побратими Разом»: керовані секції головної, новини з коментарями, тексти в Customizer.
Author: ГО «Побратими Разом»
Version: 1.3.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pobratymy-razom
*/

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #2d2417;
  background: #fffdf7;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2 {
  margin-top: 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.brand-wrap {
  margin: 0;
  line-height: 0;
}

a {
  color: #8a6400;
}

:focus-visible {
  outline: 3px solid #c99700;
  outline-offset: 2px;
}

.container {
  max-width: 62rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.center {
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 100;
  background: #2d2417;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 0.5rem 0.5rem;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}

.site-header {
  background: linear-gradient(180deg, #ffffff 0%, #fffdf7 100%);
  border-bottom: 1px solid #eee4cf;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding-block: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  text-decoration: none;
  color: #2d2417;
  padding: 0.5rem 0.25rem 0.35rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover {
  color: #8a6400;
}
.site-nav a.active,
.site-nav .current-menu-item a,
.site-nav .current_page_item a {
  color: #8a6400;
  border-color: #c99700;
}

.site-logo {
  width: 9rem;
  height: auto;
}

.section {
  padding-block: 3.5rem;
}

.alt {
  background: linear-gradient(180deg, #faf3e0 0%, #fffdf7 100%);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.split-photo {
  margin: 0;
}
.split-photo img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.split-photo figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b5c44;
  text-align: center;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-block: 1.5rem 2rem;
}

.news-feed {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.news-card {
  background: #fff;
  border: 1px solid #efe6cf;
  border-radius: 0.75rem;
  padding: 1.25rem;
}
.news-card:hover {
  border-color: #e6c34a;
  box-shadow: 0 6px 18px rgba(201, 151, 0, 0.18);
}

/* Вбудовані відео (YouTube oEmbed) — респонсивні, не виходять за межі картки */
.news-card iframe,
.news-card object,
.news-card embed,
.news-card video {
  max-width: 100%;
}

.news-card iframe[src*="youtube"],
.news-card iframe[src*="youtu.be"] {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
}

.news-date {
  display: inline-block;
  background: linear-gradient(135deg, #ffd700 0%, #f0b400 100%);
  color: #2d2417;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.news-card h3 {
  margin: 0.25rem 0 0.5rem;
}

.card-link {
  text-decoration: none;
  font-weight: 600;
}
.card-link:hover {
  text-decoration: underline;
}

.btn {
  display: inline-block;
  background: linear-gradient(135deg, #ffd700 0%, #f0b400 100%);
  color: #2d2417;
  font-weight: 700;
  text-decoration: none;
  padding: 0.7rem 1.75rem;
  border-radius: 999px;
}
.btn:hover {
  background: linear-gradient(135deg, #e8b400 0%, #c99700 100%);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}
.pagination a,
.pagination span {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  text-decoration: none;
  background: #fff;
  border: 1px solid #efe6cf;
}
.pagination .current {
  background: linear-gradient(135deg, #ffd700 0%, #f0b400 100%);
  border-color: #f0b400;
  color: #2d2417;
  font-weight: 600;
}

.site-footer {
  background: linear-gradient(180deg, #2d2417 0%, #1a140d 100%);
  color: #f4ecd9;
  padding-top: 2.5rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-bottom: 2rem;
}
.footer-inner h3 {
  margin-top: 0;
  color: #ffd700;
  font-size: 1.05rem;
}
.footer-inner a {
  color: #f4ecd9;
  text-decoration: none;
}
.footer-inner a:hover {
  color: #ffd700;
}

.copyright {
  margin: 0;
  padding-block: 1rem;
  text-align: center;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.15);
}

@media (max-width: 860px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .split,
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .section {
    padding-block: 2.25rem;
  }
  .site-footer {
    padding-top: 2rem;
  }
  .footer-inner {
    text-align: center;
  }
  .header-inner {
    justify-content: center;
    text-align: center;
  }
}

/* --- Комментарі до новин --- */
.comments-area {
  margin-top: 2.5rem;
  border-top: 1px solid #eee4cf;
  padding-top: 1.5rem;
}

.comments-title {
  margin-top: 0;
  font-size: 1.3rem;
}

.comment-list {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.comment-list .children {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 1rem;
}

.comment-body {
  background: #fff;
  border: 1px solid #efe6cf;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #6b5c44;
}

.comment-author img.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.comment-metadata a {
  color: #6b5c44;
}

.comment-content {
  margin-top: 0.5rem;
}

.comment-content p {
  margin: 0 0 0.5rem;
}

.reply a,
.comment-reply-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: #8a6400;
  text-decoration: none;
  border-bottom: 2px solid #ffd700;
}

.comment-respond {
  background: #faf3e0;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.comment-reply-title {
  margin-top: 0;
  font-size: 1.1rem;
}

.comment-form p {
  margin: 0 0 0.75rem;
}

.comment-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.comment-form-cookies-consent label {
  display: inline;
  font-weight: 400;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d9cfb8;
  border-radius: 0.5rem;
  font: inherit;
  background: #fff;
}

.comment-form .submit {
  background: linear-gradient(135deg, #ffd700 0%, #f0b400 100%);
  color: #2d2417;
  font-weight: 700;
  border: 0;
  padding: 0.7rem 1.75rem;
  border-radius: 999px;
  cursor: pointer;
}

.comment-form .submit:hover {
  background: linear-gradient(135deg, #e8b400 0%, #c99700 100%);
}

.comment-notes {
  font-size: 0.85rem;
  color: #6b5c44;
}

.comment-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-block: 1.25rem;
}

.comment-navigation .nav-previous a,
.comment-navigation .nav-next a {
  color: #8a6400;
  font-weight: 600;
  text-decoration: none;
}

.comment-navigation .nav-previous a:hover,
.comment-navigation .nav-next a:hover {
  text-decoration: underline;
}

.no-comments {
  color: #6b5c44;
  font-size: 0.95rem;
}
