/* ============================================
   Training Page - Dark Version
   Extends new-top-style.css with dark overrides
   ============================================ */

/* ===== Dark Theme Overrides ===== */
.training-hero,
.training-hero ~ .section,
.training-hero ~ .footer,
.training-hero ~ #faq {
    --bg-color: #f7fafd;
    --bg-gray: #f7fafd;
    --white: #f7fafd;
    --text-color: #111827;
    --text-light: #6b7280;
    --primary-color: #1e4d9e;
    --primary-gradient: linear-gradient(135deg, #1e4d9e 0%, #1e4d9e 100%);
    --secondary-color: #1e4d9e;
    --accent-color: #1e4d9e;
}

/* Body & Global overrides for training page */
body:has(.training-hero) {
    background-color: #f7fafd;
    color: #111827;
}

/* Header dark override */
body:has(.training-hero) .header {
    background: transparent;
}

body:has(.training-hero) .logo {
    color: #111827;
}

body:has(.training-hero) .logo::before {
    background: #1e4d9e;
}

body:has(.training-hero) .nav__item a:not(.btn) {
    color: #6b7280;
}

body:has(.training-hero) .nav__item a:not(.btn):hover {
    color: #1e4d9e;
}

body:has(.training-hero) .nav__item .btn--primary {
    color: #ffffff !important;
}

body:has(.training-hero) .btn--primary {
    background: #1e4d9e;
    color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(30,77,158, 0.25);
}

body:has(.training-hero) .btn--primary:hover {
    color: #ffffff !important;
    box-shadow: 0 6px 30px rgba(30,77,158, 0.4);
}

/* Hero */
.training-hero {
    padding: 160px 0 80px;
    text-align: center;
    background: #f7fafd !important;
    position: relative;
}

.training-hero__label {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #1e4d9e !important;
    margin-bottom: 15px;
}

.training-hero__title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.5;
    color: #111827 !important;
    margin-bottom: 20px;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

.training-hero__title br + * {
    color: #111827 !important;
}

.training-hero h1 {
    color: #111827 !important;
}

.training-hero__highlight {
    color: #1e4d9e;
}

.training-hero__description {
    color: #6b7280;
    font-size: 1rem;
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

/* Active nav item */
.nav__active {
    color: #1e4d9e !important;
    font-weight: 600 !important;
}

/* Section description */
.section__description {
    text-align: center;
    color: #6b7280;
    max-width: 600px;
    margin: -40px auto 50px;
    font-size: 0.95rem;
}

/* ===== Section Backgrounds ===== */
.training-hero ~ .section {
    background-color: #f7fafd;
}

.training-hero ~ .section--gray {
    background-color: #f7fafd;
}

.training-hero ~ .section .section__title {
    color: #111827;
}

.training-hero ~ .section .section__subtitle {
    color: #6b7280;
}

/* ===== Problem Cards ===== */
.training-hero ~ .section .problem__card {
    background: #f7fafd;
    border: 1px solid #ffffff;
    box-shadow: none;
}

.training-hero ~ .section .problem__heading {
    color: #111827;
}

.training-hero ~ .section .problem__text {
    color: #6b7280;
}

/* ===== Difference Section ===== */
.diff__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.diff__col {
    border-radius: 20px;
    overflow: hidden;
}

.diff__header {
    padding: 18px 24px;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
}

.diff__col--ours {
    border: 1px solid rgba(30,77,158, 0.3);
    background: #f7fafd;
}

.diff__col--ours .diff__header {
    background: rgba(30,77,158, 0.06);
    color: #1e4d9e;
}

.diff__col--ours .diff__value {
    color: #1e4d9e;
    font-weight: 500;
}

.diff__col--others {
    background: #f7fafd;
    border: 1px solid #ffffff;
}

.diff__col--others .diff__header {
    background: #f7fafd;
    color: #374151;
}

.diff__col--others .diff__value {
    color: #374151;
}

.diff__body {
    padding: 24px;
}

.diff__item {
    margin-bottom: 20px;
}

.diff__item:last-child {
    margin-bottom: 0;
}

.diff__label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #374151;
    margin-bottom: 4px;
}

