/* AI Test Center page styles (follows the AI Omakase Plan / pricing page design) */

/* Smooth in-page jumps from the operation tags to their detail cards */
html {
    scroll-behavior: smooth;
}

/* Base */
section.tc-page {
    background: #fff;
    padding: 75px 0 0;
    font-family: 'Hiragino Sans', sans-serif;
}

.tc-page * {
    box-sizing: border-box;
}

/* Header */
.tc-header {
    text-align: center;
    margin-bottom: 24px;
}

.tc-eyebrow {
    font-size: 16px;
    font-weight: 600 !important;
    margin: 0 0 4px;
}

.tc-title {
    font-size: 38px;
    font-weight: 600;
    color: #000;
    line-height: 1.4;
    margin: 0 0 24px;
}

/* Line break shown only on narrow screens (toggled in the responsive rules) */
.tc-br-sp {
    display: none;
}

.tc-subtitle {
    font-size: 16px;
    color: #333;
}

.tc-subtitle p {
    margin: 40px auto 16px;
}

/* In-page nav: links to the operation detail cards below */
.tc-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 0px;
    max-width: 960px;
    margin: 0 auto;
    padding: 8px 0px;
    list-style: none;
    border-radius: 999px;
}

.tc-tags li {
    display: flex;
}

.tc-tags a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 8px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--main-color-1);
    text-decoration: none;
    transition: background 0.2s ease;
}

/* Operation icon (same asset as the detail cards below) to the left of the text */
.tc-tag-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    object-fit: contain;
    opacity: 0.9;
}

/* Down-chevron after each link (inline SVG data URI so it never depends on a file path) */
.tc-tags a::after {
    content: "";
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%233EA85B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.tc-tags a:hover {
    background: #fafafa;
}

/* Shared section */
.tc-section {
    max-width: 960px;
    margin: 100px auto;
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    text-align: center;
    line-height: 1.5;
    margin: 0 0 20px;
}

/* Flow */
.tc-flow-note {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.6;
    margin: 0 0 40px 0;
    text-wrap: pretty;
}

.tc-flow {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
}

.tc-flow-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fafafa;
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
}

