﻿/* stronazaufana.pl — strona główna v3 (jedna kolumna) */

.home-page {
  --home-max: 720px;
  --home-radius: 16px;
  --home-shadow: 0 4px 24px rgba(20, 19, 43, 0.06);
  --home-shadow-lg: 0 12px 40px rgba(20, 19, 43, 0.1);
}

.home-page.wrap {
  max-width: min(1200px, 100%);
}

.all-sites-page.wrap {
  max-width: min(1200px, 100%);
  margin-top: 24px;
}

@media (min-width: 1024px) {
  .home-page.wrap {
    max-width: min(1400px, 100%);
  }
  .all-sites-page.wrap {
    max-width: min(1400px, 100%);
  }
}

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

/* —— Hero —— */
.home-hero {
  position: relative;
  margin: 0 0 32px;
  padding: 40px 28px 36px;
  border-radius: calc(var(--home-radius) + 4px);
  background: linear-gradient(145deg, #fff 0%, #f0f7ff 45%, #e8f4fd 100%);
  border: 1px solid rgba(59, 130, 246, 0.12);
  box-shadow: var(--home-shadow-lg);
  text-align: center;
  overflow: hidden;
}

.home-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 60%;
  height: 120%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.home-hero__inner {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.home-hero__badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.home-hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--heading);
}

.home-hero h1 em {
  font-style: normal;
  color: var(--accent-2, var(--accent));
}

.home-hero__lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.5;
}

.home-search {
  margin-bottom: 20px;
}

.home-search input {
  width: 100%;
  padding: 16px 20px;
  font-size: 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.home-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.home-hero__actions .btn {
  min-height: 44px;
}

@media (min-width: 1024px) {
  .home-hero {
    padding: 60px 48px 52px;
    margin: 0 0 48px;
  }
  .home-hero__inner {
    max-width: 700px;
  }
  .home-hero h1 {
    font-size: 3rem;
  }
  .home-hero__lead {
    font-size: 1.25rem;
    margin-bottom: 32px;
  }
  .home-search input {
    padding: 18px 24px;
    font-size: 18px;
  }
}

/* —— Statystyki —— */
.home-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 36px;
}

@media (min-width: 540px) {
  .home-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .home-stats {
    gap: 20px;
    margin-bottom: 48px;
  }
  .home-stat {
    padding: 24px 20px;
  }
  .home-stat__value {
    font-size: 2rem;
  }
  .home-stat__label {
    font-size: 13px;
  }
}

.home-stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--home-radius);
  padding: 16px 14px;
  text-align: center;
  box-shadow: var(--home-shadow);
}

.home-stat__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--heading);
  line-height: 1.2;
}

.home-stat__label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.3;
}

/* —— Sekcje —— */
.home-section {
  margin-bottom: 40px;
}

@media (min-width: 1024px) {
  .home-section {
    margin-bottom: 56px;
  }
  .home-section h2 {
    font-size: 1.75rem;
  }
  .home-section__lead {
    font-size: 15px;
  }
}

/* 2-kolumnowy layout dla dużych ekranów */
@media (min-width: 1024px) {
  .home-grid-2cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

/* Poprawa proporcji i spacing dla PC */
@media (min-width: 1024px) {
  .site-card {
    padding: 24px 28px;
    gap: 20px;
  }
  .site-card__favicon {
    width: 52px;
    height: 52px;
  }
  .site-card__domain {
    font-size: 1.25rem;
  }
  .site-card__tag {
    font-size: 12px;
    padding: 4px 10px;
  }
  .site-card__counts {
    font-size: 16px;
    gap: 16px;
  }
  .site-card__vote .thumb {
    min-width: 48px;
    min-height: 48px;
    font-size: 18px;
  }
  .highlight-panel {
    padding: 24px 28px;
  }
  .highlight-list li {
    padding: 12px 16px;
  }
  .highlight-list img {
    width: 32px;
    height: 32px;
  }
  .highlight-info a {
    font-size: 15px;
  }
  .pulse-block {
    padding: 24px;
  }
  .pulse-item {
    padding: 14px 16px;
  }
  .trust-help {
    padding: 24px;
    border-radius: var(--home-radius);
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--home-shadow);
  }
  .trust-help[open] .trust-help-body {
    padding-top: 16px;
  }
  .trust-help summary {
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
  }
  .trust-help-body p {
    font-size: 14px;
    margin-bottom: 12px;
  }
}

.home-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 20px;
}

.home-section__head--compact {
  margin-bottom: 16px;
}

.home-section h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0;
  color: var(--heading);
}

.home-section__lead {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.home-empty,
.home-empty-sm {
  text-align: center;
  padding: 24px;
}

.home-empty-sm {
  padding: 12px;
  font-size: 14px;
}

/* —— Top 5 —— */
.highlight-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 600px) {
  .highlight-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.highlight-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--home-radius);
  padding: 18px 20px;
  box-shadow: var(--home-shadow);
}

.highlight-panel--best {
  border-top: 3px solid #4caf50;
}

.highlight-panel--worst {
  border-top: 3px solid #c62828;
}

.highlight-panel h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.highlight-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.highlight-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card-alt);
  border-radius: 12px;
  border: 1px solid var(--line);
}

.highlight-rank {
  flex: 0 0 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  border-radius: 8px;
  background: var(--line);
  color: var(--heading);
}

.highlight-panel--best .highlight-rank {
  background: #e8f5e9;
  color: #1b5e20;
}

