/* Careers page responsive helpers (loaded only on /careers/) */

/* Hero: scaled image + negative translate was clipping the right edge (CAREERS “S”)
   against the viewport and could cause horizontal scroll. Keep composition inset with
   milder scale, right-weighted origin, and overflow clipping on the section. */
/* Hero image overflow is clipped on .careers-hero-figure (overflow-hidden) — avoid overflow-x on section so scroll/Headhesive/ScrollCue keep working */

.hero-section .careers-hero-figure {
    max-width: 100%;
}

.hero-section .careers-hero-img {
    display: block;
    width: 100%;
    height: auto;
    transform-origin: 56% 50%;
    transform: scale(1.06) translateX(-6px);
}

.hero-section .display-1 {
    font-size: 50px;
    line-height: 1.12;
    margin-bottom: 1rem;
}

.hero-section .careers-hero-lead {
    font-size: 1rem;
    line-height: 1.5;
}

@media (min-width: 576px) {
    .hero-section .careers-hero-img {
        transform-origin: 55% 50%;
        transform: scale(1.08) translateX(-4px);
    }

    .hero-section .careers-hero-lead {
        font-size: 1.05rem;
    }
}

@media (min-width: 768px) {
    .hero-section .careers-hero-img {
        transform-origin: 54% 50%;
        transform: scale(1.1) translateX(0);
    }

    .hero-section .careers-hero-lead {
        font-size: 1.125rem;
        padding-left: 0;
        padding-right: 0;
    }
}

/* Mobile / tablet: center hero photo (avoid left shift from transform + asymmetric padding) */
@media (max-width: 991.98px) {
    .hero-section .careers-hero-img-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-section .careers-hero-figure {
        width: 100%;
        max-width: 36rem;
        margin-inline: auto;
        padding-inline: 0;
        display: flex;
        justify-content: center;
    }

    .hero-section .careers-hero-img {
        transform-origin: center center;
        transform: scale(1.06) translateX(0);
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 992px) {
    .careers-hero-lead .careers-hero-lead-line {
        display: block;
    }

    .careers-hero-lead .careers-hero-lead-line:not(:last-child) {
        margin-bottom: 0.2em;
    }

    .hero-section .careers-hero-img {
        transform-origin: 52% 50%;
        transform: scale(1.12) translateX(0);
    }

    .hero-section .careers-hero-figure {
        max-width: none;
        margin-inline: 0;
        padding-inline-start: 0;
        padding-inline-end: clamp(0.5rem, 2.5vw, 1.5rem);
        display: block;
    }
}

@media (min-width: 1200px) {
    .hero-section .careers-hero-img {
        transform-origin: 50% 50%;
        transform: scale(1.14) translateX(0);
    }
}

.hero-section .btn-lg {
    width: 100%;
    max-width: 20rem;
}

@media (min-width: 576px) {
    .hero-section .btn-lg {
        width: auto;
        max-width: none;
    }
}

/* Philosophy */
.philosophy-section .display-2 {
    font-size: clamp(1.45rem, 4.2vw, 2.5rem);
    line-height: 1.2;
}

.philosophy-section .philosophy-point {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.philosophy-section .philosophy-point:last-child {
    margin-bottom: 0;
}

.philosophy-section .philosophy-point .icon.btn-circle {
    margin-right: 0 !important;
    margin-bottom: 0;
}

@media (min-width: 576px) {
    .philosophy-section .philosophy-point {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 0;
    }

    .philosophy-section .philosophy-point .icon.btn-circle {
        margin-right: 1.25rem !important;
    }
}

@media (min-width: 992px) {
    .philosophy-section .philosophy-point .icon.btn-circle {
        margin-right: 1.5rem !important;
    }
}

/* Job cards */
.job-card .badge {
    font-size: 0.75rem;
    white-space: normal;
    text-align: left;
    line-height: 1.3;
}

.job-card h4 {
    font-size: clamp(1.05rem, 2.8vw, 1.35rem);
    word-break: break-word;
}

@media (max-width: 575.98px) {
    .job-card .btn {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* Resume modal */
.careers-modal-title {
    font-size: clamp(1.15rem, 4.5vw, 1.85rem);
    line-height: 1.25;
    word-break: break-word;
}

@media (max-width: 575.98px) {
    .careers-resume-modal.modal-dialog {
        margin: 0.75rem auto;
        max-width: calc(100% - 1.5rem);
    }

    #resumeModal .modal-body {
        padding: 1rem;
    }

    #resumeModal .modal-body .form-label {
        font-size: 0.875rem;
    }

    #resumeModal .modal-body .form-control,
    #resumeModal .modal-body .form-select {
        font-size: 0.9375rem;
    }

    #resumeModal .modal-footer .btn {
        width: 100%;
        max-width: 100%;
    }
}

/* Logo scale on careers layout */
.content-wrapper > header .navbar-brand img {
    max-height: 2.25rem;
    width: auto;
}

@media (max-width: 767.98px) {
    .hero-section .btn-lg,
    #open-roles .btn,
    #resumeModal .btn-primary {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    #resumeModal .form-control,
    #resumeModal .form-select {
        min-height: 44px;
    }
}

@media (max-width: 767.98px) and (orientation: landscape) {
    .hero-section.wrapper {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-section .careers-hero-img {
        transform: none;
        transform-origin: center center;
    }
}

@media print {
    .navbar,
    .modal,
    .progress-wrap,
    footer {
        display: none !important;
    }

    .job-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
