/* ===================================================
   Digital Card - TapCard Style Mobile-First CSS
   =================================================== */

/* ── Reset & Base ── */
.dc-body {
    margin: 0;
    padding: 0;
    background: #f0f2f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans KR", sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* ── Card Container ── */
.dc-container {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
    position: relative;
    padding-bottom: 80px; /* 하단 바 공간 */
}

@media (min-width: 481px) {
    .dc-container {
        margin: 20px auto;
        min-height: auto;
        border-radius: 16px;
        overflow: hidden;
    }
    .dc-body {
        padding: 0 16px;
    }
}

/* ── Cover Section ── */
.dc-cover {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--dc-theme), rgba(var(--dc-theme-rgb), 0.7));
    position: relative;
    overflow: hidden;
}

.dc-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dc-cover-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.3));
}

/* ── Profile Section ── */
.dc-profile {
    text-align: center;
    padding: 0 24px 24px;
    position: relative;
}

.dc-profile-photo-wrap {
    margin-top: -50px;
    position: relative;
    z-index: 2;
    display: inline-block;
}

.dc-profile-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid #fff;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: #e9ecef;
}

.dc-profile-initials {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: var(--dc-theme);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
}

.dc-logo {
    margin-top: 12px;
}

.dc-logo img {
    max-height: 36px;
    max-width: 160px;
    object-fit: contain;
}

.dc-name {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    margin-top: 12px;
    margin-bottom: 2px;
    line-height: 1.3;
    letter-spacing: 2px;
}

.dc-name-en {
    font-size: 14px;
    color: #999;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.dc-title-company {
    font-size: 15px;
    margin-bottom: 2px;
}

.dc-job-title {
    color: #555;
}

.dc-separator {
    margin: 0 6px;
    color: #ccc;
}

.dc-company {
    color: var(--dc-theme);
    font-weight: 600;
}

.dc-department {
    font-size: 13px;
    color: #999;
}

/* ── Intro Section ── */
.dc-intro {
    margin: 4px 24px 24px;
    padding: 16px 20px;
    border-left: 3px solid var(--dc-theme);
    background: color-mix(in srgb, var(--dc-theme) 6%, transparent);
    border-radius: 0 8px 8px 0;
    text-align: left;
}

.dc-intro p {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin: 0;
    white-space: pre-line;
}

/* ── Divider ── */
.dc-divider {
    height: 1px;
    background: #eee;
    margin: 0 24px;
}

/* ── Action Buttons ── */
.dc-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 24px;
    flex-wrap: wrap;
}

.dc-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #555;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    transition: transform 0.2s;
}

.dc-action-btn:hover {
    transform: translateY(-2px);
}

.dc-action-btn:active {
    transform: scale(0.95);
}

.dc-action-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(var(--dc-theme-rgb), 0.1);
    color: var(--dc-theme);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.2s, color 0.2s;
}

.dc-action-btn:hover .dc-action-icon {
    background: var(--dc-theme);
    color: #fff;
}

.dc-action-label {
    font-size: 12px;
    font-weight: 500;
}

/* ── Contact Detail Section ── */
.dc-section {
    padding: 20px 24px;
}

.dc-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 16px;
}

.dc-contact-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}

.dc-contact-item:last-child {
    border-bottom: none;
}

.dc-contact-item:hover {
    color: var(--dc-theme);
}

.dc-contact-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(var(--dc-theme-rgb), 0.08);
    color: var(--dc-theme);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    margin-right: 12px;
}

.dc-contact-info {
    flex: 1;
    min-width: 0;
}

.dc-contact-label {
    font-size: 12px;
    color: #999;
}

.dc-contact-value {
    font-size: 14px;
    color: #333;
    word-break: break-all;
}

