﻿/* steps.css - simple custom styles for the step navigator */
body, .main-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #f7f6e7 0%, #e7e3d1 100%);
    background-attachment: fixed;
    position: relative;
    font-family: 'Pretendard', 'Noto Sans KR', 'Segoe UI', sans-serif;
}
body::before, .main-bg::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    background: url('https://www.transparenttextures.com/patterns/diamond-upholstery.png') repeat;
    opacity: 0.08;
}

/* hide top bar space */
.bar {
    margin-bottom: 0 !important;
    height: 24px;
}

/* navigator tight layout */
.step-nav-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* center entire nav */
    gap: 6px;
    background: #fffbe6;
    border-radius: 12px;
    box-shadow: 0 2px 12px 0 rgba(180,160,80,0.08);
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    border: 1.5px solid #e6c97a;
    width: 100%;
    max-width: 1200px; /* constrain width and center on large screens */
    margin-left: auto;
    margin-right: auto;
}

.step-nav-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* align start so first step is always visible */
    gap: 8px;
}

.nav-arrow {
    flex: 0 0 auto;
    margin: 0 4px;
    display: flex;
    align-items: center;
}

.step-list {
    display: flex;
    gap: 6px;
    padding: 4px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    align-items: center;
    justify-content: flex-start; /* left align items inside scroll */
    flex: 1 1 auto;
}

.step-btn {
    min-width: 110px;
    height: 64px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    padding: 0.5rem 0.5rem;
    font-family: inherit;
    font-weight: 600;
    transition: box-shadow 0.2s, background 0.2s;
    box-shadow: 0 1px 8px 0 rgba(180,160,80,0.08);
    background: #f7f6e7;
    color: #7a5c1e;
    border: 1.5px solid #e6c97a;
}
.step-btn[outline] {
    background: #fffbe6;
    color: #b8a05a;
}
.step-btn:hover {
    box-shadow: 0 4px 16px 0 rgba(180,160,80,0.18);
    background: #ffe9a7 !important;
    color: #7a5c1e !important;
    border-color: #e6c97a;
}
.step-index {
    font-weight: 700; font-size: 1rem; color: #e6c97a;
    word-break: keep-all;
    white-space: normal;
    line-height: 1.1;
    text-shadow: 0 1px 4px #fffbe6;
}
.step-label {
    font-size: 0.8rem; opacity: 0.85; color: #7a5c1e;
    word-break: break-all;
    white-space: normal;
    line-height: 1.1;
}

.progress {
    height: 8px; border-radius: 8px;
    background: #f7f6e7;
    border: 1px solid #e6c97a;
}
.progress-bar {
    background: linear-gradient(90deg, #e6c97a 0%, #ffe9a7 100%);
}

.step-card {
    background: #fffbe6;
    border-radius: 18px;
    box-shadow: 0 2px 24px 0 rgba(180,160,80,0.12);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid #e6c97a;
    transition: box-shadow 0.2s, border-color 0.2s;
    color: #7a5c1e;
    backdrop-filter: blur(1px);
}
.step-card:hover {
    box-shadow: 0 6px 32px 0 rgba(180,160,80,0.18);
    border-color: #ffe9a7;
}
.step-card-img {
    border-radius: 12px;
    box-shadow: 0 1px 8px 0 rgba(180,160,80,0.10);
    max-height: 90px;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 2px solid #e6c97a;
    background: #f7f6e7;
}

/* image card grid */
.image-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 한 줄에 4개씩 균등하게 */
    gap: 18px;
    justify-items: stretch;
    align-items: stretch;
    grid-auto-rows: 1fr; /* 모든 카드 높이 균등 */
}
.image-card {
    height: 100%; /* grid row 전체 채우기 */
    display: flex;
    flex-direction: column;
}

