/* CareerInTrades State Detail UI Upgrade V2.1
   Template: /state/{state}/
   --------------------------------------------------------- */

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

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

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

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

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

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

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

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

/* State data hero */
.career-state-archive .career-state-hero {
    margin: 0;
    background: linear-gradient(120deg, #172f6f 0%, #1d4ed8 70%, #2563eb 100%);
}

.career-state-archive .career-state-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.7fr);
    gap: 56px;
    align-items: center;
    min-height: 390px;
    padding-top: 56px;
    padding-bottom: 56px;
}

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

.career-state-archive .career-state-hero p {
    max-width: 720px;
    margin: 0;
    color: #dbeafe;
    font-size: 17px;
}

.state-eyebrow,
.state-panel-label,
.state-data-label {
    display: block;
    color: var(--state-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.09em;
    line-height: 1.4;
}

.career-state-hero .state-eyebrow {
    color: #bfdbfe;
}

.state-hero-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.state-hero-topics span {
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 13px;
    font-weight: 650;
}

.state-hero-data-card {
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
}

.state-hero-data-card .state-data-label {
    margin-bottom: 14px;
}

.state-hero-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--state-border);
    border-radius: 7px;
    overflow: hidden;
}

.state-hero-metrics div {
    min-width: 0;
    padding: 14px;
}

.state-hero-metrics div:nth-child(odd) {
    border-right: 1px solid var(--state-border);
}

.state-hero-metrics div:nth-child(-n+2) {
    border-bottom: 1px solid var(--state-border);
}

.state-hero-metrics strong,
.state-hero-metrics span {
    display: block;
}

.state-hero-metrics strong {
    color: var(--state-primary);
    font-size: 24px;
    line-height: 1.15;
}

.state-hero-metrics span {
    margin-top: 5px;
    color: var(--state-muted);
    font-size: 11px;
}

.career-state-archive .state-hero-data-card p {
    margin: 14px 0 0;
    color: var(--state-muted);
    font-size: 12px;
    line-height: 1.55;
}

/* State snapshot */
.state-data-snapshot {
    background: var(--state-soft);
}

.state-data-snapshot .career-container {
    padding-top: 42px;
    padding-bottom: 42px;
}

.state-section-heading {
    margin-bottom: 22px;
}

.state-section-heading h2 {
    margin-top: 7px;
}

.state-snapshot-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.state-snapshot-card {
    position: relative;
    min-height: 205px;
    padding: 22px 22px 20px;
    border: 1px solid var(--state-border);
    border-radius: 8px;
    background: #ffffff;
}

.state-snapshot-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    margin-bottom: 15px;
    place-items: center;
    border-radius: 7px;
    background: var(--state-blue-soft);
    color: var(--state-primary);
    font-size: 12px;
    font-weight: 800;
}

.state-snapshot-card ul {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.state-snapshot-card li {
    position: relative;
    padding-left: 15px;
    color: var(--state-muted);
    font-size: 14px;
    line-height: 1.65;
}

.state-snapshot-card li::before {
    position: absolute;
    top: 0.72em;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--state-primary);
    content: "";
}

/* Database navigation */
.career-state-archive .cit-toc-container {
    padding-top: 0;
    padding-bottom: 40px;
}

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

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

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

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

/* Featured careers and career guide directory */
.career-state-list {
    background: #ffffff;
}

.career-state-list .career-container {
    padding-top: 52px;
    padding-bottom: 56px;
}

.state-section-description {
    max-width: 760px;
    margin: -4px 0 22px;
    color: var(--state-muted);
}

.featured-grid,
.state-careers-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 48px;
}

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

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

.state-career-card h3 a {
    color: var(--state-ink);
    text-decoration: none;
}

.state-career-facts {
    margin: 18px 0 20px;
}

.state-career-facts div {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 8px 0;
    border-top: 1px solid #f1f5f9;
}

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

.state-career-facts dt {
    color: var(--state-muted);
}

.state-career-facts dd {
    color: var(--state-ink);
    font-weight: 700;
    text-align: right;
}

.state-career-card .career-button {
    margin-top: auto;
    padding: 0;
    align-self: flex-start;
    background: transparent;
    color: var(--state-primary);
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
}

.state-career-card .career-button:hover {
    background: transparent;
    color: #1d4ed8;
}

.all-careers-list {
    width: 100%;
}

