/*
Theme Name: iiidmagic Child
Theme URI: https://example.com/
Description: MDT（Magic Display Technology）子テーマ。
Author: MDT
Version: 1.7.0 (Final Integrated Edition)
Template: hello-elementor
*/

/* ▼ すべての美フォントを一括で読み込む魔法のコード ▼ */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600&family=EB+Garamond:ital,wght@0,400;0,600;1,400&family=Marcellus&family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Sawarabi+Gothic&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap');

/* ============================================================
   00. Global Variables (リボンの縦サイズを50pxに最適化)
============================================================ */
:root {
  --mdt-header-h-pc: 50px;
  --mdt-header-h-tab: 48px;
  --mdt-header-h-mob: 46px;
}

/* ============================================================
   01. Header structure (3カラム・グリッド構造を厳守)
============================================================ */
.mdt-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: var(--mdt-header-h-pc) !important;
  z-index: 99999 !important;
  background: rgba(255, 255, 255, 0.94) !important;
  -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
  backdrop-filter: blur(14px) saturate(160%) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-sizing: border-box !important;
}

.admin-bar .mdt-header { top: 32px !important; }
@media (max-width: 782px) { .admin-bar .mdt-header { top: 46px !important; } }

.mdt-header > .e-con-inner,
.mdt-header.elementor-element > .e-con-inner {
  width: 100% !important;
  max-width: 1280px !important;
  height: var(--mdt-header-h-pc) !important;
  margin: 0 auto !important;
  padding: 0 18px !important;
  display: grid !important;
  grid-template-columns: 128px minmax(0, 1fr) auto !important;
  align-items: center !important;
  column-gap: 28px !important;
  box-sizing: border-box !important;
}

/* ロゴのサイズ固定 */
.mdt-header .elementor-widget-theme-site-logo,
.mdt-header .elementor-widget-site-logo,
.mdt-header .custom-logo-link {
  width: 128px !important;
  min-width: 128px !important;
  max-width: 128px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
}

.mdt-header .elementor-widget-theme-site-logo img,
.mdt-header .elementor-widget-site-logo img,
.mdt-header .custom-logo {
  display: block !important;
  width: auto !important;
  max-width: 128px !important;
  height: 24px !important;
  max-height: 24px !important;
  object-fit: contain !important;
  object-position: left center !important;
}

.mdt-header .site-title,
.mdt-header .site-description,
.mdt-header .site-branding__text,
.mdt-header .custom-logo-link + .site-title { display: none !important; }
.mdt-header .mdt-header__nav { min-width: 0 !important; }

/* CTAボタン位置の調整 */
.mdt-header .mdt-header__cta { 
  justify-self: end !important; 
  margin-right: 48px !important; 
}

/* ============================================================
   01-B. Header Nav Typography
============================================================ */
.mdt-header .mdt-header__nav .elementor-item,
.mdt-header .mdt-header__nav .e-n-menu-title,
.mdt-header .mdt-header__nav .e-link,
.mdt-header .mdt-header__nav .e-n-menu-title-text {
  font-family: "Zen Kaku Gothic New", "Helvetica Neue", "Helvetica", sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important; 
  color: #111111 !important; 
  -webkit-text-fill-color: #111111 !important;
  opacity: 1 !important;
  transition: all 0.3s ease !important;
}

.mdt-header .mdt-header__nav .elementor-item:hover,
.mdt-header .mdt-header__nav .current-menu-item > a {
  color: #A5A5A5 !important;
  -webkit-text-fill-color: #A5A5A5 !important;
}
.mdt-header .mdt-header__nav .elementor-item::after { display: none !important; }

/* ============================================================
   01-C. Header CTA (CONTACTボタンの透過デザイン)
============================================================ */
.mdt-header .mdt-header__cta .elementor-button,
.mdt-header .mdt-header__cta .elementor-widget-button .elementor-button,
.mdt-header .mdt-header__cta a {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
}

.mdt-header .mdt-header__cta .elementor-button-text { display: none !important; }

