:root {
    --brand-1: #4f46e5;
    --brand-2: #06b6d4;
    --ink: #1e293b;
    --muted: #64748b;
    --page-bg: #f3f4f8;
}

body {
    background-color: var(--page-bg);
    color: var(--ink);
    font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---- Navbar: 상단 유틸리티 바 (메뉴 링크 + 로그인/사용자 영역) ---- */
.lsh-navbar {
    /* 부트스트랩 .navbar 기본값(display:flex, row)을 덮어써서
       유틸리티 바 / 대형 로고 두 줄이 세로로 쌓이게 한다. */
    flex-direction: column;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

.lsh-topbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.lsh-menu-toggle {
    font-size: 1.2rem;
    line-height: 1;
    padding: 0.35rem 0.65rem;
}

.lsh-menu-toggle::after {
    display: none; /* 햄버거 아이콘 옆 기본 캐럿은 생략 */
}

.lsh-user-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ---- Hero 영역 나비게이션: 로고 아래, 검색창 위에 항상 노출되는 메뉴 탭 ---- */
.lsh-hero-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
    margin: 0.9rem 0 0;
    padding: 0;
    list-style: none;
}

.lsh-hero-nav .nav-link {
    padding: 0.5rem 0.9rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.lsh-hero-nav .nav-link:hover,
.lsh-hero-nav .nav-link:focus {
    background-color: rgba(79, 70, 229, 0.08);
    color: var(--brand-1);
}

/* ---- Navbar: 중앙 대형 로고 + 검색창 (Hero) ---- */
.lsh-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.3rem 0 1.5rem;
}

.lsh-hero-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.lsh-hero-logo {
    height: 52px;
    width: auto;
}

.lsh-hero-wordmark {
    font-weight: 800;
    font-size: 2.3rem;
    letter-spacing: 0.5px;
    line-height: 1;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lsh-hero-search {
    margin-top: 1.1rem;
    width: 100%;
    max-width: 480px;
}

.lsh-hero-search .form-control {
    border-radius: 999px;
    background-color: #f1f2f6;
    border: 1px solid transparent;
    padding: 0.65rem 1.2rem;
    text-align: center;
}

.lsh-hero-search .form-control:focus {
    background-color: #fff;
    border-color: var(--brand-1);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.12);
    text-align: left;
}

@media (min-width: 576px) {
    .lsh-hero-logo {
        height: 68px;
    }

    .lsh-hero-wordmark {
        font-size: 3.1rem;
    }
}

.btn-lsh {
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    border: none;
    color: #fff;
    font-weight: 600;
}

.btn-lsh:hover {
    color: #fff;
    filter: brightness(1.06);
}

/* ---- Navbar: 로그인 상태 우측 영역(관리자/사용자 드롭다운) ---- */
.lsh-ghost-btn {
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: var(--ink);
    font-weight: 600;
    background: transparent;
}

.lsh-ghost-btn:hover,
.lsh-ghost-btn:focus {
    background-color: rgba(15, 23, 42, 0.04);
    color: var(--ink);
    border-color: rgba(15, 23, 42, 0.18);
}

.lsh-avatar-btn {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border: none;
    background: transparent;
    padding: 0.2rem 0.3rem;
}

.lsh-avatar-btn:hover {
    background-color: rgba(15, 23, 42, 0.04);
    border-radius: 999px;
}

.lsh-avatar-btn::after {
    display: none; /* 아바타 옆 기본 화살표 캐럿은 지저분해서 생략 */
}

.lsh-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lsh-avatar-name {
    font-weight: 600;
    color: var(--ink);
}

.lsh-dropdown {
    border: none;
    border-radius: 14px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06), 0 12px 28px rgba(15, 23, 42, 0.1);
    padding: 0.5rem;
    margin-top: 0.5rem !important;
}

.lsh-dropdown .dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-weight: 500;
}

.lsh-dropdown .dropdown-item:hover,
.lsh-dropdown .dropdown-item:focus {
    background-color: rgba(79, 70, 229, 0.08);
    color: var(--brand-1);
}

.lsh-dropdown .dropdown-item.text-danger:hover {
    background-color: rgba(220, 53, 69, 0.08);
    color: #dc3545;
}

.lsh-dropdown-header {
    padding: 0.4rem 0.75rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--muted);
}

