/* ========== Base & Variables ========== */
:root {
  --primary: #1a365d;
  --primary-light: #2b4c7e;
  --accent: #c8102e;
  --accent-light: #e8344e;
  --gold: #b8860b;
  --gold-light: #daa520;
  --purple: #6b46c1;
  --text: #1a1a2e;
  --text-light: #4a5568;
  --bg: #ffffff;
  --bg-light: #f7f8fc;
  --bg-warm: #faf9f7;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(26, 54, 93, 0.08);
  --shadow-lg: 0 8px 40px rgba(26, 54, 93, 0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

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

/* ========== Header ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all var(--transition);
  background: transparent;
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  padding: 12px 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

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

.logo {
  display: flex;
  flex-direction: column;
}

.logo-main {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.05em;
}

.header:not(.scrolled) .logo-main {
  color: #fff;
}

.logo-sub {
  font-size: 0.7rem;
  color: var(--text-light);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.header:not(.scrolled) .logo-sub {
  color: rgba(255, 255, 255, 0.7);
}

.nav {
  display: flex;
  gap: 36px;
}

.nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding: 4px 0;
}

.header:not(.scrolled) .nav a {
  color: #fff;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--primary);
  transition: all var(--transition);
}

.header:not(.scrolled) .menu-toggle span {
  background: #fff;
}

/* ========== Hero ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #1a365d 0%, #2b4c7e 40%, #1e3a5f 100%);
  overflow: hidden;
  background-image:
    linear-gradient(135deg, rgba(26, 54, 93, 0.85) 0%, rgba(43, 76, 126, 0.8) 40%, rgba(30, 58, 95, 0.85) 100%),
    url('images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(107, 70, 193, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(184, 134, 11, 0.1) 0%, transparent 50%);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  padding: 120px 0 80px;
}

.hero-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gold-light);
  margin-bottom: 24px;
  padding: 8px 24px;
  border: 1px solid rgba(218, 165, 32, 0.4);
  border-radius: 100px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero-desc {
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 40px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 100px;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200, 16, 46, 0.3);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

/* ========== Section Common ========== */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-light);
}

/* ========== Significance ========== */
.significance {
  padding: 100px 0;
  background: var(--bg-light);
}

.significance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.significance-card {
  background: #fff;
  padding: 40px 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  position: relative;
  border-top: 4px solid var(--primary);
}

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

.significance-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(26, 54, 93, 0.08);
  line-height: 1;
  margin-bottom: 16px;
}

.significance-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.significance-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.8;
}

/* ========== About ========== */
.about {
  padding: 100px 0;
  background: var(--bg);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text p {
  color: var(--text-light);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table tr {
  border-bottom: 1px solid var(--border);
}

.info-table th,
.info-table td {
  padding: 16px 0;
  font-size: 0.9rem;
  text-align: left;
  vertical-align: top;
}

.info-table th {
  width: 100px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  padding-right: 20px;
}

.info-table td a {
  color: var(--accent);
}

.info-table td a:hover {
  text-decoration: underline;
}

/* ========== Services ========== */
.services {
  padding: 100px 0;
  background: var(--bg-light);
}

.service-category {
  margin-bottom: 64px;
}

.service-category:last-child {
  margin-bottom: 0;
}

.category-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.category-badge {
  display: inline-flex;
  padding: 6px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border-radius: 100px;
  letter-spacing: 0.05em;
}

.badge-purple {
  background: var(--purple);
}

/* Card images */
.service-card-img {
  width: calc(100% + 72px);
  height: 200px;
  object-fit: cover;
  display: block;
  margin: -36px -36px 24px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.service-card-full-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

/* Full-width service cards (for AI courses) */
.service-card-full {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  overflow: hidden;
  transition: all var(--transition);
  border-left: 5px solid var(--purple);
}

.service-card-full:hover {
  box-shadow: var(--shadow-lg);
}

.service-card-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 36px;
  background: linear-gradient(135deg, rgba(107, 70, 193, 0.04), rgba(107, 70, 193, 0.01));
  border-bottom: 1px solid var(--border);
}

.course-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 0 16px;
  font-size: 0.85rem;
  font-weight: 800;
  background: var(--purple);
  color: #fff;
  border-radius: 12px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.course-label.label-2 {
  background: var(--primary-light);
}

.course-label.label-3 {
  background: var(--gold);
}

.service-card-header h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.4;
}

.service-card-body {
  padding: 32px 36px;
}

.service-desc {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.9;
  margin-bottom: 28px;
}

.service-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meta-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.meta-value.price {
  color: var(--accent);
  font-size: 1.1rem;
}

.meta-value.price small {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-light);
}

