/**
 * Advanced Newspaper Core: row and block styles.
 *
 * Follows the look of the original Advanced Newspaper front page: light
 * serif headlines, red section titles, thin rules between stories. Fonts
 * and colours come from the theme's custom properties, with fallbacks so
 * the rows still read well under another theme.
 *
 * 1. Rows
 * 2. Block titles and shared card type
 * 3. Story lists (thumb list, stack, lead + list, lead + arrows)
 * 4. Headline lists and the coloured box
 * 5. Grid and lead
 * 6. Slider
 * 7. Tabs and carousel
 * 8. Ads
 * 9. Headline across the top (classic front page)
 * 10. Category grid
 */

.gb_row {
	--gb-story-font: var(--gb-font-story, Georgia, serif);
	--gb-text-font: var(--gb-font-text, Georgia, serif);
	--gb-excerpt: #444444;
	--gb-label-font: var(--gb-font-label, Arial, sans-serif);
	--gb-red: var(--gb-highlight, #cd1713);
	--gb-rule: var(--gb-line, #efefef);
	--gb-panel: var(--gb-surface-alt, #f3f3f3);
	margin-block: 0 36px;
}

[data-gb-scheme="dark"] .gb_row {
	--gb-excerpt: var(--gb-muted, #9aa1ad);
}

/* 1. Rows
--------------------------------------------- */

/*
 * Each row carries its own container, so it lines up with the theme header
 * even inside a full-width Elementor section. The values repeat the theme's
 * .gb_container with fallbacks, for sites that run the plugin on another theme.
 */
.gb_row > .gb_container {
	box-sizing: border-box;
	width: 100%;
	max-width: calc(var(--gb-container, 1320px) + var(--gb-gutter, 24px) * 2);
	margin-inline: auto;
	padding-inline: var(--gb-gutter, 24px);
}

.gb_row_grid {
	display: grid;
	grid-template-columns: var(--gb-row-cols, 1fr);
	gap: 32px;
	align-items: start;
}

.gb_row_col {
	min-width: 0;
	container-type: inline-size;
}

/* Blocks stacked in one column, e.g. a story list with an ad below. */
.gb_row_col > .gb_block + .gb_block {
	margin-top: 32px;
}

/*
 * Rows where columns hold two story blocks each: the columns share the
 * row's two grid lines (subgrid), so every second block starts on the same
 * line however long the headlines above it are. Columns with a single block
 * or an ad simply span both lines.
 */
@media (min-width: 1025px) {
	.gb_row_pairs .gb_row_grid {
		row-gap: 32px;
	}

	.gb_row_pairs .gb_row_col {
		grid-row: span 2;
	}

	.gb_row_pairs .gb_col_pair {
		display: grid;
		grid-template-rows: subgrid;
		row-gap: 32px;
	}

	.gb_row_pairs .gb_col_pair > .gb_block + .gb_block {
		margin-top: 0;
	}
}

@media (max-width: 1024px) {
	.gb_row_grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gb_row_grid > .gb_span_12,
	.gb_row_grid > .gb_span_8,
	.gb_row_grid > .gb_span_6:first-child {
		grid-column: 1 / -1;
	}
}

@media (max-width: 700px) {
	.gb_row_grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* 2. Block titles and shared card type
--------------------------------------------- */
.gb_block_title {
	margin: 0 0 10px;
	color: var(--gb-red);
	font-family: var(--gb-label-font);
	font-size: 1.1875rem;
	font-weight: 700;
	line-height: 1.2;
}

.gb_block_title a {
	color: inherit;
	text-decoration: none;
}

.gb_block_title a:hover {
	text-decoration: underline;
}

.gb_block .gb_card_title {
	margin: 0 0 10px;
	font-family: var(--gb-story-font);
	font-size: 1.5rem;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.gb_block .gb_card_title a {
	color: var(--gb-text, #222);
	text-decoration: none;
}

.gb_block .gb_card_title a:hover {
	color: var(--gb-red);
}

.gb_block .gb_excerpt {
	margin: 0;
	color: var(--gb-excerpt);
	font-family: var(--gb-text-font);
	font-size: 1.125rem;
	line-height: 1.5;
}

/* The category label is not part of the original front page. */
.gb_block .gb_cat_label {
	display: none;
}

.gb_block .gb_thumb {
	display: block;
	overflow: hidden;
	border-radius: 0;
}

.gb_block .gb_thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* 3. Story lists
--------------------------------------------- */

/* Thumbnail beside the headline and excerpt (Activities, Events). */
.gb_card_small {
	display: grid;
	grid-template-columns: var(--gb-photo, 28%) minmax(0, 1fr);
	gap: 4px 16px;
	align-items: start;
	padding-block: 16px;
	border-top: 1px solid var(--gb-rule);
}

.gb_card_small:first-child {
	padding-top: 0;
	border-top: 0;
}

.gb_card_small:not(:has(.gb_thumb)) {
	grid-template-columns: minmax(0, 1fr);
}

.gb_card_small .gb_card_title {
	margin-bottom: 8px;
}

/* In a narrow column the excerpt would be squeezed: headline only. */
@container (max-width: 420px) {
	.gb_card_small {
		grid-template-columns: 96px minmax(0, 1fr);
	}

	.gb_card_small .gb_card_title {
		font-size: 1.1875rem;
	}

	.gb_card_small .gb_excerpt {
		display: none;
	}
}

/* Stack: headline across, then photo with the excerpt beside it (Destinations, Last Minute). */
.gb_card_stack {
	padding-block: 16px;
	border-top: 1px solid var(--gb-rule);
}

.gb_card_stack:first-of-type {
	padding-top: 0;
	border-top: 0;
}

.gb_card_stack_body {
	display: grid;
	grid-template-columns: var(--gb-photo, 24%) minmax(0, 1fr);
	gap: 16px;
	align-items: start;
}

.gb_card_stack_body:not(:has(.gb_thumb)) {
	grid-template-columns: minmax(0, 1fr);
}

/* The excerpt runs as long as the block's word count; set "Excerpt length"
   on the block to bring the text level with the photo. */
.gb_card_stack .gb_excerpt {
	font-size: 1.0625rem;
	line-height: 1.45;
}

/* Lead + list: the lead keeps its photo on top. */
.gb_block_lead_list .gb_card_lead {
	padding-bottom: 16px;
}

.gb_block_lead_list .gb_card_lead .gb_card_title {
	font-size: 1.75rem;
}

.gb_block_list > .gb_card_small:first-child {
	padding-top: 16px;
	border-top: 1px solid var(--gb-rule);
}

/* Lead + arrow headlines (Where & When). */
.gb_arrow_list {
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
}

.gb_arrow_list li {
	padding-block: 8px;
	border-top: 1px solid var(--gb-rule);
}

.gb_arrow_list a {
	display: block;
	padding-inline-start: 16px;
	position: relative;
	color: var(--gb-text, #222);
	font-family: var(--gb-story-font);
	font-size: 1.1875rem;
	text-decoration: none;
}

.gb_arrow_list a::before {
	content: "";
	position: absolute;
	top: 0.5em;
	inset-inline-start: 2px;
	border-block: 5px solid transparent;
	border-inline-start: 6px solid currentColor;
}

.gb_arrow_list a:hover {
	color: var(--gb-red);
}

/* 4. Headline lists and the coloured box
--------------------------------------------- */
.gb_headlines {
	margin: 0;
	padding: 0;
	list-style: none;
}

.gb_headline {
	padding-block: 10px;
	border-bottom: 1px solid var(--gb-rule);
}

.gb_headline:first-child {
	padding-top: 0;
}

.gb_headline_link {
	display: block;
	color: var(--gb-text, #222);
	font-family: var(--gb-story-font);
	font-size: 1.25rem;
	line-height: 1.3;
	text-decoration: none;
}

.gb_headline_link:hover {
	color: var(--gb-red);
}

/* The red "Enjoy" box. It fills the column, so its grey panel ends level
   with the blocks beside it; set the story count to fill the panel. */
.gb_row_col:has(> .gb_block_headline_box:only-child) {
	align-self: stretch;
}

.gb_block_headline_box:only-child {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.gb_block_headline_box:only-child .gb_box_list {
	display: flex;
	flex: 1;
	flex-direction: column;
}


.gb_box_title {
	margin: 0;
	padding: 6px 12px;
	background: var(--gb-red);
	color: #ffffff;
	font-family: var(--gb-label-font);
	font-size: 1.1875rem;
	font-weight: 700;
	text-align: center;
}

.gb_box_title a {
	color: inherit;
	text-decoration: none;
}

.gb_box_list {
	margin: 0;
	padding: 4px 0;
	background: var(--gb-panel);
	list-style: none;
	text-align: center;
}

.gb_box_list li + li {
	border-top: 2px solid var(--gb-surface, #ffffff);
}

.gb_box_list a {
	display: block;
	padding: 8px 12px;
	color: var(--gb-text, #222);
	font-family: var(--gb-story-font);
	font-size: 1.125rem;
	line-height: 1.3;
	text-decoration: none;
}

.gb_box_list a:hover {
	color: var(--gb-red);
}

/* 5. Grid and lead
--------------------------------------------- */
.gb_block_grid {
	display: grid;
	gap: 28px 24px;
}

.gb_block_grid.gb_cols_1 { grid-template-columns: minmax(0, 1fr); }
.gb_block_grid.gb_cols_2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gb_block_grid.gb_cols_3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gb_block_grid.gb_cols_4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) {
	.gb_block_grid.gb_cols_3,
	.gb_block_grid.gb_cols_4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.gb_block_grid.gb_cols_2,
	.gb_block_grid.gb_cols_3,
	.gb_block_grid.gb_cols_4 {
		grid-template-columns: minmax(0, 1fr);
	}
}

.gb_card_grid .gb_thumb,
.gb_card_lead .gb_thumb,
.gb_card_carousel .gb_thumb {
	margin-bottom: 12px;
}

.gb_block_lead .gb_card + .gb_card {
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid var(--gb-rule);
}

.gb_block_lead .gb_card_title {
	font-size: clamp(1.625rem, 2.6vw, 2.125rem);
}

/* Third- and quarter-width columns: the original kept these near list-title size. */
@container (max-width: 520px) {
	.gb_block_lead .gb_card_title {
		font-size: 1.625rem;
		line-height: 1.15;
	}
}

@container (max-width: 360px) {
	.gb_block_lead .gb_card_title {
		font-size: 1.375rem;
	}
}

/* 6. Slider
--------------------------------------------- */

/* A light panel holds the photo, its caption band and the thumbnails. */
.gb_slider {
	padding: 10px;
	border: 1px solid var(--gb-rule);
	border-radius: 3px;
	background: var(--gb-panel);
}

.gb_slider_track {
	display: grid;
	grid-auto-columns: 100%;
	grid-auto-flow: column;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.gb_slider_track::-webkit-scrollbar {
	display: none;
}

.gb_slide {
	position: relative;
	scroll-snap-align: start;
}

.gb_slide_media {
	display: block;
	aspect-ratio: 16 / 9;
	background: #111111;
}

.gb_slide_media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Title and excerpt on a dark band across the bottom of the photo. */
.gb_slide_caption {
	position: absolute;
	inset: auto 0 0;
	padding: 12px 16px 14px;
	background: rgb(0 0 0 / 0.62);
	pointer-events: none;
}

.gb_slide_caption a {
	pointer-events: auto;
}

.gb_slide .gb_card_title {
	margin-bottom: 4px;
	font-size: clamp(1.375rem, 2.2vw, 1.7rem);
}

/* On the slider only the headline reacts to hover: an underline, no colour change. */
.gb_slide .gb_card_title a:hover {
	color: #ffffff;
	text-decoration: underline;
}

.gb_slide .gb_card_title a,
.gb_slide .gb_excerpt {
	color: #ffffff;
}

.gb_slide .gb_excerpt {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 1;
	line-clamp: 1;
	font-size: 1.0625rem;
}

@media (max-width: 600px) {
	.gb_slide .gb_excerpt {
		display: none;
	}
}

.gb_slider_thumbs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
	gap: 8px;
	margin-top: 10px;
}

.gb_slider_thumb {
	display: block;
	padding: 6px 0 0;
	border: 0;
	border-top: 4px solid #d8d8d8;
	background: none;
	cursor: pointer;
}

.gb_slider_thumb img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.gb_slider_thumb:hover,
.gb_slider_thumb[aria-selected="true"] {
	border-top-color: var(--gb-red);
}

/* 7. Tabs and carousel
--------------------------------------------- */
.gb_tabs_list {
	display: flex;
}

.gb_tab {
	padding: 8px 18px;
	border: 0;
	border-inline-end: 1px solid var(--gb-rule);
	background: var(--gb-panel);
	color: var(--gb-text, #222);
	font-family: var(--gb-text-font);
	font-size: 1.0625rem;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
}

.gb_tab[aria-selected="true"] {
	background: var(--gb-surface, #ffffff);
}

.gb_tab:hover {
	color: var(--gb-red);
}

/* Category carousel (Do / See / Know ...). */
.gb_block_carousel_tabs {
	border: 1px solid var(--gb-rule);
}

.gb_tabs_bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid var(--gb-rule);
}

.gb_carousel_nav {
	display: flex;
	gap: 4px;
	padding-inline: 10px;
}

.gb_carousel_prev,
.gb_carousel_next {
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #a8a8a8;
	cursor: pointer;
	-webkit-mask: var(--gb-arrow) center / 12px no-repeat, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: var(--gb-arrow) center / 12px no-repeat exclude, linear-gradient(#000 0 0);
}

.gb_carousel_prev { --gb-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E"); }
.gb_carousel_next { --gb-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); }

.gb_carousel_prev:hover,
.gb_carousel_next:hover {
	background: var(--gb-red);
}

/* Four cards visible, the rest a swipe or an arrow away. */
.gb_carousel_track {
	display: grid;
	grid-auto-columns: calc((100% - 3 * 24px) / 4);
	grid-auto-flow: column;
	gap: 24px;
	overflow-x: auto;
	padding: 16px;
	scroll-padding-inline: 16px;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.gb_carousel_track::-webkit-scrollbar {
	display: none;
}

.gb_card_carousel {
	scroll-snap-align: start;
}

.gb_card_carousel .gb_thumb {
	aspect-ratio: 16 / 9;
}

.gb_card_carousel .gb_card_title {
	font-size: 1.375rem;
}

@media (max-width: 900px) {
	.gb_carousel_track {
		grid-auto-columns: calc((100% - 24px) / 2);
	}
}

@media (max-width: 560px) {
	.gb_carousel_track {
		grid-auto-columns: 80%;
	}
}

/* Latest / Popular / Comments. */
.gb_block_tabs {
	border: 1px solid var(--gb-rule);
}

.gb_block_tabs .gb_tabs_list {
	border-bottom: 1px solid var(--gb-rule);
}

.gb_block_tabs .gb_tab {
	flex: 1;
	padding-inline: 8px;
	font-weight: 700;
}

.gb_block_tabs .gb_tab:last-child {
	border-inline-end: 0;
}

.gb_tab_posts {
	margin: 0;
	padding: 4px 12px;
	list-style: none;
}

.gb_tab_post,
.gb_tab_comment {
	padding-block: 10px;
	border-top: 1px solid var(--gb-rule);
}

.gb_tab_post:first-child,
.gb_tab_comment:first-child {
	border-top: 0;
}

.gb_tab_post {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 56px;
	gap: 12px;
	align-items: start;
}

.gb_tab_post .gb_thumb {
	width: 56px;
	aspect-ratio: 1;
}

.gb_tab_post_title,
.gb_tab_comment a {
	color: var(--gb-text, #222);
	font-family: var(--gb-story-font);
	font-size: 1.0625rem;
	line-height: 1.35;
	text-decoration: none;
}

.gb_tab_post_title:hover,
.gb_tab_comment a:hover {
	color: var(--gb-red);
}

.gb_tab_comment_author {
	color: var(--gb-muted, #555);
	font-size: 0.875rem;
}

.gb_tab_empty {
	margin: 0;
	padding: 16px 12px;
	color: var(--gb-muted, #555);
}

/* 8. Ads
--------------------------------------------- */
.gb_ad_row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 24px;
}

.gb_ad_slot {
	display: grid;
	place-items: center;
	width: min(100%, var(--gb-ad-w));
	min-height: var(--gb-ad-h);
	text-align: center;
}

.gb_ad_slot img {
	display: block;
	max-width: 100%;
	height: auto;
}

.gb_ad_label {
	display: block;
	margin-bottom: 4px;
	color: var(--gb-muted, #5d6470);
	font-size: 0.6875rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* Ads in a row sit side by side on the page background, inside the frame. */
.gb_row_ads .gb_ad_row {
	align-items: center;
}

.gb_block_ad .gb_ad_slot {
	margin-inline: auto;
}

/* 9. Headline across the top (classic front page)
--------------------------------------------- */
.gb_lead_head {
	margin-bottom: 14px;
}

.gb_lead_title {
	margin: 4px 0 0;
	font-family: var(--gb-story-font);
	font-size: clamp(2.125rem, 3.6vw, 3rem);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.02em;
}

.gb_lead_head .gb_cat_label {
	display: none;
}

.gb_lead_more {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid var(--gb-rule);
}

/* Left column of the classic front page: grey panel, bold centred headlines. */
.gb_row_split .gb_row_side_wrap .gb_box_list a {
	font-weight: 700;
}

.gb_lead_title a {
	color: inherit;
	text-decoration: none;
}

.gb_lead_title a:hover {
	text-decoration: underline;
}

.gb_lead_body .gb_thumb {
	margin-bottom: 12px;
}

.gb_lead_body .gb_excerpt {
	font-size: 1.0625rem;
}

.gb_row_side_wrap {
	display: contents;
}

@media (max-width: 1024px) {
	.gb_row_split .gb_row_head,
	.gb_row_split .gb_span_6 {
		grid-column: 1 / -1;
	}
}

/*
 * On wide screens the headline cell takes the first grid row from the lead
 * column to the right edge; every other cell drops to the second row, except
 * columns left of the lead, which run the full height.
 */
@media (min-width: 1025px) {
	.gb_row_split .gb_row_grid {
		row-gap: 0;
	}

	.gb_row_split .gb_row_col {
		grid-row: 2;
		grid-column: var(--gb-col);
	}

	.gb_row_split .gb_row_head {
		grid-row: 1;
		grid-column: var(--gb-col) / -1;
		padding-bottom: 18px;
	}

	.gb_row_split .gb_row_side_wrap > .gb_row_col {
		grid-row: 1 / span 2;
	}

	.gb_row_split .gb_row_head + .gb_row_col::before,
	.gb_row_split .gb_row_side_wrap > .gb_row_col::before {
		display: none;
	}

	.gb_row_split .gb_row_head_offset {
		position: relative;
	}

	.gb_row_split .gb_row_head_offset::before {
		content: "";
		position: absolute;
		inset: 0 auto 0 -16px;
		border-inline-start: 1px solid var(--gb-line, #efefef);
	}

	.gb_row_split .gb_row_head_offset + .gb_row_col::before {
		display: block;
	}
}

/* 10. Category grid
--------------------------------------------- */
/*
 * Each category is its own cell, so blocks on one line start level. The
 * side column is exactly as wide as its ad.
 */
.gb_catgrid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
	align-items: start;
}

.gb_catgrid_has_side {
	grid-template-columns: minmax(0, 1fr) var(--gb-catgrid-side, 336px);
}

.gb_catgrid_main {
	display: grid;
	grid-template-columns: repeat(var(--gb-catgrid-per-line, 3), minmax(0, 1fr));
	gap: 32px;
	align-items: start;
}

.gb_catgrid_cell,
.gb_catgrid_side {
	min-width: 0;
	container-type: inline-size;
}

.gb_catgrid_side > .gb_block + .gb_block {
	margin-top: 32px;
}

@media (max-width: 1024px) {
	.gb_catgrid_has_side {
		grid-template-columns: minmax(0, 1fr);
	}

	.gb_catgrid_main {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.gb_catgrid_main {
		grid-template-columns: minmax(0, 1fr);
	}
}
