/* ==========================================================================
   テンプレート1新版専用スタイル - 中央配置問題解決版
   ========================================================================== */

/* ==========================================================================
   1. CSS変数定義
   ========================================================================== */

:root {
  /* カラーパレット */
  --color-primary: #1a1a1a;        /* メイン背景色 */
  --color-secondary: #2d2d2d;      /* セカンダリ背景色 */
  --color-accent: #667eea;         /* アクセントカラー */
  --color-text: #ffffff;           /* メインテキスト色 */
  --color-text-hover: #e2e8f0;     /* ホバー時テキスト色 */
  --color-border: #374151;         /* ボーダー色 */
  
  /* スペーシング */
  --spacing-unit: 1rem;
  --spacing-sm: calc(var(--spacing-unit) * 0.5);
  --spacing-md: var(--spacing-unit);
  --spacing-lg: calc(var(--spacing-unit) * 2);
  --spacing-xl: calc(var(--spacing-unit) * 3);
  
  /* トランジション */
  --transition-default: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
  
  /* 影設定 */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.2);
  --shadow-lg: 0 8px 16px rgba(0,0,0,0.3);
}

/* ==========================================================================
   2. 基本設定
   ========================================================================== */

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Noto Sans JP', 'Poppins', sans-serif;
  background: var(--color-primary) !important;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* BAND CONNECTロゴ（ヒーローセクション内に配置） */
.hero-section .bandconnect-logo {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 999;
  transition: transform var(--transition-default);
}

.hero-section .bandconnect-logo a {
  display: block;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.5);
  padding: 20px;
  border-radius: 6px;
}

.hero-section .bandconnect-logo img {
  height: 100px;
  width: auto;
  transition: all var(--transition-default);
  display: block;
}

.hero-section .bandconnect-logo:hover {
  transform: scale(1.05);
}

.hero-section .bandconnect-logo:hover img {
  opacity: 0.8;
}

/* ==========================================================================
   3. レイアウトコンテナ - 中央配置の確実な実装
   ========================================================================== */

.container {
  max-width: 1200px;
  margin: 0 auto !important;  /* 強制的に中央配置 */
  padding: 0 2rem;
  width: 100%;
  box-sizing: border-box;
}

/* セクション全体のスタイル */
.content-section,
.news-section,
.live-section,
.gallery-section,
.sns-section {
  padding: 4rem 0;
}

/* ==========================================================================
   フッタースタイル - テンプレート1専用
   ========================================================================== */

.footer {
  background-color: #000 !important;
  color: #ccc !important;
  padding: 40px 0 20px !important;
  margin-top: 60px !important;
  border-top: 1px solid #333 !important;
  display: block !important;
  visibility: visible !important;
}

.footer-content {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
  gap: 40px !important;
}

.footer-section h3 {
  color: #fff !important;
  font-size: 18px !important;
  margin-bottom: 15px !important;
  border-bottom: 2px solid #ffcc00 !important;
  padding-bottom: 5px !important;
}

.footer-section ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.footer-section ul li {
  margin-bottom: 8px !important;
}

.footer-section ul li a {
  color: #ccc !important;
  text-decoration: none !important;
  font-size: 14px !important;
  transition: color 0.3s ease !important;
}

.footer-section ul li a:hover {
  color: #ffcc00 !important;
}

.footer-section p {
  font-size: 14px !important;
  line-height: 1.6 !important;
  margin-bottom: 10px !important;
  color: #ccc !important;
}

.footer-bottom {
  border-top: 1px solid #333 !important;
  margin-top: 30px !important;
  padding-top: 20px !important;
  text-align: center !important;
  font-size: 12px !important;
  color: #999 !important;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
}

/* ==========================================================================
   4. ヒーローセクション
   ========================================================================== */

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  position: relative;
  padding: 2rem 0;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.3;
  z-index: 1;
}

.hero-background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(10, 10, 10, 0.5) 0%, rgba(26, 26, 26, 0.5) 100%);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23ffffff" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.band-logo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin: 0 auto 2rem;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: bold;
  color: white;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.band-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.band-name {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-text);
  text-align: center;
}

