/*
Theme Name: StreamingNation
Theme URI: https://streamingnation.live
Author: StreamingNation
Description: Tema de bloques sobrio y contemporáneo para StreamingNation: planes de streaming de video y audio. Fondo grafito, tipografía Inter y acentos de marca medidos. Compatible con WooCommerce y editable desde el Editor del sitio.
Version: 2.2.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: streamingnation
Tags: block-theme, full-site-editing, dark, e-commerce, one-column, custom-colors
*/

:root {
	--sn-bg: #0C0D10;
	--sn-bg-2: #101216;
	--sn-surface: #14161B;
	--sn-line: #23262D;
	--sn-line-2: #2E323A;
	--sn-text: #ECEEF1;
	--sn-muted: #9BA1AB;
	--sn-blue: #0275DC;
	--sn-blue-l: #5AA9F0;
	--sn-purple-l: #D27BC8;
	--sn-orange: #FE8C00;
	--sn-radius: 12px;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body { -webkit-font-smoothing: antialiased; font-optical-sizing: auto; font-feature-settings: "cv11", "ss01"; }
:where(section, .wp-block-group)[id] { scroll-margin-top: 84px; }
::selection { background: var(--sn-blue); color: #fff; }
a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* ---------- Cabecera ---------- */
.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: 32px; }
@media (max-width: 782px) { .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 46px; } }
.sn-header {
	background: rgba(12, 13, 16, 0.86);
	-webkit-backdrop-filter: saturate(140%) blur(12px); backdrop-filter: saturate(140%) blur(12px);
	border-bottom: 1px solid var(--sn-line);
}
.sn-logo img { height: 30px; width: auto; display: block; }
.sn-brand, .sn-brand a { font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; color: var(--sn-text); font-size: 14px; }
.sn-nav a { color: var(--sn-muted); font-weight: 500; text-decoration: none; transition: color .15s; }
.sn-nav a:hover { color: var(--sn-text); }

