/**
 * Aurora Portfolio Carousel — Layout & Base Styles
 *
 * Structural styles only. Colors, typography, spacing are controlled
 * via Elementor widget style controls.
 */

/* Wrapper */
.aurora-pc-wrapper {
	position: relative;
}

/* Secondary image as background */
.aurora-has-bg {
	position: relative;
	background-size: cover;
	background-position: center;
}

/* Force link + image to fill the entire frame */
.aurora-pc-wrapper .aux-media-frame > a {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	position: relative;
	z-index: 2;
}

/* Overlay */
.aurora-pc-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

/* Subtitle */
.aurora-pc-subtitle {
	display: block;
}

/* Button */
.aurora-pc-button {
	position: relative;
	display: inline-block;
	overflow: hidden;
	text-decoration: none;
	transition: color 0.35s ease, border-color 0.35s ease;
	box-sizing: border-box;
	isolation: isolate;
}

/* Phlox-style radial fill — circle that scales from center on hover */
.aurora-pc-button .aurora-pc-btn-fill {
	position: absolute;
	width: 220%;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0, 0);
	transition: transform 450ms cubic-bezier(0.75, 0.1, 0.25, 0.9);
	pointer-events: none;
	z-index: 0;
}

.aurora-pc-button .aurora-pc-btn-fill::after {
	position: relative;
	content: '';
	display: block;
	padding-top: 100%;
	border-radius: 50%;
	background-color: var(--aurora-pc-fill, #3d3d3d);
}

.aurora-pc-button:hover .aurora-pc-btn-fill,
.aurora-pc-item:hover .aurora-pc-button .aurora-pc-btn-fill {
	transform: translate(-50%, -50%) scale(1, 1);
}

.aurora-pc-button .aurora-pc-btn-text {
	position: relative;
	z-index: 1;
	transition: color 0.35s ease;
}

.aurora-pc-button:hover .aurora-pc-btn-text,
.aurora-pc-item:hover .aurora-pc-button .aurora-pc-btn-text {
	color: var(--aurora-pc-text-hover, #ffffff);
}

/* --------------------------------------------------------
   Stretched link — make the entire item clickable
   -------------------------------------------------------- */
.aurora-pc-wrapper article.aurora-pc-item {
	position: relative;
}

.aurora-pc-stretched {
	position: absolute;
	inset: 0;
	z-index: 3;
	text-indent: -9999px;
	overflow: hidden;
	background: transparent;
}

/* Interactive elements must sit ABOVE the stretched link */
.aurora-pc-wrapper .aux-overlay-content,
.aurora-pc-wrapper .aux-portfolio-overlay-buttons,
.aurora-pc-wrapper .aux-wpulike,
.aurora-pc-wrapper .entry-title a,
.aurora-pc-wrapper .aurora-pc-button {
	position: relative;
	z-index: 4;
}

/* Hover state on item triggers visual feedback as if hovering the button */
.aurora-pc-item:hover .aurora-pc-button {
	cursor: pointer;
}

/* Content stacking — force vertical layout (override Phlox flex/inline) */
.aurora-pc-wrapper .entry-main {
	display: block !important;
}

.aurora-pc-wrapper .entry-main > * {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
}

.aurora-pc-wrapper .entry-main > .aurora-pc-button {
	display: inline-block !important;
	width: auto !important;
}

/* Equal containers — remove Phlox max-width, force aspect ratio */
.aurora-pc-wrapper .aux-media-frame {
	max-width: none !important;
	width: 100%;
	aspect-ratio: var(--aurora-img-ratio, 1.333);
	overflow: hidden;
}

/* Image fill container — .aux-media-image must fill the <a> (which fills
   the frame) so that img's height: 100% resolves to the frame height,
   not to auto. Without this, portrait images overflow the frame. */
.aurora-pc-wrapper .aux-media-frame .aux-media-image {
	width: 100%;
	height: 100%;
}

.aurora-pc-wrapper .aux-media-image img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}

/* Auto ratio — let image determine frame height (must come AFTER base rule) */
.aurora-pc-auto-ratio .aux-media-frame {
	aspect-ratio: auto;
}
.aurora-pc-auto-ratio .aux-media-image img {
	width: 100% !important;
	height: auto !important;
	object-fit: cover;
}

/* --------------------------------------------------------
   Navigation Arrows

   Custom inline SVG arrows. No dependency on Phlox sprites.
   Color controlled via CSS `color` + SVG `currentColor`.
   Size controlled via `width` / `height`.
   -------------------------------------------------------- */

.aurora-pc-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	cursor: pointer;
	transition: color 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
	box-sizing: border-box;
	color: #333;
}

