/* ============================================
   第26回マリンバイオテクノロジー学会大会
   共通スタイルシート
   ============================================ */

/* CSS Variables */
:root {
  /* Colors - Marine inspired palette */
  --primary-dark: #0a3d62;
  --primary: #1e5f8a;
  --primary-light: #3498db;
  --accent: #00a8cc;
  --accent-light: #7fdbff;

  --success: #27ae60;
  --warning: #f39c12;
  --danger: #e74c3c;

  --text-primary: #2c3e50;
  --text-secondary: #5d6d7e;
  --text-light: #7f8c8d;

  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --bg-gray: #ecf0f1;

  --border-color: #dfe6e9;
  --shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.12);

  /* Typography */
  --font-primary: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "メイリオ", sans-serif;
  --font-heading: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Container */
  --container-max: 1200px;
  --container-padding: 1.5rem;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-light);
}

img {
  max-width: 100%;
  height: auto;
}

ul, ol {
  padding-left: var(--spacing-xl);
}

/* Layout */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section {
  padding: var(--spacing-3xl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  margin: var(--spacing-md) auto 0;
  border-radius: var(--radius-full);
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--bg-white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.header-top {
  background: rgba(0, 0, 0, 0.1);
  padding: var(--spacing-xs) 0;
  font-size: 0.875rem;
}

.header-main {
  padding: var(--spacing-md) 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.site-title a {
  color: var(--bg-white);
}

.site-title a:hover {
  color: var(--accent-light);
}

.site-subtitle {
  font-size: 0.875rem;
  opacity: 0.9;
  margin-top: var(--spacing-xs);
}

/* Navigation */
.nav {
  background: var(--primary-dark);
}

.nav-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: var(--spacing-md) var(--spacing-lg);
  color: var(--bg-white);
  font-weight: 500;
  transition: background var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-light);
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--bg-white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--spacing-sm);
}

/* Hero Section */
.hero {
  color: var(--bg-white);
  text-align: center;
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
  background-color: var(--primary-dark);
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
}

@keyframes float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-100px); }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
  color: var(--bg-white);
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.5),
    0 4px 8px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(0, 0, 0, 0.2);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.hero-subtitle {
  font-size: 1.5rem;
  opacity: 0.95;
  margin-bottom: var(--spacing-lg);
}

.hero-info {
  display: flex;
  justify-content: center;
  gap: var(--spacing-xl);
  flex-wrap: wrap;
  margin-top: var(--spacing-xl);
}

.hero-info-item {
  background: rgba(255, 255, 255, 0.15);
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

.hero-info-label {
  font-size: 0.875rem;
  opacity: 0.9;
}

.hero-info-value {
  font-size: 1.125rem;
  font-weight: 700;
}

/* Cards */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

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

.card-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--bg-white);
  padding: var(--spacing-lg);
}

.card-header .card-title,
h3.card-title {
  font-size: 1.25rem;
  margin: 0;
  color: var(--bg-white);
}

.card-body {
  padding: var(--spacing-lg);
}

/* Card with button at bottom-right */
.grid-3 .card {
  display: flex;
  flex-direction: column;
}

.grid-3 .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.grid-3 .card-body .btn {
  margin-top: auto;
  align-self: flex-end;
}

/* Notice/Alert */
.notice {
  background: var(--bg-light);
  border-left: 4px solid var(--primary);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.notice-important {
  background: #fff3cd;
  border-left-color: var(--warning);
}

.notice-success {
  background: #d4edda;
  border-left-color: var(--success);
}

.notice-danger {
  background: #f8d7da;
  border-left-color: var(--danger);
}

.notice-title {
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

/* Timeline */
.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--spacing-md);
  position: relative;
  padding-top: 60px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 25px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--radius-full);
}

.timeline-item {
  position: relative;
  text-align: center;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -42px;
  width: 14px;
  height: 14px;
  background: var(--bg-white);
  border: 3px solid var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bg-light);
  z-index: 1;
}

.timeline-date {
  position: absolute;
  top: -70px;
  left: 0;
  right: 0;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.85rem;
  white-space: nowrap;
}

