

/* For the CONNECTION SETUP diagram */
.image-container {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 900px;
}

/* Base Image */
.main-image {
    width: 100%;
    display: block;
}


/* Hover Image Layer (Handles smooth transitions) */
.fade-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0; /* Starts fully transparent */
    transition: opacity 0.3s ease-in-out; /* Smooth fade-in */
}
/* Define main hover area for the top-left cable */
#hover-top-left {
    position: absolute;
    top: 0%;
    left: 18%;
    width: 30%;
    height: 20%;
    
    /* 🔥 Highlight the first hover area */
    background: rgba(255, 0, 0, 0.3); /* Red with transparency */
}

/* Extra hover rectangle 1 (inside #hover-top-left) */
#hover-top-left::before {
    content: "";
    position: absolute;
    top: 100%;  /* Move it below the main area */
    left: 0%;
    width: 40%;
    height: 120%;
    
    /* 🔵 Ensure the second rectangle appears */
    display: block;
    background: rgba(255, 0, 0, 0.3); /* Red transparent */
}

#hover-bottom {
    position: absolute;
    top: 68%;
    left: 27%;
    width: 40%;
    height: 15%;
    
    /* 🔥 Highlight the first hover area */
    background: rgba(0, 255, 0, 0.3); /* Red with transparency */
}

#hover-right {
    position: absolute;
    top: 13%;
    left: 53%;
    width: 14%;
    height: 55%;
    
    /* 🔥 Highlight the first hover area */
    background: rgba(0, 0, 255, 0.3); 
}


/* 🛑 Hide ALL hover areas when ANY is hovered */
.hover-zones:hover #hover-top-left,
.hover-zones:hover #hover-bottom,
.hover-zones:hover #hover-right,
.hover-zones:hover #hover-top-left::before {
    background: transparent;
}

/* Make hover areas visible as clickable elements */
#hover-top-left, #hover-bottom, #hover-right {
    cursor: pointer; 
}


/* _______________________________________________________________ */


/* Magnifying Glass Buttons */
.magnify-btn {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease-in-out;
}

/* Magnifying Glass Icon */
.magnify-btn .material-icons {
    font-size: 24px;
    color: #333;
}

/* Position Each Magnifying Glass */
#magnify-top-left {
    top: 5%;
    left: 15%;
}

#magnify-bottom {
    bottom: 10%;
    left: 45%;
}

#magnify-right {
    top: 30%;
    right: 10%;
}

/* Hide Buttons on Hover */
#hover-top-left:hover ~ #magnify-top-left,
#hover-bottom:hover ~ #magnify-bottom,
#hover-right:hover ~ #magnify-right {
    opacity: 0;
}


/* _______________________________________________________________ */


/* Flex camera pinout: table beside the connector diagram */
.pinout-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    margin: 1rem 0;
}

/* Markdown wraps the connector image in a <p>; strip its margin and centre it. */
.pinout-layout p {
    margin: 0;
    text-align: center;
}

.pinout-layout .pinout-diagram {
    width: 100%;
    max-width: 620px;
    height: auto;
    display: block;
    margin: 0 auto;
}

@media (min-width: 992px) {
    .pinout-layout {
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
    }

    .pinout-layout > table {
        flex: 1 1 45%;
        min-width: 0;
    }

    .pinout-layout > p {
        flex: 1 1 55%;
        min-width: 0;
    }
}


/* Core camera photos: single image, or a .pair shown side by side on desktop */
.core-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin: 1.2rem auto;
    max-width: 640px;
}

.core-images p {
    margin: 0;
    text-align: center;
}

.core-images img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

@media (min-width: 992px) {
    .core-images.pair {
        flex-direction: row;
        align-items: flex-start;
        max-width: 760px;
    }

    .core-images.pair > p {
        flex: 1 1 50%;
        min-width: 0;
    }
}


/* _______________________________________________________________ */


/* Connection overview: Core/Flex selector with an interactive Core schematic */
.setup-diagram {
    max-width: 900px;
    margin: 1rem auto 1.5rem;
}

.setup-seg-control {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.setup-seg {
    border: 1px solid #0d73b2;
    background: transparent;
    color: #0d73b2;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.4rem 1.1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.setup-seg:hover { background: rgba(13, 115, 178, 0.1); }
.setup-seg.active { background: #0d73b2; color: #ffffff; }

.setup-panel[hidden] { display: none; }

.setup-panel img.flex-diagram {
    display: block;
    width: 100%;
    max-width: 820px;
    height: auto;
    margin: 0 auto;
}

.setup-hint {
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

/* Interactive Core schematic: base image + fade overlay swapped on hover zones */
.setup-panel .image-container {
    position: relative;
    display: block;
    width: 100%;
    margin: 0 auto;
}

.setup-panel .main-image {
    width: 100%;
    display: block;
}

.setup-panel .fade-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
    pointer-events: none;
}

.setup-panel .hover-zones {
    position: absolute;
    inset: 0;
}

.setup-panel .hz {
    position: absolute;
    cursor: pointer;
    background: transparent;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.setup-panel .hz:hover {
    background: rgba(13, 115, 178, 0.12);
}

.setup-panel .hz-led { top: 0%;  left: 15%; width: 35%; height: 60%; }
.setup-panel .hz-usb { top: 13%; left: 52%; width: 17%; height: 55%; }
.setup-panel .hz-eth { top: 65%; left: 25%; width: 43%; height: 17%; }

@media (max-width: 500px) {
    .setup-seg {
        font-size: 0.8rem;
        padding: 0.35rem 0.75rem;
    }
}
