/* ============================
   MEXER — Apliko për Punë
   ============================ */

:root {
    /* Brand colors zyrtare nga MEXER Guideline */
    --brand-green: #9AD900;
    --brand-green-deep: #88BE00;
    --brand-green-dark: #6B9700;
    --brand-green-soft: #E5F6BC;
    --brand-green-mist: #F5FBE3;

    --brand-blue: #30318C;
    --brand-blue-deep: #25266E;

    --text-dark: #30318C;
    --text-body: #30318C;
    --text-muted: #5A5BA8;
    --text-light: #8A8BC2;

    --white: #FFFFFF;
    --bg: #FAFBF8;
    --light-gray: #F2F4EF;
    --border: #E5E8E0;
    --border-strong: #D6DAD0;

    --shadow-xs: 0 1px 2px rgba(15, 20, 16, 0.04);
    --shadow-sm: 0 2px 8px rgba(15, 20, 16, 0.04);
    --shadow-md: 0 8px 24px rgba(15, 20, 16, 0.06);
    --shadow-lg: 0 24px 60px rgba(15, 20, 16, 0.08);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --radius-full: 999px;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { -webkit-text-size-adjust: 100%; }

body {
    /* Helvetica është typeface-i primar i MEXER-it */
    font-family: 'Helvetica Neue', Helvetica, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text-body);
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ============================
   Topbar
   ============================ */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 40px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.92);
}

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand img {
    height: 32px;
    width: auto;
    display: block;
}

.topbar-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--brand-green-dark);
    background: var(--brand-green-soft);
    padding: 7px 14px;
    border-radius: var(--radius-full);
}

/* ============================
   Main grid
   ============================ */
.apply {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 72px 40px;
    opacity: 0;
    transform: translateY(12px);
    animation: fade-in 0.7s var(--ease) 0.05s forwards;
}

.apply-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

/* ============================
   Left — info
   ============================ */
.info {
    padding-top: 8px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-green-dark);
    background: var(--brand-green-soft);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    margin-bottom: 28px;
}

.pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand-green-deep);
    box-shadow: 0 0 0 0 rgba(107, 181, 45, 0.6);
    animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(107, 181, 45, 0.5); }
    50%      { box-shadow: 0 0 0 7px rgba(107, 181, 45, 0); }
}

.title {
    font-size: clamp(2rem, 2.5vw + 1rem, 3rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.lead {
    font-size: 17px;
    line-height: 1.65;
    color: var(--text-muted);
    margin-bottom: 36px;
    max-width: 44ch;
}

.points {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.points li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15.5px;
    color: var(--text-body);
    font-weight: 500;
}

.check {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brand-green-soft);
    color: var(--brand-green-dark);
    padding: 4px;
    margin-top: 1px;
}

/* ============================
   Right — form
   ============================ */
.form-wrap {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-md);
}

#applyForm {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* honeypot */
.hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: 0.005em;
}

.req {
    color: var(--brand-green-deep);
    font-weight: 700;
    margin-left: 1px;
}

.opt {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-light);
    margin-left: 4px;
    text-transform: none;
    letter-spacing: 0;
}

input[type="text"],
input[type="tel"],
input[type="email"],
select {
    width: 100%;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 13px 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-dark);
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input::placeholder {
    color: var(--text-light);
    opacity: 1;
}

input:hover,
select:hover {
    border-color: var(--border-strong);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--brand-green-deep);
    box-shadow: 0 0 0 4px rgba(141, 198, 63, 0.15);
}

input.error,
select.error {
    border-color: #D14343;
    box-shadow: 0 0 0 4px rgba(209, 67, 67, 0.1);
}

/* select custom arrow */
.select-wrap {
    position: relative;
}

.select-wrap select {
    padding-right: 42px;
    cursor: pointer;
}

.select-wrap select:invalid {
    color: var(--text-light);
}

.select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

/* gender toggle */
.gender-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.gender-toggle input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gender-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
    user-select: none;
}

.gender-option:hover {
    border-color: var(--border-strong);
    background: var(--light-gray);
}

.gender-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--light-gray);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 13px;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.gender-toggle input[type="radio"]:checked + .gender-option {
    border-color: var(--brand-green-deep);
    background: var(--brand-green-mist);
    color: var(--text-dark);
    box-shadow: 0 0 0 4px rgba(141, 198, 63, 0.15);
}

.gender-toggle input[type="radio"]:checked + .gender-option .gender-letter {
    background: var(--brand-green-deep);
    color: var(--white);
}

