/* ===================================
   合同会社ミライクリエイト - スタイルシート
   =================================== */

/* リセットと基本設定 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary-color: #ea580c;
  --primary-dark: #9a3412;
  --primary-light: #fed7aa;
  --text-color: #374151;
  --text-light: #6b7280;
  --text-dark: #111827;
  --bg-white: #ffffff;
  --bg-gray: #f9fafb;
  --bg-gray-dark: #1f2937;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --radius: 0.5rem;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
}

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

body {
  font-family: var(--font-family);
  color: var(--text-color);
  background-color: var(--bg-gray);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* タイポグラフィ */
h1 {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-dark);
}

h2 {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-dark);
}

h3 {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-dark);
}

/* コンテナ */
.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* ===================================
   ヘッダー
   =================================== */
.header {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-dark);
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.8;
  color: var(--text-dark);
}

.logo svg {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 500;
}

@media (min-width: 640px) {
  .logo-text {
    font-size: 1.5rem;
  }
}

/* ナビゲーション */
.nav-desktop {
  display: none;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-link {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  color: var(--text-color);
  transition: all 0.2s ease;
}

.nav-link:hover {
  background-color: var(--bg-gray);
  color: var(--text-dark);
}

.nav-link.active {
  background-color: var(--primary-color);
  color: white;
}

.nav-link.active:hover {
  background-color: var(--primary-dark);
  color: white;
}

/* モバイルメニュー */
.mobile-menu-btn {
  display: flex;
  padding: 0.5rem;
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-menu-btn svg {
  width: 1.5rem;
  height: 1.5rem;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 1rem;
}

.nav-mobile.open {
  display: flex;
}

@media (min-width: 768px) {
  .nav-mobile {
    display: none !important;
  }
}

/* ===================================
   メインコンテンツ
   =================================== */
.main-content {
  flex: 1;
  padding: 2rem 0;
}

.page-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* カードスタイル */
.card {
  background-color: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.card-body {
  padding: 1.5rem;
}

@media (min-width: 640px) {
  .card-body {
    padding: 2rem;
  }
}

/* セクションタイトル */
.section-title {
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-color);
}

.section-title-center {
  text-align: center;
  margin-bottom: 2rem;
}

/* ===================================
   ヒーローセクション
   =================================== */
.hero {
  background: linear-gradient(to right, rgba(234, 88, 12, 0.9), rgba(154, 52, 18, 0.9)), url('https://images.unsplash.com/photo-1603201667106-0e3e0ae584c5?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxjcmVhdGl2ZSUyMGJ1c2luZXNzJTIwb2ZmaWNlfGVufDF8fHx8MTc3MjM4NjI0M3ww&ixlib=rb-4.1.0&q=80&w=1080');
  background-size: cover;
  background-position: center;
  color: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

@media (min-width: 640px) {
  .hero {
    padding: 3rem;
  }
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  width: 20rem;
  height: 20rem;
  background: white;
  border-radius: 50%;
  filter: blur(3rem);
  opacity: 0.1;
}

.hero::before {
  top: -5rem;
  right: -5rem;
}

.hero::after {
  bottom: -5rem;
  left: -5rem;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 48rem;
}

.hero h1 {
  font-size: 1.875rem;
  color: white;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .hero h1 {
    font-size: 2.25rem;
  }
}

.hero p {
  font-size: 1.125rem;
  color: #fed7aa;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .hero p {
    font-size: 1.25rem;
  }
}

/* ボタン */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  color: white;
  transform: scale(1.05);
}

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

.btn-white:hover {
  background-color: #fff7ed;
  color: var(--primary-color);
  transform: scale(1.05);
}

.btn-full {
  width: 100%;
}

/* ===================================
   サービスカード（グリッド）
   =================================== */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.service-card {
  background-color: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all 0.3s ease;
  display: block;
  color: inherit;
}

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

.service-card-image {
  position: relative;
  height: 12rem;
  overflow: hidden;
}

.service-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
}

.service-card-body {
  padding: 1.5rem;
}

.service-card-body h3 {
  margin-bottom: 0.5rem;
}

.service-card-body p {
  color: var(--text-light);
  font-size: 0.875rem;
}

/* 3列グリッド */
.services-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .services-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===================================
   事業内容リスト
   =================================== */
.business-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.business-item {
  display: block;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s ease;
}

.business-item:hover {
  box-shadow: var(--shadow-lg);
  transform: scale(1.02);
}

.business-item-inner {
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .business-item-inner {
    flex-direction: row;
  }
}

