/* =============================
   Typography & Spacing
============================= */

/* Headings → Paragraph */
.entry-content h1 + p,
.entry-content h2 + p,
.entry-content h3 + p,
.entry-content h4 + p,
.entry-content h5 + p,
.entry-content h6 + p {
	margin-top: 0.4rem !important;
}

/* Paragraphs */
.entry-content p {
	margin-top: 1rem !important;
	margin-bottom: 0.3rem !important;
}

/* Headings */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
	margin-top: 1.5rem !important;
}

/* Heading/Paragraph → List */
.entry-content p + ul,
.entry-content p + .wp-block-list,
.entry-content h1 + ul,
.entry-content h2 + ul,
.entry-content h3 + ul,
.entry-content h4 + ul,
.entry-content h5 + ul,
.entry-content h6 + ul {
	margin-top: 0.6rem !important;
}

/* Lists */
.entry-content ul,
.entry-content .wp-block-list {
	margin-bottom: 0.3rem !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

.entry-content li {
	margin: 0 !important;
	padding: 0 !important;
}

/* Links */
.single-post .entry-content a {
	font-weight: 700;
}

/* First paragraph */
.single-post .entry-content p:first-of-type {
	padding-top: 17px;
}

/* Heading/Paragraph → Table */
.entry-content p + table,
.entry-content h1 + table,
.entry-content h2 + table,
.entry-content h3 + table,
.entry-content h4 + table,
.entry-content h5 + table,
.entry-content h6 + table {
	margin-top: 0.3rem !important;
}

/* =============================
   Tables
============================= */

/* Table base */
.entry-content table {
	border-collapse: separate !important;
	border-spacing: 0 !important;
	border: 2px solid #4A77BC !important;
	border-radius: 10px;
	overflow: hidden;
}

/* Cells */
.entry-content th,
.entry-content td {
	padding: 8px;
	border-right: 2px solid #4A77BC !important;
	border-bottom: 2px solid #4A77BC !important;
	text-align: center;
	vertical-align: middle;
}

/* Remove double borders */
.entry-content th:last-child,
.entry-content td:last-child {
	border-right: none !important;
}

.entry-content tr:last-child td {
	border-bottom: none !important;
}

/* Header row */
.entry-content th {
	background-color: rgba(74, 119, 188, 0.3);
	font-weight: 700;
}

/* =============================
   Card Lift Effect (Post Grid Hover)
============================= */

.wp-block-post {
	transition: transform .25s ease, box-shadow .25s ease;
	will-change: transform;
}

.wp-block-post:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 25px rgba(0,0,0,.15);
}

/* =============================
   Accessibility Helper
============================= */

.etg-visually-hidden{
	position:absolute!important;
	width:1px!important;
	height:1px!important;
	margin:-1px!important;
	padding:0!important;
	overflow:hidden!important;
	clip:rect(0,0,0,0)!important;
	clip-path:inset(50%)!important;
	white-space:nowrap!important;
	border:0!important;
}

/* =============================
   Forms
============================= */

:is(
.wp-block-jetpack-contact-form input[type="email"],
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="tel"],
input[type="number"],
textarea,
select){
	border:2px solid #ced1d6!important;
	border-radius:15px!important;
	padding:12px 16px;
	background:transparent;
	box-sizing:border-box;
}

:is(input,textarea,select):focus{
	border-color:#fff!important;
	outline:none;
}


/* =============================
   Home Post Title Hover Effect
============================= */

.home .home-hover-underline{
	position:relative;
	display:block;
	width:fit-content;
	margin-inline:auto;
}

.home .home-hover-underline::before,
.home .home-hover-underline::after{
	content:"";
	position:absolute;
	inset-inline:0;
	height:2px;
	background:linear-gradient(to right,#4A77BC,#e6e8eb);
	transform:scaleX(0);
	transition:transform .4s ease-out;
}

.home .home-hover-underline::before{
	top:-6px;
	transform-origin:left;
}

.home .home-hover-underline::after{
	bottom:-6px;
	transform-origin:right;
}

.home .home-hover-underline:hover::before,
.home .home-hover-underline:hover::after{
	transform:scaleX(1);
}

/* pullquote */
.wp-block-pullquote{
	position:relative;
	overflow:hidden;
	color:#fff;
	background-attachment:fixed!important;
	background-size:120%!important;
	background-position:center!important;
	background-repeat:no-repeat!important;
}

.wp-block-pullquote::before{
	content:"";
	position:absolute;
	inset:0;
	background:inherit;
	filter:blur(6px);
	transform:scale(1.15);
	z-index:0;
}

.wp-block-pullquote::after{
	content:"";
	position:absolute;
	inset:0;
	background:var(--theme-palette-color-4);
	opacity:.45;
	z-index:1;
}

.wp-block-pullquote blockquote{
	position:relative;
	z-index:2;
}

.wp-block-table table {
  border-collapse: collapse;
}

.wp-block-table th,
.wp-block-table td {
  border: 2px solid #fff;
}