/*
Theme Name: 트렌딩토픽 최종 뉴스룸
Theme URI: https://trendingtopic.co.kr/
Author: Codex
Author URI: https://openai.com/
Description: 승인된 최종 혼합안을 워드프레스에 적용한 반응형 뉴스룸 테마입니다. 초보자용 시작 화면, 자동 기사 목차, 개인정보처리방침 편집, 광고 위젯과 분석 코드 설정을 포함합니다.
Version: 3.1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: trending-topic-final
Tags: blog, news, custom-logo, featured-images, two-columns, right-sidebar, threaded-comments, translation-ready
*/

:root {
  --ink: #151515;
  --muted: #6b6f73;
  --line: #d8dadd;
  --paper: #fff;
  --soft: #f4f5f6;
  --red: #d9212d;
  --navy: #10243c;
  --yellow: #e6ff63;
  --shell: min(1200px, calc(100% - 48px));
}

*,
*::before,
*::after {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  width: 100%;
  max-width: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}

@supports (overflow-x: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

body,
button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button {
  color: inherit;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.skip-link,
.screen-reader-text {
  position: fixed;
  z-index: 10000;
  top: 8px;
  left: 8px;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus,
.screen-reader-text:focus {
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  color: #fff;
  background: #111;
}

.progress-line {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 0;
  height: 4px;
  background: #ef2636;
  pointer-events: none;
}

.icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.category {
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}

.meta {
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  margin-top: 80px;
  padding: 48px 0 56px;
  color: #d8d8d8;
  background: #171717;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.9fr;
  gap: 64px;
}

.footer-logo {
  color: #fff;
  font-size: 26px;
  font-weight: 950;
}

.footer-brand p,
.footer-meta p {
  margin: 12px 0 0;
  color: #a6a6a6;
  font-size: 13px;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
}

.footer-links a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 750;
}

.footer-links a:last-child {
  color: #fff;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.custom-logo-link {
  display: block;
  max-width: 230px;
}

.custom-logo-link img {
  width: auto;
  height: 48px;
  object-fit: contain;
}

.ttn-custom-logo {
  width: auto;
  max-width: 230px;
  height: 48px;
  object-fit: contain;
}

.nf-overlay-panel {
  top: 0 !important;
}

.admin-bar .nf-overlay-panel {
  top: 32px !important;
}

.ttn-ticker-source {
  display: none !important;
}

.ttn-media-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  background: #27313a;
  font-size: 14px;
  font-weight: 900;
}

.ttn-media-placeholder::before {
  content: "";
  width: 22px;
  height: 66px;
  margin-right: 10px;
  background: var(--red);
  transform: skew(-10deg);
}

.ttn-ad-slot {
  min-height: 0;
  display: block;
  overflow: hidden;
}

.ttn-ad-slot::before {
  display: none;
}

.ttn-ad-slot img,
.ttn-ad-slot iframe,
.ttn-ad-slot ins {
  max-width: 100%;
}

.ttn-ad-slot:empty,
.ttn-ad-slot[hidden],
.ttn-ad-slot:has(ins.adsbygoogle[data-ad-status="unfilled"]),
.ttn-ad-slot > .widget:empty,
ins.adsbygoogle[data-ad-status="unfilled"] {
  display: none !important;
}

.ttn-head-ad {
  margin: 20px auto;
}

/* WordPress archive and search screens. */
.ttn-archive {
  padding: 42px 0 82px;
}

.ttn-archive-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 0 22px;
  border-bottom: 4px solid var(--ink);
}

.ttn-archive-head h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.3;
  word-break: keep-all;
}

