/* ==========================================================================
   David & Sons.co — Careers Page Styles
   Extends the enterprise design system for the careers-specific layout
   ========================================================================== */

/* ── Hero Section ──────────────────────────────────────────────────────── */
.careers-hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 140px 20px 100px;
}

/* Careers Hero simplified */

.careers-hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.careers-hero-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
    padding: 6px 18px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 980px;
    background: var(--accent-subtle);
    transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
    cursor: default;
}

.careers-hero-tag:hover {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

.careers-hero-headline {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.08;
    margin-bottom: 20px;
    color: #ffffff;
}

.careers-hero-sub {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.careers-hero-cta {
    display: flex;
    justify-content: center;
}

.btn-lg {
    position: relative;
}

.btn-lg::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 980px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: none;
    pointer-events: none;
}

.btn-lg:hover::after {
    opacity: 1;
    animation: pulseRing 1.5s ease-out infinite;
}

@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    70% {
        transform: scale(1.06);
        opacity: 0;
    }

    100% {
        transform: scale(1.06);
        opacity: 0;
    }
}

/* ── Why Join Us ───────────────────────────────────────────────────────── */
.why-join {
    background: var(--bg-secondary);
}

.section-header {
    margin-bottom: 48px;
}

.why-join-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.why-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-bottom: 3px solid transparent;
    border-radius: 18px;
    padding: 34px 26px;
    transition: background 0.4s ease, border-color 0.4s ease, transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.45s ease;
    text-align: center;
}

.why-card:hover {
    background: var(--card-hover);
    border-bottom-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.why-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--accent-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    color: var(--accent);
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94), background 0.35s ease;
}

.why-card:hover .why-card-icon {
    background: rgba(59, 130, 246, 0.14);
    animation: iconBounce 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes iconBounce {
    0% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-6px);
    }

    70% {
        transform: translateY(2px);
    }

    100% {
        transform: translateY(0);
    }
}

.why-card h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.why-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ── Open Positions ────────────────────────────────────────────────────── */
.open-positions {
    background: var(--bg-primary);
}

.position-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 3px solid transparent;
    border-radius: 20px;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
    transition: border-left-color 0.4s ease, border-color 0.4s ease, box-shadow 0.5s ease;
}

.position-card:hover {
    border-left-color: var(--accent);
    border-color: var(--border-hover);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.position-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.position-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 5px 14px;
    border-radius: 980px;
    border: 1px solid var(--border);
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.tag:hover {
    background: rgba(59, 130, 246, 0.06);
    color: var(--accent);
    border-color: rgba(59, 130, 246, 0.12);
}

.tag svg {
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.tag:hover svg {
    opacity: 1;
}

.position-apply-btn {
    flex-shrink: 0;
}

.position-body {
    border-top: 1px solid var(--border);
    padding: 28px 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.position-col h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 14px;
}

.position-col ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.position-col li {
    position: relative;
    padding-left: 16px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.position-col li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.5;
}

/* ── Application Form ──────────────────────────────────────────────────── */
.career-apply {
    background: var(--bg-secondary);
}

.career-apply-container {
    max-width: 760px;
}

.career-form {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    margin-top: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    margin-bottom: 20px;
}

.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
    border-radius: 10px;
    font-size: 0.9375rem;
    color: var(--text-tertiary);
    transition: border-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
}

.file-upload-wrapper:hover .file-upload-label {
    border-color: var(--accent);
    color: var(--text-secondary);
}

.file-upload-label.has-file {
    border-color: var(--accent);
    color: var(--accent);
    border-style: solid;
}

.form-submit {
    margin-top: 8px;
}

.btn-block {
    width: 100%;
}

.btn-submit {
    position: relative;
}

.btn-submit .btn-text {
    transition: opacity 0.3s ease;
}

.btn-submit .btn-loader {
    display: none;
    position: absolute;
    animation: spin 1s linear infinite;
}

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

.btn-submit.loading .btn-loader {
    display: block;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ── Toast ─────────────────────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 0.9375rem;
    font-weight: 500;
    backdrop-filter: saturate(180%) blur(20px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 90vw;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.toast-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.toast-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .careers-hero {
        min-height: auto;
        padding: 120px 20px 80px;
    }

    .careers-hero-headline {
        font-size: 2.5rem;
    }

    .careers-hero-sub {
        font-size: 1rem;
    }

    .why-join-grid {
        grid-template-columns: 1fr;
    }

    .position-body {
        grid-template-columns: 1fr;
    }

    .career-form {
        padding: 24px;
    }

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

    .position-header {
        padding: 20px 24px;
    }

    .position-body {
        padding: 20px 24px;
    }
}

@media (max-width: 600px) {
    .careers-hero-headline {
        font-size: 2rem;
    }
}