/* Minimal Modern Theme (Clean & Soft) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
    --bg-color: #f8fafc;
    /* Slate-50 */
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;
    /* bg-white */
    --card-border: #e5e7eb;
    /* border-gray-200 */

    --text-primary: #333333;
    --text-secondary: #475569;
    /* Slate-600 (Darker for better visibility) */

    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    /* shadow-sm */
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --radius-lg: 12px;
    /* rounded-xl (approx) */
    --radius-btn: 8px;

    --font-main: 'Noto Sans KR', 'Inter', sans-serif;

    --sidebar-width: 180px;
    --right-sidebar-width: 180px;
    --header-height: 48px;
    --selection-bar-height: 38px;
    --logo-area-height: calc(var(--header-height) + var(--selection-bar-height));

    --spacing-section: 30px;

    --transition: all 0.2s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    line-height: 1.6;
}

/* Left Sidebar */
.left-sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    box-shadow: none;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #f1f5f9;
    padding: 0;
}

.logo-area {
    height: var(--logo-area-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-bottom: 1px solid #f1f5f9;
    background: white;
    overflow: hidden;
    /* 확대된 여백을 자르기 위해 필요 */
}

.logo-area img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    /* 고해상도 파일의 넓은 여백을 고려하여, 본체가 80%로 보이도록 1.1배 확대 */
    transform: scale(1.1);
    transform-origin: center;
    transition: var(--transition);
    /* 외곽선을 더 선명하게 보이게 하는 처리 */
    image-rendering: -webkit-optimize-contrast;
}

.logo-area img:hover {
    transform: scale(1.15);
}

.menu-list {
    list-style: none;
    padding: 20px 15px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-list li a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    transition: var(--transition);
    letter-spacing: -0.02em;
}

.menu-list li a:hover {
    background-color: #f1f5f9;
    color: var(--text-primary);
}

.menu-list li.active>a {
    background-color: #2563eb;
    color: #ffffff;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

/* Submenu Styles - L-shaped Hierarchy */
.submenu {
    list-style: none;
    padding-left: 0;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
}

.submenu>li {
    display: none;
    position: relative;
}

.submenu>li {
    display: none;
    position: relative;
}

.submenu>li.active {
    display: block;
}

.submenu-title {
    display: none;
}

.submenu li.active>.submenu-title {
    background-color: transparent;
    color: var(--text-primary);
    font-weight: 600;
}

.sub-submenu {
    display: none;
}

.sub-submenu li {
    display: none;
    position: relative;
}

.sub-submenu li.active {
    display: block;
}

.sub-submenu li a {
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-decoration: none;
    display: block;
    border-radius: 6px;
    transition: var(--transition);
}

.sub-submenu li.active a {
    background-color: #eff6ff;
    color: var(--accent-color);
    font-weight: 600;
}

.sub-submenu li a:hover {
    background-color: #f1f5f9;
    color: var(--text-primary);
}

.sidebar-footer {
    margin-top: auto;
    padding: 40px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Main Wrapper */
.main-wrapper {
    margin-left: var(--sidebar-width);
    margin-right: var(--right-sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: calc(var(--header-height) + var(--selection-bar-height));
}

/* Top Header */
.top-header {
    height: var(--header-height);
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: var(--right-sidebar-width);
    z-index: 101;
    border-bottom: 1px solid #f1f5f9;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-divider {
    width: 1px;
    height: 20px;
    background-color: #e2e8f0;
    margin: 0 15px;
    /* 간격 최적화 */
}

.process-steps {
    display: flex;
    list-style: none;
    gap: 25px;
    /* 간격을 좁혀 한 줄 유지 가능성 높임 */
    width: 100%;
}

.process-steps li {
    font-size: 0.9rem;
    color: #64748b;
    /* Slate-500 (Previously 400) */
    font-weight: 500;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 50px;
    white-space: nowrap;
    /* 텍스트 줄바꿈 방지 */
    flex-shrink: 0;
    /* 공간 부족 시 크기 축소 방지 */
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: transparent;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    padding: 0;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.process-steps li::after {
    display: none;
}

.process-steps li:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.05);
}

.process-steps li.active {
    color: #ffffff;
    background: #2563eb;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.process-steps li.active .step-number {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: transparent;
}

.process-steps li.active::after {
    width: 100%;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    /* Use synced variable */
    white-space: nowrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-item.active {
    color: inherit;
}

.breadcrumb-separator {
    color: #64748b;
    font-weight: 600;
}

/* Machine Selection Bar */
.machine-selection-bar {
    background: white;
    border-bottom: 1px solid #f1f5f9;
    height: var(--selection-bar-height);
    padding: 0 24px;
    display: flex;
    align-items: center;
    position: fixed;
    top: var(--header-height);
    left: var(--sidebar-width);
    right: var(--right-sidebar-width);
    z-index: 100;
}

.machine-selection-bar .machine-text-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* Main Content */
.content {
    padding: 0;
    flex: 1;
    max-width: 100%;
    margin: 0;
    width: 100%;
    background: white;
    /* Prevent body grey leaking */
}

/* Sections General */
section {
    margin-bottom: 0;
    border-bottom: 1px solid #f1f5f9;
}

section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Machine Section */
.machine-section-group {
    margin-bottom: 30px;
}

.machine-section-group h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-primary);
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
}

.machine-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.machine-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.machine-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04);
    border-color: #e2e8f0;
}

