/* ============================================================
   Parkville Pharmaceuticals – Recruitment Portal Styles
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --pv-primary: #1a4f7a;
    --pv-accent: #2e86c1;
    --pv-green: #1e8449;
    --pv-light-bg: #f4f8fb;
    --pv-card-bg: #ffffff;
    --pv-border: #d5e3ef;
    --pv-text: #1c2833;
    --pv-muted: #6c7a89;
    --pv-error: #c0392b;
    --pv-error-bg: #fdf0ef;
    --pv-radius: 10px;
    --pv-shadow: 0 4px 18px rgba(26, 79, 122, .12);
    --pv-transition: .22s ease;
}

/* ── Reset / Base ──────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--pv-light-bg);
    color: var(--pv-text);
    font-size: 15px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%; /* prevent iOS auto font scaling */
}

/* ── Wrapper ───────────────────────────────────────────────── */
.pv-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ── Header ────────────────────────────────────────────────── */
.pv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 0 16px;
    border-bottom: 2px solid var(--pv-border);
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 10px;
}

.pv-logo {
    height: 56px;
    object-fit: contain;
}

.pv-tagline {
    font-size: 13px;
    color: var(--pv-muted);
    font-style: italic;
    text-align: right;
}

/* ── Hero ──────────────────────────────────────────────────── */
.pv-hero {
    text-align: center;
    padding: 40px 0 32px;
}

.pv-hero-title {
    font-size: 2rem;
    color: var(--pv-primary);
    font-weight: 700;
    margin-bottom: 10px;
}

.pv-hero-sub {
    color: var(--pv-muted);
    font-size: 1rem;
}

.pv-hero-sub-ar {
    color: var(--pv-muted);
    font-size: 1rem;
    direction: rtl;
    margin-top: 4px;
}

/* ── Language Cards ────────────────────────────────────────── */
.pv-lang-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin: 0 auto 48px;
    max-width: 700px;
}

.pv-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--pv-card-bg);
    border: 2px solid var(--pv-border);
    border-radius: 16px;
    padding: 38px 28px;
    text-decoration: none;
    color: var(--pv-text);
    box-shadow: var(--pv-shadow);
    transition: transform var(--pv-transition), box-shadow var(--pv-transition),
    border-color var(--pv-transition);
    cursor: pointer;
}

.pv-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 32px rgba(26, 79, 122, .2);
    border-color: var(--pv-accent);
}

.pv-card-icon {
    font-size: 3rem;
    margin-bottom: 14px;
}

.pv-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--pv-primary);
    margin-bottom: 10px;
}

.pv-card-desc {
    font-size: .9rem;
    color: var(--pv-muted);
    margin-bottom: 20px;
}

.pv-card-btn {
    display: inline-block;
    background: var(--pv-primary);
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: .88rem;
    font-weight: 600;
    transition: background var(--pv-transition);
}

.pv-card:hover .pv-card-btn {
    background: var(--pv-accent);
}

/* ── Form Container ────────────────────────────────────────── */
.pv-form-container {
    background: var(--pv-card-bg);
    border-radius: var(--pv-radius);
    box-shadow: var(--pv-shadow);
    padding: 38px 42px;
    margin-bottom: 40px;
}

.pv-form-heading {
    font-size: 1.6rem;
    color: var(--pv-primary);
    font-weight: 700;
    margin-bottom: 28px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--pv-border);
}

/* ── Section Title ─────────────────────────────────────────── */
.pv-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pv-primary);
    background: var(--pv-light-bg);
    padding: 9px 14px;
    border-radius: 6px;
    margin: 28px 0 16px;
    border-right: 4px solid var(--pv-accent);
}

[dir="ltr"] .pv-section-title {
    border-left: 4px solid var(--pv-accent);
    border-right: none;
}

/* ── Field / Row ───────────────────────────────────────────── */
.pv-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 16px;
}

.pv-field label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--pv-text);
}

.pv-field input[type="text"],
.pv-field input[type="email"],
.pv-field input[type="tel"],
.pv-field input[type="number"],
.pv-field input[type="date"],
.pv-field select,
.pv-field textarea {
    border: 1.5px solid var(--pv-border);
    border-radius: 7px;
    padding: 9px 12px;
    font-size: .93rem;
    color: var(--pv-text);
    background: #fff;
    transition: border-color var(--pv-transition), box-shadow var(--pv-transition);
    width: 100%;
}

.pv-field input:focus,
.pv-field select:focus,
.pv-field textarea:focus {
    outline: none;
    border-color: var(--pv-accent);
    box-shadow: 0 0 0 3px rgba(46, 134, 193, .15);
}

.pv-field input[type="file"] {
    border: 1.5px dashed var(--pv-border);
    border-radius: 7px;
    padding: 10px;
    background: var(--pv-light-bg);
    font-size: .88rem;
    cursor: pointer;
    width: 100%;
}

/* Error state */
.pv-error label {
    color: var(--pv-error);
}

.pv-error input,
.pv-error select {
    border-color: var(--pv-error) !important;
    background: var(--pv-error-bg);
}

