/* ═══════════════════════════════════════════════════════════════
   INTELLEGY HUB — Block styles (frontend + editor)
   ═══════════════════════════════════════════════════════════════ */

/* ── MEDIA GALLERY ── */
.media-stack { margin-top: var(--space-12); display: flex; flex-direction: column; gap: var(--space-8); }
.gallery-carousel-wrap { position: relative; }
.gallery-carousel { display: flex; gap: var(--space-4); overflow-x: auto; padding-bottom: var(--space-4); scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.gallery-carousel img { height: 280px; width: auto; min-width: 200px; max-width: 80%; object-fit: cover; border-radius: var(--radius-lg); border: 1px solid var(--color-border); box-shadow: var(--shadow-md); scroll-snap-align: start; cursor: pointer; transition: transform var(--transition-fast), border-color var(--transition-fast); }
.gallery-carousel img:hover { transform: translateY(-4px); border-color: var(--color-primary); }
.gallery-carousel::-webkit-scrollbar { height: 6px; }
.gallery-carousel::-webkit-scrollbar-track { background: var(--color-bg-secondary); border-radius: 4px; }
.gallery-carousel::-webkit-scrollbar-thumb { background: var(--color-border-accent); border-radius: 4px; }
.gallery-carousel::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

/* Prev/next arrows for the media-gallery block carousel — same visual
   language as the single-product gallery arrows (see woocommerce.css). */
.gallery-carousel-wrap .ihl-gallery-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(10, 13, 20, 0.72);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid var(--color-border-accent);
	border-radius: 50%;
	color: var(--color-text-muted);
	cursor: pointer;
	transition: all var(--transition-fast);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.gallery-carousel-wrap .ihl-gallery-arrow:hover {
	background: rgba(74, 144, 226, 0.2);
	border-color: var(--color-primary);
	color: var(--color-primary);
	box-shadow: 0 0 18px var(--color-accent-glow);
	transform: translateY(-50%) scale(1.08);
}
.gallery-carousel-wrap .ihl-gallery-arrow:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.gallery-carousel-wrap .ihl-gallery-arrow--prev { left: 8px; }
.gallery-carousel-wrap .ihl-gallery-arrow--next { right: 8px; }
.gallery-carousel-wrap .ihl-gallery-arrow svg { pointer-events: none; }
@media (max-width: 600px) {
	.gallery-carousel-wrap .ihl-gallery-arrow { width: 36px; height: 36px; }
	.gallery-carousel-wrap .ihl-gallery-arrow svg { width: 16px; height: 16px; }
}
.video-container { width: 100%; max-width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-lg); border: 1px solid var(--color-border); box-shadow: var(--shadow-md); overflow: hidden; background: #000; display: flex; align-items: center; justify-content: center; }
.media-stack video { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ── CTA SECTION ── */
.ihl-cta__inner { text-align: center; max-width: 900px; }
.ihl-cta__text { color: var(--color-text-body); font-size: clamp(1rem, 1.5vw, 1.125rem); line-height: 1.85; margin-bottom: var(--space-8); }
.ihl-cta__buttons { display: flex; justify-content: center; gap: var(--space-6); flex-wrap: wrap; }

/* ── PARTNER / AFFILIATE ── */
.affiliate { display: flex; gap: clamp(40px, 5vw, 80px); align-items: flex-start; flex-wrap: wrap; }
.affiliate.ihl-partner--img-left { flex-direction: row-reverse; }
.affiliate__copy { flex: 1; min-width: min(100%, 400px); }
.affiliate__visual { flex: 1; min-width: min(100%, 360px); }
.affiliate__title { font-family: var(--font-heading); font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: var(--space-4); }
.ihl-partner__feat-title { color: var(--color-primary); font-family: var(--font-heading); font-weight: 600; display: block; margin-bottom: 4px; font-size: 14px; }

/* Partner feature rows: icon centered against the FULL title+text block
   (instead of the default flex-start used by use-case-split, which only
   has a single-line paragraph and looks fine top-aligned). */
.ihl-partner-feature { align-items: center; }
.ihl-partner-feature .use-case-feature__text { padding-top: 0; }

/* ── VALUE PROPS ── */
.value-item { padding-left: var(--space-8); border-left: 3px solid var(--color-primary); margin-bottom: var(--space-16); }
.value-item:last-child { margin-bottom: 0; }
.value-item h3, .value-item h4, .value-item h5 { font-size: clamp(1.1rem, 2vw, 1.5rem); margin-bottom: var(--space-4); }
.value-item p { font-size: clamp(0.95rem, 1.4vw, 1.0625rem); line-height: 1.9; color: var(--color-text-muted); max-width: 820px; }

/* ── SPECS TABLE ── */
.specs-grid { display: grid; grid-template-columns: 1fr; gap: 0; margin-top: var(--space-12); border: 1px solid var(--color-border-accent); border-radius: var(--radius-lg); overflow: hidden; }
.specs-group { padding: var(--space-8); }
.specs-group h4 { font-family: var(--font-heading); color: var(--color-primary); font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: var(--space-4); }
.specs-group ul { list-style: none; margin: 0; padding: 0; }
.specs-group li { color: var(--color-text-body); font-size: 15px; line-height: 2; display: flex; justify-content: space-between; gap: var(--space-4); font-weight: 300; }
.specs-group li strong { color: var(--color-text); font-weight: 600; font-family: var(--font-heading); text-align: right; }
.specs-group:nth-child(odd) { background: var(--color-bg-card); }
.specs-group:nth-child(even) { background: rgba(255, 255, 255, 0.015); }
@media (min-width: 768px) { .specs-grid { grid-template-columns: 1fr 1fr; } }

/* ── USE CASES (split) ── */
.use-case-split { display: flex; align-items: center; gap: clamp(40px, 6vw, 80px); margin-top: var(--space-16); margin-bottom: var(--space-20); }
.use-case-split:nth-child(even) { flex-direction: row-reverse; }
.use-case-split__content { flex: 1; min-width: min(100%, 400px); }
.use-case-split__visual { flex: 1; min-width: min(100%, 400px); position: relative; }
.use-case-split__title { font-family: var(--font-heading); font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin-bottom: var(--space-4); line-height: 1.15; letter-spacing: -0.5px; }
.use-case-split__sub { font-size: clamp(1.05rem, 1.5vw, 1.2rem); margin-bottom: var(--space-8); line-height: 1.6; color: var(--color-text-body); }
.use-case-feature { display: flex; align-items: flex-start; gap: var(--space-4); margin-bottom: var(--space-6); }
.use-case-feature__icon { flex-shrink: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: rgba(74, 144, 226, 0.08); border-radius: 10px; border: 1px solid rgba(74, 144, 226, 0.15); box-shadow: 0 0 12px rgba(74, 144, 226, 0.06); }
.use-case-feature__icon svg { width: 22px; height: 22px; }
.use-case-feature__text { font-size: clamp(0.95rem, 1.3vw, 1.0625rem); line-height: 1.6; color: var(--color-text-body); font-weight: 300; padding-top: 10px; }
.use-case-img { width: 100%; height: auto; aspect-ratio: 1/1; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--color-border); }
.use-case-img--placeholder { background: var(--color-bg-card); border-style: dashed; }
.use-case-corner { position: absolute; width: 50px; height: 50px; border: 2px solid rgba(74, 144, 226, 0.2); z-index: 3; pointer-events: none; }
.use-case-corner--tl { top: -10px; left: -10px; border-right: none; border-bottom: none; border-radius: 8px 0 0 0; }
.use-case-corner--br { bottom: -10px; right: -10px; border-left: none; border-top: none; border-radius: 0 0 8px 0; }
.use-case-glow { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 70%; height: 70%; border-radius: 50%; background: radial-gradient(circle, rgba(74, 144, 226, 0.08) 0%, transparent 70%); z-index: -1; }
@media (max-width: 900px) { .use-case-split, .use-case-split:nth-child(even) { flex-direction: column; } }

/* ── DEMO FRAME ── */
.demo-frame {
	width: 100%;
	aspect-ratio: 16/9;
	border: 1px solid var(--color-border-accent);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	background: var(--color-bg);
	display: block;
}
.demo-frame--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--color-text-muted);
	border-style: dashed;
	box-shadow: none;
	text-align: center;
	padding: var(--space-8);
}
.ihl-demo__caption {
	margin-top: var(--space-4);
	color: var(--color-text-muted);
	font-family: var(--font-heading);
	font-size: 12px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
}

