/* ===========================
   Trinitiii Advertisements - Frontend
   =========================== */

html.trin-ads-lock,
html.trin-ads-lock body {
	overflow: hidden;
}

/* --------- Modal --------- */
.trin-ads-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}
.trin-ads-modal[hidden] { display: none; }

.trin-ads-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(2px);
}

.trin-ads-modal__dialog {
	position: relative;
	width: min(620px, 100%);
	max-height: 90vh;
	aspect-ratio: 1 / 1;
	background: #ffffff;
	border-radius: 14px;
	box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.35), 0 10px 20px -10px rgba(0, 0, 0, 0.2);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	animation: trin-ads-pop 180ms ease-out;
}

@keyframes trin-ads-pop {
	from { transform: scale(0.96); opacity: 0; }
	to   { transform: scale(1); opacity: 1; }
}

/* When viewport is short, drop aspect-ratio so content fits */
@media (max-height: 720px) {
	.trin-ads-modal__dialog { aspect-ratio: auto; height: 90vh; }
}

.trin-ads-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 0;
	background: #f1f5f9;
	color: #0f172a;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 120ms ease;
}
.trin-ads-modal__close:hover { background: #e2e8f0; }

.trin-ads-modal__body {
	flex: 1;
	overflow-y: auto;
	padding: 42px 32px 16px;
}

.trin-ads-slide { display: none; }
.trin-ads-slide.is-active { display: block; }

.trin-ads-slide__title {
	font-size: 1.35rem;
	line-height: 1.3;
	margin: 0 0 14px;
	color: #0f172a;
	font-weight: 700;
}

.trin-ads-slide__content {
	font-size: 0.95rem;
	line-height: 1.6;
	color: #334155;
}
.trin-ads-slide__content p { margin: 0 0 12px; }

.trin-ads-slide__contact {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid #e2e8f0;
	font-size: 0.9rem;
	color: #0f172a;
}
.trin-ads-slide__contact p { margin: 4px 0; }
.trin-ads-slide__contact a { color: #2563eb; text-decoration: none; }
.trin-ads-slide__contact a:hover { text-decoration: underline; }

.trin-ads-modal__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 20px 16px;
	border-top: 1px solid #e2e8f0;
	background: #f8fafc;
}

.trin-ads-modal__arrow {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid #cbd5e1;
	background: #fff;
	color: #0f172a;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: background 120ms ease;
}
.trin-ads-modal__arrow:hover { background: #e2e8f0; }

.trin-ads-modal__dots {
	display: flex;
	gap: 8px;
}

.trin-ads-modal__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 0;
	background: #cbd5e1;
	cursor: pointer;
	padding: 0;
	transition: background 120ms ease, transform 120ms ease;
}
.trin-ads-modal__dot.is-active {
	background: #2563eb;
	transform: scale(1.2);
}

/* --------- Shortcode grid --------- */
.trin-ads-grid {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -12px;
}
.trin-ads-col {
	box-sizing: border-box;
	padding: 12px;
	width: 100%;
}
@media (min-width: 768px) {
	.trin-ads-col--6  { width: 50%; }
	.trin-ads-col--12 { width: 100%; }
}

.trin-ads-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 24px;
	height: 100%;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
	transition: box-shadow 160ms ease, transform 160ms ease;
	box-sizing: border-box;
}
.trin-ads-card:hover {
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
	transform: translateY(-2px);
}

.trin-ads-card__title {
	margin: 0 0 12px;
	font-size: 1.25rem;
	line-height: 1.3;
	color: #0f172a;
	font-weight: 700;
}

.trin-ads-card__content {
	font-size: 0.95rem;
	line-height: 1.6;
	color: #334155;
}
.trin-ads-card__content p { margin: 0 0 12px; }

.trin-ads-card__contact {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid #e2e8f0;
	font-size: 0.9rem;
	color: #0f172a;
}
.trin-ads-card__contact p { margin: 4px 0; }
.trin-ads-card__contact a { color: #2563eb; text-decoration: none; }
.trin-ads-card__contact a:hover { text-decoration: underline; }
