/* ================================================
   SALARY PAGE OVERRIDES
   Only styles specific to salary-level pages.
   All other styles inherit from the shared style.css
   ================================================ */

/* ===================================
   SALARY OVERVIEW SECTION
   New component for salary pages
   =================================== */

.salary-overview-section {
    background: #ffffff;
    padding: 40px 20px;
}

/* ================================================
   CALIFORNIA SALARY GUIDE DIRECTORY
   Scoped to the directory block added to /salary/ca/
   ================================================ */

.ca-salary-directory {
    padding: 64px 20px;
    background:
        radial-gradient(circle at 12% 12%, rgba(99, 102, 241, 0.13), transparent 32%),
        radial-gradient(circle at 88% 88%, rgba(245, 158, 11, 0.12), transparent 28%),
        #f7f8fc;
}

.ca-salary-directory__container {
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid #dfe3f0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 46px rgba(39, 48, 87, 0.11);
}

.ca-salary-directory__intro {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 42px;
    padding: 42px;
    background: linear-gradient(135deg, #252a57 0%, #3f3f83 58%, #5554a5 100%);
    color: #ffffff;
}

.ca-salary-directory__heading {
    align-self: center;
}

.ca-salary-directory__eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fbd38d;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.ca-salary-directory__heading h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: clamp(1.85rem, 3vw, 2.65rem);
    line-height: 1.15;
}

.ca-salary-directory__heading p {
    max-width: 690px;
    margin: 0;
    color: #e6e8fa;
    font-size: 1.02rem;
    line-height: 1.75;
}

.ca-salary-directory__overview-links {
    display: grid;
    gap: 12px;
}

.ca-salary-directory__overview-card {
    display: grid;
    gap: 6px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 12px;
    color: #ffffff;
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.ca-salary-directory__overview-card:hover,
.ca-salary-directory__overview-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.13);
}

.ca-salary-directory__overview-card--national {
    background: rgba(255, 255, 255, 0.08);
}

.ca-salary-directory__overview-card--current {
    border-color: rgba(251, 211, 141, 0.62);
    background: rgba(245, 158, 11, 0.14);
}

.ca-salary-directory__overview-card strong {
    color: #ffffff;
    font-size: 1.08rem;
}

.ca-salary-directory__overview-card > span:last-child {
    color: #e6e8fa;
    font-size: 0.85rem;
    line-height: 1.45;
}

.ca-salary-directory__overview-label {
    color: #fbd38d;
    font-size: 0.71rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ca-salary-directory__local {
    display: block;
    padding: 38px 42px 44px;
}

.ca-salary-directory__local-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 24px;
}

.ca-salary-directory__local-heading h3 {
    margin: 0;
    color: #273057;
    font-size: 1.45rem;
}

.ca-salary-directory__local-heading p {
    max-width: 470px;
    margin: 0;
    color: #667085;
    font-size: 0.92rem;
    line-height: 1.55;
    text-align: right;
}

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

.ca-salary-directory__card {
    position: relative;
    display: flex;
    min-height: 184px;
    flex-direction: column;
    align-items: flex-start;
    padding: 23px;
    overflow: hidden;
    border: 1px solid #e0e4ef;
    border-radius: 12px;
    background: linear-gradient(150deg, #ffffff 62%, #f3f4fb 100%);
    color: #273057;
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.ca-salary-directory__card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #f59e0b);
    transform: scaleX(0.34);
    transform-origin: left;
    transition: transform 180ms ease;
}

.ca-salary-directory__card:hover,
.ca-salary-directory__card:focus-visible {
    transform: translateY(-4px);
    border-color: #b9bef0;
    box-shadow: 0 12px 24px rgba(62, 66, 131, 0.13);
}

.ca-salary-directory__card:hover::before,
.ca-salary-directory__card:focus-visible::before {
    transform: scaleX(1);
}

.ca-salary-directory__region {
    margin-bottom: 9px;
    color: #6a6fc7;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.ca-salary-directory__card strong {
    margin-bottom: 8px;
    color: #252a57;
    font-size: 1.24rem;
}

.ca-salary-directory__description {
    color: #697386;
    font-size: 0.88rem;
    line-height: 1.55;
}

.ca-salary-directory__arrow {
    margin-top: auto;
    padding-top: 16px;
    color: #4d51ad;
    font-size: 0.82rem;
    font-weight: 700;
}

@media (max-width: 968px) {
    .ca-salary-directory__intro {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .ca-salary-directory__overview-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ca-salary-directory__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .ca-salary-directory {
        padding: 44px 14px;
    }

    .ca-salary-directory__container {
        border-radius: 14px;
    }

    .ca-salary-directory__intro,
    .ca-salary-directory__local {
        padding: 30px 24px;
    }

    .ca-salary-directory__overview-links,
    .ca-salary-directory__grid {
        grid-template-columns: 1fr;
    }

    .ca-salary-directory__local-heading {
        display: block;
    }

    .ca-salary-directory__local-heading p {
        margin-top: 8px;
        text-align: left;
    }

    .ca-salary-directory__card {
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ca-salary-directory__overview-card,
    .ca-salary-directory__card,
    .ca-salary-directory__card::before {
        transition: none;
    }
}

.salary-overview-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.salary-overview-container h2 {
    color: #2c3e50;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid #6366F1;
}

.salary-overview-container .intro-text {
    margin-bottom: 2rem;
    font-size: 1.05rem;
    color: #4a5568;
    line-height: 1.7;
}

/* Grid: Main + Sidebar */
.salary-overview-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-top: 2rem;
}

.salary-overview-main {
    min-width: 0;
}

.salary-overview-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

/* ===================================
   SALARY HIGHLIGHT CARDS
   4-up stat cards at top of overview
   =================================== */

.salary-highlights {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 2rem;
}

.salary-highlight-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.salary-highlight-card:hover {
    border-color: #6366F1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
    transform: translateY(-2px);
}

.highlight-icon {
    font-size: 1.6rem;
    color: #6366F1;
    margin-bottom: 10px;
}

.highlight-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
    margin-bottom: 6px;
}

.highlight-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 4px;
}

