/*
Theme Name: Szivárvány Mesevilág
Author: Mesegyerekeknek.hu
Description: Színes, gyors, gyermekmesés WordPress téma, oldalsávval.
Version: 2.0.0
Requires PHP: 7.4
Text Domain: szivarvany-mesevilag
*/
:root{--purple:#6848c7;--ink:#303050}*{box-sizing:border-box}body{margin:0;background:#fffaf7;color:var(--ink);font:16px/1.65 system-ui,-apple-system,'Segoe UI',sans-serif}a{color:inherit;text-decoration:none}a:hover{text-decoration:underline}img{max-width:100%;height:auto}.wrap{max-width:1200px;margin:auto;padding:0 22px}.rainbow{height:9px;background:linear-gradient(90deg,#ff7bad 0 20%,#ffcd54 20% 40%,#55d6a6 40% 60%,#4dbaff 60% 80%,#ac80f6 80%)}header.site{background:#fff;box-shadow:0 4px 18px #56429c13}.header-inner{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;padding:20px 22px}.brand{font-size:26px;font-weight:900;color:#6546b7}.menu{list-style:none;display:flex;gap:20px;padding:0;margin:0;flex-wrap:wrap;font-weight:700}.searchform{display:flex;border-radius:30px;overflow:hidden;background:#f2efff}.searchform input{padding:11px;border:0;background:transparent;min-width:0}.searchform button{border:0;background:var(--purple);color:white;padding:10px 15px}.hero{background:linear-gradient(115deg,#ffe1ef,#e5e5ff 45%,#d8f7fc 75%,#fff0bd);padding:65px 0}.hero-inner{display:grid;grid-template-columns:1.3fr .7fr;align-items:center;gap:30px}.hero h1{font-size:clamp(36px,5vw,65px);line-height:1.1;color:#4b358e;margin:15px 0}.hero p{font-size:20px}.hero-art{font-size:110px;text-align:center;filter:drop-shadow(0 12px 10px #8d6f9d40)}.btn{display:inline-block;border-radius:40px;background:#ed529b;color:white;padding:12px 24px;font-weight:800}.section{padding:54px 0}.section.alt{background:#f0f9ff}.section.pink{background:#fff0f8}.section h2{font-size:clamp(27px,3vw,38px);color:#4f3a92;margin:0 0 22px}.grid{display:grid;gap:20px}.three{grid-template-columns:repeat(3,minmax(0,1fr))}.four{grid-template-columns:repeat(4,minmax(0,1fr))}.card,.category,.panel,.widget{background:white;border-radius:24px;box-shadow:0 7px 22px #39318a13;overflow:hidden}.card .thumb{aspect-ratio:16/10;background:linear-gradient(130deg,#ffe2f0,#d8e8ff);display:grid;place-items:center;font-size:60px}.card .thumb img{width:100%;height:100%;object-fit:cover}.card .inside{padding:18px}.card h3{font-size:19px;line-height:1.3;margin:8px 0}.card p{color:#626582;font-size:14px;margin:0}.pill{font-size:12px;font-weight:800;color:#6946b9;background:#ede4ff;border-radius:20px;padding:5px 10px}.category{padding:25px 10px;text-align:center;min-height:165px}.category span{display:block;font-size:48px}.category strong{display:block;font-size:18px}.category:nth-child(8n+1){background:#ffe0ed}.category:nth-child(8n+2){background:#fff0bc}.category:nth-child(8n+3){background:#d8f7e7}.category:nth-child(8n+4){background:#d8efff}.category:nth-child(8n+5){background:#ebdfff}.category:nth-child(8n+6){background:#ffe5d1}.category:nth-child(8n+7){background:#d8f6f4}.category:nth-child(8n+8){background:#f9dff7}.mosaic{display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:18px}.mosaic .card:first-child{grid-row:span 2}.mosaic .card:not(:first-child) .thumb{aspect-ratio:16/7}.mosaic .card:not(:first-child) p{display:none}.night{background:linear-gradient(120deg,#5840a1,#a36add);color:white;border-radius:30px;padding:35px 45px}.night h2{color:white}.layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:30px;align-items:start}.panel{padding:clamp(22px,4vw,45px)}.panel h1{font-size:clamp(30px,4vw,46px);color:#513d94;line-height:1.2}.featured{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:18px}.entry{font-size:18px;line-height:1.9;overflow-wrap:anywhere}.entry a{text-decoration:underline;color:#6144b6}.sidebar{display:grid;gap:20px}.widget{padding:22px}.widget h2{font-size:20px;color:#5a42a3;margin:0 0 14px}.widget ul{padding-left:20px}.recent{display:flex;align-items:center;gap:12px;border-bottom:1px solid #eee;padding:10px 0;font-size:14px;font-weight:700}.recent img,.recent .empty{width:64px;height:60px;object-fit:cover;border-radius:10px;flex-shrink:0}.recent .empty{display:grid;place-items:center;background:#eee6ff}.pagination{margin-top:28px}.pagination .page-numbers{display:inline-block;background:white;padding:8px 12px;margin:3px;border-radius:10px}.pagination .current{background:#6547bd;color:white}.breadcrumb{font-size:14px;margin:0 0 20px;color:#626582}.breadcrumb a{text-decoration:underline}footer.site{background:#493c85;color:white;padding:40px 0;margin-top:35px}.skip{position:absolute;left:-9999px}.skip:focus{left:10px;top:10px;background:white;padding:10px;z-index:10}.screen-reader-text{position:absolute;left:-9999px}.aligncenter{display:block;margin:auto}.wp-caption{max-width:100%}@media(max-width:900px){.four{grid-template-columns:repeat(2,1fr)}.layout{grid-template-columns:minmax(0,1fr) 250px}.mosaic{grid-template-columns:repeat(2,1fr)}.mosaic .card:first-child{grid-row:span 2}}@media(max-width:720px){.hero-inner,.layout{grid-template-columns:1fr}.hero-art{font-size:75px}.three{grid-template-columns:repeat(2,1fr)}.sidebar{margin-top:15px}.header-inner{justify-content:center}.searchform{width:100%}.searchform input{flex:1}.mosaic .card:first-child{grid-row:auto;grid-column:span 2}}@media(max-width:480px){.three{grid-template-columns:1fr}.mosaic{grid-template-columns:1fr}.mosaic .card:first-child{grid-column:auto}.section{padding:35px 0}.category{min-height:140px;padding:15px 7px}.category strong{font-size:15px}.category span{font-size:38px}}

/* V1.3 – kompakt nyitóblokk és üres hely nélküli mozaik */
.hero{padding:32px 0 36px}
.hero-inner{grid-template-columns:minmax(0,1fr) 260px;gap:24px}
.hero h1{font-size:clamp(32px,4vw,49px);line-height:1.12;margin:10px 0 12px;max-width:820px}
.hero p{font-size:17px;line-height:1.5;margin:0 0 18px;max-width:720px}
.hero-art{font-size:72px;line-height:1.25;white-space:nowrap}
.hero .btn{padding:10px 22px}
.mosaic{align-items:stretch;grid-template-columns:1.2fr 1fr 1fr;gap:16px}
.mosaic .card:first-child{display:flex;flex-direction:column;min-height:0}
.mosaic .card:first-child .thumb{flex:1 1 auto;min-height:240px;aspect-ratio:auto;position:relative}
.mosaic .card:first-child .thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.mosaic .card:first-child .inside{flex:0 0 auto}
.mosaic .card:first-child p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.mosaic .card:not(:first-child) .thumb{aspect-ratio:16/8}
.mosaic .card .inside{padding:14px 16px}
.mosaic .card h3{font-size:17px;margin:7px 0 3px}
@media(max-width:900px){.hero-inner{grid-template-columns:minmax(0,1fr) 190px}.hero-art{font-size:55px}.mosaic .card:first-child .thumb{min-height:210px}}
@media(max-width:720px){.hero{padding:28px 0}.hero-inner{grid-template-columns:1fr;gap:5px}.hero-art{font-size:44px;text-align:left}.hero h1{font-size:clamp(30px,7vw,40px)}.mosaic .card:first-child{grid-row:auto;grid-column:span 2}.mosaic .card:first-child .thumb{aspect-ratio:16/8;min-height:0;flex:none}.mosaic .card:first-child .thumb img{position:static}}
@media(max-width:480px){.hero-art{font-size:38px}.hero p{font-size:16px}.mosaic .card:first-child{grid-column:auto}.mosaic .card:first-child .thumb{aspect-ratio:16/10}}

/* V1.4 – két soros, kompakt fejléc; kereső a logó mellett */
.header-top{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:14px 0 10px}
.header-top .brand{flex:0 1 auto;font-size:clamp(21px,2.3vw,27px);line-height:1.2}
.header-search{flex:0 1 300px;min-width:190px}
.header-search .searchform{width:100%;border:1px solid #e9e1fa;box-shadow:0 2px 8px #4836a20b}
.header-search .searchform input{width:100%;padding:9px 14px;font-size:14px}
.header-search .searchform button{padding:8px 14px;cursor:pointer}
.header-nav{padding:0 0 13px}
.header-nav .menu{gap:9px 19px;align-items:center;font-size:14px;line-height:1.4}
.header-nav .menu a{display:inline-block;padding:5px 0}
.hero{padding:26px 0 28px}
.hero-inner{grid-template-columns:minmax(0,1fr) 195px;gap:18px}
.hero h1{font-size:clamp(30px,3.5vw,43px);line-height:1.12;margin:9px 0 10px;max-width:680px}
.hero p{font-size:16px;line-height:1.5;margin:0 0 14px}
.hero-art{font-size:57px;line-height:1.2}
.hero .btn{padding:9px 19px}
.section{padding:39px 0}
.mosaic .card:first-child .thumb{min-height:0;flex:1 1 auto}
@media(max-width:900px){.header-nav .menu{gap:6px 14px}.hero-inner{grid-template-columns:minmax(0,1fr) 150px}.hero-art{font-size:47px}}
@media(max-width:720px){.header-top{gap:10px;padding:12px 0 8px}.header-top .brand{font-size:20px}.header-search{flex:0 1 190px;min-width:0}.header-search .searchform input{padding:8px 9px}.header-search .searchform button{padding:8px 10px}.header-nav{padding-bottom:10px}.header-nav .menu{gap:5px 13px;font-size:13px}.hero{padding:23px 0}.hero-inner{grid-template-columns:1fr}.hero-art{display:none}.hero h1{font-size:clamp(29px,6vw,39px)}}
@media(max-width:480px){.header-top{align-items:stretch;flex-wrap:wrap}.header-top .brand{width:100%}.header-search{flex:1 1 100%;width:100%}.header-nav .menu{gap:4px 11px}.hero h1{font-size:30px}.section{padding:30px 0}}

/* V1.5 – kereső fix szélességgel; vízszintesen görgethető menü és mindig látható összes kategória */
.header-top{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:space-between!important;gap:16px!important}
.header-top .brand{width:auto!important;min-width:0;flex:1 1 auto}
.header-search{width:260px!important;min-width:160px!important;max-width:260px!important;flex:0 0 260px!important}
.header-search .searchform{width:100%!important;display:flex!important}
.header-search .searchform input{flex:1 1 auto!important;width:0!important;min-width:0!important}
.header-nav{display:flex;align-items:center;gap:14px;padding-bottom:12px;min-width:0}
.header-categories{display:flex;align-items:center;gap:17px;white-space:nowrap;overflow-x:auto;min-width:0;flex:1 1 auto;scrollbar-width:thin;padding:5px 0}
.header-categories a{font-size:14px;font-weight:750;white-space:nowrap;flex-shrink:0}
.all-categories-link{white-space:nowrap;flex:0 0 auto;color:#5937a7;background:#eee5ff;padding:8px 13px;border-radius:22px;font-size:13px;font-weight:800}
.category-directory-title{color:#56399b;font-size:clamp(27px,4vw,42px)}
.hero{padding:22px 0 25px!important}
.hero h1{font-size:clamp(29px,3.1vw,40px)!important}
.hero-art{font-size:49px!important}
/* A nagy mozaikkártya ne nyúljon le üres tartalommal. */
.mosaic{align-items:start!important}
.mosaic .card:first-child{grid-row:auto!important;display:block!important}
.mosaic .card:first-child .thumb{aspect-ratio:16/10!important;min-height:0!important;flex:none!important}
.mosaic .card:first-child .thumb img{position:static!important;width:100%!important;height:100%!important;object-fit:cover}
@media(max-width:800px){.header-search{width:210px!important;flex-basis:210px!important}.header-categories{gap:12px}}
@media(max-width:520px){.header-top{gap:8px!important}.header-top .brand{font-size:17px!important}.header-search{width:145px!important;min-width:110px!important;flex:0 0 145px!important}.header-search .searchform input{font-size:12px!important;padding:7px!important}.header-search .searchform button{padding:7px 9px!important}.all-categories-link{padding:7px 9px;font-size:12px}.header-categories a{font-size:13px}}

/* V1.6 – minden szekción belül azonos kártyák, 16:9 kép, nincs széteső mozaik */
.story-grid{align-items:stretch;grid-auto-flow:row}
.story-grid .card{display:flex;flex-direction:column;height:100%;min-width:0}
.story-grid .card .thumb{aspect-ratio:16/9!important;min-height:0!important;display:block;overflow:hidden;position:relative}
.story-grid .card .thumb img{display:block;width:100%!important;height:100%!important;object-fit:cover;position:static!important}
.story-grid .card .thumb:has(span){display:grid;place-items:center}
.story-grid .card .inside{padding:14px 16px 18px;flex:1;display:flex;flex-direction:column;align-items:flex-start}
.story-grid .card h3{font-size:clamp(15px,1.5vw,18px);line-height:1.35;margin:10px 0 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.story-grid .card p{display:none}
.story-grid .card .pill{font-size:11px}
@media(max-width:900px){.story-grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.story-grid.three,.story-grid.four{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.story-grid .card .inside{padding:11px}.story-grid .card h3{font-size:14px}}
@media(max-width:380px){.story-grid.three,.story-grid.four{grid-template-columns:1fr}}

/* V1.7: éjkék–világoskék Esti mesekuckó, könnyű dekoráció */
.night{background:linear-gradient(112deg,#19559f 0%,#287ec6 52%,#83d2f5 100%);display:grid;grid-template-columns:minmax(0,1fr) 240px;align-items:center;gap:18px;min-height:225px;position:relative;overflow:hidden;padding:28px 40px;isolation:isolate}
.night h2{color:#fff;margin:0 0 12px}
.night p{margin:0 0 18px;max-width:640px}
.night-copy{position:relative;z-index:2}
.night-scene{position:relative;height:178px;width:230px;justify-self:center;filter:drop-shadow(0 7px 7px #124d8733)}
.night-scene span{position:absolute;line-height:1;display:block}
.night-moon{font-size:88px;top:7px;right:38px;transform:rotate(-12deg)}
.night-bear{font-size:84px;bottom:0;left:46px;transform:rotate(-7deg)}
.night-cloud{font-size:70px;bottom:5px;right:4px;opacity:.95}
.night-star{color:#ffed91;text-shadow:0 0 13px #fff5c0;font-size:28px}
.night-scene .star-a{top:3px;left:16px}.night-scene .star-b{top:47px;left:2px;font-size:20px}.night-scene .star-c{top:24px;right:5px;font-size:24px}.night-scene .star-d{bottom:20px;left:13px;font-size:18px}
@media(max-width:720px){.night{grid-template-columns:minmax(0,1fr) 90px;padding:24px;gap:6px;min-height:0}.night-scene{width:90px;height:125px}.night-moon{font-size:55px;top:0;right:0}.night-bear{font-size:48px;bottom:0;left:0}.night-cloud{font-size:42px;bottom:0;right:0}.night-scene .star-a{top:0;left:0;font-size:15px}.night-scene .star-b,.night-scene .star-c,.night-scene .star-d{display:none}}
@media(max-width:480px){.night{grid-template-columns:1fr;padding:24px}.night-scene{display:none}.night h2{font-size:27px}}

/* V1.8 – éjszakai panel: biztos kétoszlopos elrendezés, felülírások ellen */
.section .night{background:linear-gradient(112deg,#19559f 0%,#287ec6 52%,#83d2f5 100%);display:grid;grid-template-columns:minmax(0,1fr) 240px;align-items:center;column-gap:22px;min-height:225px}
.section .night .night-copy{grid-column:1;grid-row:1}
.section .night .night-scene{grid-column:2;grid-row:1;display:block;position:relative;width:230px;height:178px;margin:0;justify-self:center}
.section .night .night-scene span{position:absolute;display:block}
@media(max-width:720px){.section .night{grid-template-columns:minmax(0,1fr) 95px}.section .night .night-scene{width:95px;height:125px}}
@media(max-width:480px){.section .night{grid-template-columns:1fr}.section .night .night-scene{display:none}}

/* V1.9 – oldalsáv, görgetés és vissza a tetejére */
html{overflow-y:auto;scroll-behavior:smooth}body{overflow-y:visible;min-height:100vh}
body.category,body.archive,body.single{height:auto;max-height:none}
.mese-back-top{position:fixed;right:22px;bottom:22px;width:46px;height:46px;border:0;border-radius:50%;background:#287ec6;color:white;font-size:28px;font-weight:700;box-shadow:0 5px 18px #123e6a55;z-index:9998;cursor:pointer;opacity:0;visibility:hidden;transform:translateY(8px);transition:opacity .2s,transform .2s,visibility .2s}
.mese-back-top.visible{opacity:1;visibility:visible;transform:translateY(0)}.mese-back-top:focus-visible{outline:3px solid #ffcf5e;outline-offset:3px}
@media(max-width:700px){.mese-back-top{right:14px;bottom:75px;width:42px;height:42px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.mese-back-top{transition:none}}

/* V2.0: archívumok és oldalsáv stabil, korlátozott tipográfiája */
.layout > *{min-width:0}
.layout > .sidebar{width:100%;min-width:0;max-width:100%;align-self:start}
.sidebar .widget{min-width:0;max-width:100%;overflow:hidden;padding:20px}
.sidebar .widget h2,.sidebar .widget h3{font-size:20px!important;line-height:1.35!important;margin:0 0 12px!important;overflow-wrap:anywhere}
.sidebar .widget .recent{display:flex!important;align-items:center!important;gap:12px!important;padding:10px 0!important;font-size:15px!important;line-height:1.4!important;font-weight:650!important;min-width:0;max-width:100%;text-align:left!important;white-space:normal!important;overflow:hidden}
.sidebar .widget .recent > img,.sidebar .widget .recent > .empty{width:72px!important;height:72px!important;min-width:72px!important;max-width:72px!important;flex:0 0 72px!important;object-fit:cover}
.sidebar .widget .recent > span:not(.empty){display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden!important;min-width:0!important;flex:1 1 0!important;font-size:15px!important;line-height:1.4!important;font-weight:650!important;overflow-wrap:anywhere!important;word-break:normal!important;text-align:left!important;white-space:normal!important}
.sidebar .widget ul,.sidebar .widget li,.sidebar .widget li a{font-size:15px!important;line-height:1.55!important;overflow-wrap:anywhere}
.sidebar .widget .tagcloud a{font-size:clamp(12px,1vw,17px)!important;line-height:1.8!important}
/* Lapozó: a pontok és oldalszámok is egységesek */
.pagination{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:8px;margin:30px 0 0}
.pagination .page-numbers{display:inline-flex!important;justify-content:center;align-items:center;min-width:40px;height:40px;max-height:40px;box-sizing:border-box;padding:0 11px!important;margin:0!important;font-size:15px!important;line-height:1!important;border-radius:10px;vertical-align:middle}
.pagination .page-numbers.dots{background:transparent;box-shadow:none;min-width:32px;padding:0 4px!important}
.pagination .page-numbers.prev,.pagination .page-numbers.next{width:auto;white-space:nowrap}
/* Hosszú kategórialeírás és tartalom ne növelhesse a rács szélességét */
.layout > div:first-child{min-width:0;overflow-wrap:anywhere}
.layout > div:first-child .grid{min-width:0}
@media(max-width:720px){.layout > .sidebar{max-width:100%}.pagination{gap:5px}.pagination .page-numbers{min-width:36px;height:36px;max-height:36px;font-size:14px!important}}
