/* --------------------------------------------------------
   FUTUREJOB S.R.L. - DESIGN SYSTEM & STYLES
   -------------------------------------------------------- */
:root {
    /* Color Palette */
    --primary: #f59e0b; /* Amber */
    --primary-hover: #d97706;
    --primary-glow: rgba(245, 158, 11, 0.35);
    --primary-light: rgba(245, 158, 11, 0.1);

    --bg-dark: #0f172a; /* Slate 900 */
    --bg-darker: #020617; /* Slate 950 */
    --bg-card-dark: #1e293b; /* Slate 800 */

    --bg-light: #ffffff;
    --bg-light-alt: #f8fafc; /* Slate 50 */
    --bg-card-light: #ffffff;

    --text-dark: #0f172a;
    --text-dark-muted: #475569;
    --text-light: #f8fafc;
    --text-light-muted: #94a3b8;

    --border-dark: rgba(255, 255, 255, 0.1);
    --border-light: rgba(15, 23, 42, 0.12);

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.15);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.15);

    --whatsapp-color: #25d366;
    --whatsapp-hover: #20ba5a;
    --viber-color: #7360f2;
    --viber-hover: #5d4ad4;

    /* Layout Tokens */
    --container-width: 1200px;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;

    /* Fast System Font Stack (0 render delay, optimal Core Web Vitals) */
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Micro Animations */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* --------------------------------------------------------
   BASE RESET & ACCESSIBILITY
   -------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    font-display: swap;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-light-alt);
    color: var(--text-dark);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
}

/* High Contrast Focus States for Accessibility */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-dark);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }

/* --------------------------------------------------------
   BUTTON SYSTEM (Min 48x48px Touch Target Compliant)
   -------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    min-width: 48px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    text-align: center;
    cursor: pointer;
}

.btn-sm {
    min-height: 40px;
    padding: 6px 14px;
    font-size: 0.85rem;
}

.btn-lg {
    min-height: 52px;
    padding: 14px 28px;
    font-size: 1.05rem;
    border-radius: var(--border-radius-md);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--bg-darker);
    box-shadow: 0 4px 12px var(--primary-glow);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-whatsapp {
    background-color: var(--whatsapp-color);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}
.btn-whatsapp:hover {
    background-color: var(--whatsapp-hover);
    transform: translateY(-2px);
}

.btn-viber {
    background-color: var(--viber-color);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(115, 96, 242, 0.3);
}
.btn-viber:hover {
    background-color: var(--viber-hover);
    transform: translateY(-2px);
}

/* --------------------------------------------------------
   HEADER & TOP BAR
   -------------------------------------------------------- */
.top-bar {
    background-color: var(--bg-darker);
    color: var(--text-light-muted);
    font-size: 0.85rem;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-dark);
}
.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-contact-info {
    display: flex;
    gap: 20px;
}
.top-contact-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}
.top-contact-info a:hover {
    color: var(--primary);
}
.top-contact-info .icon {
    width: 14px;
    height: 14px;
    stroke: var(--primary);
}

/* Language Switcher */
.language-selector {
    display: flex;
    gap: 5px;
}
.lang-btn {
    min-height: 36px;
    min-width: 36px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-light-muted);
    border: 1px solid transparent;
    transition: var(--transition-fast);
}
.lang-btn.active {
    background-color: var(--primary);
    color: var(--bg-darker);
    border-color: var(--primary);
}
.lang-btn:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--text-light);
}

/* Main Navigation Header */
.main-header {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-dark);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 0;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--text-light);
    letter-spacing: -0.02em;
}
.logo-accent {
    color: var(--primary);
}

.nav-menu {
    display: none;
}
.nav-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-darker);
    border-bottom: 1px solid var(--border-dark);
    padding: 20px;
    gap: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    z-index: 100;
}
.nav-menu.active a {
    color: var(--text-light);
    font-size: 1.05rem;
    font-weight: 600;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}


