/*
Theme Name: Mid South Trailers
Theme URI: https://midsouth-trailers.com/
Author: Mid South Trailers
Description: Lightweight, dependency-free replacement for the Induscity theme. Renders existing WPBakery (vc_*) and Revolution Slider shortcodes without those plugins, so current page content displays correctly on modern PHP.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: midsouth-trailers
Tags: one-column, custom-logo, custom-menu, translation-ready, accessibility-ready
*/

/* ---------------------------------------------------------------
   Tokens
---------------------------------------------------------------- */
:root {
	--ms-accent: #f7c02d;
	--ms-accent-ink: #1b1b1b;
	--ms-dark: #0b0b0b;
	--ms-dark-2: #161616;
	--ms-ink: #2b2b2b;
	--ms-text: #555;
	--ms-muted: #8a8a8a;
	--ms-line: #e8e8e8;
	--ms-bg: #fff;
	--ms-bg-alt: #f5f5f3;
	--ms-radius: 3px;
	--ms-max: 1170px;
	--ms-gutter: 30px;
	--ms-font: "Hind", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------------------------------------------------------------
   Base
---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--ms-bg);
	color: var(--ms-text);
	font-family: var(--ms-font);
	font-size: 17px;
	font-weight: 400;
	line-height: 1.65;
	overflow-wrap: break-word;
}
img, video, iframe { max-width: 100%; height: auto; }
img { border: 0; vertical-align: middle; }
a { color: var(--ms-ink); text-decoration: underline; text-decoration-color: var(--ms-accent); text-underline-offset: 3px; transition: color .2s; }
a:hover, a:focus { color: #000; }
:focus-visible { outline: 3px solid var(--ms-accent); outline-offset: 2px; }

h1, h2, h3, h4, h5, h6 {
	color: var(--ms-ink);
	font-family: var(--ms-font);
	font-weight: 600;
	line-height: 1.2;
	margin: 1.4em 0 .6em;
}
h1 { font-size: clamp(28px, 4vw, 38px); }
h2 { font-size: clamp(24px, 3vw, 30px); }
h3 { font-size: 22px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; text-transform: uppercase; letter-spacing: .05em; }
p { margin: 0 0 1.1em; }
strong, b { font-weight: 600; color: var(--ms-ink); }
hr {
	border: 0;
	height: 4px;
	width: 60px;
	background: var(--ms-accent);
	border-radius: 4px;
	margin: 1.5em 0;
}
blockquote { margin: 0 0 1.5em; padding: .5em 0 .5em 1.25em; border-left: 4px solid var(--ms-accent); font-style: italic; }
table { border-collapse: collapse; width: 100%; margin-bottom: 1.5em; }
th, td { border: 1px solid var(--ms-line); padding: .5em .75em; text-align: left; }
address { font-style: normal; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; margin: 0;
	left: 8px; top: 8px; z-index: 100000; padding: 12px 18px;
	background: #fff; color: var(--ms-ink); font-weight: 600;
}

.ms-container { width: 100%; max-width: var(--ms-max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .ms-container { padding: 0 24px; } }

.ms-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 48px; padding: 0 22px;
	background: var(--ms-accent); color: var(--ms-accent-ink);
	border: 0; border-radius: var(--ms-radius);
	font: 600 16px/1 var(--ms-font);
	text-decoration: none; white-space: nowrap; cursor: pointer;
	transition: filter .2s, transform .2s;
}
.ms-btn:hover, .ms-btn:focus { color: var(--ms-accent-ink); filter: brightness(.95); }
.ms-btn svg { width: 18px; height: 18px; flex: none; }

/* ---------------------------------------------------------------
   Header
---------------------------------------------------------------- */
.ms-topbar { background: var(--ms-dark); color: #bdbdbd; font-size: 14px; }
.ms-topbar .ms-container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; padding-top: 8px; padding-bottom: 8px; }
.ms-topbar a { color: #fff; text-decoration: none; font-weight: 500; }
.ms-topbar a:hover { color: var(--ms-accent); }

.ms-header { background: #fff; position: relative; z-index: 50; }
.ms-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 18px; padding-bottom: 18px; }
.ms-brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ms-brand .custom-logo-link { display: block; line-height: 0; }
.ms-brand .custom-logo { max-height: 90px; width: auto; }
.ms-brand__title { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.1; color: var(--ms-ink); }
.ms-brand__title a { color: inherit; text-decoration: none; }
.ms-brand__tagline { margin: 2px 0 0; font-size: 15px; color: var(--ms-muted); }
.ms-header__actions { display: flex; align-items: center; gap: 12px; }

.ms-nav-toggle {
	display: none; width: 48px; height: 48px; padding: 0;
	background: var(--ms-dark); border: 0; border-radius: var(--ms-radius); cursor: pointer;
	position: relative;
}
.ms-nav-toggle__bars, .ms-nav-toggle__bars::before, .ms-nav-toggle__bars::after {
	position: absolute; left: 13px; width: 22px; height: 2px; background: #fff; content: ""; transition: transform .2s, opacity .2s;
}
.ms-nav-toggle__bars { top: 23px; }
.ms-nav-toggle__bars::before { top: -7px; left: 0; }
.ms-nav-toggle__bars::after { top: 7px; left: 0; }
.ms-nav-toggle[aria-expanded="true"] .ms-nav-toggle__bars { background: transparent; }
.ms-nav-toggle[aria-expanded="true"] .ms-nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.ms-nav-toggle[aria-expanded="true"] .ms-nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

/* Primary navigation (desktop) */
.ms-nav { background: var(--ms-dark-2); border-bottom: 4px solid var(--ms-accent); }
.ms-menu, .ms-menu ul { list-style: none; margin: 0; padding: 0; }
.ms-menu { display: flex; flex-wrap: wrap; }
.ms-menu li { position: relative; }
.ms-menu a {
	display: block; color: #fff; text-decoration: none;
	font-weight: 600; font-size: 15px; letter-spacing: .03em;
}
.ms-menu > li > a { padding: 18px 20px; text-transform: uppercase; }
.ms-menu > li:first-child > a { padding-left: 0; }
.ms-menu > li > a:hover,
.ms-menu > li:focus-within > a,
.ms-menu > .current-menu-item > a,
.ms-menu > .current-menu-parent > a,
.ms-menu > .current-menu-ancestor > a,
.ms-menu > .current_page_item > a,
.ms-menu > .current_page_ancestor > a { color: var(--ms-accent); }

.ms-menu .menu-item-has-children > a::after,
.ms-menu .page_item_has_children > a::after {
	content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: translateY(-3px) rotate(45deg);
}
.ms-menu ul {
	position: absolute; top: 100%; left: 0; min-width: 240px; z-index: 100;
	background: var(--ms-dark); border-top: 3px solid var(--ms-accent);
	box-shadow: 0 10px 24px rgba(0,0,0,.25);
	opacity: 0; visibility: hidden; transform: translateY(8px);
	transition: opacity .2s, transform .2s, visibility .2s;
}
.ms-menu ul ul { top: -3px; left: 100%; }
.ms-menu li:hover > ul,
.ms-menu li:focus-within > ul,
.ms-menu li.is-open > ul { opacity: 1; visibility: visible; transform: none; }
.ms-menu ul a { padding: 13px 20px; font-weight: 400; color: #c8c8c8; border-bottom: 1px solid #222; }
.ms-menu ul li:last-child > a { border-bottom: 0; }
.ms-menu ul a:hover, .ms-menu ul .current-menu-item > a, .ms-menu ul .current_page_item > a { color: #fff; background: #1d1d1d; }

.ms-submenu-toggle { display: none; }

/* Mobile navigation */
@media (max-width: 900px) {
	.ms-nav-toggle { display: block; }
	.ms-header__call span { display: none; }
	.ms-header__call { padding: 0 14px; }
	.ms-brand .custom-logo { max-height: 64px; }
	.ms-brand__title { font-size: 21px; }

	.ms-nav { display: none; border-bottom-width: 3px; }
	.ms-nav.is-open { display: block; }
	.ms-nav .ms-container { padding: 0; }
	.ms-menu { flex-direction: column; }
	.ms-menu li { border-top: 1px solid #262626; }
	.ms-menu > li > a, .ms-menu > li:first-child > a { padding: 15px 64px 15px 16px; }
	.ms-menu .menu-item-has-children > a::after,
	.ms-menu .page_item_has_children > a::after { display: none; }
	.ms-menu ul {
		position: static; opacity: 1; visibility: visible; transform: none;
		box-shadow: none; border-top: 0; min-width: 0; display: none; background: #0f0f0f;
	}
	.ms-menu li:hover > ul, .ms-menu li:focus-within > ul { display: none; }
	.ms-menu li.is-open > ul { display: block; }
	.ms-menu ul a { padding: 13px 16px 13px 32px; border-bottom: 0; }
	.ms-submenu-toggle {
		display: block; position: absolute; top: 0; right: 0; width: 56px; height: 52px;
		background: transparent; border: 0; border-left: 1px solid #262626; cursor: pointer; color: #fff;
	}
	.ms-submenu-toggle::before {
		content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -6px 0 0 -4px;
		border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s;
	}
	.ms-submenu-toggle[aria-expanded="true"]::before { transform: translateY(4px) rotate(-135deg); color: var(--ms-accent); }
}
@media (max-width: 560px) {
	.ms-topbar .ms-container { justify-content: center; text-align: center; }
	.ms-topbar__address { display: none; }
}

/* ---------------------------------------------------------------
   Page head + content
---------------------------------------------------------------- */
.ms-main { display: block; }
.ms-pagehead { background: var(--ms-bg-alt); border-bottom: 1px solid var(--ms-line); }
.ms-pagehead .ms-container { padding-top: 34px; padding-bottom: 30px; }
.ms-pagehead__title { margin: 0; padding-bottom: 14px; position: relative; }
.ms-pagehead__title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 60px; height: 4px; border-radius: 4px; background: var(--ms-accent); }

.ms-content { padding-top: 40px; padding-bottom: 64px; }
.ms-content > :first-child { margin-top: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: .25em; }
.entry-content ul li::marker { color: var(--ms-accent); font-size: 1.15em; }
.entry-content h3 { margin-top: 1.2em; }
.entry-content hr { margin-left: auto; margin-right: auto; }

.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, figcaption { font-size: 14px; color: var(--ms-muted); margin-top: .4em; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 1.5em; }
.gallery-item { margin: 0; }
.gallery-item img { width: 100%; height: auto; }

/* ---------------------------------------------------------------
   WPBakery compatibility layout (vc_* shortcodes)
---------------------------------------------------------------- */
.vc-row {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: var(--ms-gutter);
	row-gap: 0;
	align-items: center;
	margin-bottom: 24px;
}
.vc-row:last-child { margin-bottom: 0; }
.vc-row--inner { margin-bottom: 16px; }
.vc-col { grid-column: span var(--span, 12); min-width: 0; }
.vc-col > :first-child, .vc-text > :first-child { margin-top: 0; }
.vc-col > :last-child, .vc-text > :last-child { margin-bottom: 0; }
.vc-text { margin-bottom: 16px; }
.vc-text img { display: block; margin: 0 auto; }
.vc-text p > img:only-child { margin: 0 auto; }
.vc-col--image-only { text-align: center; }
.vc-col--image-only[style*="--span:12"] img { width: 100%; height: auto; }

/* Product spec rows: two columns with a card feel */
.vc-row.vc-row--split { padding: 28px; background: #fff; border: 1px solid var(--ms-line); border-radius: var(--ms-radius); }
.vc-row.vc-row--split + .vc-row.vc-row--split { margin-top: -1px; }

@media (max-width: 767px) {
	.vc-row { grid-template-columns: minmax(0, 1fr); row-gap: 16px; }
	.vc-col { grid-column: 1 / -1; }
	.vc-row.vc-row--split { padding: 20px 16px; }
}

.vc-image { margin: 0 0 16px; }
.vc-image--center { text-align: center; }
.vc-image--right { text-align: right; }
.vc-image img { display: inline-block; }
.vc-space { display: block; }
.vc-text-sep { display: flex; align-items: center; gap: 16px; margin: 1.5em 0; font-weight: 600; color: var(--ms-ink); }
.vc-text-sep::before, .vc-text-sep::after { content: ""; flex: 1; height: 1px; background: var(--ms-line); }
.vc-btn-wrap { margin: 0 0 16px; }
.vc-btn-wrap--center { text-align: center; }
.vc-btn-wrap--right { text-align: right; }
.vc-message { padding: 16px 20px; border-left: 4px solid var(--ms-accent); background: var(--ms-bg-alt); margin-bottom: 16px; }
.vc-toggle { border: 1px solid var(--ms-line); border-radius: var(--ms-radius); margin-bottom: 10px; }
.vc-toggle > summary { cursor: pointer; padding: 14px 18px; font-weight: 600; color: var(--ms-ink); }
.vc-toggle > div { padding: 0 18px 14px; }
.vc-video { aspect-ratio: 16 / 9; margin-bottom: 16px; }
.vc-video iframe { width: 100%; height: 100%; }

/* Revolution Slider fallbacks */
.ms-banner { margin: 0 0 32px; line-height: 0; }
.ms-banner img { width: 100%; height: auto; max-height: 420px; object-fit: cover; border-radius: var(--ms-radius); }
.ms-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 24px 0; }
.ms-photo-grid a { display: block; line-height: 0; overflow: hidden; border-radius: var(--ms-radius); }
.ms-photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .3s; }
.ms-photo-grid a:hover img { transform: scale(1.04); }

/* ---------------------------------------------------------------
   Posts / archives / 404
---------------------------------------------------------------- */
.ms-post { padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid var(--ms-line); }
.ms-post:last-child { border-bottom: 0; }
.ms-post__title { margin: 0 0 .3em; }
.ms-post__title a { text-decoration: none; }
.ms-post__meta { font-size: 14px; color: var(--ms-muted); margin-bottom: 1em; }
.ms-pagination { display: flex; gap: 8px; flex-wrap: wrap; }
.ms-pagination .page-numbers { display: inline-block; min-width: 44px; padding: 10px 14px; text-align: center; border: 1px solid var(--ms-line); text-decoration: none; }
.ms-pagination .current { background: var(--ms-accent); border-color: var(--ms-accent); color: var(--ms-accent-ink); }
.ms-404 { text-align: center; padding: 40px 0; }
.ms-404__code { font-size: clamp(80px, 18vw, 160px); font-weight: 700; line-height: 1; color: var(--ms-accent); margin: 0; }
.search-form { display: flex; gap: 8px; max-width: 460px; margin: 0 auto; }
.search-form label { flex: 1; }
.search-field, input[type="text"], input[type="email"], input[type="tel"], input[type="url"], textarea {
	width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; color: var(--ms-ink);
	border: 1px solid #d6d6d6; border-radius: var(--ms-radius); background: #fff;
}
.search-submit, input[type="submit"], button[type="submit"] {
	min-height: 48px; padding: 0 20px; background: var(--ms-accent); color: var(--ms-accent-ink);
	border: 0; border-radius: var(--ms-radius); font: 600 16px/1 var(--ms-font); cursor: pointer;
}
.comments-area { margin-top: 40px; }
.comment-list { list-style: none; padding: 0; }

/* ---------------------------------------------------------------
   Footer
---------------------------------------------------------------- */
.ms-footer { background: var(--ms-dark); color: #a9a9a9; font-size: 15px; }
.ms-footer a { color: #e6e6e6; text-decoration: none; }
.ms-footer a:hover { color: var(--ms-accent); }
.ms-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 48px; }
.ms-footer__title { color: #fff; font-size: 22px; font-weight: 700; margin: 0 0 .6em; }
.ms-footer__heading { color: #fff; font-size: 16px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 18px; padding-bottom: 10px; position: relative; }
.ms-footer__heading::after { content: ""; position: absolute; left: 0; bottom: 0; width: 36px; height: 3px; background: var(--ms-accent); border-radius: 3px; }
.ms-footer address { margin-bottom: 1em; line-height: 1.7; }
.ms-footer__phone { font-size: 20px; font-weight: 600; }
.ms-footer-menu, .ms-footer-menu ul { list-style: none; margin: 0; padding: 0; }
.ms-footer-menu li { padding: 4px 0; }
.ms-footer-menu ul { padding-left: 14px; }
.ms-footer__grid--widgets { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
.ms-footer .widget { margin-bottom: 24px; }
.ms-footer .widget:last-child { margin-bottom: 0; }
.ms-footer .widget-title,
.ms-footer .widget h2,
.ms-footer .widget h3,
.ms-footer .widget .wp-block-heading { color: #fff; font-size: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 14px; }
.ms-footer .widget ul { list-style: none; margin: 0; padding: 0; }
.ms-footer .widget li { padding: 4px 0; }
.ms-footer__bottom { border-top: 1px solid #222; font-size: 14px; }
.ms-footer__bottom .ms-container { padding-top: 18px; padding-bottom: 18px; }
.ms-footer__bottom p { margin: 0; }
@media (max-width: 900px) { .ms-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .ms-footer__grid { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; } }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; }
}