.aurora-pc-arrow svg {
	width: 100%;
	height: 100%;
	display: block;
	flex-shrink: 0;
}

/* Font Awesome / custom icon support */
.aurora-pc-arrow i {
	font-size: inherit;
	color: inherit;
	line-height: 1;
}
.aurora-pc-arrow {
	font-size: 36px;
}

/* --------------------------------------------------------
   Side arrows positioning

   Phlox JS structure (after init):
   .aux-mc-wrapper
     └── .aux-mc-controls
         ├── .aux-mc-arrows.aux-prev  →  .aux-prev-arrow
         └── .aux-mc-arrows.aux-next  →  .aux-next-arrow
   -------------------------------------------------------- */

.aurora-pc-side-arrows .aux-mc-wrapper {
	position: relative;
	padding-left: calc(var(--aurora-arrow-size, 36px) + max(0px, var(--aurora-arrow-offset, 10px)) + var(--aurora-arrow-gap, 10px)) !important;
	padding-right: calc(var(--aurora-arrow-size, 36px) + max(0px, var(--aurora-arrow-offset, 10px)) + var(--aurora-arrow-gap, 10px)) !important;
}

/* Remove controls from flow so arrows can be positioned absolutely */
.aurora-pc-side-arrows .aux-mc-controls {
	position: static !important;
}

/* Each .aux-mc-arrows div (prev / next) becomes absolutely positioned */
.aurora-pc-side-arrows .aux-mc-arrows.aux-prev,
.aurora-pc-side-arrows .aux-mc-arrows.aux-next {
	position: absolute !important;
	top: calc(var(--aurora-img-h, 50%) / 2);
	transform: translateY(-50%);
	z-index: 10;
}

.aurora-pc-side-arrows .aux-mc-arrows.aux-prev {
	left: max(0px, var(--aurora-arrow-offset, 10px)) !important;
	right: auto !important;
}

.aurora-pc-side-arrows .aux-mc-arrows.aux-next {
	right: max(0px, var(--aurora-arrow-offset, 10px)) !important;
	left: auto !important;
}

/* Fallback: target raw HTML arrows (before Phlox JS wraps them —
   this is the structure visible in the Elementor editor).
   Phlox hides controls with .aux-mc-before-init .aux-carousel-controls { display:none }
   so we force them visible. */
.aurora-pc-side-arrows .aux-carousel-controls {
	position: static !important;
	display: block !important;
}

.aurora-pc-side-arrows .aux-carousel-controls .aux-prev-arrow,
.aurora-pc-side-arrows .aux-carousel-controls .aux-next-arrow {
	position: absolute !important;
	top: calc(var(--aurora-img-h, 50%) / 2);
	transform: translateY(-50%);
	z-index: 10;
}

.aurora-pc-side-arrows .aux-carousel-controls .aux-prev-arrow {
	left: max(0px, var(--aurora-arrow-offset, 10px)) !important;
	right: auto !important;
}

.aurora-pc-side-arrows .aux-carousel-controls .aux-next-arrow {
	right: max(0px, var(--aurora-arrow-offset, 10px)) !important;
	left: auto !important;
}

/* --------------------------------------------------------
   Editor / no-JS fallback — equal columns via CSS grid
   When Phlox carousel JS hasn't initialized, items are
   plain divs without JS-calculated widths.
   -------------------------------------------------------- */
.aurora-pc-wrapper .master-carousel:not(.aux-mc-init) {
	display: grid !important;
	grid-template-columns: repeat(var(--aurora-columns, 3), 1fr);
	gap: var(--aurora-space, 30px);
}

/* Editor: controls should span full width below items */
.aurora-pc-wrapper .master-carousel:not(.aux-mc-init) > .aux-carousel-controls {
	grid-column: 1 / -1;
}

/* Editor padding for side arrows (no .aux-mc-wrapper exists before JS init) */
.aurora-pc-side-arrows .master-carousel:not(.aux-mc-init) {
	padding-left: calc(var(--aurora-arrow-size, 36px) + max(0px, var(--aurora-arrow-offset, 10px)) + var(--aurora-arrow-gap, 10px));
	padding-right: calc(var(--aurora-arrow-size, 36px) + max(0px, var(--aurora-arrow-offset, 10px)) + var(--aurora-arrow-gap, 10px));
	position: relative;
}

.aurora-pc-wrapper .master-carousel:not(.aux-mc-init) > .aux-mc-item {
	width: auto !important;
	max-width: none !important;
}
