/* ─── RESET & BASE ───────────────────────────────────── */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #eef1f5;
    color: #0b1f2e;
}

/* ─── WIRING HERO ────────────────────────────────────── */

.wiring-hero {
    height: 320px;
    display: flex;
    align-items: center;
    padding: 0 60px;
    position: relative;
    overflow: hidden;
    background-image: url("../images/hero-3.jpg");
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 60px 0 60px; 
}

.wiring-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(11, 31, 46, 0.95) 0%,
        rgba(11, 31, 46, 0.80) 40%,
        rgba(11, 31, 46, 0.40) 70%,
        rgba(11, 31, 46, 0.10) 100%
    );
    z-index: 1;
}

.wiring-hero-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.wiring-hero-content .eyebrow {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #ff5a55;
    font-weight: 900;
    margin: 0 0 14px;
    white-space: nowrap;
}

.wiring-hero h1 {
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -1px;
    margin: 0 0 16px;
    color: white;
    white-space: nowrap;
}

.hero-accent {
    color: white;
    border-bottom: 3px solid #e53935;
    padding-bottom: 2px;
}

.wiring-hero p {
    font-size: 17px;
    line-height: 1.65;
    color: rgba(255,255,255,0.88);
    margin: 0;
    max-width: 520px;
}

/* ─── LAYOUT ─────────────────────────────────────────── */

.wiring-layout {
    max-width: 1400px;
    margin: 48px auto 0;
    padding: 0 48px;
}

/* ─── DIAGRAM SECTION ────────────────────────────────── */

.diagram-section {
    margin: 0 0 64px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.diagram-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.diagram-inner {
    background: white;
    border-radius: 18px;
    padding: 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
    box-shadow: 0 12px 40px rgba(11,31,46,0.10);
    border: 1px solid rgba(11,31,46,0.07);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.diagram-inner:hover {
    box-shadow: 0 20px 60px rgba(11,31,46,0.14);
    transform: translateY(-3px);
}

/* Red left accent stripe */
.diagram-inner::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(to bottom, #e53935, rgba(229,57,53,0.15));
    border-radius: 18px 0 0 18px;
}

/* Reversed layout */
.diagram-inner--reversed {
    grid-template-columns: 1fr 1fr;
}

.diagram-inner--reversed .diagram-image-wrap {
    order: 2;
}

.diagram-inner--reversed .diagram-text {
    order: 1;
}

/* ─── DIAGRAM IMAGE ──────────────────────────────────── */

.diagram-image-wrap {
    position: relative;
}

.diagram-image-frame {
    background: #f0f3f7;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.diagram-image-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        rgba(229,57,53,0.04) 0%,
        transparent 70%
    );
    pointer-events: none;
}

.diagram-img {
    width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: contain;
    transition: transform 0.35s ease;
    cursor: zoom-in;
}

.diagram-image-frame:hover .diagram-img {
    transform: scale(1.02);
}

/* View full size button */
.diagram-view-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(11,31,46,0.45);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.25s ease;
    font-family: Arial, Helvetica, sans-serif;
}

.diagram-view-btn:hover {
    color: #e53935;
}

/* ─── DIAGRAM TEXT ───────────────────────────────────── */

.diagram-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-eyebrow {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #e53935;
    display: block;
}

.diagram-text h2 {
    font-size: clamp(24px, 2.5vw, 32px);
    font-weight: 700;
    color: #0b1f2e;
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin: 0;
}

.diagram-text > p {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(11,31,46,0.7);
    margin: 0;
}

/* ─── WIRE SPEC BOX ──────────────────────────────────── */

.wire-spec-box {
    background: #f4f7fb;
    border-left: 3px solid #e53935;
    border-radius: 0 10px 10px 0;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wire-spec-title {
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #e53935;
    margin: 0;
}

.wire-spec-box p {
    font-size: 14px;
    line-height: 1.65;
    color: rgba(11,31,46,0.65);
    margin: 0;
}

/* ─── DOWNLOAD BUTTONS ───────────────────────────────── */

.diagram-downloads {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    background: #e53935;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    white-space: nowrap;
}

.download-btn:hover {
    background: #c62828;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(229,57,53,0.35);
}

.download-btn--secondary {
    background: transparent;
    color: #0b1f2e;
    border: 1px solid rgba(11,31,46,0.2);
}

.download-btn--secondary:hover {
    background: rgba(11,31,46,0.05);
    box-shadow: none;
    border-color: rgba(11,31,46,0.4);
    color: #0b1f2e;
}

/* ─── DIVIDER ────────────────────────────────────────── */

.wiring-divider {
    border: none;
    border-top: 1px solid rgba(11,31,46,0.08);
    margin: 0 0 64px;
    position: relative;
}

.wiring-divider::after {
    content: "";
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #e53935;
}

/* ─── BOTTOM CTA STRIP ───────────────────────────────── */

.wiring-cta-strip {
    background: #0b1f2e;
    border-top: 1px solid rgba(255,255,255,0.07);
    margin-top: 0;
    padding: 64px 60px;
    position: relative;
    overflow: hidden;
}

.wiring-cta-strip::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(229,57,53,0.12), transparent 70%);
    pointer-events: none;
}

.cta-strip-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

.cta-strip-text {
    max-width: 620px;
}

.cta-strip-eyebrow {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #e53935;
    margin: 0 0 12px;
}

.cta-strip-heading {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 700;
    color: white;
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin: 0 0 14px;
}

.cta-strip-sub {
    font-size: 16px;
    color: rgba(255,255,255,0.6);
    line-height: 1.65;
    margin: 0;
}

.cta-strip-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
}

.cta-btn-primary {
    display: inline-block;
    padding: 14px 32px;
    background: #e53935;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    text-align: center;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.cta-btn-primary:hover {
    background: #c62828;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(229,57,53,0.4);
}

.cta-btn-secondary {
    display: inline-block;
    padding: 13px 32px;
    background: transparent;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.25s ease;
}

.cta-btn-secondary:hover {
    color: white;
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.05);
}

/* ─── FOOTER ─────────────────────────────────────────── */

.site-footer {
    background: #0b1f2e;
    color: rgba(255,255,255,0.8);
    text-align: center;
    padding: 36px 20px;
    font-size: 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-content p {
    margin: 6px 0;
}

/* ─── IMAGE ZOOM OVERLAY ─────────────────────────────── */

.diagram-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11,31,46,0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: zoom-out;
}

.diagram-overlay.active {
    opacity: 1;
}

.diagram-overlay-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 32px 80px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.diagram-overlay.active .diagram-overlay-img {
    transform: scale(1);
}

.diagram-overlay-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease;
}

.diagram-overlay-close:hover {
    background: #e53935;
    border-color: #e53935;
}
/* ─── RESPONSIVE ─────────────────────────────────────── */

@media (max-width: 960px) {
    .diagram-inner,
    .diagram-inner--reversed {
        grid-template-columns: 1fr;
        padding: 36px 28px;
        gap: 32px;
    }

    .diagram-inner--reversed .diagram-image-wrap,
    .diagram-inner--reversed .diagram-text {
        order: unset;
    }

    .wiring-layout {
        padding: 0 24px;
    }

    .wiring-hero {
        padding: 0 32px;
    }

    .wiring-hero h1 {
        white-space: normal;
        font-size: 36px;
    }

    .cta-strip-inner {
        flex-direction: column;
        text-align: center;
    }

    .cta-strip-actions {
        width: 100%;
    }

    .cta-btn-primary,
    .cta-btn-secondary {
        width: 100%;
    }

    .wiring-cta-strip {
        padding: 48px 32px;
    }
}