/* ========================================
   VISTWIN — Career Page (fully responsive)
   Brand: #4B2C62 / #6B4580 / #C4A7D1
   ======================================== */

.career-page {
    overflow-x: hidden;
}

.career-page .container {
    width: 100%;
    max-width: 1140px;
    padding-left: clamp(16px, 4vw, 24px);
    padding-right: clamp(16px, 4vw, 24px);
}

/* Page header */
.career-page-header {
    background: linear-gradient(135deg, #F7F3FA 0%, #EDE4F3 50%, #F7F3FA 100%) !important;
    padding: clamp(40px, 8vw, 56px) 0 clamp(32px, 6vw, 44px) !important;
}

.career-page-header h1 {
    color: #2A1A38 !important;
    font-size: clamp(1.75rem, 5vw, 2.4rem) !important;
    line-height: 1.2;
    margin-bottom: 10px !important;
}

.career-page-header .section-badge {
    margin-bottom: 14px;
    font-size: clamp(11px, 2.5vw, 13px);
}

.career-breadcrumb {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin-bottom: 0;
}

.career-breadcrumb .breadcrumb-item,
.career-breadcrumb .breadcrumb-item a {
    color: #6E6278 !important;
    font-size: clamp(13px, 2.8vw, 15px);
}

.career-breadcrumb .breadcrumb-item.active {
    color: #4B2C62 !important;
}

.career-breadcrumb .breadcrumb-item a:hover {
    color: #4B2C62 !important;
}

/* Sections */
.career-section {
    position: relative;
    padding: clamp(48px, 8vw, 80px) 0;
    background:
        radial-gradient(ellipse 80% 50% at 0% 0%, rgba(196, 167, 209, 0.35), transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(75, 44, 98, 0.08), transparent 50%),
        #F7F3FA;
}

.career-section--alt {
    background: #FCFBFD;
    border-top: 1px solid rgba(75, 44, 98, 0.06);
}

.career-section .section-badge {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 999px;
    background: #EDE4F3;
    color: #4B2C62;
    font-size: clamp(11px, 2.5vw, 13px);
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.career-section-title {
    color: #2A1A38;
    font-weight: 800;
    font-size: clamp(1.45rem, 4.5vw, 2.2rem);
    margin-bottom: 12px;
    line-height: 1.25;
    padding: 0 4px;
}

.career-section-lead {
    color: #6E6278;
    max-width: 640px;
    margin: 0 auto clamp(24px, 4vw, 32px);
    line-height: 1.65;
    font-size: clamp(0.92rem, 2.8vw, 1.05rem);
    padding: 0 4px;
}

.career-section .text-center.mb-5 {
    margin-bottom: clamp(28px, 5vw, 48px) !important;
}

/* Stats */
.career-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(12px, 2.5vw, 20px);
    margin-bottom: clamp(24px, 4vw, 48px);
}

.career-stat {
    background: #fff;
    border: 1px solid rgba(75, 44, 98, 0.08);
    border-radius: 16px;
    padding: clamp(16px, 3vw, 24px) clamp(12px, 2vw, 16px);
    text-align: center;
    box-shadow: 0 6px 20px rgba(75, 44, 98, 0.06);
    min-width: 0;
}

.career-stat i {
    font-size: clamp(1.2rem, 3.5vw, 1.5rem);
    color: #6B4580;
    margin-bottom: 8px;
}

.career-stat strong {
    display: block;
    color: #2A1A38;
    font-size: clamp(0.9rem, 2.8vw, 1.1rem);
    margin-bottom: 4px;
    line-height: 1.3;
}

.career-stat span {
    color: #6E6278;
    font-size: clamp(0.78rem, 2.4vw, 0.9rem);
    line-height: 1.4;
}

/* Job cards */
.career-jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: clamp(16px, 3vw, 24px);
}

