/* Kidibot VIP Readers — frontend, design standalone (independent de tema site-ului) */

.kvr-page {
	--kvr-bg: #0f0e1a;
	--kvr-bg-alt: #171630;
	--kvr-purple: #6c5ce7;
	--kvr-teal: #00d2d3;
	--kvr-pink: #ff6b9d;
	--kvr-yellow: #ffc93c;
	--kvr-text: #f3f1ff;
	--kvr-text-dim: #b7b3d9;
	margin: 0;
	padding: 0;
	background: var(--kvr-bg);
	color: var(--kvr-text);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.kvr-page *, .kvr-page *::before, .kvr-page *::after {
	box-sizing: border-box;
}

.kvr-page img { max-width: 100%; }
.kvr-page a { color: inherit; }

/* ---------- HERO (compact) ---------- */
.kvr-hero {
	position: relative;
	overflow: hidden;
	padding: 28px 20px 20px;
	text-align: center;
	background: radial-gradient(circle at 20% 20%, #241f4a 0%, var(--kvr-bg) 60%);
}

.kvr-hero__blob {
	position: absolute;
	border-radius: 50%;
	filter: blur(40px);
	opacity: 0.4;
	z-index: 0;
	animation: kvr-float 12s ease-in-out infinite;
}
.kvr-hero__blob--1 { width: 160px; height: 160px; background: var(--kvr-purple); top: -60px; left: -40px; }
.kvr-hero__blob--2 { width: 130px; height: 130px; background: var(--kvr-teal); bottom: -50px; right: -30px; animation-delay: 2s; }
.kvr-hero__blob--3 { width: 100px; height: 100px; background: var(--kvr-pink); top: 20%; left: 55%; animation-delay: 4s; }

@keyframes kvr-float {
	0%, 100% { transform: translate(0, 0) scale(1); }
	50% { transform: translate(20px, -30px) scale(1.08); }
}

.kvr-hero__inner {
	position: relative;
	z-index: 1;
	max-width: 780px;
	margin: 0 auto;
}

.kvr-headline {
	font-family: 'Fredoka', 'Inter', sans-serif;
	font-weight: 700;
	font-size: clamp(1.35rem, 2.6vw, 2rem);
	margin: 0 0 6px;
	background: linear-gradient(90deg, var(--kvr-teal), var(--kvr-purple) 55%, var(--kvr-pink));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	line-height: 1.2;
}

.kvr-subheadline {
	font-size: clamp(0.85rem, 1.4vw, 0.98rem);
	color: var(--kvr-text-dim);
	margin: 0 auto;
	max-width: 560px;
}

/* ---------- FILTERS ---------- */
.kvr-filters-bar {
	position: sticky;
	top: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 20px;
	background: rgba(15, 14, 26, 0.85);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.kvr-filters-logo {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	line-height: 0;
}

.kvr-filters-logo__img {
	height: 30px;
	width: auto;
	max-width: 110px;
	object-fit: contain;
	border-radius: 6px;
}

.kvr-filters-scroller {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 6px;
}

.kvr-filters-arrow,
.kvr-filters-toggle {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.06);
	color: var(--kvr-text);
	font-size: 1.05rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}

.kvr-filters-arrow:hover,
.kvr-filters-toggle:hover {
	background: rgba(255, 255, 255, 0.14);
}

.kvr-filters-arrow:active,
.kvr-filters-toggle:active {
	transform: scale(0.92);
}

.kvr-filters-arrow:disabled {
	opacity: 0.3;
	cursor: default;
}

.kvr-filters-toggle {
	font-size: 0.8rem;
}

.kvr-filters-toggle[aria-expanded="true"] {
	background: linear-gradient(90deg, var(--kvr-purple), var(--kvr-teal));
	border-color: transparent;
}

.kvr-filters {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	flex: 1 1 auto;
	min-width: 0;
	scroll-behavior: smooth;
	scrollbar-width: thin;
}

.kvr-filters::-webkit-scrollbar { height: 6px; }
.kvr-filters::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

/* ---------- PANOU "TOATE CATEGORIILE" ----------
   Suprapus (overlay) peste pagină, cu scroll propriu și buton „Închide" mereu vizibil —
   spre deosebire de a desface banda pe loc, asta rămâne accesibilă și pe ecrane mici
   (nu poate crește mai înalt decât ecranul, blocând accesul la restul/la închidere). */
.kvr-filters-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(10, 9, 20, 0.6);
	z-index: 29;
}

.kvr-filters-panel {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 30;
	max-height: min(75vh, 560px);
	display: flex;
	flex-direction: column;
	background: var(--kvr-bg-alt);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
	border-radius: 0 0 20px 20px;
	overflow: hidden;
}

/* Regula de mai sus setează "display: flex" cu aceeași specificitate ca stilul
   implicit al browserului pentru atributul [hidden], dar vine după el în cascadă —
   deci l-ar suprascrie și panoul ar rămâne mereu vizibil. Regula explicită de mai
   jos, mai specifică, restabilește comportamentul corect al lui [hidden]. */
.kvr-filters-panel[hidden] {
	display: none;
}

.kvr-filters-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: 0 0 auto;
	padding: 16px 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.kvr-filters-panel__title {
	font-family: 'Fredoka', sans-serif;
	font-weight: 600;
	font-size: 0.85rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--kvr-text-dim);
}

