/*
Theme Name: Hello Elementor Child (ZoxTeam)
Template: hello-elementor
Description: Motyw potomny dla Hello Elementor z brandingiem ZoxTeam (kolory, fonty, układ archiwum bloga). Chroni customizacje przed nadpisaniem przy aktualizacjach motywu nadrzędnego.
Version: 1.3
Text Domain: hello-elementor-child
*/

/* =========================================================
   ZOXTEAM BLOG — CUSTOM CSS
   Wklej całość w: Wygląd → Edytor → Style → ikona (...) → Dodatkowy CSS
   (albo Wygląd → Personalizacja → Dodatkowy CSS, jeśli ta opcja jest widoczna)
   ========================================================= */

/* --- 1. Fonty marki (Google Fonts) --- */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* --- 2. Zmienne kolorów marki --- */
:root {
  --zx-purple: #4C3FC7;
  --zx-purple-soft: #6C5CE0;
  --zx-gold: #E8B84B;
  --zx-gold-soft: #FBEACD;
  --zx-lavender-bg: #F5F3FC;
  --zx-lavender-border: #EAE6FB;
  --zx-white: #FFFFFF;
  --zx-ink: #211C3D;
  --zx-ink-soft: #635F7A;
}

/* --- 3. Typografia globalna --- */
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--zx-ink);
  background-color: var(--zx-lavender-bg);
}

h1, h2, h3, h4, h5, h6,
.wp-block-post-title,
.wp-block-query-title,
.entry-title,
.page-title {
  font-family: 'Quicksand', sans-serif !important;
  font-weight: 700 !important;
  color: var(--zx-purple) !important;
  letter-spacing: -0.01em;
}

p, li, .entry-content, .wp-block-post-excerpt {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--zx-ink-soft);
  line-height: 1.65;
}

/* --- 4. Linki --- */
a {
  color: var(--zx-purple) !important;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--zx-purple-soft) !important;
}

/* Tytuły wpisów na liście/archiwum — link bez podkreślenia, hover na jaśniejszy fiolet */
.wp-block-post-title a,
.entry-title a {
  color: var(--zx-purple) !important;
  text-decoration: none !important;
}
.wp-block-post-title a:hover,
.entry-title a:hover {
  color: var(--zx-purple-soft) !important;
}

/* --- 4b. Logo w nagłówku — ograniczenie rozmiaru --- */
.custom-logo,
.site-logo img,
.site-logo-link img {
  max-height: 42px !important;
  width: auto !important;
  height: auto !important;
}
.custom-logo-link {
  display: inline-flex !important;
  align-items: center;
}

