/* FAQセクション - faq.css */

.faq-section {
    background-color: #f9f9f9;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.faq-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='52' height='26' viewBox='0 0 52 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232c3e50' fill-opacity='0.03'%3E%3Cpath d='M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6h-2c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.faq-title {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 25px;
    font-weight: 700;
    position: relative;
    display: inline-block;
    text-align: center;
    width: 100%;
}

.faq-title::after {
    content: "";
    position: absolute;
    width: 70px;
    height: 4px;
    background: var(--accent);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.faq-list {
    margin-top: 50px;
}

.faq-item {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.03);
}

.faq-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.faq-question {
    padding: 25px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
    background: linear-gradient(to right, rgba(231, 76, 60, 0.05), rgba(255, 255, 255, 0));
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.faq-question::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--accent);
    transition: var(--transition);
}

.faq-question.active::after {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 30px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    background-color: white;
    border-top: 1px solid rgba(0,0,0,0.03);
}

.faq-answer.show {
    padding: 25px 30px;
    max-height: 2000px;
}

.faq-answer p {
    margin-bottom: 15px;
    color: var(--text);
    line-height: 1.7;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer strong {
    color: var(--accent);
}

/* 手数料比較図のスタイル */
.fee-comparison {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
    flex-wrap: wrap;
    gap: 30px;
}

.fee-comparison-item {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 25px;
    text-align: center;
    width: 48%;
    min-width: 300px;
    position: relative;
    transition: all 0.3s ease;
}

.fee-comparison-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.fee-comparison-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    color: var(--dark);
}

.fee-comparison-company .fee-comparison-title {
    color: var(--accent);
}

.fee-comparison-image {
    margin: 20px auto;
    max-width: 250px;
    width: 100%;
}

.fee-comparison-image img {
    width: 100%;
    height: auto;
    display: block;
}

.fee-comparison-description {
    margin-top: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left;
    color: var(--text-light);
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.fee-comparison-highlight {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--accent);
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 3px;
}

/* 売買手数料比較グラフのスタイル */
.sale-fee-comparison {
    margin: 30px 0;
}

.comparison-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
}

.comparison-example {
    flex: 1;
    min-width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.comparison-example:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.example-header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary-light) 100%);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 1.1rem;
}

.example-body {
    padding: 20px;
}

.example-description {
    margin-bottom: 20px;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.example-chart {
    margin-top: 20px;
    position: relative;
}

.chart-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 250px;
    margin-bottom: 40px;
}

.chart-bar {
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-label {
    margin-top: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
}

.chart-bar-visual {
    width: 100%;
    position: relative;
    background-color: #f0f2f5;
    border-radius: 6px 6px 0 0;
    height: 200px;
}

.chart-bar-fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    border-radius: 6px 6px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: height 1s ease;
}

.chart-bar-normal {
    background-color: #3498DB;
    height: 100%;
}

.chart-bar-company {
    background-color: var(--accent);
}

.chart-bar-text {
    position: absolute;
    top: -30px;
    width: 100%;
    text-align: center;
    font-weight: 700;
    color: white;
    background: #2C3E50;
    padding: 5px 0;
    border-radius: 4px;
    font-size: 0.85rem;
}

.chart-difference {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffe6e6;
    color: var(--accent);
    font-weight: 700;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 0.9rem;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.2);
    z-index: 10;
}

.example-1 .chart-bar-company {
    height: 43%;
}

.example-2 .chart-bar-company {
    height: 60%;
}

.chart-arrow {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 2px;
    background-color: #ccc;
}

.chart-arrow::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    margin-top: -4px;
    border-left: 8px solid #ccc;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .faq-section {
        padding: 70px 0;
    }
    
    .faq-title {
        font-size: 2.2rem;
    }
    
    .faq-question {
        padding: 20px 25px;
        font-size: 1.1rem;
    }
    
    .faq-answer.show {
        padding: 20px 25px;
    }
    
    .fee-comparison {
        flex-direction: column;
        align-items: center;
    }
    
    .fee-comparison-item {
        width: 100%;
        max-width: 350px;
    }
    
    .faq-answer p {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }
}

@media (max-width: 576px) {
    .faq-section {
        padding: 50px 0;
    }
    
    .faq-title {
        font-size: 1.8rem;
    }
    
    .faq-question {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .faq-answer.show {
        padding: 15px 20px;
    }
}
/* === FAQをヒーローと同じ幅に揃える（上書き） === */
#faq.faq-section .container{
  /* ヒーローと同じに。数値は common.css の .container と合わせる */
  max-width: 1200px;          /* 1100～1200px のどちらかをサイト基準に */
  padding-left: 20px;
  padding-right: 20px;
}

/* 内側の不要な最大幅を解除して100%使う */
#faq .faq-container,
#faq .faq-list,
#faq .faq-item{
  max-width: none !important;
  width: 100%;
}

/* カード内の余白だけ少し広げて読みやすく */
@media (min-width: 768px){
  #faq .faq-question,
  #faq .faq-answer{
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* ===== FAQと最後のCTAをフル幅（左右余白ゼロ）にする ===== */

/* モバイル優先。PCでもフル幅にしたい場合は @media を外してOK */
@media (max-width: 768px){

  /* セクション自体をフルブリード化（背景も端まで） */
  #faq.faq-section,
  .cta{
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  /* セクション内の .container の左右パディングを0に */
  #faq.faq-section .container,
  .cta .container{
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
  }

  /* FAQ内のラッパーも念のため余白をリセット */
  #faq .faq-container,
  #faq .faq-list{
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Q&Aの各項目が左右に寄らないよう幅を100%に */
  #faq .faq-item{
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100%;
  }
}