.kvr-filters-panel__close {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.06);
	color: var(--kvr-text);
	font-size: 1rem;
	cursor: pointer;
	transition: background 0.2s ease;
}
.kvr-filters-panel__close:hover { background: rgba(255, 255, 255, 0.14); }

.kvr-filters-panel__list {
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	gap: 10px;
	padding: 16px 20px 22px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

body.kvr-body-lock {
	overflow: hidden;
}

@media (max-width: 640px) {
	.kvr-filters-bar { padding: 10px 14px; gap: 8px; }
	.kvr-filters-logo__img { height: 24px; max-width: 80px; }
}

.kvr-filter {
	flex: 0 0 auto;
	font-family: 'Fredoka', sans-serif;
	font-weight: 600;
	font-size: 0.85rem;
	letter-spacing: 0.03em;
	color: var(--kvr-text-dim);
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 999px;
	padding: 10px 20px;
	cursor: pointer;
	transition: background 0.25s ease, color 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
	white-space: nowrap;
}

.kvr-filter:hover {
	background: rgba(255, 255, 255, 0.12);
	color: var(--kvr-text);
}

.kvr-filter:active {
	transform: scale(0.95);
}

.kvr-filter.is-active {
	background: linear-gradient(90deg, var(--kvr-purple), var(--kvr-teal));
	color: #fff;
	border-color: transparent;
	box-shadow: 0 4px 16px rgba(108, 92, 231, 0.4);
}

/* ---------- MOZAIC (masonry real, poziționat prin JS: dimensiuni variabile,
   fotografiile își păstrează proporția originală, fără nicio decupare) ---------- */
.kvr-grid {
	position: relative;
	padding: 28px 24px 16px;
	width: 100%;
	transition: opacity 0.18s ease;
}

/* Variantă de bază (fără JS / înainte de calcularea layout-ului): plăcile curg
   normal, în coloană unică, ca pagina să rămână utilizabilă și fără JavaScript. */
.kvr-tile {
	position: relative;
	display: block;
	width: 100%;
	max-width: 420px;
	margin: 0 auto 16px;
}

/* Odată ce JS a calculat mozaicul, adaugă această clasă pe container:
   plăcile devin poziționate absolut, cu lățimi variabile (vezi frontend.js). */
.kvr-grid.kvr-grid--positioned .kvr-tile {
	position: absolute;
	top: 0;
	left: 0;
	max-width: none;
	margin: 0;
	transition: top 0.35s ease, left 0.35s ease, width 0.35s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.kvr-grid--fade {
	opacity: 0;
}

.kvr-empty {
	text-align: center;
	color: var(--kvr-text-dim);
	padding: 60px 0;
	font-size: 1.05rem;
}

.kvr-tile {
	border-radius: 16px;
	overflow: hidden;
	cursor: pointer;
	background: var(--kvr-bg-alt);
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
	outline: none;
	text-decoration: none;
}

.kvr-tile:hover,
.kvr-tile:focus-visible {
	transform: translateY(-5px);
	box-shadow: 0 16px 34px rgba(108, 92, 231, 0.35);
	z-index: 3;
}

/* Intrare animată (folosită la filtrare și "încarcă mai mulți") */
@keyframes kvr-pop-in {
	from { opacity: 0; transform: translateY(16px) scale(0.96); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}
.kvr-tile--enter {
	animation: kvr-pop-in 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.kvr-tile--priority {
	box-shadow: 0 0 0 2px var(--kvr-yellow), 0 4px 18px rgba(0, 0, 0, 0.35);
}
.kvr-tile--priority:hover,
.kvr-tile--priority:focus-visible {
	box-shadow: 0 0 0 2px var(--kvr-yellow), 0 16px 34px rgba(108, 92, 231, 0.35);
}

.kvr-tile__star {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	background: var(--kvr-yellow);
	color: #4a3600;
	font-size: 0.68rem;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 999px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.kvr-tile__img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.5s ease;
}

.kvr-tile:hover .kvr-tile__img,
.kvr-tile:focus-visible .kvr-tile__img {
	transform: scale(1.05);
}

.kvr-tile__label {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 12px 12px 10px;
	background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
	transition: opacity 0.25s ease;
}

.kvr-tile__label h3 {
	margin: 0;
	font-family: 'Fredoka', sans-serif;
	font-size: 0.95rem;
	font-weight: 600;
	color: #fff;
	text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.kvr-tile__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 4px;
	padding: 16px;
	background: linear-gradient(180deg, rgba(15,14,26,0.1) 0%, rgba(15,14,26,0.6) 40%, rgba(15,14,26,0.97) 100%);
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.3s ease, transform 0.3s ease;
	overflow: hidden;
}

.kvr-tile:hover .kvr-tile__overlay,
.kvr-tile:focus-visible .kvr-tile__overlay {
	opacity: 1;
	transform: translateY(0);
}

.kvr-tile:hover .kvr-tile__label,
.kvr-tile:focus-visible .kvr-tile__label {
	opacity: 0;
}

.kvr-tile__cats {
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--kvr-teal);
}

.kvr-tile__name {
	margin: 2px 0 4px;
	font-family: 'Fredoka', sans-serif;
	font-size: 1rem;
	font-weight: 600;
	color: #fff;
}

.kvr-tile__who {
	margin: 0 0 6px;
	font-size: 0.76rem;
	color: var(--kvr-yellow);
	font-weight: 500;
}

.kvr-tile__desc {
	margin: 0 0 6px;
	font-size: 0.78rem;
	color: var(--kvr-text-dim);
	display: -webkit-box;
	-webkit-line-clamp: 6;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.kvr-tile__more {
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--kvr-teal);
}

/* ---------- LOAD MORE ---------- */
.kvr-loadmore-wrap {
	text-align: center;
	padding: 24px;
}

.kvr-loadmore {
	font-family: 'Fredoka', sans-serif;
	font-weight: 600;
	font-size: 0.95rem;
	color: #fff;
	background: linear-gradient(90deg, var(--kvr-purple), var(--kvr-pink));
	border: none;
	border-radius: 999px;
	padding: 14px 32px;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(255, 107, 157, 0.3);
	transition: transform 0.2s ease;
}
.kvr-loadmore:hover { transform: translateY(-2px); }

.kvr-loading { color: var(--kvr-text-dim); font-size: 0.9rem; }

/* ---------- FOOTER ---------- */
.kvr-footer {
	text-align: center;
	padding: 30px;
	color: var(--kvr-text-dim);
	font-size: 0.8rem;
	border-top: 1px solid rgba(255,255,255,0.06);
}

@media (max-width: 600px) {
	.kvr-grid { padding: 16px 12px; }
}

/* =========================================================
   PAGINA SINGLE (un VIP) — același design standalone
   ========================================================= */

.kvr-single-topbar {
	max-width: 1000px;
	margin: 0 auto;
	padding: 20px 24px 0;
}

.kvr-back-link {
	display: inline-block;
	color: var(--kvr-teal);
	font-weight: 600;
	font-size: 0.9rem;
	text-decoration: none;
}
.kvr-back-link:hover { text-decoration: underline; }

.kvr-single {
	max-width: 1000px;
	margin: 0 auto;
	padding: 24px 24px 60px;
	display: grid;
	grid-template-columns: minmax(240px, 380px) 1fr;
	gap: 32px;
	align-items: start;
}

@media (max-width: 760px) {
	.kvr-single { grid-template-columns: 1fr; padding: 20px 16px 40px; }
}

.kvr-single__media {
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
	background: var(--kvr-bg-alt);
	position: sticky;
	top: 20px;
}

@media (max-width: 760px) {
	.kvr-single__media { position: static; }
}

.kvr-single__img {
	display: block;
	width: 100%;
	height: auto; /* respectă orientarea/dimensiunea reală a fotografiei, fără decupare */
}

.kvr-single__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}

.kvr-cat-badge {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	background: rgba(0, 210, 211, 0.15);
	color: var(--kvr-teal);
	border: 1px solid rgba(0, 210, 211, 0.35);
	padding: 5px 12px;
	border-radius: 999px;
}

.kvr-single__name {
	font-family: 'Fredoka', sans-serif;
	font-weight: 700;
	font-size: clamp(1.6rem, 3.5vw, 2.4rem);
	margin: 0 0 8px;
	color: #fff;
}

.kvr-single__who {
	color: var(--kvr-yellow);
	font-weight: 600;
	margin: 0 0 20px;
	font-size: 1.05rem;
}

.kvr-single__desc {
	font-size: 1.05rem;
	line-height: 1.75;
	color: var(--kvr-text);
}
.kvr-single__desc p { margin: 0 0 1em; }
.kvr-single__desc--empty { color: var(--kvr-text-dim); font-style: italic; }

/* =========================================================
   VIRALIZARE — CTA distribuire, dovadă socială, donații
   ========================================================= */

.kvr-cta {
	margin-top: 28px;
	padding: 22px 24px;
	border-radius: 18px;
	background: linear-gradient(135deg, rgba(108, 92, 231, 0.16), rgba(0, 210, 211, 0.1));
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.kvr-cta__text {
	font-size: 1.02rem;
	line-height: 1.6;
	color: var(--kvr-text);
	margin-bottom: 14px;
}
.kvr-cta__text strong { color: #fff; }

.kvr-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 12px;
}

.kvr-share-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-family: 'Fredoka', sans-serif;
	font-weight: 600;
	font-size: 0.85rem;
	color: #fff;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 999px;
	padding: 10px 18px;
	cursor: pointer;
	text-decoration: none;
	transition: transform 0.15s ease, background 0.2s ease;
}
.kvr-share-btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.18); }
.kvr-share-btn:active { transform: translateY(0) scale(0.97); }

