﻿/* =========================================================
   /css/news.css
   뉴스 목록/상세 전용 CSS
   동아닷컴형 정보 구조 참고, 독자 디자인 적용
   ========================================================= */

.news-page {
    padding: 28px 0 56px;
}

.news-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 34px;
    align-items: start;
}

.news-main {
    min-width: 0;
}

.news-aside {
    min-width: 0;
}

.news-page-head {
    border-bottom: 2px solid #111827;
    padding-bottom: 16px;
    margin-bottom: 22px;
}

.news-page-title {
    margin: 0;
    font-size: 30px;
    line-height: 1.25;
    font-weight: 900;
    letter-spacing: -0.06em;
    color: #111827;
}

.news-page-desc {
    margin: 9px 0 0;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.65;
}

.news-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
}

.news-category-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #ffffff;
    color: #374151;
    font-size: 14px;
    font-weight: 800;
}

.news-category-tabs a.active,
.news-category-tabs a:hover {
    border-color: #111827;
    background: #111827;
    color: #ffffff;
}

.news-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    color: #6b7280;
    font-size: 14px;
}

.news-count strong {
    color: #111827;
}

.news-list-wrap {
    border-top: 1px solid #111827;
}

.news-row {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 20px;
    padding: 22px 0;
    border-bottom: 1px solid #e5e7eb;
}

.news-row-thumb {
    width: 210px;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
    background: #e5e7eb;
}

.news-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-row-body {
    min-width: 0;
}

.news-row-category {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 8px;
}

.news-row-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.35;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: #111827;
}

.news-row-title a:hover {
    color: #2563eb;
}

.news-row-summary {
    margin: 9px 0 0;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.65;
}

.news-row-meta {
    margin-top: 11px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    color: #6b7280;
    font-size: 13px;
}

.news-row-meta span::after {
    content: "";
}

.news-empty {
    padding: 44px 20px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    color: #6b7280;
    font-weight: 800;
}

.news-paging {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 26px;
    flex-wrap: wrap;
}

.news-paging a,
.news-paging strong {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    font-size: 14px;
    font-weight: 800;
}

.news-paging strong {
    border-color: #111827;
    background: #111827;
    color: #ffffff;
}

/* =========================
   Aside
   ========================= */

.news-side-box {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
    margin-bottom: 18px;
}

.news-side-head {
    padding: 15px 17px;
    border-bottom: 1px solid #e5e7eb;
    background: #111827;
    color: #ffffff;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.news-side-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.news-side-list li {
    border-bottom: 1px solid #f3f4f6;
}

.news-side-list li:last-child {
    border-bottom: 0;
}

.news-side-list a {
    display: block;
    padding: 15px 16px;
    color: #111827;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 800;
}

.news-side-list a:hover {
    color: #2563eb;
}

.news-rank-item {
    display: grid !important;
    grid-template-columns: 30px 1fr;
    gap: 10px;
}

.news-rank-num {
    color: #2563eb;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
}

/* =========================
   View
   ========================= */

.article-wrap {
    max-width: 780px;
}

.article-category {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 12px;
}

.article-title {
    margin: 0;
    color: #111827;
    font-size: 38px;
    line-height: 1.22;
    font-weight: 900;
    letter-spacing: -0.07em;
}

.article-subtitle {
    margin: 13px 0 0;
    color: #4b5563;
    font-size: 19px;
    line-height: 1.65;
    font-weight: 500;
    letter-spacing: -0.03em;
}

.article-meta {
    margin-top: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    color: #6b7280;
    font-size: 14px;
}

