/**
 * core/post-template - Story
 */

.wp-block-post-template.is-style-story {
	:where(.entry-content, .is-root-container) {
		container-type: unset;
	}

	.wp-block-post {
		background-color: var(--wp--preset--color--base);
		border-radius: var(--wp--preset--border-radius--medium);
		overflow: clip;

		@media (hover:hover) {
			&:is(:hover, :focus-within) {
				.wp-block-post-featured-image {
					img {
						scale: 1.05;
					}

					&::after {
						block-size: 100%;
					}
				}
			}
		}
	}

	.bam-card__media {
		display: grid;
		position: static;
		grid-template-columns: 1fr;
		z-index: 2;

		> * {
			grid-column: 1;
			grid-row: 1;
			inline-size: 100%;
		}

		.wp-block-post-featured-image {
			border-end-start-radius: 0;
			border-end-end-radius: 0;

			img {
				aspect-ratio: 544 / 460;
				object-position: top center;
			}

			/* Gradient overlay */
			&::after {
				display: block;
				position: absolute;
				inset-block-end: 0;
				inset-inline-start: 0;
				block-size: 50%;
				inline-size: 100%;
				background: linear-gradient(to bottom, rgb(0 116 189 / 0%) 0%, #062533 100%);
				content: '';
				transition: block-size var(--wp--custom--transition--hover-slow);
			}
		}

		.wp-block-buttons {
			align-items: flex-end;
			padding: var(--wp--preset--spacing--resp-20-30);
			z-index: 1;
		}

		.wp-block-button__link {
			--button--color--text: var(--wp--preset--color--base);
			--button--color--text-hover: var(--wp--preset--color--base);
			--button--icon--color: var(--wp--preset--color--tertiary);
			--button--typography--font-size: var(--wp--custom--heading--medium--font-size);
			--button--typography--font-weight: var(--wp--custom--heading--medium--font-weight);
			--button--typography--line-height: var(--wp--custom--heading--medium--line-height);

			position: static;
			font-family: var(--wp--custom--heading--medium--font-family);

			/* Link overlay */
			&::before {
				display: block;
				position: absolute;
				inset: 0;
				content: '';
			}

			&:hover {
				text-decoration: none;
			}
		}
	}

	.bam-card__content {
		padding: var(--wp--preset--spacing--resp-20-30);
	}

	&:not(.is-selected, .has-child-selected) .bam-modal__content {
		display: none;
	}
}
