/*
 * Article CSS
 * 블로그 글 목록 및 글 상세 페이지 스타일
 */

/* ==========================================================================
   CSS VARIABLES (COLORS)
   ========================================================================== */

:root {
    /* Primary Colors */
    --primary-color: #7C3AED;
    --primary-hover: #5b21b6;
    --primary-light: rgba(124, 58, 237, 0.10);
    --primary-focus: rgba(124, 58, 237, 0.16);
    
    /* Neutral Colors */
    --white: #fff;
    --black: #222;
    --gray-100: #f6f6f6;
    --gray-200: #b0b0b0;
    --gray-300: #666;
    --gray-400: #444;
    
    /* Shadow Colors */
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.10);
    
    /* Transparent Colors */
    --transparent-purple: rgba(112.520718, 44.062154, 249.437846, 0.1);
}

/* ==========================================================================
   ARTICLE LIST STYLES
   ========================================================================== */

#article-list .card:hover {
    transform: translateY(-6px);
    transition-duration: 0.5s;
}

.article-list .article-card h5 {
    font-size: 17px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.article-list .card-body {
    margin-top: 10px;
    padding: 5px;
}

.article-list .card-body .card-text {
    font-size: 14px;
    color: var(--gray-400);
    height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
}

/* ==========================================================================
   ARTICLE DETAIL STYLES
   ========================================================================== */

/* Article Header */
article header {
    background: var(--white);
    margin-bottom: 3rem;
    /*box-shadow:*/
        /*0 4px 6px -1px rgba(0, 0, 0, 0.1),*/
        /*0 2px 4px -1px rgba(0, 0, 0, 0.06);*/
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
    position: relative;
    overflow: hidden;
}

/*article header::before {*/
/*    content: '';*/
/*    position: absolute;*/
/*    top: 0;*/
/*    left: 0;*/
/*    right: 0;*/
/*    height: 4px;*/
/*    background: linear-gradient(90deg, var(--primary-color), #a855f7, var(--primary-hover));*/
/*    background-size: 200% 100%;*/
/*    animation: shimmer 3s ease-in-out infinite;*/
/*}*/

/*article header::after {*/
/*    content: '';*/
/*    position: absolute;*/
/*    top: 0;*/
/*    right: 0;*/
/*    width: 100px;*/
/*    height: 100px;*/
/*    background: radial-gradient(circle, rgba(124, 58, 237, 0.05) 0%, transparent 70%);*/
/*    border-radius: 50%;*/
/*    transform: translate(30px, -30px);*/
/*}*/

article header h1 {
    font-size: calc(0.9rem + 1.5vw);
    color: var(--black);
    margin-bottom: 2rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    display: inline-block;
    position: relative;
}

article header h1::before {
    content: '"';
    color: var(--gray-200);
    font-size: 2.2rem;
    font-weight: 700;
    margin-right: 10px;
}

article header h1::after {
    content: '"';
    color: var(--gray-200);
    font-size: 2.2rem;
    font-weight: 700;
    margin-left: 10px;
}

article header h5 {
    font-size: 1.15rem;
}

.blog-title-quote {
    color: var(--gray-200);
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 10px;
}

article header .meta-item {
    color: var(--gray-400);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

article header .username {
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.15);
}

article header .createdAt {
    background: rgba(58, 237, 202, 0.08);
    border: 1px solid rgba(58, 237, 202, 0.15);
}

article header .updatedAt {
    background: rgba(237, 77, 58, 0.08);
    border: 1px solid rgba(237, 77, 58, 0.15);
}

article header .username::before {
    content: '✨';
    font-size: 0.9rem;
}

article header .createdAt::before {
    content: '🗓';
    font-size: 0.9rem;
}

article header .updatedAt::before {
    content: '🗓';
    font-size: 0.9rem;
}

article header .separator {
    color: var(--gray-300);
    margin: 0 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.7;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.main {
    min-height: 60vh;
}

/* Blog List Container */
.container {
    min-height: 100vh;
}

#article-list {
    min-height: 50vh;
}


/* Previous/Next Navigation */
#prev-next-card .card {
    background: var(--gray-100);
    width: 55%;
}

#prev-next-card .card:hover {
    background-color: var(--transparent-purple);
    border-color: var(--white);
    transform: translateY(-5px);
    transition-duration: 0.5s;
}

.pn-label {
    font-size: 0.80em;
}

/* ==========================================================================
   MARKDOWN STYLES
   ========================================================================== */

.markdown-body pre > code {
    white-space: pre-wrap;
}

/* ==========================================================================
   EMPTY STATE STYLES
   ========================================================================== */

.empty-article-message {
    width: 100%;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--white);
    padding: 0 16px;
    box-sizing: border-box;
    animation: fadeIn 0.7s;
}

.empty-article-icon {
    margin-bottom: 24px;
}

.empty-article-text {
    font-size: 1.25rem;
    color: var(--black);
    margin-bottom: 32px;
    text-align: center;
    font-weight: 500;
}

.empty-article-btn {
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: 12px;
    padding: 16px 0;
    width: 320px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.empty-article-btn:hover {
    background: var(--gray-400);
}

/* ==========================================================================
   BLOG MENU STYLES
   ========================================================================== */

.blog-menu-title {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
    margin: 32px 0 20px 0;
}

.blog-menu-sub-title {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--gray-300);
}

.blog-menu-sub-title span {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px 0;
}

.blog-menu-quote {
    color: var(--gray-200);
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 10px;
}

.blog-menu-name {
    color: var(--black);
    font-size: 2rem;
    font-weight: 600;
}

.side-link .badge {
    position: relative;
    top: -1px;
    color: #7C3AED;
    border: 1px solid rgba(124, 58, 237, 0.15);
}

/* ==========================================================================
   BLOG SEARCH STYLES
   ========================================================================== */

.blog-search-group {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 24px var(--primary-light), 0 1.5px 6px var(--shadow-light);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.blog-search-group:focus-within {
    box-shadow: 0 8px 32px var(--primary-focus), 0 2px 8px var(--shadow-medium);
}

.blog-search-input {
    flex: 1 1 0;
    border: none;
    outline: none;
    padding: 12px 16px;
    font-size: 1rem;
    background: transparent;
    border-radius: 8px 0 0 8px;
}

.blog-search-input::placeholder {
    color: var(--gray-200);
    font-size: 1rem;
}

.blog-search-btn {
    border: none;
    background: var(--primary-color);
    color: var(--white);
    padding: 0 15px;
    height: 48px;
    font-size: 1.1rem;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: background 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-search-btn:hover,
.blog-search-btn:focus {
    background: var(--primary-hover);
    color: var(--white);
}

@media (min-width: 1200px) {
    .main {
        width: 100%;
    }
}

@media (min-width: 1400px) {
    .main {
        width: 90%;
    }
}


/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}