/* ==========================================================================
   AlphaPros — Resources page (page-resources.php)
   ========================================================================== */

@keyframes ap-shimmer { to { background-position: -200% 0; } }
.res-hero .text-gradient {
	background-image: linear-gradient(90deg, #ffffff, #d6a6f5, #ffffff);
	background-size: 200% 100%;
	animation: ap-shimmer 6s linear infinite;
}

/* Shared link: text + arrow */
.res-link { display: inline-flex; align-items: center; gap: 8px; font-size: .9375rem; font-weight: 600; color: var(--ap-primary-soft); }
.res-link .icon { width: 16px; height: 16px; transition: transform .3s var(--ap-ease); }
.res-link:hover { color: var(--ap-white); }
.res-link:hover .icon { transform: translateX(4px); }

.res-section { scroll-margin-top: var(--ap-header-h); }
.res-head { display: flex; align-items: center; gap: 24px; margin-bottom: clamp(28px, 4vw, 44px); }
.res-head::after { content: ""; flex: 1 1 auto; min-width: 40px; height: 1px; background: linear-gradient(90deg, var(--ap-border), transparent); }
.res-title { margin: 0; font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.15; }

/* Hero
   ========================================================================== */
.res-hero {
	position: relative;
	margin-top: calc(var(--ap-header-h) * -1);
	padding: calc(var(--ap-header-h) + clamp(64px, 9vw, 120px)) 0 clamp(48px, 6vw, 80px);
	overflow: hidden;
	isolation: isolate;
	text-align: center;
	background:
		radial-gradient(45% 70% at 50% 0%, rgba(150, 60, 210, .42), transparent 70%),
		url('../images/case-studies/hero-bg.webp') center bottom / cover no-repeat,
		#050204;
}
.res-hero::after { content: ""; position: absolute; inset: auto 0 0; height: 140px; z-index: -1; background: linear-gradient(180deg, transparent, var(--ap-bg)); }
.res-hero__inner { max-width: 820px; }
.res-hero__title { font-size: clamp(3rem, 7vw, 5.2rem); line-height: 1.05; margin-bottom: .35em; }
.res-hero__text { margin: 0 auto; font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.85; color: var(--ap-text); }
.res-hero__text a { color: var(--ap-primary-soft); text-decoration: underline; text-decoration-color: rgba(197, 139, 242, .4); text-underline-offset: 3px; }
.res-hero__text a:hover { color: var(--ap-white); }

.res-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 2.2em; }
.res-jump a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px 10px 16px;
	font-size: .9375rem;
	font-weight: 500;
	color: var(--ap-white);
	background: rgba(255, 255, 255, .05);
	border: 1px solid var(--ap-border);
	border-radius: 999px;
	backdrop-filter: blur(8px);
	transition: border-color .25s, background-color .25s, transform .3s var(--ap-ease);
}
.res-jump .icon { width: 18px; height: 18px; color: var(--ap-primary-soft); }
.res-jump em { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; font: 700 .75rem/1 var(--ap-font-heading); font-style: normal; color: var(--ap-white); background: var(--ap-primary); border-radius: 999px; }
.res-jump a:hover { border-color: rgba(175, 71, 254, .6); background: rgba(175, 71, 254, .14); transform: translateY(-2px); }

/* Newsletters: covers on a shelf
   ========================================================================== */
.res-news { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.res-news__cover {
	position: relative;
	display: block;
	aspect-ratio: 472 / 670;
	overflow: hidden;
	border-radius: 10px;
	box-shadow: 0 24px 50px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08);
	transform: perspective(900px) rotateY(0);
	transition: transform .6s var(--ap-ease), box-shadow .6s;
}
.res-news__cover img { width: 100%; height: 100%; object-fit: cover; }
.res-news__cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .22) 50%, transparent 60%); transform: translateX(-100%); transition: transform .8s var(--ap-ease); }
.res-news__cover:hover { transform: perspective(900px) rotateY(-8deg) translateY(-8px); box-shadow: 18px 30px 60px rgba(0, 0, 0, .6), 0 0 0 1px rgba(175, 71, 254, .5), 0 0 40px rgba(175, 71, 254, .25); }
.res-news__cover:hover::after { transform: translateX(100%); }
.res-news__badge { position: absolute; top: 10px; right: 10px; padding: 3px 9px; font: 700 .7rem/1.3 var(--ap-font-heading); letter-spacing: .08em; color: var(--ap-white); background: var(--ap-primary); border-radius: 6px; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
.res-news__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.res-news__title { margin: 0; font-size: 1.15rem; }

/* Case studies: open rows with big figures
   ========================================================================== */
.res-cases { background: radial-gradient(50% 60% at 50% 50%, rgba(120, 40, 170, .2), transparent 70%), var(--ap-bg-deep); border-block: 1px solid var(--ap-border-soft); }
.res-cases__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 72px); }
.res-case { padding: 30px 0; border-top: 1px solid var(--ap-border); }
.res-case:nth-last-child(-n + 2) { border-bottom: 1px solid var(--ap-border); }
.res-case__head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.res-case__num { font: 800 1.9rem/1 var(--ap-font-heading); color: transparent; -webkit-text-stroke: 1px rgba(200, 150, 255, .45); }
.res-case__title { margin: 0; font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.res-case__stats { display: grid; gap: 14px; list-style: none; margin: 0 0 22px; padding: 0; }
.res-stat { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); align-items: baseline; gap: 12px; line-height: 1.5; color: var(--ap-text); }
.res-stat__fig {
	font: 800 1.35rem/1.1 var(--ap-font-heading);
	background: linear-gradient(180deg, #ffffff, #cfa0f5);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
/* Lines without a leading figure: text in the same column, purple dot where the figure would be */
.res-stat > span:only-child { grid-column: 2; position: relative; }
.res-stat > span:only-child::before { content: ""; position: absolute; left: calc(-12px - 7.5rem); top: .55em; width: 8px; height: 8px; background: var(--ap-primary); border-radius: 50%; box-shadow: 0 0 10px rgba(175, 71, 254, .8); }
.res-case__actions { display: flex; align-items: center; gap: 16px; }
.res-case__dl { display: grid; place-items: center; width: 38px; height: 38px; color: var(--ap-white); border: 1px solid var(--ap-border); border-radius: 50%; transition: background-color .25s, border-color .25s; }
.res-case__dl:hover { color: var(--ap-white); background: var(--ap-primary); border-color: var(--ap-primary); }

/* Videos
   ========================================================================== */
.res-videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 4vw, 48px) clamp(24px, 3vw, 40px); }
.res-video__media { border-radius: 16px; box-shadow: 0 24px 50px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .08); }
.res-video__title { margin: 18px 0 8px; font-size: 1.2rem; line-height: 1.4; }

/* Responsive
   ========================================================================== */
@media (max-width: 960px) {
	.res-news { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.res-cases__list { grid-template-columns: 1fr; }
	.res-case:nth-last-child(2) { border-bottom: 0; }
}
@media (max-width: 600px) {
	.res-stat { grid-template-columns: 6rem minmax(0, 1fr); }
	.res-stat > span:only-child::before { left: calc(-12px - 6rem); }
	.res-videos { grid-template-columns: 1fr; }
	.res-news { gap: 20px 16px; }
	.res-news__meta { flex-direction: column; align-items: flex-start; gap: 6px; }
}