.timeline-content {
  background: var(--bg-white);
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  min-height: 100px;
  font-size: 0.9rem;
}

/* News List */
.news-list {
  list-style: none;
  padding: 0;
}

.news-item {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--border-color);
}

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

.news-date {
  flex-shrink: 0;
  color: var(--primary);
  font-weight: 500;
  font-size: 0.875rem;
  min-width: 100px;
}

.news-tag {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-sm);
  background: var(--primary);
  color: var(--bg-white);
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  margin-right: var(--spacing-sm);
}

.news-tag.new {
  background: var(--danger);
}

/* Sponsors */
.sponsors {
  background: var(--bg-light);
}

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--spacing-lg);
  align-items: center;
  justify-items: center;
}

.sponsor-item {
  background: var(--bg-white);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  transition: transform var(--transition-fast);
}

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

.sponsor-item img {
  max-height: 60px;
  width: auto;
}

/* Schedule Table */
.schedule-table {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.schedule-item {
  display: grid;
  grid-template-columns: 140px 1fr 200px;
  gap: var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  align-items: start;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.schedule-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.schedule-time {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
  white-space: nowrap;
}

.schedule-content {
  line-height: 1.7;
}

.schedule-venue {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-align: right;
}

.schedule-break {
  background: var(--bg-light);
  box-shadow: none;
  border: 1px dashed var(--border-color);
}

.schedule-break:hover {
  transform: none;
  box-shadow: none;
}

.schedule-break .schedule-time {
  color: var(--text-secondary);
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--spacing-lg);
}

th, td {
  padding: var(--spacing-md);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background: var(--primary);
  color: var(--bg-white);
  font-weight: 600;
}

tr:nth-child(even) {
  background: var(--bg-light);
}

tr:hover {
  background: var(--bg-gray);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--bg-white);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  color: var(--bg-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 95, 138, 0.3);
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: var(--bg-white);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: var(--bg-white);
}

.btn-accent:hover {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
  color: var(--bg-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 168, 204, 0.3);
}

/* Card内のボタンはアクセントカラーで区別 */
.card .btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #00c9e8 100%);
}

.card .btn-primary:hover {
  background: linear-gradient(135deg, #00c9e8 0%, var(--accent) 100%);
  box-shadow: 0 4px 12px rgba(0, 168, 204, 0.3);
}

/* Committee Members */
.committee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
}

.committee-card {
  text-align: center;
  padding: var(--spacing-xl);
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.committee-role {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: var(--spacing-sm);
}

.committee-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.committee-affiliation {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Footer */
.footer {
  background: var(--primary-dark);
  color: var(--bg-white);
  padding: var(--spacing-3xl) 0 var(--spacing-xl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-2xl);
}

.footer-section h4 {
  color: var(--accent-light);
  margin-bottom: var(--spacing-lg);
  font-size: 1.125rem;
}

.footer-nav {
  list-style: none;
  padding: 0;
}

.footer-nav li {
  margin-bottom: var(--spacing-sm);
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-nav a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-xl);
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.8;
}

.footer-contact {
  line-height: 1.8;
}

.footer-contact a {
  color: var(--accent-light);
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--bg-white);
  padding: var(--spacing-2xl) 0;
  text-align: center;
}

.page-header .page-title,
h2.page-title {
  font-size: 2rem;
  margin-bottom: var(--spacing-sm);
  color: var(--bg-white);
}

.breadcrumb {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  font-size: 0.875rem;
  opacity: 0.9;
}

.breadcrumb a {
  color: var(--accent-light);
}

.breadcrumb span {
  opacity: 0.7;
}

/* Content Sections */
.content-section {
  margin-bottom: var(--spacing-2xl);
}

.content-section h2 {
  color: var(--primary);
  padding-bottom: var(--spacing-md);
  border-bottom: 2px solid var(--primary);
  margin-bottom: var(--spacing-lg);
}

.content-section h3 {
  color: var(--primary-dark);
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

/* Forms */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: var(--spacing-md);
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 95, 138, 0.1);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-light); }