.career-job-card {
    background: #fff;
    border: 1px solid rgba(75, 44, 98, 0.08);
    border-radius: 18px;
    padding: clamp(20px, 4vw, 28px);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 28px rgba(75, 44, 98, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    scroll-margin-top: clamp(100px, 18vw, 140px);
    min-width: 0;
}

@media (hover: hover) {
    .career-job-card:hover {
        transform: translateY(-4px);
        border-color: rgba(196, 167, 209, 0.8);
        box-shadow: 0 16px 40px rgba(75, 44, 98, 0.12);
    }
}

.career-job-icon {
    width: clamp(44px, 10vw, 52px);
    height: clamp(44px, 10vw, 52px);
    border-radius: 14px;
    background: linear-gradient(135deg, #4B2C62, #6B4580);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1rem, 3vw, 1.25rem);
    margin-bottom: 14px;
    flex-shrink: 0;
}

.career-job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.career-job-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #F6F2F9;
    color: #4B2C62;
    font-size: clamp(9px, 2.2vw, 11px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
    max-width: 100%;
}

.career-job-tag i {
    flex-shrink: 0;
    font-size: 0.85em;
}

.career-job-title {
    color: #2A1A38;
    font-size: clamp(1.05rem, 3.2vw, 1.2rem);
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.35;
    word-wrap: break-word;
}

.career-job-desc {
    color: #6E6278;
    font-size: clamp(0.88rem, 2.6vw, 0.95rem);
    line-height: 1.6;
    margin-bottom: 14px;
    flex: 1;
}

.career-job-skills {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.career-job-skills li {
    color: #5c4d6a;
    font-size: clamp(0.82rem, 2.4vw, 0.88rem);
    padding: 4px 0 4px 22px;
    position: relative;
    line-height: 1.45;
}

.career-job-skills li::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #6B4580;
    font-size: 0.75rem;
}

.career-job-apply {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    padding: 12px 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4B2C62, #6B4580);
    color: #fff !important;
    font-weight: 700;
    font-size: clamp(13px, 2.8vw, 14px);
    text-decoration: none !important;
    border: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    margin-top: auto;
}

.career-job-apply:hover {
    opacity: 0.95;
    color: #fff !important;
}

@media (hover: hover) {
    .career-job-apply:hover {
        transform: translateY(-1px);
    }
}

/* Process steps */
.career-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(12px, 2.5vw, 20px);
}

.career-step {
    background: #fff;
    border: 1px solid rgba(75, 44, 98, 0.08);
    border-radius: 16px;
    padding: clamp(18px, 3vw, 24px) clamp(14px, 2.5vw, 18px);
    text-align: center;
    min-width: 0;
}

.career-step-num {
    width: 36px;
    height: 36px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4B2C62, #6B4580);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.career-step h3 {
    color: #2A1A38;
    font-size: clamp(0.88rem, 2.6vw, 0.95rem);
    font-weight: 700;
    margin-bottom: 6px;
}

.career-step p {
    color: #6E6278;
    font-size: clamp(0.8rem, 2.4vw, 0.85rem);
    margin: 0;
    line-height: 1.5;
}

/* Apply section */
#apply {
    scroll-margin-top: clamp(100px, 18vw, 140px);
}

