@charset "utf-8";

@import url("margin.css");
@import url("txt.css");

/* ************************************************
 * Reset & Base
 * ************************************************ */
body,div,pre,blockquote,
form,fieldset,input,textarea,select,option,
dl,dt,dd,ol,h1,h2,h3,h4,h5,h6,
embed,object {
  margin: 0;
  padding: 0;
}

.clear { clear: both; margin: 0; padding: 0; font-size: 0; }
img { vertical-align: bottom; }

html { overflow-y: scroll; }
body {
  font: 12px/18px 'メイリオ', Meiryo, 'ＭＳ Ｐゴシック', sans-serif, 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro';
  margin: 0;
  padding: 0;
  color: #333333;
}

/* ************************************************
 * Layout wrappers
 * ************************************************ */
#wrapper {
  width: 100%;
  max-width: 950px;
  margin: 0 auto;
  padding: 0;
}
.img-right { float: right; }
.img-left  { float: left;  }

/* ************************************************
 * Header
 * ************************************************ */
#header {
  width: 100%;
  max-width: 950px;
  margin: 20px auto 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* 旧float指定の打ち消し */
#header .logo,
#header .menu,
#header .menu li { float: none !important; }

#header .logo {
  margin: 0;
  padding: 0;
  width: 175px;           /* 画像サイズに合わせる */
  flex: 0 0 auto;
  background: none;       /* 旧: 背景ロゴを無効化（<img>を使用するため） */
}

#header .menu {
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
}

#header .menu ul {
  margin: 0 !important;   /* 旧: 45px を上書き */
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

#header .menu li {
  display: inline-block;
  padding: 0;
  width: auto;
  text-align: center;
}

/* メニューのボーダー演出（既存仕様を踏襲） */
#header .menu a:link,
#header .menu a:visited {
  padding: 0 0 5px;
  margin: 0;
  text-decoration: none;
  display: block;
  border-bottom: 5px solid #FFFFFF;
}
#header .menu a:hover,
#header .menu a:active {
  display: block;
  border-bottom: 5px solid #000066;
}

/* JSTQBロゴ（右側画像）: <img class="header-right-image"> を直接スタイル */
.header-right-image {
  position: static !important;   /* 絶対配置を解除して重なりを解消 */
  flex: 0 0 auto;
  width: 200px !important;       /* PC時は200px */
  height: auto !important;
  margin: 0;
  display: block;
}


#line {
  margin: 0 auto;
  padding: 0;
  height: 5px;
  clear: both;
  background: #EFEFEF;
}

/* ************************************************
 * Contents
 * ************************************************ */
#contents {
  margin: 30px 0;
  padding: 0;
  width: 100%;
  font-size: 11px;
  line-height: 15px;
  float: none; /* 旧: float:left を排除 */
}

/* ************************************************
 * Footer
 * ************************************************ */
#footer {
  margin-top: 100px; /* ← ここで調整（例：30px） */
  padding: 0;
  clear: both;
  background: url(../img/common/footer-back.png) repeat-x;
  height: 101px;
}
#footer .footer-box {
  margin: 0 auto;
  padding: 0;
  width: 950px;
}
#footer ul {
  margin: 0;
  padding: 15px 0 0;
  list-style: none;
  float: right;
  width: 250px;
}
address {
  font-style: normal;
  margin: 0;
  padding: 0 10px 20px 0;
  text-align: right;
}

/* ************************************************
 * Links
 * ************************************************ */
a:link,
a:visited { color: #333333; text-decoration: underline; }
a:hover,
a:active  { color: #3399FF; text-decoration: none; }

/* ************************************************
 * Category pages
 * ************************************************ */
#company, #recruit, #access, #service, #contact {
  margin: 20px 0;
  padding: 0 0 0 380px;
  width: 530px;
  height: 350px;
  background-repeat: no-repeat;
  background-position: left top;
}
#company { background-image: url(../img/category/com-title.jpg); }
#recruit { background-image: url(../img/category/recruit-title.jpg); }
#access  { background-image: url(../img/category/access-title.jpg);  }
#service {
  background-image: url(../img/category/service-title.jpg);
  float: left;
  margin-bottom: 30px;
}
#contact { background-image: url(../img/category/contact-title.jpg); }
#recruit p,
#contact p { margin: 0; padding: 0; }
#contact ul { margin: 40px 0 10px; padding: 0; list-style: none; }
#contact .ten { padding-bottom: 2px; margin-bottom: 10px; border-bottom: 1px dashed #999999; font-size: 13px; }
#service p  { margin: 0 0 30px; padding: 0; }
#service dl { margin: 0; padding: 0; }
#service dt { margin: 0 50px 0 0; padding: 10px 0; width: 150px; float: left; border-right: 5px solid #CCCCCC; }
#service dd { margin: 10px 0; padding: 0; float: left; width: 300px; }

/* ************************************************
 * Top main & video area
 * ************************************************ */
#topmain {
  margin: 0 auto;
  padding: 0;
  background: url(../img/top/topback.jpg) no-repeat center center;
  clear: both;
  width: 100%;
  max-width: 950px;
  aspect-ratio: 16 / 9;
  position: relative;
}
#mainImg {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
}
.video-container {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: black;
  z-index: 1;
}
.thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  background: url('/imgplay-button.png') no-repeat center center;
  background-size: contain;
  cursor: pointer;
  z-index: 10;
}
.video-frame {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: black;
}

/* ************************************************
 * Other
 * ************************************************ */
.topnews { margin-bottom: 20px; }
.topnews ul { list-style: none; margin: 0; padding: 0; }
.topnews li { margin-bottom: 15px; float: left; text-align: center; margin-right: 10px; }

/* ************************************************
 * Responsive (menu 下段 / JSTQBロゴを中段)
 * ************************************************ */
@media (max-width: 768px) {
  #header {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
  }

  /* 並び順：1) ロゴ → 2) JSTQBロゴ → 3) メニュー */
  #header .logo {
    order: 1;
    width: 100%;
    text-align: center;
  }
  #header .logo img {
    width: 60%;
    height: auto;
  }

  .header-right-image {
    order: 2;
    width: 60% !important;
    height: auto !important;
    margin: 4px auto 0;
    display: block;
  }

  #header .menu {
    order: 3;
    width: 100%;
    text-align: center;
  }
  #header .menu ul {
    justify-content: center;
    gap: 10px;
    margin-top: 8px !important;
  }
  #header .menu li {
    padding: 5px 4px;
  }
  #header .menu li img {
    width: 80px;
    height: auto;
  }
}