.ttn-archive-head p {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.ttn-filter-nav {
  display: flex;
  gap: 4px 24px;
  margin: 0 0 30px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.ttn-filter-nav a {
  flex: 0 0 auto;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.ttn-filter-nav a.is-active {
  border-bottom-color: var(--red);
  color: var(--ink);
}

.ttn-archive-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 54px;
  padding-top: 32px;
}

.ttn-post-list {
  border-top: 1px solid var(--ink);
}

.ttn-list-item {
  min-height: 190px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 26px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.ttn-list-item-media {
  min-width: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #27313a;
}

.ttn-list-item-media img {
  height: 100%;
}

/* Preserve the complete image in every thumbnail-style slot. */
.ttn-list-item-media,
.nf-latest figure,
.nf-shortform figure,
.nf-issue-lead figure,
.nf-photo-grid a,
.na-latest-side > a,
.na-related-grid > a,
.na-editor-pick > a {
  background: #eef0f1;
}

.ttn-list-item-media img,
.nf-latest figure img,
.nf-shortform figure img,
.nf-issue-lead figure img,
.nf-photo-grid a img,
.nf-hero-slide .nf-story-tile:not(:first-child) img,
.na-latest-side img,
.na-related-grid img,
.na-editor-pick img {
  object-fit: contain;
  object-position: center;
}

.na-hero-media {
  background: #eef0f1;
}

.na-hero-media img {
  height: auto;
  max-height: 760px;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
}

.ttn-list-item h2 {
  margin: 7px 0 10px;
  font-size: 23px;
  line-height: 1.36;
  word-break: keep-all;
}

.ttn-list-item p {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.68;
}

.ttn-pagination {
  margin-top: 38px;
}

.ttn-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ttn-pagination .page-numbers {
  min-width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border: 1px solid #d5d8da;
  font-size: 12px;
  font-weight: 800;
}

.ttn-pagination .current {
  color: #fff;
  border-color: var(--red);
  background: var(--red);
}

.ttn-empty {
  padding: 80px 0;
  text-align: center;
}

.ttn-empty h1,
.ttn-empty h2 {
  margin: 0 0 12px;
  font-size: 30px;
}

.ttn-empty p {
  margin: 0 0 25px;
  color: var(--muted);
}

.ttn-command-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  color: #fff;
  background: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.ttn-archive-sidebar {
  min-width: 0;
}

.ttn-widget {
  min-width: 0;
  margin-bottom: 38px;
  border-top: 4px solid var(--ink);
}

.ttn-widget-title,
.ttn-widget .wp-block-heading,
.ttn-widget .news-section-title {
  min-height: 58px;
  display: flex;
  align-items: center;
  margin: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: inherit;
  font-size: 19px;
  font-weight: 850;
  line-height: 1.35;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.ttn-widget .wp-block-group,
.ttn-widget .wp-block-columns,
.ttn-widget .wp-block-column {
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: 0;
}

.ttn-widget .news-section-line {
  display: none;
}

.ttn-widget ul,
.ttn-widget ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ttn-widget li {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.6;
}

.ttn-widget .wp-block-archives-list a,
.ttn-widget .wp-block-categories-list a,
.ttn-widget .wp-block-page-list a {
  min-height: 30px;
  display: flex;
  align-items: center;
  color: #292e31;
  font-size: 15px;
  font-weight: 720;
}

.ttn-widget .wp-block-latest-posts__list li {
  min-height: 90px;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 10px 0;
}

.ttn-widget .wp-block-latest-posts__list li > .wp-block-latest-posts__post-title:first-child {
  grid-column: 1 / -1;
}

.ttn-widget .wp-block-latest-posts__featured-image,
.ttn-widget .wp-block-latest-posts__featured-image.alignleft,
.ttn-widget .wp-block-latest-posts__featured-image.alignright,
.ttn-widget .wp-block-latest-posts__featured-image.aligncenter {
  width: 104px;
  height: 66px;
  float: none;
  margin: 0;
  overflow: hidden;
  background: #eef0f1;
}

.ttn-widget .wp-block-latest-posts__featured-image a,
.ttn-widget .wp-block-latest-posts__featured-image img {
  width: 100%;
  height: 100%;
  display: block;
  max-width: none !important;
  max-height: none !important;
}

.ttn-widget .wp-block-latest-posts__featured-image img {
  object-fit: contain;
  object-position: center;
}

.ttn-widget .wp-block-latest-posts__post-title {
  display: -webkit-box;
  overflow: hidden;
  color: #202427;
  font-size: 14.5px;
  font-weight: 760;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ttn-widget .wp-block-latest-posts__featured-image + .wp-block-latest-posts__post-title,
.ttn-widget .wp-block-latest-posts__featured-image ~ .wp-block-latest-posts__post-date,
.ttn-widget .wp-block-latest-posts__featured-image ~ .wp-block-latest-posts__post-excerpt {
  grid-column: 2;
}

.ttn-widget .wp-block-latest-posts__post-title:first-child ~ .wp-block-latest-posts__post-date,
.ttn-widget .wp-block-latest-posts__post-title:first-child ~ .wp-block-latest-posts__post-excerpt {
  grid-column: 1 / -1;
}

.ttn-widget .wp-block-latest-posts__post-date {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.ttn-widget select,
.ttn-widget input:not([type="submit"]) {
  max-width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #cfd2d4;
}

/* WordPress article content. */
.na-body > * {
  max-width: 100%;
}

.na-body > p,
.na-body > ul,
.na-body > ol {
  margin-top: 0;
  margin-bottom: 29px;
  color: #202428;
  line-height: 1.93;
}

.na-body > ul,
.na-body > ol {
  padding-left: 1.4em;
}

.na-body li + li {
  margin-top: 8px;
}

.na-body h3,
.na-body h4 {
  margin: 42px 0 16px;
  line-height: 1.45;
  word-break: keep-all;
}

.na-body h3 {
  font-size: 22px;
}

.na-body a:not(.wp-block-button__link) {
  color: #174d81;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.na-body img,
.na-body .wp-block-image img,
.na-body .wp-block-media-text img {
  height: auto;
}

.na-body figure,
.na-body .wp-block-image {
  margin: 42px 0;
}

.na-body figcaption {
  margin-top: 9px;
  color: #747a7f;
  font-size: 11px;
  line-height: 1.55;
}

.na-body .wp-block-quote,
.na-body blockquote {
  margin: 44px 0;
  padding: 5px 0 5px 28px;
  border-left: 5px solid var(--red);
}

.na-body blockquote p {
  margin: 0;
  font-family: inherit;
  font-size: 25px;
  font-weight: 750;
  line-height: 1.55;
}

.na-body blockquote cite {
  display: block;
  margin-top: 13px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.na-body .wp-block-table {
  max-width: 100%;
  margin: 36px 0;
  overflow-x: auto;
  border-top: 3px solid var(--ink);
}

.na-body table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.55;
}

.na-body th,
.na-body td {
  padding: 14px 16px;
  border: 1px solid var(--line);
  text-align: left;
}

.na-body .wp-block-button__link {
  border-radius: 3px;
  color: #fff;
  background: var(--ink);
}

.na-article > .na-source-note {
  margin: 45px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: #697077;
  font-size: 12px;
  line-height: 1.75;
}

.na-author-photo {
  overflow: hidden;
}

.na-author-photo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.na-body .alignwide {
  width: min(900px, calc(100vw - 48px));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.na-body .alignfull {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
}

.ttn-content-toc {
  margin: 36px 0 46px;
  padding: 24px;
  border: 1px solid #d8dadd;
  border-top: 4px solid var(--red);
  background: #f7f8f8;
}

.ttn-content-toc-head {
  margin-bottom: 15px;
}

.ttn-content-toc-head strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.ttn-content-toc-head small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.ttn-content-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ttn-content-toc a {
  min-height: 46px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-top: 1px solid #e0e2e4;
  color: #3d464d;
  font-size: 14px;
  font-weight: 750;
}

.ttn-content-toc a span:first-child {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #33383c;
  font-size: 11px;
  font-weight: 850;
}

.ttn-content-toc a.is-active {
  color: var(--red);
  background: #fff;
}

.ttn-content-toc a.is-active span:first-child {
  background: var(--red);
}

.na-body h2 {
  scroll-margin-top: 24px;
}

.ttn-post-pages {
  margin: 30px 0;
}

.ttn-post-pages .post-page-numbers {
  display: inline-grid;
  min-width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
}

.ttn-post-pages .current {
  color: #fff;
  background: var(--red);
}

.na-hero-media .ttn-media-placeholder {
  aspect-ratio: 16 / 9;
}

.na-latest-side .ttn-media-placeholder,
.na-related-grid .ttn-media-placeholder {
  min-height: 62px;
}

.na-comments .comment-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.na-comments .comment,
.na-comments .pingback {
  padding: 22px 2px;
  border-bottom: 1px solid var(--line);
}

.na-comments .comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  align-items: center;
  font-size: 11px;
}

.na-comments .comment-author img {
  width: 34px;
  height: 34px;
  display: inline-block;
  margin-right: 8px;
  border-radius: 50%;
  vertical-align: middle;
}

.na-comments .comment-content p {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.7;
}

.na-comments .children {
  margin-left: 28px;
  padding-left: 18px;
  border-left: 2px solid var(--line);
  list-style: none;
}

.na-comments .comment-respond {
  margin-top: 24px;
}

.na-comments .comment-reply-title {
  margin: 0 0 12px;
  font-size: 16px;
}

.na-comments .comment-form p {
  margin: 10px 0 0;
}

.na-comments label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 800;
}

.na-comments textarea,
.na-comments input[type="text"],
.na-comments input[type="email"],
.na-comments input[type="url"] {
  width: 100%;
  min-height: 42px;
  padding: 11px 12px;
  border: 1px solid #cfd2d4;
  border-radius: 2px;
  background: #fff;
}

.na-comments .submit {
  min-width: 76px;
  min-height: 40px;
  border: 0;
  border-radius: 2px;
  color: #fff;
  background: var(--ink);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.na-comments .comment-form-cookies-consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.na-comments .comment-form-cookies-consent input {
  margin-top: 4px;
}

.na-comments .comment-form-cookies-consent label {
  font-weight: 500;
}

.ttn-page {
  width: min(820px, calc(100% - 48px));
  margin: 0 auto;
  padding: 54px 0 90px;
}

.ttn-page h1 {
  margin: 0 0 32px;
  padding-bottom: 22px;
  border-bottom: 4px solid var(--ink);
  font-size: 38px;
  line-height: 1.3;
  word-break: keep-all;
}

.ttn-page .na-body {
  max-width: 100%;
}

@media (hover: hover) and (pointer: fine) {
  .ttn-list-item:hover h2,
  .ttn-widget a:hover,
  .footer-links a:hover {
    color: var(--red);
  }
}

@media (max-width: 980px) {
  .admin-bar .nf-overlay-panel {
    top: 46px !important;
  }

  .ttn-archive-layout {
    grid-template-columns: 1fr;
  }

  .ttn-archive-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 782px) {
  .admin-bar .nf-overlay-panel {
    top: 46px !important;
  }
}

@media (max-width: 680px) {
  :root {
    --shell: min(100% - 28px, 1200px);
  }

  .ttn-archive {
    padding-top: 28px;
  }

  .ttn-archive-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ttn-archive-head h1 {
    font-size: 28px;
  }

  .ttn-archive-layout,
  .ttn-archive-sidebar {
    grid-template-columns: 1fr;
  }

  .ttn-list-item {
    min-height: 132px;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 15px;
    padding: 18px 0;
  }

  .ttn-list-item h2 {
    margin: 5px 0 8px;
    font-size: 17px;
  }

  .ttn-list-item p {
    display: none;
  }

  .na-body .alignwide,
  .na-body .alignfull {
    width: 100%;
    margin-left: 0;
    transform: none;
  }

  .na-body > p,
  .na-body > ul,
  .na-body > ol {
    margin-bottom: 25px;
    line-height: 1.87;
  }

  .na-body blockquote {
    padding-left: 19px;
  }

  .na-body blockquote p {
    font-size: 21px;
  }

  .na-comments .children {
    margin-left: 10px;
    padding-left: 10px;
  }

  .ttn-page {
    width: calc(100% - 28px);
    padding-top: 36px;
  }

  .ttn-page h1 {
    font-size: 30px;
  }
}

@media print {
  .nf-header,
  .na-share-rail,
  .na-mobile-share,
  .na-tool-row,
  .na-sidebar,
  .na-bottom-share,
  .na-related-news,
  .na-comments,
  .nf-newsletter,
  .site-footer,
  .nf-back-top,
  .ttn-ad-slot {
    display: none !important;
  }

  .na-layout {
    display: block !important;
    width: 100% !important;
  }

  .na-article {
    max-width: 760px;
    margin: 0 auto;
  }
}

@media (max-width: 680px) {
  .ttn-content-toc {
    margin: 30px 0 40px;
    padding: 20px 16px;
  }

  .ttn-content-toc a {
    min-height: 50px;
    font-size: 14px;
    line-height: 1.45;
  }
}
