/* ==========================================================================
   RSS GRID
   Structure: container > loader + grid > items
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CONTAINER
   -------------------------------------------------------------------------- */

.rss_grid {
	position: relative;
}

/* --------------------------------------------------------------------------
   2. LOADER
   -------------------------------------------------------------------------- */

.rss_grid__loader {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgba(255, 255, 255, 0.75);
}

/* --------------------------------------------------------------------------
   3. GRID
   -------------------------------------------------------------------------- */

.rss_grid__grid {
	display: flex;
	flex-wrap: wrap;
	gap: 25px;
}

.rss_grid__grid[data-layout="vertical"] {
	flex-direction: column;
}

/* --------------------------------------------------------------------------
   4. ITEM
   -------------------------------------------------------------------------- */

.rss_grid__item {
	position: relative;
	border: 1px solid #d7d7d7;
	background-color: #fff;
	border-radius: 10px;
	overflow: hidden;
}

.rss_grid__grid[data-layout="horizontal"] .rss_grid__item {
	width: calc(100% / var(--rss-grid-col, 4) - 25px + (25px / var(--rss-grid-col, 4)));
}

.rss_grid__item:hover {
	opacity: 0.5;
}

/* --------------------------------------------------------------------------
   5. LINK
   -------------------------------------------------------------------------- */

.rss_grid__link {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1;
}

/* --------------------------------------------------------------------------
   6. THUMBNAIL
   -------------------------------------------------------------------------- */

.rss_grid__thumbnail {
	overflow: hidden;
	aspect-ratio: 16 / 9;
}

.rss_grid__thumbnail img {
	display: block;
	min-height: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	object-position: center center;
	transition: transform 250ms ease-out;
}

.rss_grid__item:hover .rss_grid__thumbnail img {
	transform: scale(1.03125);
}

/* --------------------------------------------------------------------------
   7. CONTENT
   -------------------------------------------------------------------------- */

.rss_grid__content {
	padding: 10px;
}

.rss_grid__grid[data-text-align="left"] .rss_grid__content * {
	text-align: left !important;
}

.rss_grid__grid[data-text-align="center"] .rss_grid__content * {
	text-align: center !important;
}

.rss_grid__grid[data-text-align="right"] .rss_grid__content * {
	text-align: right !important;
}

/* --------------------------------------------------------------------------
   8. TITLE
   -------------------------------------------------------------------------- */

.rss_grid__title {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.125;
	color: #444;
}

/* --------------------------------------------------------------------------
   9. EXCERPT
   -------------------------------------------------------------------------- */

.rss_grid__excerpt {
	font-size: 14px;
	line-height: 1.25;
}

/* --------------------------------------------------------------------------
   10. DATE
   -------------------------------------------------------------------------- */

.rss_grid__date {
	line-height: 1.25;
	color: #888;
}

/* --------------------------------------------------------------------------
   11. PAGINATION
   -------------------------------------------------------------------------- */

.rss_grid__pagination {
	margin-top: 25px;
	display: flex;
    justify-content: center;
    gap: 15px;
}

.rss_grid__pagination button {
	padding: 0;
	font-size: 16px;
	cursor: pointer;
	border: none;
	background: none;
}

.rss_grid__pagination button:disabled {
	cursor: not-allowed;
	opacity: 0.4;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* --------------------------------------------------------------------------
   < 1000px - Tablet
   -------------------------------------------------------------------------- */

@media screen and (max-width: 1000px) {
	.rss_grid__grid[data-layout="horizontal"] .rss_grid__item {
		width: calc(100% / 3 - 25px + (25px / 3));
	}
}

/* --------------------------------------------------------------------------
   < 768px - Mobile landscape
   -------------------------------------------------------------------------- */

@media screen and (max-width: 768px) {
	.rss_grid__grid[data-layout="horizontal"] .rss_grid__item {
		width: calc(100% / 2 - 25px + (25px / 2));
	}
}

/* --------------------------------------------------------------------------
   < 540px - Mobile portrait
   -------------------------------------------------------------------------- */

@media screen and (max-width: 540px) {
	.rss_grid__grid[data-layout="horizontal"] .rss_grid__item {
		width: 100%;
	}
}
