/* /assets/css/mathTeacher-custom.css  —  C) 白＋紺＋影控えめ */

/* ========== Theme ========== */
:root{
  --paper: #ffffff;
  --paper2: #fbfbfd;
  --text: #111827;
  --muted: #4b5563;

  --navy: #0b2a6f;
  --navy-2: #102a43;

  --border: rgba(17,24,39,.10);
  --border-strong: rgba(17,24,39,.16);

  /* 影は控えめ */
  --shadow: 0 6px 18px rgba(17,24,39,.08);

  --radius: 14px;
}

/* ========== Base ========== */
html, body{ color: var(--text); }

body{
  /* 背景画像は活かしつつ、本文の可読性はカードで担保 */
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  line-height: 1.8;
}

/* 2回 #wrapper が出てくるので、内側の余白を一律化 */
#wrapper{
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 14px;
}

/* ========== Header ========== */
#header{
  margin: 16px auto 10px;
}
#header .logo{
  padding: 8px 0;
}
#header .logo a{
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--navy);
}
#header .logo hr{ opacity: .35; }

#header .info{
  text-align: center;
  color: var(--muted);
  margin-top: 6px;
}

/* ========== Main banner ========== */
#mainBanner img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* ========== Section headings ========== */
/* 「総合案内」「過去に実施した分…」などのh1.heading */
.heading{
  margin: 22px 0 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,.90);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(17,24,39,.05);
}

/* ========== Notice box ========== */
.post{
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 14px;
  margin: 14px 0;
}

.post h2{
  margin: 4px 0 10px;
  color: var(--navy);
}

/* ========== Grid layout (cards) ========== */
.gridWrapper{
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  margin: 10px 0 18px;
}

/* 元テンプレの .grid をカード化 */
.grid{
  grid-column: span 6;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* 見出し：紺ベタ、余計な装飾はしない */
.grid > .heading{
  margin: 0;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.18);
  border-radius: 0;
  background: var(--navy);
  color: #fff;
  padding: 12px 12px;
}

/* h3.heading 内の右寄せ日付 */
.grid > .heading p{
  margin: 6px 0 0;
  font-weight: 500;
  opacity: .9;
}

/* 内側のコンテンツ */
.wide-box{
  background: transparent !important; /* inline指定があっても統一 */
  margin: 0 !important;
  padding: 12px 12px 14px;
}

/* 旧来の inline 背景（lightyellow / wheat / honeydew等）を “上品に減色” */
.grid [style*="background-color:lightyellow"],
.grid [style*="background-color:wheat"],
.grid [style*="background-color:honeydew"],
.grid [style*="background-color:ivory"],
.grid [style*="background-color:floralwhite"],
.grid [style*="background-color:aliceblue"]{
  background-color: transparent !important;
}

.grid [style*="background-color:navy"]{
  background-color: var(--navy) !important;
  color: #fff !important;
  border-radius: 10px;
  padding: 8px 10px;
  margin: 10px 0 8px;
}

/* “章見出しっぽい”p（#b2cbe4）を落ち着いた薄グレーに */
.grid [style*="background-color:#b2cbe4"]{
  background: var(--paper2) !important;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 10px 0 8px;
  color: var(--navy-2);
  font-weight: 700;
}

/* リストの詰まり具合を改善 */
.grid ul{
  margin: 8px 0 8px 1.1em;
}
.grid li{
  margin: 6px 0;
}

/* ========== Links ========== */
a{
  color: var(--navy);
}
a:hover{
  opacity: .9;
}

/* ========== Buttons ========== */
button,
input[type="button"]{
  appearance: none;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--navy);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 16px;
  cursor: pointer;
  transition: transform .05s ease, box-shadow .15s ease, background-color .15s ease;
  box-shadow: 0 2px 10px rgba(17,24,39,.06);
}

button:hover,
input[type="button"]:hover{
  box-shadow: 0 6px 18px rgba(17,24,39,.10);
}

button:active,
input[type="button"]:active{
  transform: translateY(1px);
}

/* inlineで “青ベタ＋でか文字” のボタンは、白×紺に統一 */
button[style*="background-color:royalblue"],
button[style*="background-color:aliceblue"],
button[style*="color:honeydew"]{
  background: #fff !important;
  color: var(--navy) !important;
  border: 1px solid var(--border-strong) !important;
}

/* でかいボタン（font-size:30px）のスマホ調整 */
@media (max-width: 520px){
  button[style*="font-size:30px"]{
    font-size: 18px !important;
    padding: 12px !important;
  }
}

/* ========== Images / embeds ========== */
.grid img{
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* YouTubeサムネを整える */
.grid a[href*="youtu.be"] img,
.grid a[href*="youtube.com"] img{
  width: 100%;
}

/* iframe（BASE widgetなど） */
iframe{
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* ========== Tables ========== */
table{
  border-collapse: collapse;
  width: 100%;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
th, td{
  border-color: rgba(17,24,39,.14) !important;
}
th{
  background: var(--paper2);
  color: var(--navy-2);
  font-weight: 800;
}

/* ========== Footer ========== */
footer{
  margin: 22px 0 10px;
  padding: 14px 12px;
  background: rgba(255,255,255,.90);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(17,24,39,.05);
  color: var(--muted);
}
#copyright{
  color: var(--muted);
}

/* ========== Responsive ========== */
@media (max-width: 900px){
  .grid{ grid-column: span 12; }
  #wrapper{ padding: 14px 10px; }
}

/* ===== 背景を落ち着かせるオーバーレイ ===== */
body{
  position: relative;
}

body::before{
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.55); /* ← 白ベールの濃さ */
  pointer-events: none;
  z-index: -1;
}

/* ===== Header readability fix ===== */
#header{
  position: relative;
  z-index: 10; /* 白ベールより前に */
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}

#header::before{
  content: "";
  position: absolute;
  inset: 0;
  background: #0b2f5b; /* 紺を少し明るく */
  z-index: -1;
}

/* ロゴ文字 */
#header .logo a{
  color: #ffffff;
}

/* Produced by METIS */
#header .info,
#header p{
  color: rgba(255,255,255,0.85);
}