/* King IPTV - design rules that theme.json can't express.
   Colours, fonts and spacing come from theme.json presets (var(--wp--preset--*)). */

:root {
	color-scheme: dark;
	--k-line: var(--wp--custom--line);
	--k-line-soft: var(--wp--custom--line-soft);
	--k-radius: var(--wp--custom--radius--large);
}

html { scroll-padding-top: 5.5rem; }

body {
	background-image: radial-gradient(60rem 40rem at 85% -10%, rgba(40, 58, 120, 0.45), transparent 70%);
	background-repeat: no-repeat;
	text-rendering: optimizeLegibility;
}

:where(h1, h2, h3) { text-wrap: balance; margin-top: 0; }
:focus-visible { outline: 2px solid var(--wp--preset--color--gold-soft); outline-offset: 3px; border-radius: 4px; }

.is-muted, .has-muted-color { color: var(--wp--preset--color--muted); }
.lead { font-size: var(--wp--preset--font-size--large); color: var(--wp--preset--color--muted); max-width: 38em; line-height: 1.55; }

/* ---------- Buttons ---------- */
.wp-block-button__link { min-height: 3rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; transition: box-shadow .2s, border-color .2s, color .2s; }
.wp-block-button:not(.is-style-ghost):not(.is-style-whatsapp):not(.is-style-outline) .wp-block-button__link:hover { box-shadow: 0 0 28px rgba(221, 182, 94, 0.35); }
.wp-block-button.is-style-ghost .wp-block-button__link,
.wp-block-button.is-style-outline .wp-block-button__link {
	background: rgba(255, 255, 255, 0.02);
	border-color: var(--k-line);
	color: var(--wp--preset--color--ivory);
}
.wp-block-button.is-style-ghost .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover { border-color: var(--wp--preset--color--gold); color: #fff; }
.wp-block-button.is-style-whatsapp .wp-block-button__link { background: var(--wp--preset--color--whatsapp); color: var(--wp--preset--color--whatsapp-ink); }
.wp-block-button.is-style-whatsapp .wp-block-button__link:hover { box-shadow: 0 0 24px rgba(37, 211, 102, 0.35); }

/* Add the CSS class "has-wa-icon" to a Button (Advanced > Additional CSS class) to show the WhatsApp logo. */
.has-wa-icon .wp-block-button__link::before {
	content: "";
	width: 1.2em; height: 1.2em; flex: none;
	background: currentColor;
	-webkit-mask: url("../images/icons/whatsapp.svg") center / contain no-repeat;
	mask: url("../images/icons/whatsapp.svg") center / contain no-repeat;
}

/* Top-level template blocks sit flush (sections bring their own padding). */
.wp-site-blocks > * { margin-block-start: 0; }

/* ---------- Header ---------- */
/* The template part wrapper is what sticks, so the header stays on screen while scrolling. */
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 50; }
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 0; } }
.site-header {
	background: rgba(7, 13, 29, 0.86);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--k-line-soft);
}
.site-header .wp-block-site-logo img, .site-brand img { width: 2.25rem; height: 2.25rem; }
.site-header .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--ivory); box-shadow: inset 0 -1px 0 var(--wp--preset--color--gold); }
.wp-block-navigation__responsive-container-open { border: 1px solid var(--k-line); border-radius: 999px; padding: 0.55rem; }

/* Language switcher: a small Navigation block with the class "lang-switch" */
.lang-switch { border: 1px solid var(--k-line); border-radius: 999px; padding: 3px; gap: 0 !important; }
.lang-switch .wp-block-navigation-item__content { min-width: 2.6rem; min-height: 2.1rem; display: inline-grid; place-items: center; border-radius: 999px; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; padding: 0 0.5rem !important; }
.lang-switch .current-menu-item > .wp-block-navigation-item__content,
.lang-switch .is-current > .wp-block-navigation-item__content { background: var(--wp--preset--color--gold); color: var(--wp--preset--color--ink); }

@media (max-width: 960px) { .site-header .header-cta { display: none; } }
@media (max-width: 420px) { .site-header .wp-block-site-title { font-size: 1.2rem; } }

