/* ================================================
   CKEditor Article Content Styles
   ================================================ */

article {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.05rem;
  line-height: 1.85;
  color: #222;
  max-width: 780px;
  margin: 2.5rem auto;
  padding: 0 1rem;
}

/* --- Paragraphs --- */
article p {
  margin: 0 0 1.4rem;
}

/* --- Headings --- */
article h2 {
  font-family: 'Arial', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #111;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #f05033; /* IBT 브랜드 컬러 */
  line-height: 1.3;
}

article h3 {
  font-family: 'Arial', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #333;
  margin: 2rem 0 0.75rem;
}

/* --- Links --- */
article a {
  color: #f05033;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
article a:hover {
  border-bottom-color: #f05033;
}

/* --- Strong / Italic --- */
article strong {
  font-weight: 700;
  color: #111;
}
article em, article i {
  font-style: italic;
  color: #555;
}

/* --- Figure & Images --- */
article figure {
  margin: 2rem 0;
  text-align: center;
}

article figure img {
  display: block;
  margin: 0 auto;
  border-radius: 4px;
  max-width: 100%;      /* 컨테이너보다 크면 줄이고 */
  max-height: 500px;    /* 세로 너무 길면 줄이고 */
  width: auto;          /* 작은 이미지는 원본 크기 유지 */
  height: auto;
}

article figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: #777;
  font-style: italic;
  line-height: 1.5;
}

/* --- Blockquote --- */
article blockquote {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid #f05033;
  background: #fafafa;
  color: #444;
  font-style: italic;
}

/* --- Lists --- */
article ul,
article ol {
  margin: 0 0 1.4rem 1.5rem;
  padding: 0;
}
article li {
  margin-bottom: 0.5rem;
}

/* --- Horizontal Rule --- */
article hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 2.5rem 0;
}

/* --- Tables (CKEditor) --- */
article table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
}
article th {
  background: #f05033;
  color: #fff;
  padding: 0.7rem 1rem;
  text-align: left;
}
article td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #e8e8e8;
}
article tr:nth-child(even) td {
  background: #fafafa;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  article {
    font-size: 1rem;
    line-height: 1.75;
  }
  article h2 {
    font-size: 1.35rem;
  }
}  
#img-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
#img-modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}
#img-modal-wrap {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 90vw;
    max-height: 90vh;
}
#img-modal-wrap img {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: 4px;
    margin: 0 auto;
}
#img-modal-close {
    position: absolute;
    top: -2rem;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
#img-modal-caption {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

article figure img {
    cursor: zoom-in;
}
