/*
Theme Name: PatrykFeed
Theme URI: https://patrykchilewicz.pl
Author: Patryk Chilewicz
Description: Personal social feed theme
Version: 1.0
*/

:root {
  --blue: #1d6fe8;
  --blue-light: #e8f0fd;
  --blue-dark: #1450b0;
  --pink: #e8186d;
  --pink-light: #fde8f2;
  --bg: #f4f7fb;
  --card: #ffffff;
  --border: #dce8f8;
  --text: #0f1923;
  --text-muted: #5a7a99;
  --shadow: 0 1px 4px rgba(29,111,232,0.07), 0 2px 12px rgba(29,111,232,0.06);
  --font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  font-family: var(--font);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--pink); }
img { max-width: 100%; height: auto; display: block; }

/* ── HEADER ── */
#site-header {
  background: #fff;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--blue) 0%, var(--pink) 100%) 1;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.site-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--pink));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 17px;
  flex-shrink: 0; text-decoration: none;
  overflow: hidden;
}
.site-avatar img.avatar-img {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}
.site-identity h1 { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -.2px; }
.site-identity span { font-size: 12px; color: var(--text-muted); }

/* ── NAV ── */
#site-nav { margin-left: auto; display: flex; gap: 6px; }
#site-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
#site-nav ul li { list-style: none; }
#site-nav ul li a,
#site-nav a {
  font-size: 13px; font-weight: 600;
  padding: 6px 13px; border-radius: 20px;
  color: var(--blue); border: 1.5px solid var(--blue);
  transition: all .2s; white-space: nowrap; display: block;
}
#site-nav ul li.current-menu-item a,
#site-nav ul li a:hover,
#site-nav a:hover {
  background: linear-gradient(90deg, var(--blue), var(--pink));
  color: #fff; border-color: transparent;
}

/* ── LAYOUT ── */
#main { max-width: 680px; margin: 0 auto; padding: 24px 20px; }

/* ── CARD ── */
.post-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 20px 20px 15px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  transition: box-shadow .2s;
}
.post-card:hover { box-shadow: 0 4px 20px rgba(29,111,232,0.13); }

/* ── POST META ── */
.post-meta { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.post-meta .mini-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--pink));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px; flex-shrink: 0;
  overflow: hidden;
}
.mini-avatar img.mini-avatar-img {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}
/* Ukryj dodatkowe avatary Jetpacka */
.post-meta img.avatar:not(.mini-avatar-img) { display: none !important; }

.post-meta .meta-text strong { display: block; font-size: 14px; color: var(--text); }
.post-meta .meta-text time { font-size: 12px; color: var(--text-muted); }

/* ── BADGES ── */
.post-format-badge {
  margin-left: auto;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
}
.format-standard { background: var(--blue-light); color: var(--blue-dark); }
.format-image    { background: var(--pink-light); color: var(--pink); }
.format-gallery  { background: var(--pink-light); color: var(--pink); }
.format-video    { background: #fff3e8; color: #c2600a; }
.format-link     { background: var(--blue-light); color: var(--blue-dark); }

/* ── TITLES ── */
.post-title { font-size: 18px; font-weight: 800; margin-bottom: 10px; line-height: 1.3; letter-spacing: -.3px; }
.post-title a { color: var(--text); }
.post-title a:hover { color: var(--blue); }

/* ── CONTENT ── */
.post-content { font-size: 15px; line-height: 1.7; color: var(--text); }
.post-content p { margin-bottom: 12px; }
.post-content p:last-child { margin-bottom: 0; }
.post-content img { border-radius: 10px; margin: 12px 0; width: 100%; object-fit: cover; }

/* Listy */
.post-content ol,
.post-content ul {
  padding-left: 24px;
  margin: 12px 0;
}
.post-content ol { list-style: decimal; }
.post-content ul { list-style: disc; }
.post-content ol li,
.post-content ul li {
  margin-bottom: 6px;
  line-height: 1.6;
  display: list-item;
}

/* Galeria */
.post-content .gallery {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4px; border-radius: 10px; overflow: hidden; margin: 12px 0;
}
.post-content .gallery-item img { width: 100%; height: 200px; object-fit: cover; border-radius: 0; margin: 0; }

/* Wideo */
.post-content .wp-block-embed,
.post-content .video-wrap {
  margin: 12px 0; border-radius: 10px; overflow: hidden; aspect-ratio: 16/9;
}
.post-content .wp-block-embed__wrapper {
  position: relative; padding-bottom: 56.25%; height: 0; overflow: visible;
}
.post-content .wp-block-embed iframe,
.post-content .video-wrap iframe,
.post-content .wp-block-embed__wrapper iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
}