.tc-flow-num {
    width: 32px;
    height: 32px;
    background: var(--main-color-1);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.tc-flow-img {
    display: block;
    width: 100%;
    max-width: 180px;
    height: auto;
    margin: 0 auto 16px;
    border-radius: 8px;
}

.tc-flow-step p {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.6;
    margin: 0;
}

/* Arrow between flow steps */
.tc-flow-arrow {
    flex-shrink: 0;
    align-self: center;
    width: 0;
    height: 0;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    border-left: 16px solid rgba(11, 163, 96, 0.54);
}

/* Highlighter-style emphasis; keep the product name from breaking mid-word */
.tc-highlight {
    background: linear-gradient(transparent 60%, rgba(11, 163, 96, 0.3) 60%);
    white-space: nowrap;
}

/* Reasons to choose */
.tc-reasons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.tc-reason-card {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    row-gap: 10px;
    align-items: center;
    border: 6px solid #fafafa;
    border-radius: 12px;
    padding: 24px;
}

.tc-reason-num {
    width: 40px;
    height: 40px;
    background: var(--main-color-1);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
}

.tc-reason-card h3 {
    grid-column: 2;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
    margin: 0;
}

/* Span the full width so the text isn't indented by the number column */
.tc-reason-card p {
    grid-column: 1 / -1;
    font-size: 15px;
    color: #666;
    line-height: 1.7;
    margin: 0;
}

/* Supported operations */
.tc-ops {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.tc-op-card {
    background: #fafafa;
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    /* Offset so the sticky header doesn't cover the card when jumped to */
    scroll-margin-top: 100px;
}

.tc-op-img {
    display: block;
    width: 42px;
    height: 42px;
    margin: 0 auto 8px;
    opacity: 1;
}

.tc-op-card h3 {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
    margin: 0 0 8px;
}

.tc-op-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin: 0;
    text-align: left;
}

.tc-ops-note {
    text-align: center;
    font-size: 15px;
    color: #333;
    margin: 32px 0 0;
}

/* CTA: reuses the global .btn.btn-wide button (same as the AI Omakase Plan page) */
.tc-cta {
    text-align: center;
    margin-top: 32px;
}

/* Q&A */
.faq-section {
    max-width: 960px;
    margin: 0 auto;
}

.faq-list {
    background: #FAFAFA;
    border-radius: 12px;
    padding: 24px 32px;
}

.faq-item {
    margin-bottom: 16px;
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-question {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
}

.faq-icon {
    flex-shrink: 0;
    width: 39px;
    padding: 4px 10px;
    background: var(--main-color-1);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-question h3 {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.faq-toggle {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: inline-block;
    transition: transform 0.3s ease;
}

.faq-item.is-open .faq-toggle {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    padding: 0 16px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease-out, opacity 0.4s ease-out, padding 0.4s ease-out, margin-top 0.4s ease-out;
}

.faq-item.is-open .faq-answer {
    max-height: 1000px;
    margin-top: 16px;
    padding: 16px;
    opacity: 1;
}

.faq-answer p {
    font-size: 16px;
    color: #333;
    line-height: 1.6;
    margin: 0 0 1.5em;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* ==========================================
   Responsive
   ========================================== */

/* PC (>= 960px): lay the 14 tags out as an even 7 × 2 grid */
@media screen and (min-width: 960px) {
    .tc-tags {
        display: grid;
        grid-template-columns: repeat(7, auto);
        justify-content: center;
        column-gap: 8px;
        row-gap: 8px;
    }

    .tc-tags li {
        justify-content: center;
    }
}

/* Tablet (<= 959px) */
@media screen and (max-width: 959px) {
    .tc-page {
        padding: 75px 0;
    }

    /* Tighten the big desktop vertical rhythm */
    .tc-section {
        margin: 64px auto;
    }

    .tc-title {
        font-size: 24px;
    }

    .tc-subtitle p {
        font-size: 14px;
    }

    .tc-br-sp {
        display: block;
    }

    .tc-tags {
        gap: 12px 24px;
        padding: 18px 16px;
    }

    .tc-ops {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Q&A */
    .faq-list {
        padding: 24px 16px;
    }

    .faq-question {
        gap: 8px;
    }

    .faq-icon {
        font-size: 16px;
    }

    .faq-question h3 {
        font-size: 14px;
    }

    .faq-answer p {
        font-size: 14px;
    }
}

/* Smartphone (<= 767px) */
@media screen and (max-width: 767px) {
    .tc-section {
        margin: 48px auto;
    }

    .section-title {
        font-size: 19px;
    }

    /* Stack the flow steps and rotate the arrows to point down */
    .tc-flow {
        flex-direction: column;
        gap: 8px;
    }

    .tc-flow-arrow {
        border-top: 16px solid rgba(11, 163, 96, 0.54);
        border-bottom: 0;
        border-left: 14px solid transparent;
        border-right: 14px solid transparent;
    }

    .tc-reasons {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tc-reason-card {
        padding: 20px 16px;
    }

    .tc-reason-card h3 {
        font-size: 16px;
    }

    .tc-ops {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Small phones (<= 480px) — prevent the nav links and headings from cramping */
@media screen and (max-width: 480px) {
    .tc-section {
        margin: 40px auto;
    }

    .tc-eyebrow {
        font-size: 13px;
    }

    .tc-title {
        font-size: 21px;
    }

    .tc-tags {
        gap: 6px 8px;
        padding: 12px 8px;
    }

    .tc-tags a {
        gap: 4px;
        padding: 6px 10px;
        font-size: 13px;
    }

    .tc-tag-icon {
        width: 16px;
        height: 16px;
    }

    .tc-tags a::after {
        width: 13px;
        height: 13px;
    }

    .tc-op-card {
        padding: 20px 16px;
    }

    .faq-list {
        padding: 20px 12px;
    }
}

/* ==========================================
   Accessibility
   ========================================== */

/* Visible keyboard focus for the interactive elements */
.tc-tags a:focus-visible,
.faq-question:focus-visible {
    outline: 2px solid var(--main-color-1);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .tc-tags a,
    .faq-toggle,
    .faq-answer {
        transition: none;
    }
}
