/* MJK Electric — Commercial Electrical page (templates/website/services/commercial-electrical.html).
   Loaded after css/home_v2.css (tokens, nav, buttons, section heads, statement and stats, the split "live"
   section and its steps, ask bar, call to action, footer), css/services.css (photo header, index strip, check
   lists, city links), css/service_detail.css (photo blocks, questions, related services) and
   css/industrial.css (circuit heads, the cards, the two-column list). See docs/home_v2.md. */

/* ----------------------------------------------------------------- header */
/* the lit framing and the lift sit in the right third of the photo */
.commercial .shero__media img { object-position: 78% 50%; }
@media (min-width: 901px) {
    /* the photo moved right (its left side is as dark as the page behind it), so the headline's second line
       stays clear of the lit framing */
    .commercial .shero__media { transform: translateX(11%) scale(1.08); transform-origin: 0 60%; }
}
.commercial .stat__n small { letter-spacing: .02em; }

/* ------------------------------------------------------------ 01 services */
.com-services { border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }

/* the panel schedule: this page's drawing. A panelboard seen from the front: the bus down the middle, three
   breakers on each side, and the directory beside them. Every circuit is a link to its block below. */
.panel { --bus: 6px; --stub: clamp(12px, 1.8vw, 28px); --brk: 48px;
    position: relative; padding: clamp(18px, 2.2vw, 30px) clamp(16px, 2.4vw, 34px) clamp(20px, 2.4vw, 32px); border: 1px solid var(--line-2); border-radius: 6px;
    background: radial-gradient(60% 80% at 50% 0%, rgba(194, 124, 46, .13), transparent 70%), var(--panel);
    box-shadow: 0 40px 80px -50px rgba(0, 0, 0, .9), 0 0 90px -40px rgba(226, 150, 74, .3); }
.panel__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-bottom: clamp(18px, 2.2vw, 28px); }
.panel__head .mono:first-child { color: var(--copper-hi); font-weight: 600; }
.panel__sheet { color: var(--dim); }

