:root {
	--wptop-primary: #0073aa;
	--wptop-secondary: #23282d;
	--wptop-accent: #ff5722;
	--wptop-base-size: 16px;
	--wptop-container: 1200px;
	--wptop-container-tablet: 960px;
	--wptop-heading-font: inherit;
	--wptop-body-font: inherit;
	--wptop-block-gap: 24px;
	--wptop-block-gap-tablet: 20px;
	--wptop-block-gap-mobile: 16px;
	--wptop-card-columns: 3;
	--wptop-card-columns-tablet: 2;
	--wptop-card-columns-mobile: 1;
	--wptop-card-gap: 30px;
	--wptop-card-gap-tablet: 24px;
	--wptop-card-gap-mobile: 18px;
	--wptop-card-image-height: 220px;
	--wptop-card-image-height-tablet: 200px;
	--wptop-card-image-height-mobile: 180px;
	--wptop-link-gap: 16px;
	--wptop-link-gap-tablet: 12px;
	--wptop-link-gap-mobile: 10px;
}

body { font-family: var(--wptop-body-font); font-size: var(--wptop-base-size); line-height: 1.6; overflow-wrap: break-word; }
h1, h2, h3, h4, h5, h6 { font-family: var(--wptop-heading-font); line-height: 1.2; }

/* Blocks */
.wptop-block { padding: clamp(36px, 6vw, 72px) 20px; position: relative; }
.wptop-block-inner { max-width: min(var(--wptop-container), calc(100% - 24px)); margin: 0 auto; }
.wptop-block-hero { min-height: min(70vh, 560px); display: flex; align-items: center; }
.wptop-block-centered { text-align: center; }
.wptop-block-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.wptop-block-icon { font-size: clamp(36px, 5vw, 52px); margin-bottom: 20px; color: var(--wptop-primary); }
.wptop-block-title { font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: 16px; }
.wptop-block-subtitle { font-size: clamp(1rem, 2.3vw, 1.25rem); opacity: 0.82; margin-bottom: 20px; }
.wptop-block-content > *:first-child { margin-top: 0; }
.wptop-block-button { display: inline-flex; align-items: center; justify-content: center; padding: 12px 28px; background: var(--wptop-primary); color: #fff; text-decoration: none; border-radius: 999px; margin-top: 20px; transition: background 0.3s, transform 0.2s; }
.wptop-block-button:hover { background: var(--wptop-secondary); color: #fff; transform: translateY(-1px); }

/* Blocks Layouts */
.wptop-blocks-wrapper { display: flex; flex-direction: column; gap: var(--wptop-block-gap); }
.wptop-blocks-wrapper.wptop-layout-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--wptop-block-gap); }
.wptop-blocks-wrapper.wptop-layout-grid .wptop-block { padding: 36px 28px; border-radius: 20px; overflow: hidden; }

/* Cards */
.wptop-cards-wrapper {
	display: grid;
	grid-template-columns: repeat(var(--wptop-card-columns), minmax(0, 1fr));
	gap: var(--wptop-card-gap);
}
.wptop-card {
	background: #fff;
	border-radius: 18px;
	overflow: hidden;
	transition: transform 0.3s, box-shadow 0.3s;
	height: 100%;
	display: flex;
	flex-direction: column;
	position: relative;
}
.wptop-card:hover { transform: translateY(-3px); }
.wptop-card-elevated { box-shadow: 0 10px 28px rgba(0,0,0,0.12); }
.wptop-card-bordered { border: 2px solid var(--wptop-primary); }
.wptop-card-minimal { background: transparent; border: 1px solid rgba(0,0,0,0.08); }
.wptop-card-glass { background: rgba(255,255,255,0.72); border: 1px solid rgba(255,255,255,0.55); box-shadow: 0 10px 28px rgba(15,23,42,0.1); backdrop-filter: blur(14px); }
.wptop-card-feature { border: 0; background: linear-gradient(180deg, rgba(0,115,170,0.08), rgba(255,255,255,1)); box-shadow: 0 16px 34px rgba(0,0,0,0.12); }
.wptop-card-overlay { background: #0f172a; color: #fff; }
.wptop-card-overlay .wptop-card-image { position: relative; }
.wptop-card-overlay .wptop-card-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,23,42,0.1), rgba(15,23,42,0.72)); }
.wptop-card-overlay .wptop-card-body { margin-top: -80px; position: relative; z-index: 1; }
.wptop-card-horizontal { flex-direction: row; }
.wptop-card-horizontal .wptop-card-image,
.wptop-card-horizontal .wptop-card-body { flex: 1 1 50%; }
.wptop-card-horizontal .wptop-card-image img { height: 100%; min-height: var(--wptop-card-image-height); }
.wptop-card-compact .wptop-card-body { padding: 18px; gap: 8px; }
.wptop-card-compact .wptop-card-title { font-size: 1.1rem; }
.wptop-card-image img { width: 100%; height: var(--wptop-card-image-height); object-fit: cover; display: block; }
.wptop-card-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.wptop-card-title { margin: 0; font-size: 1.25em; }
.wptop-card-desc > *:first-child { margin-top: 0; }
.wptop-card-desc > *:last-child { margin-bottom: 0; }
.wptop-card-badge { display: inline-flex; align-items: center; width: fit-content; padding: 4px 12px; background: var(--wptop-accent); color: #fff; font-size: 12px; border-radius: 999px; }
.wptop-card-link { color: var(--wptop-primary); text-decoration: none; font-weight: 600; margin-top: auto; }
.wptop-shortcode-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--wptop-primary); color: #fff; text-decoration: none; }