.all-careers-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.state-directory-card {
    display: flex;
    min-width: 0;
    min-height: 188px;
    padding: 20px;
    flex-direction: column;
    border: 1px solid var(--state-border);
    border-radius: 8px;
    background: var(--state-soft);
    color: var(--state-ink);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.state-directory-card strong {
    font-size: 18px;
}

.state-directory-card > span {
    margin-top: 5px;
    color: var(--state-muted);
    font-size: 13px;
}

.state-directory-card small {
    margin-top: 18px;
    color: #475569;
    font-size: 12px;
}

.state-directory-card b {
    margin-top: auto;
    color: var(--state-primary);
    font-size: 13px;
}

/* Editorial data sections */
.state-hub-content {
    background: var(--state-soft);
}

.state-hub-content .career-container {
    display: grid;
    gap: 24px;
    padding-top: 56px;
    padding-bottom: 64px;
}

.state-hub-content .career-container > h2,
.state-hub-content .career-container > p,
.state-hub-content .career-container > .cit-state-grid,
.state-hub-content .career-container > .state-industries-grid,
.state-hub-content .career-container > .major-cities-grid,
.state-hub-content .career-container > .career-faq-list,
.state-hub-content .career-container > .related-career-grid {
    margin-top: 0;
    margin-bottom: 0;
}

.state-hub-content .career-container > h2:not(:first-child) {
    margin-top: 30px;
}

.state-hub-content p {
    max-width: 1000px;
    margin-top: 0;
}

.state-content-panel {
    max-width: 1050px;
    padding: 28px 30px;
    border: 1px solid var(--state-border);
    border-radius: 8px;
    background: #ffffff;
}

.state-content-panel.state-panel-accent {
    border-left: 4px solid var(--state-primary);
    background: linear-gradient(90deg, #eff6ff 0, #ffffff 38%);
}

.state-content-panel h2 {
    margin-top: 6px;
}

.state-content-panel p:last-child {
    margin-bottom: 0;
}

.state-panel-label {
    margin-bottom: 7px;
}

.cit-state-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.cit-state-card {
    display: flex;
    min-height: 58px;
    padding: 14px 16px;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--state-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--state-ink);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.cit-state-card:hover {
    border-color: #bfdbfe;
    background: var(--state-blue-soft);
}

.growth-indicator {
    display: inline-grid;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    place-items: center;
    border-radius: 6px;
    background: var(--state-blue-soft);
    color: var(--state-primary);
}

.state-industries-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.state-industry-card,
.major-city-card {
    display: flex;
    min-height: 54px;
    padding: 14px 16px;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--state-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--state-ink);
    font-weight: 650;
}

.state-industry-card > span {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 2px;
    background: var(--state-primary);
    box-shadow: 4px -4px 0 #bfdbfe;
}

.major-cities-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.major-city-card::before {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border: 2px solid var(--state-primary);
    border-radius: 50%;
    content: "";
}

/* FAQ and related state navigation */
.career-state-archive .career-faq-list {
    display: grid;
    gap: 12px;
}

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

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

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

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

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

.career-faq-answer {
    padding: 0 22px 20px;
    border-top: 1px solid #f1f5f9;
}

.career-faq-answer p {
    margin: 16px 0 0;
}

.career-state-archive .related-career-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

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

.career-state-archive .related-career-title {
    margin: 0;
    color: var(--state-ink);
    font-size: 17px;
    font-weight: 700;
}

.related-state-link {
    margin-top: auto;
    color: var(--state-primary);
    font-size: 13px;
    font-weight: 700;
}

.state-related-all {
    margin-top: 18px;
    text-align: center;
}

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

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

@media (max-width: 1024px) {
    .career-state-archive .career-state-hero-grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
        gap: 32px;
    }

    .state-snapshot-grid,
    .featured-grid,
    .state-careers-grid,
    .all-careers-grid,
    .career-state-archive .cit-toc ol,
    .cit-state-grid,
    .state-industries-grid,
    .major-cities-grid,
    .career-state-archive .related-career-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .career-state-archive .career-state-hero-grid {
        grid-template-columns: 1fr;
        min-height: 0;
        padding-top: 42px;
        padding-bottom: 42px;
    }

    .state-snapshot-grid,
    .featured-grid,
    .state-careers-grid,
    .all-careers-grid,
    .career-state-archive .cit-toc ol,
    .cit-state-grid,
    .state-industries-grid,
    .major-cities-grid,
    .career-state-archive .related-career-grid {
        grid-template-columns: 1fr;
    }

    .state-snapshot-card,
    .state-career-card {
        min-height: 0;
    }

    .state-content-panel {
        padding: 22px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .career-state-archive .state-career-card,
    .career-state-archive .state-directory-card,
    .career-state-archive .related-career-card {
        transition: none;
    }
}