/* ---- Weather bar ---- */
.lsh-weather {
    margin-top: 0.85rem;
    padding: 0.55rem 1rem;
    background: #fff;
    border-radius: 999px;
    color: var(--muted);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* ---- Content surface ---- */
.lsh-surface {
    background: #fff;
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 12px 28px rgba(15, 23, 42, 0.05);
}

@media (max-width: 576px) {
    .lsh-surface {
        padding: 1.1rem;
        border-radius: 14px;
    }
}

.lsh-surface h3 {
    font-weight: 800;
    letter-spacing: -0.3px;
}

/* ---- Cards / buttons / tables refinement ---- */
.card {
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 14px;
}

.btn {
    border-radius: 10px;
}

.btn.rounded-pill {
    border-radius: 999px !important;
}

.table > :not(caption) > * > * {
    border-color: rgba(15, 23, 42, 0.06);
}

.table thead th {
    font-size: 0.72rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    border-bottom-width: 1px;
}

.table tbody tr:hover {
    background-color: rgba(79, 70, 229, 0.035);
}

.alert {
    border-radius: 12px;
    border: none;
}

/* ---- Blog: 첫 화면 최신글 위젯 (네이버 블로그 검색결과 스타일: 제목/본문 요약 + 우측 썸네일) ---- */
.lsh-blog-more {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
}

.lsh-blog-more:hover {
    color: var(--brand-1);
}

.lsh-blog-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.lsh-blog-item {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 1rem 0.25rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s ease;
    border-radius: 10px;
}

.lsh-blog-item:hover {
    background-color: rgba(79, 70, 229, 0.035);
}

.lsh-blog-item:hover .lsh-blog-item-title {
    color: var(--brand-1);
}

.lsh-blog-item-text {
    flex: 1 1 auto;
    min-width: 0;
    padding-left: 0.5rem;
}

.lsh-blog-item-title {
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s ease;
}

.lsh-blog-item-excerpt {
    margin: 0.3rem 0 0;
    font-size: 0.86rem;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.lsh-blog-item-meta {
    margin-top: 0.45rem;
    font-size: 0.78rem;
    color: var(--muted);
}

.lsh-blog-item-thumb {
    flex: 0 0 auto;
    width: 84px;
    height: 84px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.18);
}

.lsh-blog-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lsh-blog-item-thumb-fallback {
    color: #fff;
    font-weight: 800;
    font-size: 1.6rem;
}

.lsh-news-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.lsh-news-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0.25rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s ease;
    border-radius: 10px;
}

.lsh-news-item:hover {
    background-color: rgba(79, 70, 229, 0.035);
}

.lsh-news-item:hover .lsh-news-item-title {
    color: var(--brand-1);
}

.lsh-news-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s ease;
}

.lsh-news-item-meta {
    flex: 0 0 auto;
    font-size: 0.78rem;
    color: var(--muted);
    white-space: nowrap;
}

@media (max-width: 576px) {
    .lsh-news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .lsh-news-item-title {
        white-space: normal;
    }

    .lsh-blog-item-thumb {
        width: 64px;
        height: 64px;
        border-radius: 10px;
    }

    .lsh-blog-item-thumb-fallback {
        font-size: 1.2rem;
    }

    .lsh-blog-item-excerpt {
        -webkit-line-clamp: 2;
    }
}

/* ---- Blog ---- */
.blog-content img {
    max-width: 100%;
    border-radius: 10px;
}

.blog-content {
    line-height: 1.75;
    word-break: break-word;
}

#editor {
    border-radius: 0 0 10px 10px;
}

/* ---- Tools: hub cards ---- */
.lsh-tool-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    height: 100%;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.lsh-tool-card:hover {
    border-color: var(--brand-1);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.1);
}

.lsh-tool-card-icon {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
}

.lsh-tool-card-title {
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.25rem;
}

.lsh-tool-card-desc {
    margin: 0;
    font-size: 0.88rem;
    color: var(--muted);
}

/* ---- Tools: shared tab bar between tool pages ---- */
.lsh-tool-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    flex-wrap: wrap;
}

.lsh-tool-tab {
    padding: 0.6rem 1rem;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.lsh-tool-tab:hover {
    color: var(--ink);
}

.lsh-tool-tab.active {
    color: var(--brand-1);
    border-bottom-color: var(--brand-1);
}

/* ---- Unit converter ---- */
.lsh-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lsh-cat-tab {
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #fff;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

.lsh-cat-tab:hover {
    border-color: var(--brand-1);
    color: var(--brand-1);
}

.lsh-cat-tab.active {
    background: var(--brand-1);
    border-color: var(--brand-1);
    color: #fff;
}

/* ---- Shared result rows (converter output + address result) ---- */
.lsh-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.lsh-result-row:last-child {
    border-bottom: none;
}

.lsh-result-label {
    color: var(--muted);
    font-size: 0.9rem;
    flex: 0 0 auto;
}

.lsh-result-value {
    font-weight: 700;
    color: var(--ink);
    text-align: right;
    word-break: break-all;
}

.lsh-address-tool #address-result {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    padding: 0.25rem 1rem;
}
