@charset "utf-8";

/* =========================================
  Egawo (local) CSS - 整理版（最終統合）
  PC first / 重複削除 / SP最適化は末尾に集約
========================================= */

:root{
  --container: 1100px;

  --green: #0a8b3a;
  --yellow: #f7ef3a;

  --text: #111;
  --muted: rgba(0,0,0,.65);

  --bg: #f4f6f7;
  --border: #dcdcdc;

  --shadow1: 0 10px 18px rgba(0,0,0,.10);
}

/* ================= RESET / BASE ================= */
*{ box-sizing: border-box; }

body{
  margin: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-family:
    "Noto Sans JP",
    system-ui, -apple-system,
    "Hiragino Kaku Gothic ProN", "Hiragino Sans",
    "Yu Gothic", "Meiryo",
    Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.eg-main{ font-family: inherit; }

img{ max-width: 100%; height: auto; display: block; }
a{ text-decoration: none; color: inherit; }

.eg-container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 18px;
}

/* iOSの横ズレ対策：長い英数字など */
.eg-main, .eg-container, .eg-text, .eg-band__text{
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* =========================================
  HERO
========================================= */
.eg-hero{
  background: url("./img/hero-bg.jpg") center / cover no-repeat;
  padding: 40px 0 28px;
  text-align: center;
}

.eg-hero__titleImg{
  width: 1400px;
  max-width: 95vw;
  margin: 0 auto;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.16));
}

/* =========================================
  GREEN BAND
========================================= */
.eg-band{
  background: var(--green);
  padding: 18px 0 20px;
}

