/* 
   TEXWIN Spinning - Infrastructure Page Stylesheet
   Implements a premium 3-column staggered layout with a central winding yarn spine.
*/

/* Page Intro Styling */
.infra-intro {
    padding-top: 140px;
    padding-bottom: 40px;
    background: none;
    min-height: auto;
}

.infra-intro-panel {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    padding: var(--space-md) var(--space-lg);
}

.infra-intro-tag {
    font-size: 1.4rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-premium-green);
    margin-bottom: var(--space-xs);
    display: block;
}

.infra-intro-title {
    font-size: clamp(3rem, 5vw, 4.8rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--space-sm);
    line-height: 1.15;
}

.infra-intro-desc {
    font-size: 1.7rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
}

/* Timeline Wrapper */
.infra-timeline-wrapper {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 0 60px 0;
    overflow: visible;
}

/* Central Spine Image */
.infra-timeline-spine {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    z-index: 1;
    pointer-events: none;
    display: flex;
    justify-content: center;
}

.timeline-spine-img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

/* Sections Layout */
.infra-section {
    position: relative;
    width: 100%;
    height: 600px; /* Fixed height to align sections with spine loops on desktop */
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    z-index: 2;
}

.infra-container {
    display: grid;
    grid-template-columns: 1fr 320px 1fr;
    align-items: center;
    gap: 30px;
    width: 100%;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* Columns */
.infra-col-left {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-self: flex-start;
    margin-top: 60px;
    z-index: 10;
}

.infra-col-right {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-self: flex-end;
    margin-bottom: 60px;
    z-index: 10;
}

/* Spacer for Spine */
.infra-col-spacer {
    width: 320px;
    height: 100%;
}

/* Cards Design */
.infra-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-left: 5px solid var(--color-premium-green);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    padding: 30px 35px;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), background-color var(--transition-normal);
    position: relative;
    max-width: 520px;
    width: 100%;
}

.infra-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.9);
}

.card-step {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-fresh-green);
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.card-title {
    font-size: clamp(2rem, 3vw, 2.6rem);
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.card-desc {
    font-size: 1.6rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 0;
    text-align: justify;
}

/* Mobile stacked visual */
.card-img-placeholder.mobile-only {
    display: none; /* Hidden on desktop */
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .infra-container {
        grid-template-columns: 1fr 280px 1fr;
        gap: 20px;
    }
    .infra-timeline-spine {
        width: 280px;
    }
    .infra-col-spacer {
        width: 280px;
    }
}

@media (max-width: 992px) {
    /* Collapse to stacked layout */
    .infra-timeline-wrapper {
        padding: 20px 0;
    }
    
    /* Use spine as full background on mobile */
    .infra-timeline-spine {
        display: block;
        width: 100%;
        opacity: 0.15;
        z-index: 0;
    }
    
    .timeline-spine-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .infra-container {
        grid-template-columns: 1fr;
        gap: 40px;
        max-width: 100%;
        height: auto;
    }
    
    /* Zigzag pattern */
    .infra-col-left {
        margin: 0;
        align-self: flex-start;
        width: 100%;
        padding-right: 15%;
    }

    .infra-col-right {
        margin: 0;
        align-self: flex-end;
        width: 100%;
        padding-left: 15%;
    }

    .infra-col-spacer {
        display: none;
    }

    /* Restore the card padding so text doesn't touch edges */
    .infra-card {
        max-width: 100%;
        padding: 30px 25px;
        position: relative;
        overflow: visible;
        background: rgba(255, 255, 255, 0.85); /* Restored the background as well, since user likes the card look */
        border: 1px solid rgba(255, 255, 255, 0.8);
        border-left: 5px solid var(--color-premium-green);
        box-shadow: var(--shadow-sm);
        border-radius: var(--radius-md);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
    
    .card-step, .card-title, .card-desc {
        position: relative;
        z-index: 2;
    }
    
    .infra-section {
        height: auto;
        min-height: auto;
        padding: 20px var(--space-sm);
    }

    /* Hide cropped image box since we use full background now */
    .card-img-placeholder.mobile-only {
        display: none !important;
    }
}
