/* CSS Variables */
:root {
  --flow-bg: #ebeaeb;
  --flow-primary: #ff9635;
  --flow-secondary: #ea5e53;
  --flow-text-primary: #222222;
  --flow-text-secondary: #101828;
  --flow-bg-light: rgba(255, 150, 53, 0.1);
}

/* Flow Section Styles */
.flow {
  background-color: var(--flow-bg);
  padding: 8rem 1rem;
  width: 100%;
}

.flow__container {
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4rem;
  align-items: center;
}

/* Header */
.flow__header {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}

.flow__title {
  font-family: 'Avenir Next', sans-serif;
  font-size: 6rem;
  font-weight: bold;
  line-height: 1;
  color: var(--flow-text-primary);
  margin: 0;
}

.flow__subtitle {
  font-size: 2.875rem;
  font-weight: 300;
  line-height: 1.1;
  color: var(--flow-text-primary);
  margin: 0;
}

.flow__description {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--flow-text-primary);
}

.flow__description p {
  margin: 0;
  line-height: 1.6;
}

/* Cards Container */
.flow__cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  width: 100%;
  max-width: 80rem;
  justify-content: center;
}

.flow__card-wrapper {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1 1 calc(25% - 1.125rem);
  min-width: 18.75rem;
  max-width: 18.875rem;
}

/* Card */
.flow__card {
  position: relative;
  background: #ffffff;
  border: 0.078125rem solid #ffffff;
  border-radius: 1rem;
  padding: 3rem 1.5rem 1.5rem;
  box-shadow: 0 1.25rem 1.5625rem -0.3125rem rgba(0, 0, 0, 0.1), 0 0.5rem 0.625rem -0.375rem rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  min-height: 26rem;
  justify-content: flex-start;
  /* overflow: hidden; */
}

.flow__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5rem;
  background: radial-gradient(circle at center, rgba(234, 94, 83, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.flow__card-badge {
  position: absolute;
  top: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 4rem;
  height: 4rem;
  background: linear-gradient(135deg, var(--flow-primary) 0%, var(--flow-secondary) 100%);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1.5625rem 3.125rem -0.75rem rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.flow__card-number {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem;
  line-height: 1.75;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: -0.028125rem;
}

.flow__card-icon {
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.flow__card-icon-svg {
  width: 2rem;
  height: 2rem;
  display: block;
}

.flow__card-title {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.5625;
  color: var(--flow-text-secondary);
  text-align: center;
  margin: 0;
  letter-spacing: -0.028125rem;
}

.flow__card-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--flow-bg-light);
  padding: 0.5rem 0.75rem;
  border-radius: 0.625rem;
  align-self: center;
}

.flow__card-tag-dot {
  width: 0.375rem;
  height: 0.375rem;
  background: var(--flow-secondary);
  border-radius: 50%;
  flex-shrink: 0;
}

.flow__card-tag-text {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1;
  color: var(--flow-secondary);
  white-space: nowrap;
}

.flow__card-description {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.625;
  color: var(--flow-text-primary);
  text-align: left;
  margin: 0;
  letter-spacing: -0.009375rem;
}

.flow__card-list {
  list-style: none;
  padding: 1rem 0 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 0.078125rem solid #ffffff;
}

.flow__card-list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.flow__card-list-dot {
  width: 0.25rem;
  height: 0.25rem;
  background: var(--flow-primary);
  border-radius: 50%;
  flex-shrink: 0;
}

.flow__card-list-text {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1;
  color: var(--flow-text-primary);
}

.flow__card-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0.25rem;
  background: linear-gradient(90deg, var(--flow-primary) 0%, var(--flow-secondary) 100%);
  border-radius: 0 0 1rem 1rem;
}

/* Arrow */
.flow__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: linear-gradient(135deg, var(--flow-primary) 0%, var(--flow-secondary) 100%);
  border-radius: 50%;
  box-shadow: 0 0.625rem 0.9375rem -0.1875rem rgba(0, 0, 0, 0.1), 0 0.25rem 0.375rem -0.25rem rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.flow__arrow-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

/* Pagination */
.flow__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  max-width: 10.625rem;
}

.flow__pagination-line {
  height: 0.125rem;
  flex: 1;
}