.req {
    color: var(--pv-error);
    margin-right: 2px;
}

/* Rows */
.pv-row {
    display: grid;
    gap: 16px;
    margin-bottom: 0;
}

.pv-row-2 {
    grid-template-columns: 1fr 1fr;
}

.pv-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.pv-field-grow {
    flex: 2;
}

.pv-field-inline {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.pv-field-inline label:first-child {
    font-weight: 600;
    min-width: 220px;
}

/* ── Radio Groups ──────────────────────────────────────────── */
.pv-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 4px 0;
}

.pv-radio-wrap {
    gap: 10px;
}

.pv-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: .92rem;
}

.pv-radio input[type="radio"] {
    accent-color: var(--pv-primary);
    width: 15px;
    height: 15px;
}

/* ── Training Row ──────────────────────────────────────────── */
.pv-training-row {
    background: var(--pv-light-bg);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

/* ── Experience Block ──────────────────────────────────────── */
.pv-experience-block {
    background: var(--pv-light-bg);
    border: 1px solid var(--pv-border);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 16px;
    position: relative;
}

.pv-exp-num {
    position: absolute;
    top: -12px;
    right: 16px;
    background: var(--pv-primary);
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .82rem;
    font-weight: 700;
}

[dir="ltr"] .pv-exp-num {
    right: auto;
    left: 16px;
}

/* ── Add Row Button ────────────────────────────────────────── */
.pv-btn-add {
    background: transparent;
    border: 1.5px dashed var(--pv-accent);
    color: var(--pv-accent);
    border-radius: 7px;
    padding: 8px 18px;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    margin: 6px 0 18px;
    transition: all var(--pv-transition);
}

.pv-btn-add:hover {
    background: var(--pv-accent);
    color: #fff;
}

/* ── Car Details Hidden Initially ──────────────────────────── */
.pv-car-details {
    display: none;
}

.pv-car-details.pv-visible {
    display: grid;
}

/* ── Alerts ────────────────────────────────────────────────── */
.pv-alert {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: .92rem;
    font-weight: 500;
}

.pv-alert-danger {
    background: var(--pv-error-bg);
    border: 1px solid #f5b7b1;
    color: var(--pv-error);
}

/* ── Submit Row ────────────────────────────────────────────── */
.pv-submit-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pv-btn-submit {
    background: var(--pv-green);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 13px 34px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--pv-transition), transform var(--pv-transition);
}