.highlight-panel--worst .highlight-rank {
  background: #ffebee;
  color: #b71c1c;
}

.highlight-list img {
  border-radius: 8px;
  flex-shrink: 0;
}

.highlight-info {
  min-width: 0;
  flex: 1;
}

.highlight-info a {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.highlight-info a:hover {
  color: var(--accent);
}

.highlight-score {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* —— Karty rankingu —— */
.site-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--home-radius);
  box-shadow: var(--home-shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.site-card:hover {
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow: var(--home-shadow-lg);
}

@media (min-width: 640px) {
  .site-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.site-card__body {
  display: flex;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.site-card__favicon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  flex-shrink: 0;
  object-fit: cover;
}

.site-card__content {
  min-width: 0;
  flex: 1;
}

.site-card__domain {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heading);
  text-decoration: none;
  display: block;
  margin-bottom: 6px;
  word-break: break-word;
}

.site-card__domain:hover {
  color: var(--accent);
}

.site-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.site-card__tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  color: #fff;
  background: var(--tag-color, var(--accent));
}

.site-card__tag--giant {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #1a1a1a;
}

.site-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}

.site-card__comments,
.site-card__votes-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card-alt);
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
}

.site-card__votes-btn {
  font-family: inherit;
}

.site-card__comments:hover,
.site-card__votes-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.site-card__side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

@media (min-width: 640px) {
  .site-card__side {
    flex-direction: column;
    align-items: flex-end;
    padding-top: 0;
    border-top: none;
    flex-shrink: 0;
  }
}

.site-card__counts {
  display: flex;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
}

.site-card__count--up {
  color: #2e7d32;
}

.site-card__count--down {
  color: #c62828;
}

.site-card__vote {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.site-card__vote .thumb {
  min-width: 40px;
  min-height: 40px;
  font-size: 16px;
}

.site-card__vote .thumb.is-selected,
.site-card__vote .thumb[aria-pressed="true"] {
  transform: scale(1.05);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
}

.home-body .hero,
.home-body .banner-section {
  display: none;
}

.site-card__detail {
  font-size: 12px !important;
  padding: 8px 12px !important;
}

/* —— Pulse / aktywność —— */
.pulse-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--home-radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--home-shadow);
}

.pulse-block:last-child {
  margin-bottom: 0;
}

.pulse-block__title {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.pulse-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pulse-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card-alt);
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}

.pulse-item:hover {
  background: #f0f9ff;
  border-color: rgba(59, 130, 246, 0.2);
}

.pulse-item__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.pulse-item__text {
  font-size: 14px;
  color: var(--muted);
  min-width: 0;
}

.pulse-item__text strong {
  color: var(--heading);
}

.latest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.latest-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  background: var(--card-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.latest-chip:hover {
  border-color: var(--accent);
  background: #f0f9ff;
}

.latest-chip img {
  border-radius: 6px;
}

/* —— Trust help —— */
.home-page .trust-help {
  margin-bottom: 24px;
}

.home-page .status-legal {
  margin-top: 8px;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--card-alt);
  border: 1px solid var(--line);
  font-size: 13px;
}

/* Lista „Wszystkie strony” — te same karty co na stronie głównej */
.all-sites-body .site-list {
  margin-top: 12px;
  width: 100%;
}

.all-sites-body .card {
  width: 100%;
}

.all-sites-body .status-legal {
  margin-top: 16px;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--card-alt);
  border: 1px solid var(--line);
  font-size: 13px;
}

@media (max-width: 639px) {
  .all-sites-body .site-card,
  .home-body .site-card {
    align-items: center;
    text-align: center;
  }

  .all-sites-body .site-card__body,
  .home-body .site-card__body {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .all-sites-body .site-card__content,
  .home-body .site-card__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .all-sites-body .site-card__tags,
  .all-sites-body .site-card__links,
  .home-body .site-card__tags,
  .home-body .site-card__links {
    justify-content: center;
  }

  .all-sites-body .site-card__side,
  .home-body .site-card__side {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .all-sites-body .site-card__counts,
  .home-body .site-card__counts {
    justify-content: center;
  }

  .all-sites-body .site-card__vote,
  .home-body .site-card__vote {
    justify-content: center;
    width: 100%;
  }

  .all-sites-body .star-rating,
  .home-body .star-rating {
    margin-left: 0 !important;
    display: inline-block;
  }

  .all-sites-body .site-card--giant,
  .home-body .site-card--giant {
    border-left: none;
    border-top: 3px solid #ffd700;
  }

  .all-sites-body .page-banner,
  .all-sites-body .card-head-inline,
  .home-body .home-section__head {
    align-items: center;
    text-align: center;
  }

  .all-sites-body .card-head-inline .meta-pill,
  .home-body .home-section__head .btn {
    align-self: center;
  }

  .home-body .home-section__head {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .all-sites-body .site-card__favicon,
  .home-body .site-card__favicon {
    width: 40px;
    height: 40px;
  }
  .all-sites-body .site-card__domain,
  .home-body .site-card__domain {
    font-size: 1rem;
  }
  .all-sites-body .site-card__counts,
  .home-body .site-card__counts {
    flex-wrap: wrap;
    width: 100%;
  }
  .all-sites-body .site-card__vote .thumb,
  .home-body .site-card__vote .thumb {
    flex: 1 1 calc(50% - 4px);
  }
  .all-sites-body .site-card__detail,
  .home-body .site-card__detail {
    flex: 1 1 100%;
    text-align: center;
  }
}
