:root {
  --primary-color: #0a2540;
  --secondary-color: #f8fafc;
  --accent-color: #3490dc;
  --text-color: #1e293b;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.8;
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
}

/* Material Symbols Adjustments */
.material-symbols-outlined {
  font-variation-settings:
    'FILL' 0,
    'wght' 300,
    'GRAD' 0,
    'opsz' 24;
  vertical-align: middle;
}

/* Alpine.js Cloak */
[x-cloak] {
  display: none !important;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Custom Utilities for Grave Cleaning Theme */
.text-balance {
  text-wrap: balance;
}

.bg-blur {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.section-title {
  @apply text-3xl md:text-4xl font-light tracking-widest text-center mb-16;
  color: var(--primary-color);
}

.subhero {
  background-size: cover;
  background-position: center;
  position: relative;
  height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.subhero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 37, 64, 0.4);
}

/* Extracted from Templates */
/* From ./parts/index-hero.html */

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

.index-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.index-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6) contrast(1.1);
}

.index-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 37, 64, 0.4) 0%, rgba(10, 37, 64, 0.7) 100%);
  z-index: 1;
}

.index-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.index-hero__title-line {
  display: block;
  opacity: 0;
  transform: translateY(20px);
}

.index-hero__cta-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .index-hero__cta-wrapper {
    flex-direction: row;
    justify-content: center;
  }
}

/* From ./parts/index-problem.html */

.index-problem {
  background-color: #f8fafc;
  position: relative;
  overflow: hidden;
}

.index-problem .problem-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 1.5rem;
  padding: 2.5rem 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.index-problem .problem-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.05),
    0 10px 10px -5px rgba(0, 0, 0, 0.02);
  border-color: #3490dc;
}

.index-problem .icon-wrapper {
  width: 64px;
  height: 64px;
  background-color: #f1f5f9;
  border-radius: 1rem;
  display: flex !important; /* Force flex */
  align-items: center !important; /* vertical center */
  justify-content: center !important; /* horizontal center */
  margin-bottom: 1.5rem;
  color: #0a2540;
  transition: all 0.3s ease;
}

.index-problem .problem-card:hover .icon-wrapper {
  background-color: #0a2540;
  color: white;
}

/* Mobile Slider Style */
.problem-swiper {
  width: 100%;
  padding: 10px 0 50px;
  overflow: hidden !important; /* Changed from visible for calculation stability */
}

.problem-swiper .swiper-wrapper {
  display: flex !important;
  align-items: stretch !important;
  height: auto !important;
}

.problem-swiper .swiper-slide {
  height: auto !important;
  display: flex !important;
  width: 85% !important; /* Mobile width */
  opacity: 0.4;
  transition: opacity 0.3s;
  flex-shrink: 0 !important;
}

.problem-swiper .swiper-slide-active {
  opacity: 1;
}

.problem-swiper .problem-card {
  width: 100%;
  flex: 1;
  margin: 0;
}

/* PC Grid Reset */
@media (min-width: 768px) {
  .problem-swiper {
    padding: 0;
    overflow: visible !important;
    height: auto !important; /* Critical fix for the height issue */
  }

  .problem-swiper .swiper-wrapper {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem;
    transform: none !important;
    width: 100% !important;
    height: auto !important; /* Critical fix for the grid container height */
  }

  .problem-swiper .swiper-slide {
    width: 100% !important;
    opacity: 1 !important;
    margin: 0 !important;
    height: auto !important; /* Ensure slides aren't stretched */
  }
}

