/**
 * 외부 서비스 소개 배너 (리포트 2026-02-19)
 * - 메인 섹션 "함께 이용해 보세요"
 * - 우측 슬라이드 레이어 + 플로팅 버튼
 */

/* ========== 1. 메인 섹션 배너 ========== */
.external-services-section {
    padding: 50px 0;
    background: #f8f9fa;
    min-height: auto;
    height: auto;
}

.external-services-section .section-inner {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 20px;
}

.external-services-section .section-title {
    text-align: center;
    font-size: 25px;
    font-weight: 700;
    color: #2d3e50;
    margin-bottom: 30px;
}

.external-services-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.external-services-card {
    flex: 1 1 200px;
    max-width: 340px;
    background: #fff;
    border-radius: 16px;
    padding: 28px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eee;
}

.external-services-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}

.external-services-card .card-title {
    font-size: 18px;
    font-weight: 700;
    color: #2d3e50;
    margin-bottom: 10px;
}

.external-services-card .card-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
}

.external-services-card .card-link {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #4EB101 0%, #FA8316 50%, #616161 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.2s;
}

.external-services-card .card-link:hover {
    opacity: 0.95;
    color: #fff;
}

/* ========== 사용자 니즈 → 기술 스택 (표·그래프) ========== */
.tech-stack-block {
    margin-top: 40px;
    padding-top: 35px;
    border-top: 1px solid #e0e0e0;
}

.tech-stack-title {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #2d3e50;
    margin-bottom: 28px;
}

.tech-stack-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: stretch;
}

.tech-stack-table-wrap,
.tech-stack-chart-wrap {
    height: 100%;
    min-height: 0;
}

.tech-stack-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.tech-stack-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 14px;
}

.tech-stack-table thead {
    background: linear-gradient(135deg, #4EB101 0%, #FA8316 50%, #616161 100%);
    color: #fff;
}

.tech-stack-table th,
.tech-stack-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.tech-stack-table th {
    font-weight: 600;
}

.tech-stack-table tbody tr:hover {
    background: #f8f9fa;
}

.tech-stack-table td:first-child {
    font-weight: 500;
    color: #333;
}

.tech-stack-table td:last-child {
    color: #555;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* 의뢰 비중 막대 그래프 */
.tech-stack-chart-wrap {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
}

.chart-title {
    font-size: 15px;
    font-weight: 700;
    color: #2d3e50;
    margin-bottom: 20px;
}

.tech-stack-bars {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bar-item {
    display: grid;
    grid-template-columns: 140px 1fr 44px;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.bar-item:last-child {
    margin-bottom: 0;
}

.bar-label {
    font-size: 13px;
    color: #444;
}

.bar-track {
    height: 24px;
    background: #eee;
    border-radius: 6px;
    overflow: hidden;
}

.bar-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #4EB101 0%, #FA8316 100%);
    border-radius: 6px;
    min-width: 4px;
    transition: width 0.5s ease;
}

.bar-pct {
    font-size: 13px;
    font-weight: 600;
    color: #2d3e50;
    text-align: right;
}

@media (max-width: 768px) {
    .external-services-section {
        padding: 40px 0;
    }
    .external-services-section .section-inner {
        padding: 0 12px;
    }
    .external-services-section .section-title {
        font-size: 22px;
        /* margin-bottom: 28px; */
    }
    .external-services-cards {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    .external-services-card {
        max-width: 100%;
    }
    .tech-stack-block {
        margin-top: 36px;
        padding-top: 32px;
    }
    .tech-stack-title {
        font-size: 18px;
        margin-bottom: 22px;
    }
    .tech-stack-content {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .bar-item {
        grid-template-columns: 1fr 80px;
        grid-template-rows: auto auto;
        gap: 4px 12px;
    }
    .bar-label {
        grid-column: 1;
    }
    .bar-pct {
        grid-column: 2;
        grid-row: 1;
        text-align: right;
    }
    .bar-track {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

/* ========== 2. 우측 슬라이드 레이어 ========== */
.external-services-float-btn {
    position: fixed;
    right: 23px;
    bottom: 70px;
    width: 58px;
    height: 58px;
    border-radius: 42%;
    background: linear-gradient(135deg, #4EB101 0%, #FA8316 50%, #616161 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
}

.external-services-float-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(78, 177, 1, 0.35);
    filter: brightness(1.1);
}

.external-services-layer-back {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9995;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.external-services-layer-back.is-open {
    opacity: 1;
    visibility: visible;
}

.external-services-layer-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 360px;
    height: 100%;
    background: #fff;
    z-index: 9996;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.external-services-layer-back.is-open .external-services-layer-panel {
    transform: translateX(0);
}

.external-services-layer-panel .panel-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.external-services-layer-panel .panel-title {
    font-size: 18px;
    font-weight: 700;
    color: #2d3e50;
}

.external-services-layer-panel .panel-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: #666;
}

.external-services-layer-panel .panel-close:hover {
    background: #e0e0e0;
}

.external-services-layer-panel .panel-body {
    padding: 20px;
}

.external-services-layer-panel .layer-card {
    padding: 18px 0;
    border-bottom: 1px solid #eee;
}

.external-services-layer-panel .layer-card:last-of-type {
    border-bottom: none;
}

.external-services-layer-panel .layer-card .card-title {
    font-size: 16px;
    font-weight: 700;
    color: #2d3e50;
    margin-bottom: 6px;
}

.external-services-layer-panel .layer-card .card-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
}

.external-services-layer-panel .layer-card .card-link {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #4EB101 0%, #FA8316 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.external-services-layer-panel .panel-footer {
    padding: 16px 20px 24px;
    border-top: 1px solid #eee;
}

.external-services-layer-panel .panel-hide-today {
    display: block;
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    border-radius: 8px;
}

.external-services-layer-panel .panel-hide-today:hover {
    background: #f0f0f0;
}

@media (max-width: 768px) {
    .external-services-float-btn {
        right: 14px;
        bottom: 60px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .external-services-layer-panel {
        max-width: 100%;
    }
}