/* --- 5. Przyciski (Gutenberg, Elementor, motyw) --- */
.wp-block-button__link,
.elementor-button,
button,
input[type="submit"] {
  background-color: var(--zx-purple) !important;
  color: var(--zx-white) !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 600 !important;
  border-radius: 999px !important;
  padding: 0.75em 1.75em !important;
  border: none !important;
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.wp-block-button__link:hover,
.elementor-button:hover,
button:hover,
input[type="submit"]:hover {
  background-color: var(--zx-purple-soft) !important;
  transform: translateY(-1px);
}

/* Wariant przycisku ze złotym akcentem — dodaj klasę "is-style-gold" w bloku przycisku */
.is-style-gold .wp-block-button__link {
  background-color: var(--zx-gold) !important;
  color: var(--zx-ink) !important;
}
.is-style-gold .wp-block-button__link:hover {
  background-color: #f0c565 !important;
}

/* --- 6. Karty wpisów na stronie archiwum (Query Loop / Twenty Twenty-Four) --- */
.wp-block-post,
li.wp-block-post {
  background-color: var(--zx-white);
  border: 1px solid var(--zx-lavender-border);
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 14px rgba(76, 63, 199, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.wp-block-post:hover {
  box-shadow: 0 8px 24px rgba(76, 63, 199, 0.12);
  transform: translateY(-2px);
}

/* Miniaturki wpisów — zaokrąglone rogi */
.wp-block-post-featured-image img,
.wp-post-image {
  border-radius: 12px !important;
}

/* --- 7. Sekcja "Archiwa" / nagłówek listy wpisów --- */
.wp-block-query-title,
.page-header,
.archive-description {
  display: none !important;
}

/* =========================================================
   7b. WŁASNY UKŁAD ARCHIWUM (Hello Elementor: archive.php)
   2 posty duże obok siebie + siatka 4 w rzędzie
   ========================================================= */

.zx-archive {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

/* Data nad tytułem — mały, stonowany label */
.zx-post-date {
  display: inline-block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--zx-purple-soft);
  background-color: var(--zx-lavender-bg);
  padding: 0.25em 0.75em;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

/* --- Rząd 2 dużych postów na górze --- */
.zx-featured-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}

.zx-featured-post {
  background-color: var(--zx-white);
  border: 1px solid var(--zx-lavender-border);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 4px 14px rgba(76, 63, 199, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.zx-featured-post:hover {
  box-shadow: 0 10px 28px rgba(76, 63, 199, 0.14);
  transform: translateY(-3px);
}
.zx-featured-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 1.25rem;
}
.zx-featured-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.zx-featured-body {
  padding: 0;
}
.zx-featured-body .entry-title {
  font-size: 1.4rem !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Siatka pozostałych postów, 4 w rzędzie --- */
.zx-post-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.zx-grid-post {
  background-color: var(--zx-white);
  border: 1px solid var(--zx-lavender-border);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 3px 10px rgba(76, 63, 199, 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.zx-grid-post:hover {
  box-shadow: 0 8px 20px rgba(76, 63, 199, 0.12);
  transform: translateY(-3px);
}
.zx-grid-thumb {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background-color: var(--zx-lavender-bg);
  margin-bottom: 1rem;
}
.zx-grid-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.zx-grid-body {
  padding: 0;
}
.zx-grid-body .entry-title {
  font-size: 1rem !important;
  line-height: 1.35 !important;
  margin: 0 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zx-grid-body .zx-post-date {
  font-size: 0.7rem;
}

/* --- Responsywność --- */
@media (max-width: 900px) {
  .zx-featured-row {
    grid-template-columns: 1fr;
  }
  .zx-post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .zx-post-grid {
    grid-template-columns: 1fr;
  }
}

/* --- 8. Cytaty (blockquote) — akcent złoty, w stylu ZoxTeam --- */
blockquote {
  border-left: 4px solid var(--zx-gold);
  background-color: var(--zx-gold-soft);
  padding: 1rem 1.5rem;
  border-radius: 0 12px 12px 0;
  font-style: normal;
  color: var(--zx-ink);
}

/* --- 9. Stopka --- */
.wp-block-template-part.footer,
footer {
  background-color: var(--zx-white);
  color: var(--zx-ink-soft);
  border-top: 1px solid var(--zx-lavender-border);
}

/* --- 10. Zaznaczenie tekstu (drobny detal spójności marki) --- */
::selection {
  background-color: var(--zx-gold-soft);
  color: var(--zx-ink);
}

/* =========================================================
   11. STRONA POJEDYNCZEGO WPISU — dopracowany layout czytania
   ========================================================= */

/* Wyśrodkowana, czytelna szerokość treści (jak w dobrych blogach/magazynach) */
article,
.entry-content,
.post-content,
.wp-block-post-content {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.5rem;
}

/* Tytuł wpisu — trochę większy oddech od reszty treści */
.entry-title,
.wp-block-post-title {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.5rem;
  font-size: 2.4rem !important;
  line-height: 1.25 !important;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* Śródtytuły (H2) w treści — więcej przestrzeni nad, mniej pod */
.entry-content h2,
.post-content h2 {
  font-size: 1.6rem !important;
  margin-top: 2.75rem !important;
  margin-bottom: 0.9rem !important;
}

.entry-content h3,
.post-content h3 {
  font-size: 1.25rem !important;
  margin-top: 2rem !important;
  margin-bottom: 0.6rem !important;
  color: var(--zx-purple-soft) !important;
}

/* Akapity — komfortowy rozmiar i odstępy do czytania */
.entry-content p,
.post-content p {
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.4rem;
}

/* Pogrubienia w treści — kolor marki zamiast czarnego */
.entry-content strong,
.post-content strong {
  color: var(--zx-ink);
  font-weight: 700;
}

/* Listy — złote kropki zamiast domyślnych czarnych */
.entry-content ul,
.post-content ul {
  padding-left: 0;
  list-style: none;
  margin-bottom: 1.5rem;
}
.entry-content ul li,
.post-content ul li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.65rem;
  line-height: 1.65;
}
.entry-content ul li::before,
.post-content ul li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.55rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--zx-gold);
}

.entry-content ol,
.post-content ol {
  padding-left: 1.4rem;
  margin-bottom: 1.5rem;
}
.entry-content ol li,
.post-content ol li {
  margin-bottom: 0.65rem;
  line-height: 1.65;
  padding-left: 0.3rem;
}
.entry-content ol li::marker,
.post-content ol li::marker {
  color: var(--zx-purple);
  font-weight: 700;
}

/* Obrazki w treści — zaokrąglone rogi, delikatny cień, oddech od tekstu */
.entry-content img,
.post-content img {
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(76, 63, 199, 0.10);
  margin: 1.75rem 0;
}

/* Obraz wyróżniający (featured image) na górze wpisu */
.wp-post-image,
.wp-block-post-featured-image img {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  display: block;
  box-shadow: 0 10px 30px rgba(76, 63, 199, 0.14);
}

/* Linia pozioma (hr) — subtelny gradient marki zamiast szarej kreski */
.entry-content hr,
.post-content hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, var(--zx-purple), var(--zx-gold));
  border-radius: 2px;
  margin: 2.5rem 0;
  opacity: 0.5;
}

/* Linki wewnątrz treści — wyraźne podkreślenie przy hover, bez skakania layoutu */
.entry-content a,
.post-content a {
  border-bottom: 1.5px solid var(--zx-lavender-border);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.entry-content a:hover,
.post-content a:hover {
  border-bottom-color: var(--zx-purple-soft);
}

/* Responsywność — mniejsze marginesy i skala tekstu na telefonach */
@media (max-width: 600px) {
  .entry-title,
  .wp-block-post-title {
    font-size: 1.85rem !important;
  }
  .entry-content h2,
  .post-content h2 {
    font-size: 1.35rem !important;
  }
  article,
  .entry-content,
  .post-content {
    padding: 0 1.25rem;
  }
}