/* ── Address & Map ── */
.dc-map-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 16px;
    width: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #eef0f5 100%);
    border: 1px solid #e2e5ea;
    border-radius: 10px;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.dc-map-toggle:hover {
    background: linear-gradient(135deg, #eef0f5 0%, #e5e8ee 100%);
    border-color: #d0d4db;
}

.dc-map-toggle.active {
    background: color-mix(in srgb, var(--dc-theme) 8%, #f8f9fa);
    border-color: color-mix(in srgb, var(--dc-theme) 30%, #e2e5ea);
    color: var(--dc-theme);
}

.dc-map-arrow {
    transition: transform 0.3s;
    font-size: 10px;
    opacity: 0.6;
}

.dc-map-toggle.active .dc-map-arrow {
    transform: rotate(180deg);
}

.dc-map-wrap {
    margin-top: 8px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.dc-map-collapsed {
    max-height: 0;
    opacity: 0;
    border: none;
    margin-top: 0;
}

.dc-map-expanded {
    max-height: 250px;
    opacity: 1;
}

.dc-map-wrap iframe {
    width: 100%;
    height: 200px;
    border: none;
}

/* ── Social Links ── */
.dc-social-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px 24px;
    flex-wrap: wrap;
}

.dc-social-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 24px;
    background: #f5f6f8;
    color: #555;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid #eee;
}

.dc-social-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: #fff;
    color: #666;
    transition: all 0.2s;
}

.dc-social-label {
    font-weight: 500;
    white-space: nowrap;
}

.dc-social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #ddd;
    color: #333;
    text-decoration: none;
}

/* 플랫폼별 호버 색상 */
.dc-social-instagram:hover .dc-social-icon { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; }
.dc-social-youtube:hover .dc-social-icon { background: #FF0000; color: #fff; }
.dc-social-facebook:hover .dc-social-icon { background: #1877F2; color: #fff; }
.dc-social-twitter:hover .dc-social-icon { background: #000; color: #fff; }
.dc-social-linkedin:hover .dc-social-icon { background: #0A66C2; color: #fff; }
.dc-social-kakaotalk:hover .dc-social-icon { background: #FEE500; color: #3C1E1E; }
.dc-social-naverblog:hover .dc-social-icon { background: #03C75A; color: #fff; }
.dc-social-tiktok:hover .dc-social-icon { background: #000; color: #fff; }
.dc-social-github:hover .dc-social-icon { background: #24292f; color: #fff; }
.dc-social-blog:hover .dc-social-icon { background: var(--dc-theme); color: #fff; }

/* ── Gallery ── */
.dc-gallery {
    padding: 0 24px 24px;
}

.dc-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    border-radius: 12px;
    overflow: hidden;
}

.dc-gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.dc-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.dc-gallery-item:hover img {
    transform: scale(1.05);
}

.dc-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    color: #fff;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.3s;
}

.dc-gallery-item:hover .dc-gallery-caption {
    opacity: 1;
}

/* Gallery Lightbox */
.dc-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.dc-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.dc-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}

/* ── Industry Sections ── */
.dc-industry-section {
    padding: 16px 24px;
}

.dc-industry-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dc-industry-title i {
    color: var(--dc-theme);
}

.dc-industry-text {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    white-space: pre-line;
}

.dc-industry-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dc-industry-list li {
    padding: 8px 0;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dc-industry-list li::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dc-theme);
    flex-shrink: 0;
}

.dc-industry-list li:last-child {
    border-bottom: none;
}

.dc-industry-table {
    width: 100%;
    font-size: 14px;
}

.dc-industry-table tr {
    border-bottom: 1px solid #f5f5f5;
}

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

.dc-industry-table td {
    padding: 8px 0;
    vertical-align: top;
}

.dc-industry-table td:first-child {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    padding-right: 16px;
    width: 30%;
}

.dc-industry-table td:last-child {
    color: #555;
}

/* ── Bottom Bar ── */
.dc-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    padding: 12px 16px;
    gap: 8px;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.dc-bottom-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.dc-bottom-btn-primary {
    background: var(--dc-theme);
    color: #fff;
}

.dc-bottom-btn-primary:hover {
    opacity: 0.9;
    color: #fff;
}

.dc-bottom-btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.dc-bottom-btn-secondary:hover {
    background: #e8e8e8;
    color: #333;
}

/* ── QR Modal ── */
.dc-qr-modal .modal-content {
    border-radius: 16px;
    border: none;
    text-align: center;
}

.dc-qr-modal .modal-body {
    padding: 32px;
}

.dc-qr-code {
    display: inline-block;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
}

.dc-qr-name {
    margin-top: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.dc-qr-url {
    font-size: 12px;
    color: #999;
    word-break: break-all;
    margin-top: 4px;
}

/* ── Toast / Snackbar ── */
.dc-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.dc-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ── Utilities ── */
.dc-no-cover .dc-profile {
    padding-top: 40px;
}

.dc-no-cover .dc-profile-photo-wrap {
    margin-top: 0;
}

/* ── Print ── */
@media print {
    .dc-bottom-bar,
    .dc-actions {
        display: none !important;
    }

    .dc-container {
        box-shadow: none;
        max-width: 100%;
        padding-bottom: 0;
    }
}
