/* 仲介手数料基本0円セクション - 完全版 */

.fee-zero-section {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.fee-zero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.03) 0%, transparent 50%);
    z-index: 1;
}

/* エレガントヘッダー */
.elegant-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.section-badge {
    display: inline-block;
    background: linear-gradient(135deg, #E74C3C 0%, #d6521e 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 25px;
    text-transform: uppercase;
}

.main-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 20px;
    line-height: 1.3;
}

.title-highlight {
    background: linear-gradient(135deg, #E74C3C 0%, #d6521e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.title-highlight::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(135deg, #E74C3C 0%, #d6521e 100%);
    border-radius: 2px;
}

.subtitle {
    font-size: 1.2rem;
    color: #4a5568;
    font-weight: 600;
    margin-bottom: 15px;
}

.description {
    font-size: 1rem;
    color: #2c2c30;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.7;
}

.description-highlight {
    color: #E74C3C;
    font-weight: 600;
}

/* プロフェッショナル比較 */
.professional-comparison {
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.comparison-header {
    text-align: center;
    margin-bottom: 50px;
}

.comparison-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 12px;
}

.comparison-subtitle {
    font-size: 1rem;
    color: #718096;
}

.comparison-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: stretch;
    max-width: 900px;
    margin: 0 auto;
}

.comparison-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
}

.comparison-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 35px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.06);
}

.comparison-card.featured {
    border: 2px solid #E74C3C;
    background: white;
    
}

.card-label {
    font-size: 1rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 20px;
    text-align: center;
}

.featured .card-label {
    color: #E74C3C;
}

.card-image {
    width: 100%;
    margin-bottom: 20px;
    text-align: center;
}

.card-image img {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    border-radius: 8px;
}

.card-description {
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.6;
    text-align: center;
}

.highlight-text {
    color: #E74C3C;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: 600;
}

.vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vs-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E74C3C 0%, #d6521e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 6px 20px -6px rgba(102, 126, 234, 0.6);
}

/* エレガントCTA */
.elegant-cta {
    position: relative;
    z-index: 2;
}

.cta-container {
    background:#f8fafc;
    border-radius: 20px;
    padding: 50px;
    text-align: center;
    color: rgb(0, 0, 0);
    position: relative;
    overflow: hidden;
}