/* Grid service cards (for DX courses) */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.service-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

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

.service-tag {
  display: inline-block;
  padding: 4px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(200, 16, 46, 0.1);
  color: var(--accent);
  border-radius: 100px;
  margin-bottom: 16px;
}

.tag-green {
  background: rgba(56, 161, 105, 0.1);
  color: #2f855a;
}

.service-card h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.service-subtitle {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 16px;
  font-weight: 500;
}

.service-desc-short {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 24px;
  line-height: 1.7;
}

.service-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

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

.detail-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
}

.detail-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.detail-value.price {
  color: var(--accent);
  font-size: 1.1rem;
}

.detail-value.price small {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-light);
}

/* Three column grid */
.services-grid.three-col {
  grid-template-columns: repeat(3, 1fr);
}

/* Tag colors */
.tag-teal {
  background: rgba(56, 178, 172, 0.1);
  color: #2c7a7b;
}

.tag-blue {
  background: rgba(49, 130, 206, 0.1);
  color: #2b6cb0;
}

.tag-orange {
  background: rgba(221, 107, 32, 0.1);
  color: #c05621;
}

.badge-teal {
  background: #2c7a7b;
}

/* Curriculum toggle & content */
.curriculum-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  margin-top: 16px;
  cursor: pointer;
  border-top: 1px solid var(--border);
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
}

.curriculum-toggle svg {
  transition: transform var(--transition);
}

.curriculum-toggle.open svg {
  transform: rotate(180deg);
}

.curriculum-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.curriculum-content.open {
  max-height: 600px;
}

.curriculum-list {
  list-style: none;
  padding: 8px 0 16px;
}

.curriculum-list li {
  font-size: 0.82rem;
  color: var(--text-light);
  padding: 5px 0 5px 16px;
  position: relative;
  line-height: 1.6;
}

.curriculum-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* ========== Contact ========== */
.contact {
  padding: 100px 0;
  background: var(--bg-warm);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

.contact-form-wrapper {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.required {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-family: inherit;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--bg-light);
  transition: border-color var(--transition);
  color: var(--text);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  transition: all var(--transition);
}

.checkbox-label:hover {
  border-color: var(--primary);
  background: rgba(26, 54, 93, 0.02);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.checkbox-label span {
  font-weight: 400;
}

.form-submit {
  text-align: center;
  margin-top: 8px;
}

.btn-submit {
  width: 100%;
  max-width: 320px;
  justify-content: center;
  padding: 16px 32px;
  font-size: 1rem;
}

.form-success {
  text-align: center;
  padding: 60px 20px;
}

.success-icon {
  color: #38a169;
  margin-bottom: 20px;
}

.form-success h3 {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.form-success p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Sidebar */
.contact-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: #fff;
  padding: 28px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.sidebar-card:hover {
  box-shadow: var(--shadow-lg);
}

.sidebar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  color: #fff;
  margin-bottom: 16px;
}

.sidebar-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.sidebar-value {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
}

a.sidebar-value:hover {
  color: var(--accent);
}

/* ========== Footer ========== */
.footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.8);
  padding: 60px 0 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: start;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer .logo-main {
  color: #fff;
  font-size: 1.1rem;
}

.footer .logo-sub {
  color: rgba(255, 255, 255, 0.5);
}

.footer-address {
  margin-top: 12px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ========== Animations ========== */
.animate {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .service-meta {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-card {
    flex: 1;
    min-width: 200px;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 0;
    transition: right var(--transition);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
  }

  .nav.active {
    right: 0;
  }

  .nav a {
    color: var(--text) !important;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .sp-hide {
    display: none;
  }

  .significance-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 24px;
  }

  .service-card-body {
    padding: 24px;
  }

  .service-meta {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-form-wrapper {
    padding: 28px;
  }

  .contact-sidebar {
    flex-direction: column;
  }

  .footer-content {
    flex-direction: column;
    gap: 28px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 16px;
  }

  .section-header h2 {
    font-size: 1.6rem;
  }

  .category-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

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

  .service-card {
    padding: 24px;
  }

  .service-card-img {
    margin: -24px -24px 20px;
    width: calc(100% + 48px);
    height: 180px;
  }
}