.highlight-detail {
    font-size: 0.78rem;
    color: #6c757d;
}

/* ===================================
   SALARY CHART CARDS
   Shared card for charts & tables
   =================================== */

.salary-chart-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.salary-chart-card h3 {
    font-size: 1.25rem;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 600;
}

.salary-chart-card p {
    font-size: 0.95rem;
    color: #4a5568;
    margin-bottom: 16px;
    line-height: 1.6;
}

.salary-chart-card.full-width {
    grid-column: 1 / -1;
}

/* Chart wrappers */
.chart-wrapper {
    position: relative;
    width: 100%;
    height: 320px;
}

.chart-wrapper canvas {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

.chart-wrapper-wide {
    height: 380px;
}

/* ===================================
   SALARY TABLES
   Percentile, state, and metro tables
   =================================== */

.salary-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.salary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.salary-table thead th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.salary-table tbody td {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #4a5568;
}

.salary-table tbody tr:hover {
    background: #f8f9fa;
}

.salary-table tbody tr.highlight-row {
    background: #EEF2FF;
    font-weight: 600;
}

.salary-table tbody tr.highlight-row td {
    color: #2c3e50;
}

/* +/- indicators */
.salary-table td.positive {
    color: #059669;
    font-weight: 600;
}

.salary-table td.negative {
    color: #DC2626;
    font-weight: 600;
}

/* ===================================
   SALARY OVERVIEW SIDEBAR
   Mirrors how-to-page sidebar pattern
   =================================== */

.salary-overview-sidebar .sidebar-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.salary-overview-sidebar .clinical-hours-hero {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    border-radius: 8px;
    color: white;
    margin-bottom: 2rem;
}

.salary-overview-sidebar .clinical-hours-hero .big-number {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.salary-overview-sidebar .clinical-hours-hero .subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.95;
}

.salary-overview-sidebar .clinical-hours-hero .detail {
    font-size: 0.95rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.salary-overview-sidebar .clinical-breakdown {
    margin-top: 1.5rem;
}

.salary-overview-sidebar .clinical-breakdown h4 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.salary-overview-sidebar .clinical-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #6366F1;
    transition: all 0.3s ease;
}

.salary-overview-sidebar .clinical-item:hover {
    background: #EEF2FF;
    transform: translateX(4px);
}

.salary-overview-sidebar .clinical-icon {
    font-size: 1.8rem;
    color: #6366F1;
    min-width: 40px;
    text-align: center;
}

.salary-overview-sidebar .clinical-info h5 {
    font-size: 1rem;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.salary-overview-sidebar .clinical-info p {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.4;
    margin: 0;
}

.salary-overview-sidebar .clinical-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e5e7eb;
}

.salary-overview-sidebar .stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #6366F1;
    line-height: 1;
}

.salary-overview-sidebar .stat-label {
    font-size: 0.85rem;
    color: #4a5568;
    margin-top: 0.25rem;
}

/* ===================================
   TOP PAYING STATES SECTION
   =================================== */

.salary-states-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: #ffffff;
}

.salary-states-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.salary-states-section .section-header h2 {
    color: #2c3e50;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid #6366F1;
}

.salary-states-section .section-header p {
    font-size: 1.1rem;
    color: #4a5568;
    max-width: 700px;
    margin: 0 auto;
}

.salary-states-container {
    max-width: 1200px;
    margin: 0 auto;
}

.salary-states-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.salary-states-grid > * {
    min-width: 0;
}