/* Force card images to be smaller and consistent across Blazorise CardImage renderings */
.image-card img,
.image-card .card-img-top,
.image-card .card-image,
.image-card picture img {
    height: 180px !important; /* show whole image area */
    max-height: 180px !important;
    width: 100% !important;
    object-fit: cover !important; /* 변경: contain → cover */
    object-position: center center !important;
    background: #fff; /* fill background when aspect ratios differ */
    display: block;
}
.image-card .card-body {
    padding: 0.4rem 0.6rem;
}
.image-card .card-title {
    font-weight: 700;
    color: #8b6b2b;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}
.image-card .card-text {
    color: #6b5e3c;
    font-size: 0.8rem;
}

/* modal carousel image sizing */
.carousel-item img {
    width: 100%;
    height: 480px;
    object-fit: contain;
    background: #fff;
}
@media (max-width: 900px) {
    .carousel-item img { height: 320px; }
}
@media (max-width: 600px) {
    .carousel-item img { height: 220px; }
}

.step-desc {
    font-size: 1.08rem;
    color: #7a5c1e;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 4px #fffbe6;
}
.step-footer {
    font-size: 0.95rem;
    color: #b8a05a;
    font-weight: 500;
}

.heading, h1, h2, h3, h4, h5, h6 {
    color: #e6c97a;
    text-shadow: 0 1px 8px #fffbe6;
    font-family: inherit;
    text-align: center;
}

/* 추가: 링크, 버튼, 텍스트 강조 */
a, .btn, .bar-link {
    color: #b8a05a;
    font-weight: 600;
    text-decoration: none;
}
a:hover, .btn:hover, .bar-link:hover {
    color: #e6c97a;
    text-decoration: underline;
}

.step-list::-webkit-scrollbar { height: 8px; }
.step-list::-webkit-scrollbar-thumb { background: rgba(230,201,122,0.6); border-radius: 8px; }

/* lightbox overlay styles */
.lightbox-overlay {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.lightbox-content {
    position: relative;
    max-width: 90vw; /* allow wide but control via image sizing */
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.lightbox-content.vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.lightbox-image-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.lightbox-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Only affect the enlarged image in the lightbox — use viewport units so it scales on screen
   without touching card images (.image-card img remains as defined elsewhere). */
.lightbox-image-wrap img {
    width: auto;
    max-width: 70vw; /* limit width to 70% of viewport width */
    max-height: 70vh; /* limit height to 70% of viewport height */
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 1.0rem;
    padding: 6px;
    cursor: pointer;
}
.lightbox-close { right: 8px; top: 8px; }
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }
/* Caption: use a soft blue for better contrast on dark overlay, with subtle shadow for readability */
.lightbox-caption {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    color: darkorange; /* 연한 파란색 */
    font-weight: bold;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
    font-size: 0.95rem;
}
.lightbox-caption-below {
    margin-top: 16px;
    color: #7a5c1e;
    font-size: 1rem;
    text-align: center;
    font-weight: 500;
    background: #fffbe6;
    border-radius: 8px;
    padding: 10px 18px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ensure touch controls spaced */
@media (max-width: 900px) {
    .lightbox-content { max-width: 95%; max-height: 80%; }
    .lightbox-close, .lightbox-prev, .lightbox-next { font-size: 1.2rem; padding: 8px; }
}

/* skeleton placeholder */
.skeleton {
    width: 100%;
    height: 54px;
    background: linear-gradient(90deg, #f0e9d2 25%, #efe2b3 50%, #f0e9d2 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s linear infinite;
    border-radius: 6px;
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* image thumbnail container */
.image-thumb-container { position: relative; cursor: pointer; overflow: hidden; border-radius: 6px; display: block; }
/* make card thumbnails match card image sizing and avoid cropping */
    .image-thumb-container img.image-thumb {
        width: 100%;
        height: 180px;
        object-fit: cover !important; /* 변경: contain → cover */
        object-position: center center;
        display: block;
        transition: transform 0.18s ease;
        background: #fffbe6;
    }
.image-thumb-container .image-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 8px; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.45) 100%); color: #fff; transform: translateY(0); }
/* reduce hover scale so image does not appear to overflow */
.image-thumb-container:hover img.image-thumb { transform: scale(1.01); }
.image-thumb-container .overlay-title { font-size: 0.9rem; font-weight: 700; }

/* lightbox focus outline */
.lightbox-content:focus {
    outline: 3px solid rgba(255,255,255,0.12);
    outline-offset: 6px;
}

/* ensure buttons are reachable/focusable */
.lightbox-close:focus, .lightbox-prev:focus, .lightbox-next:focus {
    outline: 2px solid rgba(255,255,255,0.25);
}

/* scroll-to-top button */
.scroll-top {
    position: fixed;
    left: auto !important; /* ensure not stuck on left */
    right: 12px !important; /* force to bottom-right */
    bottom: 12px !important;
    z-index: 2200;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff, #f0e9d2);
    border: 1px solid #e6c97a;
    color: #8b6b2b;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;

    opacity: 0;
    transform: translateY(8px);
    transition: opacity 180ms ease, transform 180ms ease;
    pointer-events: none; /* ignore clicks when hidden */
}
.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.scroll-top:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.12); }
@media (max-width: 600px) {
    .scroll-top { right: 8px !important; bottom: 8px !important; width: 40px; height:40px; }
}

.scroll-top-btn {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    z-index: 9999;
    border-radius: 50%;
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    background: #5C6142;
    color: #e6c97a;
    border: none;
}
.scroll-top-btn:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    background: #43462f;
}

