/* ===== Detail Page Layout ===== */
.detail-page {
    padding-top: 72px;
    background: #FEFEFE;
    min-height: calc(100vh - 72px);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 32px 0 16px;
}

.breadcrumb-item {
    font-size: 16px;
    font-weight: 400;
    color: var(--gray-text);
    line-height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.breadcrumb-item:hover {
    color: var(--primary);
}

.breadcrumb-item .chevron {
    display: inline-block;
    width: 20px;
    height: 20px;
    position: relative;
}

.breadcrumb-item .chevron::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 7.5px;
    width: 5px;
    height: 10px;
    border-right: 1.5px solid var(--gray-text);
    border-bottom: 1.5px solid var(--gray-text);
    transform: rotate(-45deg);
}

.breadcrumb-active {
    font-size: 16px;
    font-weight: 500;
    color: var(--black);
    line-height: 24px;
}

/* Main Content Layout */
.detail-main {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding-bottom: 60px;
}

/* Left Column - Article Content */
.detail-left {
    width: 800px;
    flex-shrink: 0;
}

.article-content-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
}

.article-content-inner {
    display: flex;
    flex-direction: column;
    gap: 81px;
}

.article-header {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.article-header-top {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 496px;
}

.article-detail-title {
    font-size: 22px;
    font-weight: 500;
    color: var(--black);
    line-height: 1.4;
}

.article-publish-date {
    font-size: 16px;
    font-weight: 500;
    color: var(--gray-text);
    line-height: 1.5;
}

.article-body {
    font-size: 16px;
    font-weight: 400;
    color: var(--black);
    line-height: 1.8;
    white-space: pre-line;
}

.article-body p {
    margin-bottom: 16px;
}

.article-body .link-text {
    color: var(--black);
    font-weight: 500;
}

.article-body .link-url {
    color: var(--primary);
    font-weight: 500;
    word-break: break-all;
}

/* Prev/Next Navigation */
.article-nav {
    display: flex;
    align-items: center;
    gap: 0;
    align-self: stretch;
}

.article-nav-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 19px 16px 20px;
    background: var(--nav-bg);
    flex: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.article-nav-item:first-child {
    border-radius: 0;
}

.article-nav-item:last-child {
    border-radius: 0;
}

.article-nav-item:hover {
    background: #d4d4d4;
}

.article-nav-item.no-link {
    cursor: default;
    opacity: 0.6;
}

.article-nav-item.no-link:hover {
    background: var(--nav-bg);
}

.article-nav-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.article-nav-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    font-weight: 500;
    color: var(--black);
    line-height: 24px;
}

.article-nav-label .nav-chevron {
    display: inline-block;
    width: 20px;
    height: 20px;
    position: relative;
}

.article-nav-label .nav-chevron-up::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 5px;
    width: 10px;
    height: 5px;
    border-left: 1.5px solid var(--black);
    border-top: 1.5px solid var(--black);
    transform: rotate(45deg);
}

.article-nav-label .nav-chevron-down::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 10px;
    height: 5px;
    border-right: 1.5px solid var(--black);
    border-bottom: 1.5px solid var(--black);
    transform: rotate(45deg);
}

.article-nav-title {
    font-size: 16px;
    font-weight: 400;
    color: var(--gray-text);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    text-align: center;
}

/* Right Column - Recommendations */
.detail-right {
    flex: 1;
    min-width: 0;
}

.recommend-panel {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
}

.recommend-header {
    position: relative;
    padding: 24px 24px 0;
}

.recommend-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 68px;
    /*background: var(--white);*/
}

.recommend-header-content {
    position: relative;
    z-index: 1;
}

.recommend-title {
    font-size: 22px;
    font-weight: 500;
    color: var(--black);
    line-height: 1.4;
}

.recommend-lines {
    display: flex;
    flex-direction: column;
    margin-top: 16px;
}

.recommend-line-gray {
    height: 2px;
    background: #E1E1E1;
}

.recommend-line-purple {
    height: 2px;
    background: var(--primary);
    width: 50%;
}

.recommend-list {
    padding: 0;
}

.recommend-item {
    padding: 24px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #E1E1E1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.recommend-item:last-child {
    border-bottom: none;
}

.recommend-item:hover {
    background: rgba(96, 42, 166, 0.03);
}

.recommend-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.recommend-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 400;
    color: var(--white);
    flex-shrink: 0;
}

.recommend-number.top {
    background: var(--primary);
}

.recommend-number.normal {
    background: var(--gray-text);
}

.recommend-item-title {
    font-size: 16px;
    font-weight: 400;
    color: var(--black);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.recommend-item-date {
    font-size: 14px;
    font-weight: 400;
    color: var(--gray-text);
    line-height: 1.4;
    text-align: right;
}

/* ===== Responsive: 1200px ===== */
@media (max-width: 1200px) {
    .detail-main {
        flex-direction: column;
    }

    .detail-left {
        width: 100%;
    }

    .detail-right {
        width: 100%;
    }

    .recommend-panel {
        max-width: 600px;
    }
}

/* ===== Responsive: 900px ===== */
@media (max-width: 900px) {
    .container {
        padding: 0 40px;
    }

    .article-header-top {
        width: 100%;
    }

    .article-nav {
        flex-direction: column;
        gap: 8px;
    }

    .article-nav-item {
        width: 100%;
    }
}

/* ===== Responsive: 600px ===== */
@media (max-width: 600px) {
    .container {
        padding: 0 20px;
    }

    .header .container {
        padding: 12px 20px;
    }

    .header-nav {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        padding: 0 24px;
        gap: 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, padding 0.3s ease;
    }

    .header-nav.open {
        max-height: 400px;
        opacity: 1;
        padding: 16px 24px;
        gap: 8px;
    }

    .header-nav a {
        padding: 10px 0;
        border-bottom: 1px solid #f0ebf8;
        width: 100%;
        opacity: 1 !important;
        font-size: 16px;
        transform: translateX(-10px);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .header-nav.open a {
        transform: translateX(0);
        opacity: 0.8;
    }

    .header-nav.open a:last-child {
        border-bottom: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-actions .btn-yellow, .header-actions .btn-purple {
        display: none;
    }

    .breadcrumb {
        padding: 20px 0 12px;
    }

    .article-content-card {
        padding: 16px;
    }

    .article-content-inner {
        gap: 40px;
    }

    .article-detail-title {
        font-size: 18px;
    }

    .article-publish-date {
        font-size: 14px;
    }

    .article-body {
        font-size: 15px;
    }

    .article-nav-item {
        padding: 12px;
    }

    .article-nav-title {
        font-size: 14px;
    }

    .floating-cta .pill-btn {
        font-size: 20px;
        padding: 12px 20px;
    }
}

/* ===== Responsive: 375px ===== */
@media (max-width: 375px) {
    .article-detail-title {
        font-size: 16px;
    }

    .article-body {
        font-size: 14px;
    }
}