@media (min-width: 1024px) {
  .problem-swiper .swiper-wrapper {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

.problem-swiper .swiper-pagination-bullet {
  background: #3490dc;
  opacity: 0.3;
}

.problem-swiper .swiper-pagination-bullet-active {
  opacity: 1;
  width: 24px;
  border-radius: 4px;
}

.index-problem .card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0a2540;
  margin-bottom: 1rem;
  letter-spacing: 0.025em;
}

.index-problem .card-text {
  font-size: 0.9375rem;
  color: #475569;
  line-height: 1.7;
}

/* Credo Slider Style */
.credo-swiper {
  width: 100%;
  padding: 10px 0 50px;
  overflow: hidden !important;
}

.credo-container {
  width: 100%;
  position: relative;
}

.credo-swiper .swiper-wrapper {
  display: flex !important;
  align-items: stretch !important;
  height: auto !important;
}

.credo-swiper .swiper-slide {
  height: auto !important;
  display: flex !important;
  width: 85% !important; /* Mobile width */
  opacity: 0.4;
  transition: opacity 0.3s;
  flex-shrink: 0 !important;
}

.credo-swiper .swiper-slide-active {
  opacity: 1;
}

/* PC Grid Reset for Credo */
@media (min-width: 768px) {
  .credo-swiper {
    padding: 0;
    overflow: visible !important;
    height: auto !important;
  }

  .credo-swiper .swiper-wrapper {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem;
    transform: none !important;
    width: 100% !important;
    height: auto !important;
  }

  .credo-swiper .swiper-slide {
    width: 100% !important;
    opacity: 1 !important;
    margin: 0 !important;
    height: auto !important;
  }
}

.credo-swiper .swiper-pagination-bullet {
  background: #3490dc;
  opacity: 0.3;
}

.credo-swiper .swiper-pagination-bullet-active {
  opacity: 1;
  width: 24px;
  border-radius: 4px;
}

/* From ./parts/index-concept.html */

#index-concept .concept-card {
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#index-concept .concept-card:hover {
  transform: translateY(-8px);
}

#index-concept .text-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* From ./parts/index-service.html */

.index-service {
  background-color: #ffffff;
  position: relative;
  overflow: hidden;
}

.index-service .step-card {
  position: relative;
  transition: transform 0.3s ease;
}

.index-service .step-number {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  line-height: 1;
  color: rgba(52, 144, 220, 0.1);
  position: absolute;
  top: -1rem;
  left: -0.5rem;
  z-index: 0;
}

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

.index-service .connector-line {
  position: absolute;
  width: 2px;
  background: linear-gradient(to bottom, #3490dc 0%, #e2e8f0 100%);
  height: 100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
}

.index-service .image-wrapper {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 0.75rem;
}

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

.index-service .step-card:hover img {
  transform: scale(1.05);
}

/* From ./parts/index-price.html */

#index-price .price-card {
  transition:
    transform 0.3s ease,
    shadow 0.3s ease;
}

#index-price .price-card:hover {
  transform: translateY(-5px);
}

#index-price .plan-badge {
  background: linear-gradient(135deg, #3490dc, #0a2540);
}

#index-price .price-amount {
  font-family: 'Playfair Display', serif;
}

/* From ./parts/index-area.html */

#area .area-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

#area .area-card:hover {
  border-color: #3490dc;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(10, 37, 64, 0.1);
}

#area .city-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
}

#area .city-tag {
  font-size: 0.8rem;
  color: #64748b;
  padding: 0.25rem 0.5rem;
  background: #f1f5f9;
  border-radius: 0.25rem;
  text-align: center;
}

/* From ./parts/index-option.html */

.index-option {
  background-color: #ffffff;
  position: relative;
}

.index-option .option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.index-option .option-card {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.index-option .option-card:hover {
  border-color: #3490dc;
  box-shadow: 0 10px 30px -10px rgba(52, 144, 220, 0.1);
  transform: translateY(-2px);
}

.index-option .notice-box {
  background-color: #f8fafc;
  padding: 2rem;
  margin-top: 4rem;
}

.index-option .notice-item {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.9375rem;
  color: #475569;
  line-height: 1.6;
}

.index-option .notice-item::before {
  content: '※';
  position: absolute;
  left: 0;
  color: #0a2540;
}

/* From ./parts/index-contact.html */

.contact-section {
  position: relative;
  overflow: hidden;
}

.contact-section .contact-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
}

.contact-section .contact-method-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-section .contact-method-btn:hover {
  transform: translateY(-4px);
}

.contact-section .form-input {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: #ffffff;
  transition: border-color 0.3s;
}

.contact-section .form-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(52, 144, 220, 0.1);
}

.contact-section .line-btn {
  background-color: #06c755;
  color: white;
}

.contact-section .line-btn:hover {
  background-color: #05b34c;
}