/* ---------- Sections ---------- */
.section-tint { border-block: 1px solid var(--k-line-soft); }
.section-head { margin-bottom: 2.5rem !important; }
.section-head > *, h2.section-head { max-width: 40rem; }
.section-head p { color: var(--wp--preset--color--muted); }

/* Narrow text that sits directly in a wide section: keep it on the section's left edge
   (WordPress centres anything narrower than the section by default). */
.is-layout-constrained > :is(.lead, .page-head h1, h1, h2.section-head, .price-note, .faq) {
	margin-left: max(0px, calc((100% - 72rem) / 2)) !important;
	margin-right: auto !important;
}

/* Hero */
.hero h1 { max-width: 12em; }
.hero-art img { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.45)); }
@media (max-width: 781px) { .hero-art { max-width: 24rem; margin-inline: auto; } }

/* Essentials */
.essentials { border-top: 1px solid var(--k-line); padding-top: 2.25rem; }
.icon img, img.icon { width: 2rem; height: 2rem; }
.icon-lg img { width: 3rem; height: 3rem; margin-inline: auto; }

/* Cards */
.is-style-card {
	background: var(--wp--preset--color--charcoal);
	border: 1px solid var(--k-line-soft);
	border-radius: var(--k-radius);
	padding: 1.5rem;
}
.is-style-card-featured {
	position: relative;
	background: var(--wp--preset--gradient--featured);
	border: 1px solid var(--wp--preset--color--gold);
	border-radius: var(--k-radius);
	padding: 1.5rem;
	box-shadow: 0 0 0 1px rgba(221, 182, 94, 0.25), 0 24px 60px rgba(221, 182, 94, 0.12);
}
.is-style-accent-left { border-left: 2px solid var(--wp--preset--color--gold); padding-left: 1.25rem; }
.is-style-accent-left p { color: var(--wp--preset--color--muted); }
.is-style-callout {
	border: 1px solid var(--k-line);
	border-radius: var(--k-radius);
	padding: clamp(1.5rem, 4vw, 2.5rem);
	background: var(--wp--preset--gradient--callout);
}
.is-style-callout h2 { font-size: var(--wp--preset--font-size--x-large); margin-bottom: 0.3rem; }
.is-style-callout p { color: var(--wp--preset--color--muted); margin: 0; }
.is-style-notice { border: 1px solid var(--k-line); border-radius: var(--k-radius); padding: 1.5rem; background: rgba(221, 182, 94, 0.05); }

/* Devices */
.device { text-align: center; height: 100%; }
.device strong { display: block; }
.device p { margin: 0.25rem 0 0; }
.device p + p { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); }

/* Plans */
.plans { padding-top: 1rem; align-items: stretch; }
.plan { background: var(--wp--preset--color--navy); height: 100%; padding: 1.9rem 1.5rem 1.5rem !important; }
.plan.is-style-card-featured { background: var(--wp--preset--gradient--featured); }
@media (min-width: 1041px) { .plan.is-style-card-featured { transform: translateY(-0.75rem); } }
.plan > .wp-block-buttons { margin-top: auto !important; }
.plan-badge {
	position: absolute; top: 0; left: 1.5rem; transform: translateY(-50%); margin: 0 !important;
	background: var(--wp--preset--color--gold); color: var(--wp--preset--color--ink);
	font-size: 0.8rem; font-weight: 700; padding: 0.3rem 0.8rem; border-radius: 999px;
}
.plan-length { display: flex; align-items: baseline; gap: 0.45rem; margin: 0 0 0.6rem !important; font-family: var(--wp--preset--font-family--body); font-size: 1rem !important; font-weight: 600; color: var(--wp--preset--color--muted); }
.plan-length strong { font-family: var(--wp--preset--font-family--display); font-size: 4.2rem; line-height: 0.9; font-weight: 500; color: var(--wp--preset--color--ivory); }
.is-style-card-featured .plan-length strong { color: var(--wp--preset--color--gold-soft); }
.plan-price { font-size: 2rem; font-weight: 700; line-height: 1.1; margin: 0 !important; }
.plan-monthly { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); margin-top: 0.35rem !important; }
.plan-monthly strong { color: var(--wp--preset--color--gold-soft); }
.plan .is-style-ticks { border-top: 1px solid var(--k-line-soft); padding-top: 1.25rem !important; font-size: 0.95rem; }
.price-note { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); max-width: 46rem !important; margin-top: 2rem !important; }