.band-tagline {
  font-size: 1.2rem;
  color: var(--color-text-hover);
  margin-bottom: 2rem;
  font-weight: 300;
  text-align: center;
}

.band-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--color-accent);
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-text-hover);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==========================================================================
   5. セクションタイトル - 中央配置
   ========================================================================== */

.section-title {
  font-size: 2.5rem;
  font-weight: 600;
  margin: 0 auto 3rem auto !important;  /* 強制的に中央配置 */
  text-align: center !important;
  color: var(--color-text);
  position: relative;
  display: block;
  width: fit-content;  /* コンテンツ幅に合わせる */
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}

/* ==========================================================================
   6. バンド情報グリッド - 中央配置の確実な実装
   ========================================================================== */

.band-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto !important;  /* 強制的に中央配置 */
  padding: 0 2rem;
  justify-content: center;  /* グリッドアイテムを中央配置 */
}

.info-card {
  background: var(--color-secondary);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid var(--color-border);
  transition: transform var(--transition-default), box-shadow var(--transition-default);
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.info-card h3 {
  color: var(--color-accent);
  margin-bottom: 1rem;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  line-height: 1.6;
  color: var(--color-text-hover);
}

.info-item:last-child {
  border-bottom: none;
}

.info-item strong {
  color: var(--color-accent);
  font-weight: 600;
  margin-right: 0.5rem;
}

.info-item a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-default);
}

.info-item a:hover {
  color: var(--color-text);
}

/* ==========================================================================
   7. メンバーグリッド - 中央配置の確実な実装
   ========================================================================== */

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto !important;  /* 強制的に中央配置 */
  padding: 0 2rem;
  justify-content: center;  /* グリッドアイテムを中央配置 */
}

.member-card {
  background: var(--color-secondary);
  border-radius: 16px;
  overflow: hidden;
  transition: transform var(--transition-default), box-shadow var(--transition-default);
  border: 1px solid var(--color-border);
}

.member-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.member-photo {
  width: 100%;
  height: 250px;
  background: linear-gradient(135deg, var(--color-accent), #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-info {
  padding: 1.5rem;
}

.member-name {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.member-instrument {
  color: var(--color-accent);
  font-weight: 500;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.member-profile {
  color: var(--color-text-hover);
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.member-sns-icons {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-start;
}

.sns-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: transform var(--transition-default);
}

.sns-icon:hover {
  transform: scale(1.1);
}

.x-icon {
  background: #000000;
}

.instagram-icon {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.facebook-icon {
  background: #1877f2;
}

/* ==========================================================================
   8. バンドストーリー - 中央配置の確実な実装
   ========================================================================== */

.band-story-content {
  max-width: 800px;
  margin: 0 auto !important;  /* 強制的に中央配置 */
  padding: 0 2rem;
  text-align: center;  /* テキストも中央配置 */
}

.story-card {
  background: var(--color-secondary);
  border-radius: 16px;
  padding: 3rem;
  border: 1px solid var(--color-border);
  transition: transform var(--transition-default), box-shadow var(--transition-default);
  position: relative;
  overflow: hidden;
  margin: 0 auto;  /* カード自体も中央配置 */
}

.story-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--color-accent), #764ba2);
}

.story-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.story-text {
  color: var(--color-text-hover);
  line-height: 1.8;
  font-size: 1.1rem;
  text-align: left;  /* ストーリーテキストは左揃え */
}

.story-text p {
  margin-bottom: 1.5rem;
}

.story-text p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   9. ニュースセクション
   ========================================================================== */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 2rem auto !important;
  padding: 0 2rem;
}

.news-card {
  background: var(--color-secondary);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: transform var(--transition-default), box-shadow var(--transition-default);
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.news-header {
  padding: 1.5rem 1.5rem 0;
}

.news-date {
  color: var(--color-accent);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.news-photo {
  margin: 1rem 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  height: 200px;
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-content {
  padding: 0 1.5rem 1.5rem;
}

.news-text {
  color: var(--color-text-hover);
  line-height: 1.6;
  margin: 0;
}

.news-actions {
  text-align: center;
  margin-top: 2rem;
}

.past-news-btn {
  background: var(--color-accent);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-default);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.past-news-btn:hover:not(.disabled) {
  background: #764ba2;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.past-news-btn.disabled {
  background: var(--color-border);
  color: var(--color-text-hover);
  cursor: not-allowed;
  opacity: 0.6;
}

/* ==========================================================================
   10. ライブ情報セクション
   ========================================================================== */

.live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 2rem auto !important;
  padding: 0 2rem;
}

.live-card {
  background: var(--color-secondary);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid var(--color-border);
  transition: transform var(--transition-default), box-shadow var(--transition-default);
}

.live-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.live-header {
  margin-bottom: 1rem;
}

.live-date {
  color: var(--color-accent);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.live-time {
  margin-left: 0.5rem;
  color: var(--color-text-hover);
}

.live-title {
  color: var(--color-text);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 1rem 0;
}

.live-venue {
  color: var(--color-text-hover);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.venue-link {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-default);
}

.venue-link:hover {
  color: var(--color-text);
}

.live-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.live-price,
.live-order,
.live-performance {
  color: var(--color-text-hover);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.live-actions {
  text-align: center;
  margin-top: 2rem;
}

.past-live-btn {
  background: var(--color-accent);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-default);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.past-live-btn:hover:not(.disabled) {
  background: #764ba2;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.past-live-btn.disabled {
  background: var(--color-border);
  color: var(--color-text-hover);
  cursor: not-allowed;
  opacity: 0.6;
}

/* ==========================================================================
   11. ギャラリーセクション
   ========================================================================== */

.gallery-subsection {
  margin-bottom: 3rem;
}

.gallery-subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 2rem;
}

.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto !important;
  padding: 0 2rem;
}

.photo-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-default);
}

.photo-item:hover {
  transform: scale(1.05);
}

.photo-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.photo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-default);
}