.gender-toggle input[type="radio"]:focus-visible + .gender-option {
    border-color: var(--brand-green-deep);
    box-shadow: 0 0 0 4px rgba(141, 198, 63, 0.18);
}

.gender-toggle.error .gender-option {
    border-color: #D14343;
}

/* file input */
.file-input {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--light-gray);
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.file-input:hover {
    border-color: var(--brand-green-deep);
    background: var(--brand-green-mist);
}

.file-input input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-green-dark);
}

.file-icon svg {
    width: 18px;
    height: 18px;
}

.file-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-text.has-file {
    color: var(--text-dark);
    font-weight: 500;
}

.file-btn {
    flex-shrink: 0;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--brand-green-dark);
    background: var(--white);
    border: 1px solid var(--border);
    padding: 7px 14px;
    border-radius: var(--radius-full);
    letter-spacing: 0.02em;
}

/* submit button */
.btn-submit {
    margin-top: 8px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-green-deep) 100%);
    color: var(--white);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow:
        0 8px 20px rgba(107, 181, 45, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s var(--ease);
    overflow: hidden;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow:
        0 12px 28px rgba(107, 181, 45, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-submit.loading .btn-text {
    opacity: 0.7;
}

.btn-submit.loading .btn-spinner {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* form message */
.form-message {
    display: none;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
}

.form-message.show {
    display: block;
    animation: fade-in 0.4s var(--ease);
}

.form-message.success {
    background: var(--brand-green-soft);
    color: var(--brand-green-dark);
    border: 1px solid rgba(107, 181, 45, 0.3);
}

.form-message.error {
    background: #FEEBEB;
    color: #B03030;
    border: 1px solid rgba(209, 67, 67, 0.25);
}

/* ============================
   Modal — Success Popup
   ============================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.open {
    display: flex;
    animation: modal-fade 0.25s var(--ease);
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 20, 16, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal-card {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 44px 36px 36px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 80px rgba(15, 20, 16, 0.25);
    animation: modal-pop 0.35s var(--ease);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--light-gray);
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}

.modal-close:hover {
    background: var(--border);
    color: var(--text-dark);
    transform: rotate(90deg);
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: var(--brand-green-soft);
    color: var(--brand-green-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: icon-pop 0.5s var(--ease) 0.1s backwards;
}

.modal-icon svg {
    width: 36px;
    height: 36px;
}

.modal-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.modal-text {
    font-size: 15.5px;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 28px;
}

.modal-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-green-deep) 100%);
    color: var(--white);
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    padding: 13px 32px;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow:
        0 8px 18px rgba(107, 181, 45, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
}

.modal-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        0 12px 24px rgba(107, 181, 45, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.modal-btn:active {
    transform: translateY(0);
}

body.modal-open {
    overflow: hidden;
}

@keyframes modal-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes modal-pop {
    from { opacity: 0; transform: scale(0.92) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes icon-pop {
    from { opacity: 0; transform: scale(0.6); }
    to   { opacity: 1; transform: scale(1); }
}

@media (max-width: 480px) {
    .modal-card {
        padding: 38px 24px 28px;
    }
    .modal-icon { width: 64px; height: 64px; margin-bottom: 18px; }
    .modal-icon svg { width: 32px; height: 32px; }
    .modal-title { font-size: 22px; }
    .modal-text { font-size: 14.5px; }
}

/* ============================
   Footer
   ============================ */
.footer {
    text-align: center;
    padding: 28px 24px 32px;
    font-size: 13px;
    color: var(--text-light);
    border-top: 1px solid var(--border);
    background: var(--white);
}

/* ============================
   Animations
   ============================ */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 960px) {
    .apply { padding: 48px 28px; }
    .apply-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .info { padding-top: 0; }
    .form-wrap { padding: 32px 28px; }
}

@media (max-width: 600px) {
    .topbar { padding: 16px 20px; }
    .topbar .brand img { height: 26px; }
    .topbar-label {
        font-size: 10px;
        padding: 6px 12px;
        letter-spacing: 0.18em;
    }

    .apply { padding: 36px 18px; }
    .apply-grid { gap: 36px; }

    .form-wrap {
        padding: 26px 20px;
        border-radius: var(--radius-lg);
    }

    .field-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .lead { font-size: 15.5px; margin-bottom: 28px; }
    .points li { font-size: 14.5px; }

    .file-input { padding: 12px 14px; gap: 10px; }
    .file-icon { width: 32px; height: 32px; }
    .file-text { font-size: 13px; }
    .file-btn { padding: 6px 12px; font-size: 12px; }

    .btn-submit { padding: 15px 22px; font-size: 14.5px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .apply { opacity: 1; transform: none; }
}
