/*
Theme Name: Westmont Divi
Description: Westmont Metal Manufacturing on Divi (replaces the Industrial theme and WPBakery).
Template: Divi
Version: 1.0.0
*/

:root {
	--wm-red: #e82a2a;
	--wm-navy: #1d204b;
	--wm-ink: #0d0f23;
	--wm-text: #898989;
	--wm-grey-bg: #f8f9f9;
}

body, p, li { font-family: "PT Sans", sans-serif; font-size: 14px; color: var(--wm-text); }
h1, h2, h3, h4, h5, h6, #top-menu a, .et_pb_button, .wm-card-more a { font-family: "Montserrat", sans-serif; }

/* Header */
#top-menu li a { text-transform: uppercase; font-weight: 500; font-size: 13px; }
#top-menu li.current-menu-item > a, #top-menu li.current-menu-ancestor > a, #top-menu li a:hover { color: var(--wm-red) !important; opacity: 1; }
#top-menu li li a { text-transform: none; }
@media (min-width: 981px) and (max-width: 1280px) { #top-menu > li { padding-right: 16px; } #top-menu > li > a { font-size: 12px; } }

/* Page title banner (sub-pages) */
.wm-banner { background-size: cover; background-position: center; }
.wm-banner-title h1 { text-align: center; text-transform: uppercase; font-weight: 500; font-size: 36px; color: #4e4e4e; padding: 0; }
@media (max-width: 767px) { .wm-banner-title h1 { font-size: 24px; } }

/* Section headings: red slash, then the title */
.wm-heading { text-transform: uppercase; font-weight: 900; font-size: 24px; color: var(--wm-navy); padding-bottom: 6px; }
.wm-heading::before { content: ""; display: inline-block; width: 7px; height: 20px; margin-right: 16px; background: var(--wm-red); transform: skewX(-20deg); vertical-align: -2px; }

/* Feature cards (What We Do, Equipment, home) */
.wm-card { background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .12); }
.wm-card .et_pb_text_inner { padding-bottom: 20px; }
.wm-card-image { display: block; border-bottom: 4px solid var(--wm-red); }
.wm-card-image img { display: block; width: 100%; }
.wm-card-title { padding: 18px 22px 8px; font-size: 16px; font-weight: 500; text-transform: uppercase; line-height: 1.3; }
.wm-card-title a { color: #000; }
.wm-card:hover .wm-card-title a { color: var(--wm-red); }
.wm-card-icon { width: 18px; height: auto; margin-right: 10px; vertical-align: -2px; }
.wm-card-text { padding: 0 22px; }
.wm-card-more { padding: 8px 22px 0; }
.wm-card-more a { color: var(--wm-red); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .5px; }

/* Side menus */
.wm-side .widgettitle { font-size: 16px; font-weight: 500; color: #000; padding-bottom: 12px; }
.wm-side ul { padding: 0 !important; border-right: 1px solid #e5e5e5; }
.wm-side li { list-style: none; margin: 0 !important; padding: 0 !important; border-top: 1px solid #e5e5e5; }
/* .et_pb_widget in the selectors outranks Divi's widget link colors, which Jetpack Boost's CSS bundling loads after ours */
.wm-side .et_pb_widget li a { display: block; padding: 14px 18px; color: var(--wm-text); line-height: 1.5; }
.wm-side .et_pb_widget li a:hover { color: var(--wm-red); }
.wm-side .et_pb_widget li.current-menu-item a { background: var(--wm-red); color: #fff; }
@media (max-width: 980px) { .wm-with-side .et_pb_column_1_4 { margin-bottom: 30px; } }

/* Galleries: columns follow the old [gallery columns=...] setting on desktop */
.wm-gallery .et_pb_gallery_item { margin-bottom: 20px !important; }
@media (min-width: 981px) {
	.wm-gallery .et_pb_gallery_items { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
	.wm-gallery.wm-cols-1 .et_pb_gallery_items { grid-template-columns: 1fr; }
	.wm-gallery.wm-cols-2 .et_pb_gallery_items { grid-template-columns: repeat(2, 1fr); }
	.wm-gallery.wm-cols-6 .et_pb_gallery_items { grid-template-columns: repeat(6, 1fr); }
	.wm-gallery .et_pb_gallery_item { width: auto !important; margin: 0 !important; clear: none !important; }
}
.wm-carousel .et_pb_gallery_image img { width: 100%; }

/* Contact details */
.wm-contact { padding: 0 !important; list-style: none; }
.wm-contact li { list-style: none; padding: 6px 0 6px 28px !important; position: relative; }
.wm-ci-icon { position: absolute; left: 0; top: 7px; color: var(--wm-red); }
.wm-contact a { color: var(--wm-text); }
.wm-contact a:hover { color: var(--wm-red); }

/* Testimonials */
.wm-testimonials .et_pb_slide { padding: 0 8%; }
.wm-testimonials .et_pb_slide_description { text-align: left; padding: 20px 0 !important; }
/* Two per slide (wm-t-pair), stacked on phones */
.wm-t-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
@media (max-width: 767px) { .wm-t-pair { grid-template-columns: 1fr; gap: 24px; } }
.wm-testimonials .wm-t-name { font-size: 20px; font-weight: 400; color: #000 !important; text-shadow: none !important; padding-bottom: 4px; }
.wm-testimonials .et_pb_slide_content, .wm-testimonials .et_pb_slide_content p { color: var(--wm-text) !important; text-shadow: none !important; font-size: 14px; }
.wm-testimonials .et_pb_slide_content p.wm-t-role { color: var(--wm-red) !important; padding-bottom: 8px; }
.wm-testimonials, .wm-testimonials .et_pb_slide, .wm-testimonials .et_pb_slides { background: none !important; box-shadow: none !important; border: 0 !important; }
.wm-testimonials .box-shadow-overlay { display: none; }
.wm-testimonials .et-pb-arrow-prev, .wm-testimonials .et-pb-arrow-next { color: #bbb; }

/* Full-width strips (sliders, map) */
.wm-hero .et_pb_code, .wm-cta .et_pb_code, .wm-fullwidth .et_pb_code { margin: 0 !important; }
.wm-map { display: block; }

/* Buttons */
.wm-button.et_pb_button { color: #fff; background: var(--wm-red); border: 0; font-size: 12px; text-transform: uppercase; }

/* Footer */
#main-footer { background: var(--wm-ink); }
#footer-widgets .footer-widget .title { color: #fff; font-size: 16px; font-weight: 500; position: relative; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
#footer-widgets .footer-widget .title::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 40%; height: 2px; background: var(--wm-red); }
#footer-widgets .footer-widget, #footer-widgets .footer-widget p { color: #7f7f7f; }
#footer-widgets .footer-widget a.important { color: var(--wm-red); }
#footer-bottom { display: none; }

/* Contact Form 7 (contact and quote forms) */
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 input[type="date"], .wpcf7 input[type="number"], .wpcf7 select, .wpcf7 textarea {
	width: 100%; max-width: 100%; padding: 12px 14px; margin: 0 0 12px; border: 1px solid #e1e1e1; background: #fafafa; color: #555; font-size: 14px; border-radius: 0; box-sizing: border-box;
}
.wpcf7 textarea { min-height: 140px; }
.wpcf7 input:focus, .wpcf7 select:focus, .wpcf7 textarea:focus { border-color: var(--wm-red); outline: 0; background: #fff; }
.wpcf7 input[type="submit"] { background: var(--wm-red); color: #fff; border: 0; padding: 12px 30px; font-family: "Montserrat", sans-serif; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .5px; cursor: pointer; }
.wpcf7 input[type="submit"]:hover { background: var(--wm-navy); }
.wpcf7 .wpcf7-list-item { margin: 0 12px 0 0; }

/* A section holding only a heading hugs the section below it */
.wm-heading-only.et_pb_section { padding-bottom: 0 !important; }
.wm-heading-only + .et_pb_section { padding-top: 16px !important; }

/* Home "What We Do" cards: all the same size; the description slides up over the image on hover or keyboard focus.
   wm-cards.js sets each card's height and --wm-title-h so the longest description fits. Touch and narrow screens keep the
   expanded layout above. */
@media (hover: hover) and (min-width: 981px) {
	.wm-card-slide .et_pb_text_inner { position: relative; overflow: hidden; padding-bottom: 0 !important; }
	.wm-card-slide .wm-card-image { height: calc(100% - var(--wm-title-h, 90px)); background: #0b1150; }
	.wm-card-slide .wm-card-image img { width: 100%; height: 100%; object-fit: contain; }
	.wm-card-slide .wm-card-panel { position: absolute; left: 0; right: 0; bottom: 0; height: var(--wm-title-h, 90px); overflow: hidden;
		background: #fff; transition: height .35s ease; }
	.wm-card-slide .wm-card-title { padding: 0 22px; height: var(--wm-title-h, 90px); display: flex; align-items: center; }
	.wm-card-slide .wm-card-more { padding-bottom: 20px; }
	.wm-card-slide:hover .wm-card-panel, .wm-card-slide:focus-within .wm-card-panel { height: 100%; }
	.wm-card-slide:hover .wm-card-title a, .wm-card-slide:focus-within .wm-card-title a { color: var(--wm-red); }
}
@media (prefers-reduced-motion: reduce) { .wm-card-slide .wm-card-panel { transition: none; } }

/* Page H1 kept for search engines and screen readers where the design has no visible title (home, Our Location) */
.wm-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0 !important; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