.title-with-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    margin-bottom: 1.2rem;
    margin-top: 1.2rem;
}
.title-links {
    display: flex;
    flex-direction: row;
    gap: 1.2rem;
}
.title-links-horizontal {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: center;
}
.link-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.link-group-horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.7rem;
    padding: 0.4rem 1rem;
    border-radius: 14px;
    box-shadow: 0 1px 8px rgba(180,160,80,0.04);
    background: #faf9f6;
}
.group-hera {
    border: 1.5px solid #e6c97a;
}
.group-repos {
    border: 1.5px solid #b8a0e6;
}
.group-label {
    font-weight: 600;
    font-size: 0.98rem;
    color: #5C6142;
    margin-right: 0.7rem;
    padding: 0.1rem 0.6rem;
    border-radius: 6px;
    background: transparent;
    letter-spacing: 0.01em;
}
.title-link-btn {
    min-width: 64px;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 7px;
    margin: 0;
    padding: 0.18rem 0.7rem 0.18rem 0.7rem;
    box-shadow: 0 1px 4px rgba(180,160,80,0.06);
    background: linear-gradient(180deg, #f7f6e7 0%, #e6c97a 100%);
    color: #5C6142;
    border: 1px solid #e6c97a;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.01em;
}
.title-link-btn:hover {
    background: linear-gradient(180deg, #ffe9a7 0%, #e6c97a 100%);
    color: #7a5c1e;
    box-shadow: 0 2px 8px rgba(180,160,80,0.12);
}
.title-link-btn:active {
    background: #e6c97a;
    color: #5C6142;
}

.header-tooltip-icon {
    color: #b8a05a;
    font-size: 1.15rem;
    vertical-align: middle;
    margin: 0 0.1rem 0 0.1rem;
    transition: color 0.18s;
}
.header-tooltip-icon:hover {
    color: #e6c97a;
}

.custom-grid-bg .b-datagrid-table {
    background-color: #fffbe6 !important;
    table-layout: fixed !important;
    border-radius: 18px;
    box-shadow: 0 2px 24px 0 rgba(180,160,80,0.12);
    border: 2px solid #e6c97a;
}
.custom-grid-bg .b-datagrid-table th, .custom-grid-bg .b-datagrid-table td {
    white-space: normal !important;
    word-break: keep-all !important;
    vertical-align: middle !important;
    background-color: #fffbe6 !important;
    font-size: 1rem;
    padding: 0.75rem 1rem;
}
.custom-grid-bg .b-datagrid-table th {
    font-weight: bold;
    background-color: #fffbe6 !important;
}

.animated-header {
    display: inline-block;
    animation: headerFadeScale 1.2s cubic-bezier(0.4,0,0.2,1) forwards;
    font-weight: bold;
    color: #7a5c1e;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(180,160,80,0.12);
}
@keyframes headerFadeScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
        color: #b8a05a;
    }
    60% {
        opacity: 1;
        transform: scale(1.08);
        color: #e6c97a;
    }
    100% {
        opacity: 1;
        transform: scale(1);
        color: #7a5c1e;
    }
}

.header-flex {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
}
.animated-header-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}
.header-title-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.header-title-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.header-title {
    font-size: 2.2rem;
    font-weight: bold;
    color: #7a5c1e;
    letter-spacing: 1px;
}
.header-title-bg {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}
.header-bg-img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    width: 120px;
    height: 120px;
    opacity: 0.18;
    pointer-events: none;
}
.header-title-fg {
    position: relative;
    z-index: 1;
    margin-left: 16px;
}

.header-center-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0.5rem;
}

.header-row-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    min-height: 100px;
}
.header-row-img {
    width: 150px;
    height: 80px;
    object-fit: contain;
}


