/*
 Theme Name:   Cocoon Child
 Template:     cocoon-master
*/

/* === 共通 Dark === */
/* === 共通 Dark === */
body:not(.wp-admin) {
  background: #000 !important;
  color: #fff !important;
}

body:not(.wp-admin) a { color: #66ccff; }
body:not(.wp-admin) a:hover { color: #ff3366; }

body:not(.wp-admin) h1,
body:not(.wp-admin) h2,
body:not(.wp-admin) h3,
body:not(.wp-admin) h4,
body:not(.wp-admin) h5,
body:not(.wp-admin) h6,
body:not(.wp-admin) .entry-title,
body:not(.wp-admin) .widget-title {
  color: #fff !important;
}

body:not(.wp-admin) input,
body:not(.wp-admin) textarea,
body:not(.wp-admin) select,
body:not(.wp-admin) button {
  background: #111 !important;
  color: #fff !important;
  border-color: #444 !important;
}


/* === トップページ中央配置 === */
body.home:not(.wp-admin) {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
}

.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: fadeIn 1s ease forwards;
  opacity: 0;
  flex: 1;  /* ← 中身を縦中央にする */
}

@keyframes fadeIn { to { opacity: 1; } }

.home-hero img {
  max-width: 40vw;
  height: auto;
}

.home-nav {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 50px;
  margin-top: 40px;
}

.home-nav a {
  display: inline-block;
}

.home-nav a:hover {
  filter: drop-shadow(0 0 5px #a020f0);
}

.home-nav a img {
  height: auto;
  max-width: 100%;
}

/* === スマホレイアウト === */
@media (max-width: 768px) {
  .home-hero img {
    max-width: 60vw;
    margin-bottom: 30px;
  }

  .home-nav {
    flex-direction: column;
    gap: 30px;
    margin: 0;
  }

  .home-nav a img {
    max-width: 50vw;
  }
}

/* === Cocoonの白帯 & 不要パーツ === */
#main, #content, #container, .content {
  width: 100% !important;
  max-width: 100% !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 auto !important;
}

.sidebar, .widget, .site-header, #header,
#footer, footer,
.article-footer, .entry-footer,
.share, .share-buttons, .sns-share, .sns-share-buttons,
.wp-block-cocoon-blocks-sns-share, .wp-block-cocoon-blocks-sns-follow,
#sns-group, #sns-buttons, .sns-follow-buttons,
.c-share-buttons, .top-share-buttons, .footer-share-buttons {
  display: none !important;
}

/* === CONTENT PAGE === */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  padding: 40px 20px;
}

.content-card {
  background: #111;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
  transition: transform 0.3s, box-shadow 0.3s;
}

.content-card img {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.content-card h2 {
  padding: 15px;
  font-size: 1.1rem;
}

.content-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(255,255,255,0.1);
}

/* 先頭5件を強調（例） */
.content-grid .content-card:nth-child(-n+5) {
  grid-column: span 2;
}

@media (max-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  .content-grid .content-card:nth-child(-n+5) {
    grid-column: auto;
  }
}