.photo-item:hover .photo-overlay {
  opacity: 1;
}

.photo-overlay i {
  color: white;
  font-size: 2rem;
}

.youtube-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto !important;
  padding: 0 2rem;
}

.youtube-card {
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-secondary);
  border: 1px solid var(--color-border);
}

.youtube-embed {
  width: 100%;
  height: 200px;
}

.youtube-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.youtube-thumbnail {
  position: relative;
  cursor: pointer;
  height: 200px;
  overflow: hidden;
}

.youtube-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 0, 0, 0.8);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: background var(--transition-default);
}

.youtube-thumbnail:hover .play-button {
  background: rgba(255, 0, 0, 1);
}

/* ==========================================================================
   12. SNSセクション
   ========================================================================== */

.sns-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.sns-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  color: white;
  font-weight: 600;
  transition: all var(--transition-default);
  border: 2px solid transparent;
}

.sns-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.x-link {
  background: #000000;
}

.instagram-link {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.facebook-link {
  background: #1877f2;
}

.youtube-link {
  background: #ff0000;
}

/* ==========================================================================
   13. レスポンシブ対応
   ========================================================================== */

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero-content {
    padding: 0 1rem;
  }
  
  .band-name {
    font-size: 2.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .band-info-grid,
  .members-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }
  
  .news-grid,
  .live-grid,
  .photos-grid,
  .youtube-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }
  
  .sns-links {
    flex-direction: column;
    align-items: center;
    padding: 0 1rem;
  }
  
  .story-card {
    padding: 2rem;
  }
  
  .bandconnect-logo {
    top: 15px;
    left: 15px;
    padding: 6px 10px;
  }
  
  .bandconnect-logo img {
    height: 35px;
  }
}

@media (max-width: 480px) {
  .band-name {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .band-logo {
    width: 120px;
    height: 120px;
    font-size: 3rem;
  }
  
  .story-card {
    padding: 1.5rem;
  }
  
  .member-info,
  .info-card {
    padding: 1rem;
  }
}

/* ==========================================================================
   14. デスクトップ/モバイル表示切り替え
   ========================================================================== */

.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .desktop-only {
    display: none;
  }
  
  .mobile-only {
    display: block;
  }
}