/* Tick list */
ul.is-style-ticks { list-style: none; padding-left: 0; display: grid; gap: 0.7rem; color: var(--wp--preset--color--muted); }
ul.is-style-ticks li { position: relative; padding-left: 1.65rem; }
ul.is-style-ticks li::before {
	content: ""; position: absolute; left: 0; top: 0.28em; width: 1.1rem; height: 1.1rem;
	background: var(--wp--preset--color--gold);
	-webkit-mask: url("../images/icons/check.svg") center / contain no-repeat;
	mask: url("../images/icons/check.svg") center / contain no-repeat;
}

/* Numbered steps (Columns block, style "Numbered steps") */
.is-style-steps { counter-reset: step; }
.is-style-steps > .wp-block-column { counter-increment: step; position: relative; padding-top: 4.2rem; }
.is-style-steps > .wp-block-column::before {
	content: counter(step); position: absolute; top: 0; left: 0;
	font-family: var(--wp--preset--font-family--display); font-size: 3.6rem; line-height: 1; color: var(--wp--preset--color--gold);
}
.is-style-steps > .wp-block-column:not(:last-child)::after { content: ""; position: absolute; top: 1.8rem; left: 3.2rem; right: -1rem; height: 1px; background: var(--k-line); }
.is-style-steps p { color: var(--wp--preset--color--muted); }
@media (max-width: 781px) { .is-style-steps > .wp-block-column::after { display: none; } }

/* FAQ (Details blocks) */
.faq { max-width: 48rem !important; border-top: 1px solid var(--k-line); }
.faq .wp-block-details { margin: 0 !important; }
.wp-block-details summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1.5rem; padding: 1.3rem 0; font-weight: 700; font-size: 1.08rem; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: ""; flex: none; width: 0.7rem; height: 0.7rem; margin-top: 0.4rem; border-right: 2px solid var(--wp--preset--color--gold); border-bottom: 2px solid var(--wp--preset--color--gold); transform: rotate(45deg); transition: transform .2s; }
.wp-block-details[open] summary::after { transform: rotate(-135deg); margin-top: 0.7rem; }
.wp-block-details > :not(summary) { color: var(--wp--preset--color--muted); max-width: 42rem; margin-top: 0; padding-bottom: 1.4rem; }

/* Final CTA */
.final { border-top: 1px solid var(--k-line); text-align: center; }
.final .lead { margin-inline: auto; }
.final-mark img { width: 4.5rem; margin-inline: auto; }

/* Inner page header */
.page-head h1 { font-size: var(--wp--preset--font-size--xx-large); max-width: 18em !important; }
.page-head .lead { max-width: 38em !important; }
.final.is-layout-constrained > .lead { margin-left: auto !important; }

/* Comparison table */
.wp-block-table.is-style-compare { border: 1px solid var(--k-line-soft); border-radius: var(--k-radius); overflow-x: auto; }
.wp-block-table.is-style-compare table { min-width: 36rem; border-collapse: collapse; }
.wp-block-table.is-style-compare th, .wp-block-table.is-style-compare td { border: 0; border-bottom: 1px solid var(--k-line-soft); padding: 1rem 1.25rem; text-align: left; }
.wp-block-table.is-style-compare thead { border: 0; }
.wp-block-table.is-style-compare thead th { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); font-weight: 600; background: var(--wp--preset--color--navy); }
.wp-block-table.is-style-compare tbody td:first-child { font-weight: 700; }
.wp-block-table.is-style-compare figcaption { text-align: left; padding: 0 1.25rem 1rem; }

/* Facts list (two columns of term / description) */
.facts strong { color: var(--wp--preset--color--gold-soft); }

