/* ============================================
   WORK PAGE STYLES — Сторінка вакансій
   Файл: work/work-styles.css
   Використовує змінні з template-styles.css
   ============================================ */


/* =============================================
   FIX: компенсація sticky-шапки при переході по якорях
   ============================================= */
html {
    scroll-padding-top: 110px;
    scroll-behavior: smooth;
}

/* =============================================
   ANIMATIONS — ефекти появи
   ============================================= */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(218, 26, 50, 0.3); }
    50%      { box-shadow: 0 0 20px 6px rgba(218, 26, 50, 0.15); }
}

@keyframes kenburns {
    0%   { transform: scale(1.0); }
    100% { transform: scale(1.08); }
}

.spin-icon {
    animation: spin 1s linear infinite;
}

/* Scroll-triggered animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered delays */
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.30s; }
.delay-3 { transition-delay: 0.45s; }
.delay-4 { transition-delay: 0.60s; }


/* =============================================
   BUTTONS — стиль шаблону (order-btn / catalog-btn)
   ============================================= */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 34px;
    background: linear-gradient(135deg, var(--yellow) 0%, #e6b34d 100%);
    color: var(--navy);
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Inter', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 200, 87, 0.4);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    line-height: 1.3;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--red) 0%, #c41528 100%);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(218, 26, 50, 0.4);
}

.btn-primary svg {
    transition: transform 0.3s ease;
}

.btn-primary:hover svg {
    transform: scale(1.15);
}

.btn-primary.btn-sm {
    padding: 11px 26px;
    font-size: 0.88rem;
}

.btn-primary.btn-lg {
    padding: 16px 42px;
    font-size: 1.05rem;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 34px;
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', Arial, sans-serif;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-outline:hover {
    background: var(--white);
    color: var(--navy);
    border-color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255,255,255,0.2);
}


/* =============================================
   HERO — повноекранна з фото, overlay, ефекти
   ============================================= */
.work-hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: kenburns 20s ease-in-out infinite alternate;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(30, 58, 95, 0.88) 0%,
        rgba(30, 58, 95, 0.7) 40%,
        rgba(218, 26, 50, 0.4) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px 24px;
    max-width: 750px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 200, 87, 0.2);
    border: 1px solid rgba(255, 200, 87, 0.5);
    color: var(--yellow);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 20px;
    border-radius: 30px;
    margin-bottom: 24px;
}

.work-hero .hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.work-hero .hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 300;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.hero-tags {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-tag {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.8);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
    transition: all 0.3s;
}

.hero-tag:hover {
    background: rgba(255,255,255,0.2);
    color: var(--white);
    transform: translateY(-2px);
}

.hero-scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    letter-spacing: 1px;
    animation: float 2.5s ease-in-out infinite;
}


/* =============================================
   SECTIONS — контентні блоки
   ============================================= */
.work-section {
    padding: 80px 24px;
}

.section-alt {
    background: linear-gradient(180deg, #f6f8fb 0%, #eef1f5 100%);
}

.work-container {
    max-width: 1100px;
    margin: 0 auto;
}

.work-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.work-grid.reverse {
    direction: rtl;
}

.work-grid.reverse > * {
    direction: ltr;
}


/* --- Images --- */
.work-image {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(30, 58, 95, 0.12);
}

.work-image::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.2);
    pointer-events: none;
}

.work-image img {
    width: 100%;
    display: block;
    border-radius: 16px;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-image:hover img {
    transform: scale(1.04);
}


/* --- Text content --- */
.work-text h2 {
    font-size: 2rem;
    color: var(--navy);
    margin-bottom: 18px;
    font-weight: 800;
    position: relative;
    display: inline-block;
}

.work-text h2::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--red), var(--yellow));
    border-radius: 2px;
}

.work-text p {
    margin-bottom: 14px;
    line-height: 1.75;
    color: #4a5568;
    font-size: 0.98rem;
}

.work-text a {
    color: var(--red);
    text-decoration: none;
    transition: color 0.2s;
}

