/*
  Page-specific stylesheet for Vacuum Casting Service Page
  Version: 5.3 (Final Perfected Version)
*/

/* --- 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/hero-bg-vacuum-casting.jpg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* --- Universal Section Spacing & Titles --- */
.advantages-vc-section,
.process-exploded-section,
.materials-capsule-section,
.case-study-vc-section {
    padding: var(--section-padding);
}

.advantages-vc-section h2,
.process-exploded-section h2,
.materials-capsule-section h2,
.case-study-vc-section h2 {
    font-size: clamp(2.2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 4rem;
    text-align: center;
}

/* --- Section 1: "Advantages Triptych" --- */
.advantages-grid-vc {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.advantage-panel {
    background-color: var(--color-light);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.advantage-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

.advantage-panel img {
    height: 40px;
    margin-bottom: 1.5rem;
}

.advantage-panel h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.advantage-panel p {
    color: var(--color-secondary);
    line-height: 1.6;
}

/* --- Section 2: "Process Exploded View" (FINAL REWORK) --- */
.process-exploded-section {
    background-color: var(--color-light-grey);
}

.process-exploded-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

@media(min-width: 992px) {
    .process-exploded-grid {
        grid-template-columns: 1fr 1.5fr;
    }
}

.step-item-vc {
    padding: 1.5rem;
    border-left: 3px solid var(--color-border);
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 0 8px 8px 0;
}

.step-item-vc.is-active {
    border-left-color: var(--color-primary);
    background-color: var(--color-light);
    transform: translateX(10px);
}

.step-item-vc h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.step-item-vc p {
    color: var(--color-secondary);
    line-height: 1.6;
}

.process-visual-vc {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
}

.exploded-main-image {
    max-width: 50%;
    position: relative;
    z-index: 5;
    border-radius: 8px;
    /* ★ FIXED: Added transform for repositioning */
    transform: translate(30px, 30px);
}

.exploded-element {
    position: absolute;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
}

.exploded-element img {
    max-width: 150px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

/* ★ FIXED: New, more beautiful layout */
.exploded-element[data-element="master"] {
    top: -30px;
    left: 0px;
}

.exploded-element[data-element="mold"] {
    bottom: -70px;
    left: 0px;
}

.exploded-element[data-element="resin"] {
    top: 100px;
    right: -85px;
}

.exploded-element.is-active {
    transform: scale(1.05);
    z-index: 20;
}

.exploded-element.is-active img {
    box-shadow: 0 20px 45px rgba(0, 122, 255, 0.2);
}

.guide-lines-vc {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.guide-line {
    /* ★ FIXED: Black, solid lines by default */
    stroke: var(--color-dark);
    stroke-width: 1.5;
    marker-end: url(#arrow);
    /* ★ FIXED: Subtle visibility by default */
    opacity: 0.2;
    transition: opacity 0.4s ease, stroke-width 0.4s ease;
}

.guide-line.is-active {
    /* ★ FIXED: Highlight on hover */
    opacity: 1;
    stroke-width: 2;
}


/* --- Section 3: "'Liquid Capsule' Material Showcase" --- */
.materials-capsule-section {
    background-color: var(--color-dark);
}

.materials-capsule-section h2 {
    color: var(--color-light);
}

.materials-grid-vc {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.material-capsule {
    text-align: center;
    cursor: pointer;
}

.capsule-liquid {
    height: 250px;
    border-radius: 80px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    background-color: #333;
    transition: transform 0.3s ease;
}

.material-capsule:hover .capsule-liquid {
    transform: scale(1.03);
}

.capsule-liquid::before,
.capsule-liquid::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 5%;
    width: 200%;
    height: 200%;
    border-radius: 45%;
    transform: translateX(-50%);
    animation: wave 8s linear infinite;
}

.capsule-liquid::after {
    border-radius: 40%;
    animation: wave 8s linear infinite 2s;
}

@keyframes wave {
    0% {
        transform: translateX(-50%) rotate(0deg);
    }

    100% {
        transform: translateX(-50%) rotate(360deg);
    }
}

#liquid-abs {
    background-color: #6c757d;
}

#liquid-abs::before,
#liquid-abs::after {
    background-color: rgba(255, 255, 255, 0.1);
}

#liquid-pc {
    background-color: #3d4a5d;
}

#liquid-pc::before,
#liquid-pc::after {
    background-color: rgba(173, 216, 230, 0.2);
}

#liquid-rubber {
    background-color: #495057;
}

#liquid-rubber::before,
#liquid-rubber::after {
    background-color: rgba(255, 255, 255, 0.15);
}

#liquid-temp {
    background-color: #5a1e2b;
}

#liquid-temp::before,
#liquid-temp::after {
    background-color: rgba(255, 107, 107, 0.2);
}

.capsule-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    font-weight: 500;
}

/* --- Section 4: Classic "Left-Text, Right-Image" Case Study --- */
.case-study-vc-section {
    background-color: var(--color-light-grey);
}

.case-study-vc-section .details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

@media (min-width: 992px) {
    .case-study-vc-section .details-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.case-study-vc-section .details-content h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.case-study-vc-section .details-content p {
    color: var(--color-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.case-study-vc-section .details-image {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}