/*
Theme Name: Ticino Jobs Dark
Description: Ciemny, techniczny motyw potomny (granat/czarny + pomarańcz) dla agregatora newsów.
Template: twentytwentyfive
Version: 1.0
Author: Piotr
*/

/* ============================================
   BANNER GŁÓWNY - nazwa + slogan zaszyte w HTML
   ============================================ */
.ticino-hero-banner {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  padding: 48px 24px;
  text-align: center;
}

.ticino-hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

.ticino-hero-name {
  color: var(--text-primary) !important;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 12px 0 !important;
}

.ticino-hero-name::after {
  content: none !important;
}

.ticino-hero-tagline {
  color: var(--accent-orange);
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 !important;
  letter-spacing: 0.01em;
}

@media (max-width: 600px) {
  .ticino-hero-name {
    font-size: 1.8rem;
  }
  .ticino-hero-tagline {
    font-size: 0.95rem;
  }
}

/* ============================================
   PANEL FILTRÓW (kategoria / autor / data)
   ============================================ */
.ticino-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px auto;
  max-width: 1200px;
}

.ticino-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ticino-filter-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

.ticino-filter-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  transition: all 0.15s ease;
}

.ticino-filter-checkbox:hover {
  border-color: var(--accent-orange);
  color: var(--text-primary);
}

.ticino-filter-checkbox input {
  accent-color: var(--accent-orange);
}

.ticino-filter-date {
  background: var(--bg-main);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.9rem;
}

.ticino-filter-authors-group.is-collapsed {
  max-height: 90px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.ticino-filter-authors-group.is-collapsed::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(transparent, var(--bg-card));
}

.ticino-filter-more-authors {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  margin-top: -4px;
}

.ticino-filter-more-authors:hover {
  color: var(--accent-orange);
}

.ticino-filter-reset {
  background: transparent;
  color: var(--accent-orange);
  border: 1px solid var(--accent-orange);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.85rem;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.15s ease;
}

.ticino-filter-reset:hover {
  background: var(--accent-orange);
  color: var(--bg-main);
}

.ticino-filter-empty {
  color: var(--text-secondary);
  text-align: center;
  max-width: 1200px;
  margin: 24px auto;
}

/* ============================================
   ZMIENNE KOLORÓW
   ============================================ */
:root {
  --bg-main: #0a0e1a;
  --bg-card: #131826;
  --bg-card-hover: #1a2035;
  --border-subtle: #232b42;
  --accent-orange: #ff7a29;
  --accent-orange-hover: #ff9152;
  --text-primary: #e8ebf5;
  --text-secondary: #8b93ab;
  --text-muted: #5c6580;
}

/* ============================================
   TŁO I TEKST GLOBALNY
   ============================================ */
html, body {
  background-color: var(--bg-main) !important;
  color: var(--text-primary) !important;
}

a { color: var(--accent-orange); }
a:hover { color: var(--accent-orange-hover); }

.entry-title, h1, h2, h3 {
  color: var(--text-primary) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
}

.site-title, .site-title a {
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
}

.entry-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent-orange);
  margin-top: 12px;
  border-radius: 2px;
}

/* ============================================
   NAGŁÓWEK / STOPKA STRONY
   ============================================ */
/* Stary nagłówek WordPressa (site-title + nawigacja) ukryty -
   zastąpiony przez własny baner (.ticino-hero-banner) powyżej.
   Celujemy tylko w <header>, żeby nie ukryć też stopki (ma podobną strukturę) */
.wp-site-blocks > header.wp-block-template-part {
  display: none !important;
}

.site-footer, footer.site-footer {
  background: var(--bg-card) !important;
  border-top: 1px solid var(--border-subtle) !important;
  color: var(--text-secondary) !important;
}

.site-title a, .site-title a:visited {
  color: var(--text-primary) !important;
}
.site-title a:hover { color: var(--accent-orange) !important; }

