/*
Theme Name: DAPAL Lite
Theme URI: https://www.dapal.eu/
Author: DAPAL
Author URI: https://www.dapal.eu/
Description: Lekki motyw sklejony z istniejącym nagłówkiem i stopką serwisu. Treści WordPress (blog/WooCommerce) renderują się pod tym samym UI.
Version: 1.0.0
License: MIT
Text Domain: dapal-lite
*/

:root{
  --dp-brand:#f36b21; /* pomarańcz */
  --dp-text:#0b1220;
  --dp-muted:#6b7280;
  --dp-bg:#ffffff;
  --dp-card:#ffffff;
  --dp-border:#e5e7eb;
  --dp-radius:18px;
  --dp-shadow:0 6px 24px rgba(0,0,0,.06);
}

.dp-container{max-width:1100px;margin:0 auto;padding:24px 16px;}
.dp-archive-head{margin:8px 0 24px}
.dp-archive-title,.dp-single-title{font-weight:800;line-height:1.15;color:var(--dp-text)}
.dp-archive-title{font-size:clamp(26px,3vw,36px)}
.dp-archive-desc{color:var(--dp-muted);max-width:70ch}

.dp-posts-grid{
  display:grid;gap:20px;
  grid-template-columns:repeat(12,1fr);
}
@media(min-width:700px){ .dp-posts-grid{gap:24px} }
.dp-post-card{
  grid-column:span 12;
  background:var(--dp-card);
  border:1px solid var(--dp-border);
  border-radius:var(--dp-radius);
  overflow:hidden;position:relative;
  box-shadow:var(--dp-shadow);
  transition:transform .2s ease, box-shadow .2s ease;
}
@media(min-width:700px){ .dp-post-card{grid-column:span 6} }
@media(min-width:1020px){ .dp-post-card{grid-column:span 4} }
.dp-post-card:hover{transform:translateY(-2px);box-shadow:0 10px 30px rgba(0,0,0,.08)}
.dp-card-link{position:absolute;inset:0;z-index:2}

