/* リセット */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f5f5f5;
    background-size: cover;
}

body#works {
    background-image: url("/bg-img/jyomon.jpg");
}

body#contact {
    background-image: url("/bg-img/kyakusen.jpg");
}

body#service {
    background-image: url("/bg-img/sakura.jpg");
}

/* 背景動画 */
#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* 背景 */
#bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    /* ← -1にしない */
    pointer-events: none;
    opacity: 0.5;
}

/* 上に乗るUI */
.content {
    position: relative;
    z-index: 1;
    color: white;
    padding: 60px;
    font-size: 16px;
}

/* ヘッダー */
header {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
    position: relative;
    z-index: 1;
}

.header-log {
    scale: 40%;
    display: block;
}

header h1 {
    font-family: 'Special Elite', cursive;
    flex-grow: 1;
    text-align: center;
    margin-left: 2rem;
    font-size: 4em;
}

/* ホームページのHero */
.hero {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1;
    background: rgba(0, 0, 0, 0.5);
    padding: 2rem;
    border-radius: 10px;
}

.logo {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeIn 2s ease-in-out;
    color: rgba(255, 255, 255, 0.8);
}

.catchcopy {
    font-size: 1.5rem;
    opacity: 0.9;
    animation: fadeIn 3s ease-in-out;
    color: rgba(206, 234, 220, 0.8);
}

/* ナビゲーション */
#top .nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    background: rgba(74, 164, 227, 0.8);
    transition: all 0.3s ease;
    font-size: 1rem;
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* メインコンテンツ */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* 2列構造 */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    position: relative;
    min-height: 500px;
}

.content-item {
    background: rgba(0, 0, 0, 0.4);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    z-index: 1;
    margin: 0 2em;
    /* 左右2emの余白 */
}

.content-item:hover {
    transform: translateY(-5px);
}

.content-item.expanded {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height:100svh;
    overflow-y: auto;
    z-index: 9999;
    transform: none;
    margin: 0;
    padding: 40px;
    background: rgba(0,0,0,0.95);
    border: none;
    border-radius: 0;
    box-shadow: none;
}


.content-item.expanded .detail-content {
    display: block;
    margin-top: 20px;
    padding: 2em 2em 5em 2em;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    animation: fadeIn 0.5s ease-in-out;
    animation: expandFade .4s ease;
    color: white;
}

.content-item.expanded .btn {
    display: none;
}

.content-item:not(.expanded) {
    z-index: 1;
}

/*.content-item.expanded~.content-item {
    z-index: 0;
}*/

.content-item h2 {
    color: #dde9ee;
    margin-bottom: 1rem;
}

.content-item p {
    margin-bottom: 1rem;
    color: #f3f0f0;
}

.content-item a {
    display: inline-block;
    color: #f5f5f5;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.content-item a:hover {
    color: #2980b9;
}

.content-item .detail-content {
    display: none;
}

.content-item .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 24px;
    background: rgba(255, 255, 255, 0.2);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 11;
    color: white;
    display: none;
    /* 通常時は非表示 */
}

.content-item.expanded .close-btn {
    display: flex;
    /* 拡大時に表示 */
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
}

.detail-grid li {
    list-style: none;
    text-align: center;
}
.detail-grid img {
  width: 100%;
  height: auto;
  display: block;
}

dl {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    color: #000;
}

dt {
    width: 30%;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #DADADA;
}

dd {
    width: 70%;
    padding: 10px;
    background-color: #F3F3F3;
    margin-bottom: 10px;
}
.spacebt { margin-bottom: 1rem; }

.philosophy-body{
    display:flex;
    align-items:center;
    gap:40px;
    max-width:1000px;
    margin:0 auto;
}

.philosophy-ill img{
    width:320px;
    max-width:100%;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2));
}

.philosophy-text-group{
    flex:1;
}

.philosophy-text{
    margin-bottom:1.2rem;
    line-height:1.8;
}
/* トップへ戻るボタン */

.back-to-top{
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 50px;
    height: 50px;

    display:flex;
    align-items:center;
    justify-content:center;

    background:#222;
    color:#fff;
    font-size:22px;
    text-decoration:none;

    border-radius:50%;
    box-shadow:0 5px 15px rgba(0,0,0,0.3);

    opacity:0;
    visibility:hidden;
    transition:0.3s;
    z-index:999;
}

.back-to-top:hover{
    background:#3498db;
}

/* 表示状態 */

.back-to-top.show{
    opacity:1;
    visibility:visible;
}
/* =========================
   Works 3-up (inside Service block)
========================= */

.works-3up{
  margin-top: 24px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(0,0,0,.06);
  backdrop-filter: blur(6px);
}

.works-3up__title{
  font-size: 16px;
  margin-bottom: 12px;
  letter-spacing: .02em;
  color: #000;
}

.works-3up__grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px){
  .works-3up__grid{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px){
  .works-3up__grid{
    grid-template-columns: repeat(3, 1fr);
  }
}

.work-card{
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
}

.work-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.10);
}

.work-card__thumb{
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #eee;
}

.work-card__thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-card__body{
  padding: 12px 12px 14px;
  background-color: #333;
}

.work-card__tag{
  display: inline-block;
  font-size: 11px;
  letter-spacing: .06em;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  margin-bottom: 8px;
}

.work-card__name{
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}

.work-card__desc{
  font-size: 12px;
  opacity: .85;
  line-height: 1.5;
}

.works-3up__more{
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.works-3up__btn{
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: .06em;
  transition: opacity .18s ease;
}

.works-3up__btn:hover{
  opacity: .85;
}

/* フッター */
footer {
    background: rgba(44, 62, 80, 0.85);
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: auto;
    flex-shrink: 0;
    z-index: 1;
}

.cprights {
    margin: 1em;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .logo {
        font-size: 2rem;
    }

    .catchcopy {
        font-size: 1.2rem;
    }

    .nav ul {
        flex-direction: column;
        align-items: center;
    }

    .nav a {
        margin: 5px 0;
    }

    .hero {
        padding: 1rem;
        width: 90%;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .main-content {
        margin: 1rem auto;
    }

    .nav {
        bottom: 60px;
    }

    .content-item {
        margin: 0 1em;
        /* スマホ用の余白調整 */
    }
    .works-3up__grid{
    grid-template-columns:1fr;
}

.detail-grid{
    grid-template-columns:1fr;
}
.philosophy-body{
    flex-direction:column;
    text-align:center;
}

.philosophy-ill img{
    width:240px;
}
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }

    .catchcopy {
        font-size: 1rem;
    }

    .content-item {
        padding: 1rem;
        margin: 0 0.5em;
        /* スマホ用の余白調整 */
    }

    .nav a {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .nav {
        bottom: 50px;
    }
    .content-item.expanded .detail-content {
    padding: 0;
 }
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
@keyframes expandFade{
  from{
    opacity:0;
    transform:translateY(10px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

/* ボタンスタイル */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
    margin: 5px;
}

.btn:hover {
    background: #2980b9;
}