.panel__ckts { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: 1px solid var(--line-2); }
/* the bus, with the same moving highlight as the bus on the services page */
.panel__ckts::before { content: ''; position: absolute; z-index: 1; left: calc(50% - var(--bus) / 2); top: 0; bottom: 0; width: var(--bus); border-radius: 1px;
    background:
        linear-gradient(180deg, transparent 0, transparent 40%, rgba(255, 244, 226, .85) 50%, transparent 60%, transparent 100%) 0 0 / 100% 320px repeat-y,
        linear-gradient(90deg, #e9a55c, #a8651f);
    box-shadow: 0 0 24px rgba(226, 150, 74, .28);
    animation: panelFlow 4.5s linear infinite; }
@keyframes panelFlow { from { background-position: 0 0, 0 0; } to { background-position: 0 320px, 0 0; } }
.panel__ckts li { display: flex; border-bottom: 1px solid var(--line); }
.panel__ckts a { flex: 1; display: grid; align-items: center; column-gap: clamp(10px, 1.4vw, 22px); min-height: 104px; padding: 16px 0; color: #9c6a35; transition: color .35s, background .35s; }
.panel__ckts li:nth-child(odd) a { grid-template-columns: 56px minmax(0, 1fr) var(--brk); padding-right: calc(var(--stub) + var(--bus) / 2); }
.panel__ckts li:nth-child(even) a { grid-template-columns: var(--brk) minmax(0, 1fr) 56px; padding-left: calc(var(--stub) + var(--bus) / 2); }
.panel__ckts li:nth-child(even) .panel__brk { order: 1; }
.panel__ckts li:nth-child(even) .panel__text { order: 2; }
.panel__ckts li:nth-child(even) .panel__k { order: 3; text-align: right; }
.panel__ckts li:nth-child(odd) a:hover, .panel__ckts li:nth-child(odd) a:focus-visible { background: linear-gradient(270deg, rgba(234, 168, 98, .08), transparent 70%); }
.panel__ckts li:nth-child(even) a:hover, .panel__ckts li:nth-child(even) a:focus-visible { background: linear-gradient(90deg, rgba(234, 168, 98, .08), transparent 70%); }
.panel__ckts a:hover, .panel__ckts a:focus-visible { color: var(--copper-hi); }
.panel__k { font-size: .64rem; color: var(--copper-hi); white-space: nowrap; }
.panel__text { display: grid; gap: 6px; min-width: 0; }
.panel__v { font-family: var(--display); font-weight: 600; font-size: clamp(1.2rem, 1.65vw, 1.6rem); line-height: 1.05; letter-spacing: .01em; text-transform: uppercase; color: #fff; text-wrap: balance; transition: color .25s; }
.panel__ckts a:hover .panel__v, .panel__ckts a:focus-visible .panel__v { color: var(--copper-hi); }
.panel__s { font-family: var(--mono); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; line-height: 1.6; color: var(--muted); }
/* a breaker: the case, its handle thrown toward the bus, and the stub that lands on the bus */
.panel__brk { position: relative; width: var(--brk); height: 26px; border: 1.6px solid currentColor; border-radius: 3px; background: var(--panel); transition: box-shadow .35s; }
.panel__brk::before { content: ''; position: absolute; top: 5px; bottom: 5px; right: 6px; width: 15px; border-radius: 1px; background: currentColor; }
.panel__brk::after { content: ''; position: absolute; top: calc(50% - 1px); left: 100%; width: calc(var(--stub) + 2px); height: 2px; background: currentColor; }
.panel__ckts li:nth-child(even) .panel__brk::before { right: auto; left: 6px; }
.panel__ckts li:nth-child(even) .panel__brk::after { left: auto; right: 100%; }
.panel__ckts a:hover .panel__brk, .panel__ckts a:focus-visible .panel__brk { box-shadow: 0 0 16px 1px rgba(226, 150, 74, .45); }

/* circuits 04 to 06: three cards (css/industrial.css lays out four) */
.also--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.also--3 li { padding-bottom: 8px; }

/* ----------------------------------------------------- 02 who we work for */
.com-clients { border-top: 1px solid var(--line); }
.who li { align-items: start; padding: 22px 0 24px; }
.who .mono { padding-top: .5em; }
.who p { max-width: 40em; margin-top: 8px; font-size: 1rem; line-height: 1.6; color: var(--muted); }

/* ------------------------------------------------- 03 how a project works */
/* the electrician and the plan table sit in the left half of the photo */
.com-process .live__media img { object-position: 26% 50%; }
.com-process .steps { margin-top: 30px; }

/* --------------------------------------------------------- 04 arizona heat */
.com-heat { border-top: 1px solid var(--line); background: radial-gradient(900px 520px at 84% 30%, rgba(194, 124, 46, .13), transparent 62%), var(--bg); }
.heat__lede { max-width: 34em; font-size: clamp(1.1rem, 1.5vw, 1.34rem); line-height: 1.6; color: #c9c7c3; }
.heat__lede strong { font-weight: 600; color: #fff; }
.alsowork { margin-top: clamp(28px, 3.4vw, 44px); padding: 20px 24px 22px; border-left: 2px solid var(--copper); background: rgba(194, 124, 46, .08); }
.alsowork h3 { margin-bottom: 8px; font-family: var(--display); font-weight: 600; font-size: clamp(1.35rem, 1.7vw, 1.6rem); line-height: 1.1; letter-spacing: .02em; text-transform: uppercase; color: #fff; }
.alsowork p { max-width: 46em; font-size: .98rem; line-height: 1.65; color: #dcd9d4; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
    .also--3 { grid-template-columns: minmax(0, 1fr); }
    .also--3 li, .also--3 li:first-child { padding: 26px 0 28px; border-left: 0; }
    .also--3 li + li { border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
    /* one column: the bus runs down the left side and every breaker hangs off it */
    .panel__ckts { grid-template-columns: minmax(0, 1fr); }
    .panel__ckts::before { left: 0; }
    .panel__ckts li:nth-child(n) a { grid-template-columns: var(--brk) minmax(0, 1fr); grid-template-rows: auto auto; row-gap: 5px; min-height: 0; padding: 16px 0 16px calc(var(--stub) + var(--bus)); background: none; }
    .panel__ckts li:nth-child(n) .panel__brk { order: 0; grid-column: 1; grid-row: 1 / span 2; }
    .panel__ckts li:nth-child(n) .panel__k { order: 0; grid-column: 2; grid-row: 1; text-align: left; }
    .panel__ckts li:nth-child(n) .panel__text { order: 0; grid-column: 2; grid-row: 2; }
    .panel__ckts li:nth-child(n) .panel__brk::before { right: auto; left: 6px; }
    .panel__ckts li:nth-child(n) .panel__brk::after { left: auto; right: 100%; }
    .commercial .shero__media img { object-position: 72% 50%; }
}
@media (max-width: 599px) {
    .panel { --brk: 40px; --stub: 12px; }
    .panel__sheet { display: none; }
    .panel__v { font-size: 1.16rem; }
    .alsowork { padding: 18px 18px 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .panel__ckts::before { animation: none; background: linear-gradient(90deg, #e9a55c, #a8651f); }
}