.career-apply-wrap {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.career-apply-card {
    background: #fff;
    border: 1px solid rgba(75, 44, 98, 0.08);
    border-radius: clamp(14px, 3vw, 20px);
    padding: clamp(20px, 4vw, 36px);
    box-shadow: 0 12px 40px rgba(75, 44, 98, 0.08);
}

.career-form .form-group {
    margin-bottom: 18px;
}

.career-form label,
.career-form .form-label {
    display: block;
    color: #2A1A38;
    font-weight: 600;
    font-size: clamp(0.85rem, 2.5vw, 0.9rem);
    margin-bottom: 6px;
}

.career-form .form-control,
.career-form select.form-control,
.career-form input.form-control,
.career-form textarea.form-control {
    width: 100%;
    height: auto !important;
    min-height: 48px !important;
    max-width: 100%;
    border: 1px solid rgba(75, 44, 98, 0.15);
    border-radius: 10px;
    padding: 11px 14px !important;
    color: #2A1A38;
    font-size: 16px !important;
    line-height: 1.5 !important;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.career-form select.form-control {
    padding: 11px 36px 11px 14px !important;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%234B2C62' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.career-form textarea.form-control {
    min-height: 120px !important;
    height: auto !important;
    resize: vertical;
}

.career-form .form-control:focus,
.career-form select.form-control:focus {
    border-color: #C4A7D1;
    box-shadow: 0 0 0 3px rgba(196, 167, 209, 0.35);
    outline: none;
}

.career-form .row {
    margin-left: -10px;
    margin-right: -10px;
}

.career-form .row > [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
}

.career-form .btn-primary,
.career-form .career-submit-btn {
    width: 100%;
    min-height: 48px;
    font-size: clamp(15px, 3vw, 17px);
    font-weight: 700;
    border-radius: 10px;
    border: none;
    padding: 14px 20px;
    background: linear-gradient(135deg, #4B2C62, #6B4580) !important;
}

.career-contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(12px, 2.5vw, 16px);
    margin-top: clamp(20px, 4vw, 28px);
    padding-top: clamp(20px, 4vw, 28px);
    border-top: 1px solid rgba(75, 44, 98, 0.08);
}

.career-contact-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: clamp(12px, 2.5vw, 14px) clamp(12px, 3vw, 16px);
    border-radius: 12px;
    background: #F6F2F9;
    border: 1px solid rgba(75, 44, 98, 0.08);
    color: #4B2C62;
    font-weight: 600;
    font-size: clamp(0.82rem, 2.5vw, 0.92rem);
    line-height: 1.45;
    min-width: 0;
    word-break: break-word;
}

.career-contact-item i {
    color: #6B4580;
    flex-shrink: 0;
}

.career-contact-item a {
    color: #4B2C62;
    text-decoration: none;
    word-break: break-all;
}

.career-contact-item a:hover {
    color: #6B4580;
    text-decoration: underline;
}

.career-contact-sep {
    color: #8A7E94;
}

.career-alert {
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: clamp(0.88rem, 2.6vw, 0.95rem);
    line-height: 1.5;
}

.career-alert-success {
    background: #edf7ef;
    color: #1f5c2e;
    border: 1px solid #b8dfc4;
}

.career-alert-error {
    background: #fdf0f0;
    color: #8b2e2e;
    border: 1px solid #f0c4c4;
}

/* ========== Tablet landscape / small desktop ========== */
@media (max-width: 1199px) {
    .career-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .career-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== Tablet portrait ========== */
@media (max-width: 991px) {
    .career-section {
        padding: 52px 0;
    }

    .career-jobs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .career-contact-row {
        grid-template-columns: 1fr;
    }
}

/* ========== Mobile ========== */
@media (max-width: 767px) {
    .career-section {
        padding: 44px 0;
    }

    .career-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .career-jobs-grid {
        grid-template-columns: 1fr;
    }

    .career-steps {
        grid-template-columns: 1fr;
    }

    .career-step {
        display: grid;
        grid-template-columns: 44px 1fr;
        grid-template-rows: auto auto;
        column-gap: 14px;
        text-align: left;
        align-items: start;
    }

    .career-step-num {
        grid-row: 1 / span 2;
        margin: 0;
        align-self: center;
    }

    .career-step h3 {
        margin-bottom: 4px;
        align-self: end;
    }

    .career-step p {
        grid-column: 2;
    }

    .career-apply-card {
        padding: 20px 16px;
    }

    .career-form .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ========== Small mobile ========== */
@media (max-width: 575px) {
    .career-page-header {
        padding: 36px 0 28px !important;
    }

    .career-section {
        padding: 40px 0;
    }

    .career-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .career-stat {
        display: grid;
        grid-template-columns: 40px 1fr;
        grid-template-rows: auto auto;
        column-gap: 12px;
        text-align: left;
        align-items: center;
        padding: 14px 16px;
    }

    .career-stat i {
        grid-row: 1 / span 2;
        margin: 0;
        align-self: center;
        font-size: 1.25rem;
    }

    .career-stat strong,
    .career-stat span {
        grid-column: 2;
    }

    .career-stat strong {
        margin-bottom: 2px;
    }

    .career-job-meta {
        gap: 5px;
    }

    .career-job-tag {
        padding: 4px 8px;
    }

    .career-contact-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .career-contact-item--phones {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
}

/* ========== Extra small ========== */
@media (max-width: 380px) {
    .career-page .container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .career-job-card {
        padding: 18px 14px;
        border-radius: 14px;
    }

    .career-apply-card {
        padding: 16px 12px;
        border-radius: 14px;
    }

    .career-section-title {
        font-size: 1.35rem;
    }
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
    .career-page .container {
        padding-left: max(clamp(16px, 4vw, 24px), env(safe-area-inset-left));
        padding-right: max(clamp(16px, 4vw, 24px), env(safe-area-inset-right));
    }
}

@media (prefers-reduced-motion: reduce) {
    .career-job-card,
    .career-job-apply {
        transition: none;
    }
}

/* ========== Final responsive layer (overrides global site CSS) ========== */
.career-page {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    padding-bottom: 24px;
}

.career-page .career-page-header.page-header {
    margin-bottom: 0 !important;
    overflow: visible !important;
}

.career-page *,
.career-page *::before,
.career-page *::after {
    box-sizing: border-box;
}

.career-page .career-section .container,
.career-page .career-page-header .container {
    margin-left: auto;
    margin-right: auto;
}

/* Large desktop */
@media (min-width: 1400px) {
    .career-page .container {
        max-width: 1200px;
    }

    .career-jobs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Laptop */
@media (max-width: 1199px) {
    .career-jobs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Tablet */
@media (max-width: 991px) {
    .career-page-header h1 {
        font-size: clamp(1.6rem, 4.5vw, 2rem) !important;
    }

    .career-section-lead {
        max-width: 100%;
    }

    .career-jobs-grid {
        gap: 16px;
    }

    .career-job-card {
        padding: 22px 18px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .career-page-header.page-header {
        padding: 40px 0 30px !important;
    }

    .career-section .text-center.mb-4,
    .career-section .text-center.mb-5 {
        margin-bottom: 28px !important;
    }

    .career-form .row {
        margin-left: 0;
        margin-right: 0;
    }

    .career-form .row > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
        flex: 0 0 100%;
        max-width: 100%;
    }

    .career-form .form-group {
        margin-bottom: 16px;
    }

    .career-form .btn-primary {
        min-height: 50px;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .career-contact-item a {
        word-break: break-word;
    }
}

/* Small phones */
@media (max-width: 575px) {
    .career-section-title {
        font-size: clamp(1.3rem, 5.5vw, 1.55rem);
    }

    .career-section .section-badge {
        padding: 7px 14px;
        letter-spacing: 1px;
    }

    .career-job-title {
        font-size: 1.05rem;
    }

    .career-job-apply {
        min-height: 46px;
        font-size: 14px;
    }

    .career-step {
        padding: 16px 14px;
    }
}

/* Very small phones */
@media (max-width: 360px) {
    .career-job-tag {
        font-size: 9px;
        padding: 4px 7px;
    }

    .career-contact-item--phones {
        flex-direction: column;
        align-items: flex-start;
    }

    .career-contact-sep {
        display: none;
    }

    .career-contact-item--phones a {
        display: block;
        width: 100%;
    }
}

/* Landscape phones */
@media (max-width: 896px) and (orientation: landscape) {
    .career-page-header.page-header {
        padding: 28px 0 22px !important;
    }

    .career-section {
        padding: 36px 0;
    }

    .career-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Override mobile-app.css / mobile-responsive.css form rules inside career page */
@media (max-width: 768px) {
    .career-page .career-form input.form-control,
    .career-page .career-form textarea.form-control,
    .career-page .career-form select.form-control {
        height: auto !important;
        min-height: 48px !important;
        font-size: 16px !important;
        line-height: 1.5 !important;
        border-radius: 10px !important;
        padding: 12px 14px !important;
    }

    .career-page .career-form select.form-control {
        padding: 12px 36px 12px 14px !important;
    }

    .career-page .career-form textarea.form-control {
        min-height: 120px !important;
    }
}