.work-text a:hover {
    color: #a11020;
    text-decoration: underline;
}


/* =============================================
   VALUES LIST
   ============================================= */
.values-list {
    margin-top: 24px;
}

.value-item {
    display: flex;
    gap: 16px;
    margin-bottom: 18px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 10px;
    transition: background 0.3s;
}

.value-item:hover {
    background: rgba(58, 175, 217, 0.06);
}

.value-number {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--red), #e63946);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    box-shadow: 0 4px 12px rgba(218, 26, 50, 0.25);
}

.value-item div {
    line-height: 1.65;
    color: #4a5568;
    font-size: 0.95rem;
}

.value-item div strong {
    color: var(--navy);
}


/* =============================================
   SCHEDULE CARDS
   ============================================= */
.schedule-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.schedule-card {
    background: var(--white);
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(30, 58, 95, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(58, 175, 217, 0.1);
}

.schedule-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(30, 58, 95, 0.12);
}

.schedule-icon {
    color: var(--cyan);
    margin-bottom: 12px;
}

.schedule-card strong {
    display: block;
    color: var(--navy);
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.schedule-card p {
    font-size: 0.85rem;
    margin: 0;
    color: #666;
    line-height: 1.5;
}


/* =============================================
   KNOWLEDGE LIST
   ============================================= */
.knowledge-list {
    margin-top: 20px;
}

.knowledge-item {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 10px;
    transition: background 0.3s;
}

.knowledge-item:hover {
    background: rgba(218, 26, 50, 0.04);
}

.knowledge-icon {
    flex-shrink: 0;
    margin-top: 3px;
}

.knowledge-item div {
    line-height: 1.7;
    color: #4a5568;
    font-size: 0.95rem;
}

.highlight-text {
    margin-top: 24px;
    padding: 18px 22px;
    background: linear-gradient(135deg, rgba(218, 26, 50, 0.06) 0%, rgba(255, 200, 87, 0.08) 100%);
    border-radius: 12px;
    border-left: 4px solid var(--red);
    display: flex;
    align-items: center;
    gap: 14px;
}

.highlight-text span {
    font-weight: 600;
    color: var(--navy);
    font-size: 0.95rem;
    line-height: 1.5;
}


/* =============================================
   STEPS
   ============================================= */
.steps-list {
    margin-top: 20px;
}

.step-item {
    display: flex;
    gap: 18px;
    margin-bottom: 24px;
    align-items: flex-start;
    position: relative;
}

/* Вертикальна лінія між кроками */
.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 20px;
    top: 48px;
    bottom: -16px;
    width: 2px;
    background: linear-gradient(180deg, var(--cyan), rgba(58, 175, 217, 0.2));
}

.step-number {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--navy), var(--cyan));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.2);
    position: relative;
    z-index: 1;
}

.step-item div strong {
    display: block;
    color: var(--navy);
    margin-bottom: 4px;
    font-size: 1rem;
}

.step-item div p {
    margin: 0;
    color: #4a5568;
    line-height: 1.65;
}

.cta-text {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    color: #4a5568;
}


/* =============================================
   FORM SECTION
   ============================================= */
.form-section {
    background: linear-gradient(180deg, #fff 0%, #f6f8fb 100%);
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(218, 26, 50, 0.08), rgba(255, 200, 87, 0.12));
    color: var(--red);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 7px 22px;
    border-radius: 30px;
    margin-bottom: 16px;
    border: 1px solid rgba(218, 26, 50, 0.15);
}

.section-heading {
    font-size: 2.2rem;
    color: var(--navy);
    margin-bottom: 10px;
    font-weight: 800;
}

.section-subheading {
    color: #6b7280;
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.7;
    font-size: 1rem;
}


/* --- Form Card --- */
.job-form {
    max-width: 780px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid rgba(30, 58, 95, 0.08);
    border-radius: 20px;
    padding: 44px 40px;
    box-shadow: 0 8px 40px rgba(30, 58, 95, 0.07);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-bottom: 22px;
}