/* Contact */
.contact-big { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.4rem; }
.kingiptv-form { display: grid; gap: 1.2rem; }
.kingiptv-form .field label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.kingiptv-form .field label small { color: var(--wp--preset--color--muted); font-weight: 400; }
.kingiptv-form input:not([type=checkbox]), .kingiptv-form textarea {
	width: 100%; font: inherit; color: var(--wp--preset--color--ivory); background: var(--wp--preset--color--midnight);
	border: 1px solid rgba(241, 236, 223, 0.22); border-radius: 10px; padding: 0.8rem 0.95rem; box-sizing: border-box;
}
.kingiptv-form textarea { min-height: 9rem; resize: vertical; }
.kingiptv-form input:focus, .kingiptv-form textarea:focus { outline: none; border-color: var(--wp--preset--color--gold); box-shadow: 0 0 0 3px rgba(221, 182, 94, 0.25); }
.kingiptv-form .hint { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); margin: 0.35rem 0 0; }
.kingiptv-form .check { display: grid; grid-template-columns: 1.3rem 1fr; gap: 0.7rem; color: var(--wp--preset--color--muted); font-size: 0.95rem; }
.kingiptv-form .check input { width: 1.2rem; height: 1.2rem; margin-top: 0.2rem; accent-color: var(--wp--preset--color--gold); }
.kingiptv-form .hp { position: absolute; left: -9999px; }
.kingiptv-form button {
	justify-self: start; min-height: 3rem; padding: 0.75rem 1.4rem; border-radius: 999px; border: 0; cursor: pointer;
	font: 700 1rem/1.2 var(--wp--preset--font-family--body); background: var(--wp--preset--gradient--gold); color: var(--wp--preset--color--ink);
}
.kingiptv-form button[disabled] { opacity: 0.6; cursor: progress; }
.kingiptv-form .form-status { min-height: 1.5rem; margin: 0; font-weight: 600; }
.kingiptv-form .form-status[data-state="success"] { color: #8EE6A8; }
.kingiptv-form .form-status[data-state="error"] { color: #FFB4A8; }

/* ---------- Blog ---------- */
.post-card { background: var(--wp--preset--color--navy); height: 100%; position: relative; transition: border-color .2s; }
.post-card:hover, .post-card:focus-within { border-color: var(--wp--preset--color--gold); }
.post-card .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.post-card .wp-block-post-title { font-size: var(--wp--preset--font-size--large); line-height: 1.25; }
.post-card .wp-block-post-date { margin-top: auto; }
.entry-content > p, .entry-content > ul li, .entry-content > ol li { color: #D3D2CC; }
.entry-content > h2 { font-size: var(--wp--preset--font-size--x-large); margin-top: 2.5rem; }
.entry-content > h3 { margin-top: 2rem; }
.entry-content > ul, .entry-content > ol { padding-left: 1.3rem; }
.entry-content > ul li, .entry-content > ol li { margin-bottom: 0.5rem; }
.entry-content li::marker { color: var(--wp--preset--color--gold); font-weight: 700; }
.entry-content strong { color: var(--wp--preset--color--ivory); }
.wp-block-query-pagination a { text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--k-line-soft); font-size: 0.95rem; }
.site-footer h2 { font-family: var(--wp--preset--font-family--body); font-size: 0.95rem; font-weight: 700; color: var(--wp--preset--color--gold-soft); margin-bottom: 0.9rem; letter-spacing: 0; }
.site-footer .wp-block-navigation a:hover { text-decoration: underline; }
.footer-base { border-top: 1px solid var(--k-line-soft); color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); }
.footer-base p { margin: 0; }

/* ---------- Floating WhatsApp button ---------- */
.wa-float { position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 40; margin: 0 !important; }
.wa-float .wp-block-button__link {
	width: 3.5rem; height: 3.5rem; min-height: 0; padding: 0 !important; border-radius: 50% !important;
	font-size: 0 !important; /* keeps the text for screen readers, shows only the logo */
	background: var(--wp--preset--color--whatsapp) !important; color: var(--wp--preset--color--whatsapp-ink) !important;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.wa-float .wp-block-button__link::before { width: 1.8rem; height: 1.8rem; }
.wa-float .wp-block-button__link:hover { transform: translateY(-2px); }

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
	.site-header, .site-footer, .wa-float { display: none; }
	body { background: #fff; color: #000; }
}