/* ---------- Botones ---------- */
.wp-block-button__link { transition: background-color .15s, border-color .15s, color .15s; }
.sn-btn-primary .wp-block-button__link { background: #fff; color: var(--sn-bg); border-color: #fff; }
.sn-btn-ghost .wp-block-button__link,
.sn-btn-gradient .wp-block-button__link {
	background: transparent !important; color: var(--sn-text) !important; border: 1px solid var(--sn-line-2) !important;
}
.sn-btn-ghost .wp-block-button__link:hover,
.sn-btn-gradient .wp-block-button__link:hover { border-color: #5A606B !important; background: rgba(255,255,255,.03) !important; }
.sn-header .wp-block-button__link { padding: 9px 16px; font-size: 14px; }

/* ---------- Etiqueta de sección (antes "cápsula") ---------- */
.sn-pill {
	display: inline-flex; align-items: center; gap: 10px;
	font-size: 12px !important; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--sn-muted) !important; background: none !important; border: 0 !important; padding: 0 !important; margin-bottom: 18px !important;
}
.sn-pill::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.sn-pill-blue::before { background: var(--sn-blue-l); height: 2px; }
.sn-pill-purple::before { background: var(--sn-purple-l); height: 2px; }
.sn-pill-orange::before { background: var(--sn-orange); height: 2px; }

/* Encabezados de sección alineados a la izquierda */
.sn-center { text-align: left; }
.wp-block-group.sn-center.is-layout-constrained > *,
.wp-block-group.sn-center > * { margin-left: 0 !important; }
/* Secciones separadas por una línea fina */
main > .wp-block-group.alignfull + .wp-block-group.alignfull,
main .wp-block-group.alignfull + .wp-block-group.alignfull { border-top: 1px solid var(--sn-line); }
.sn-glow, #servicios, #pagos, #preguntas { background: var(--sn-bg-2); }
.sn-center .wp-block-buttons { justify-content: flex-start !important; }

/* Títulos en dos tonos: la parte en negrita va en gris */
.sn-grad strong, .sn-grad b { font-weight: inherit; color: var(--sn-muted); }

/* ---------- Portada ---------- */
.sn-hero { position: relative; border-bottom: 1px solid var(--sn-line); }
.sn-hero::after {
	content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
	background: var(--wp--preset--gradient--brand); opacity: .55;
}
.sn-grid-bg { display: none !important; }
.sn-hero-title { font-size: clamp(2.5rem, 6vw, 4.25rem) !important; line-height: 1.04 !important; letter-spacing: -0.035em !important; font-weight: 600 !important; max-width: 14ch; }
.sn-lead { color: var(--sn-muted); font-size: 1.125rem; max-width: 56ch; }

/* Fila de datos clave */
.sn-facts { gap: 0 !important; border-top: 1px solid var(--sn-line); border-bottom: 1px solid var(--sn-line); }
.sn-facts > .wp-block-column { padding: 28px 24px !important; border-left: 1px solid var(--sn-line); }
.sn-facts > .wp-block-column:first-child { border-left: 0; padding-left: 0 !important; }
.sn-stat { text-align: left; background: none !important; border-radius: 0 !important; border-top: 0 !important; border-right: 0 !important; border-bottom: 0 !important; }
.sn-stat .sn-stat-value { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; margin: 0; color: var(--sn-text); }
.sn-stat .sn-stat-label { color: var(--sn-muted); font-size: 14px; margin-top: 4px; }
@media (max-width: 781px) {
	.sn-facts > .wp-block-column { border-left: 0; border-top: 1px solid var(--sn-line); padding: 20px 0 !important; }
	.sn-facts > .wp-block-column:first-child { border-top: 0; }
}

/* ---------- Iconos (línea fina, monocromos) ---------- */
.sn-icon-img { margin: 0 0 18px !important; }
.sn-icon-img img { width: 24px !important; height: 24px !important; display: block; opacity: .9; }
.sn-stat .sn-icon-img { margin-bottom: 14px !important; }

/* ---------- Tarjetas ---------- */
.sn-card {
	background: var(--sn-surface);
	border: 1px solid var(--sn-line);
	border-radius: var(--sn-radius); padding: 32px !important;
	transition: border-color .2s;
}
.sn-card:hover { border-color: var(--sn-line-2); }
.sn-card > *:first-child { margin-top: 0; }
.sn-card h3 { font-size: 1.375rem; }
.sn-card-blue, .sn-card-purple { position: relative; }
.sn-card-blue::before, .sn-card-purple::before { content: ""; position: absolute; left: 32px; top: 0; width: 40px; height: 2px; }
.sn-card-blue::before { background: var(--sn-blue-l); }
.sn-card-purple::before { background: var(--sn-purple-l); }
.sn-glow { position: relative; }

/* ---------- Listas ---------- */
.sn-checks { list-style: none; padding-left: 0 !important; }
.sn-checks li { position: relative; padding-left: 26px; margin: 10px 0; color: #C9CDD4; font-size: 15px; }
.sn-checks li::before {
	content: ""; position: absolute; left: 0; top: .42em; width: 14px; height: 14px; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
	color: var(--sn-blue-l);
}
.sn-checks-purple li::before { color: var(--sn-purple-l); }
.sn-checks-orange li::before { color: var(--sn-text); }

/* ---------- Planes ---------- */
.sn-plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 24px; align-items: stretch; }
.sn-plans { align-items: stretch !important; }
.sn-plan { display: flex; flex-direction: column; position: relative; margin: 0; }
.sn-plan h3 { margin: 0 0 6px; font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
.sn-plan .sn-checks { flex: 1; margin: 8px 0 24px; }
.sn-plan .wp-block-buttons { margin-top: auto; }
.sn-plan .wp-block-button, .sn-plan .wp-block-button__link { width: 100%; }
.sn-plan-featured { border-color: #3A3F49 !important; background: #171A20 !important; }
.sn-plan-featured::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; border-radius: var(--sn-radius) var(--sn-radius) 0 0; background: var(--wp--preset--gradient--brand); }
.sn-badge {
	position: absolute; top: 28px; right: 28px; margin: 0 !important;
	font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
	color: var(--sn-orange); background: rgba(254, 140, 0, .08); border: 1px solid rgba(254, 140, 0, .28);
	padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.sn-price { font-size: 2.5rem; font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; margin: 14px 0 4px !important; color: #fff; font-variant-numeric: tabular-nums; }
.sn-price .woocommerce-Price-currencySymbol { font-size: .55em; vertical-align: .55em; margin-right: 2px; color: var(--sn-muted); }
.sn-price sub, .sn-price small { display: block; font-size: 13px !important; font-weight: 400; color: var(--sn-muted); letter-spacing: 0; margin-top: 6px; vertical-align: baseline; }
.sn-price del { opacity: .5; font-size: .5em; margin-right: 6px; }
.sn-price ins { text-decoration: none; }
.sn-plan-rule, .sn-plans-grid .sn-plan-rule { border: 0; height: 1px; background: var(--sn-line); margin: 18px 0 6px; }
.sn-plan .sn-plan-sub { color: var(--sn-muted); font-size: 14px; }
.sn-planes-vacio { border: 1px dashed var(--sn-line-2); border-radius: var(--sn-radius); padding: 18px 20px; color: var(--sn-muted); }

/* ---------- Pasos ---------- */
.sn-step-num {
	width: auto; height: auto; display: block; background: none !important; color: var(--sn-muted) !important;
	font-size: 13px; font-weight: 600; letter-spacing: .12em; margin: 0 0 28px !important; font-variant-numeric: tabular-nums;
}
.sn-step-num::before { content: "0"; }
.sn-step-1, .sn-step-2, .sn-step-3 { background: none !important; }

/* ---------- Preguntas frecuentes ---------- */
.sn-faq { background: none; border: 0; border-bottom: 1px solid var(--sn-line); border-radius: 0; padding: 0; margin: 0 !important; }
.sn-faq:first-child { border-top: 1px solid var(--sn-line); }
.sn-faq summary { cursor: pointer; list-style: none; font-weight: 500; font-size: 1.0625rem; padding: 22px 40px 22px 0; position: relative; color: var(--sn-text); }
.sn-faq summary::-webkit-details-marker { display: none; }
.sn-faq summary::after {
	content: ""; position: absolute; right: 4px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
	border-right: 1.5px solid var(--sn-muted); border-bottom: 1.5px solid var(--sn-muted); transform: rotate(45deg); transition: transform .2s;
}
.sn-faq[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.sn-faq > :not(summary) { color: var(--sn-muted); margin-top: 0; padding-bottom: 22px; max-width: 64ch; }

/* ---------- Factura de ejemplo (sobria, oscura) ---------- */
.sn-invoice { background: var(--sn-surface) !important; color: var(--sn-text) !important; border: 1px solid var(--sn-line); border-radius: var(--sn-radius); padding: 28px !important; box-shadow: 0 30px 60px -40px rgba(0,0,0,.9); }
.sn-invoice-logo img { height: 24px !important; width: auto !important; }
.sn-invoice .sn-paid { display: inline-block; margin: 0 !important; color: #7DD3A8; font-size: 12px; font-weight: 600; letter-spacing: .04em; border: 1px solid rgba(125, 211, 168, .35); padding: 3px 10px; border-radius: 999px; }
.sn-invoice-muted { color: var(--sn-muted) !important; font-size: 14px; }
.sn-invoice-muted strong { color: var(--sn-text); }
.sn-invoice-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin: 10px 0 !important; color: var(--sn-muted) !important; }
.sn-invoice-row strong { color: var(--sn-text); font-weight: 500; font-variant-numeric: tabular-nums; }
.sn-invoice-total { border-top: 1px solid var(--sn-line); padding-top: 16px; margin-top: 18px !important; color: var(--sn-text) !important; font-size: 15px; }
.sn-invoice-total strong { font-size: 22px; font-weight: 600; }
.sn-card.is-layout-flex > .sn-icon-img { flex: none; margin: 2px 0 0 !important; }
.wp-block-group.sn-card + .wp-block-group.sn-card { margin-top: 12px; }

/* ---------- Contacto ---------- */
.sn-cta { background: var(--sn-surface) !important; }

/* ---------- WhatsApp flotante (discreto) ---------- */
.sn-whatsapp { position: fixed; right: 20px; bottom: 20px; z-index: 60; margin: 0 !important; }
.sn-whatsapp .wp-block-button__link {
	width: 52px; height: 52px; padding: 0 !important; border-radius: 50% !important; font-size: 0 !important; color: transparent !important;
	background: #1C1F25 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2325D366' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-12.4 7.4L3 21l2.1-5.4A8.4 8.4 0 1 1 21 11.5z'/%3E%3C/svg%3E") center / 24px no-repeat !important;
	border: 1px solid var(--sn-line-2) !important; box-shadow: 0 10px 30px -10px rgba(0,0,0,.8);
}
.sn-whatsapp .wp-block-button__link:hover { border-color: #25D366 !important; }

/* ---------- Pie ---------- */
.sn-footer { border-top: 1px solid var(--sn-line); }
.sn-footer a { color: var(--sn-muted); text-decoration: none; line-height: 2; }
.sn-footer a:hover { color: var(--sn-text); }
.sn-footer .sn-footer-title { color: var(--sn-text); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- WooCommerce en oscuro ---------- */
.woocommerce, .wc-block-components-main, .wc-block-checkout, .wc-block-cart { color: var(--sn-text); }
.wc-block-components-text-input input,
.wc-block-components-combobox .wc-block-components-combobox-control input,
.wc-block-components-textarea, .wc-blocks-components-select .wc-blocks-components-select__select,
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select {
	background-color: var(--sn-bg) !important; color: var(--sn-text) !important; border-color: var(--sn-line-2) !important; border-radius: 8px !important;
}
.wc-block-components-text-input label, .wc-blocks-components-select__label { color: var(--sn-muted) !important; }
.wc-block-components-panel, .wc-block-components-totals-wrapper, .wc-block-components-order-summary { border-color: var(--sn-line) !important; }
.wc-block-components-radio-control__option, .wc-block-components-radio-control-accordion-option { border-color: var(--sn-line-2) !important; }
.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option--checked-option-highlighted,
.wc-block-components-radio-control--highlight-checked label.wc-block-components-radio-control__option--checked-option-highlighted { box-shadow: inset 0 0 0 1px var(--sn-blue-l) !important; }
.wc-block-components-notice-banner { color: #0C0D10; }
.wc-block-grid__product, .wc-block-product, li.product { background: var(--sn-surface); border: 1px solid var(--sn-line); border-radius: var(--sn-radius); padding: 20px !important; }
.wp-block-woocommerce-product-price, .price, .wc-block-components-product-price { color: #fff; font-weight: 600; }
.single-product h1.wp-block-post-title, .woocommerce-page h1.wp-block-post-title, .woocommerce h1.wp-block-post-title { font-size: var(--wp--preset--font-size--xx-large) !important; }
.wc-block-components-product-image img, .wp-block-woocommerce-product-image-gallery img { border-radius: var(--sn-radius); }
.wc-block-mini-cart__drawer .components-modal__content { background: var(--sn-surface); }
.woocommerce-store-notice, p.demo_store { background: var(--sn-surface) !important; border-bottom: 1px solid var(--sn-line); }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}
.wc-blocks-components-select .wc-blocks-components-select__container { background: var(--sn-bg) !important; border: 1px solid var(--sn-line-2) !important; border-radius: 8px !important; box-shadow: none !important; }
.wc-blocks-components-select .wc-blocks-components-select__select { border: 0 !important; }

/* ---------- Fotografías ---------- */
.sn-foto { margin: 0 !important; }
.sn-foto img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: var(--sn-radius); filter: saturate(.85) contrast(1.04); }
.sn-foto-portada img { aspect-ratio: 4 / 5; max-height: 640px; border: 1px solid var(--sn-line); }
.sn-foto-datacenter img, .sn-foto-equipo img { aspect-ratio: 4 / 3; border: 1px solid var(--sn-line); }
.sn-card .sn-foto { margin: -33px -33px 26px !important; }
.sn-card .sn-foto img { aspect-ratio: 16 / 9; border-radius: var(--sn-radius) var(--sn-radius) 0 0; border-bottom: 1px solid var(--sn-line); }
.sn-card-blue:has(.sn-foto)::before, .sn-card-purple:has(.sn-foto)::before { z-index: 1; }
.sn-split { gap: clamp(32px, 6vw, 88px) !important; }
.sn-split + .sn-split { margin-top: var(--wp--preset--spacing--60) !important; }
@media (max-width: 781px) {
	.sn-foto-portada img { aspect-ratio: 16 / 11; }
	.sn-split-rev { flex-direction: column-reverse; }
}

/* ======================================================================
   Portada generada desde "Contenido de la portada"
   ====================================================================== */
.sn-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; box-sizing: content-box; }
.sn-s { padding: clamp(72px, 9vw, 128px) 0; border-top: 1px solid var(--sn-line); }
.sn-s-hero { border-top: 0; position: relative; }
.sn-s-hero::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--wp--preset--gradient--brand); opacity: .55; }
.sn-alt { background: var(--sn-bg-2); }
.sn-s h2 { margin: 0 0 18px; }
.sn-s h3 { margin: 0 0 10px; }
.sn-s h4 { margin: 0 0 6px; }
.sn-gris { color: var(--sn-muted); }
.sn-muted { color: var(--sn-muted); }
.sn-muted a { color: var(--sn-muted); }
.sn-muted a:hover { color: var(--sn-text); }
.sn-small { font-size: 14px; }
.sn-lead { margin: 0 0 8px; }
.sn-intro { max-width: 720px; margin-bottom: clamp(32px, 4vw, 48px); }
.sn-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.sn-ico { width: 24px; height: 24px; display: block; margin-bottom: 18px; opacity: .9; }

.sn-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.sn-hero-grid.sn-sin-foto { grid-template-columns: minmax(0, 1fr); }
.sn-hero-grid h1 { margin: 0 0 22px; }
.sn-datos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--sn-line); border-bottom: 1px solid var(--sn-line); }
.sn-dato { padding: 28px 24px; border-left: 1px solid var(--sn-line); }
.sn-dato:first-child { border-left: 0; padding-left: 0; }
.sn-dato p { margin: 0; }

.sn-g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sn-g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sn-g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.sn-card-sm { padding: 26px !important; }
.sn-card-row { display: flex; gap: 18px; align-items: flex-start; margin-top: 12px; padding: 24px !important; }
.sn-card-row .sn-ico { margin: 2px 0 0; flex: none; }
.sn-card-row p { margin: 4px 0 0; }

.sn-s .sn-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 88px); align-items: center; }
.sn-s .sn-split.sn-sin-foto { grid-template-columns: minmax(0, 1fr); max-width: 720px; }
.sn-s .sn-split + .sn-split { margin-top: clamp(72px, 9vw, 128px); }