.cta-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    z-index: 1;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.cta-description {
    font-size: 1rem;
    margin-bottom: 35px;
    opacity: 0.9;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: #E74C3C;
    padding: 16px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px -6px rgba(0, 0, 0, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -6px rgba(0, 0, 0, 0.4);
    color: #E74C3C;
    text-decoration: none;
}

.bonus-note {
    margin-top: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* モバイルファースト レスポンシブ対応 */
@media (max-width: 992px) {
    .comparison-container {
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 500px;
    }
    
    .vs-divider {
        order: -1;
        margin-bottom: 15px;
    }
}

@media (max-width: 768px) {
    .fee-zero-section {
        padding: 50px 0;
    }
    
    .elegant-header {
        margin-bottom: 40px;
    }
    
    .section-badge {
        font-size: 0.8rem;
        padding: 8px 20px;
        margin-bottom: 20px;
    }
    
    .main-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .subtitle {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .description {
        font-size: 0.95rem;
        padding: 0 10px;
    }
    
    .professional-comparison {
        margin-bottom: 40px;
    }
    
    .comparison-header {
        margin-bottom: 35px;
    }
    
    .comparison-title {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }
    
    .comparison-subtitle {
        font-size: 0.95rem;
    }
    
    .comparison-card {
        padding: 25px;
    }
    
    .card-description {
        font-size: 0.85rem;
    }
    
    .vs-circle {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .cta-container {
        padding: 35px 25px;
    }
    
    .cta-title {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .cta-description {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }
    
    .cta-button {
        padding: 14px 30px;
        font-size: 0.95rem;
    }
    
    .bonus-note {
        font-size: 0.85rem;
        margin-top: 18px;
    }
}

@media (max-width: 576px) {
    .fee-zero-section {
        padding: 40px 0;
    }
    
    .main-title {
        font-size: 1.6rem;
    }
    
    .comparison-title {
        font-size: 1.4rem;
    }
    
    .comparison-card {
        padding: 20px;
    }
    
    .card-image img {
        max-height: 120px;
    }
    
    .cta-container {
        padding: 30px 20px;
    }
    
    .cta-title {
        font-size: 1.3rem;
    }
    
    .cta-button {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .main-title {
        font-size: 1.4rem;
    }
    
    .comparison-title {
        font-size: 1.3rem;
    }
    
    .comparison-card {
        padding: 18px;
    }
    
    .cta-container {
        padding: 25px 18px;
    }
    
    .cta-title {
        font-size: 1.2rem;
    }
}

/* CTAを薄いグレー背景に統一 */
.fee-zero-section .elegant-cta .cta-container {
  background: #f8fafc !important;
}

/* 背景の模様を消す */
.fee-zero-section .elegant-cta .cta-container::before {
  background: none !important;
}

/* セクション全体の淡いラジアル装飾も消す（必要なら） */
.fee-zero-section::before {
  background: none !important;
}
/* CTAの薄い赤い枠線を削除 */
.fee-zero-section .elegant-cta .cta-container {
  border: none !important;
  box-shadow: none !important; /* inset影の線も消す */
}
/* 「仲介手数料0円だと…」の見出しを拡大 */
.sale-benefits .benefits-title{
  font-size: clamp(2rem, 2.4vw + 1rem, 2.6rem); /* PCで約32〜41px相当 */
  line-height: 1.35;
  font-weight: 900;
  color: var(--accent); /* 今の赤 */
  margin-bottom: 0.5em;
}
.sp-only {
  display: none;
}

@media (max-width: 768px) {
  .sp-only {
    display: inline; /* 改行を有効化 */
  }
}
/* PCでは1行 */
.benefits-title .mb-line1,
.benefits-title .mb-line2 {
  display: inline;
  white-space: normal;
}

/* モバイルだけ2行にする */
@media (max-width: 768px) {
  .benefits-title { white-space: normal !important; } /* 念のため nowrap を無効化 */
  .benefits-title .mb-line1,
  .benefits-title .mb-line2 {
    display: block;     /* ←ここで改行を強制 */
  }
}


/* === EstateXのポリシー：タイプライタ表示 === */
.policy-typing{ margin-top:12px; }
.policy-typing .typing-line{
  font-size: 1.05rem;
  line-height: 1.9;
  color:#34495E;
  position: relative;
  /* 2行になる可能性があるので高さは固定しない（自然に伸びる） */
}

/* 1文字ずつフェードアップ */
.policy-typing .typing-line .ch{
  opacity: 0;
  transform: translateY(.3em);
  display: inline-block;
  transition: opacity .25s ease, transform .25s ease;
}
.policy-typing .typing-line .ch.show{
  opacity: 1;
  transform: translateY(0);
}

/* タイピング中のキャレット */
.policy-typing .typing-line.active::after{
  content: "";
  display: inline-block;
  width: 1px;
  height: 1.2em;
  margin-left: 2px;
  background: #2C3E50;
  vertical-align: -.15em;
  animation: caretBlink .9s steps(1) infinite;
}
@keyframes caretBlink{ 50%{opacity:0} }

@media (max-width: 576px){
  .policy-typing .typing-line{ font-size: 1.05rem; line-height: 1.8; }
}

/* 動きを苦手とするユーザー配慮 */
@media (prefers-reduced-motion: reduce){
  .policy-typing .typing-line .ch{ transition: none; opacity:1; transform:none; }
  .policy-typing .typing-line::after{ display:none; }
}


.policy-typing .typing-line::after { content: none !important; }

/* ここだけ調整すればOK */
.policy-typing{
  /* 行と行の"待ち時間"（ここを短くする）*/
  --gap: .0s;        /* 例: 0.15秒。長くしたければ .4s など */

  /* それぞれの行のタイピング所要時間（必要なら調整）*/
  --t1: 1.8s;         /* 1行目が打ち切るまでの時間 */
  --t2: 1.8s;         /* 2行目 */
  --t3: 1.8s;         /* 3行目 */
}

/* 各行にディレイを計算で割り当てる */
.policy-typing .typing-line:nth-child(1){ animation-delay: 0s; }
.policy-typing .typing-line:nth-child(2){ animation-delay: calc(var(--t1) + var(--gap)); }
.policy-typing .typing-line:nth-child(3){ animation-delay: calc(var(--t1) + var(--gap) + var(--t2) + var(--gap)); }

/* 既存の typing アニメを使っている前提（例） */
.policy-typing .typing-line{
  /* 例: 幅を増やすタイプライタ。ここはあなたの既存設定をそのままでOK */
  animation-name: typing;
  animation-duration: var(--t1);         /* 1行目だけは後で上書き */
  animation-timing-function: steps(40);  /* 既存値でOK */
  animation-fill-mode: both;
  white-space: nowrap;
  overflow: hidden;
}

/* 2,3行目はそれぞれの所要時間を上書き */
.policy-typing .typing-line:nth-child(2){ animation-duration: var(--t2); }
.policy-typing .typing-line:nth-child(3){ animation-duration: var(--t3); }

/* 参考のキーフレーム（既にあるなら不要） */
@keyframes typing { from { width: 0 } to { width: 100% } }

.policy-typing .typing-line{
  animation-name: typing;
  animation-duration: var(--t1);
  animation-timing-function: steps(40, end); /* ← end を付ける */
  animation-fill-mode: both;
  animation-iteration-count: 1;
  white-space: nowrap;
  overflow: hidden;
  will-change: width;
}


/* 行と行の待ち時間 & 所要時間（必要なら値だけ調整） */
.policy-typing{
  --gap: 0s;  /* 行→行の待ち時間はゼロ */
  --t1: 1.8s;
  --t2: 1.8s;
  --t3: 1.8s;
}

/* 1,2,3行の開始タイミング（連続で走る） */
.policy-typing .typing-line:nth-child(1){ animation-delay: 0s; }
.policy-typing .typing-line:nth-child(2){ animation-delay: calc(var(--t1) + var(--gap)); }
.policy-typing .typing-line:nth-child(3){ animation-delay: calc(var(--t1) + var(--gap) + var(--t2) + var(--gap)); }

/* マスクで“左→右に表示”させる。nowrap不要なのでスマホでも折り返しOK */
.policy-typing .typing-line{
  display: block;
  white-space: normal;         /* ← 折り返しを許可 */
  overflow: visible;

  /* 横方向に広がるマスク（Safari対策で -webkit- も） */
  --reveal: 0%;
  -webkit-mask-image: linear-gradient(90deg,#000 0,#000 var(--reveal),transparent var(--reveal));
          mask-image: linear-gradient(90deg,#000 0,#000 var(--reveal),transparent var(--reveal));
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;

  animation: typing-reveal var(--t1) steps(40,end) both; /* stepsでタイプ風に */
  will-change: mask-image, -webkit-mask-image;
  margin: .35rem 0;            /* 行間はお好みで */
}

/* 2,3行目の所要時間を上書き */
.policy-typing .typing-line:nth-child(2){ animation-duration: var(--t2); }
.policy-typing .typing-line:nth-child(3){ animation-duration: var(--t3); }

/* 変数 --reveal を 0%→100% に動かすだけのアニメ */
@keyframes typing-reveal{
  from{ --reveal: 0%; }
  to  { --reveal: 100%; }
}

/* 念のためのフォールバック（非常に古いブラウザ用） */
@supports not (mask-image: linear-gradient(black, black)) {
  .policy-typing .typing-line{
    overflow:hidden;
  }
}

/* === PC表示の比較レイアウトを安定化（VSを重ねる） === */
@media (min-width: 769px){
  .professional-comparison .comparison-container{
    position: relative !important;
    grid-template-columns: 1fr 1fr !important; /* 左右を常に等幅 */
    gap: 60px !important;
    max-width: 1000px;
  }
  .professional-comparison .comparison-card{ min-width: 0 !important; }
  .professional-comparison .vs-divider{
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    pointer-events: none !important;
    width: auto !important; height: auto !important;
  }
  .professional-comparison .vs-circle{
    width: 64px !important; height: 64px !important; font-size: 1.2rem !important;
  }
  .professional-comparison .card-description{
    overflow-wrap: anywhere !important; word-break: normal !important;
  }
}
