/* GPS Sections – Category Bento Grid (block, Elementor widget, shortcode) */

.gps-cbg{
	--gps-cbg-bg:#ffffff;        /* background behind the grid – the notch must match it */
	--gps-cbg-accent:#FFDA00;    /* labels + arrow buttons */
	--gps-cbg-text:#111111;      /* label + arrow colour */
	--gps-cbg-radius:22px;
	--gps-cbg-gap:24px;
	width:100%;
	max-width:1460px;
	margin-left:auto;
	margin-right:auto;
	padding:16px 0;
	background:var(--gps-cbg-bg);
	font-family:'GPS Lexend',sans-serif;
	box-sizing:border-box;
}
.gps-cbg.alignfull,.gps-cbg.alignwide{max-width:none;}
.gps-cbg *,.gps-cbg *::before,.gps-cbg *::after{box-sizing:border-box;}

/* Desktop bento: 4 columns x 2 rows
   [ Card 1 ][    Card 2     ][ Card 5 ]
   [ Card 1 ][Card 3][Card 4 ][ Card 5 ] */
.gps-cbg__grid{
	display:grid;
	grid-template-columns:repeat(4,minmax(0,1fr));
	grid-template-rows:repeat(2,var(--gps-cbg-row-desktop,300px));
	gap:var(--gps-cbg-gap);
}
.gps-cbg__pos-a{grid-column:1;grid-row:1 / span 2;}
.gps-cbg__pos-b{grid-column:2 / span 2;grid-row:1;}
.gps-cbg__pos-c{grid-column:2;grid-row:2;}
.gps-cbg__pos-d{grid-column:3;grid-row:2;}
.gps-cbg__pos-e{grid-column:4;grid-row:1 / span 2;}

/* Card – specific selectors + a few !important to beat theme / Elementor link & img styles */
.gps-cbg .gps-cbg__card{
	position:relative;
	display:block;
	overflow:hidden;
	border-radius:var(--gps-cbg-radius);
	background:#d9d9d9;
	text-decoration:none !important;
	color:var(--gps-cbg-text);
	box-shadow:none;
	border:0;
	outline-offset:4px;
	min-height:0;
}
.gps-cbg .gps-cbg__card img.gps-cbg__img{
	position:absolute;
	inset:0;
	width:100% !important;
	height:100% !important;
	max-width:none !important;
	margin:0 !important;
	padding:0;
	border:0;
	border-radius:0;
	box-shadow:none;
	object-fit:cover;
	transition:transform .6s ease;
}
.gps-cbg .gps-cbg__card:hover img.gps-cbg__img{transform:scale(1.05);}

.gps-cbg .gps-cbg__label{
	position:absolute;
	top:28px;
	left:28px;
	z-index:2;
	background:var(--gps-cbg-accent);
	color:var(--gps-cbg-text);
	font-family:'GPS Lexend',sans-serif;
	font-size:18px;
	font-weight:500;
	line-height:1;
	letter-spacing:0;
	padding:15px 16px;
	border-radius:8px;
}

/* Notched bottom-right corner holding the arrow */
.gps-cbg .gps-cbg__notch{
	position:absolute;
	right:-1px;
	bottom:-1px;
	z-index:2;
	padding:10px 1px 1px 10px;
	background:var(--gps-cbg-bg);
	border-top-left-radius:24px;
}
.gps-cbg .gps-cbg__notch::before,
.gps-cbg .gps-cbg__notch::after{
	content:"";
	position:absolute;
	width:var(--gps-cbg-radius);
	height:var(--gps-cbg-radius);
	background:radial-gradient(circle at 0 0,transparent var(--gps-cbg-radius),var(--gps-cbg-bg) calc(var(--gps-cbg-radius) + .5px));
}
.gps-cbg .gps-cbg__notch::before{bottom:100%;right:1px;}
.gps-cbg .gps-cbg__notch::after{right:100%;bottom:1px;}

.gps-cbg .gps-cbg__arrow{
	width:50px;
	height:50px;
	border-radius:50%;
	background:var(--gps-cbg-accent);
	color:var(--gps-cbg-text);
	display:grid;
	place-items:center;
	transition:transform .3s ease;
}
.gps-cbg .gps-cbg__arrow svg{width:20px;height:20px;display:block;}
.gps-cbg .gps-cbg__card:hover .gps-cbg__arrow{transform:translateX(3px);}

/* Tablet: 2 columns
   [ Card 1 ][ Card 3 ]
   [ Card 1 ][ Card 4 ]
   [   Card 2 (wide)  ]
   [   Card 5 (wide)  ] */
@media (max-width:1024px){
	.gps-cbg{--gps-cbg-gap:20px;}
	.gps-cbg__grid{
		grid-template-columns:repeat(2,minmax(0,1fr));
		grid-template-rows:none;
		grid-auto-rows:var(--gps-cbg-row-tablet,260px);
	}
	.gps-cbg__pos-a,.gps-cbg__pos-b,.gps-cbg__pos-c,.gps-cbg__pos-d,.gps-cbg__pos-e{grid-column:auto;grid-row:auto;}
	.gps-cbg__pos-a{grid-row:span 2;}
	.gps-cbg__pos-b{grid-column:1 / -1;order:3;}
	.gps-cbg__pos-e{grid-column:1 / -1;order:4;}
}

/* Mobile: single column */
@media (max-width:640px){
	.gps-cbg{--gps-cbg-gap:16px;}
	.gps-cbg__grid{grid-template-columns:1fr;grid-auto-rows:var(--gps-cbg-row-mobile,240px);}
	.gps-cbg__pos-a{grid-row:auto;}
	.gps-cbg__pos-b,.gps-cbg__pos-e{grid-column:auto;order:0;}
	.gps-cbg .gps-cbg__label{top:20px;left:20px;font-size:16px;padding:13px 14px;}
}

/* Block editor preview: keep the cards from navigating away */
.editor-styles-wrapper .gps-cbg .gps-cbg__card{pointer-events:none;}