.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}
.header-actions .btn {
    display: none;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    padding: 2px;
}
.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: var(--text-light);
    border-radius: 4px;
    transition: var(--transition-normal);
}
.menu-toggle.active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------
   COMPACT HERO SECTION
   -------------------------------------------------------- */
.hero-section {
    position: relative;
    background-image: url('images/hero_truck.webp');
    background-size: cover;
    background-position: center;
    padding: 50px 0 40px;
    color: var(--text-light);
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.94) 40%, rgba(2, 6, 23, 0.75) 100%);
    z-index: 1;
}
.hero-container {
    position: relative;
    z-index: 2;
}
.hero-content {
    max-width: 600px;
}
.hero-content h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-light);
}
.hero-subtitle {
    font-size: 1rem;
    color: var(--text-light-muted);
    margin-bottom: 20px;
}
.badge {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.hero-actions-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.icon-whatsapp {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

/* --------------------------------------------------------
   JOB LISTINGS & PILL FILTERS
   -------------------------------------------------------- */
.jobs-section {
    padding: 40px 0;
    background-color: var(--bg-light-alt);
}
.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
}
.section-subtitle {
    color: var(--text-dark-muted);
    font-size: 0.95rem;
}

/* Pill Filters */
.pill-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}
.pill-btn {
    min-height: 42px;
    padding: 8px 18px;
    border-radius: 50px;
    background-color: var(--bg-light);
    color: var(--text-dark-muted);
    border: 1px solid var(--border-light);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}
.pill-btn.active, .pill-btn:hover {
    background-color: var(--primary);
    color: var(--bg-darker);
    border-color: var(--primary);
}

/* Job Cards Grid */
.job-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.job-card {
    background-color: var(--bg-card-light);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-md);
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: transform var(--transition-fast);
}
.job-card:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.4);
}
.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.job-tag {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}
.tag-frigo { background-color: rgba(14, 165, 233, 0.12); color: #0284c7; }
.tag-prelata { background-color: rgba(245, 158, 11, 0.12); color: #d97706; }
.tag-containere { background-color: rgba(139, 92, 246, 0.12); color: #7c3aed; }

.job-salary {
    font-weight: 800;
    color: var(--primary-hover);
    font-size: 1.05rem;
}
.job-title {
    font-size: 1.2rem;
    margin-bottom: 4px;
}
.job-location {
    font-size: 0.85rem;
    color: var(--text-dark-muted);
    margin-bottom: 12px;
}
.job-quick-bullets {
    list-style: none;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.job-quick-bullets li {
    font-size: 0.88rem;
    color: var(--text-dark);
}

/* Details Accordion */
.job-details-accordion {
    margin-bottom: 15px;
    border-top: 1px dashed var(--border-light);
    padding-top: 10px;
}
.accordion-toggle {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-hover);
    cursor: pointer;
    user-select: none;
}
.accordion-content {
    margin-top: 10px;
    font-size: 0.88rem;
    color: var(--text-dark-muted);
    line-height: 1.5;
}

.job-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

/* --------------------------------------------------------
   BENEFITS & FORM SECTIONS
   -------------------------------------------------------- */
.benefits-section {
    padding: 40px 0;
    background-color: var(--bg-light);
}
.benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.benefit-card {
    background-color: var(--bg-light-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-md);
    padding: 20px;
}
.benefit-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

/* Application Form */
.apply-section {
    padding: 40px 0;
    background-color: var(--bg-darker);
    color: var(--text-light);
}
.apply-section h2 { color: var(--text-light); }
.apply-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
.apply-contact-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}
.contact-method {
    display: flex;
    align-items: center;
    gap: 12px;
}
.contact-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.apply-form-wrapper {
    background-color: var(--bg-card-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--border-radius-lg);
    padding: 25px 18px;
}
.apply-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group label {
    font-size: 0.85rem;
    color: var(--text-light-muted);
}
.form-control {
    background-color: var(--bg-darker);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-light);
    border-radius: var(--border-radius-sm);
    padding: 12px 14px;
    font-size: 0.95rem;
    font-family: inherit;
    min-height: 48px;
}
.form-control:focus {
    border-color: var(--primary);
    outline: none;
}
.form-control-file {
    font-size: 0.85rem;
    color: var(--text-light-muted);
}
.form-hint {
    font-size: 0.75rem;
    color: var(--text-light-muted);
}
.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}
.form-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    margin-top: 2px;
}
.checkbox-label {
    font-size: 0.8rem;
    color: var(--text-light-muted);
    line-height: 1.4;
}