.kvr-share-btn--copy { background: rgba(0, 210, 211, 0.22); border-color: rgba(0, 210, 211, 0.4); }
.kvr-share-btn--fb   { background: rgba(59, 89, 152, 0.35); border-color: rgba(59, 89, 152, 0.55); }
.kvr-share-btn--wa   { background: rgba(37, 211, 102, 0.25); border-color: rgba(37, 211, 102, 0.45); }

.kvr-share-btn--copied { background: rgba(42, 140, 52, 0.4) !important; border-color: rgba(42, 140, 52, 0.6) !important; }

.kvr-cta__proof {
	margin: 0;
	font-size: 0.85rem;
	color: var(--kvr-text-dim);
}
.kvr-share-counter {
	color: var(--kvr-yellow);
	font-weight: 700;
}

/* Mica animație "inimioară" la click pe un buton de distribuire — plutește în sus
   și dispare, drept mulțumire vizuală instantanee. */
.kvr-heart-pop {
	position: fixed;
	z-index: 999;
	font-size: 1.5rem;
	transform: translate(-50%, 0);
	pointer-events: none;
	animation: kvr-heart-float 0.9s ease-out forwards;
}
@keyframes kvr-heart-float {
	0%   { opacity: 0; transform: translate(-50%, 0) scale(0.4); }
	25%  { opacity: 1; transform: translate(-50%, -14px) scale(1.25); }
	100% { opacity: 0; transform: translate(-50%, -64px) scale(1); }
}

