/* --- Robot Section Layout --- */

.robot-details-section {
    padding: 80px 0;
    overflow: hidden;
}

.robot-layout-container {
    display: flex;
    align-items: center;
    gap: 60px;
    /* Space between image and text */
}

.section-divider {
    height: 1px;
    background-color: #333;
    max-width: var(--container-max-width);
    margin: 0 auto;
    opacity: 0;
    transform: scaleX(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section-divider.animate-in {
    opacity: 1;
    transform: scaleX(1);
}

/* --- Column 1: 3D Container --- */
.robot-image-column {
    flex: 1.2;
    opacity: 0;
    transform: translateX(-100%);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    /* Updated for 3D viewer */
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.robot-image-column.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.robot-3d-container {
    width: 100%;
    height: 100%;
    cursor: grab;
}

.robot-3d-container:active {
    cursor: grabbing;
}

/* --- Column 2: Info --- */
.robot-info-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: 0.1s;
}

.robot-info-column.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.robot-info-column h3 {
    font-family: var(--font-accent);
    color: var(--accent-orange);
    font-size: 2.5rem;
    margin: 0;
}

.robot-info-column h4 {
    font-family: var(--font-primary);
    color: white;
    font-size: 1.5rem;
    margin: 0;
    margin-top: 10px;
}

.robot-info-column p {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 500px;
    margin: 0;
}

/* --- Specs List --- */
.robot-specs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
}

.spec-item span:first-child {
    color: var(--text-muted);
}

.spec-item span:last-child {
    color: var(--text-light);
    font-weight: 600;
}

/* --- Enhanced Mobile Responsiveness --- */
@media (max-width: 768px) {
    .robot-details-section {
        padding: 60px 0;
    }

    .robot-layout-container {
        flex-direction: column;
        gap: 40px;
        padding: 0 20px;
    }

    .robot-image-column {
        padding: 0;
        min-height: 300px;
        /* Reduced for mobile */
        transform: translateY(50px);
        /* Change animation direction for mobile */
        width: 100%;
    }

    .robot-image-column.animate-in {
        transform: translateY(0);
    }

    .robot-info-column {
        padding: 0;
        transform: translateY(30px);
        /* Change animation direction for mobile */
        text-align: center;
        align-items: center;
    }

    .robot-info-column.animate-in {
        transform: translateY(0);
    }

    .robot-info-column h3 {
        font-size: 2rem;
    }

    .robot-info-column h4 {
        font-size: 1.3rem;
    }

    .robot-info-column p {
        font-size: 1rem;
        text-align: center;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .robot-details-section {
        padding: 40px 0;
    }

    .robot-layout-container {
        gap: 30px;
        padding: 0 15px;
    }

    .robot-image-column {
        min-height: 250px;
        /* Further reduced for small mobile */
    }

    .robot-info-column h3 {
        font-size: 1.8rem;
    }
}

/* Loading state for 3D models */
.robot-3d-container.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-style: italic;
}

.robot-3d-container.loading::after {
    content: "Loading 3D model...";
}

/* Loading state */
.robot-3d-container:not(.loaded)::before {
    content: "Loading 3D Model...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
    font-style: italic;
    z-index: 5;
}

.robot-3d-container.loaded::before {
    display: none;
}

/* Model Viewer Styles */
model-viewer {
    width: 100%;
    height: 100%;
    background: transparent;
    --poster-color: transparent;
    --progress-bar-color: var(--accent-orange);
}

/* Remove progress bar from model-viewer */
model-viewer::part(default-progress-bar) {
    display: none;
}

model-viewer::part(default-progress-mask) {
    display: none;
}

/* Alternative method - hide all progress bar elements */
model-viewer .progress-bar {
    display: none !important;
}

model-viewer .update-bar {
    display: none !important;
}

.robot-3d-container {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
}

.loading-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
    font-style: italic;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
}

.robot-3d-container.loaded .loading-overlay {
    display: none;
}

/* --- Coming Soon Robot Styles --- */
.robot-silhouette-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.robot-silhouette {
    width: 80%;
    height: auto;
    opacity: 0.3;
    filter: grayscale(100%) brightness(50%);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.robot-silhouette-container:hover .robot-silhouette {
    opacity: 0.4;
    filter: grayscale(10%) brightness(80%);
}

.coming-soon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
}

.coming-soon-overlay span {
    font-family: var(--font-accent);
    color: var(--accent-orange);
    font-size: 2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.7;
        text-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 20px rgba(255, 140, 0, 0.8);
    }
    100% {
        opacity: 0.7;
        text-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
    }
}

/* Mobile responsive adjustments for coming soon section */
@media (max-width: 768px) {
    .coming-soon-overlay span {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
}

@media (max-width: 480px) {
    .coming-soon-overlay span {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    model-viewer {
        height: 300px;
    }

    .robot-3d-container {
        height: 300px;
    }
}

@media (max-width: 480px) {
    model-viewer {
        height: 250px;
    }

    .robot-3d-container {
        height: 250px;
    }
}