/* Spinner & Banners */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(2, 6, 23, 0.2);
    border-radius: 50%;
    border-top-color: var(--bg-darker);
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-status {
    padding: 15px;
    border-radius: var(--border-radius-md);
    margin-bottom: 15px;
}
.success-banner { background-color: var(--success-bg); border: 1px solid var(--success); }
.error-banner { background-color: var(--error-bg); border: 1px solid var(--error); }

/* --------------------------------------------------------
   CONTACT & FOOTER
   -------------------------------------------------------- */
.contact-section {
    padding: 40px 0;
    background-color: var(--bg-light);
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
.contact-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}
.contact-item-box {
    display: flex;
    gap: 12px;
}

.google-map-container {
    width: 100%;
    height: 280px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.main-footer {
    background-color: var(--bg-darker);
    color: var(--text-light-muted);
    padding: 40px 0 0;
    border-top: 1px solid var(--border-dark);
    font-size: 0.88rem;
}
.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    padding-bottom: 30px;
}
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.footer-bottom {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 15px 0;
    text-align: center;
    font-size: 0.78rem;
}

/* --------------------------------------------------------
   STICKY MOBILE ACTIONS BAR (FIXED BOTTOM, SAFE-AREA)
   -------------------------------------------------------- */
.mobile-sticky-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(56px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    z-index: 999;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
    background-color: var(--bg-darker);
}
.sticky-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.88rem;
    color: #ffffff;
    min-height: 48px;
    border: none;
    text-decoration: none;
}
.sticky-action .icon {
    width: 18px;
    height: 18px;
}
.apply-action { background-color: var(--primary); color: var(--bg-darker); }
.whatsapp-action { background-color: var(--whatsapp-color); }
.viber-action { background-color: var(--viber-color); }

/* --------------------------------------------------------
   VIBER DESKTOP FALLBACK MODAL
   -------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-dialog {
    background-color: var(--bg-card-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--border-radius-md);
    padding: 25px;
    width: 100%;
    max-width: 400px;
    position: relative;
    color: var(--text-light);
    text-align: center;
}
.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.8rem;
    color: var(--text-light-muted);
}
.viber-icon-lg { font-size: 2.5rem; display: block; margin-bottom: 10px; }
.phone-display {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    margin: 15px 0;
    letter-spacing: 0.05em;
}
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.copy-toast {
    display: block;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--success);
}

/* --------------------------------------------------------
   RESPONSIVE MEDIA QUERIES (TABLET & DESKTOP)
   -------------------------------------------------------- */
@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }
    .mobile-sticky-actions {
        display: none;
    }
    .hero-content h1 {
        font-size: 2.8rem;
    }
    .hero-actions-group {
        flex-direction: row;
    }
    .job-cards-grid {
        grid-template-columns: 1fr 1fr;
    }
    .benefits-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .apply-container {
        grid-template-columns: 1fr 1.1fr;
        align-items: center;
    }
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .menu-toggle { display: none; }
    .nav-menu {
        display: flex;
        gap: 25px;
    }
    .nav-menu a {
        color: var(--text-light-muted);
        font-weight: 500;
        font-size: 0.95rem;
    }
    .nav-menu a:hover {
        color: var(--primary);
    }
    .header-actions .btn {
        display: inline-flex;
    }
    .job-cards-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}