.card-header {
    display: flex;
    justify-content: space-between;
}

.model-id {
    font-size: 0.7rem;
    color: #94a3b8;
    background: #f8fafc;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Icon Styles */
.icon-container {
    height: 80px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.machine-card:hover .icon-container {
    background: #f1f5f9;
}

.machine-icon {
    width: 40px;
    height: 40px;
    stroke-width: 1.5;
    color: var(--text-primary);
    transition: var(--transition);
}

.machine-card:hover .machine-icon {
    transform: scale(1.1);
    color: var(--accent-color);
}

.machine-card h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.02em;
}

/* Machine Text List Styles */
.machine-text-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.machine-text-item {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    /* Slate-500 (Darker) */
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: transparent;
    border: 1px solid transparent;
    opacity: 0.7;
    white-space: nowrap;
}

.machine-text-item:hover {
    opacity: 0.8;
}

.machine-text-item.active {
    color: #ffffff;
    background: #2563eb;
    border-color: transparent;
    opacity: 1;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.layout-section {
    background: #ffffff;
    border-radius: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    margin-top: 0;
    margin-bottom: 0;
    transition: var(--transition);
}

.spec-section {
    background: #f8fafc;
    border-radius: 0;
    padding: 12px 0;
    border: none;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    box-shadow: none;
    margin-top: 4px;
    transition: var(--transition);
}

.layout-section:hover,
.spec-section:hover {
    box-shadow: var(--shadow-md);
}

.spec-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 15px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.layout-placeholder {
    width: 100%;
    height: auto;
    min-height: 20px;
    background: white;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    border: none;
    overflow: hidden;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.spec-table tr:nth-child(even) {
    background-color: #f8fafc;
}

.spec-table tr:hover {
    background-color: #f1f5f9;
}

.spec-table tr:last-child {
    border-bottom: none;
}

.spec-table th,
.spec-table td {
    padding: 12px 24px;
    text-align: left;
    font-size: 0.9rem;
}

.spec-table th {
    width: 30%;
    color: #64748b;
    font-weight: 600;
}

.spec-table td {
    color: #0f172a;
    font-weight: 500;
}

.spec-table tr:nth-child(2) td,
.spec-table tr:nth-child(3) td {
    color: #2563eb;
    font-weight: 600;
}

/* End of density optimizations */

/* Table */
.spec-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 1rem;
}

.spec-table th,
.spec-table td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.spec-table th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.spec-table tr:last-child td {
    border-bottom: none;
}

/* Footer */
.main-footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--card-border);
    padding: 30px 60px;
    /* Match content padding */
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: auto;
}

.footer-info p {
    margin-bottom: 5px;
    line-height: 1.6;
}

/* Right Sidebar */
.right-sidebar {
    width: var(--right-sidebar-width);
    background-color: var(--sidebar-bg);
    box-shadow: none;
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    padding: 50px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 100;
    border-left: 1px solid #f1f5f9;
}

.panel-header {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: #999;
    margin-bottom: 40px;
    text-align: center;
}

.inquiry-box {
    text-align: center;
}

.inquiry-box h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.inquiry-box p {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1rem;
}

.btn-inquiry {
    background: var(--accent-color);
    color: #fff;
    border: none;
    padding: 16px;
    width: 100%;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
    transition: var(--transition);
}

.btn-inquiry:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
}

