/*
 * heat-stroke-presentation.css
 * 熱中症対策プレゼンテーション専用のプレミアムスタイルシート
 * グラスモルフィズム・ダイナミックアニメーション・レスポンシブ対応
 */

:root {
  --primary-color: #ff8c00;
  --secondary-color: #ffd700;
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  --card-bg: rgba(30, 41, 59, 0.7);
  --card-border: rgba(255, 255, 255, 0.1);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --office-theme: #0ea5e9;
  --site-theme: #f97316;
  --font-sans: 'Noto Sans JP', sans-serif;
  --shadow-premium: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

/* 背景のオーロラ風動的グラデーション */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 140, 0, 0.08) 0%, rgba(15, 23, 42, 0) 50%),
              radial-gradient(circle, rgba(14, 165, 233, 0.08) 0%, rgba(15, 23, 42, 0) 50%);
  z-index: -1;
  animation: aurora 25s infinite alternate ease-in-out;
  pointer-events: none;
}

@keyframes aurora {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    transform: translate(10%, 10%) rotate(360deg);
  }
}

/* ヘッダー */
header {
  backdrop-filter: blur(10px);
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid var(--card-border);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #0f172a;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(to right, #ffffff, #e2e8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-buttons {
  display: flex;
  gap: 1rem;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  color: #0f172a;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 140, 0, 0.5);
}

/* メインコンテンツエリア */
main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
}

/* スライド選択コントローラー */
.slide-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.4rem;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--secondary-color);
  font-weight: 700;
  border-bottom: 2px solid var(--secondary-color);
}

/* スライドコンテナ */
.presentation-container {
  position: relative;
  min-height: 620px;
  width: 100%;
  perspective: 1000px;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95) translateY(20px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(20px);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--shadow-premium);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  z-index: 10;
}

/* スライドヘッダー */
.slide-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.slide-title-group h2 {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(to right, #ffffff, var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.25rem;
}

.slide-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.slide-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.2);
}

/* スライドコンテンツの共通レイアウト */
.slide-body {
  flex: 1;
  display: grid;
  gap: 1.5rem;
}

/* スライド別レイアウト */

/* Slide 1: タイトル & イントロ */
.grid-intro {
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
}

.intro-text-block h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.intro-text-block p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #e2e8f0;
}

.stat-highlight-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1.25rem;
  text-align: center;
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.06);
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.intro-visual {
  background: radial-gradient(circle, rgba(255,140,0,0.15) 0%, rgba(0,0,0,0) 70%);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.sun-icon-animated {
  font-size: 6rem;
  color: var(--primary-color);
  animation: pulse 3s infinite alternate ease-in-out;
}

@keyframes pulse {
  0% {
    transform: scale(1) rotate(0deg);
    text-shadow: 0 0 20px rgba(255,140,0,0.4);
  }
  100% {
    transform: scale(1.1) rotate(10deg);
    text-shadow: 0 0 40px rgba(255,140,0,0.8);
  }
}

/* Slide 2: 昔と今の違い */
.grid-comparison {
  grid-template-columns: 1fr 1fr;
}

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

.comparison-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1.5rem;
  height: 100%;
}

.comparison-box.past {
  border-left: 4px solid var(--text-secondary);
}

.comparison-box.present {
  border-left: 4px solid var(--primary-color);
  background: rgba(255, 140, 0, 0.02);
}

.comparison-box h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comparison-box.past h3 {
  color: var(--text-secondary);
}

.comparison-box.present h3 {
  color: var(--primary-color);
}

.comparison-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comparison-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.95rem;
}

.comparison-list li::before {
  content: '■';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.8rem;
}

.comparison-box.past .comparison-list li::before {
  color: var(--text-secondary);
}

.comparison-box.present .comparison-list li::before {
  color: var(--primary-color);
}

/* Slide 3 & 4: オフィス & 現場の対策 */
.grid-detail {
  grid-template-columns: 1.1fr 0.9fr;
}

.detail-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.risk-alert-box {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  padding: 1rem;
  border-left: 4px solid #ef4444;
}

.risk-alert-box h4 {
  color: #ef4444;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.risk-alert-box p {
  font-size: 0.9rem;
  color: #fca5a5;
}

.measures-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.measure-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.measure-num {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.office-theme .measure-num {
  background: var(--office-theme);
  color: #0f172a;
}

.site-theme .measure-num {
  background: var(--site-theme);
  color: #0f172a;
}

.measure-content h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.measure-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.detail-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.illustration-wrapper {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 5 / 3;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0,0,0,0.2);
}

.illustration-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.illustration-wrapper:hover img {
  transform: scale(1.05);
}

.visual-caption {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Slide 5: グラフ & 参考文献 */
.grid-graphs {
  grid-template-columns: 1.2fr 0.8fr;
  align-items: stretch;
}

.graphs-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.graph-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.graph-card h4 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  text-align: center;
  color: var(--text-primary);
}

.chart-container {
  position: relative;
  width: 100%;
  height: 180px;
}

.references-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.references-section h3 {
  font-size: 1.2rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 0.5rem;
}

.ref-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.ref-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ref-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ref-link {
  font-size: 0.8rem;
  color: var(--office-theme);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s ease;
}

.ref-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* スライドフッター */
.slide-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.prev-next-controls {
  display: flex;
  gap: 1rem;
}

.btn-nav {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: all 0.3s ease;
}

.btn-nav:hover:not(:disabled) {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #0f172a;
}

.btn-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.slide-indicator {
  display: flex;
  gap: 0.5rem;
}

.indicator-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator-dot.active {
  background: var(--secondary-color);
  width: 1.5rem;
  border-radius: 4px;
}

/* フルスクリーンモード（プレゼンテーション表示） */
.fullscreen-active {
  background: #0f172a !important;
}

.fullscreen-active header {
  display: none !important;
}

.fullscreen-active main {
  margin: 0 !important;
  max-width: 100vw !important;
  height: 100vh !important;
  padding: 1.5rem !important;
  justify-content: center;
}

.fullscreen-active .slide-tabs {
  margin-bottom: 1rem !important;
}

.fullscreen-active .presentation-container {
  flex: 1;
}

.fullscreen-active .slide {
  height: 100% !important;
}

/* レスポンシブ設計 */
@media (max-width: 992px) {
  .slide-tabs {
    flex-wrap: wrap;
  }
  
  .tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .slide {
    padding: 1.5rem;
    min-height: 750px;
  }

  .presentation-container {
    min-height: 750px;
  }

  .grid-intro, .grid-comparison, .grid-detail, .grid-graphs {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .intro-visual, .detail-visual {
    order: -1;
    margin-bottom: 1rem;
  }

  .illustration-wrapper {
    max-width: 100%;
  }

  .graphs-section {
    grid-template-columns: 1fr;
  }

  .chart-container {
    height: 160px;
  }
}

@media (max-width: 576px) {
  header {
    padding: 1rem;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .nav-buttons {
    width: 100%;
    justify-content: center;
  }

  .slide {
    min-height: 900px;
  }

  .presentation-container {
    min-height: 900px;
  }

  .stat-highlight-box {
    grid-template-columns: 1fr;
  }

  .slide-title-group h2 {
    font-size: 1.5rem;
  }
}
