/* CareerInTrades Career-State UI Upgrade V3.0
   Template: /career/{career}/{state}/
   --------------------------------------------------------- */

.career-state-single {
    --cs-primary: #2563eb;
    --cs-primary-dark: #1e3a8a;
    --cs-ink: #0f172a;
    --cs-copy: #475569;
    --cs-muted: #64748b;
    --cs-border: #e2e8f0;
    --cs-soft: #f8fafc;
    --cs-blue-soft: #eff6ff;
    background: var(--cs-soft);
    color: var(--cs-copy);
}

.career-state-single *,
.career-state-single *::before,
.career-state-single *::after {
    box-sizing: border-box;
}

.career-state-single .career-container {
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
    padding: 48px 24px;
}

.career-state-single h1,
.career-state-single h2,
.career-state-single h3 {
    color: var(--cs-ink);
}

.career-state-single h1 {
    margin: 10px 0 18px;
    font-size: clamp(34px, 4vw, 42px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.025em;
}

.career-state-single h2 {
    margin: 50px 0 16px;
    font-size: clamp(26px, 3vw, 30px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.018em;
    scroll-margin-top: 28px;
}

.career-state-single h3 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
}

.career-state-single p,
.career-state-single li {
    font-size: 16px;
    line-height: 1.7;
}

/* Breadcrumb */
.career-state-single > .cit-breadcrumbs {
    width: calc(100% - 48px);
    max-width: 1132px;
    margin: 0 auto;
    padding: 18px 0;
    color: var(--cs-muted);
    font-size: 13px;
}

.career-state-single > .cit-breadcrumbs a {
    color: #1d4ed8;
    text-decoration: none;
}

/* Career + state profile header */
.career-state-single .career-hero {
    background: linear-gradient(120deg, #172f6f 0%, #1d4ed8 72%, #2563eb 100%);
}

.career-state-single .career-hero .career-container {
    padding-top: 54px;
    padding-bottom: 54px;
}

.career-profile-header-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
    gap: 54px;
    align-items: center;
}

.career-profile-eyebrow,
.career-section-kicker {
    display: block;
    color: var(--cs-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.09em;
    line-height: 1.45;
}

.career-profile-eyebrow {
    color: #bfdbfe;
}

.career-state-single .career-hero h1,
.career-state-single .career-hero p {
    color: #ffffff;
}

.career-state-single .career-hero-subtitle {
    max-width: 760px;
    margin: 0;
    color: #dbeafe !important;
    font-size: 17px;
    line-height: 1.7;
}

.career-review-meta {
    margin: 18px 0 0;
    color: #bfdbfe !important;
    font-size: 13px !important;
}

.career-review-meta time,
.career-review-meta a {
    color: #ffffff;
    font-weight: 650;
}

.career-profile-meta {
    padding: 21px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 9px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.2);
}

.career-profile-meta > span {
    display: block;
    margin-bottom: 12px;
    color: var(--cs-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.career-profile-meta dl {
    margin: 0;
}

.career-profile-meta dl div {
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid var(--cs-border);
}

.career-profile-meta dt,
.career-profile-meta dd {
    margin: 0;
    font-size: 13px;
}

.career-profile-meta dt {
    color: var(--cs-muted);
}

.career-profile-meta dd {
    color: var(--cs-ink);
    font-weight: 750;
    text-align: right;
}

.career-snapshot-heading {
    margin: 42px 0 14px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 750;
}

.career-state-single .career-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.career-state-single .career-stat {
    min-width: 0;
    min-height: 126px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 8px;
    background: #ffffff;
}

.career-state-single .career-stat span,
.career-state-single .career-stat strong {
    display: block;
}

.career-state-single .career-stat span {
    margin-bottom: 9px;
    color: var(--cs-muted);
    font-size: 13px;
    font-weight: 650;
}

.career-state-single .career-stat strong {
    overflow-wrap: anywhere;
    color: var(--cs-ink);
    font-size: clamp(21px, 2.4vw, 28px);
    font-weight: 750;
    line-height: 1.2;
}

/* Career database navigation */
.career-state-single .cit-toc-container {
    padding-top: 34px;
    padding-bottom: 0;
}

.career-state-single .cit-toc {
    padding: 22px 24px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #ffffff;
}

.career-state-single .cit-toc summary {
    color: var(--cs-ink);
    font-size: 18px;
    font-weight: 750;
}

.career-state-single .cit-toc ol {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 22px;
    margin-top: 18px;
}

.career-state-single .cit-toc a {
    color: #1e40af;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

/* Profile content */
.career-state-profile-content {
    padding-top: 46px !important;
    padding-bottom: 70px !important;
}

.career-state-profile-content > h2:first-child {
    margin-top: 0;
}

.career-state-profile-content > p,
.career-state-profile-content > .cit-training-requirements,
.career-state-profile-content > .salary-comparison-note {
    max-width: 1000px;
}

.career-state-profile-content > p {
    margin-top: 0;
}

.career-section-kicker {
    margin-top: 52px;
    margin-bottom: -42px;
}

.career-section-kicker + h2 {
    margin-top: 50px;
}

/* Quick facts */
.career-quick-facts {
    max-width: 1000px;
    margin: 28px 0 8px;
    overflow: hidden;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #ffffff;
}

.career-quick-facts-heading {
    padding: 16px 20px;
    border-bottom: 1px solid #dbeafe;
    background: var(--cs-blue-soft);
    color: var(--cs-ink);
    font-size: 17px;
    font-weight: 750;
}

.career-quick-facts dl {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
}

.career-quick-facts dl div {
    min-width: 0;
    padding: 18px 20px;
    border-right: 1px solid var(--cs-border);
}

.career-quick-facts dl div:last-child {
    border-right: 0;
}

.career-quick-facts dt,
.career-quick-facts dd {
    margin: 0;
}

.career-quick-facts dt {
    margin-bottom: 7px;
    color: var(--cs-muted);
    font-size: 12px;
    font-weight: 650;
}

.career-quick-facts dd {
    color: var(--cs-ink);
    font-size: 16px;
    font-weight: 750;
}

/* Salary dashboard */
.career-state-single .career-salary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    max-width: 1000px;
    margin: 22px 0 16px;
}

.career-state-single .career-salary-grid .career-stat {
    min-height: 132px;
    border-color: var(--cs-border);
    background: #ffffff;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.career-state-single .career-salary-grid .career-stat:hover {
    transform: translateY(-2px);
    border-color: #bfdbfe;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.career-state-single .career-salary-grid .career-stat-national {
    border-color: #93c5fd;
    background: var(--cs-blue-soft);
}

.salary-comparison-note {
    padding: 17px 19px;
    border-left: 3px solid var(--cs-primary);
    background: #f1f5f9;
}

/* Licensing authority trust module */
.career-state-single .cit-section {
    width: 100%;
    max-width: 1000px;
    margin: 0;
}

.career-state-single .cit-license-authority {
    width: 100%;
    max-width: 1000px;
    margin: 20px 0 14px;
    padding: 26px;
    border: 1px solid #bfdbfe;
    border-left: 4px solid var(--cs-primary);
    border-radius: 8px;
    background: linear-gradient(90deg, var(--cs-blue-soft) 0, #ffffff 42%);
}

.cit-license-authority h3 {
    font-size: 22px;
}

.authority-website-link {
    display: inline-block;
    max-width: 100%;
    margin-top: 4px;
    overflow-wrap: anywhere;
    color: var(--cs-primary);
    font-weight: 700;
}

.cit-license-list {
    margin: 14px 0 20px;
    padding: 0;
    list-style: none;
}

.cit-license-list li {
    position: relative;
    margin: 7px 0;
    padding-left: 25px;
}

.cit-license-list li::before {
    position: absolute;
    top: 0.12em;
    left: 0;
    color: var(--cs-primary);
    font-weight: 800;
    content: "✓";
}

/* Training */
.career-training-pathways {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    max-width: 1000px;
    margin: 20px 0;
}

.career-training-pathways div {
    display: flex;
    min-height: 86px;
    padding: 18px;
    gap: 13px;
    align-items: center;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    background: #ffffff;
}

.career-training-pathways span {
    display: inline-grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 50%;
    background: var(--cs-primary);
    color: #ffffff;
    font-size: 13px;
    font-weight: 750;
}

.career-training-pathways strong {
    color: var(--cs-ink);
    font-size: 14px;
}

.cit-training-requirements {
    width: 100%;
    max-width: 1000px;
    padding: 24px 26px;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    background: #ffffff;
}

.cit-training-requirements h3 {
    margin-top: 22px;
}

.cit-training-requirements h3:first-child,
.cit-training-requirements p:first-child {
    margin-top: 0;
}

/* Providers table */
.career-state-table-scroll {
    width: 100%;
    max-width: 1000px;
    margin: 20px 0 16px;
    overflow-x: auto;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    background: #ffffff;
    -webkit-overflow-scrolling: touch;
}

.career-state-table-scroll:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.3);
    outline-offset: 3px;
}

.career-state-single .career-state-table-scroll > .career-state-table {
    display: table !important;
    width: 100% !important;
    min-width: 680px;
    max-width: none !important;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    table-layout: fixed;
}

.career-state-single .career-state-table th:first-child {
    width: 45%;
}

.career-state-single .career-state-table th:nth-child(2) {
    width: 25%;
}

.career-state-single .career-state-table th:nth-child(3) {
    width: 30%;
}

.career-state-table th,
.career-state-table td {
    padding: 16px 18px;
    border: 0;
    border-bottom: 1px solid var(--cs-border);
    text-align: left;
    vertical-align: middle;
}

.career-state-table th {
    background: #f1f5f9;
    color: var(--cs-ink);
    font-size: 14px;
    font-weight: 750;
}

.career-state-table tbody tr:last-child td {
    border-bottom: 0;
}

.career-state-table a {
    color: var(--cs-primary);
    font-weight: 700;
}

.career-provider-note {
    max-width: 1000px;
    color: var(--cs-muted);
    font-size: 14px;
}

/* Apprenticeship programs */
.career-state-single .cit-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    max-width: 1000px;
    margin-top: 20px;
}

.cit-apprenticeship-card {
    display: flex;
    min-width: 0;
    min-height: 190px;
    padding: 22px;
    flex-direction: column;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    background: #ffffff;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cit-apprenticeship-card:hover {
    transform: translateY(-2px);
    border-color: #bfdbfe;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.cit-apprenticeship-card p:last-child {
    margin-top: auto;
}

.cit-apprenticeship-card a {
    color: var(--cs-primary);
    font-weight: 700;
}

/* Job outlook */
.career-outlook-highlight {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    max-width: 1000px;
    margin: 20px 0;
}

.career-outlook-highlight div {
    min-height: 126px;
    padding: 21px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: var(--cs-blue-soft);
}

.career-outlook-highlight strong,
.career-outlook-highlight span {
    display: block;
}

.career-outlook-highlight strong {
    color: var(--cs-primary-dark);
    font-size: 26px;
    line-height: 1.2;
}

.career-outlook-highlight span {
    margin-top: 9px;
    color: var(--cs-muted);
    font-size: 13px;
    font-weight: 650;
}

/* FAQ */
.career-state-single .career-faq-list {
    display: grid;
    gap: 12px;
    max-width: 1050px;
}

.career-state-single .career-faq-item {
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    background: #ffffff;
}

.career-state-single .career-faq-item summary {
    position: relative;
    padding: 20px 54px 20px 22px;
    color: var(--cs-ink);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.career-state-single .career-faq-item summary::-webkit-details-marker {
    display: none;
}

.career-state-single .career-faq-item summary::after {
    position: absolute;
    top: 50%;
    right: 22px;
    color: var(--cs-primary);
    font-size: 22px;
    font-weight: 400;
    content: "+";
    transform: translateY(-50%);
}

.career-state-single .career-faq-item[open] summary::after {
    content: "−";
}

.career-state-single .career-faq-item > p {
    max-width: none;
    margin: 0;
    padding: 18px 22px 21px;
    border-top: 1px solid #f1f5f9;
}

/* Sources */
.career-sources {
    max-width: 1050px;
    margin-top: 18px;
    padding: 24px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #ffffff;
}

.career-sources-intro {
    margin-top: 0;
    color: var(--cs-muted);
}

.career-sources ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.career-sources li {
    position: relative;
    min-width: 0;
    padding: 16px 16px 16px 42px;
    overflow-wrap: anywhere;
    border: 1px solid var(--cs-border);
    border-radius: 7px;
    background: var(--cs-soft);
    font-size: 14px;
}

.career-sources li::before {
    position: absolute;
    top: 17px;
    left: 17px;
    color: var(--cs-primary);
    font-weight: 800;
    content: "✓";
}

.career-sources cite {
    color: var(--cs-ink);
    font-style: normal;
    font-weight: 700;
}

.career-sources a {
    color: var(--cs-primary);
    font-weight: 650;
}

/* Related careers and other states */
.career-state-single .related-career-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.career-state-single .related-career-card {
    display: flex;
    min-width: 0;
    min-height: 150px;
    padding: 19px;
    flex-direction: column;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--cs-ink);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.career-state-single .related-career-card:hover {
    transform: translateY(-2px);
    border-color: #bfdbfe;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.career-state-single .related-career-title {
    margin: 0 0 13px;
    color: var(--cs-ink);
    font-size: 17px;
    font-weight: 750;
    line-height: 1.4;
}

.career-state-single .related-career-meta {
    margin-top: 3px;
    color: var(--cs-muted);
    font-size: 13px;
}

.related-career-action {
    margin-top: auto;
    padding-top: 14px;
    color: var(--cs-primary);
    font-size: 13px;
    font-weight: 750;
}

.state-guides-all {
    max-width: 1000px;
    margin-top: 18px;
    text-align: center;
}

.state-guides-all a {
    display: inline-flex;
    padding: 10px 17px;
    gap: 7px;
    align-items: center;
    border-radius: 6px;
    background: var(--cs-primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.state-guides-all a:hover {
    background: #1d4ed8;
    color: #ffffff;
}

@media (max-width: 1024px) {
    .career-profile-header-grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
        gap: 32px;
    }

    .career-state-single .career-stats,
    .career-quick-facts dl,
    .career-state-single .cit-toc ol,
    .career-state-single .career-salary-grid,
    .career-training-pathways,
    .career-state-single .cit-card-grid,
    .career-outlook-highlight,
    .career-sources ol,
    .career-state-single .related-career-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .career-quick-facts dl div:nth-child(2) {
        border-right: 0;
    }

    .career-quick-facts dl div:nth-child(-n+2) {
        border-bottom: 1px solid var(--cs-border);
    }
}

@media (max-width: 768px) {
    .career-state-single .career-container {
        padding-right: 18px;
        padding-left: 18px;
    }

    .career-state-single > .cit-breadcrumbs {
        width: calc(100% - 36px);
    }

    .career-profile-header-grid {
        grid-template-columns: 1fr;
    }

    .career-state-single .career-hero .career-container {
        padding-top: 42px;
        padding-bottom: 42px;
    }

    .career-state-single .career-stats,
    .career-quick-facts dl,
    .career-state-single .cit-toc ol,
    .career-state-single .career-salary-grid,
    .career-training-pathways,
    .career-state-single .cit-card-grid,
    .career-outlook-highlight,
    .career-sources ol,
    .career-state-single .related-career-grid {
        grid-template-columns: 1fr;
    }

    .career-state-single .career-stat,
    .career-outlook-highlight div,
    .cit-apprenticeship-card {
        min-height: 0;
    }

    .career-quick-facts dl div,
    .career-quick-facts dl div:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid var(--cs-border);
    }

    .career-quick-facts dl div:last-child {
        border-bottom: 0;
    }

    .career-state-table {
        font-size: 14px;
    }

    .cit-license-authority,
    .cit-training-requirements,
    .career-sources {
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .career-state-single .career-salary-grid .career-stat,
    .career-state-single .cit-apprenticeship-card,
    .career-state-single .related-career-card {
        transition: none;
    }
}