.mt-1 { margin-top: var(--spacing-md); }
.mt-2 { margin-top: var(--spacing-xl); }
.mt-3 { margin-top: var(--spacing-2xl); }
.mb-1 { margin-bottom: var(--spacing-md); }
.mb-2 { margin-bottom: var(--spacing-xl); }
.mb-3 { margin-bottom: var(--spacing-2xl); }

.bg-light { background: var(--bg-light); }
.bg-gray { background: var(--bg-gray); }

/* Responsive */
@media (max-width: 1024px) {
  .timeline {
    grid-template-columns: 1fr;
    padding-left: var(--spacing-xl);
    padding-top: 0;
  }

  .timeline::before {
    left: 8px;
    right: auto;
    top: 0;
    bottom: 0;
    width: 3px;
    height: auto;
    background: linear-gradient(180deg, var(--primary), var(--accent));
  }

  .timeline-item {
    text-align: left;
    padding-bottom: var(--spacing-lg);
  }

  .timeline-item::before {
    left: calc(-1 * var(--spacing-xl) + 2px);
    transform: none;
    top: 4px;
  }

  .timeline-date {
    position: static;
    margin-bottom: var(--spacing-xs);
  }

  .timeline-content {
    min-height: auto;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .header-main {
    padding: var(--spacing-sm) 0;
  }

  .header-content {
    flex-direction: column;
    text-align: center;
  }

  .site-title {
    font-size: 1.1rem;
    line-height: 1.3;
  }

  .site-subtitle {
    display: none;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
  }

  .nav-list.active {
    display: flex;
  }

  .nav-link {
    padding: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-title span {
    display: block;
  }

  .hero-subtitle {
    font-size: 1.125rem;
  }

  .hero-info {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }

  .news-item {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .news-date {
    min-width: auto;
  }

  /* Schedule table - card style on mobile */
  .schedule-item {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
  }

  .schedule-time {
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-light);
  }

  .schedule-venue {
    text-align: left;
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-color);
  }

  .schedule-venue::before {
    content: "会場: ";
    font-weight: 600;
    color: var(--text-primary);
  }

  table {
    font-size: 0.875rem;
  }

  th, td {
    padding: var(--spacing-sm);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-md);
  }

  .section {
    padding: var(--spacing-2xl) 0;
  }

  .hero {
    padding: var(--spacing-2xl) 0;
  }

  .btn {
    width: 100%;
    padding: var(--spacing-md);
  }
}

/* ============================================
   Scroll Animations
   ============================================ */

/* Keyframes for scroll animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Base animation class - hidden by default */
.animate-on-scroll {
  opacity: 0;
}

/* When visible, apply animation */
.animate-on-scroll.is-visible.fade-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-on-scroll.is-visible.fade-left {
  animation: fadeInLeft 0.6s ease-out forwards;
}

.animate-on-scroll.is-visible.fade-right {
  animation: fadeInRight 0.6s ease-out forwards;
}

.animate-on-scroll.is-visible.scale-up {
  animation: scaleIn 0.5s ease-out forwards;
}

/* Stagger animation delays for grid items */
.stagger-1.is-visible { animation-delay: 0.1s; }
.stagger-2.is-visible { animation-delay: 0.2s; }
.stagger-3.is-visible { animation-delay: 0.3s; }
.stagger-4.is-visible { animation-delay: 0.4s; }

/* Hero specific animations */
.hero-content {
  animation: fadeInUp 1s ease-out forwards;
}

.hero-info-item {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.hero-info-item:nth-child(1) {
  animation-delay: 0.3s;
}

.hero-info-item:nth-child(2) {
  animation-delay: 0.5s;
}

/* Section title underline animation */
.section-title.animate-on-scroll::after {
  transform: scaleX(0);
  transition: transform 0.6s ease-out 0.3s;
}

.section-title.animate-on-scroll.is-visible::after {
  transform: scaleX(1);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
  }

  .animate-on-scroll.is-visible,
  .hero-content,
  .hero-info-item {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .section-title.animate-on-scroll::after {
    transform: scaleX(1);
    transition: none;
  }
}