.flow__pagination-line--left {
  background: linear-gradient(90deg, transparent 0%, var(--flow-primary) 100%);
}

.flow__pagination-line--right {
  background: linear-gradient(90deg, var(--flow-secondary) 0%, transparent 100%);
}

.flow__pagination-dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.flow__pagination-dot {
  border-radius: 50%;
}

.flow__pagination-dot--primary {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--flow-primary);
}

.flow__pagination-dot--secondary {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--flow-secondary);
}

.flow__pagination-dot--bar {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--flow-primary);
  border-radius: 0.5rem;
}

/* Responsive Styles - 大から小の順 */

/* Desktop (max-width: 1200px) */
@media (max-width: 1200px) {
  .flow {
    padding: 6rem 1rem;
  }

  .flow__title {
    font-size: 5rem;
  }

  .flow__subtitle {
    font-size: 2.5rem;
  }

  .flow__cards {
    max-width: 70rem;
  }
}

/* Custom Responsive: 1368px以下 */
@media (max-width: 1368px) {
  .flow__arrow {
    display: none !important;
  }
  .flow__cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 3rem 1.5rem;
    justify-content: center;
    max-width: 80rem;
    width: 100%;
  }
  .flow__card-wrapper:nth-child(odd) {
    margin: 0 0 0 auto;
  }
  .flow__card-wrapper:nth-child(even) {
    margin: 0 auto 0 0;
  }
}

/* Custom Responsive: 768px以下 */
@media (max-width: 768px) {
  .flow__card-badge {
    position: absolute;
    top: 0;
    left: 0;
    transform: none;
    margin-left: 1rem;
    margin-top: 1rem;
    z-index: 3;
  }
  .flow__card {
    padding-top: 1.5rem;
  }
  .flow__cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1.5rem;
    width: 100%;
  }
}

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .flow {
    padding: 5rem 1rem;
  }

  .flow__title {
    font-size: 4rem;
  }

  .flow__subtitle {
    font-size: 2rem;
  }

  .flow__description {
    font-size: 1.125rem;
  }
  .flow__card{
    min-height: 26rem;
  }

  .flow__card-wrapper {
    flex: 1 1 calc(50% - 0.75rem);
    max-width: 100%;
  }

  .flow__arrow {
    display: none;
  }
}

/* Large Phone to Small Tablet (max-width: 768px) */
@media (max-width: 768px) {
  .flow {
    padding: 4rem 1rem;
  }

  .flow__container {
    gap: 3rem;
  }

  .flow__title {
    font-size: 3.5rem;
  }

  .flow__subtitle {
    font-size: 1.75rem;
  }

  .flow__description {
    font-size: 1rem;
  }

  .flow__card-wrapper {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .flow__card {
    max-width: 100%;
    min-height: 22rem;
  }
  .flow__card-list {
    padding-top: 0rem;
    margin-top: auto;
    /* flex-grow: 1; */
  }
}

/* Phone Medium (max-width: 600px) */
@media (max-width: 600px) {
  .flow {
    padding: 3rem 1rem;
  }

  .flow__container {
    gap: 2.5rem;
  }

  .flow__header {
    gap: 1rem;
  }

  .flow__title {
    font-size: 3rem;
  }

  .flow__subtitle {
    font-size: 1.5rem;
  }

  .flow__description {
    font-size: 0.9375rem;
  }

  .flow__cards {
    gap: 2rem;
    display: grid;
    grid-template-columns: 1fr;
  }
  .flow__card {
    min-height: auto;
  }
}

/* Phone Small (max-width: 480px) */
@media (max-width: 480px) {
  .flow {
    padding: 2.5rem 1rem;
  }

  .flow__container {
    gap: 2rem;
  }

  .flow__title {
    font-size: 2.5rem;
  }

  .flow__subtitle {
    font-size: 1.25rem;
  }

  .flow__description {
    font-size: 0.875rem;
  }

  .flow__card {
    padding: 1rem 1rem 1rem;
  }

  .flow__card-badge {
    width: 3.5;
  }
  .flow__card-number {
    font-size: 1.125rem;
  }

  .flow__card-title {
    font-size: 1.125rem;
  }

  .flow__card-description {
    font-size: 0.8125rem;
  }

  .flow__pagination {
    max-width: 9rem;
  }
}