.pv-btn-submit:hover {
    background: #166339;
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

.pv-btn-back {
    color: var(--pv-muted);
    font-size: .9rem;
    text-decoration: none;
    transition: color var(--pv-transition);
}

.pv-btn-back:hover {
    color: var(--pv-primary);
}

/* ── Disclaimer ────────────────────────────────────────────── */
.pv-disclaimer {
    margin-top: 18px;
    font-size: .82rem;
    color: var(--pv-muted);
    line-height: 1.5;
    font-style: italic;
}

/* ── Thank You Box ─────────────────────────────────────────── */
.pv-thankyou-box {
    background: var(--pv-card-bg);
    border-radius: 16px;
    box-shadow: var(--pv-shadow);
    padding: 60px 40px;
    text-align: center;
    max-width: 600px;
    margin: 40px auto;
}

.pv-thankyou-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.pv-thankyou-box h2 {
    font-size: 1.8rem;
    color: var(--pv-primary);
    margin-bottom: 14px;
}

.pv-thankyou-box p {
    color: var(--pv-muted);
    margin-bottom: 10px;
}

.pv-ref {
    background: var(--pv-light-bg);
    border-radius: 8px;
    padding: 10px 20px;
    display: inline-block;
    margin: 14px 0;
    font-size: 1rem;
    color: var(--pv-text);
}

/* ── Footer ────────────────────────────────────────────────── */
.pv-footer {
    text-align: center;
    color: var(--pv-muted);
    font-size: .85rem;
    padding: 24px 0 8px;
    border-top: 1px solid var(--pv-border);
    margin-top: 20px;
}


/* ============================================================
   MOBILE RESPONSIVE OVERRIDES
   Breakpoints: 768px (tablet), 580px (large phone), 400px (small phone)
   ============================================================ */

/* ── Tablet (≤ 768px) ──────────────────────────────────────── */
@media (max-width: 768px) {

    .pv-wrap {
        padding: 0 16px 48px;
    }

    .pv-header {
        padding: 16px 0 12px;
        margin-bottom: 24px;
    }

    .pv-logo {
        height: 44px;
    }

    .pv-hero {
        padding: 28px 0 22px;
    }

    .pv-hero-title {
        font-size: 1.6rem;
    }

    .pv-form-container {
        padding: 28px 28px;
        border-radius: 8px;
    }

    .pv-form-heading {
        font-size: 1.35rem;
        margin-bottom: 22px;
    }

    .pv-row-3 {
        grid-template-columns: 1fr 1fr;
    }

    .pv-thankyou-box {
        padding: 44px 28px;
    }
}

/* ── Large Phone (≤ 580px) ─────────────────────────────────── */
@media (max-width: 580px) {

    /* Wrapper */
    .pv-wrap {
        max-width: 100%;
        width: 100%;
        margin: 0;
        padding: 0 10px 40px;
    }

    /* Header: stack logo + tagline vertically */
    .pv-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 14px 0 12px;
        margin-bottom: 20px;
    }

    .pv-logo {
        height: 38px;
    }

    .pv-tagline {
        text-align: left;
        font-size: 12px;
    }

    /* Hero */
    .pv-hero {
        padding: 20px 0 16px;
    }

    .pv-hero-title {
        font-size: 1.35rem;
        line-height: 1.3;
    }

    .pv-hero-sub,
    .pv-hero-sub-ar {
        font-size: .9rem;
    }

    /* Language selection cards: single column */
    .pv-lang-cards {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 32px;
    }

    .pv-card {
        padding: 28px 20px;
        border-radius: 12px;
    }

    .pv-card-icon {
        font-size: 2.4rem;
        margin-bottom: 10px;
    }

    .pv-card-title {
        font-size: 1.15rem;
    }

    .pv-card-btn {
        padding: 10px 20px;
        width: 100%;
        text-align: center;
    }

    /* Form container: flush to edges with no border-radius on sides */
    .pv-form-container {
        padding: 20px 14px;
        border-radius: 8px;
        margin-bottom: 24px;
    }

    .pv-form-heading {
        font-size: 1.2rem;
        margin-bottom: 18px;
        padding-bottom: 10px;
    }

    .pv-section-title {
        font-size: .95rem;
        margin: 22px 0 12px;
    }

    /* All grid rows collapse to single column */
    .pv-row-2,
    .pv-row-3 {
        grid-template-columns: 1fr;
    }

    /* Larger tap targets for inputs */
    .pv-field input[type="text"],
    .pv-field input[type="email"],
    .pv-field input[type="tel"],
    .pv-field input[type="number"],
    .pv-field input[type="date"],
    .pv-field select,
    .pv-field textarea {
        padding: 11px 12px;
        font-size: 16px; /* prevents iOS zoom-on-focus */
    }

    /* select: ensure native arrow still visible on iOS */
    .pv-field select {
        -webkit-appearance: none;
        appearance: none;
        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='%236c7a89' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: left 12px center;
        padding-left: 32px;
    }

    [dir="ltr"] .pv-field select {
        background-position: right 12px center;
        padding-left: 12px;
        padding-right: 32px;
    }

    /* Inline field: stack vertically */
    .pv-field-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .pv-field-inline label:first-child {
        min-width: unset;
    }

    /* Radio group: allow wrapping naturally */
    .pv-radio-group {
        gap: 10px;
    }

    .pv-radio {
        font-size: .88rem;
    }

    /* Radio tap targets: slightly larger */
    .pv-radio input[type="radio"] {
        width: 18px;
        height: 18px;
    }

    /* Experience block */
    .pv-experience-block {
        padding: 16px 12px 14px;
    }

    /* Training row */
    .pv-training-row {
        padding: 10px;
    }

    /* Submit row: stack button + back link */
    .pv-submit-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-top: 24px;
    }

    .pv-btn-submit {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
        font-size: .97rem;
    }

    .pv-btn-back {
        text-align: center;
        font-size: .88rem;
    }

    /* Add row button: full width */
    .pv-btn-add {
        width: 100%;
        text-align: center;
        padding: 10px 18px;
    }

    /* Thank-you box */
    .pv-thankyou-box {
        padding: 36px 20px;
        margin: 24px auto;
        border-radius: 12px;
    }

    .pv-thankyou-icon {
        font-size: 3rem;
        margin-bottom: 14px;
    }

    .pv-thankyou-box h2 {
        font-size: 1.4rem;
    }

    .pv-ref {
        font-size: .9rem;
        padding: 8px 14px;
    }

    /* Alert */
    .pv-alert {
        padding: 10px 14px;
        font-size: .88rem;
    }

    /* Footer */
    .pv-footer {
        font-size: .8rem;
        padding: 18px 0 6px;
    }
}

/* ── Small Phone (≤ 400px) ─────────────────────────────────── */
@media (max-width: 400px) {

    .pv-wrap {
        padding: 0 8px 36px;
    }

    .pv-hero-title {
        font-size: 1.2rem;
    }

    .pv-form-container {
        padding: 16px 10px;
    }

    .pv-form-heading {
        font-size: 1.1rem;
    }

    .pv-card {
        padding: 22px 14px;
    }

    .pv-card-title {
        font-size: 1rem;
    }

    .pv-card-desc {
        font-size: .85rem;
    }

    .pv-section-title {
        font-size: .9rem;
    }
}

/* ── Touch: disable hover lift on cards (prevents sticky state) ── */
@media (hover: none) {
    .pv-card:hover {
        transform: none;
        box-shadow: var(--pv-shadow);
        border-color: var(--pv-border);
    }

    .pv-card:active {
        transform: scale(0.98);
        border-color: var(--pv-accent);
    }

    .pv-btn-submit:hover {
        transform: none;
    }

    .pv-btn-submit:active {
        transform: scale(0.98);
        background: #166339;
    }
}