/*
Theme Name:   ClearPath Child
Theme URI:    https://clearpathtrafficcontrol.com/
Description:  ClearPath Traffic Control theme — brand header with the services mega menu, mobile drawer, service templates and footer. Built as a child of Hello Elementor so pages can be edited with Elementor. Colours come from the ClearPath logo: red #DA0113, charcoal #2A2B2C, forest green #01581F.
Author:       ClearPath Traffic Control Ltd.
Template:     hello-elementor
Version:      1.1.1
Requires PHP: 7.4
Text Domain:  clearpath-child
*/

/* The design system itself is loaded by the ClearPath Core plugin
   (assets/css/clearpath.css) so it also applies inside the Elementor editor.
   Only WordPress-specific adjustments belong here. */

/* ---------- Elementor & Hello Elementor resets ----------
   Hello Elementor caps .site-main at its content width using a high-specificity
   selector. ClearPath sections set their own width with .wrap, so the main
   element has to run full-bleed. */
body:not([class*="elementor-page-"]) .site-main,
body .site-main,
.site-main{max-width:none!important;width:100%;margin-inline:0;padding-inline:0!important}
.site-main > .page-content,
.entry-content,
.page-content{max-width:none;width:100%;margin:0;padding:0}
.elementor-section.elementor-section-boxed > .elementor-container{max-width:var(--wrap)}
.site-header + .site-main{margin-top:0}

/* Elementor sometimes forces widths on images inside our components. */
.svc-card img,
.split-media img,
.svc-hero-media img,
.hero-slide img{max-width:100%}

/* ---------- Admin bar offset for the sticky header ---------- */
.admin-bar .site-header{top:32px}
@media (max-width:782px){.admin-bar .site-header{top:46px}}
@media (max-width:600px){.admin-bar .site-header{top:0}}

/* ---------- Blog / archive fallbacks ---------- */
.cp-post-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius-lg);overflow:hidden;height:100%;display:flex;flex-direction:column}
.cp-post-card img{width:100%;aspect-ratio:16/10;object-fit:cover}
.cp-post-card .body{padding:26px 24px;display:flex;flex-direction:column;flex:1}
.cp-post-card h3{font-size:1.2rem;margin-bottom:10px}
.cp-post-card .link-arrow{margin-top:auto}
.cp-pagination{display:flex;gap:10px;justify-content:center;margin-top:46px;flex-wrap:wrap}
.cp-pagination .page-numbers{display:grid;place-items:center;min-width:44px;height:44px;padding:0 12px;border-radius:12px;border:1px solid var(--line);font-family:var(--ff-display);font-weight:700;color:var(--charcoal)}
.cp-pagination .page-numbers.current,.cp-pagination .page-numbers:hover{background:var(--red);border-color:var(--red);color:#fff}

/* ---------- Comments (kept minimal — the site has none by default) ---------- */
.comment-form input[type=text],.comment-form input[type=email],.comment-form input[type=url],.comment-form textarea{
  width:100%;padding:14px 16px;border:1.5px solid var(--line);border-radius:12px
}
.comment-form input[type=submit]{
  padding:16px 28px;background:var(--red);color:#fff;border:0;border-radius:12px;cursor:pointer;
  font-family:var(--ff-display);font-weight:700;letter-spacing:.08em;text-transform:uppercase
}