/* ===================================
   METRO AREA SECTION
   =================================== */

.salary-metro-section {
    background: #f8f9fa;
    padding: 40px 20px;
}

.salary-metro-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.salary-metro-container h2 {
    color: #2c3e50;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid #6366F1;
}

.salary-metro-container .intro-text {
    margin-bottom: 2rem;
    font-size: 1.05rem;
    color: #4a5568;
    line-height: 1.7;
}

.salary-metro-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-top: 2rem;
}

.salary-metro-main {
    min-width: 0;
}

.salary-metro-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

/* Metro sidebar cards — inherit specialties-sidebar pattern */
.salary-metro-sidebar .sidebar-card {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.salary-metro-sidebar .sidebar-card h3 {
    font-size: 1.3rem;
    color: #6366F1;
    margin-bottom: 20px;
    font-weight: 600;
}

.salary-metro-sidebar .stat-item {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #e5e7eb;
}

.salary-metro-sidebar .stat-item:last-child {
    border-bottom: none;
}

.salary-metro-sidebar .stat-label {
    font-size: 0.95rem;
    color: #4a5568;
}

.salary-metro-sidebar .stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #6366F1;
}

.salary-metro-sidebar .info-box {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
    padding: 24px;
    border-radius: 8px;
    text-align: center;
}

.salary-metro-sidebar .info-box i {
    font-size: 36px;
    margin-bottom: 12px;
}

.salary-metro-sidebar .info-box h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.salary-metro-sidebar .info-box p {
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===================================
   METRO CARDS
   Individual metro area stat cards
   =================================== */

.metro-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.metro-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.metro-card:hover {
    border-color: #6366F1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

.metro-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 2px solid #e5e7eb;
}

.metro-rank {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
}

.metro-info h4 {
    font-size: 1rem;
    color: #2c3e50;
    margin-bottom: 2px;
    font-weight: 600;
    line-height: 1.3;
}

.metro-state {
    font-size: 0.8rem;
    color: #6c757d;
}

.metro-card-body {
    padding: 14px 18px;
    display: flex;
    gap: 12px;
}

.metro-stat {
    flex: 1;
    text-align: center;
}

.metro-stat-label {
    display: block;
    font-size: 0.72rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 500;
}

.metro-stat-value {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #6366F1;
}

/* ===================================
   RESPONSIVE: Salary Page
   =================================== */

@media (max-width: 1150px) {
    .salary-highlights {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 968px) {
    .salary-overview-grid,
    .salary-metro-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .salary-overview-sidebar,
    .salary-metro-sidebar {
        position: static;
        max-width: 500px;
        margin: 0 auto;
    }

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

    .salary-states-grid {
        grid-template-columns: 1fr;
    }

    .metro-cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .salary-overview-container,
    .salary-metro-container {
        padding: 25px;
    }

    .salary-highlights {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .salary-highlight-card {
        padding: 16px 12px;
    }

    .highlight-value {
        font-size: 1.4rem;
    }

    .highlight-label {
        font-size: 0.8rem;
    }

    .salary-chart-card {
        padding: 20px;
    }

    .chart-wrapper,
    .chart-wrapper-wide {
        height: 260px;
    }

    .salary-table thead th,
    .salary-table tbody td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .metro-card-header {
        padding: 12px 14px;
    }

    .metro-info h4 {
        font-size: 0.9rem;
    }

    .metro-card-body {
        padding: 10px 14px;
        flex-wrap: wrap;
    }

    .metro-stat-value {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .salary-highlights {
        grid-template-columns: 1fr;
    }

    .metro-cards-grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 360px) {
    .salary-overview-section {
        padding: 30px 12px;
    }

    .salary-overview-container {
        padding: 16px;
    }

    .salary-chart-card {
        padding: 16px;
    }

    .salary-overview-sidebar .sidebar-card {
        padding: 1.25rem;
    }

    .salary-overview-sidebar .clinical-item {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .salary-overview-sidebar .clinical-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 320px) {
    .hero-icon {
        flex: none;
        width: 100%;
    }

    .icon,
    #hero-icon {
        width: 100%;
        max-width: 220px;
        height: auto;
    }
}

@media (max-width: 320px) {
    .salary-overview-section {
        padding: 24px 8px;
    }

    .salary-overview-container {
        padding: 10px;
    }

    .salary-highlights {
        gap: 8px;
    }

    .salary-highlight-card {
        padding: 12px 8px;
    }

    .salary-chart-card {
        padding: 12px;
    }

    .salary-overview-sidebar .sidebar-card {
        padding: 12px;
    }

    .salary-overview-sidebar .clinical-item {
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .salary-overview-sidebar .clinical-icon {
        min-width: 28px;
        font-size: 1.2rem;
    }

    .salary-overview-sidebar .clinical-stats {
        grid-template-columns: 1fr;
    }
}