.business-item-image {
  width: 100%;
  height: 12rem;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .business-item-image {
    width: 12rem;
  }
}

.business-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.business-item-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.1));
}

.business-item-content {
  padding: 1.5rem;
  flex: 1;
}

.business-item-content h3 {
  margin-bottom: 0.5rem;
}

.business-item-content p {
  color: var(--text-light);
  font-size: 0.875rem;
}

/* ===================================
   会社概要テーブル
   =================================== */
.company-table {
  width: 100%;
  border-collapse: collapse;
}

.company-table th,
.company-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.75rem;
}

.company-table th {
  background-color: var(--bg-gray);
  width: 25%;
  vertical-align: top;
  font-weight: 500;
}

@media (max-width: 640px) {
  .company-table th {
    width: 35%;
  }
}

/* 事業目的リスト */
.purpose-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.purpose-list li {
  display: flex;
  gap: 0.75rem;
}

.purpose-list .bullet {
  color: var(--primary-color);
  flex-shrink: 0;
}

/* ===================================
   お問い合わせ
   =================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: transform 0.2s ease;
}

.contact-item:hover {
  transform: translateX(5px);
}

.contact-icon {
  background-color: #ffedd5;
  padding: 0.75rem;
  border-radius: var(--radius);
  flex-shrink: 0;
  transition: transform 0.6s ease;
}

.contact-item:hover .contact-icon {
  transform: rotate(360deg);
}

.contact-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--primary-color);
}

.contact-item-content h3 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.contact-item-content p {
  color: var(--text-color);
}

.contact-item-content .sub-text {
  color: var(--text-light);
  font-size: 0.875rem;
}

/* フォーム */
.contact-form-wrapper {
  background-color: var(--bg-gray);
  border-radius: var(--radius);
  padding: 1.5rem;
}

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

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.form-group label .required {
  color: #ef4444;
}

.form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.2);
}

textarea.form-input {
  resize: none;
  min-height: 8rem;
}

/* 地図セクション */
.map-container {
  width: 100%;
  height: 24rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.map-note {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: 1rem;
}

/* ===================================
   サービス詳細ページ
   =================================== */
.service-hero {
  position: relative;
  height: 16rem;
  overflow: hidden;
}

@media (min-width: 640px) {
  .service-hero {
    height: 20rem;
  }
}

.service-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  display: flex;
  align-items: flex-end;
}

.service-hero-content {
  padding: 1.5rem;
  color: white;
}

@media (min-width: 640px) {
  .service-hero-content {
    padding: 2rem;
  }
}

.service-hero-content h1 {
  font-size: 1.875rem;
  color: white;
  margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
  .service-hero-content h1 {
    font-size: 2.25rem;
  }
}

.service-hero-content p {
  font-size: 1.125rem;
  color: #e5e7eb;
}

/* CTAセクション */
.cta-section {
  background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
  color: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  text-align: center;
}

.cta-section h2 {
  color: white;
  margin-bottom: 1rem;
}

.cta-section p {
  color: #fed7aa;
  margin-bottom: 1.5rem;
}

/* 会社についてセクション */
.about-section {
  text-align: center;
}

.about-section p {
  max-width: 48rem;
  margin: 0 auto 1.5rem;
  color: var(--text-color);
}

.about-link {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: underline;
  transition: all 0.2s ease;
}

.about-link:hover {
  color: var(--primary-dark);
  transform: scale(1.05);
}

/* ===================================
   フッター
   =================================== */
.footer {
  background-color: var(--bg-gray-dark);
  color: white;
  margin-top: auto;
}

.footer-inner {
  padding: 1.5rem 0;
  text-align: center;
}

.footer p {
  font-size: 0.875rem;
  color: #d1d5db;
}

/* ===================================
   アニメーション
   =================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* アニメーション遅延 */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }
.delay-7 { transition-delay: 0.7s; }
.delay-8 { transition-delay: 0.8s; }
.delay-9 { transition-delay: 0.9s; }
.delay-10 { transition-delay: 1.0s; }

/* ===================================
   ユーティリティ
   =================================== */
.text-center {
  text-align: center;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

/* スクロールトップボタン */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top-btn:hover {
  background-color: var(--primary-dark);
  transform: scale(1.1);
}

/* フォーム送信結果メッセージ */
.form-message {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: none;
}

.form-message.success {
  background-color: #d1fae5;
  color: #065f46;
  display: block;
}

.form-message.error {
  background-color: #fee2e2;
  color: #991b1b;
  display: block;
}

/* ローディングスピナー */
.loading {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid white;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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