.sn-planes-grupo + .sn-planes-grupo { margin-top: clamp(40px, 5vw, 64px); }
.sn-nota { margin-top: 32px; }

.sn-faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); gap: clamp(32px, 5vw, 72px); align-items: start; }

.sn-cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; padding: clamp(32px, 5vw, 56px) !important; }
.sn-cta > div:first-child { max-width: 640px; }
.sn-cta .sn-btns { margin-top: 0; }

.sn-invoice-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.sn-invoice-head img { height: 24px; width: auto; }

@media (max-width: 960px) {
	.sn-g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sn-datos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sn-dato:nth-child(3) { border-left: 0; padding-left: 0; }
	.sn-dato:nth-child(n+3) { border-top: 1px solid var(--sn-line); }
}
@media (max-width: 781px) {
	.sn-hero-grid, .sn-g2, .sn-g3, .sn-s .sn-split, .sn-faq-grid { grid-template-columns: minmax(0, 1fr); }
	.sn-s .sn-split-rev > :first-child { order: 2; }
	.sn-g4, .sn-datos { grid-template-columns: minmax(0, 1fr); }
	.sn-dato { border-left: 0 !important; padding: 20px 0 !important; border-top: 1px solid var(--sn-line); }
	.sn-dato:first-child { border-top: 0; }
}

.sn-dato .sn-stat-value { font-size: 1.0625rem; font-weight: 600; color: var(--sn-text); letter-spacing: -0.01em; }
.sn-dato .sn-stat-label { color: var(--sn-muted); font-size: 14px; margin-top: 4px !important; }
