/*
Theme Name: KWIZ
Theme URI: https://kwiz.com.pl/
Author: KWIZ
Description: Nowoczesny, kolorowy i responsywny motyw WordPress dla platformy quizowej KWIZ.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: kwiz
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root{
  --kwiz-bg:#f7f7ff;
  --kwiz-surface:#ffffff;
  --kwiz-text:#25243b;
  --kwiz-muted:#6f7187;
  --kwiz-purple:#6c4cff;
  --kwiz-purple-dark:#5236df;
  --kwiz-cyan:#20c9d8;
  --kwiz-yellow:#ffd84d;
  --kwiz-pink:#ff5d9e;
  --kwiz-green:#35c97a;
  --kwiz-blue:#3f8cff;
  --kwiz-red:#ff5f57;
  --kwiz-radius:24px;
  --kwiz-shadow:0 18px 50px rgba(54,45,110,.12);
  --kwiz-shadow-sm:0 8px 24px rgba(54,45,110,.10);
  --kwiz-max:1180px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color:var(--kwiz-text);
  background:
    radial-gradient(circle at 10% 10%, rgba(108,76,255,.10), transparent 26%),
    radial-gradient(circle at 90% 10%, rgba(32,201,216,.10), transparent 24%),
    var(--kwiz-bg);
  line-height:1.6;
}
a{color:var(--kwiz-purple);text-decoration:none}
a:hover{color:var(--kwiz-purple-dark)}
img{max-width:100%;height:auto}
.container{width:min(calc(100% - 32px),var(--kwiz-max));margin-inline:auto}

.site-header{
  position:sticky;top:0;z-index:999;
  background:rgba(247,247,255,.86);
  backdrop-filter:blur(16px);
  border-bottom:1px solid rgba(108,76,255,.09);
}
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:78px}
.site-branding{display:flex;align-items:center;gap:12px}
.custom-logo{max-height:48px;width:auto}
.site-title{
  font-size:1.9rem;font-weight:900;letter-spacing:-.04em;color:var(--kwiz-text);
  display:inline-flex;align-items:center;gap:8px;
}
.site-title::before{
  content:"K";display:grid;place-items:center;width:42px;height:42px;border-radius:14px;
  color:#fff;background:linear-gradient(135deg,var(--kwiz-purple),var(--kwiz-pink));
  box-shadow:var(--kwiz-shadow-sm);font-size:1.35rem
}
.site-description{display:none}
.main-navigation ul{display:flex;gap:8px;list-style:none;margin:0;padding:0;align-items:center}
.main-navigation a{
  display:block;padding:10px 13px;border-radius:12px;color:var(--kwiz-text);font-weight:700;font-size:.96rem
}
.main-navigation a:hover,.main-navigation .current-menu-item>a{background:#fff;color:var(--kwiz-purple)}
.menu-toggle{display:none;border:0;background:#fff;padding:10px 12px;border-radius:12px;font-weight:800;box-shadow:var(--kwiz-shadow-sm)}

.header-actions{display:flex;gap:10px;align-items:center}
.btn,.wp-block-button__link,button,input[type="submit"]{
  border:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:13px 18px;border-radius:14px;font-weight:800;font-size:1rem;
  transition:.2s ease;box-shadow:none
}
.btn:hover,.wp-block-button__link:hover,button:hover,input[type="submit"]:hover{transform:translateY(-2px)}
.btn-primary,.wp-block-button__link,input[type="submit"]{background:var(--kwiz-purple);color:#fff}
.btn-primary:hover,.wp-block-button__link:hover,input[type="submit"]:hover{background:var(--kwiz-purple-dark);color:#fff}
.btn-light{background:#fff;color:var(--kwiz-text);box-shadow:var(--kwiz-shadow-sm)}
.btn-accent{background:var(--kwiz-yellow);color:#3c3200}

.hero{padding:76px 0 46px}
.hero-grid{display:grid;grid-template-columns:1.08fr .92fr;align-items:center;gap:54px}
.eyebrow{
  display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;
  background:#fff;color:var(--kwiz-purple);font-weight:800;box-shadow:var(--kwiz-shadow-sm);font-size:.9rem
}
.hero h1{
  font-size:clamp(2.6rem,6vw,5.25rem);line-height:.98;letter-spacing:-.06em;margin:20px 0 20px;
  max-width:850px
}
.hero h1 .accent{background:linear-gradient(135deg,var(--kwiz-purple),var(--kwiz-pink));-webkit-background-clip:text;background-clip:text;color:transparent}
.hero p{font-size:1.17rem;color:var(--kwiz-muted);max-width:680px;margin:0 0 26px}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:26px}
.join-card{
  background:#fff;padding:18px;border-radius:20px;box-shadow:var(--kwiz-shadow);
  display:flex;gap:10px;max-width:560px
}
.join-card input{
  min-width:0;flex:1;padding:14px 16px;border-radius:13px;border:2px solid #eceaf7;font-size:1rem;font-weight:700;outline:none
}
.join-card input:focus{border-color:var(--kwiz-purple)}
.hero-visual{
  position:relative;min-height:430px;display:grid;place-items:center
}
.quiz-mockup{
  width:min(100%,470px);background:#fff;border-radius:32px;padding:24px;
  box-shadow:0 30px 80px rgba(67,45,160,.18);transform:rotate(1deg)
}
.mock-top{display:flex;justify-content:space-between;gap:16px;margin-bottom:18px}
.pill{padding:7px 10px;border-radius:999px;background:#f0edff;color:var(--kwiz-purple);font-weight:800;font-size:.8rem}
.timer{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:var(--kwiz-yellow);font-weight:900}
.question-box{background:#f7f6ff;border-radius:20px;padding:22px;margin-bottom:14px}
.question-box strong{display:block;font-size:1.18rem}
.answers{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.answer{min-height:86px;border-radius:18px;padding:16px;color:#fff;font-weight:900;display:flex;align-items:center}
.answer:nth-child(1){background:var(--kwiz-blue)}
.answer:nth-child(2){background:var(--kwiz-pink)}
.answer:nth-child(3){background:var(--kwiz-green)}
.answer:nth-child(4){background:var(--kwiz-yellow);color:#403700}
.float-badge{
  position:absolute;background:#fff;border-radius:18px;padding:13px 16px;box-shadow:var(--kwiz-shadow-sm);font-weight:900
}
.float-1{left:0;top:16%;transform:rotate(-6deg)}
.float-2{right:0;bottom:15%;transform:rotate(7deg)}
.float-3{right:6%;top:4%;transform:rotate(5deg)}

.section{padding:44px 0}
.section-head{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:22px}
.section-head h2{font-size:clamp(1.8rem,3vw,2.6rem);letter-spacing:-.04em;margin:0}
.section-head p{color:var(--kwiz-muted);margin:0;max-width:620px}

.category-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.category-card{
  position:relative;overflow:hidden;background:#fff;border-radius:22px;padding:24px;min-height:150px;
  box-shadow:var(--kwiz-shadow-sm);transition:.2s ease;color:var(--kwiz-text)
}
.category-card:hover{transform:translateY(-5px);box-shadow:var(--kwiz-shadow)}
.category-icon{font-size:2rem;margin-bottom:16px}
.category-card h3{margin:0;font-size:1.15rem}
.category-card p{margin:4px 0 0;color:var(--kwiz-muted);font-size:.92rem}
.category-card::after{
  content:"";position:absolute;width:100px;height:100px;border-radius:50%;right:-30px;bottom:-34px;opacity:.15;background:currentColor
}
.category-card:nth-child(4n+1){color:var(--kwiz-purple)}
.category-card:nth-child(4n+2){color:var(--kwiz-cyan)}
.category-card:nth-child(4n+3){color:var(--kwiz-pink)}
.category-card:nth-child(4n+4){color:#d99a00}

.posts-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.post-card{
  background:#fff;border-radius:24px;overflow:hidden;box-shadow:var(--kwiz-shadow-sm);transition:.2s ease
}
.post-card:hover{transform:translateY(-4px)}
.post-card-media{aspect-ratio:16/9;background:linear-gradient(135deg,#e5e1ff,#dcfbff);overflow:hidden}
.post-card-media img{width:100%;height:100%;object-fit:cover}
.post-card-body{padding:20px}
.post-card .meta{font-size:.84rem;color:var(--kwiz-muted);font-weight:700}
.post-card h3{font-size:1.25rem;line-height:1.25;margin:9px 0}
.post-card p{margin:0;color:var(--kwiz-muted)}
.post-card .read-more{display:inline-flex;margin-top:14px;font-weight:800}

.content-shell{
  width:min(calc(100% - 32px),900px);margin:44px auto;background:#fff;padding:clamp(24px,5vw,56px);
  border-radius:28px;box-shadow:var(--kwiz-shadow-sm)
}
.entry-title{font-size:clamp(2rem,4vw,3.4rem);letter-spacing:-.04em;line-height:1.08;margin-top:0}
.entry-content{font-size:1.04rem}
.entry-content h2,.entry-content h3{letter-spacing:-.025em}
.entry-content table{width:100%;border-collapse:collapse}
.entry-content th,.entry-content td{padding:12px;border-bottom:1px solid #eceaf4;text-align:left}
.entry-content blockquote{margin:24px 0;padding:18px 22px;border-left:5px solid var(--kwiz-purple);background:#f7f6ff;border-radius:14px}
.entry-content pre{overflow:auto;padding:18px;border-radius:16px;background:#242238;color:#fff}
.entry-content code{font-family:"SFMono-Regular",Consolas,monospace}
.entry-content input,.entry-content select,.entry-content textarea,
.widget input,.widget select,.widget textarea{
  width:100%;padding:13px 15px;border:2px solid #eceaf4;border-radius:13px;background:#fff;color:var(--kwiz-text)
}

.quiz-ui,.kwiz-card,.quiz-card,.question,.answer-option{
  border-radius:18px
}
.quiz-ui,.kwiz-card,.quiz-card,.question{
  background:#fff;box-shadow:var(--kwiz-shadow-sm)
}
.answer-option,.quiz-answer,.answer-button{
  transition:.18s ease;border-radius:16px
}
.answer-option:hover,.quiz-answer:hover,.answer-button:hover{transform:translateY(-2px)}

.pagination,.nav-links{display:flex;justify-content:center;gap:8px;margin:32px 0}
.page-numbers{padding:9px 12px;border-radius:10px;background:#fff;box-shadow:var(--kwiz-shadow-sm)}
.page-numbers.current{background:var(--kwiz-purple);color:#fff}

.site-footer{padding:48px 0 24px;margin-top:40px}
.footer-panel{
  background:#242238;color:#fff;border-radius:30px;padding:36px;
  display:grid;grid-template-columns:1.1fr 1.9fr;gap:30px
}
.footer-panel a{color:#fff}
.footer-brand{font-size:1.8rem;font-weight:900}
.footer-brand p{color:#c9c7da;font-weight:500;font-size:.95rem;max-width:360px}
.footer-widgets{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.widget-title{font-size:1rem;margin-top:0}
.widget ul{list-style:none;padding:0;margin:0}
.widget li{margin:7px 0;color:#d9d7e6}
.footer-bottom{display:flex;justify-content:space-between;gap:20px;padding:16px 4px 0;color:var(--kwiz-muted);font-size:.88rem}

.screen-reader-text{position:absolute!important;height:1px;width:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
.alignwide{max-width:1100px;margin-left:auto;margin-right:auto}
.alignfull{width:100vw;margin-left:calc(50% - 50vw)}
.wp-caption{max-width:100%}
.gallery{display:grid;gap:12px}
.sticky{outline:2px solid rgba(108,76,255,.18)}
.bypostauthor{font-weight:inherit}

@media (max-width:960px){
  .hero-grid{grid-template-columns:1fr;gap:30px}
  .hero-visual{min-height:390px}
  .category-grid{grid-template-columns:repeat(2,1fr)}
  .posts-grid{grid-template-columns:repeat(2,1fr)}
  .footer-panel{grid-template-columns:1fr}
  .main-navigation{position:absolute;left:16px;right:16px;top:72px;display:none;background:#fff;padding:12px;border-radius:18px;box-shadow:var(--kwiz-shadow)}
  .main-navigation.is-open{display:block}
  .main-navigation ul{display:block}
  .menu-toggle{display:inline-flex}
  .header-actions .btn-light{display:none}
}
@media (max-width:640px){
  .header-inner{min-height:68px}
  .site-title{font-size:1.45rem}
  .site-title::before{width:36px;height:36px}
  .hero{padding-top:44px}
  .hero h1{font-size:2.7rem}
  .hero-visual{min-height:330px}
  .float-badge{font-size:.78rem;padding:10px 12px}
  .join-card{flex-direction:column}
  .category-grid,.posts-grid{grid-template-columns:1fr}
  .answers{grid-template-columns:1fr}
  .quiz-mockup{padding:17px}
  .footer-widgets{grid-template-columns:1fr}
  .footer-bottom{flex-direction:column}
  .header-actions .btn-primary{padding:10px 12px;font-size:.9rem}
}
