@charset "UTF-8";

/* [MEGA X] 태국 법률정보 (th_legal) — 2026-07-15
   megaxlaw.co.kr legal_news 형식 이식 */

.mglx{--navy:#0F2350;--navy2:#1b3566;--gold:#C8A24B;--gold2:#e6d09a;
  --ink:#16233b;--muted:#6d7c94;--line:#e3e8ef;--bg:#f6f8fb;
  max-width:1280px;margin:0 auto;padding:56px 20px 90px;color:var(--ink);word-break:keep-all;}

/* 서브 비주얼 */
.mglx-top .sub_V{height:380px !important;margin-bottom:0 !important;}
.mglx-top .sub_V .bg-pos{filter:brightness(.5);}
.mglx-top .sub_V::after{content:"";position:absolute;inset:0;z-index:0;
  background:linear-gradient(180deg,rgba(8,18,40,.55),rgba(8,18,40,.75));}
.mglx-top .sub-Tit{left:0 !important;right:0;bottom:auto !important;top:50%;transform:translateY(-50%);
  text-align:center;padding:0 20px;color:#fff;}
.mglx-top .sub-Tit .eyebrow{margin:0 0 14px;font-size:15px;font-weight:700;letter-spacing:.42em;
  text-indent:.42em;color:var(--gold2);}
.mglx-top .sub-Tit h1{font-size:54px !important;font-weight:900 !important;margin-bottom:16px !important;
  letter-spacing:-.02em;text-shadow:0 4px 24px rgba(0,0,0,.45);}
.mglx-top .sub-Tit .sub-desc{margin:0;font-size:17px;line-height:1.7;color:rgba(255,255,255,.86);}
.mglx-top-sm .sub_V{height:280px !important;}

/* 분류 칩 */
.mglx-cate{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;}
.mglx-cate a{display:flex;align-items:center;justify-content:center;height:52px;padding:0 10px;
  border:1px solid var(--line);border-radius:10px;background:var(--bg);
  color:#4a5a72;font-size:15px;font-weight:600;text-decoration:none;text-align:center;
  transition:all .18s ease;}
.mglx-cate a:hover{border-color:var(--navy);color:var(--navy);background:#fff;}
.mglx-cate a.on{background:var(--navy);border-color:var(--navy);color:#fff;font-weight:700;}

/* 검색 */
.mglx-search{position:relative;width:100%;max-width:470px;margin:40px auto 52px;}
.mglx-search input[type=text]{width:100%;height:56px;padding:0 60px 0 24px;
  border:1px solid var(--line);border-radius:999px;background:#fff;
  font-size:15px;color:var(--ink);outline:none;box-sizing:border-box;}
.mglx-search input[type=text]:focus{border-color:var(--navy);}
.mglx-search button{position:absolute;top:50%;right:6px;transform:translateY(-50%);
  width:44px;height:44px;border:0;border-radius:50%;background:var(--navy);cursor:pointer;}
.mglx-search button span{display:block;width:16px;height:16px;margin:0 auto;
  border:2px solid #fff;border-radius:50%;position:relative;}
.mglx-search button span::after{content:"";position:absolute;right:-5px;bottom:-4px;
  width:7px;height:2px;background:#fff;transform:rotate(45deg);}

/* 카드 그리드 */
.mglx-cards{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:30px;}
.mglx-card{position:relative;}
.mglx-card > a{display:block;height:100%;border:1px solid var(--line);border-radius:16px;overflow:hidden;
  background:#fff;text-decoration:none;color:inherit;
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;}
.mglx-card > a:hover{transform:translateY(-4px);border-color:#cdd6e2;box-shadow:0 18px 40px rgba(15,35,80,.12);}
.mglx-thumb{display:block;position:relative;padding-top:56%;background:#eef1f6;overflow:hidden;}
.mglx-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;
  transition:transform .35s ease;}
.mglx-card > a:hover .mglx-thumb img{transform:scale(1.05);}
.mglx-thumb[data-empty]::after{content:"MEGA X";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  font-size:15px;font-weight:900;letter-spacing:.2em;color:#c3ccda;}
.mglx-body{display:block;padding:22px 22px 24px;}
.mglx-badge{display:inline-block;margin-bottom:12px;padding:5px 12px;border-radius:999px;
  background:rgba(15,35,80,.07);color:var(--navy);font-style:normal;font-size:12.5px;font-weight:700;}
.mglx-tit{display:block;font-size:18px;font-weight:800;line-height:1.45;color:var(--navy);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.mglx-ex{display:block;margin-top:10px;font-size:14.5px;line-height:1.65;color:var(--muted);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.mglx-date{display:block;margin-top:16px;font-size:13px;color:#9aa7ba;}

.mglx-card .mglx-act{position:absolute;top:12px;right:12px;opacity:0;transition:opacity .18s;}
.mglx-card:hover .mglx-act{opacity:1;}
.mglx-card .mglx-act a{display:inline-flex;align-items:center;height:26px;padding:0 10px;border-radius:6px;
  background:rgba(15,35,80,.85);color:#fff;font-size:12px;font-weight:700;text-decoration:none;}

.mglx-empty{margin:80px 0;text-align:center;color:var(--muted);font-size:15.5px;}

/* 페이징 (그누보드 기본 마크업에 스타일만) */
.mglx-pg{margin-top:56px;display:flex;justify-content:center;text-align:center;}
.mglx-pg .pg_wrap{display:flex !important;justify-content:center;width:100%;margin:0 !important;padding:0 !important;}
.mglx-pg .pg{display:inline-flex !important;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px;
  margin:0 !important;padding:0 !important;float:none !important;}
.mglx-pg .pg_page,.mglx-pg .pg_current{display:inline-flex;align-items:center;justify-content:center;
  min-width:40px;height:40px;padding:0 10px;border:1px solid var(--line);border-radius:8px;
  font-size:14px;font-weight:700;text-decoration:none;color:#5a6b85;background:#fff;}
.mglx-pg .pg_page:hover{border-color:var(--navy);color:var(--navy);}
.mglx-pg .pg_current{background:var(--navy);border-color:var(--navy);color:#fff;}

/* 버튼 */
.mglx-btn{display:inline-flex;align-items:center;justify-content:center;height:48px;padding:0 30px;
  border-radius:10px;background:var(--navy);color:#fff;font-size:15px;font-weight:700;text-decoration:none;}
.mglx-btn:hover{background:var(--navy2);}
.mglx-btn.ghost{background:#fff;border:1px solid var(--line);color:#4a5a72;}
.mglx-btn.ghost:hover{border-color:var(--navy);color:var(--navy);}
.mglx-admin{margin-top:40px;text-align:right;}

/* 상세 */
.mglx-view{max-width:940px;}
.mglx-article{border-bottom:1px solid var(--line);padding-bottom:50px;}
.mglx-head{padding-bottom:26px;border-bottom:1px solid var(--line);margin-bottom:36px;}
.mglx-head h2{margin:14px 0 16px;font-size:32px;font-weight:900;line-height:1.4;color:var(--navy);}
.mglx-meta{margin:0;display:flex;gap:18px;font-size:13.5px;color:#9aa7ba;}
.mglx-content{font-size:16.5px;line-height:1.85;color:#2c3a52;}
.mglx-content img{max-width:100%;height:auto;border-radius:12px;margin:16px 0;}
.mglx-content p{margin:0 0 18px;}
.mglx-view-admin{margin-top:40px;display:flex;gap:8px;justify-content:flex-end;}

.mglx-nav{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:40px;}
.mglx-nav a{display:block;padding:20px 22px;border:1px solid var(--line);border-radius:12px;
  text-decoration:none;color:inherit;background:#fff;transition:border-color .18s;}
.mglx-nav a:hover{border-color:var(--navy);}
.mglx-nav a.next{text-align:right;}
.mglx-nav span{display:block;font-size:12.5px;font-weight:700;color:var(--gold);margin-bottom:8px;}
.mglx-nav strong{display:block;font-size:15px;font-weight:700;color:var(--navy);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.mglx-view-btns{margin-top:44px;text-align:center;}

@media (max-width:1024px){
  .mglx-cards{grid-template-columns:repeat(2,1fr);gap:22px;}
  .mglx-cate{grid-template-columns:repeat(3,1fr);}
}
@media (max-width:768px){
  .mglx{padding:36px 16px 60px;}
  .mglx-top .sub_V{height:250px !important;}
  .mglx-top .sub-Tit h1{font-size:28px !important;}
  .mglx-top .sub-Tit .eyebrow{font-size:11.5px;letter-spacing:.3em;}
  .mglx-top .sub-Tit .sub-desc{font-size:13.5px;}
  .mglx-cate{grid-template-columns:repeat(2,1fr);gap:8px;}
  .mglx-cate a{height:44px;font-size:14px;}
  .mglx-search{margin:28px auto 34px;}
  .mglx-search input[type=text]{height:50px;}
  .mglx-search button{right:6px;width:38px;height:38px;}
  .mglx-cards{grid-template-columns:1fr;gap:18px;}
  .mglx-head h2{font-size:23px;}
  .mglx-content{font-size:15.5px;}
  .mglx-nav{grid-template-columns:1fr;}
  .mglx-nav a.next{text-align:left;}
  .mglx-card .mglx-act{opacity:1;}
}

/* 글쓰기 */
.mglx-write{max-width:940px;}
.mglx-write-tit{margin:0 0 34px;font-size:28px;font-weight:900;color:var(--navy);}
.mglx-f{display:grid;grid-template-columns:120px 1fr;gap:16px;align-items:start;margin:0 0 24px;}
.mglx-f > label{padding-top:14px;font-size:15px;font-weight:800;color:var(--navy);}
.mglx-f .req{color:#d9534f;}
.mglx-f input[type=text],.mglx-f select{width:100%;height:50px;padding:0 16px;border:1px solid var(--line);
  border-radius:10px;background:#fff;font-size:15px;color:var(--ink);outline:none;box-sizing:border-box;}
.mglx-f input[type=text]:focus,.mglx-f select:focus{border-color:var(--navy);}
.mglx-f .help{margin:8px 0 0;font-size:13px;color:var(--muted);}
.mglx-f-editor > label{padding-top:0;}
.mglx-editor{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#fff;}
.mglx-editor textarea{width:100%;min-height:340px;padding:16px;border:0;outline:none;
  font-size:15px;line-height:1.7;color:var(--ink);box-sizing:border-box;resize:vertical;}
.mglx-file input[type=file]{font-size:14px;}
.mglx-file-cur{margin:10px 0 0;font-size:13.5px;color:var(--muted);}
.mglx-chk{display:inline-flex;align-items:center;gap:6px;padding-top:14px;font-size:14.5px;color:#4a5a72;}
.mglx-write-btns{display:flex;justify-content:flex-end;gap:10px;margin-top:40px;}
.mglx-write-btns button.mglx-btn{border:0;cursor:pointer;font-family:inherit;}
@media (max-width:768px){
  .mglx-f{grid-template-columns:1fr;gap:8px;}
  .mglx-f > label{padding-top:0;}
  .mglx-write-tit{font-size:22px;}
}

/* 자동 생성 썸네일 (첨부 이미지가 없을 때) */
.mglx-thumb.mglx-gen{display:block;background:#0b1a36 url(./img/thumb-bg.jpg) center/cover no-repeat;}
.mglx-thumb.mglx-gen::after{display:none;}
.mglx-gen-logo{position:absolute;top:22px;left:50%;transform:translateX(-50%);
  display:inline-block;height:24px;line-height:24px;padding-left:32px;
  background:url(./img/megax-ci.png) left center/auto 20px no-repeat;
  color:#fff;font-size:11.5px;font-weight:700;letter-spacing:-.02em;white-space:nowrap;opacity:.92;}
.mglx-gen-logo::after{content:"메가엑스 법률사무소";}
.mglx-gen-label{position:absolute;top:34%;left:0;right:0;text-align:center;
  color:var(--gold2);font-size:14px;font-weight:600;letter-spacing:.12em;}
.mglx-gen-tit{position:absolute;top:46%;left:0;right:0;padding:0 30px;text-align:center;
  color:#fff;font-size:42px;font-weight:900;line-height:1.22;letter-spacing:-.03em;
  text-shadow:0 4px 20px rgba(0,0,0,.45);word-break:keep-all;}
.mglx-gen.is-mid .mglx-gen-tit{font-size:34px;top:44%;}
.mglx-gen.is-long .mglx-gen-tit{font-size:26px;top:43%;line-height:1.35;}
.mglx-card > a:hover .mglx-gen{filter:brightness(1.1);}
.mglx-thumb.mglx-gen{transition:filter .25s ease;}
@media (max-width:768px){
  .mglx-gen-tit{font-size:34px;}
  .mglx-gen.is-mid .mglx-gen-tit{font-size:29px;}
  .mglx-gen.is-long .mglx-gen-tit{font-size:23px;}
}

/* ── 상세 : 제목바 / 히어로 / 목차 / 본문 서식 ── */
.mglx-titbar{display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap;
  margin:0 0 34px;padding:26px 30px;border-radius:12px;background:var(--bg);text-align:center;}
.mglx-titbar em{flex:0 0 auto;font-style:normal;font-size:15px;font-weight:800;color:var(--gold);}
.mglx-titbar h1{margin:0;font-size:26px;font-weight:900;line-height:1.4;color:var(--navy);}

.mglx-hero{position:relative;border-radius:14px;overflow:hidden;margin-bottom:46px;}
.mglx-hero img{display:block;width:100%;height:auto;}
.mglx-hero-gen{position:relative;padding-top:56%;background:#0b1a36 url(./img/thumb-bg.jpg) center/cover no-repeat;}
.mglx-hero-gen .mglx-gen-logo{top:34px;height:28px;line-height:28px;padding-left:38px;
  background-size:auto 24px;font-size:13.5px;}
.mglx-hero-gen .mglx-gen-label{top:33%;font-size:17px;letter-spacing:.16em;}
.mglx-hero-gen .mglx-gen-tit{top:44%;font-size:64px;}
.mglx-hero-gen.is-mid .mglx-gen-tit{font-size:52px;}
.mglx-hero-gen.is-long .mglx-gen-tit{font-size:38px;top:42%;}

.mglx-view .mglx-meta{justify-content:center;margin:0 0 40px;}

/* 목차 */
.mglx-toc{border:1px solid var(--line);border-radius:14px;padding:28px 30px 24px;background:#fbfcfe;margin-bottom:46px;}
.mglx-toc h3{margin:0 0 6px;padding-bottom:14px;border-bottom:2px solid var(--navy);
  font-size:19px;font-weight:900;color:var(--navy);}
.mglx-toc ol{list-style:none;margin:0;padding:0;}
.mglx-toc li{margin-top:10px;}
.mglx-toc a{display:flex;align-items:center;gap:14px;padding:14px 18px;border:1px solid var(--line);
  border-radius:8px;background:#fff;text-decoration:none;transition:all .18s ease;}
.mglx-toc a:hover{border-color:var(--navy);background:#f4f7fb;transform:translateX(3px);}
.mglx-toc a em{flex:0 0 auto;font-style:normal;font-size:14px;font-weight:900;color:#a9b6c9;}
.mglx-toc a:hover em{color:var(--gold);}
.mglx-toc a span{font-size:15.5px;font-weight:600;color:var(--ink);}

/* 본문 서식 (에디터로 넣은 소제목·인용) */
.mglx-content h1,.mglx-content h2,.mglx-content h3,.mglx-content h4{
  margin:52px 0 20px;font-weight:900;color:var(--navy);line-height:1.45;scroll-margin-top:110px;}
.mglx-content h2{font-size:24px;}
.mglx-content h3{font-size:21px;}
.mglx-content h4{font-size:18px;}
.mglx-content blockquote{margin:26px 0;padding:24px 26px;border:1px solid var(--line);border-radius:10px;
  background:#fafbfd;color:#2c3a52;font-size:15.5px;line-height:1.8;}
.mglx-content table{width:100%;border-collapse:collapse;margin:26px 0;font-size:15px;}
.mglx-content th,.mglx-content td{border:1px solid var(--line);padding:12px 14px;text-align:left;}
.mglx-content th{background:var(--bg);font-weight:800;color:var(--navy);}
.mglx-content ul,.mglx-content ol{margin:0 0 18px;padding-left:22px;}
.mglx-content li{margin-bottom:8px;}
.mglx-content strong{color:var(--navy);}

/* 목차와 연결된 본문 소제목 — 에디터에서 서식을 주지 않아도 자동 강조 */
.mglx-content .mglx-h{
  margin:36px 0 14px;font-size:21px;font-weight:900;color:var(--navy);
  line-height:1.45;scroll-margin-top:110px;}
.mglx-content .mglx-h:first-child{margin-top:0;}

@media (max-width:768px){
  .mglx-titbar{padding:20px 18px;margin-bottom:24px;}
  .mglx-titbar h1{font-size:20px;}
  .mglx-hero-gen .mglx-gen-tit{font-size:36px;}
  .mglx-hero-gen.is-mid .mglx-gen-tit{font-size:30px;}
  .mglx-hero-gen.is-long .mglx-gen-tit{font-size:24px;}
  .mglx-hero-gen .mglx-gen-label{font-size:13px;}
  .mglx-toc{padding:20px 18px 18px;margin-bottom:34px;}
  .mglx-toc a{padding:12px 14px;}
  .mglx-toc a span{font-size:14px;}
  .mglx-content h2{font-size:20px;}
  .mglx-content h3{font-size:18px;}
  .mglx-content .mglx-h{font-size:18px;margin:28px 0 12px;}
}

/* 글쓰기 : 목차 입력 */
.mglx-f textarea{width:100%;padding:14px 16px;border:1px solid var(--line);border-radius:10px;
  background:#fff;font-size:15px;line-height:1.7;color:var(--ink);outline:none;box-sizing:border-box;
  resize:vertical;font-family:inherit;}
.mglx-f textarea:focus{border-color:var(--navy);}