.dp-thumb{aspect-ratio:3/2;background:#f8fafc;overflow:hidden}
.dp-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.dp-thumb--placeholder{
  width:100%;height:100%;display:grid;place-items:center;
  background:linear-gradient(135deg,#ffe7d6,#fff1e6);
  color:#c25a1a;font-weight:800;font-size:48px;
}

.dp-card-body{padding:16px 16px 14px}
.dp-meta{display:flex;flex-wrap:wrap;gap:8px;align-items:center;color:var(--dp-muted);font-size:13px}
.dp-dot{opacity:.4}
.dp-cat{background:#fff1e6;color:#c25a1a;padding:.2em .6em;border-radius:999px}

.dp-card-title{font-size:clamp(18px,2.2vw,20px);margin:.4rem 0 .35rem;line-height:1.25;color:var(--dp-text)}
.dp-excerpt{
  color:#444;line-height:1.45;margin:0 0 10px;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
}
.dp-card-footer{display:flex;justify-content:flex-end}
.dp-readmore{font-weight:700;color:var(--dp-brand)}

.dp-pagination{display:flex;gap:6px;justify-content:center;margin:24px 0 8px}
.dp-pagination .page-numbers{display:inline-flex;align-items:center;justify-content:center;
  min-width:36px;height:36px;padding:0 10px;border:1px solid var(--dp-border);border-radius:10px}
.dp-pagination .current{background:var(--dp-brand);color:#fff;border-color:transparent}
.dp-pagination a:hover{border-color:var(--dp-brand)}

.dp-hero{margin:0 0 16px;border-radius:var(--dp-radius);overflow:hidden}
.dp-hero img{width:100%;height:auto;display:block;object-fit:cover}

.dp-single-head{margin:4px 0 10px}
.dp-single-title{font-size:clamp(28px,3.5vw,40px)}
.dp-content{max-width:75ch;color:#1f2937;line-height:1.7}
.dp-content img{border-radius:14px;height:auto}
.dp-content figure{margin:1.2em 0}
.dp-tags{margin:18px 0 0;display:flex;gap:10px;align-items:center}
.dp-tags a{background:#eef2ff;padding:.25em .6em;border-radius:999px}
.dp-share{display:flex;gap:12px;align-items:center;margin:16px 0;color:var(--dp-muted)}
.dp-share a{color:var(--dp-brand);font-weight:700}
.dp-post-nav{display:flex;justify-content:space-between;border-top:1px solid var(--dp-border);padding-top:16px;margin-top:22px}

.dp-related{margin:28px 0 8px}
.dp-related h2{font-size:clamp(20px,2.4vw,24px);margin:0 0 12px}


.wp-container {
  width: min(var(--wp-maxw), 100% - 2 * var(--wp-pad-x));
  margin-left: auto;
  margin-right: auto;
}

.entry-content {
  line-height: 1.65;
  font-size: clamp(16px, 1.5vw, 18px);
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  line-height: 1.25;
  margin-top: 1.2em;
  margin-bottom: .5em;
}

.entry-content p {
  margin-top: 0;
  margin-bottom: 1em;
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 1em 1.25em;
  padding: 0;
}

.entry-content blockquote {
  margin: 1.25em 0;
  padding: .75em 1em;
  border-left: 4px solid currentColor;
  border-radius: 8px;
  background: rgba(0, 0, 0, .03);
}

.entry-content img {
  max-width: 100%;
  height: auto;
  display: block;
}

.entry-content figure {
  margin: 1em 0;
}

.entry-content figcaption {
  font-size: .9em;
  opacity: .75;
  margin-top: .35em;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

.entry-content th,
.entry-content td {
  border: 1px solid rgba(0, 0, 0, .1);
  padding: .5em .75em;
  text-align: left;
}

.entry-content pre,
.entry-content code,
.entry-content kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.entry-content pre {
  overflow: auto;
  padding: .85em 1em;
  background: rgba(0, 0, 0, .04);
  border-radius: 10px;
}

.alignwide {
  width: min(1200px, 100% - 2 * var(--wp-pad-x));
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.post-card {
  display: grid;
  gap: var(--wp-gap);
  padding: clamp(12px, 2vw, 18px);
  border-radius: var(--wp-radius);
  background: rgba(0, 0, 0, .03);
  transition: transform .2s ease, box-shadow .2s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .08);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 2px;
  border-radius: 8px;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeInUp .5s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.woocommerce .products {
  display: grid;
  gap: var(--wp-gap);
}

.woocommerce div.product .product_title {
  margin-bottom: .25em;
}

.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
  border-radius: 10px;
}

[data-theme="dark"] .entry-content blockquote {
  background: rgba(255, 255, 255, .06);
}

[data-theme="dark"] .post-card {
  background: rgba(255, 255, 255, .06);
}


/* === Single post: centrowanie kolumny i nagłówka === */
.dp-single{ max-width:1100px; margin-inline:auto; }

/* wąska kolumna treści i sekcje pomocnicze – wszystkie na środku kontenera */
.dp-single-head,
.dp-content,
.dp-tags,
.dp-share,
.dp-post-nav,
.dp-related{ max-width:75ch; margin-inline:auto; }

/* tytuł i meta na środku */
.dp-single-title{ text-align:center; margin:0 auto .35em; }
.dp-single .dp-meta{ justify-content:center; text-align:center; }

/* elementy w treści nie „przyklejają” się do lewej */
.dp-content img,
.dp-content figure{ display:block; margin-inline:auto; }
.dp-content > p,
.dp-content > h2,
.dp-content > h3,
.dp-content > ul,
.dp-content > ol,
.dp-content > blockquote{ margin-inline:auto; }

/* (opcjonalnie) wyrównaj badge kategorii w meta */
.dp-single .dp-cat{ margin-inline:auto; }
