/* ==========================================================================
   Common Sections CSS
   FAQ・応募の流れ・お問い合わせセクション共通スタイル
   ========================================================================== */

/* ==========================================================================
   FAQ Section（よくある質問セクション）
   ========================================================================== */

.faq {
    background: var(--light-gray);
    padding: 100px 0;
}

.faq__content {
    max-width: 800px;
    margin: 0 auto;
}

.faq__list {
    margin-bottom: 3rem;
}

/* FAQ Item */
.faq-item {
    background: white;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Question Button */
.faq-item__question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.5rem 2rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-blue);
    transition: all 0.3s ease;
}

.faq-item__question:hover {
    background: var(--light-blue);
}

.faq-item.active .faq-item__question {
    background: var(--primary-blue);
    color: white;
}

/* Plus/Minus Icon */
.faq-icon {
    font-size: 1.5rem;
    font-weight: bold;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* Answer */
.faq-item__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    opacity: 0;
}

.faq-item.active .faq-item__answer {
    max-height: 300px;
    opacity: 1;
}

.faq-answer-content {
    padding: 0 2rem 2rem 2rem;
    border-top: 1px solid #eee;
    transform: translateY(-10px);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-answer-content {
    transform: translateY(0);
}

.faq-answer-content p {
    margin: 1rem 0 0 0;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Contact Card */
.faq__contact {
    text-align: center;
}

.faq-contact-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.faq-contact-card h4 {
    font-size: 1.3rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.faq-contact-card p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: var(--text-dark);
}

/* ==========================================================================
   Application Flow Section（応募・選考の流れセクション）
   ========================================================================== */

.application-flow {
    background: linear-gradient(180deg, var(--light-gray) 0%, var(--white) 100%);
    padding: 100px 0;
    position: relative;
}

.application-flow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(74, 163, 223, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(242, 160, 6, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.application-flow__content {
    position: relative;
    z-index: 2;
}

/* タイムライン（縦並び） */
.application-flow__timeline {
    max-width: 800px;
    margin: 0 auto 4rem auto;
    position: relative;
}

/* 縦のメインライン */
.application-flow__timeline::before {
    content: '';
    position: absolute;
    left: 35px;
    top: 30px;
    bottom: 30px;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-blue) 0%, var(--accent-yellow) 100%);
    border-radius: 2px;
}

.timeline-step {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2.5rem;
    padding-left: 0;
}

.timeline-step:last-child {
    margin-bottom: 0;
}

/* ステップマーカー */
.timeline-step__marker {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(74, 163, 223, 0.3);
    border: 4px solid white;
    transition: all 0.3s ease;
}

.timeline-step:hover .step-number {
    background: linear-gradient(135deg, var(--accent-yellow) 0%, #e6920a 100%);
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(242, 160, 6, 0.4);
}

/* ステップコンテンツ */
.timeline-step__content {
    flex: 1;
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    margin-top: 10px;
}

.timeline-step__content::before {
    content: '';
    position: absolute;
    top: 35px;
    left: -10px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid white;
}

.timeline-step:hover .timeline-step__content {
    transform: translateX(10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border-color: rgba(74, 163, 223, 0.2);
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.step-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 0;
    line-height: 1.3;
}

.step-duration {
    background: var(--accent-yellow);
    color: var(--primary-blue);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(242, 160, 6, 0.3);
}

.timeline-step__content p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-dark);
    margin: 0;
}

/* 注意事項（簡潔版） */
.application-flow__note {
    margin-bottom: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.note-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(74, 163, 223, 0.1);
    text-align: center;
}

.note-card__content h4 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 2rem;
}

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

.note-item {
    background: linear-gradient(135deg, rgba(74, 163, 223, 0.1) 0%, rgba(242, 160, 6, 0.1) 100%);
    padding: 1.25rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-blue);
    text-align: left;
    transition: all 0.3s ease;
}

.note-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 163, 223, 0.15);
}

