/*
Theme Name: Potionplay Blog Wrapper
Theme URI: https://potionplay.sk/
Author: Michal / ChatGPT
Author URI: https://potionplay.sk/
Description: Classic theme that wraps WordPress posts inside the site's existing layout (inc/header.php, menu, shell, footer). Install in /blog.
Version: 1.0.2
Text Domain: potionplay-blog-wrapper
Tags: classic-theme, minimal, blog, wrapper
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/


/* ===== Archive Polish (cards, gutters, typography) ===== */
:root{
    --space-0: 0;
    --space-1: .25rem;
    --space-2: .5rem;
    --space-3: .75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --radius-2: .5rem;
    --radius-3: .75rem;
    --shadow-1: 0 4px 18px rgba(0,0,0,.06);
    --chip-bg: #f4f6f8;
    --chip-fg: #39424e;
  }
  
  .blog-scope .archive-head{
    display:flex; align-items:flex-end; justify-content:space-between;
    gap: var(--space-4); margin: var(--space-6) 0 var(--space-4);
    border-bottom: 1px solid #eee; padding-bottom: var(--space-3);
  }
  .blog-scope .archive-head h1{ margin:0; line-height:1.2 }
  .blog-scope .archive-sub{ opacity:.7; font-size:.95rem }
  
  .blog-scope .post-grid{
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-6);
  }
  
  .blog-scope article.card{
    background:#fff;
    border-radius: 16px;
    box-shadow: var(--shadow-1);
    overflow:hidden;
    display:flex;
    flex-direction:column;
    transition: transform .18s ease, box-shadow .18s ease;
  }
  .blog-scope article.card:hover{ transform: translateY(-3px); box-shadow: 0 8px 26px rgba(0,0,0,.08) }
  
  .blog-scope .card-media{
    aspect-ratio: 16/9;
    background:#fafafa;
    display:block;
    overflow:hidden;
  }
  .blog-scope .card-media img{
    width:100%; height:100%; object-fit:cover; display:block;
  }
  
  .blog-scope .card-body{ padding: var(--space-5) }
  .blog-scope .card-title{ margin:0 0 var(--space-2); font-size:1.125rem; line-height:1.25 }
  .blog-scope .card-title a{ text-decoration:none }
  .blog-scope .card-meta{
    display:flex; flex-wrap:wrap; gap: var(--space-2) var(--space-3);
    margin-bottom: var(--space-3);
  }
  .blog-scope .chip{
    display:inline-flex; align-items:center; gap:.4ch;
    background: var(--chip-bg); color: var(--chip-fg);
    border-radius: 999px; padding: .2rem .6rem; font-size:.85rem;
    white-space:nowrap;
  }
  
  .blog-scope .card-excerpt{ margin:0; }
  .blog-scope .card-excerpt.clamp-3{
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  }
  
  .blog-scope .archive-pagination{
    margin: var(--space-8) 0;
    display:flex; justify-content:center; gap: var(--space-2);
  }
  .blog-scope .archive-pagination a,
  .blog-scope .archive-pagination span{
    padding: .5rem .8rem; border:1px solid #e5e7eb; border-radius: var(--radius-2);
    text-decoration:none;
  }
  .blog-scope .archive-pagination .current{ background:#f3f4f6; }
  
  @media (max-width: 740px){
    .blog-scope .archive-head{ flex-direction:column; align-items:flex-start }
  }
  


/* ===== Recommended products module ===== */
.blog-scope .rec-products{ margin: 2.5rem 0 0 }
.blog-scope .rec-title{ margin: 0 0 1rem; font-size:1.25rem; font-weight:800 }
.blog-scope .rec-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.blog-scope .rec-card{
  display:flex; flex-direction:column; text-decoration:none;
  background:#fff; border-radius:14px; box-shadow:0 6px 20px rgba(0,0,0,.06); overflow:hidden;
  transition:transform .15s ease, box-shadow .15s ease;
}
.blog-scope .rec-card:hover{ transform: translateY(-2px); box-shadow:0 10px 28px rgba(0,0,0,.08) }
.blog-scope .rec-media{ aspect-ratio: 1 / 1; background:#fafafa; display:block; overflow:hidden }
.blog-scope .rec-media img{ width:100%; height:100%; object-fit:cover; display:block }
.blog-scope .rec-placeholder{ width:100%; height:100%; background:linear-gradient(90deg,#f3f4f6,#eef0f3,#f3f4f6); }
.blog-scope .rec-body{ padding:.75rem .9rem }
.blog-scope .rec-name{ font-weight:600; line-height:1.3; margin:0 0 .25rem; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden }
.blog-scope .rec-price{ font-weight:800 }


/* ===== Modern single HERO ===== */
:root{
  --hero-pad: clamp(1.25rem, 3vw, 2rem);
  --hero-radius: 22px;
  --hero-shadow: 0 18px 50px rgba(0,0,0,.10);
}

.blog-scope .post-hero{ position:relative; margin: 0 0 1.5rem; }
.blog-scope .post-hero-bg{ position:absolute; inset:-40px 0 0 0; z-index:-1; filter:saturate(105%); }
.blog-scope .post-hero-bg-img{
  width:100%; height:320px; object-fit:cover; display:block; opacity:.35; filter: blur(2px);
}
.blog-scope .post-hero-gradient{
  position:absolute; inset:0; display:block;
  background: radial-gradient(1200px 300px at 10% -10%, rgba(255,255,255,.9), rgba(255,255,255,0)) ,
              linear-gradient(180deg, rgba(255,255,255,.85) 0%, rgba(255,255,255,1) 70%);
}

/* Card vpredu */
.blog-scope .post-hero-card{
  display:grid; grid-template-columns: 1.2fr .9fr; gap: clamp(1rem, 3vw, 2rem);
  background:#fff; border-radius: var(--hero-radius); box-shadow: var(--hero-shadow);
  padding: clamp(1rem, 3vw, 2rem); align-items:center;
}
.blog-scope .post-hero-title{ margin:.25rem 0 .5rem; line-height:1.15; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.blog-scope .post-hero-meta{ display:flex; flex-wrap:wrap; gap:.5rem .5rem; margin:.5rem 0 0; }
.blog-scope .chip{
  display:inline-flex; align-items:center; gap:.45ch;
  background:#f4f6f8; color:#39424e; border-radius:999px; padding:.28rem .7rem; font-size:.9rem;
}
.blog-scope .post-hero-share{ display:flex; gap:.75rem; margin-top:.85rem; }
.blog-scope .post-hero-share a{ text-decoration:none; opacity:.8 }
.blog-scope .post-hero-share a:hover{ opacity:1 }

.blog-scope .post-hero-media{
  margin:0; aspect-ratio: 1/1; background:#fafafa; border-radius: 20px; overflow:hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.blog-scope .post-hero-img{ width:100%; height:100%; object-fit:cover; display:block; }

/* Obsahová karta pod hero */
.blog-scope .post-content-card{
  background:#fff; border-radius: var(--hero-radius); box-shadow: var(--hero-shadow);
  padding: clamp(1rem, 3vw, 2rem); margin: 1.25rem 0 0;
}

/* Breadcrumbs (recyklované) */
.blog-scope .breadcrumbs{ opacity:.75; margin: 0 0 .75rem; display:flex; gap:.5rem; flex-wrap:wrap }

/* Responsivita */
@media (max-width: 960px){
  .blog-scope .post-hero-bg-img{ height:260px; }
  .blog-scope .post-hero-card{ grid-template-columns: 1fr; }
  .blog-scope .post-hero-media{ order:-1; aspect-ratio: 16/9; border-radius:16px }
}


/* ===== Post pager ===== */
/* ===== Modern Post Pager (cards with image bg) ===== */
.blog-scope .post-pagerX{
  margin: 2rem 0 0;
  display: flex;
  gap: 1rem;
  width: 100%;
}

.blog-scope .post-pagerX .pp-card{
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  min-height: 120px;
  padding: 1rem 1.1rem 1.1rem 2.75rem; /* miesto pre ľavú šípku */
  color: #0f172a;
  text-decoration: none;
  isolation: isolate;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform .18s ease, box-shadow .18s ease;
  /* responzívna šírka kariet */
  flex: 0 1 380px;     /* na širších max ~380px */
  min-width: 280px;    /* aby sa na desktope nekrčili príliš */
}

.blog-scope .post-pagerX .pp-card:hover{
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0,0,0,.12);
}

/* Pozadie z thumbnailu */
.blog-scope .post-pagerX .pp-card .bg{
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .18;
  background-image: var(--bg, none);
  background-size: cover;
  background-position: center;
  filter: saturate(110%) contrast(105%);
  transform: scale(1.02);
  transition: transform .25s ease, opacity .25s ease;
}
.blog-scope .post-pagerX .pp-card:hover .bg{
  transform: scale(1.06);
  opacity: .22;
}

/* Jemný biely závoj pre čitateľnosť textu */
.blog-scope .post-pagerX .pp-card .overlay{
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(500px 140px at 10% 0%, rgba(255,255,255,.9), transparent),
    linear-gradient(180deg, rgba(255,255,255,.85) 0%, rgba(255,255,255,1) 60%);
  pointer-events: none;
}

/* Textiky */
.blog-scope .post-pagerX .kicker{
  font-size: .85rem;
  opacity: .75;
  margin: 0 0 .2rem;
}
.blog-scope .post-pagerX .title{
  font-weight: 800;
  line-height: 1.25;
  font-size: 1.05rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Okrúhla šípka */
.blog-scope .post-pagerX .arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  opacity: .7;
  background: #ffffffb3;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
@supports (backdrop-filter: blur(6px)) {
  .blog-scope .post-pagerX .arrow{ backdrop-filter: saturate(120%) blur(6px); }
}
.blog-scope .post-pagerX .prev .arrow{ left: .75rem; }
.blog-scope .post-pagerX .next .arrow{ right: .75rem; }

/* Zarovnanie na kraje */
.blog-scope .post-pagerX .prev{ margin-right: auto; }
.blog-scope .post-pagerX .next{
  margin-left: auto;
  text-align: right;
  padding-right: 3rem; /* miesto pre pravú šípku */
}

/* Mobile */
@media (max-width: 760px){
  .blog-scope .post-pagerX{
    flex-direction: column;
    align-items: stretch;
  }
  .blog-scope .post-pagerX .next{
    text-align: left;
    padding-right: 1.1rem;
  }
  .blog-scope .post-pagerX .next .arrow{
    left: .75rem; right: auto;
  }
}

/* Pre istotu skry starý pager, ak by ho ešte niečo renderovalo */
.blog-scope nav.post-pager a,
.blog-scope .navigation.post-navigation { display: none !important; }

/* 4-column grid na desktop, plynulý prechod na mobil */
.blog-scope .rec-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 1100px){
  .blog-scope .rec-grid{ grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 780px){
  .blog-scope .rec-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px){
  .blog-scope .rec-grid{ grid-template-columns: 1fr; }
}