/* ---------- DONAȚII ---------- */
.kvr-donation {
	margin-top: 20px;
	padding: 20px 22px;
	border-radius: 18px;
	background: rgba(255, 201, 60, 0.08);
	border: 1px solid rgba(255, 201, 60, 0.3);
	color: var(--kvr-text);
	font-size: 0.98rem;
	line-height: 1.6;
}
.kvr-donation p:last-child { margin-bottom: 0; }
.kvr-donation a {
	display: inline-block;
	margin-top: 6px;
	font-family: 'Fredoka', sans-serif;
	font-weight: 600;
	color: #4a3600;
	background: var(--kvr-yellow);
	border-radius: 999px;
	padding: 10px 22px;
	text-decoration: none;
	transition: transform 0.15s ease;
}
.kvr-donation a:hover { transform: translateY(-2px); }

/* ---------- ALTE VIP-URI RECOMANDATE ---------- */
.kvr-related {
	max-width: 1000px;
	margin: 0 auto;
	padding: 10px 24px 50px;
}

.kvr-related__heading {
	font-family: 'Fredoka', sans-serif;
	font-weight: 600;
	font-size: 1.15rem;
	color: #fff;
	margin: 0 0 16px;
}

.kvr-related__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 14px;
}

.kvr-related__card {
	display: block;
	border-radius: 14px;
	overflow: hidden;
	background: var(--kvr-bg-alt);
	text-decoration: none;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kvr-related__card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(108, 92, 231, 0.3); }