.form-row.single {
    grid-template-columns: 1fr;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--navy);
    margin-bottom: 7px;
    line-height: 1.45;
}

.req { color: var(--red); }

.optional {
    font-weight: 400;
    color: #999;
    font-size: 0.82rem;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: 'Inter', Arial, sans-serif;
    color: var(--gray-dark);
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    background: #f8fafc;
    -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(58, 175, 217, 0.12);
    background: var(--white);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #b0b8c4;
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
}

.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23999' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}


/* =============================================
   FILE UPLOAD — красиве поле
   ============================================= */
.file-input-hidden {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.file-upload-area {
    border: 2px dashed #d1d9e6;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8fafc 0%, #f0f4f8 100%);
    position: relative;
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--cyan);
    background: linear-gradient(135deg, rgba(58, 175, 217, 0.04) 0%, rgba(58, 175, 217, 0.08) 100%);
    box-shadow: 0 0 0 4px rgba(58, 175, 217, 0.08);
}

.file-upload-area.dragover {
    transform: scale(1.01);
}

.file-upload-area.has-files {
    border-style: solid;
    border-color: var(--cyan);
    background: rgba(58, 175, 217, 0.03);
}

.file-upload-icon {
    color: var(--cyan);
    margin-bottom: 10px;
    transition: transform 0.3s;
}

.file-upload-area:hover .file-upload-icon {
    transform: translateY(-4px);
}

.file-upload-text {
    color: #4a5568;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.file-upload-text strong {
    color: var(--cyan);
}

.file-upload-hint {
    color: #9ca3af;
    font-size: 0.82rem;
}

.file-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--navy);
}

.file-item svg {
    color: var(--cyan);
    flex-shrink: 0;
}

.file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    color: #9ca3af;
    font-size: 0.78rem;
    flex-shrink: 0;
}


/* --- Submit Button --- */
.form-submit {
    text-align: center;
    margin-top: 32px;
}

.form-submit .btn-primary {
    animation: pulse-glow 2.5s ease-in-out infinite;
}

.form-submit .btn-primary:hover {
    animation: none;
}

.form-submit .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    animation: none;
    box-shadow: none;
}


/* --- Success / Error --- */
.form-success {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border: 1px solid #a5d6a7;
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    margin-bottom: 30px;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

.success-icon {
    margin-bottom: 16px;
}

.form-success h3 {
    color: #2e7d32;
    margin-bottom: 8px;
    font-size: 1.5rem;
}

.form-success p {
    color: #4a5568;
    font-size: 1rem;
}

.form-error {
    background: linear-gradient(135deg, #fce4ec 0%, #fef0f0 100%);
    border: 1px solid #ef9a9a;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-bottom: 30px;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

.form-error a {
    color: var(--red);
    font-weight: 700;
}


/* =============================================
   RESPONSIVE
   ============================================= */

/* Tablet */
@media (max-width: 900px) {
    .work-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .work-grid.reverse {
        direction: ltr;
    }

    .work-section {
        padding: 60px 20px;
    }

    .work-hero {
        min-height: 75vh;
    }

    .schedule-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .work-hero {
        min-height: 90vh;
    }

    .work-hero .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary,
    .btn-outline {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .job-form {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .section-heading {
        font-size: 1.7rem;
    }

    .schedule-cards {
        grid-template-columns: 1fr;
    }

    .work-text h2 {
        font-size: 1.6rem;
    }

    .value-item {
        padding: 10px 8px;
    }

    .file-upload-area {
        padding: 24px 16px;
    }

    .step-item:not(:last-child)::after {
        left: 20px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .work-section {
        padding: 44px 16px;
    }

    .work-hero {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .hero-tags {
        gap: 6px;
    }

    .hero-tag {
        padding: 5px 12px;
        font-size: 0.78rem;
    }

    .hero-scroll-hint {
        bottom: 16px;
    }

    .job-form {
        padding: 22px 16px;
    }
}