/* Links */
.wptop-links-wrapper { list-style: none; padding: 0; margin: 0; }
.wptop-links-wrapper li { margin-bottom: var(--wptop-link-gap); }
.wptop-links-wrapper a { text-decoration: none; color: var(--wptop-primary); display: inline-flex; align-items: center; gap: 8px; }
.wptop-links-inline { display: flex; gap: var(--wptop-link-gap); flex-wrap: wrap; }
.wptop-links-inline li { margin-bottom: 0; }
.wptop-links-inline.wptop-links-stack-mobile li { margin-bottom: 0; }

/* Social */
.wptop-social-wrapper { display: flex; gap: 12px; flex-wrap: wrap; }
.wptop-social-wrapper a { display: inline-flex; width: 40px; height: 40px; background: var(--wptop-secondary); color: #fff; border-radius: 50%; align-items: center; justify-content: center; text-decoration: none; transition: background 0.3s, transform 0.2s; }
.wptop-social-wrapper a:hover { background: var(--wptop-primary); transform: translateY(-1px); }
.wptop-share-buttons { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(0,0,0,0.08); }
.wptop-share-link { display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; border-radius: 999px; background: var(--wptop-primary); color: #fff; text-decoration: none; font-size: 14px; }
.wptop-share-link:hover { background: var(--wptop-secondary); color: #fff; }

/* Preloader */
#wptop-preloader { transition: opacity 0.5s; }
.wptop-preloader-spinner { width: 50px; height: 50px; border: 4px solid #eee; border-top-color: currentColor; border-radius: 50%; animation: wptop-spin 1s linear infinite; }
@keyframes wptop-spin { to { transform: rotate(360deg); } }

/* Sticky header */
.wptop-is-sticky { position: fixed !important; top: 0; left: 0; right: 0; z-index: 9997; background: inherit; box-shadow: 0 2px 10px rgba(0,0,0,0.08); }

/* Back to top */
#wptop-back-to-top { position: fixed; bottom: 30px; right: 30px; width: 46px; height: 46px; background: var(--wptop-primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s; z-index: 999; font-size: 20px; border: 0; box-shadow: 0 10px 24px rgba(0,0,0,0.16); }
#wptop-back-to-top.visible { opacity: 1; visibility: visible; }

/* Reading progress */
#wptop-reading-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--wptop-accent); z-index: 9999; width: 0%; }

/* Cookie banner */
#wptop-cookie-banner { position: fixed; bottom: 16px; left: 16px; right: 16px; max-width: 1180px; margin: 0 auto; background: var(--wptop-secondary); color: #fff; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; z-index: 9998; flex-wrap: wrap; border-radius: 16px; box-shadow: 0 16px 40px rgba(0,0,0,0.22); }
#wptop-cookie-banner[hidden] { display: none !important; }
.wptop-cookie-message { flex: 1 1 280px; }
.wptop-cookie-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
#wptop-cookie-banner button { padding: 10px 20px; background: var(--wptop-primary); color: #fff; border: none; border-radius: 999px; cursor: pointer; }
#wptop-cookie-banner a { color: #fff; text-decoration: underline; }

/* Dark mode */
.wptop-dark body { background: #121212; color: #e0e0e0; }
.wptop-dark .wptop-card { background: #1e1e1e; color: #e0e0e0; }

/* Responsive visibility */
@media (max-width: 1024px) {
	.wptop-hide-tablet { display: none !important; }
	.wptop-block-inner { max-width: min(var(--wptop-container-tablet), calc(100% - 24px)); }
	.wptop-blocks-wrapper { gap: var(--wptop-block-gap-tablet); }
	.wptop-cards-wrapper { grid-template-columns: repeat(var(--wptop-card-columns-tablet), minmax(0, 1fr)); gap: var(--wptop-card-gap-tablet); }
	.wptop-card-image img { height: var(--wptop-card-image-height-tablet); }
	.wptop-links-wrapper li { margin-bottom: var(--wptop-link-gap-tablet); }
	.wptop-links-inline { gap: var(--wptop-link-gap-tablet); }
}

@media (max-width: 768px) {
	.wptop-hide-mobile { display: none !important; }
	.wptop-block-split { grid-template-columns: 1fr; }
	.wptop-blocks-wrapper { gap: var(--wptop-block-gap-mobile); }
	.wptop-cards-wrapper { grid-template-columns: repeat(var(--wptop-card-columns-mobile), minmax(0, 1fr)) !important; gap: var(--wptop-card-gap-mobile); }
	.wptop-blocks-wrapper.wptop-layout-grid { grid-template-columns: 1fr; }
	.wptop-card-image img { height: var(--wptop-card-image-height-mobile); }
	.wptop-card-horizontal { flex-direction: column; }
	.wptop-card-horizontal .wptop-card-image img { min-height: 0; }
	.wptop-links-wrapper li { margin-bottom: var(--wptop-link-gap-mobile); }
	.wptop-links-inline { gap: var(--wptop-link-gap-mobile); }
	.wptop-links-inline.wptop-links-stack-mobile { flex-direction: column; align-items: flex-start; }
	#wptop-back-to-top { bottom: 18px; right: 18px; width: 42px; height: 42px; }
	#wptop-cookie-banner { left: 12px; right: 12px; bottom: 12px; align-items: stretch; border-radius: 14px; }
	.wptop-cookie-actions { width: 100%; justify-content: space-between; }
	.wptop-share-buttons strong { width: 100%; }
}

@media (max-width: 480px) {
	.wptop-block { padding-left: 16px; padding-right: 16px; }
	.wptop-blocks-wrapper.wptop-layout-grid .wptop-block { padding: 28px 20px; }
	.wptop-card-body { padding: 18px; }
	.wptop-links-inline { gap: 10px; }
	.wptop-cookie-actions { justify-content: flex-start; }
}