/* ── TIMELINE ── */
.timeline { margin-top: var(--space-12); border-left: 2px solid rgba(74, 144, 226, 0.2); padding-left: var(--space-8); }
.timeline-item { margin-bottom: var(--space-12); position: relative; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item::before {
	content: '';
	position: absolute;
	left: calc(-1 * var(--space-8) - 5px);
	top: 6px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--color-primary);
	box-shadow: 0 0 12px var(--color-accent-glow);
}
.timeline-item h4 {
	font-family: var(--font-heading);
	color: var(--color-primary);
	margin-bottom: var(--space-3);
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 1.5px;
}

/* ── FEATURES GRID ── */
.ihl-features__grid { grid-template-columns: repeat(var(--ihl-cols, 3), minmax(0, 1fr)); }
.ihl-features .feature-icon { background: color-mix(in srgb, var(--ihl-icon, #4a90e2) 8%, transparent); border-color: color-mix(in srgb, var(--ihl-icon, #4a90e2) 15%, transparent); }
.ihl-features .feature-icon svg { stroke: var(--ihl-icon, #4a90e2); }
@media (max-width: 900px) { .ihl-features__grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); } }

/* ── HERO ── */
.ihl-hero { min-height: 100vh; display: flex; align-items: center; position: relative; overflow: hidden; }
.ihl-hero__canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0.6; }
.ihl-hero .container { position: relative; z-index: 1; }
.ihl-hero__inner { display: flex; align-items: center; gap: clamp(40px, 6vw, 100px); }
.ihl-hero__text { flex: 1; }
.ihl-hero__visual { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; }
.ihl-hero__sub { margin-top: var(--space-6); max-width: 640px; font-size: clamp(0.95rem, 1.5vw, 1.0625rem); }
.ihl-hero__long { margin-top: var(--space-4); max-width: 640px; font-size: clamp(0.875rem, 1.3vw, 1rem); color: var(--color-text-muted); }
.ihl-hero__cta { display: flex; gap: var(--space-4); flex-wrap: wrap; margin-top: var(--space-8); }
.ihl-hero__img {
	width: 100%;
	position: relative;
	z-index: 2;
	border-radius: var(--radius-lg);
	animation: float 6s ease-in-out infinite;
}
.ihl-hero__ring {
	position: absolute;
	top: 50%;
	left: 50%;
	border-radius: 50%;
	border: 2px solid rgba(74, 144, 226, 0.2);
	transform: translate(-50%, -50%);
	z-index: 1;
}
.ihl-hero__ring--1 { width: 120%; padding-bottom: 120%; animation: pulseRing 5s infinite linear; }
.ihl-hero__ring--2 { width: 100%; padding-bottom: 100%; border-color: rgba(74, 144, 226, 0.4); animation: pulseRing 5s infinite linear 2.5s; }
.ihl-hero__placeholder {
	width: 100%;
	aspect-ratio: 1/1;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px dashed var(--color-border-accent);
	border-radius: var(--radius-lg);
	color: var(--color-text-muted);
	background: var(--color-bg-card);
}

/* Editor wrapper neutralizes the 100vh so the block fits in the canvas */
.ihl-hero-editor { min-height: auto; padding: var(--space-12) 0; }
.ihl-hero-editor .ihl-hero__inner { gap: clamp(24px, 4vw, 60px); }

@media (max-width: 900px) {
	.ihl-hero__inner { flex-direction: column; text-align: left; }
	.ihl-hero__visual { width: 100%; max-width: 420px; }
}
