/*
 * Today SEO World – Mega menu styles (all mega menus)
 * File: woodmart-child/assets/css/tsw-megamenu.css
 *
 * All mega menu styling lives here, NOT inside the HTML blocks.
 * The HTML blocks only hold text and links, so editing them can never break the design.
 *
 * Menus using this file:
 *   - Agencies                 <div class="tswm tswm--blue tswm--wide">
 *   - Tools                    <div class="tswm tswm--blue">
 *   - AI Search Optimization   <div class="tswm">   (purple)
 *   - Resources has its own file (resources-mega-menu.css); section 2 only protects it.
 */

/* ---------- 1. Colour settings ---------- */
.tswm {
	--tswm-accent: #7c3aed;
	--tswm-accent-dark: #6d28d9;
	--tswm-accent-soft: #ddd6fe;
	--tswm-tint: #f5f3ff;
	--tswm-tint-2: #faf9ff;
	--tswm-border: #ececf3;
	--tswm-heading: #1f2937;
	--tswm-text: #374151;
	--tswm-muted: #6b7280;
}
/* Blue version (Agencies and Tools menus) */
.tswm.tswm--blue {
	--tswm-accent: #1d4ed8;
	--tswm-accent-dark: #1e40af;
	--tswm-accent-soft: #bfdbfe;
	--tswm-tint: #eff6ff;
	--tswm-tint-2: #f8fbff;
}

/* ---------- 2. Editor protection ----------
 * The WordPress editor sometimes adds <p> and <br> tags around the menu code.
 * These rules make those extra tags invisible, so the layout stays the same.
 */
.tswm p,
.tsw-mm p:not([class]) {
	display: contents !important;
	margin: 0 !important;
	padding: 0 !important;
	font: inherit !important;
	line-height: inherit !important;
	color: inherit !important;
}
.tswm br,
.tsw-mm br {
	display: none !important;
}

/* ---------- 3. Panel and columns ---------- */
.tswm,
.tswm * {
	box-sizing: border-box;
}
.tswm {
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	padding: 22px 26px;
	background: #fff;
	border: 1px solid var(--tswm-border);
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba(40, 30, 90, .10);
	font-family: inherit;
	line-height: 1.4;
	text-align: left;
	color: var(--tswm-text);
}
.tswm.tswm--wide {
	max-width: 1222px;
}
.tswm .tswm-grid {
	display: grid;
	grid-template-columns: 1.15fr 1fr .95fr;
	gap: 0;
}
.tswm .tswm-grid.tswm-grid--4 {
	grid-template-columns: 1.05fr 1fr 1fr 1fr;
}
.tswm .tswm-col {
	min-width: 0;
	padding: 0 24px;
	border-left: 1px solid var(--tswm-border);
}
.tswm .tswm-col:first-of-type {
	padding-left: 0;
	border-left: 0;
}
.tswm .tswm-col:last-of-type {
	padding-right: 0;
}

/* ---------- 4. Column titles ---------- */
.tswm .tswm-title {
	display: block;
	margin: 0 0 12px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--tswm-accent);
}
.tswm .tswm-title--gap {
	margin-top: 4px;
}

/* ---------- 5. Menu items (icon + name + description) ---------- */
.tswm .tswm-item {
	display: flex !important;
	align-items: center;
	gap: 12px;
	margin: 0 -10px 2px;
	padding: 7px 10px;
	border-radius: 10px;
	line-height: 1.3;
	color: var(--tswm-heading) !important;
	text-decoration: none !important;
	transition: background .15s;
}
.tswm .tswm-item:hover,
.tswm .tswm-item:focus-visible {
	background: var(--tswm-tint);
}
.tswm .tswm-ic {
	flex: 0 0 38px;
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	background: var(--tswm-tint);
	color: var(--tswm-accent);
	font-size: 18px;
	line-height: 1;
}
.tswm .tswm-ic--sm {
	flex-basis: 30px;
	width: 30px;
	height: 30px;
	border-radius: 8px;
	font-size: 15px;
}
.tswm .tswm-tx {
	flex: 1;
	min-width: 0;
}
.tswm .tswm-name,
.tswm .tswm-tx b,
.tswm .tswm-tx strong {
	display: block;
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--tswm-heading);
}
.tswm .tswm-desc,
.tswm .tswm-tx small {
	display: block;
	margin-top: 1px;
	font-size: 12.5px;
	line-height: 1.35;
	color: var(--tswm-muted);
}
.tswm .tswm-badge {
	display: inline-block;
	margin-left: 6px;
	padding: 2px 7px;
	border-radius: 999px;
	background: #fff1e6;
	color: #c2410c;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .04em;
	text-transform: uppercase;
	vertical-align: 2px;
}

