/* NaszModulowyDom.pl — custom styles */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg:       #FAFAF8;
  --text:     #1A1A1A;
  --accent:   #2D4A2B;
  --accent-h: #3d6339;
  --muted:    #6B7280;
  --border:   #E5E7EB;
  --card-bg:  #FFFFFF;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* ── Slider ── */
.hero-slider { position: relative; overflow: hidden; height: 70vh; min-height: 420px; }
.hero-slider .slides { display: flex; height: 100%; transition: transform .5s ease; }
.hero-slider .slide { min-width: 100%; position: relative; }
.hero-slider .slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slider .slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.65) 0%, rgba(0,0,0,.2) 60%, transparent 100%);
  display: flex; align-items: flex-end;
}
.hero-slider .slide-content { padding: 2.5rem 2rem; color: #fff; max-width: 700px; }
.hero-slider .slide-content h2 { font-size: clamp(1.4rem, 4vw, 2.2rem); margin: 0 0 .5rem; font-weight: 600; line-height: 1.2; }
.hero-slider .slide-content p { margin: 0 0 1rem; opacity: .9; font-size: 1rem; }
.hero-slider .slide-content a {
  display: inline-block; padding: .5rem 1.25rem; background: var(--accent);
  color: #fff; text-decoration: none; font-size: .9rem; font-weight: 500;
  transition: background .2s;
}
.hero-slider .slide-content a:hover { background: var(--accent-h); }

.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.15); border: none; color: #fff;
  width: 44px; height: 44px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; font-size: 1.2rem;
  backdrop-filter: blur(4px); transition: background .2s;
}
.slider-arrow:hover { background: rgba(255,255,255,.3); }
.slider-arrow.prev { left: 1rem; }
.slider-arrow.next { right: 1rem; }

.slider-dots { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; gap: .5rem; }
.slider-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.5); border: none; cursor: pointer; padding: 0;
  transition: background .2s;
}
.slider-dot.active { background: #fff; }

/* ── Article card ── */
.article-card { display: flex; flex-direction: column; }
.article-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.article-card .card-body { padding: 1rem 0; flex: 1; display: flex; flex-direction: column; }
.article-card .card-cat { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); text-decoration: none; }
.article-card .card-title { font-size: 1.1rem; font-weight: 600; margin: .4rem 0 .5rem; line-height: 1.3; }
.article-card .card-title a { color: var(--text); text-decoration: none; }
.article-card .card-title a:hover { color: var(--accent); }
.article-card .card-excerpt { font-size: .9rem; color: var(--muted); margin: 0 0 .75rem; flex: 1; }
.article-card .card-meta { font-size: .8rem; color: var(--muted); }

/* ── Article prose ── */
.prose {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  max-width: 680px;
}
.prose h2 { font-family: 'Inter', sans-serif; font-size: 1.4rem; font-weight: 600; margin: 2.5rem 0 .75rem; }
.prose h3 { font-family: 'Inter', sans-serif; font-size: 1.15rem; font-weight: 600; margin: 2rem 0 .5rem; }
.prose p { margin: 0 0 1.25rem; }
.prose ul, .prose ol { padding-left: 1.5rem; margin: 0 0 1.25rem; }
.prose li { margin-bottom: .4rem; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--accent-h); }
.prose strong { font-weight: 600; }
.prose em { font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .9rem; font-family: 'Inter', sans-serif; }
.prose th, .prose td { padding: .6rem .8rem; border: 1px solid var(--border); text-align: left; }
.prose th { background: #F3F4F6; font-weight: 600; }

/* ── Newsletter ── */
.newsletter-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.newsletter-form input[type="email"] {
  flex: 1; min-width: 220px; padding: .7rem 1rem;
  border: 1px solid var(--border); background: #fff;
  font-size: 1rem; font-family: inherit; outline: none;
}
.newsletter-form input[type="email"]:focus { border-color: var(--accent); }
.newsletter-form button {
  padding: .7rem 1.5rem; background: var(--accent); color: #fff;
  border: none; font-size: 1rem; font-weight: 500; cursor: pointer;
  font-family: inherit; transition: background .2s;
}
.newsletter-form button:hover { background: var(--accent-h); }
#newsletter-msg { margin-top: .5rem; font-size: .9rem; }
#newsletter-msg.success { color: var(--accent); }
#newsletter-msg.error { color: #dc2626; }

/* ── Share bar ── */
.share-bar { display: flex; gap: .75rem; flex-wrap: wrap; }
.share-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem .9rem; border: 1px solid var(--border); background: #fff;
  font-size: .85rem; font-family: inherit; cursor: pointer; text-decoration: none;
  color: var(--text); transition: border-color .2s, color .2s;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }
.share-btn.copied { border-color: var(--accent); color: var(--accent); }

/* ── Admin ── */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); text-align: left; font-size: .9rem; }
.admin-table th { font-weight: 600; background: #F9FAFB; }
.admin-table tr:hover td { background: #F9FAFB; }

.badge { display: inline-block; padding: .2rem .6rem; border-radius: 2rem; font-size: .75rem; font-weight: 600; }
.badge-published { background: #D1FAE5; color: #065F46; }
.badge-draft { background: #F3F4F6; color: #6B7280; }
.badge-featured { background: #FEF3C7; color: #92400E; }

.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: .35rem; }
.form-control {
  width: 100%; padding: .6rem .9rem;
  border: 1px solid var(--border); background: #fff;
  font-size: 1rem; font-family: inherit; outline: none;
  transition: border-color .2s;
}
.form-control:focus { border-color: var(--accent); }
.form-error { font-size: .8rem; color: #dc2626; margin-top: .25rem; }
.form-hint { font-size: .8rem; color: var(--muted); margin-top: .25rem; }

.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.2rem; font-size: .9rem; font-weight: 500;
  font-family: inherit; cursor: pointer; border: none; text-decoration: none;
  transition: background .2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); }
.btn-secondary { background: #F3F4F6; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #E5E7EB; }
.btn-danger { background: #FEE2E2; color: #991B1B; }
.btn-danger:hover { background: #FECACA; }
.btn-sm { padding: .3rem .75rem; font-size: .8rem; }

.alert { padding: .85rem 1.1rem; margin-bottom: 1.25rem; border-left: 3px solid; font-size: .9rem; }
.alert-success { background: #F0FDF4; border-color: #22C55E; color: #15803D; }
.alert-error { background: #FEF2F2; border-color: #EF4444; color: #B91C1C; }

.char-count { font-size: .75rem; color: var(--muted); text-align: right; margin-top: .2rem; }
.char-count.over { color: #dc2626; }

/* ── Pagination ── */
.pagination { display: flex; gap: .4rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 1px solid var(--border);
  font-size: .85rem; text-decoration: none; color: var(--text);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .disabled { color: var(--border); pointer-events: none; }

@media (max-width: 640px) {
  .hero-slider { height: 50vh; min-height: 300px; }
  .hero-slider .slide-content { padding: 1.5rem 1rem; }
  .slider-arrow { width: 36px; height: 36px; font-size: 1rem; }
}