/* ============================================
   SIATKA KART — dokładne selektory WP RSS Aggregator
   (potwierdzone z realnego kodu HTML strony)
   ============================================ */

/* Kontener listy -> zamieniamy w siatkę, przełamując wąski content-size motywu */
ul.rss-aggregator.wpra-item-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-auto-rows: min-content;
  align-items: start;
  gap: 20px;
  list-style: none !important;
  padding: 0 !important;
  margin: 40px auto !important;
  max-width: 1200px !important;
  width: 100% !important;
}

/* Nadrzędny kontener WordPressa (is-layout-constrained) domyślnie
   ogranicza szerokość do ~645px - poszerzamy go dla samego agregatora */
.entry-content.is-layout-constrained {
  max-width: 1240px !important;
}

/* Pojedyncza karta */
li.wpra-item.feed-item {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  list-style: none !important;
  display: flex;
  flex-direction: column;
  align-self: start !important;
  height: auto !important;
}

li.wpra-item.feed-item::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent-orange);
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

li.wpra-item.feed-item:hover {
  background: var(--bg-card-hover) !important;
  border-color: var(--accent-orange) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

li.wpra-item.feed-item:hover::before {
  transform: scaleY(1);
}

/* Tytuł / link newsa - bezpośredni <a>, na DOLE karty (celowy układ:
   obrazek -> metadane -> tytuł jako link) */
li.wpra-item.feed-item > a {
  color: var(--text-primary) !important;
  text-decoration: none !important;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  display: block;
  margin-bottom: 0;
  margin-top: 14px;
  order: 3;
}

li.wpra-item.feed-item > a:hover {
  color: var(--accent-orange) !important;
}

/* Blok meta: Source | Date | Author */
.wprss-feed-meta {
  color: var(--text-secondary) !important;
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 14px;
  order: 2;
}

.wprss-feed-meta .feed-source,
.wprss-feed-meta .feed-date,
.wprss-feed-meta .feed-author {
  color: var(--text-secondary) !important;
}

.wprss-feed-meta .feed-source a {
  color: var(--accent-orange) !important;
  font-weight: 600;
  text-decoration: none !important;
}

.wprss-feed-meta .feed-source a:hover {
  color: var(--accent-orange-hover) !important;
  text-decoration: underline !important;
}

/* Fallback: favicon źródła, gdy brak prawdziwego zdjęcia artykułu */
li.wpra-item.feed-item.has-favicon {
  padding: 0 !important;
}

.ticino-card-favicon-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-card-hover), var(--bg-card));
  border-radius: 12px 12px 0 0;
  border-bottom: 1px solid var(--border-subtle);
}

.ticino-card-favicon {
  width: 48px;
  height: 48px;
  opacity: 0.85;
}

li.wpra-item.feed-item.has-favicon > a,
li.wpra-item.feed-item.has-favicon > .wprss-feed-meta {
  padding-left: 24px;
  padding-right: 24px;
}

li.wpra-item.feed-item.has-favicon > a {
  margin-top: 18px;
}

li.wpra-item.feed-item.has-favicon > .wprss-feed-meta {
  padding-bottom: 24px;
}

/* Obrazek dodany przez JS (og:image) na górze karty */
li.wpra-item.feed-item.has-image {
  padding: 0 !important;
}

.ticino-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 12px 12px 0 0;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card-hover);
}

li.wpra-item.feed-item.has-image > a,
li.wpra-item.feed-item.has-image > .wprss-feed-meta {
  padding-left: 24px;
  padding-right: 24px;
}

li.wpra-item.feed-item.has-image > a {
  margin-top: 18px;
}

li.wpra-item.feed-item.has-image > .wprss-feed-meta {
  padding-bottom: 24px;
}

/* ============================================
   RESPONSYWNOŚĆ
   ============================================ */
@media (max-width: 600px) {
  ul.rss-aggregator.wpra-item-list {
    grid-template-columns: 1fr;
  }
}