/* Icon colours – add one of these classes next to "tswm-ic" */
.tswm .tswm-ic--letter  { font-size: 16px; font-weight: 700; }
.tswm .tswm-ic--green   { background: #e8f7f2; color: #10a37f; }
.tswm .tswm-ic--emerald { background: #ecfdf5; color: #059669; }
.tswm .tswm-ic--teal    { background: #e6f4f5; color: #20808d; }
.tswm .tswm-ic--mint    { background: #e5f9f6; color: #0d9488; }
.tswm .tswm-ic--blue    { background: #e8f1fb; color: #0078d4; }
.tswm .tswm-ic--sky     { background: #e8f0fe; color: #1a73e8; }
.tswm .tswm-ic--indigo  { background: #eef0ff; color: #4b3df5; }
.tswm .tswm-ic--purple  { background: #faf5ff; color: #9333ea; }
.tswm .tswm-ic--pink    { background: #fdf2f8; color: #db2777; }
.tswm .tswm-ic--red     { background: #fef2f2; color: #dc2626; }
.tswm .tswm-ic--orange  { background: #fdf0ea; color: #d97757; }
.tswm .tswm-ic--amber   { background: #fff7e6; color: #b45309; }
.tswm .tswm-ic--grey    { background: #f3f4f6; color: #4b5563; }

/* ---------- 6. Compact rows (icon + name + arrow) ---------- */
.tswm .tswm-row {
	display: flex !important;
	align-items: center;
	gap: 10px;
	margin: 0 -10px 1px;
	padding: 5px 10px;
	border-radius: 9px;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--tswm-heading) !important;
	text-decoration: none !important;
	transition: background .15s;
}
.tswm .tswm-row:hover,
.tswm .tswm-row:focus-visible {
	background: var(--tswm-tint);
}
.tswm .tswm-row-name {
	flex: 1;
	min-width: 0;
}
.tswm .tswm-row-go {
	flex: none;
	font-size: 18px;
	line-height: 1;
	color: var(--tswm-muted);
	transition: transform .15s, color .15s;
}
.tswm .tswm-row:hover .tswm-row-go {
	color: var(--tswm-accent);
	transform: translateX(2px);
}

/* ---------- 7. "View all" links ---------- */
.tswm .tswm-all {
	display: inline-block;
	margin-top: 12px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--tswm-accent) !important;
	text-decoration: none !important;
}
.tswm .tswm-all:hover,
.tswm .tswm-all:focus-visible {
	text-decoration: underline !important;
}

/* ---------- 8. Tick list ---------- */
.tswm .tswm-why {
	margin: 0 0 16px !important;
	padding: 0 !important;
	list-style: none !important;
}
.tswm .tswm-why li {
	position: relative;
	margin: 0 0 9px !important;
	padding: 0 0 0 20px !important;
	list-style: none !important;
	font-size: 13px;
	line-height: 1.4;
	color: var(--tswm-text);
}
.tswm .tswm-why li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	top: 0;
	font-weight: 700;
	color: var(--tswm-accent);
}
.tswm .tswm-why li::marker {
	content: "";
}

/* ---------- 9. Buttons ---------- */
.tswm .tswm-btn {
	display: block;
	margin: 0 0 22px;
	padding: 11px 16px;
	border-radius: 9px;
	background: var(--tswm-accent);
	color: #fff !important;
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	text-decoration: none !important;
}
.tswm .tswm-btn:hover,
.tswm .tswm-btn:focus-visible {
	background: var(--tswm-accent-dark);
}
.tswm .tswm-btn-sub {
	display: block;
	margin-top: 3px;
	font-size: 11.5px;
	font-weight: 500;
	opacity: .85;
}

/* ---------- 10. Cards ---------- */
.tswm .tswm-card {
	display: block;
	margin: 0 0 12px;
	padding: 14px 16px;
	border: 1px solid var(--tswm-border);
	border-radius: 12px;
	line-height: 1.4;
	color: var(--tswm-text) !important;
	text-decoration: none !important;
	transition: border-color .15s, background .15s;
}
.tswm .tswm-card:hover,
.tswm .tswm-card:focus-visible {
	border-color: var(--tswm-accent-soft);
	background: var(--tswm-tint-2);
}
.tswm .tswm-card-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}
.tswm .tswm-card-name {
	display: block;
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--tswm-heading);
}
.tswm .tswm-card-text {
	display: block;
	margin: 0 0 10px;
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--tswm-muted);
}
.tswm .tswm-card-list {
	display: block;
	margin: 0 0 10px;
}
.tswm .tswm-card-list > span {
	display: block;
	position: relative;
	margin: 0 0 5px;
	padding-left: 18px;
	font-size: 12.5px;
	line-height: 1.4;
	color: var(--tswm-text);
}
.tswm .tswm-card-list > span::before {
	content: "\2713";
	position: absolute;
	left: 0;
	top: 0;
	font-weight: 700;
	color: var(--tswm-accent);
}
.tswm .tswm-card-link {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--tswm-accent);
}

/* ---------- 11. Bottom banner ---------- */
.tswm .tswm-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 20px;
	padding: 14px 18px;
	border-radius: 12px;
	background: var(--tswm-tint);
}
.tswm .tswm-bl {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}
.tswm .tswm-bi {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	background: #fff;
	font-size: 20px;
}
.tswm .tswm-bt-title,
.tswm .tswm-bt b {
	display: block;
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--tswm-heading);
}
.tswm .tswm-bt-text,
.tswm .tswm-bt small {
	display: block;
	font-size: 12.5px;
	line-height: 1.35;
	color: var(--tswm-muted);
}
.tswm .tswm-bb {
	flex: none;
	padding: 10px 20px;
	border-radius: 9px;
	background: var(--tswm-accent);
	color: #fff !important;
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none !important;
	white-space: nowrap;
}
.tswm .tswm-bb:hover,
.tswm .tswm-bb:focus-visible {
	background: var(--tswm-accent-dark);
}

/* ---------- 12. Trust strip (4 small facts under the columns) ---------- */
.tswm .tswm-trust {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px 16px;
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid var(--tswm-border);
}
.tswm .tswm-trust-item {
	display: flex !important;
	align-items: center;
	gap: 12px;
	min-width: 0;
	padding: 6px 8px;
	border-radius: 10px;
	line-height: 1.3;
	color: var(--tswm-heading) !important;
	text-decoration: none !important;
	transition: background .15s;
}
.tswm a.tswm-trust-item:hover,
.tswm a.tswm-trust-item:focus-visible {
	background: var(--tswm-tint);
}

/* ---------- 13. Smaller screens ---------- */
@media (max-width: 900px) {
	.tswm {
		padding: 16px;
	}
	.tswm .tswm-grid,
	.tswm .tswm-grid.tswm-grid--4 {
		grid-template-columns: 1fr;
	}
	.tswm .tswm-col {
		padding: 16px 0;
		border-left: 0;
		border-top: 1px solid var(--tswm-border);
	}
	.tswm .tswm-col:first-of-type {
		padding-top: 0;
		border-top: 0;
	}
	.tswm .tswm-banner {
		flex-direction: column;
		align-items: flex-start;
	}
	.tswm .tswm-trust {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 600px) {
	.tswm .tswm-trust {
		grid-template-columns: 1fr;
	}
}