.note-item strong {
    display: block;
    color: var(--primary-blue);
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.note-item span {
    color: var(--text-dark);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* CTA（簡潔版） */
.application-flow__cta {
    text-align: center;
}

.cta-content {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(74, 163, 223, 0.25);
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    min-width: 200px;
    padding: 1rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-buttons .btn--primary {
    background: var(--accent-yellow);
    border: 2px solid var(--accent-yellow);
    color: var(--primary-blue);
}

.cta-buttons .btn--primary:hover {
    background: #e6920a;
    border-color: #e6920a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(242, 160, 6, 0.4);
}

.cta-buttons .btn--secondary {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.cta-buttons .btn--secondary:hover {
    background: white;
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Contact Application Section（求人へのご応募・お問い合わせセクション）
   ========================================================================== */

.contact-application {
    background: linear-gradient(180deg, var(--white) 0%, var(--light-gray) 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.contact-application::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(74, 163, 223, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(242, 160, 6, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.contact-application__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto 3rem auto;
    position: relative;
    z-index: 2;
}

/* Contact Method Cards */
.contact-method {
    position: relative;
}

.contact-method__card {
    background: white;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.4s ease;
    border: 2px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.contact-method__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-blue);
}

.contact-method__header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.contact-method__header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.contact-method__content {
    padding: 2.5rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Contact Buttons */
.contact-method__button {
    margin-bottom: 1.5rem;
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    min-width: 280px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.contact-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.contact-btn:hover::before {
    left: 100%;
}

.contact-btn--email {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    border: 2px solid var(--primary-blue);
}

.contact-btn--email:hover {
    background: linear-gradient(135deg, var(--accent-yellow) 0%, #e6920a 100%);
    border-color: var(--accent-yellow);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(242, 160, 6, 0.3);
}

.contact-btn--phone {
    background: linear-gradient(135deg, var(--accent-yellow) 0%, #e6920a 100%);
    color: white;
    border: 2px solid var(--accent-yellow);
}

.contact-btn--phone:hover {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    border-color: var(--primary-blue);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(74, 163, 223, 0.3);
}

.contact-btn__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-btn__icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
}

/* Contact Note */
.contact-method__note {
    text-align: center;
}

.contact-method__note p {
    margin: 0;
    font-style: italic;
}

/* Message Card */
.contact-application__message {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.message-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(74, 163, 223, 0.1);
    position: relative;
    overflow: hidden;
}

.message-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--accent-yellow) 100%);
}

.message-card p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-dark);
    margin: 0;
}

/* ==========================================================================
   Responsive Design（レスポンシブ対応）
   ========================================================================== */

@media (max-width: 768px) {
    /* FAQ Section */
    .faq {
        padding: 80px 0;
    }

    .faq__content {
        margin: 0 1rem;
    }

    .faq-item__question {
        padding: 1.25rem 1.5rem;
        font-size: 1rem;
    }

    .faq-answer-content {
        padding: 0 1.5rem 1.5rem 1.5rem;
    }

    .faq-contact-card {
        padding: 2rem 1.5rem;
    }

    /* Application Flow Section */
    .application-flow {
        padding: 80px 0;
    }
    
    .application-flow__timeline::before {
        left: 25px;
    }
    
    .timeline-step {
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }
    
    .timeline-step__content {
        padding: 1.5rem;
        margin-top: 0;
    }
    
    .timeline-step__content::before {
        top: 20px;
        left: -8px;
        border-right-width: 8px;
        border-top-width: 8px;
        border-bottom-width: 8px;
    }
    
    .step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .step-header h3 {
        font-size: 1.2rem;
    }
    
    .timeline-step__content p {
        font-size: 0.95rem;
    }
    
    .note-card {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }
    
    .note-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .cta-content {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }
    
    .cta-content h3 {
        font-size: 1.3rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        min-width: 220px;
    }
    
    .timeline-step:hover .timeline-step__content {
        transform: translateX(5px);
    }

    /* Contact Application Section */
    .contact-application {
        padding: 80px 0;
    }

    .contact-application__content {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin: 0 1rem 2rem 1rem;
    }

    .contact-method__card {
        margin: 0;
    }

    .contact-method__header {
        padding: 1.5rem;
    }

    .contact-method__header h3 {
        font-size: 1.2rem;
    }

    .contact-method__content {
        padding: 2rem 1.5rem;
    }

    .contact-btn {
        min-width: 250px;
        padding: 1.25rem 1.75rem;
        font-size: 1rem;
    }

    .message-card {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    .message-card p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    /* FAQ Section */
    .faq__content {
        margin: 0;
    }

    .faq-item__question {
        padding: 1rem 1.25rem;
        font-size: 0.95rem;
    }

    .faq-answer-content {
        padding: 0 1.25rem 1.25rem 1.25rem;
    }

    .faq-answer-content p {
        font-size: 0.9rem;
    }

    .faq-contact-card {
        padding: 1.5rem 1.25rem;
    }

    .faq-contact-card h4 {
        font-size: 1.2rem;
    }

    /* Application Flow Section */
    .application-flow__timeline::before {
        left: 20px;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .timeline-step {
        gap: 1rem;
    }
    
    .timeline-step__content {
        padding: 1.25rem;
    }
    
    .step-header h3 {
        font-size: 1.1rem;
    }
    
    .step-duration {
        font-size: 0.8rem;
        padding: 0.3rem 0.8rem;
    }
    
    .timeline-step__content p {
        font-size: 0.9rem;
    }
    
    .note-card {
        padding: 1.5rem 1rem;
        margin: 0;
    }
    
    .note-card__content h4 {
        font-size: 1.2rem;
    }
    
    .note-item {
        padding: 1rem;
    }
    
    .cta-content {
        padding: 1.5rem 1rem;
        margin: 0;
    }
    
    .cta-content h3 {
        font-size: 1.2rem;
    }
    
    .cta-buttons .btn {
        min-width: 180px;
        padding: 0.875rem 1.25rem;
    }

    /* Contact Application Section */
    .contact-application__content {
        margin: 0 0 2rem 0;
    }

    .contact-method__header {
        padding: 1.25rem;
    }

    .contact-method__header h3 {
        font-size: 1.1rem;
    }

    .contact-method__content {
        padding: 1.5rem 1.25rem;
    }

    .contact-btn {
        min-width: 220px;
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .contact-btn__icon {
        order: -1;
    }

    .message-card {
        padding: 1.25rem;
        margin: 0;
    }

    .message-card p {
        font-size: 0.95rem;
    }
}

/* ==========================================================================
   JavaScript用クラス
   ========================================================================== */

/* FAQ JavaScript interactions */
.faq-item.active .faq-item__answer {
    transition: max-height 0.4s ease, opacity 0.3s ease 0.1s;
}

/* アニメーション効果 */
@keyframes contact-slide-in {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-method {
    animation: contact-slide-in 0.6s ease-out both;
    animation-delay: calc(var(--contact-index, 0) * 0.2s);
}

.contact-method:nth-child(1) {
    --contact-index: 0;
}

.contact-method:nth-child(2) {
    --contact-index: 1;
}

/* Timeline animation */
@keyframes timeline-fade-in {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-step {
    animation: timeline-fade-in 0.6s ease-out both;
    animation-delay: calc(var(--step-index, 0) * 0.15s);
}

.timeline-step:nth-child(1) { --step-index: 0; }
.timeline-step:nth-child(2) { --step-index: 1; }
.timeline-step:nth-child(3) { --step-index: 2; }
.timeline-step:nth-child(4) { --step-index: 3; }
.timeline-step:nth-child(5) { --step-index: 4; }
.timeline-step:nth-child(6) { --step-index: 5; }
.timeline-step:nth-child(7) { --step-index: 6; }

/* ==========================================================================
   Accessibility & Reduced Motion
   ========================================================================== */

/* アクセシビリティ対応 */
.faq-item__question:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .faq-item__answer,
    .faq-icon,
    .timeline-step,
    .contact-method {
        transition: none !important;
        animation: none !important;
    }
    
    .timeline-step:hover .step-number {
        transform: none !important;
    }
    
    .timeline-step:hover .timeline-step__content {
        transform: none !important;
    }
    
    .note-item:hover {
        transform: none !important;
    }
    
    .cta-buttons .btn:hover,
    .contact-btn:hover {
        transform: none !important;
    }
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    .faq-item,
    .timeline-step__content,
    .note-card,
    .contact-method__card {
        border: 2px solid var(--text-dark);
    }
    
    .faq-item__question,
    .contact-btn {
        border: 1px solid transparent;
    }
    
    .faq-item__question:focus,
    .contact-btn:focus {
        border-color: black;
        outline: 2px solid black;
    }
}