.eg-band__inner{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.eg-band__center{ width: min(820px, 96%); }

/* PC/SPで同じ見え方に寄せる（控えめ・左揃え） */
.eg-band__text{
  margin: 0;
  color: #fff;
  font-weight: 600;
  font-size: 11px;
  line-height: 1.6;
  text-align: left;
  max-width: 760px;
  opacity: .9;
}

/* =========================================
  CTA BAND
========================================= */
.eg-ctaBand{
  background: var(--yellow);
  padding: 16px 0 22px;
}

.eg-ctaBand__title{
  width: min(620px, 92vw);
  margin: 0 auto 12px;
}

/* PC first：PCは2カラム（900px以上） */
.eg-ctaGrid{
  display: grid;
  gap: 14px;
}

.eg-ctaItem{
  display: block;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: var(--shadow1);
  transition: transform .12s ease, filter .12s ease;
}

.eg-ctaItem:hover{
  transform: translateY(-2px);
  filter: brightness(.98);
}

@media (min-width: 900px){
  .eg-ctaGrid{ grid-template-columns: 1fr 1fr; }

  .eg-ctaItem{ width: 86%; }
  .eg-ctaGrid > .eg-ctaItem:nth-child(odd){ justify-self: end; }
  .eg-ctaGrid > .eg-ctaItem:nth-child(even){ justify-self: start; }
}

/* =========================================
  SECTION / HEADINGS
========================================= */
.eg-section{ padding: 32px 0; }

.eg-h2{
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 900;
  padding-left: 16px;
  border-left: 6px solid var(--green);
  letter-spacing: .04em;
}
.eg-h2__bar{ display: none; }

.eg-h3{
  margin: 22px 0 10px;
  font-size: 16px;
  font-weight: 900;
}

.eg-text{
  margin: 0;
  font-size: 14px;
  color: rgba(0,0,0,.78);
}

/* =========================================
  CAMPAIGN
========================================= */
.eg-campaign{
  background: var(--bg);
  padding: 40px 0;
}

.eg-campaignGrid{
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  justify-content: center;
}

@media (min-width: 900px){
  .eg-campaignGrid{
    grid-template-columns: repeat(3, 340px);
    justify-content: center;
  }
}

.eg-campaignItem{ display: block; }

.eg-campaignThumb{
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  transition: filter .12s ease;
}

.eg-campaignItem:hover .eg-campaignThumb{
  filter: brightness(.98);
}

.eg-campaignCaption{
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

/* =========================================
  TABLE
========================================= */
.eg-tableWrap{
  overflow: visible;
  border: 1px solid #000;
  background: #fff;
  border-radius: 0;
}

.eg-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

.eg-table th{
  background: #c0e457;
  font-weight: 900;
  padding: 10px 8px;
  border: 1px solid #000;
  text-align: center;
  height: 48px;
}

.eg-table td{
  padding: 8px;
  border: 1px solid #000;
  text-align: center;
}

/* PC列幅 */
.eg-table th:nth-child(1),
.eg-table td:nth-child(1){ width: 30%; }
.eg-table th:nth-child(2),
.eg-table td:nth-child(2){ width: 20%; }
.eg-table th:nth-child(3),
.eg-table td:nth-child(3){ width: 30%; }
.eg-table th:nth-child(4),
.eg-table td:nth-child(4){ width: 20%; }

.eg-table td:nth-child(4){
  font-weight: 900;
  font-size: 15px;
  color: var(--green);
}

.eg-tableWrap + .eg-h3{ margin-top: 24px; }
.eg-h3 + .eg-tableWrap{ margin-top: 10px; }

/* =========================================
  EXAMPLE IMAGE
========================================= */
.eg-exampleImgWrap{ margin: 24px 0; }

/* =========================================
  FORMULA
========================================= */
.eg-formula{
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.eg-box{
  min-width: 160px;
  padding: 18px;
  border: 2px solid #e2e6e8;
  border-radius: 10px;
  background: #fff;
  text-align: center;
  line-height: 1.5;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eg-box p{
  margin: 0;
  font-size: 13px;
  font-weight: 900;
}

.eg-box.-minus p{
  font-size: 15px;
  letter-spacing: .04em;
}

.eg-box__price{
  margin-top: 6px;
  font-size: 20px;
  font-weight: 900;
  color: var(--green);
  line-height: 1.2;
}

.eg-box__price small{
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: rgba(0,0,0,.65);
  margin-top: 2px;
}

/* 記号（＋ − ＝）枠なし（PC含め全体統一） */
.eg-op{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: auto;
  height: auto;

  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;

  font-weight: 900;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
  opacity: .85;
}

.eg-box.-minus{
  background: #fff7f7;
  border-color: #ff8f8f;
  border-width: 3px;
}
.eg-box.-minus .eg-box__price{
  color: #d33;
  font-size: 22px;
}

.eg-box.-result{
  background: #f4fbff;
  border: 3px solid var(--green);
}
.eg-box.-result .eg-box__price{
  font-size: 22px;
}

/* =========================================
  NOTE
========================================= */
.eg-note{
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}

/* =========================================
  PLUS ONE
========================================= */
.eg-plusOne .eg-notes{
  margin-top: 10px;
  list-style: none;
  padding-left: 0;
  font-size: 12px;
  color: rgba(0,0,0,.65);
  line-height: 1.9;
}
.eg-plusOne .eg-notes li{ margin-bottom: 4px; }
.eg-plusOne .eg-notes li::before{ content: "※ "; }

.eg-plusOneBanner{
  display: flex;
  max-width: 720px;
  margin: 16px auto 0;
  border: 2px solid #000;
}

.eg-plusOneBanner__left,
.eg-plusOneBanner__right{ flex: 1; }

.eg-plusOneBanner__left{
  background: #c0e457;
  padding: 18px 20px;
  text-align: center;
}

.eg-plusOneBanner__title{
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.eg-plusOneBanner__name{
  margin: 6px 0 0;
  font-size: 26px;
  font-weight: 900;
}

.eg-plusOneBanner__name span{ color: #e60000; }

.eg-plusOneBanner__right{
  background: #fff;
  text-align: center;

  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: 12px;
}

.eg-plusOneBanner__price{
  margin: 0;
  font-size: 44px;
  font-weight: 900;
  color: #e60000;
  line-height: 1;
}

.eg-plusOneBanner__price span{
  font-size: 22px;
  color: #000;
}

.eg-plusOneBanner__note{
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 700;
}

/* 注意事項見出しの上に余白（シンプル） */
.eg-plusOne .eg-h2 + .eg-h2{ margin-top: 32px; }

/* =========================================
  MOBILE
========================================= */
@media (max-width: 768px){
  .eg-section{ padding: 26px 0; }
  .eg-h2{ font-size: 18px; }

  /* CTA：スマホは1カラム / 小さめ / 影なし */
  .eg-ctaGrid{
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .eg-ctaItem{
    width: 88%;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: none;
  }
  .eg-ctaItem:hover{
    transform: none;
    filter: none;
  }
  .eg-ctaBand{
    padding: 10px 0 14px;
  }
  .eg-ctaBand__title{
    margin-bottom: 6px;
  }

  /* Campaign：スマホ2カラム */
  .eg-campaignGrid{
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  /* Table：横スクロールなしで収める */
  .eg-table{
    min-width: 0;
    font-size: 11px;
  }
  .eg-table th,
  .eg-table td{
    padding: 8px 4px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.25;
  }

  /* SP列幅 */
  .eg-table th:nth-child(1),
  .eg-table td:nth-child(1){ width: 20% !important; }
  .eg-table th:nth-child(2),
  .eg-table td:nth-child(2){ width: 22% !important; }
  .eg-table th:nth-child(3),
  .eg-table td:nth-child(3){ width: 32% !important; }
  .eg-table th:nth-child(4),
  .eg-table td:nth-child(4){ width: 26% !important; }

  .eg-table td:nth-child(4){ font-size: 12px; }
  .eg-table th:nth-child(1),
  .eg-table th:nth-child(3){
    font-size: 10px;
    line-height: 1.15;
  }

  /* SP用画像差し替え */
  .eg-hero__titleImg{ content: url("./img/hero-title-sp.png"); }
  .eg-band__center{ content: url("./img/band-center-sp.png"); }
  .eg-exampleImgWrap img{ content: url("./img/example-3cards-sp.png"); }

  /* PlusOne：SPで縮小 */
  .eg-plusOneBanner{
    max-width: 520px;
    margin: 12px auto 0;
  }
  .eg-plusOneBanner__left{ padding: 14px 12px; }
  .eg-plusOneBanner__right{ padding: 10px; }
  .eg-plusOneBanner__title{ font-size: 14px; }
  .eg-plusOneBanner__name{ font-size: 20px; }
  .eg-plusOneBanner__price{ font-size: 34px; }
  .eg-plusOneBanner__price span{ font-size: 16px; }
  .eg-plusOneBanner__note{ font-size: 12px; }
}

@media (max-width: 360px){
  .eg-campaignGrid{ grid-template-columns: 1fr; }
}

/* =========================================
  FORMULA：SPで縦幅を縮めてまとめる
  上段：LPガス＋電気＋水 を横1列
  下段：− → 割引 → ＝ → 結果
========================================= */
@media (max-width: 600px){
  .eg-formula{
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
  }

  .eg-formula > :nth-child(1){ grid-column: 1; grid-row: 1; }
  .eg-formula > :nth-child(2){ grid-column: 2; grid-row: 1; }
  .eg-formula > :nth-child(3){ grid-column: 3; grid-row: 1; }
  .eg-formula > :nth-child(4){ grid-column: 4; grid-row: 1; }
  .eg-formula > :nth-child(5){ grid-column: 5; grid-row: 1; }

  .eg-formula > :nth-child(6){
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    margin: 2px 0;
  }

  .eg-formula > :nth-child(7){
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .eg-formula > :nth-child(8){
    grid-column: 1 / -1;
    grid-row: 4;
    justify-self: center;
    margin: 2px 0;
  }

  .eg-formula > :nth-child(9){
    grid-column: 1 / -1;
    grid-row: 5;
  }

  .eg-box{
    min-width: 0;
    padding: 10px 8px;
  }
  .eg-box p{ font-size: 11px; }
  .eg-box__price{ font-size: 16px; }
  .eg-box__price small{ font-size: 11px; }

  /* PlusOne：600px以下で縦積み */
  .eg-plusOneBanner{ flex-direction: column; }
}

/* 表のさらに小さい端末向け保険 */
@media (max-width: 390px){
  .eg-table{ font-size: 10px; }
  .eg-table th, .eg-table td{ padding: 7px 3px; }
  .eg-table td:nth-child(4){ font-size: 11px; }
}

/* hoverのない端末向け */
@media (hover: none){
  .eg-ctaItem:active{
    transform: scale(0.99);
    filter: brightness(.98);
  }
}

/* =========================================
  注意事項（H2）の上に余白を確実に付ける（PC/SP共通）
  ※直前が <br> や .eg-plusOneBanner でも効くようにする
========================================= */
.eg-plusOne .eg-h2{
  margin-top: 0; /* まず基準を揃える（既存影響の保険） */
}

/* 直前がバナーの場合 */
.eg-plusOne .eg-plusOneBanner + .eg-h2{
  margin-top: 32px;
}

/* 直前が <br> の場合（あなたのHTML対策） */
.eg-plusOne br + .eg-h2{
  margin-top: 32px;
}

/* 「バナー → br → H2」の場合も拾う */
.eg-plusOne .eg-plusOneBanner + br + .eg-h2{
  margin-top: 32px;
}