/* ── TAGI ── */
.post-tags { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 6px; }
.post-tags a { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; transition: all .2s; }
.post-tags a:nth-child(odd)  { background: var(--blue-light); color: var(--blue-dark); }
.post-tags a:nth-child(even) { background: var(--pink-light); color: var(--pink); }
.post-tags a:hover { opacity: .8; }

/* ── READ MORE ── */
.read-more {
  display: inline-block; margin-top: 12px;
  font-size: 13px; font-weight: 600; color: var(--blue);
  border-bottom: 1.5px solid var(--blue-light); transition: color .2s, border-color .2s;
}
.read-more:hover { color: var(--pink); border-color: var(--pink-light); }

/* ── PAGINACJA ── */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 28px 0; }
.pagination a, .pagination span { padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; border: 1.5px solid var(--border); color: var(--blue); }
.pagination .current { background: linear-gradient(90deg, var(--blue), var(--pink)); color: #fff; border-color: transparent; }
.pagination a:hover { border-color: var(--blue); }

/* ── SINGLE POST ── */
.single-post { background: var(--card); border: 1.5px solid var(--border); border-radius: 14px; padding: 28px 28px 24px; box-shadow: var(--shadow); }
.single-post .post-title { font-size: 24px; margin-bottom: 6px; }
.back-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 20px; }
.back-link:hover { color: var(--blue); }

/* ── KOMENTARZE ── */
#comments { margin-top: 20px; background: var(--card); border: 1.5px solid var(--border); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); }
#comments h2 { font-size: 17px; font-weight: 800; margin-bottom: 20px; }
.comment { padding: 14px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: none; }
.comment-author-name { font-size: 14px; font-weight: 700; }
.comment-date { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.comment-body p { font-size: 14px; line-height: 1.6; }
#respond { margin-top: 24px; }
#respond h3 { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.comment-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--text-muted); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-family: var(--font); font-size: 14px; color: var(--text);
  background: var(--bg); margin-bottom: 14px; transition: border-color .2s; resize: vertical;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--blue); }
.comment-form .form-submit input {
  background: linear-gradient(90deg, var(--blue), var(--pink));
  color: #fff; border: none; padding: 10px 24px; border-radius: 20px;
  font-size: 14px; font-weight: 700; cursor: pointer; font-family: var(--font); transition: opacity .2s;
}
.comment-form .form-submit input:hover { opacity: .88; }

/* ── STRONY STATYCZNE ── */
.page-card { background: var(--card); border: 1.5px solid var(--border); border-radius: 14px; padding: 32px 28px; box-shadow: var(--shadow); }
.page-card h1 { font-size: 26px; font-weight: 800; margin-bottom: 18px; }
.page-card .page-content { font-size: 15px; line-height: 1.8; }
.page-card .page-content p { margin-bottom: 14px; }
.page-card .page-content h2 { font-size: 19px; font-weight: 700; margin: 22px 0 10px; }

/* ── FOOTER ── */
#site-footer { text-align: center; padding: 32px 20px; font-size: 12px; color: var(--text-muted); }
#site-footer a { background: linear-gradient(90deg, var(--blue), var(--pink)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 700; }

/* ── MOBILE ── */
@media (max-width: 520px) {
  .header-inner { padding: 10px 14px; }
  #site-nav a { font-size: 12px; padding: 5px 10px; }
  #main { padding: 14px 12px; }
  .post-card { padding: 15px 14px 12px; }
  .single-post { padding: 18px 16px; }
  .post-title { font-size: 16px; }
  .single-post .post-title { font-size: 20px; }
}

@media (max-width: 520px) {
  .single-post {
    padding: 18px 18px 16px;
  }
  .post-content ol,
  .post-content ul {
    padding-left: 20px;
  }
}


.site-avatar img:not(.avatar-img) { display: none !important; }
