/*
  Page-specific stylesheet for Robotics & Automation Industry Page
  Version: 1.0 - "The Architecture of Intelligent Automation" Soul Injected
*/

/* --- Shell Module Consistency --- */
.page-hero,
.final-cta-section {
    background-image: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5)), url(../images/backgrounds/bg-industry-robotics.jpg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* --- Universal Section Spacing & Subtitles --- */
.technologies-robo-section,
.materials-robo-section {
    padding: var(--section-padding);
}

.technologies-robo-intro .section-subtitle {
    max-width: 700px;
    margin: -2.5rem auto 3rem auto;
}

/* --- Section 1: Core Technologies (Light BG, "Technical Node Grid") --- */
.technologies-robo-section {
    background-color: var(--color-light);
}

.technologies-robo-intro {
    text-align: center;
}

.node-grid-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.node-grid-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.node-grid-background line {
    stroke: var(--color-border);
    stroke-width: 2;
}

.node-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .node-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.node-card-robo {
    background-color: var(--color-light);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.node-card-robo:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.07);
}

.node-card-robo img {
    height: 36px;
    margin: 0 auto 1.5rem auto;
}

.node-card-robo h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.node-card-robo p {
    font-size: 0.9rem;
    color: var(--color-secondary);
    line-height: 1.6;
}


/* --- Section 2: Robotics Applications (Dark BG, "Kinematic Assembly Sequence") --- */
.applications-robo-section {
    /* This section acts as a viewport for the sticky scroller */
    height: 250vh;
    /* Provides scrolling room */
    background-color: var(--color-dark);
}

.applications-robo-sticky-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.applications-robo-intro {
    text-align: center;
    padding: 0 2rem;
    margin-bottom: 3rem;
}

.applications-robo-intro .section-title {
    color: var(--color-light);
}

.applications-robo-scroller {
    display: flex;
    width: 100%;
    overflow-x: auto;
    /* ADDED: Explicitly disable vertical scrolling within this container */
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar for a cleaner look */
.applications-robo-scroller::-webkit-scrollbar {
    display: none;
}

.applications-robo-scroller {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.app-slide-robo {
    flex: 0 0 100%;
    /* Each slide takes up the full width */
    width: 100%;
    height: 50vh;
    /* Adjust height as needed */
    max-height: 500px;
    scroll-snap-align: center;
    /* Snap to the center */
    padding: 0 5vw;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 992px) {
    .app-slide-robo {
        grid-template-columns: 1fr 1.5fr;
        padding: 0 10vw;
    }
}

.app-slide-robo-content {
    color: var(--color-light);
}

.app-slide-robo-content h3 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1.5rem;
}

.app-slide-robo-content p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    max-width: 450px;
}

.app-slide-robo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    /* ADDED: Prevents the image itself from capturing mouse wheel events. */
    pointer-events: none;
}

/* --- Section 3: Key Materials (Light Grey BG, "Bill of Materials") --- */
.materials-robo-section {
    background-color: var(--color-light-grey);
}

.materials-robo-section .section-title {
    text-align: center;
}

.materials-robo-list {
    max-width: 1100px;
    margin: 0 auto;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--color-light);
}

.material-row-robo,
.material-row-robo-header {
    display: grid;
    grid-template-columns: 1.5fr 2fr 2fr 1fr;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
}

.material-row-robo:last-child {
    border-bottom: none;
}

.material-row-robo-header {
    background-color: var(--color-light-grey);
    color: var(--color-secondary);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    padding: 0.75rem 1.5rem;
}

.material-row-robo {
    transition: background-color 0.2s ease-out;
}

.material-row-robo:hover {
    background-color: #fbfdff;
}

.material-name {
    font-weight: 700;
}

.material-props,
.material-app {
    color: var(--color-secondary);
    font-size: 0.95rem;
}

.material-img-wrapper {
    height: 50px;
    width: 80px;
    border-radius: 8px;
    overflow: hidden;
    justify-self: end;
}

.material-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}