.contact-info {
    margin-top: 40px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Overview Section */
.overview-hero-image {
    margin-top: 0;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
}

.overview-text-area {
    padding: 24px;
    text-align: center;
}

.overview-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.overview-desc {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    margin-bottom: 32px;
}

.overview-shortcuts {
    display: grid;
    grid-template-columns: repeat(5, auto);
    gap: 60px;
    justify-content: center;
    text-align: left;
    background: white;
    padding: 32px 40px;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    margin: 0 auto;
}

.shortcut-group h4 {
    font-size: 0.9rem;
    color: #2563eb;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.shortcut-step-num {
    width: 20px;
    height: 20px;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
    line-height: 1;
    flex-shrink: 0;
}

.shortcut-group ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shortcut-group ul li a {
    font-size: 0.8rem;
    color: #475569;
    text-decoration: none;
    transition: color 0.2s;
}

.shortcut-group ul li a:hover {
    color: #2563eb;
}

/* Layout Image Containers */
.no-margin-top {
    margin-top: 0;
}

.layout-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    min-height: 300px;
    padding-bottom: 0;
}

.layout-img-green {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.layout-img-blue {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.layout-img-orange {
    background: linear-gradient(135deg, #fef7ed, #fed7aa);
}

.layout-svg {
    width: 180px;
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .machine-section {
        flex-direction: column;
    }
}

@media (max-width: 1024px) {
    body {
        flex-direction: column;
    }

    .left-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        align-items: center;
        padding: 10px 20px;
        justify-content: space-between;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        border-bottom: 1px solid var(--card-border);
    }

    .logo-area {
        height: 60px;
        padding: 0;
        border: none;
    }

    .menu-list {
        flex-direction: row;
        padding: 0;
        gap: 20px;
    }

    .menu-list li a {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .sidebar-footer {
        display: none;
    }

    .main-wrapper {
        margin: 0;
        width: 100%;
    }

    .top-header {
        position: sticky;
        top: 0;
        padding: 0 20px;
        overflow-x: auto;
    }

    .process-steps {
        gap: 30px;
        min-width: max-content;
    }

    .right-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 40px 20px;
        box-shadow: none;
        border-top: 1px solid var(--card-border);
    }

    .content {
        padding: 40px 20px;
    }

    .overview-shortcuts {
        grid-template-columns: repeat(3, auto);
        gap: 32px;
        padding: 24px 20px;
    }
}

@media (max-width: 768px) {
    .left-sidebar {
        flex-direction: column;
        gap: 10px;
    }

    .menu-list {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .menu-list li a {
        padding: 6px 10px;
        font-size: 0.82rem;
    }

    .top-header {
        left: 0;
        right: 0;
        padding: 0 12px;
    }

    .machine-selection-bar {
        left: 0;
        right: 0;
        padding: 0 12px;
        height: auto;
        min-height: var(--selection-bar-height);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .machine-selection-bar .machine-text-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .process-steps {
        font-size: 0.8rem;
        gap: 10px;
    }

    .process-steps li {
        padding: 5px 10px;
        font-size: 0.78rem;
    }

    .step-number {
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
        line-height: 1;
    }

    .layout-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .machine-text-list {
        justify-content: flex-start;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .machine-text-item {
        font-size: 0.8rem;
        padding: 4px 10px;
        flex-shrink: 0;
    }

    .machine-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .content {
        padding: 20px 12px;
    }

    .overview-hero-image {
        min-height: 200px;
        border-radius: 8px;
    }

    .layout-image-container {
        min-height: 200px;
        border-radius: 8px;
    }

    .layout-svg {
        width: 140px;
    }

    .overview-text-area {
        padding: 16px 12px;
    }

    .overview-title {
        font-size: 1.15rem;
        margin-bottom: 8px;
    }

    .overview-desc {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }

    .overview-shortcuts {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 16px;
    }

    .shortcut-group h4 {
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .shortcut-group ul {
        font-size: 0.82rem;
    }

    .spec-table th,
    .spec-table td {
        padding: 10px 12px;
        font-size: 0.82rem;
    }

    .spec-table th {
        width: 35%;
    }

    .main-footer {
        padding: 20px 16px;
        font-size: 0.78rem;
    }

    .right-sidebar {
        padding: 24px 16px;
    }

    .inquiry-box h3 {
        font-size: 1.2rem;
    }

    .inquiry-box p {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }
}

/* ==========================================
   반응형 - 소형 모바일 (480px 이하)
   ========================================== */
@media (max-width: 480px) {
    .machine-grid {
        grid-template-columns: 1fr;
    }

    .machine-card h3 {
        font-size: 0.82rem;
    }

    .logo-area {
        height: 50px;
    }

    .logo-area img {
        transform: scale(0.9);
    }

    .overview-shortcuts {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 14px;
    }

    .overview-hero-image {
        min-height: 150px;
    }

    .layout-image-container {
        min-height: 150px;
    }

    .layout-svg {
        width: 120px;
    }
}