.kvr-related__img {
	display: block;
	width: 100%;
	height: 140px;
	object-fit: cover;
}

.kvr-related__name {
	display: block;
	padding: 10px 12px 12px;
	font-family: 'Fredoka', sans-serif;
	font-weight: 600;
	font-size: 0.88rem;
	color: #fff;
}

/* ---------- OVERLAY / TOAST (colț de ecran) ----------
   Folosit pentru overlay-ul de distribuire și cel de donații de pe pagina
   principală: un mic card, nu blochează pagina, apare cu o animație discretă și
   are un buton de închidere mereu vizibil. */
.kvr-toast {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 40;
	width: min(360px, calc(100vw - 36px));
	background: var(--kvr-bg-alt);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 18px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
	transform: translateY(24px);
	opacity: 0;
	transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.35s ease;
	pointer-events: none;
}

.kvr-toast[hidden] { display: none; }

.kvr-toast.is-visible {
	transform: translateY(0);
	opacity: 1;
	pointer-events: auto;
}

.kvr-toast__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.14);
	background: rgba(255, 255, 255, 0.08);
	color: var(--kvr-text);
	font-size: 0.85rem;
	cursor: pointer;
	z-index: 1;
}
.kvr-toast__close:hover { background: rgba(255, 255, 255, 0.16); }

.kvr-toast__body { padding: 18px; }
.kvr-toast__body .kvr-cta { margin-top: 0; padding: 0; background: none; border: none; }
.kvr-toast__body .kvr-donation { margin-top: 0; }

@media (max-width: 480px) {
	.kvr-toast { left: 12px; right: 12px; bottom: 12px; width: auto; }
}