.article-tools {
    margin: 16px 0 22px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.article-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.article-thumb {
    margin: 0 0 22px;
}

.article-thumb img {
    width: 100%;
    border-radius: 16px;
}

.article-caption {
    margin-top: 8px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
}

.article-content {
    color: #111827;
    font-size: 18px;
    line-height: 1.9;
    letter-spacing: -0.02em;
    word-break: keep-all;
}

.article-content p {
    margin: 0 0 1.15em;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 18px auto;
}

.article-content h2,
.article-content h3 {
    margin: 1.55em 0 0.75em;
    line-height: 1.35;
    letter-spacing: -0.04em;
}

.article-tags {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.article-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 11px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 13px;
    font-weight: 800;
}

.article-related {
    margin-top: 34px;
}

.article-section-title {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #111827;
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.comment-box {
    margin-top: 34px;
    border-top: 2px solid #111827;
    padding-top: 18px;
}

.comment-title {
    margin: 0 0 16px;
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.comment-form {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    background: #f9fafb;
    margin-bottom: 18px;
}

.comment-textarea {
    width: 100%;
    min-height: 100px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 13px;
    font-size: 15px;
    resize: vertical;
    outline: none;
}

.comment-textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.comment-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.comment-submit {
    border: 0;
    border-radius: 10px;
    background: #111827;
    color: #ffffff;
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.comment-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.comment-item {
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
}

.comment-author {
    font-size: 14px;
    font-weight: 900;
    color: #111827;
}

.comment-date {
    margin-left: 8px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
}

.comment-content {
    margin-top: 8px;
    color: #374151;
    font-size: 15px;
    line-height: 1.65;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 1024px) {
    .news-layout {
        grid-template-columns: 1fr;
    }

    .news-aside {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 18px;
    }

    .article-wrap {
        max-width: none;
    }
}

@media (max-width: 720px) {
    .news-page {
        padding-top: 22px;
    }

    .news-page-title {
        font-size: 26px;
    }

    .news-row {
        grid-template-columns: 112px 1fr;
        gap: 13px;
        padding: 18px 0;
    }

    .news-row-thumb {
        width: 112px;
        border-radius: 12px;
    }

    .news-row-title {
        font-size: 17px;
        line-height: 1.42;
    }

    .news-row-summary {
        display: none;
    }

    .news-aside {
        grid-template-columns: 1fr;
    }

    .article-title {
        font-size: 30px;
    }

    .article-subtitle {
        font-size: 17px;
    }

    .article-content {
        font-size: 17px;
        line-height: 1.85;
    }
}

@media (max-width: 480px) {
    .news-row {
        grid-template-columns: 92px 1fr;
    }

    .news-row-thumb {
        width: 92px;
    }

    .news-row-category {
        display: none;
    }

    .article-title {
        font-size: 27px;
    }
}

/* =========================================================
   /css/news_sidebar_font_fix.css
   우측 최신뉴스 / 많이 본 뉴스 폰트 확대 보정
   list.asp / latest.asp / ranking.asp / view.asp 공통 적용
   반드시 news_list_readable.css, news_ranking.css 뒤에 로드
   ========================================================= */

/* 우측 박스 제목 */
.news-page .news-aside .news-side-head {
    font-size: 20px !important;
    line-height: 1.35 !important;
    font-weight: 750 !important;
    letter-spacing: -0.06em !important;
    color: #111827 !important;
}

/* 우측 목록 링크 */
.news-page .news-aside .news-side-list a {
    font-size: 16.5px !important;
    line-height: 1.65 !important;
    font-weight: 600 !important;
    letter-spacing: -0.045em !important;
    color: #1f2937 !important;
}

/* 우측 목록 hover */
.news-page .news-aside .news-side-list a:hover {
    color: #1f5fae !important;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* 많이 본 뉴스 순위 숫자 */
.news-page .news-aside .news-rank-num {
    font-size: 21px !important;
    line-height: 1.2 !important;
    font-weight: 850 !important;
    color: #1f5fae !important;
}

/* 목록 간격도 폰트 크기에 맞게 확대 */
.news-page .news-aside .news-side-list li {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
}

/* 랭킹 아이템 정렬 보정 */
.news-page .news-aside .news-rank-item {
    grid-template-columns: 32px minmax(0, 1fr) !important;
    gap: 9px !important;
}

/* 우측 박스 내부 여백 */
.news-page .news-aside .news-side-list {
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* 모바일에서는 너무 커지지 않게 조정 */
@media (max-width: 720px) {
    .news-page .news-aside .news-side-head {
        font-size: 18.5px !important;
    }

    .news-page .news-aside .news-side-list a {
        font-size: 15.5px !important;
        line-height: 1.6 !important;
    }

    .news-page .news-aside .news-rank-num {
        font-size: 19px !important;
    }

    .news-page .news-aside .news-side-list li {
        padding-top: 13px !important;
        padding-bottom: 13px !important;
    }
}

/* =========================================================
   검색 버튼 두 줄 표시 보정
   ========================================================= */

.site-search-form {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.site-search-input {
    flex: 1 1 auto;
    min-width: 0;
}

.site-search-button {
    flex: 0 0 auto;
    min-width: 58px;
    height: 38px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    white-space: nowrap !important;
    word-break: keep-all !important;
    line-height: 1 !important;

    border: 0;
    border-radius: 999px;
    background: #1f5fae;
    color: #ffffff;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
}

.site-search-button:hover {
    background: #174b8f;
}


/* =========================================================
   댓글 로그인/등록 버튼 세로 중앙 정렬 보정
   대상: button.comment-submit, a.comment-submit 공통
   ========================================================= */

.comment-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.comment-login-box .comment-actions {
    justify-content: flex-start;
    margin-top: 14px;
}

.comment-submit,
a.comment-submit,
button.comment-submit {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px !important;
    height: 42px !important;
    padding: 0 18px !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    text-align: center !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    border: 0;
    border-radius: 10px;
    background: #111827;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.comment-submit:hover,
a.comment-submit:hover,
button.comment-submit:hover {
    background: #1f2937;
    color: #ffffff;
}

.comment-login-box {
    display: block;
}

.comment-login-text {
    margin: 0;
    color: #4b5563;
    font-weight: 650;
    line-height: 1.6;
}