.diff__value {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== Curriculum Section ===== */
.curriculum__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.curriculum__card {
    background: #f7fafd;
    border: 1px solid #ffffff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: none;
    transition: transform 0.3s, border-color 0.3s;
}

.curriculum__icon {
    font-size: 2.2rem;
    margin-bottom: 15px;
    display: block;
}

.curriculum__title {
    font-size: 1.15rem;
    margin-bottom: 12px;
    color: #111827;
}

.curriculum__text {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* Badge overrides for dark */
.training-hero ~ .section .badge--blue {
    background: rgba(30,77,158, 0.12);
    color: #1e4d9e;
    border: 1px solid rgba(30,77,158, 0.15);
}

.training-hero ~ .section .badge--purple {
    background: rgba(123, 92, 255, 0.12);
    color: #1e4d9e;
    border: 1px solid rgba(123, 92, 255, 0.15);
}

/* ===== Pricing ===== */
.training-hero ~ .section .pricing__card {
    background: #f7fafd;
    border: 1px solid rgba(30,77,158, 0.35);
    box-shadow: none;
}

.training-hero ~ .section .pricing__card--featured {
    border: 2px solid #1e4d9e;
    background: linear-gradient(180deg, #f7fafd 0%, #f7fafd 100%);
    box-shadow: 0 0 40px rgba(30,77,158, 0.08);
}

.training-hero ~ .section .pricing__badge {
    background: linear-gradient(135deg, #1e4d9e 0%, #1e4d9e 100%);
}

.training-hero ~ .section .pricing__name {
    color: #111827;
}

.training-hero ~ .section .pricing__price {
    color: #111827;
}

.pricing__duration {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 20px;
}

.training-hero ~ .section .pricing__card .check-list {
    text-align: left;
    margin-bottom: 10px;
}

.training-hero ~ .section .pricing__card .check-list li {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #6b7280;
}

.training-hero ~ .section .pricing__card .check-list li::before {
    color: #1e4d9e;
}

.training-hero ~ .section .pricing__note {
    color: #374151;
    font-size: 0.8rem;
}

/* ===== Workflow ===== */
.training-hero ~ .section .step__circle {
    background: linear-gradient(135deg, #1e4d9e 0%, #1e4d9e 100%);
    box-shadow: 0 8px 15px rgba(30,77,158, 0.2);
}

.training-hero ~ .section .step__title {
    color: #111827;
}

.training-hero ~ .section .step__text {
    color: #6b7280;
}

.training-hero ~ .section .step__line {
    background: #ffffff;
}

/* ===== Instructor Section ===== */
.instructor {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
    background: #f7fafd;
    border-radius: 20px;
    padding: 40px;
    border: 1px solid #ffffff;
    box-shadow: none;
    margin-bottom: 40px;
}

.instructor__photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(30,77,158, 0.08) 0%, rgba(123, 92, 255, 0.08) 100%);
}

.instructor__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.instructor__name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.instructor__title {
    font-size: 0.9rem;
    color: #1e4d9e;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.instructor__bio {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.9;
    margin-bottom: 20px;
}

.instructor__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.instructor__badges .badge {
    font-size: 0.75rem;
    padding: 5px 12px;
}

/* ===== Credentials Grid ===== */
.credentials__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.credential__card {
    background: #f7fafd;
    border: 1px solid #ffffff;
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
}

.credential__number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e4d9e 0%, #1e4d9e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2px;
    line-height: 1.2;
}

.credential__number--sm {
    font-size: 1rem;
    line-height: 1.5;
}

.credential__unit {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 6px;
}

.credential__desc {
    font-size: 0.8rem;
    color: #374151;
    line-height: 1.4;
}

/* ===== FAQ Dark ===== */
.training-hero ~ .section .faq__item {
    background: #f7fafd;
    border: 1px solid #ffffff;
}

.training-hero ~ .section .faq__question {
    color: #111827;
}

.training-hero ~ .section .faq__icon {
    color: #1e4d9e;
}

.training-hero ~ .section .faq__answer p {
    color: #6b7280;
}

/* ===== Footer Dark ===== */
.training-hero ~ .footer {
    background: #f7fafd;
}

.training-hero ~ .footer h3 {
    color: #111827 !important;
}

.training-hero ~ .footer p {
    color: #6b7280;
}

.training-hero ~ .footer .btn--white {
    background: #ffffff;
    color: #1e4d9e;
}

.training-hero ~ .footer .btn--white:hover {
    background: #1e4d9e;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30,77,158, 0.3);
}

.training-hero ~ .footer .copyright {
    color: #374151;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    /* Dark mobile nav overlay */
    body:has(.training-hero) .nav {
        background: rgba(255,255,255, 0.98);
    }

    body:has(.training-hero) .nav__item a:not(.btn) {
        border-bottom-color: #ffffff;
    }

    body:has(.training-hero) .nav-toggle span {
        background: #6b7280;
    }

    .diff__grid {
        grid-template-columns: 1fr;
    }

    .instructor {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .instructor__photo {
        max-width: 240px;
        margin: 0 auto;
    }

    .credentials__grid {
        grid-template-columns: 1fr 1fr;
    }

    .curriculum__grid {
        grid-template-columns: 1fr;
    }

    .training-hero__title {
        font-size: 1.8rem !important;
    }
}

/* ===== light theme fixes ===== */
.btn--primary,.btn--primary:hover{color:#fff!important}
.pricing__card,.problem__card,.instructor,.difference__card,.curriculum__card,.faq__item{background:#fff!important;border:1px solid #e5e7eb!important;box-shadow:0 2px 12px rgba(0,0,0,.04)}
.pricing__card--featured{border-color:#1e4d9e!important}
.section--gray{background:#f7fafd!important}
body,.section{color:#111827}
.section__subtitle,.problem__text,.step__text,.pricing__features p,.pricing__duration,.instructor__bio,.curriculum__text,.faq__answer p,.top-hero__description,.training-hero p{color:#4b5563!important}
.pricing__features li{color:#374151!important}

/* ===== ボタンの文字色を全ページと統一（最終上書き） ===== */
html body .btn--primary, html body .btn--primary:hover, html body .nav__item .btn--primary,
html body:has(.training-hero) .btn--primary, html body:has(.training-hero) .btn--primary:hover { color:#ffffff !important; background:#1e4d9e !important; }
html body .footer .btn--white, html body .training-hero ~ .footer .btn--white { background:#ffffff !important; color:#1e4d9e !important; }
html body .footer .btn--white:hover { background:#f2f6fb !important; color:#1e4d9e !important; }

/* ===== ベンチマーク寄せ（全ページ統一）: 平らな薄グレー地・影なし角丸カード ===== */
html body .section, html body .section--gray, html body .training-hero { background:#f2f6fb !important; }
html body .problem__card, html body .pricing__card, html body .instructor, html body .difference__card, html body .curriculum__card, html body .faq__item, html body .number-card { background:#fff !important; border:0 !important; box-shadow:none !important; border-radius:20px !important; }
html body .pricing__card--featured { outline:2px solid #1e4d9e; }
html body .btn { border-radius:999px !important; }