.mdt-header .mdt-header__cta .elementor-button-content-wrapper::after {
  content: "✉ CONTACT" !important;
  display: block !important;
  color: #111111 !important;
  -webkit-text-fill-color: #111111 !important;
  font-family: "Zen Kaku Gothic New", sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0.12em !important;
  transition: color 0.3s ease !important;
}

.mdt-header .mdt-header__cta .elementor-button:hover .elementor-button-content-wrapper::after {
  color: #A5A5A5 !important;
  -webkit-text-fill-color: #A5A5A5 !important;
}

/* ============================================================
   02. News Archive (ニュース一覧の3行省略設定)
============================================================ */
.news-page .elementor-post__excerpt,
.news-page .elementor-post__excerpt p,
.news-page .elementor-widget-theme-post-excerpt {
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin-bottom: 0 !important;
}

/* ============================================================
   03. Single Post (投稿本文の余白と色の強制上書き)
============================================================ */
body.single-post { background-color: #ffffff !important; }

body.single-post .site-main {
  padding-top: calc(var(--mdt-header-h-pc) + 60px) !important;
  background-color: #ffffff !important;
}

body.single-post .entry-title,
body.single-post .site-main .elementor-widget-theme-post-content *,
body.single-post .entry-content * {
  font-family: "Zen Kaku Gothic New", "Helvetica Neue", sans-serif !important;
  color: #333333 !important; 
  line-height: 2.0 !important;
}

body.single-post .entry-title {
  color: #111111 !important;
  font-weight: 700 !important;
  max-width: 760px !important;
  margin-inline: auto !important;
  padding-bottom: 20px !important;
  padding-inline: 24px !important;
}

body.single-post .site-main .elementor-widget-theme-post-content,
body.single-post .entry-content {
  max-width: 760px !important;
  margin-inline: auto !important;
  margin-bottom: 120px !important;
  padding-inline: 24px !important;
}

/* ============================================================
   04. Footer & Responsive (デザイン維持)
============================================================ */
.site-footer {
  background-color: #000 !important;
  color: #fff !important;
  padding: 80px 0 40px !important;
  font-family: "Inter", "Noto Sans JP", sans-serif !important;
  border-top: 1px solid #1a1a1a !important;
}
.site-footer__inner { max-width: 1280px !important; margin: 0 auto !important; padding: 0 20px !important; }
.site-footer__grid { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important; gap: 40px !important; margin-bottom: 80px !important; }
.site-footer__title { color: #fff !important; font-size: 9px !important; font-weight: 700 !important; letter-spacing: 0.18em !important; margin: 0 0 20px !important; }
.site-footer__list { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.site-footer__list li { margin-bottom: 12px !important; }
.site-footer__list a { color: #888 !important; font-size: 10px !important; letter-spacing: 0.05em !important; text-decoration: none !important; }
.site-footer__list a:hover { color: #fff !important; }
.site-footer__bottom { border-top: 1px solid #222 !important; padding-top: 30px !important; display: flex !important; justify-content: space-between !important; align-items: flex-end !important; flex-wrap: wrap !important; gap: 20px !important; }
.site-footer__meta p { color: #555 !important; font-size: 9px !important; margin: 0 0 6px 0 !important; line-height: 1.5 !important; letter-spacing: 0.08em !important; }
.site-footer__social { display: flex !important; gap: 20px !important; }
.site-footer__social-link { color: #888 !important; font-size: 10px !important; text-decoration: none !important; }

@media (max-width: 1024px) {
  .mdt-header, .mdt-header > .e-con-inner { height: var(--mdt-header-h-tab) !important; }
  .mdt-header > .e-con-inner { grid-template-columns: 108px minmax(0, 1fr) auto !important; column-gap: 18px !important; }
}
@media (max-width: 767px) {
  .mdt-header, .mdt-header > .e-con-inner { height: var(--mdt-header-h-mob) !important; }
  .mdt-header > .e-con-inner { grid-template-columns: 92px 1fr auto !important; column-gap: 12px !important; padding: 0 12px !important; }
}