/* ----------------------------------
Template Name: Tekni - IT Solutions & Services Template
Custom overrides for 株式会社トーチ demo
------------------------------------- */

/*
** Write you custom css below
*/

/* ===== 日本語改行・可読性 ===== */
html {
  -webkit-font-smoothing: antialiased;
}
body,
h1, h2, h3, h4, h5, h6,
.navbar, .btn, p, a, li, span, input, textarea, button {
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif !important;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-break: strict;
}
.banner-style-two .content h2,
.site-heading .title,
.about-style-two-info .title,
.choose-us-style-two .title,
.services-style-two .thumb .title h4,
.blog-style-one h4,
.gallery-style-one .content h4,
.core-business-items .core-card span,
.certification h4 {
  word-break: keep-all;
  overflow-wrap: normal;
  line-break: strict;
}

.demo-banner {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #0b1f33;
  color: #d7e8f7;
  padding: .55rem 1.2rem;
  font-size: .78rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}
.demo-banner strong { color: #7ec8ff; }
.demo-banner a { color: #9fd4ff; text-decoration: underline; }
.navbar-brand .logo { max-height: 48px; width: auto; }
footer .logo { max-height: 52px; width: auto; }

/* SplitText の途中改行を抑止（アニメは維持しつつ自然な折返し） */
.split-text .line,
.split-text div {
  word-break: keep-all !important;
  overflow-wrap: normal !important;
}

/* ===== ヒーロー ===== */
.banner-style-two .content h2 {
  max-width: 15em;
  line-height: 1.35;
}
.banner-thumb img {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}

/* ===== サービスカード：高さ・画像・文言の統一 ===== */
#services .row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}
#services .row > [class*="col-"] {
  display: flex;
}
#services .services-style-two {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: visible;
  background: #fff;
  border-radius: 15px;
}
#services .services-style-two .thumb {
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
}
#services .services-style-two .thumb > img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-radius: 15px 15px 0 0;
}
#services .services-style-two .thumb .title {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -22px;
  z-index: 2;
  max-width: calc(100% - 24px);
}
#services .services-style-two .thumb .title h4 {
  margin: 0;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 11em;
}
#services .services-style-two .info {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 48px 24px 28px;
  min-height: 180px;
}
#services .services-style-two .info p {
  flex: 1 1 auto;
  margin: 0;
  min-height: 4.5em;
  line-height: 1.7;
}
#services .services-style-two .button {
  display: flex;
  align-items: center;
  width: 100%;
  margin-top: 18px;
}
#services .services-style-two .button a {
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
  padding-right: 12px;
}
#services .services-style-two .button .devider {
  flex: 1 1 auto;
  display: block;
  bottom: 0;
  border-top: 2px solid #e5e5e5;
}
#services .services-style-two.active .button .devider::after {
  opacity: 0;
  visibility: hidden;
  width: 40px;
}
#services .services-style-two:hover .button .devider::after,
#services .services-style-two.active:hover .button .devider::after {
  opacity: 1;
  visibility: visible;
  width: 100%;
}

/* ===== コア事業：空セルなし・同高・縦位置揃え ===== */
.core-business-items ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: stretch;
}
.core-business-items ul li {
  position: relative;
  margin: 0 !important;
  padding: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  min-height: 0;
  display: flex;
  width: calc(33.333% - 10px);
  flex: 0 0 calc(33.333% - 10px);
}
.core-business-items ul li::before,
.core-business-items ul li::after {
  display: none !important;
}
.core-business-items .core-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5eaf0;
  text-decoration: none;
  color: inherit;
  transition: transform .25s ease, box-shadow .25s ease;
}
.core-business-items .core-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 28, 46, 0.12);
}
.core-business-items .core-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
  flex: 0 0 auto;
}
.core-business-items .core-card span {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 56px;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #0f1c2e;
  text-align: center;
  line-height: 1.35;
  white-space: nowrap;
}
@media (max-width: 991px) {
  .core-business-items ul li {
    width: calc(50% - 8px);
    flex-basis: calc(50% - 8px);
  }
}
@media (max-width: 575px) {
  .core-business-items ul li {
    width: 100%;
    flex-basis: 100%;
  }
  .core-business-items .core-card span {
    white-space: normal;
  }
}

/* ===== 会社概要：重なりを軽減・縦位置揃え ===== */
.about-style-two-thumb {
  display: grid !important;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  align-items: end;
  padding-top: 0 !important;
  position: relative;
}
.about-style-two-thumb > img {
  width: 100% !important;
  max-width: none !important;
  height: 360px !important;
  object-fit: cover !important;
  border-radius: 12px;
  display: block;
}
.about-style-two-thumb > img.wow.fadeInDown {
  height: 300px !important;
  margin-bottom: 30px;
}
.about-style-two-thumb .certification {
  left: auto !important;
  right: 8%;
  top: auto !important;
  bottom: 12px;
  width: 150px !important;
  height: 150px !important;
  padding: 16px !important;
  z-index: 3;
}
.about-style-two-thumb .certification img {
  height: 36px !important;
  margin-bottom: 8px !important;
}
.about-style-two-thumb .certification h4 {
  font-size: 13px !important;
  line-height: 1.35;
  padding: 0 6px;
}

/* ===== 実績ギャラリー：masonry無効・同高グリッド ===== */
#projects #gallery-grid,
#projects .gallery-items {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  height: auto !important;
}
#projects .gallery-item {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: 100% !important;
  margin: 0 !important;
  transform: none !important;
}
#projects .gallery-style-one {
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
}
#projects .gallery-style-one > img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}
#projects .gallery-style-one .shape {
  display: none; /* 重なりを解消 */
}
#projects .gallery-style-one .overlay {
  background: linear-gradient(transparent, rgba(8, 20, 40, 0.78));
}
#projects .gallery-style-one .overlay .content {
  padding: 18px 20px;
}
#projects .gallery-style-one .overlay .content h4 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
}
@media (max-width: 767px) {
  #projects #gallery-grid {
    grid-template-columns: 1fr;
  }
  #projects .gallery-style-one > img {
    height: 200px;
  }
}

/* ===== お知らせ：3カラム同高・重複なしレイアウト ===== */
#blog .row.blog-equal {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}
#blog .row.blog-equal > [class*="col-"] {
  display: flex;
  margin-bottom: 30px;
}
#blog .blog-style-one {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  background: #0f1c2e;
}
#blog .blog-style-one.solid .thumb {
  position: relative;
  height: 100%;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
#blog .blog-style-one.solid .thumb > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#blog .blog-style-one.solid .thumb .info {
  position: relative;
  z-index: 2;
  background: linear-gradient(transparent, rgba(8, 18, 35, 0.88));
  padding: 70px 22px 22px;
}
#blog .blog-style-one.solid .thumb .info h4 {
  font-size: 17px;
  line-height: 1.45;
  margin: 0 0 8px;
}
#blog .blog-style-one.solid .thumb .info h4 a {
  color: #fff;
}
#blog .blog-style-one.solid .thumb .info p {
  color: rgba(255,255,255,.88);
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}
#blog .blog-style-one .tags {
  z-index: 3;
}

/* ===== 強みサイド画像 ===== */
.choose-us-style-thumb > img:first-child {
  width: 100%;
  max-width: 480px;
  height: 520px;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}
